/**
 * GENERATED FILE — do not edit directly. Synced from forwineries-theme-core.
 * Edit the source there and re-run tools/sync-core.sh.
 *
 * Commerce7 widget styling: the theme-rendered wine/club card components
 * (Commerce7\Catalog's render functions), the reservation-availability
 * widget wrapper (Commerce7\ReservationWidget), and the calendar-
 * dropdown mobile fix. The --c7-* CSS-variable brand bridge itself is
 * PHP-generated inline CSS (Commerce7\Integration::register()), not
 * here — this file is everything else.
 *
 * Written entirely against unprefixed var(--fw-*) tokens (see
 * docs/DESIGN-TOKEN-SCHEMA.md) and the .fw-* class vocabulary
 * (Config::css()) — every product theme needs zero per-theme changes.
 */

/* =========================================================
   WINE CARD + GRID
   Commerce7\Catalog::render_wines() / render_wines_catalog() /
   render_related_wines(). --fw-wine-* custom properties are set-once-
   on-the-grid, inherit-down — unset falls back to the neutral defaults
   below, so a Featured Wines teaser placed standalone via an Elementor
   widget can opt into a boxed-card look through its own Style tab
   without changing the default look here.
========================================================= */
.fw-wine-grid {
  display: grid;
  grid-template-columns: var(--fw-wine-grid-columns, repeat(auto-fit, minmax(440px, 1fr)));
  gap: var(--fw-wine-grid-gap, var(--fw-space-xl)) var(--fw-wine-grid-gap, var(--fw-space-lg));
}
.fw-wine-card {
  display: flex;
  align-items: flex-start;
  gap: var(--fw-space-md);
  background: var(--fw-wine-card-bg, transparent);
  border-radius: var(--fw-wine-card-radius, 0);
  padding: var(--fw-wine-card-padding, 0);
}
/* Only wines marked "Featured" (Setup tab) get this — everything else
   stays the plain, boxless layout above. A subtle left accent rather
   than a filled background box, so it stands out without looking like
   a different, heavier card style bolted on. */
.fw-wine-card--featured { border-left: 3px solid var(--fw-olive); padding-left: var(--fw-space-sm); }
.fw-wine-featured-tag {
  display: inline-block;
  color: var(--fw-clay);
  font-size: 0.7rem;
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  margin-bottom: 6px;
}
/* Wraps .fw-wine-img so the scarcity badge below has an absolute-
   position anchor without changing the image's own flex sizing. */
.fw-wine-card .fw-wine-img-wrap { position: relative; flex: 0 0 var(--fw-wine-img-size, 170px); width: var(--fw-wine-img-size, 170px); }
.fw-wine-card .fw-wine-img {
  display: block;
  margin: 0 auto;
  width: var(--fw-wine-img-size, 170px);
  height: auto;
  max-height: 380px;
  object-fit: contain;
}
/* Distinct from .fw-wine-featured-tag (subtle accent text, "worth
   noticing") — this is urgency, not curation, so it's an actual filled
   pill on the image itself where it can't be missed while scanning. */
.fw-wine-scarcity-badge {
  position: absolute;
  top: 8px;
  left: 8px;
  background: var(--fw-clay);
  color: var(--fw-cream);
  font-family: var(--fw-font-body);
  font-size: 0.68rem;
  font-weight: 500;
  letter-spacing: 0.04em;
  padding: 5px 10px;
  border-radius: var(--fw-radius);
  max-width: calc(100% - 16px);
}
/* On the product page there's no image wrap to anchor to (Commerce7
   owns the product image inside #c7-content) — shown inline above the
   mount instead of pinned to a corner. */
.fw-wine-scarcity-badge--standalone {
  position: static;
  display: inline-block;
  margin-bottom: var(--fw-space-md);
  max-width: none;
}
.fw-wine-card-body { flex: 1; min-width: 0; text-align: left; padding-top: 4px; }
.fw-wine-card h3 { margin-bottom: 2px; font-size: 1.5rem; line-height: 1.2; }
.fw-wine-card h3 a { color: inherit; text-decoration: none; }
.fw-wine-card h3 a:hover { text-decoration: underline; }
.fw-wine-card > a { display: block; }
.fw-wine-subtitle { color: var(--fw-charcoal-soft); font-size: 1rem; margin-bottom: var(--fw-space-sm); }
.fw-wine-teaser { color: var(--fw-charcoal); font-size: 0.98rem; line-height: 1.6; margin-bottom: var(--fw-space-sm); }
.fw-wine-meta {
  color: var(--fw-charcoal-soft);
  font-size: 0.78rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  margin-bottom: 4px;
}
@media (max-width: 560px) {
  .fw-wine-card { flex-direction: column; align-items: center; text-align: center; }
  .fw-wine-card .fw-wine-img { width: var(--fw-wine-img-size, 170px); flex: none; max-height: 300px; }
  .fw-wine-card-body { text-align: center; padding-top: 0; }
  /* The featured card's left accent bar only makes sense in the desktop
     horizontal layout — once the card stacks into a centered column,
     that one-sided left padding skews the stack off-center. A top bar
     stays balanced regardless of centering. */
  .fw-wine-card--featured {
    border-left: none;
    padding-left: 0;
    border-top: 3px solid var(--fw-olive);
    padding-top: var(--fw-space-sm);
  }
}

