@import url('https://fonts.googleapis.com/css2?family=Space+Grotesk:wght@500;600;700&display=swap');

:root{
  --mhsp-bottle-order:1;
  --mhsp-copy-order:2;
}

html[data-mobile-header-search-prototype] .wb-header{
  background:var(--bg,var(--sk-q-bg));
  backdrop-filter:none;
  -webkit-backdrop-filter:none;
}

/* The landing's own sticky search bar was retired 2026-07-04: the landing now
   uses the shared header's wb-search on every width, the same search box as
   every other page (Robert preferred that box). Its rules were removed from
   here; the landing-LAYOUT rules below (hero sizing, cards, Buddy dock/
   composer) stay — they're independent of the old bar. */

html[data-mobile-header-search-prototype] .wbr-tab{
  display:none !important;
}

/* ============================================================================
   Buddy on the landing — full-screen takeover (2026-07-01).
   Open  = Buddy covers the ENTIRE viewport: the page header + catalogue search
           bar are hidden and a dark backdrop seals every gap (incl. around the
           iOS keyboard), so none of the landing shows through. The bottom
           composer is restyled to look like the catalogue search bar but it
           drives Buddy (ChatGPT-style: type & send, no toggle, no chevron).
   Close = the panel-head minimise (top-right) → back to the clean landing.
   ========================================================================== */

/* The full-screen takeover below is a MOBILE-landing behaviour. Above 860px the
   prototype template is the desktop front door and Buddy is a persistent left
   rail (html.bd-rail-on, see the former Buddy stylesheet): the composer bar must stay visible
   and starting a chat must NOT hide the page chrome. The bd-rail-on class is set
   at all widths, so scope by the same 860px breakpoint the rail uses rather than
   by the class — otherwise these rules leak into the desktop rail and hide the
   composer / blank the page. */


/* Bottom composer = a clean search bar that drives Buddy: drop the Ask/Search
   toggle and the minimise chevron; style it like the top catalogue search bar
   (cream bar, white box, ink border). */

/* .bd-search-results (the live typeahead + "Ask Buddy" row): hidden here
   unconditionally pre-2026-07-10 because the top header search box was
   landing's visible-at-rest mobile surface and its own dropdown already
   covered typeahead — a second one in the bottom bar was redundant. That
   stopped being true once 2026-07-09's "app search moves to bottom bar"
   change hid the top header box on the app (<=860px) everywhere, including
   landing: the bottom bar's dropdown became landing's ONLY typeahead there,
   same as every other page (2026-07-09 unification pass), but this rule was
   never revisited — landing kept typing-search silently suppressed while
   every other page showed live results (Robert, 2026-07-10: "the search
   functions differently on the landing page... it seems to run the old
   catalogue search only function"). Desktop keeps the old suppression: the
   top header dropdown still works there, so showing a second one in the
   rail composer would be redundant. */



/* Desktop (2026-07-04): on the rail, the homepage composer bar was the only one
   left cream — every other page's desktop bar is the espresso strip. Match the
   standard rail bar (--bd-rail-bg-solid) so moving page↔page is seamless. Fenced
   to ≥861px; the ≤860px app bar (#1a0f0a, above) is untouched. */


/* App (≤860px) composer reskin, 2026-07-10 — mirrors the former Buddy stylesheet's unified
   cream-on-espresso treatment. Needed HERE too because this file loads after
   the former Buddy stylesheet on the landing, so its unconditional white rule above would
   otherwise win the cascade at equal specificity. Desktop (≥861px) keeps the
   white pill this file has always given the landing rail composer. */




/* The contenteditable composer (replaces the <textarea> on the landing so iOS
   keeps its AutoFill bar off). Styled to match the textarea it stands in for. */
