/* Explore page (loaded after public.css). */
.qx .qm-wrap { max-width: 1080px; }
.qx-head { background: var(--accent); color: #fff; padding: 28px 0 56px; }
.qx-top { display: flex; justify-content: space-between; align-items: center; margin: 0 0 18px; }
.qx-top a { color: #fff; font-weight: 600; font-size: .9em; border: 1px solid rgba(255,255,255,.6); border-radius: 999px; padding: 6px 14px; text-decoration: none; }
.qx-top a.qx-brand { border: 0; padding: 0; border-radius: 0; font-size: 1.1em; }
.qx-brand img { display: block; height: 40px; width: auto; max-width: 200px; object-fit: contain; }
.qx-head h1 { font-size: 1.5em; }
.qx-head p { opacity: .9; margin: 6px 0 0; }

.qx-form { background: var(--surface); border-radius: var(--radius); box-shadow: var(--shadow); padding: 12px; margin-top: -36px; display: grid; gap: 8px; grid-template-columns: 1fr 1fr; }
.qx-form .qx-q { grid-column: 1 / -1; }
.qx-form button { grid-column: 1 / -1; }
.qx-form input, .qx-form select { min-height: 44px; border-radius: 10px; border: 1px solid var(--line); background: var(--bg); color: var(--text); padding: 0 12px; font-size: 1em; min-width: 0; }
@media (min-width: 760px) {
  .qx-form { grid-template-columns: 2fr 1fr 1fr 1fr auto; }
  .qx-form .qx-q, .qx-form button { grid-column: auto; }
}

.qx-bar { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-top: 14px; }
.qx-bar p { margin: 0; }
.qx-sort { display: flex; gap: 4px; background: var(--surface); border-radius: 999px; padding: 3px; box-shadow: var(--shadow); }
.qx-sort a { padding: 5px 12px; border-radius: 999px; text-decoration: none; color: var(--muted); font-size: .88em; font-weight: 600; }
.qx-sort a[aria-current] { background: var(--text); color: var(--bg); }
.qx-h { font-size: 1.1em; margin: 22px 0 0; }

.qx-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; margin-top: 12px; }
@media (min-width: 640px) { .qx-grid { grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 12px; } }
@media (max-width: 639px) { .qx-card__img, .qx-grid .qx-ad__img { aspect-ratio: 4/3; } .qx-card__body, .qx-ad__body { padding: 8px 10px 10px; } .qx-card h2, .qx-ad h3 { font-size: .92em; } }
.qx-card { display: block; background: var(--surface); border-radius: var(--radius); box-shadow: var(--shadow); overflow: hidden; color: var(--text); text-decoration: none; }
.qx-card--pin { outline: 2px solid color-mix(in srgb, var(--accent) 55%, transparent); }
.qx-card__img { position: relative; aspect-ratio: 16/9; background: center/cover no-repeat, color-mix(in srgb, var(--accent) 30%, var(--line)); }
.qx-badge { position: absolute; left: 8px; top: 8px; background: var(--accent); color: #fff; font-size: .72em; font-weight: 700; padding: 3px 8px; border-radius: 999px; }
.qx-card__body { padding: 10px 12px 12px; }
.qx-card h2 { font-size: 1em; }
.qx-card p { margin: 4px 0 0; color: var(--muted); font-size: .85em; }
.qx-pages { display: flex; gap: 8px; justify-content: center; margin: 20px 0; }

/* Ads */
.qx-ad { display: flex; flex-direction: column; background: var(--surface); border-radius: var(--radius); box-shadow: var(--shadow); overflow: hidden; color: var(--text); text-decoration: none; border: 1px dashed var(--line); }
.qx-ad__img { aspect-ratio: 16/9; background: center/cover no-repeat, color-mix(in srgb, var(--accent) 14%, var(--bg)); display: grid; place-items: center; font-size: 34px; }
.qx-ad__body { padding: 10px 12px 12px; }
.qx-ad__label { display: inline-block; font-size: .7em; font-weight: 700; letter-spacing: .02em; text-transform: uppercase; color: var(--muted); background: var(--bg); border: 1px solid var(--line); border-radius: 4px; padding: 1px 6px; }
.qx-ad h3 { font-size: 1em; margin: 6px 0 0; }
.qx-ad p { margin: 4px 0 0; color: var(--muted); font-size: .85em; }

.qx-carousel { margin-top: 28px; }
.qx-carousel__head { display: flex; align-items: flex-end; justify-content: space-between; }
.qx-carousel__head .qx-h { margin: 0; }
.qx-carousel__nav { display: flex; gap: 6px; }
.qx-carousel__nav button { width: 36px; height: 36px; border-radius: 999px; border: 1px solid var(--line); background: var(--surface); font-size: 20px; line-height: 1; cursor: pointer; }
.qx-track { display: grid; grid-auto-flow: column; grid-auto-columns: 78%; gap: 12px; overflow-x: auto; scroll-snap-type: x mandatory; scroll-behavior: smooth; padding: 12px 2px 8px; scrollbar-width: none; overscroll-behavior-x: contain; }
.qx-track::-webkit-scrollbar { display: none; }
.qx-track > * { scroll-snap-align: start; }
@media (min-width: 600px) { .qx-track { grid-auto-columns: calc((100% - 24px) / 3); } }
@media (min-width: 960px) { .qx-track { grid-auto-columns: calc((100% - 36px) / 4); } }
@media (prefers-reduced-motion: reduce) { .qx-track { scroll-behavior: auto; } }