/* =========================================================
   RELATED WINES SLIDER
   Commerce7\Catalog::render_related_wines() — the "More From {Brand}"
   rail on a product page. 4 cards visible at a time on desktop, scroll-
   snapped so touch/trackpad swipe works with zero JS;
   core/assets/js/related-wines-slider.js only drives the optional
   prev/next arrow buttons. Reuses .fw-wine-card's image/title/subtitle/
   buy-button styling via the --slider modifier, same "one card
   component" rule as everywhere else.
========================================================= */
.fw-wine-slider { position: relative; display: flex; align-items: center; gap: var(--fw-space-sm); }
.fw-wine-slider-track {
  display: flex;
  /* Centers a short row (4 or fewer related wines, common on a small
     catalog) instead of it hugging the left edge — most visible on
     mobile where a single peeking card sat flush-left with empty space
     to its right. Plain `center` alone is NOT safe here: confirmed live
     via CDP that once there ARE enough wines to overflow the track,
     unsafe centering shifts the whole flex line so its MIDDLE aligns to
     the track's middle, which pushes item 1 to a negative x position
     (measured: -725px, i.e. off-screen and unreachable at the default
     scrollLeft:0) instead of leaving it at the scroll start where a
     slider needs it. `safe center` is exactly the fallback this needs:
     centers only when there's actual free space to center into (the
     short-row case), and drops back to start-aligned the instant
     content overflows (the normal, already-fine slider case). The
     plain `center` above it is a harmless fallback for the handful of
     browsers that don't understand the `safe` keyword yet — worse in
     the overflow case there, unchanged from before this fix existed. */
  justify-content: center;
  justify-content: safe center;
  gap: var(--fw-space-md);
  overflow-x: auto;
  /* Setting only overflow-x leaves overflow-y at its default per the
     CSS Overflow spec's own "propagation" rule for a non-visible pair:
     the other axis computes to auto too, not visible — so the track
     was quietly scrollable a few px vertically as well (visible as
     odd vertical rubber-banding while swiping through wines on
     mobile), even though nothing in it needs to scroll vertically at
     all. Explicit overflow-y: hidden is what actually restricts this
     to one axis. */
  overflow-y: hidden;
  scroll-snap-type: x mandatory;
  scroll-behavior: smooth;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  flex: 1;
  min-width: 0;
  /* Without this, mobile Safari/Chrome's initial-viewport-width
     calculation measures this track's full unclipped snap-content
     (every card side by side, easily 1800px+) instead of its own
     scrolled-and-clipped box — ballooning the WHOLE PAGE's layout
     viewport to fit it, so the page loads already "zoomed out" and
     everything (header/footer included) reads as off-canvas until the
     user manually zooms/scrolls. contain:layout scopes this element's
     box-size computation to itself so that leak can't happen. Confirmed
     via live iPhone-viewport emulation: without it, window.innerWidth
     reports 1720 on a 430px device; with it, 430. */
  contain: layout;
}
.fw-wine-slider-track::-webkit-scrollbar { display: none; }
.fw-wine-slider-item {
  flex: 0 0 calc(25% - var(--fw-space-md) * 3 / 4);
  scroll-snap-align: start;
}
.fw-related-wines-wrap { padding: var(--fw-space-lg) 0; }

.fw-wine-card--slider { flex-direction: column; align-items: center; text-align: center; height: 100%; }
.fw-wine-card--slider .fw-wine-img-wrap { width: 100%; flex: none; }
/* Caps bottle height so a related-wine tile stays compact — the base
   .fw-wine-img rule's own max-height (380px) is for a horizontal
   catalog card at a fixed 170px width; without this override a
   100%-width slider column blows the bottle up to its full
   unconstrained height instead. */
.fw-wine-card--slider .fw-wine-img { width: 100%; flex: none; max-height: 260px; object-fit: contain; }
/* Flex column so the buy-widget can be pinned to the bottom via
   margin-top:auto — without this, a card whose title wraps to one line
   sits shorter than a two-line title and its price/button row ends up
   at a different height than its neighbors in the same slider row. */
.fw-wine-card--slider .fw-wine-card-body { display: flex; flex-direction: column; text-align: center; padding-top: var(--fw-space-xs); flex: 1; }
.fw-wine-card--slider .fw-wine-card-body h3 { min-height: 2.4em; display: flex; align-items: center; justify-content: center; }
.fw-wine-card--slider .fw-wine-card-body .c7-buy-product { margin-top: auto; padding-top: var(--fw-space-sm); }

.fw-wine-slider-arrow {
  flex: none;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border: 1px solid var(--fw-clay);
  border-radius: 50%;
  background: var(--fw-cream);
  color: var(--fw-clay);
  cursor: pointer;
  transition: background 0.2s ease, color 0.2s ease;
}
.fw-wine-slider-arrow:hover:not(:disabled) { background: var(--fw-clay); color: var(--fw-cream); }
.fw-wine-slider-arrow:disabled { opacity: 0.3; cursor: default; }

