/* Gloya — desktop / responsive layer.
   Driven by container queries on .g-app, so the SAME app reflows whether it's
   in a 402px phone frame or a 1360px browser window. */

@container app (min-width: 900px) {

  .g-app { font-size: 16px; }

  /* chrome swap: bottom tabs out, top nav in */
  .g-tabbar { display: none; }
  .g-dnav { display: block; position: relative; z-index: 8;
    background: color-mix(in oklch, var(--bg) 88%, transparent);
    backdrop-filter: blur(16px) saturate(160%); -webkit-backdrop-filter: blur(16px) saturate(160%);
    border-bottom: 1px solid var(--border); flex-shrink: 0; }
  .g-dnav-inner { max-width: 1240px; margin: 0 auto; height: 66px; display: flex; align-items: center; gap: 26px; padding: 0 40px; }
  .g-dnav-logo { display: flex; align-items: center; }
  .g-dnav-links { display: flex; gap: 2px; }
  .g-dnav-link { font-size: 15px; font-weight: 500; color: var(--ink-2); padding: 9px 15px; border-radius: 10px; transition: all .14s; }
  .g-dnav-link:hover { color: var(--ink); background: var(--surface-2); }
  .g-dnav-link.is-on { color: var(--ink); font-weight: 600; }
  .g-dnav-right { margin-left: auto; display: flex; align-items: center; gap: 10px; }
  .g-dnav-search { display: flex; align-items: center; gap: 9px; background: var(--surface-2); border: 1px solid var(--border); border-radius: 999px; padding: 9px 18px 9px 14px; color: var(--muted); font-size: 14px; min-width: 230px; transition: border-color .14s; }
  .g-dnav-search:hover { border-color: var(--border-2); }
  .g-dnav-search-ic { display: flex; }
  .g-dnav-icon { width: 42px; height: 42px; border-radius: 50%; background: var(--surface-2); border: 1px solid var(--border); display: flex; align-items: center; justify-content: center; }
  .g-dnav-icon:hover { background: var(--surface-3); }

  /* page header: drop status-bar padding + glass, it's below the nav now */
  .g-head { padding-top: 30px; position: static; background: transparent; backdrop-filter: none; -webkit-backdrop-filter: none; }
  .g-head--home { display: none; }
  .g-head-title { font-size: 38px; }

  /* centered content column */
  .g-screen { max-width: 1180px; margin: 0 auto; width: 100%; padding-bottom: 64px; }
  .g-pad { padding-left: 40px; padding-right: 40px; }

  /* hover affordances */
  .g-card, .g-row, .g-guide-card, .g-msg-prod, .g-asst-chip, .g-compare-teaser, .g-ret, .g-feature { transition: transform .16s, box-shadow .2s, border-color .16s; }
  .g-card:hover, .g-guide-card:hover, .g-feature:hover { transform: translateY(-3px); box-shadow: 0 16px 40px -24px rgba(0,0,0,0.4); }
  .g-row:hover, .g-msg-prod:hover, .g-ret:hover { border-color: var(--border-2); }
  .g-prompt:hover, .g-chip:hover, .g-sortpill:hover { filter: brightness(0.97); }
  .g-card:active, .g-row:active, .g-guide-card:active, .g-feature:active { transform: none; }

  /* ── Home ── */
  .g-ask { max-width: 760px; }
  .g-prompt-row { max-width: 760px; flex-wrap: wrap; overflow: visible; }
  .g-cats { flex-wrap: wrap; overflow: visible; gap: 18px; padding: 26px 40px 8px; }
  .g-cat-tile { width: 76px; height: 76px; }
  .g-sect-title { font-size: 26px; }

  .g-feature { display: grid; grid-template-columns: 1.3fr 1fr; align-items: stretch; }
  .g-feature-media { display: flex; padding: 16px; }
  .g-feature-media .g-ph { aspect-ratio: auto; height: 100%; min-height: 360px; }
  .g-feature-body { display: flex; flex-direction: column; justify-content: center; padding: 36px 40px; }
  .g-feature-name { font-size: 32px; }
  .g-feature-tag { font-size: 16px; }

  /* horizontal rails → responsive grids */
  .g-hscroll { display: grid; grid-template-columns: repeat(auto-fill, minmax(248px, 1fr)); gap: var(--gap); overflow: visible; padding: 0 40px 4px; }
  .g-hcard, .g-guide-hwrap { width: auto; }
  .g-grid { grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); }

  /* ── Explore ── */
  .g-chiprow { flex-wrap: wrap; overflow: visible; }
  .g-searchbox { max-width: 620px; height: 52px; }

  /* ── Saved ── */
  .g-saved-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 14px; }

  /* ── Product: two-column, sticky gallery ── */
  .g-product { height: 100%; }
  .g-prod-scroll { max-width: 1160px; margin: 0 auto; padding: 34px 40px 72px;
    display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr); gap: 44px; align-items: start; }
  .g-prod-hero { position: sticky; top: 24px; border-radius: 22px; overflow: hidden; border: 1px solid var(--border); }
  .g-prod-hero .g-ph { border-radius: 0; }
  .g-prod-dots { bottom: 16px; }
  .g-prod-float { display: none; }
  .g-prod-dtop { display: flex; }
  .g-prod-body { margin-top: 0; border-radius: 0; padding: 0; background: transparent; }
  .g-prod-name { font-size: 34px; }
  .g-prod-pricerow { margin-top: 22px; }
  .g-prod-buybox { display: block; margin-top: 20px; border: 1px solid var(--border); border-radius: var(--r); padding: 18px; background: var(--surface); }
  .g-prod-buybox-head { display: flex; align-items: baseline; justify-content: space-between; margin-bottom: 13px; }
  .g-prod-buybox-head > span:first-child { font-weight: 600; font-size: 15px; }
  .g-prod-buybox-best { font-family: var(--font-mono); font-size: 13px; font-weight: 600; color: var(--accent-ink-strong); }
  .g-prod-buybox-note { font-size: 11.5px; color: var(--faint); margin-top: 12px; }
  .g-buybar { display: none; }

  /* ── Assistant: centered conversation ── */
  .g-assistant { height: 100%; }
  .g-asst-head .g-head-row, .g-msgs, .g-asst-welcome { max-width: 780px; margin-left: auto; margin-right: auto; }
  .g-asst-scroll { padding: 8px 40px 16px; }
  .g-asst-suggest { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
  .g-msg-products { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
  .g-msg-products .g-msg-prod:first-child { grid-column: 1 / -1; }
  .g-composer { justify-content: center; gap: 12px; padding: 14px 40px 18px; }
  .g-composer-input { max-width: 700px; height: 50px; }

  /* ── Compare ── */
  .g-cmp { max-width: 940px; }
  .g-cmp-cols { max-width: 720px; margin-left: auto; margin-right: auto; }
  .g-cmp-col { gap: 5px; }
  .g-cmp-col .g-ph { aspect-ratio: auto; height: 210px; }
  .g-cmp-name { line-height: 1.25; }
  .g-cmp-vs { padding-top: 92px; }

  /* ── Guide: editorial article column ── */
  .g-guide { max-width: 780px; }
  .g-guide-title { font-size: 40px; }
  .g-rank-media { width: 96px; height: 96px; }
  .g-rank-name { font-size: 18px; }

  /* footer note spans column */
  .g-foot-note { max-width: 780px; margin: 0 auto; }

  /* ── Account / legal / brand / auth on desktop ── */
  .g-acc-card, .g-acc-stats, .g-acc-guest { max-width: 720px; }
  .g-acc-stat-num { font-size: 26px; }
  .g-acc-rows, .g-acc-revlist { max-width: 720px; }
  .g-legal, .g-brand { max-width: 820px; }
  .g-legal-title { font-size: 36px; }
  .g-brand-method { grid-template-columns: repeat(2, 1fr); }

  /* auth modal: center it instead of bottom sheet */
  .g-auth-wrap { align-items: center; padding: 30px; }
  .g-auth { border-radius: 24px; max-height: 90%; }
  .g-auth-body { padding: 8px 30px 32px; }

  /* ── Desktop footer ── */
  .g-footer { display: block; border-top: 1px solid var(--border); margin-top: 30px; background: var(--surface-2); }
  .g-footer-inner { max-width: 1180px; margin: 0 auto; padding: 48px 40px 32px; display: grid; grid-template-columns: 1.6fr 1fr 1fr 1fr; gap: 36px; }
  .g-footer-tag { font-size: 13.5px; line-height: 1.55; color: var(--muted); margin: 14px 0 0; max-width: 300px; text-wrap: pretty; }
  .g-footer-h { font-size: 12px; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; color: var(--muted); margin-bottom: 14px; }
  .g-footer-col { display: flex; flex-direction: column; gap: 10px; align-items: flex-start; }
  .g-footer-link { font-size: 14px; color: var(--ink-2); text-align: left; transition: color .14s; }
  .g-footer-link:hover { color: var(--accent-ink-strong); }
  .g-footer-base { max-width: 1180px; margin: 0 auto; padding: 20px 40px 40px; font-size: 12.5px; color: var(--faint); border-top: 1px solid var(--border); }
}

/* Wider desktop: more product columns */
@container app (min-width: 1180px) {
  .g-grid { grid-template-columns: repeat(4, 1fr); }
  .g-hscroll { grid-template-columns: repeat(4, 1fr); }
}