html[data-mobile-header-search-prototype] .bdm-ce{
  flex:1 1 auto;
  min-width:0;
  min-height:1.5em;
  max-height:124px;
  overflow-y:auto;
  padding:0;
  border:none;
  outline:none;
  background:none;
  font:inherit;
  font-size:1.02rem;
  line-height:1.45;
  color:var(--ink,var(--sk-q-shadow));
  white-space:pre-wrap;
  overflow-wrap:anywhere;
  -webkit-user-modify:read-write-plaintext-only;
}
html[data-mobile-header-search-prototype] .bdm-ce:empty::before{
  content:attr(data-ph);
  color:var(--muted,var(--sk-lg-muted));
  pointer-events:none;
}



html[data-mobile-header-search-prototype] .wb-hero.wb-hero-band{
  padding:0;
}

html[data-mobile-header-search-prototype] .wb-hero.wb-hero-band .wb-hero-in{
  min-height:0;
  padding:.52rem 1rem .5rem;
  display:flex !important;
  flex-direction:column;
  align-items:center;
  gap:.28rem;
  text-align:center;
}

html[data-mobile-header-search-prototype] .wb-hero.wb-hero-band .wb-bottle-stage{
  order:var(--mhsp-bottle-order);
  min-height:0;
  width:100%;
}

html[data-mobile-header-search-prototype] .wb-hero.wb-hero-band .wb-bottle-stage img{
  max-height:160px;
}

html[data-mobile-header-search-prototype] .wb-hero.wb-hero-band .wb-hero-copy{
  order:var(--mhsp-copy-order);
}

html[data-mobile-header-search-prototype] .wb-hero.wb-hero-band .bd-hero-h1,
html[data-mobile-header-search-prototype] .wb-hero.wb-hero-band .bd-hero-cta-row,
html[data-mobile-header-search-prototype] .wb-hero.wb-hero-band .bd-hero-stats{
  display:none !important;
}

html[data-mobile-header-search-prototype] .wb-hero.wb-hero-band .bd-hero-eyebrow{
  margin:0;
  font-size:.78rem;
  line-height:1.2;
}

html[data-mobile-header-search-prototype] .wrap{
  padding-top:.65rem;
}

/* T389 deploy 1 (2026-08-23): the .picks/.picks-head margin override and the
   "hide every shelf header on the landing" rule that used to live here
   (both predate the 2026-07-23 magazine, back when this template's own
   #market/#pickedForYou mounts had no header treatment yet) are REMOVED —
   the landing now shares market.css's header treatment B (slim label + rule
   + "See all ->") uniformly with /v2/market, same margins, headers visible. */









html[data-mobile-header-search-prototype] .trend-dot{
  display:none !important;
}

html[data-mobile-header-search-prototype] .card-grid,
html[data-mobile-header-search-prototype] .card-grid-compact{
  align-items:stretch;
}

html[data-mobile-header-search-prototype] .card{
  height:100%;
}

html[data-mobile-header-search-prototype] .price-block{
  margin-top:auto;
}

html[data-mobile-header-search-prototype] .price-row{
  min-height:2.35rem;
  align-items:baseline;
}

html[data-mobile-header-search-prototype] .card-commerce{
  display:flex;
  flex-direction:column;
  justify-content:flex-end;
  /* Just enough floor to keep prices/buttons aligned across a row via the
     bottom-pinned price-block; the old 6.75rem floor opened a big ABV→price gap. */
  min-height:2.25rem;
}



/* ===========================================================================
   Discover surface (2026-08-03, ask #1597) — PARTIALLY REVERSES 2026-07-09.
   ---------------------------------------------------------------------------
   The 2026-07-09 rule made the bottom Buddy bar the app's one visible-at-rest
   search surface on EVERY page. That is superseded HERE ONLY: Buddy is the
   authenticated home and intelligence layer, and Discover no longer depends on
   the global Buddy composer as its search interface. Every other mobile page
   keeps the bar exactly as 2026-07-09 left it.
   See the supersede note in
   sprint-state/decisions/2026-07-09-app-search-moves-to-bottom-bar.md.

   The bar is HIDDEN AT REST here and reappears the moment Buddy is engaged
   (.bd-has-convo / .bd-feed-open — set by the former Buddy script when a card's "Ask Buddy
   about it" opens him), which is the "composer appears for follow-up"
   requirement. It is hidden, never unmounted, so all of Buddy's wiring is
   untouched.
   =========================================================================== */