@media (max-width: 900px) {
  .fw-wine-slider-item { flex-basis: calc(50% - var(--fw-space-md) / 2); }
}
@media (max-width: 560px) {
  /* Was flex-basis: 82%, to peek the next card at the edge as a cue
     there's more to scroll to. Confirmed live (screenshot + measured
     DOM geometry together, not just the CSS) that this is what was
     actually behind repeated "product isn't centered" reports: an
     82%-wide card that starts flush against the previous/next arrow
     necessarily sits left of the arrow-to-arrow midpoint, because
     there's nothing occupying the remaining 18% on its near side to
     balance the peek on its far side — a real asymmetry, not a
     rendering bug, and not fixable by centering the flex line (that
     part was already correct). Full width removes the asymmetry
     outright: one card fills the whole row, so there's no "beside it"
     for it to be off-center relative to. Trades away the peek cue;
     the arrows and scroll-snap still make "there's more" discoverable. */
  .fw-wine-slider-item { flex-basis: 100%; }
  .fw-wine-slider-arrow { width: 36px; height: 36px; }
}

/* =========================================================
   WINES CATALOG CONTROLS
   Commerce7\Catalog::render_wines_catalog() + wines-catalog.js.
   Two zones: type-filter pills on the left, search + varietal + sort
   grouped on the right — each group sizes to its own content (nowrap)
   rather than equal shares, so the row stays on one line down to the
   900px breakpoint below, where it stacks.
========================================================= */
.fw-catalog-controls {
  display: flex;
  flex-wrap: nowrap;
  align-items: center;
  gap: var(--fw-space-md);
  margin-bottom: var(--fw-space-lg);
  padding-bottom: var(--fw-space-md);
  /* var(--fw-charcoal-rgb) (DesignTokens' RGB companion to each theme's
     own text token), not a hardcoded rgba(43, 36, 32, ...) literal — that
     literal was tuned as a dark line against the 4 light themes' pale
     fields and went near-invisible on Vespera, where --fw-charcoal is
     light, not dark (see the --c7-field-border-color comment in
     Commerce7/Integration.php for the full story — same bug, same fix,
     repeated at each of this file's own literal borders). */
  border-bottom: 1px solid rgba(var(--fw-charcoal-rgb), 0.16);
}
.fw-catalog-filter { display: flex; flex-wrap: nowrap; gap: 8px; flex: 0 0 auto; }
.fw-catalog-controls-right { display: flex; flex-wrap: nowrap; align-items: center; gap: var(--fw-space-sm); flex: 0 0 auto; margin-left: auto; }
/* Search, dropdowns, and type buttons all share this same pill shape —
   one consistent control style across the row instead of rounded
   buttons next to rectangular boxes. */
.fw-catalog-pill,
.fw-catalog-select,
.fw-catalog-search {
  background: transparent;
  border: 1px solid rgba(var(--fw-charcoal-rgb), 0.32) !important;
  border-radius: 999px !important;
  padding: 8px 18px !important;
  font-family: var(--fw-font-body);
  font-size: 0.85rem;
  color: var(--fw-charcoal) !important;
}
.fw-catalog-pill { cursor: pointer; }
.fw-catalog-pill.is-active,
.fw-catalog-pill:hover,
.fw-catalog-pill:focus {
  background: var(--fw-clay) !important;
  border-color: var(--fw-clay) !important;
  color: var(--fw-cream) !important;
}
.fw-catalog-select { background: var(--fw-cream) !important; min-width: 160px; }
/* Icon-first, not text-first: at rest this is just the magnifying glass
   in a circle-ish pill (42px, no room for the placeholder to actually
   show) — it only expands into a real text field once focused or once
   it has a value. :not(:placeholder-shown) keeps it expanded after a
   value is typed and the field loses focus, instead of snapping back
   to icon-only and hiding what's currently filtering the grid. */
.fw-catalog-search-wrap {
  position: relative;
  flex: 0 0 auto;
}
.fw-catalog-search-icon {
  position: absolute;
  top: 50%;
  left: 15px;
  transform: translateY(-50%);
  color: var(--fw-charcoal-soft);
  pointer-events: none;
  z-index: 2;
}
.fw-catalog-search {
  background: var(--fw-cream) !important;
  /* !important: Hello Elementor-style resets (input[type="search"] {
     width: 100%; }) commonly have an attribute selector PLUS a type
     selector — specificity (0,1,1) — which edges out a bare class
     selector like this one (0,1,0). Without !important that rule wins
     at rest (collapsing to a fallback intrinsic width), and only the
     :focus state (specificity (0,2,0), which does win) snaps to the
     correct 200px — visible as the field "shrinking" on click instead
     of expanding from a stable 42px. */
  width: 42px !important;
  min-width: 0 !important;
  padding-left: 34px !important;
  transition: width 0.2s ease;
}
.fw-catalog-search:focus,
.fw-catalog-search:not(:placeholder-shown) {
  width: 200px !important;
}
.fw-catalog-search::placeholder { color: var(--fw-charcoal-soft); }
.fw-catalog-search::-webkit-search-cancel-button { -webkit-appearance: none; }
.fw-catalog-empty {
  text-align: center;
  color: var(--fw-charcoal-soft);
  padding: var(--fw-space-lg) 0;
}
.fw-catalog [hidden] { display: none; }

@media (max-width: 900px) {
  /* auto-fit + a fixed 440px minimum overflows any container narrower
     than that instead of shrinking (a well-known CSS Grid trap) — force
     a single column once there's no room for two anyway. */
  .fw-wine-grid { grid-template-columns: 1fr; gap: var(--fw-space-lg); }

  .fw-catalog-controls { flex-wrap: wrap; justify-content: center; margin-bottom: var(--fw-space-md); padding-bottom: var(--fw-space-sm); }
  .fw-catalog-filter,
  .fw-catalog-controls-right { flex: 1 1 100%; justify-content: center; }
}
@media (max-width: 640px) {
  .fw-catalog-select,
  .fw-catalog-search { width: 100%; min-width: 0; }
  .fw-catalog-search-wrap { width: 100%; }
  .fw-catalog-controls-right { flex-direction: column; align-items: stretch; }
}

/* =========================================================
   CLUB TEASER + TIER GRID
   Commerce7\Catalog::render_club_teaser() (--fw-club-* custom
   properties: same set-once-inherit-down pattern as --fw-wine-* above)
   and the /club page's editable tier-comparison grid
   (core/templates/page-c7-content.php).
========================================================= */
.fw-club-grid {
  display: grid;
  grid-template-columns: var(--fw-club-grid-columns, repeat(auto-fit, minmax(280px, 1fr)));
  gap: var(--fw-club-grid-gap, var(--fw-space-md));
}
.fw-club-card {
  background: var(--fw-club-card-bg, var(--fw-clay-dark));
  color: var(--fw-club-card-color, var(--fw-cream));
  padding: var(--fw-space-lg) var(--fw-space-md);
  border-radius: var(--fw-club-card-radius, var(--fw-radius));
  text-align: center;
}
.fw-club-card h3 { color: var(--fw-cream); }
.fw-club-card .fw-eyebrow { color: var(--fw-olive); }

.fw-club-tier-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: var(--fw-space-md);
  align-items: start;
}
.fw-club-tier-card {
  background: var(--fw-cream);
  border: 1px solid rgba(var(--fw-charcoal-rgb), 0.14);
  border-top: 2px solid var(--fw-olive);
  padding: var(--fw-space-lg) var(--fw-space-md);
  text-align: center;
}
.fw-club-tier-price {
  color: var(--fw-clay);
  font-family: var(--fw-font-heading);
  font-style: italic;
  font-size: 1.6rem;
  margin-bottom: var(--fw-space-xs);
}
.fw-club-tier-card .c7-club-join-button { margin-top: var(--fw-space-sm); }

/* =========================================================
   CONFIG NOTICE, CART FALLBACK, PAGE CHROME
========================================================= */
.fw-c7-notice {
  border: 1px dashed var(--fw-olive);
  background: var(--fw-cream);
  color: var(--fw-charcoal-soft);
  padding: var(--fw-space-md);
  text-align: center;
  font-size: 0.9rem;
  border-radius: var(--fw-radius);
}

/* Commerce7\Integration::render_cart_trigger()'s fallback, shown only
   until a Tenant ID is configured. */
.fw-cart-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-family: var(--fw-font-body);
  font-size: 0.78rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  border: 1px solid var(--fw-charcoal);
  background: none;
  color: var(--fw-charcoal);
  padding: 9px 18px;
  border-radius: var(--fw-radius);
  cursor: pointer;
}
.fw-cart-link:hover { border-color: var(--fw-clay); color: var(--fw-clay); }
.fw-cart-link--disabled { opacity: 0.5; cursor: not-allowed; }

/* The side-cart drawer is rendered inside the header's #c7-cart mount,
   so it inherits the header nav's type (uppercase, letter-spacing,
   small size, light text) and the theme's global button box lands on
   its "Remove" link. Reset it to body text; !important because
   Commerce7 injects its own stylesheet after this file. */