/* --- Discover's own search control -----------------------------------------
   Compact, and deliberately NOT .wb-search (the header box that stays hidden
   on the app) nor the retired landing search-bar treatment — the old oversized
   site-wide search stays retired. It searches Discover CONTENT and never
   implies a Buddy conversation. Mobile-only. */
.disc-search{ display:none; }
@media (max-width:860px){
  html[data-discover-surface] .disc-search{
    display:flex; align-items:center; gap:.5rem;
    margin:.6rem .8rem .75rem;
    padding:.5rem .75rem;
    background:#241708;
    border:1px solid #43301f;
    border-radius:999px;
  }
  html[data-discover-surface] .disc-search-icon{
    width:17px; height:17px; flex:none;
    fill:none; stroke:#b9a289; stroke-width:1.9; stroke-linecap:round;
  }
  html[data-discover-surface] .disc-search-input{
    flex:1 1 auto; min-width:0;
    background:transparent; border:0; outline:none;
    color:#f3e9dc; font-size:.92rem; padding:.15rem 0;
  }
  html[data-discover-surface] .disc-search-input::placeholder{ color:#9b8871; }
  html[data-discover-surface] .disc-search-input::-webkit-search-cancel-button{ display:none; }
  html[data-discover-surface] .disc-search-clear{
    flex:none; background:transparent; border:0; color:#b9a289;
    font-size:1.15rem; line-height:1; padding:0 .15rem; cursor:pointer;
  }
  html[data-discover-surface] .disc-search-results{
    margin:-.35rem .8rem .75rem;
    background:#241708; border:1px solid #43301f; border-radius:12px;
    max-height:52vh; overflow-y:auto;
  }
  html[data-discover-surface] .disc-search-results a{
    display:block; padding:.6rem .8rem; color:#f3e9dc;
    text-decoration:none; font-size:.9rem;
    border-bottom:1px solid #33241733;
  }
  html[data-discover-surface] .disc-search-results a:last-child{ border-bottom:0; }
  html[data-discover-surface] .disc-search-results a:focus-visible{ outline:2px solid #e9c98a; outline-offset:-2px; }
}

/* ============================================================================
   T837 (2026-09-21) — the front door's page-level heading.
   The market-grid home (/, /v2/, /v2/market) rendered NO <h1> at all
   (verified live: document h1 = null), so the page most first-time visitors
   land on opened straight into the bottle grid with no page-level heading.
   One ordinary <h1>, worded with the site's OWN published name, set in the
   SAME type treatment the sibling /v2/catalog page already uses for its
   page-level heading (.search-title in catalog.css: --sans, 1.45rem,
   weight 700, --ink) so the two browse surfaces read alike. This is not a
   hero restyle — nothing about the grid, the search pill or the header
   changes, and the renderer omits the element entirely on /v2/buddy.
   ========================================================================== */
html[data-mobile-header-search-prototype] .home-title{
  font-family:var(--sans);
  font-size:1.45rem;
  font-weight:700;
  line-height:1.12;
  letter-spacing:0;
  color:var(--ink);
  margin:.9rem 0 .7rem;
}

@media (max-width:600px){
  /* Below 601px market.css makes main.wrap a column flex and gives #market
     order:-1 ("get bottles in front of the user fast"), so a default
     order:0 heading would paint BELOW the whole grid on a phone — the same
     defect class as #tonightsPick (2026-07-22). -4 leads
     #tonightsPick(-3)/.filters(-2)/#market(-1); DOM order is untouched. */
  html[data-mobile-header-search-prototype] .home-title{
    order:-4;
    margin:.15rem 0 .55rem;
  }
}