.c7-side-cart.c7-side-cart {
  font-family: var(--fw-font-body);
  font-size: 1rem;
  font-weight: 400;
  letter-spacing: normal;
  text-transform: none;
  text-align: left;
  color: var(--fw-charcoal) !important;
}
.c7-side-cart .c7-h2 {
  font-family: var(--fw-font-heading);
  font-size: 1.5rem;
  font-weight: 400;
  letter-spacing: normal;
  text-transform: none;
  color: var(--fw-charcoal) !important;
}
.c7-side-cart .c7-order-item__title a {
  font-family: var(--fw-font-heading);
  font-size: 1.15rem;
  line-height: 1.25;
  color: var(--fw-charcoal) !important;
  text-decoration: none;
}
.c7-side-cart .c7-order-item__title a:hover { color: var(--fw-clay) !important; text-decoration: underline; }
.c7-side-cart .c7-order-item__description { color: var(--fw-charcoal-soft); font-size: 0.9rem; }
.c7-side-cart button.c7-link {
  display: inline;
  min-height: 0 !important;
  padding: 0 !important;
  border: 0 !important;
  border-radius: 0 !important;
  background: transparent !important;
  font-family: var(--fw-font-body);
  font-size: 0.85rem;
  color: var(--fw-charcoal-soft) !important;
  text-decoration: underline;
  text-underline-offset: 3px;
  cursor: pointer;
}
.c7-side-cart button.c7-link:hover { color: var(--fw-clay) !important; }
.c7-side-cart .c7-order-item__price,
.c7-side-cart .c7-order-item__price span,
.c7-side-cart .c7-order-item__total,
.c7-side-cart .c7-order-summary__title,
.c7-side-cart .c7-order-summary__value,
.c7-side-cart .c7-order-summary__value span,
.c7-side-cart .c7-price--discounted { color: var(--fw-charcoal) !important; }
.c7-side-cart .c7-order-item__price .c7-price--original { color: var(--fw-charcoal-soft) !important; margin-right: 6px; }
.c7-side-cart .c7-order-summary__item--total .c7-order-summary__title,
.c7-side-cart .c7-order-summary__item--total .c7-order-summary__value { font-weight: 600; }
.c7-side-cart select,
.c7-side-cart input {
  font-family: var(--fw-font-body);
  font-size: 1rem;
  letter-spacing: normal;
  text-transform: none;
  color: var(--fw-charcoal) !important;
  -webkit-text-fill-color: var(--fw-charcoal) !important;
  background-color: var(--fw-cream) !important;
}
#c7-side-cart__header__close {
  border: 0 !important;
  background: transparent !important;
  padding: 6px !important;
  min-height: 0 !important;
  color: var(--fw-charcoal) !important;
  cursor: pointer;
}
#c7-side-cart__header__close svg { stroke: currentColor; }
.c7-side-cart .c7-order-summary__buttons .c7-btn {
  font-family: var(--fw-font-body);
  font-size: 0.85rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

/* core/templates/page-c7-content.php's shared section wrapper — tighter
   than a marketing page's default hero-sized top padding, since a
   Commerce7 route (product/cart especially) should read as "get to the
   content fast". Compounding both classes (.fw-section.fw-c7-page, not
   just .fw-c7-page) deliberately raises specificity above a bare
   .fw-section rule regardless of source order. */
.fw-section.fw-c7-page { min-height: 50vh; padding: var(--fw-space-md) 0; }
.fw-hero + .fw-section.fw-c7-page { padding-top: var(--fw-space-md); }
/* Product route only ("Back to Wines" + the PDP itself) — no gap above
   the back-link at all. */
.fw-section.fw-c7-page.fw-c7-page--product { padding-top: var(--fw-space-sm); }

.fw-back-link { margin-bottom: var(--fw-space-md); }
.fw-back-link a { color: var(--fw-charcoal-soft); text-decoration: none; font-size: 0.9rem; }
.fw-back-link a:hover { color: var(--fw-clay); text-decoration: underline; }

/* core/templates/page-c7-checkout.php intentionally has no header/
   footer — just center the Commerce7 content column and keep it
   comfortable on small screens. */
body.fw-c7-checkout-body { background: var(--fw-cream); }
.fw-checkout-wrap {
  max-width: 760px;
  margin: 0 auto;
  padding: var(--fw-space-lg) var(--fw-space-md);
}
@media (max-width: 600px) {
  /* Was var(--fw-space-sm) alone (16px) — the same side gutter
     .fw-container uses sitewide at this width, but reported as still
     too tight specifically here: checkout's own content (a 4-step
     row, an order-summary line with a price flush to the far edge,
     dense form labels) reads denser than a normal marketing section at
     the same 16px, so it felt more cramped even though the value
     matched the rest of the site. Composed from two tokens rather than
     jumping straight to --fw-space-md (32px, double), which read as
     too much once tried against the same content. */
  .fw-checkout-wrap { padding: var(--fw-space-md) calc(var(--fw-space-sm) + var(--fw-space-xs)); }
}
@media (max-width: 380px) {
  /* Extra-narrow phones — Commerce7's own checkout layout still needs
     more of the available width than wider phones do, so this stays
     tighter than the tier above rather than matching it. Restored to
     the sitewide --fw-space-sm baseline (16px) instead of the flat
     10px it used before: 10px was tighter than anywhere else on the
     site, which is what made checkout specifically feel cramped on
     these widths too. */
  .fw-checkout-wrap { padding: var(--fw-space-md) var(--fw-space-sm); }
}

/* .fw-checkout-wrap above turned out to be powerless on the ACTUAL
   Commerce7 checkout app, discovered only by inspecting it live with a
   real cart + a real automated click through cart -> checkout (a plain
   page load of the URL redirects to an empty cart and never mounts the
   real thing, which is why this took this long to find): Commerce7's
   own checkout JS sets `#c7-content` to an INLINE style of
   `position: fixed; top: 0; left: 0; width: 100%; height: 100%;
   padding: 0px;` the moment it mounts. A fixed, 100%-viewport element
   ignores every ancestor's padding by definition, so .fw-checkout-wrap
   padding rendered correctly on .fw-checkout-wrap itself and had
   ZERO visual effect on anything inside #c7-content once Commerce7's
   JS took over, no matter what value it was set to. The padding has
   to land on Commerce7's OWN internal classes instead, since those are
   the only elements actually still in normal flow inside the fixed
   viewport-filling shell. Confirmed via commerce7.css: .c7-checkout__header,
   .c7-checkout__header--mobile, .c7-checkout__content, and
   .c7-checkout__footer only get `max-width: 600px; margin: 0 auto;`
   (which does nothing below 600px, since the element is already
   narrower than that) — .c7-checkout__content additionally gets a
   built-in `padding: 0 20px 140px`, but header/header--mobile/footer
   get NO side padding from Commerce7 at all, which is exactly the
   step row, logo, and Prop 65 warning text sitting flush against the
   screen edge in every report. .fw-checkout-wrap is left in place
   above (harmless, and covers the brief pre-mount instant before
   Commerce7's JS applies its own inline style). */
.c7-checkout__header,
.c7-checkout__header--mobile,
.c7-checkout__content,
.c7-checkout__footer {
  padding-left: var(--fw-space-md);
  padding-right: var(--fw-space-md);
}
@media (max-width: 600px) {
  .c7-checkout__header,
  .c7-checkout__header--mobile,
  .c7-checkout__content,
  .c7-checkout__footer {
    padding-left: calc(var(--fw-space-sm) + var(--fw-space-xs));
    padding-right: calc(var(--fw-space-sm) + var(--fw-space-xs));
  }
}
@media (max-width: 380px) {
  .c7-checkout__header,
  .c7-checkout__header--mobile,
  .c7-checkout__content,
  .c7-checkout__footer {
    padding-left: var(--fw-space-sm);
    padding-right: var(--fw-space-sm);
  }
}

/* =========================================================
   RESERVATION WIDGET EMBED
   Wraps the optional live c7-reservation-availability widget
   (Commerce7\ReservationWidget) when embedded inline in a homepage CTA
   band or on the dedicated /reservation page.
========================================================= */
.fw-reservation-widget-embed {
  --c7-field-border-radius: 10px;
  --c7-button-border-radius: 10px;
  background: var(--fw-cream);
  /* A hero band typically sets color:var(--fw-cream) (light) on itself
     so its heading/paragraph read against a dark photo — this card's
     own background is that SAME light cream, and without its own color
     reset it would inherit that light text color too, rendering
     Commerce7's date/dropdown labels as cream-on-cream (invisible). */
  color: var(--fw-charcoal);
  border-radius: 18px;
  padding: var(--fw-space-sm);
  margin: var(--fw-space-sm) 0;
  width: 100%;
  max-width: 700px;
  box-sizing: border-box;
}
.fw-reservation-widget-embed .c7-required::after { display: none; }
/* Commerce7's own .c7-reservation__search carries a fixed max-width:
   905px from their own CSS — wider than either this card's 700px CTA-
   band cap or the --page variant's cap below. Without this override
   the form doesn't shrink to fit, it overflows past the card's right
   edge (the wrapper never clips it), which reads as the card having
   padding on the left but none on the right. */
.fw-reservation-widget-embed .c7-reservation__search {
  max-width: 100% !important;
  box-sizing: border-box !important;
}
/* Used on the dedicated /reservation page instead of the CTA-band
   variant above — there the widget is the whole page's content, not a
   shortcut in a narrow band. --fw-cream is invisible there (it's the
   exact page-background color on that route), so this switches to
   --fw-cream-raised plus a real border and shadow to actually read as
   a card, centered near Commerce7's own .c7-reservation__search
   max-width (905px) instead of stretching edge-to-edge. */
.fw-reservation-widget-embed--page {
  max-width: 760px;
  margin-left: auto;
  margin-right: auto;
  background: var(--fw-cream-raised);
  border: 1px solid rgba(var(--fw-charcoal-rgb), 0.12);
  box-shadow: 0 8px 24px rgba(var(--fw-charcoal-rgb), 0.16);
  padding: var(--fw-space-md);
}

/**
 * Commerce7 styles the reservation widget's own Date/Time/No of Guests
 * fields from --c7-field-bg (correctly --fw-cream on every theme) but
 * never sets `color` on the <input>/<select> itself — same gap already
 * found and fixed for the product add-to-cart quantity field (see that
 * theme's own style.css: "Chrome's UA stylesheet then paints fieldtext —
 * black — so the number vanishes"). Invisible there on the 4 light
 * themes (black-on-pale-field still reads fine by accident) but on
 * Vespera's dark field background it's black-on-near-black: the Date
 * placeholder and Guests count render, they're just unreadable. Fixed
 * once here, in shared core, rather than re-discovering it per theme —
 * every theme's own add-to-cart-field fix stays theme-local since only
 * Vespera also needs `color-scheme: dark` alongside it for the native
 * calendar icon / dropdown chrome to redraw light-on-dark to match.
 */
.fw-reservation-widget-embed input,
.fw-reservation-widget-embed select {
  color: var(--fw-charcoal) !important;
  -webkit-text-fill-color: var(--fw-charcoal) !important;
  background-color: var(--fw-cream) !important;
}
.fw-reservation-widget-embed ::placeholder {
  color: var(--fw-charcoal-soft) !important;
  opacity: 1;
}

/* The live reservation-availability widget mounted inline in a homepage
   CTA band needs its calendar dropdown (a full month grid, ~460px) to
   extend below the band's own shorter height to be visible at all — a
   clipped dropdown renders a correct internal grid but with everything
   past the first row invisible. */
.fw-hero.fw-hero--band { overflow: visible; }

/**
 * The date-picker dropdown's own day numbers, "today" ring, and nav
 * arrows are Commerce7's factory colors (e.g. a plain blue,
 * rgb(50,81,174) for a day number) — calibrated against commerce7.css's
 * own white factory background, and not exposed through any of the
 * --c7-* brand variables above, so none of it can be retinted from
 * there. Its own background here is transparent by default, so it just
 * inherits whatever's behind it — the reservation embed's --fw-cream
 * card. White-adjacent on 4 of the 5 themes, so Commerce7's blue day
 * numbers read fine by accident; near-black on Vespera's dark palette,
 * where the same blue on the same near-black is nearly invisible
 * (confirmed live: rgb(50,81,174) text, transparent background, over a
 * #131016 card). Overriding every individual state this calendar
 * defines internally (default/today/selected/disabled/hover — none
 * documented) isn't really available to us; forcing the popover itself
 * back to the plain white background Commerce7 actually designed it
 * against fixes all of those states at once, on every theme, and is
 * also just normal date-picker UX — nothing else on the page themes a
 * floating calendar to match a dark background either.
 *
 * !important: confirmed live (Vespera) that a plain, non-!important
 * version of this rule has no effect at all — Commerce7 mounts this
 * dropdown client-side and appears to inject its own stylesheet into
 * <head> at that point, landing after this file's <link> in source
 * order regardless of our own enqueue dependency on the "commerce7"
 * handle (which only orders the two initial <link> tags in the
 * server-rendered HTML, not whatever Commerce7's JS adds later). Same
 * root cause as the *inline* style attribute problem the mobile fix
 * below already works around with !important — different mechanism,
 * same fix.
 *
 * Two layers, not one: react-day-picker renders its own wrapper
 * (.rdp-root) as the dropdown's only direct child, and THAT element —
 * not .c7-date-picker-dropdown itself — is what actually paints the
 * visible fill; confirmed live it carries its own opaque background
 * (rgb(19,16,22) on Vespera, i.e. --fw-cream again, most likely via the
 * --c7-bg/--c7-block-bg bridge above) that fully covers the outer
 * element regardless of what background that outer element resolves
 * to. Whiting out only .c7-date-picker-dropdown left this inner layer
 * dark and the day numbers just as unreadable as before. Both need the
 * override; kept as one shared declaration rather than duplicating the
 * value, since they're always meant to match.
 */
.c7-date-picker-dropdown,
.c7-date-picker-dropdown .rdp-root {
  background: #fff !important;
}
.c7-date-picker-dropdown {
  border-radius: var(--fw-radius) !important;
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.25) !important;
}

/**
 * THE CALENDAR-DROPDOWN MOBILE FIX. This is the bug this entire shared-
 * core rebuild started from — already applied by hand to 4 of the 5
 * original themes and still missing from Larkhaven when this session
 * began. Three connected problems, found and fixed in this order (see
 * docs/LESSONS.md for the full story); shipping them disconnected again
 * would just re-earn the time they cost to find the first time:
 *
 * 1. Commerce7's date-picker dropdown (opened from the Date field) is a
 *    fixed ~606px box, positioned via an inline `transform` their own
 *    JS computes from the trigger field's desktop-sized containing
 *    block. Under ~900px, form fields stack to full width and the
 *    field's own box shrinks well under 606px, so the fixed-width
 *    calendar spills off both the card and the viewport — the inline
 *    transform math doesn't recompute for the new width, so it doesn't
 *    just clip, it visibly mispositions too. !important is required
 *    specifically to beat Commerce7's *inline* style attribute.
 *    Re-anchoring to the field's real box (rather than fighting their
 *    transform arithmetic) makes it track whatever width mobile
 *    actually has.
 *
 * 2. Re-anchoring the dropdown alone isn't enough — the day grid inside
 *    is a real <table> (react-day-picker's .rdp-month_grid) that sizes
 *    to content by default, so it kept overflowing past the now-
 *    correctly-sized dropdown regardless. table-layout:fixed + width:
 *    100% makes its columns share the available width equally instead.
 *
 * 3. Even with the table fixed, Commerce7's own <td> cells carry a
 *    hardcoded padding:15px, sized for the original ~86px-wide desktop
 *    cell (56px of content left over). At a ~43px mobile cell that
 *    padding alone eats 30 of the 43px, so the day button inside — even
 *    set to width:100% — has almost no room. The cell's own padding has
 *    to be trimmed too, not just the button sized.
 */
@media (max-width: 900px) {
  .c7-date-picker-dropdown {
    position: absolute !important;
    inset: auto auto auto 0 !important;
    top: 100% !important;
    left: 0 !important;
    right: 0 !important;
    transform: none !important;
    width: auto !important;
    max-width: 100% !important;
  }
  .c7-date-picker-dropdown .rdp-month_grid {
    table-layout: fixed !important;
    width: 100% !important;
  }
  .c7-date-picker-dropdown .rdp-day_button {
    width: 100% !important;
    padding: 8px 2px !important;
    box-sizing: border-box !important;
  }
  .c7-date-picker-dropdown .rdp-day,
  .c7-date-picker-dropdown .rdp-weekday {
    padding: 2px !important;
  }
}

/**
 * PRODUCT PAGE "KEY FEATURES" BAND — two separate mobile bugs in
 * Commerce7's own PDP CSS (both confirmed live on Larkhaven's
 * 2015 Reserve Pinot Noir, a product with no additional images —
 * reported as "too much space instead of images" and "Farming Practice
 * going off canvas," though neither bug is actually about the product's
 * photos; a product WITH more images has the exact same underlying CSS
 * and would show it too, just less obviously on a taller page):
 *
 * 1. .pdp-key-features carries `margin-top: -150px` and
 *    `padding: calc(var(--pdp-space-xl) + 80px) 0 var(--pdp-space-xl)`
 *    — reasonable proportions on a wide desktop layout (confirmed via
 *    screenshot: a normal, well-spaced band there), but that's ~300px
 *    of fixed vertical spacing with no mobile override at all, which
 *    reads as a large dead cream-colored gap above the feature icons
 *    on a ~700-900px-tall phone screen.
 *
 * 2. .pdp-features (the flex row of up to 4 feature columns) never
 *    sets flex-wrap, so it defaults to nowrap — and Commerce7's OWN
 *    responsive rules for the child .pdp-feature elements
 *    (flex-basis: 45% under 900px, 100% under 600px, clearly written
 *    to make them wrap into 2 columns then 1) never fire, because
 *    flex-basis percentages don't force a new line without
 *    flex-wrap: wrap on the parent. The 4 columns stay on one row,
 *    each keeping its natural content width, and the row overflows the
 *    viewport — confirmed live: 521px of combined column width in a
 *    294px-wide container, with the last column ("Farming Practice" on
 *    this product) pushed off-canvas. Adding the one missing
 *    declaration is enough to make Commerce7's own existing breakpoint
 *    rules finally take effect as originally authored — not
 *    reimplementing their responsive design, just turning it on.
 */
@media screen and (max-width: 900px) {
  .pdp-key-features {
    margin-top: 0 !important;
    padding: var(--fw-space-lg) 0 !important;
  }
  .pdp-features {
    flex-wrap: wrap !important;
  }
}

/* Allocated products swap the add-to-cart form for this block, but
   Commerce7's PDP CSS centers only the form: the message and Login
   button sat flush left under a centered title. Same box as the form. */
.c7-product-detail .c7-product__login-message {
  max-width: 420px;
  margin: 0 auto;
  padding-bottom: var(--pdp-space-sm);
  border-bottom: 1px solid var(--pdp-border);
  text-align: center;
}
.c7-product-detail .c7-product__login-message p { margin: 0 0 var(--pdp-space-sm); }

/**
 * PRODUCT PAGE "ADDITIONAL IMAGES" GALLERY — the actual source of the
 * dead space reported for products with no gallery photos beyond the
 * main bottle shot (2015 Reserve Pinot Noir on Larkhaven; confirmed the
 * same on 6 of 7 other Larkhaven wines sampled — this is the common
 * case, not an edge case). Commerce7 always renders three fixed-size
 * slots after the product info block:
 *
 *   <div class="pdp-wine-images">
 *     <div class="pdp-image-narrow">...</div>
 *     <div class="pdp-image-wide">...</div>
 *     <div class="pdp-image-narrow">...</div>
 *   </div>
 *
 * A slot with a real photo gets a nested <picture>/<img>; one with no
 * photo configured is left as a genuinely empty, childless <div></div>.
 * :empty is exactly the right tool here — it matches a childless slot
 * precisely and never a real one (a populated slot's <picture> is a
 * real child element, so :empty correctly never matches it), without
 * needing to know anything about this product's data.
 */
.pdp-image-narrow:empty,
.pdp-image-wide:empty {
  display: none !important;
}

/**
 * A second, separate bug in the same gallery, this one a real content
 * loss rather than dead space: Commerce7's own CSS carries
 *
 *   @media screen and (max-width: 600px) {
 *     .pdp-image-narrow:last-of-type { display: none; }
 *   }
 *
 * — unconditional, regardless of whether that third slot actually has
 * a photo. Confirmed live on 2015 Chardonnay (the one product in the
 * original sample with real gallery photos, all three slots populated
 * with three distinct images): on any phone ≤600px wide, the third
 * photo is simply discarded — 3 images shown (hero + 2) instead of 4,
 * every time, on every product that has one, regardless of the actual
 * :empty fix above. This isn't a mobile simplification worth keeping;
 * it silently drops real content a winery specifically uploaded. Undo
 * it, but only when that slot actually has a photo — an empty one
 * should obviously stay hidden, which is exactly what :not(:empty)
 * guarantees, and why this can't just delete Commerce7's rule outright
 * (we don't control their stylesheet to remove a rule, only add one
 * that wins — see the .c7-date-picker-dropdown fix above for the same
 * "compete with an injected stylesheet" situation and why !important
 * is needed again here).
 */
@media screen and (max-width: 600px) {
  .pdp-image-narrow:last-of-type:not(:empty) {
    display: block !important;
  }
}
