/* LIVA CARE styles */

:root {
  --deep-blue: #1E6A8B;
  --deep-blue-dark: #164F68;
  --sage: #4FB08A;
  --sage-dark: #3A9373;
  --mint: #A7D5C1;
  --sky: #D6EAF5;
  --ink: #12303D;
  --muted: #5B7380;
  --bg: #F6FAFB;
  --white: #FFFFFF;
  --line: #DCE8ED;
  --font-display: "Cormorant Garamond", Georgia, serif;
  --font-body: "Jost", system-ui, sans-serif;
  --radius: 14px;

  /* Spacing scale, for new/updated rules going forward */
  --space-1: 4px;
  --space-2: 8px;
  --space-3: 12px;
  --space-4: 16px;
  --space-5: 24px;
  --space-6: 32px;
  --space-7: 48px;
  --space-8: 72px;

  /* Sage alone is too light for white text at small sizes (fails WCAG contrast);
     use sage-deep wherever sage is a solid fill behind white/light text. */
  --sage-deep: #2E7A5E;
  --sage-deep-dark: #256650;

  /* Warm amber for the low-stock badge (checked at 5.6:1 against white text,
     same bar as sage-deep above). Not used elsewhere in the palette. */
  --amber-deep: #94591A;


  /* Gold for filled review stars -- decorative only (star_rating_html()
     always carries the real number in its aria-label), so this never
     needs to clear a text-contrast bar on its own. */
  --star-gold: #D9A62B;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 17px;
  line-height: 1.6;
}

h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-display);
  color: var(--deep-blue);
  line-height: 1.1;
  margin: 0 0 12px;
  font-weight: 600;
}
h1 { font-size: clamp(2.6rem, 6vw, 4.5rem); }
h2 { font-size: clamp(2rem, 4vw, 3rem); }
h3 { font-size: clamp(1.45rem, 2.4vw, 1.6rem); }
h4 { font-size: clamp(1.15rem, 1.6vw, 1.3rem); }
h5 { font-size: 1.05rem; }
h6 { font-size: 0.95rem; }
p { margin: 0 0 16px; }
a { color: var(--deep-blue); }
img { max-width: 100%; height: auto; }

.skip-link {
  position: absolute;
  left: 12px;
  top: -48px;
  background: var(--deep-blue);
  color: var(--white);
  padding: 10px 18px;
  border-radius: 8px;
  font-weight: 500;
  text-decoration: none;
  transition: top .15s;
  z-index: 100;
}
.skip-link:focus { top: 12px; }

:focus-visible {
  outline: 2px solid var(--sage);
  outline-offset: 2px;
}

.container { width: 100%; max-width: 1180px; margin-inline: auto; padding-inline: 20px; }
.section { padding-block: 72px; }
.eyebrow { font-family: var(--font-display); font-style: italic; font-size: 1.05rem; letter-spacing: 0; text-transform: none; color: var(--sage-deep-dark); font-weight: 600; margin-bottom: 8px; }

.breadcrumb { font-size: 0.85rem; color: var(--muted); margin-bottom: 10px; }
.breadcrumb a { color: var(--muted); text-decoration: none; }
.breadcrumb a:hover { color: var(--sage-dark); text-decoration: underline; }

.hero-kicker { display: inline-flex; align-items: center; gap: 8px; font-family: var(--font-display); font-style: italic; font-weight: 600; font-size: 1.1rem; color: var(--sage-deep-dark); margin-bottom: 10px; }
.leaf-icon { width: 20px; height: 20px; flex-shrink: 0; fill: none; stroke: var(--sage-dark); stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }

.icon-inline { width: 16px; height: 16px; margin-right: 4px; vertical-align: -3px; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; display: inline-block; }

/* Buttons */
.btn { display: inline-block; font-family: var(--font-body); font-weight: 500; font-size: 1rem; text-decoration: none; padding: 14px 30px; border-radius: 999px; border: 1.5px solid transparent; cursor: pointer; transition: background .2s, color .2s, border-color .2s, transform .12s ease; }
.btn-primary { background: var(--deep-blue); color: var(--white); }
.btn-primary:hover { background: var(--deep-blue-dark); }
.btn-green { background: var(--sage-deep); color: var(--white); }
.btn-green:hover { background: var(--sage-deep-dark); }
.btn-outline { background: transparent; color: var(--deep-blue); border-color: var(--deep-blue); }
.btn-outline:hover { background: var(--deep-blue); color: var(--white); }

/* Soft instant press feedback (transform only, GPU-composited) */
.btn:active { transform: scale(.97); }

/* "Added to cart" confirmation: one soft, non-bouncy pulse */
.btn.is-confirmed { animation: confirm-pulse .4s cubic-bezier(0.4, 0, 0.2, 1); }
@keyframes confirm-pulse { 0% { transform: scale(1); } 45% { transform: scale(1.05); } 100% { transform: scale(1); } }

/* Cards */
.card { background: var(--white); border: 1px solid var(--line); border-radius: var(--radius); padding: 24px; }

/* Wishlist heart (product cards, product page, wishlist page) */
.product-media { position: relative; }
.wishlist-form { margin: 0; }
.product-media .wishlist-form { position: absolute; top: 10px; right: 10px; }
/* Perfectly round icon button: solid white, soft shadow, no border --
   nothing here can render as a line/underline (confirmed in a real
   browser: the previous "line" was the heart SVG's own path data, not
   CSS -- its start and end points nearly met at the bottom vertex, and
   stroke-linejoin:round drew a visible seam there. Fixed by swapping to
   a cleaner heart path in _wishlist_button.php/header.php; nothing below
   needed to change for that part). */
.wishlist-toggle { display: inline-flex; align-items: center; justify-content: center; width: 40px; height: 40px; border-radius: 999px; border: 0; background: var(--white); box-shadow: 0 1px 4px rgba(18, 48, 61, .15); color: var(--deep-blue); text-decoration: none; cursor: pointer; transition: background .15s ease, color .15s ease, transform .12s ease; }
.wishlist-toggle svg { display: block; width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.wishlist-toggle:hover { background: var(--mint); color: var(--sage-dark); }
.wishlist-toggle:active { transform: scale(.92); }
/* Saved state: #4FB08A (--sage) fill with a darker green (--sage-dark)
   outline for contrast against the fill -- no pink/red anywhere in the
   heart. Persists after reload because .is-active is rendered server-side
   from the real wishlist state (_wishlist_button.php), not just toggled
   by JS. */
.wishlist-toggle.is-active { color: var(--sage-dark); }
.wishlist-toggle.is-active svg { fill: var(--sage); }
.wishlist-toggle.is-active:hover { background: var(--mint); color: var(--sage-deep-dark); }
.wishlist-toggle.is-active:hover svg { fill: var(--sage-deep-dark); }
.wishlist-toggle.is-popping { animation: heart-pop .34s cubic-bezier(0.34, 1.2, 0.64, 1); }
@keyframes heart-pop { 0% { transform: scale(1); } 40% { transform: scale(1.22); } 100% { transform: scale(1); } }
.wishlist-remove-link { margin-top: 10px; }

/* Header cart/wishlist count bump (shared .icon-count on both) */
.icon-count.is-bump { animation: count-bump .3s cubic-bezier(0.4, 0, 0.2, 1); }
@keyframes count-bump { 0% { transform: scale(1); } 50% { transform: scale(1.3); } 100% { transform: scale(1); } }

/* Announcement bar (optional, controlled from Admin > Settings) */
.announcement-bar { background: var(--deep-blue-dark); color: var(--white); text-align: center; font-size: 0.85rem; padding-block: 8px; animation: announce-in .5s cubic-bezier(0.16, 1, 0.3, 1); }
@keyframes announce-in { from { opacity: 0; transform: translateY(-6px); } to { opacity: 1; transform: translateY(0); } }

/* Header */
.site-header { background: var(--white); border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 50; }
.header-top {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 560px) minmax(0, 1fr);
  align-items: center;
  gap: 20px;
  padding-block: 10px;
}
.logo { justify-self: start; }
.logo img { display: block; height: 72px; width: auto; }

.header-icons { display: flex; align-items: center; gap: 8px; justify-self: end; }
.admin-link { color: var(--ink); text-decoration: none; font-weight: 500; white-space: nowrap; }
.admin-link:hover { color: var(--sage-dark); }

.icon-link { position: relative; display: inline-flex; align-items: center; justify-content: center; width: 40px; height: 40px; border-radius: 999px; color: var(--deep-blue); text-decoration: none; }
.icon-link:hover { color: var(--sage-dark); background: var(--bg); }
.icon-link svg { width: 23px; height: 23px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.icon-count { position: absolute; top: 1px; right: 2px; min-width: 16px; height: 16px; padding: 0 3px; border-radius: 999px; background: var(--sage-deep); color: var(--white); font-size: 0.65rem; line-height: 16px; text-align: center; font-weight: 600; }

/* Search box in the header: a wide bar centered in the middle column */
.search-form { display: flex; align-items: center; gap: 0; justify-self: center; width: 100%; }
.search-form input { flex: 1; min-width: 0; padding: 12px 16px; font: inherit; font-size: 0.95rem; border: 1px solid var(--line); border-radius: 999px 0 0 999px; background: var(--bg); color: var(--ink); }
.search-form input:focus { outline: 2px solid var(--sage); border-color: var(--sage); }
.search-form button { border: 1px solid var(--deep-blue); background: var(--deep-blue); color: var(--white); padding: 10px 18px; border-radius: 0 999px 999px 0; font: inherit; font-size: 0.9rem; cursor: pointer; }
.search-form button:hover { background: var(--deep-blue-dark); }

/* Mobile hamburger */
.nav-toggle { display: none; align-items: center; gap: 8px; background: none; border: 1px solid var(--line); border-radius: 999px; padding: 8px 14px; font: inherit; font-size: 0.9rem; color: var(--ink); cursor: pointer; }
.nav-toggle-bars { display: block; width: 18px; height: 2px; background: var(--ink); position: relative; }
.nav-toggle-bars::before, .nav-toggle-bars::after { content: ""; position: absolute; left: 0; width: 18px; height: 2px; background: var(--ink); }
.nav-toggle-bars::before { top: -5px; }
.nav-toggle-bars::after { top: 5px; }

/* Mega menu (second header row) */
.header-nav-row { border-top: 1px solid var(--line); }
.menu { list-style: none; display: flex; gap: 26px; margin: 0; padding: 0; flex-wrap: wrap; }
.menu-item { position: relative; }
.menu-item > a { display: block; padding: 10px 0; color: var(--ink); text-decoration: none; font-weight: 500; font-size: 0.95rem; letter-spacing: 0.02em; }
.menu-item > a:hover { color: var(--sage-dark); }
.panel-toggle { display: none; }
.mega-panel { display: none; background: var(--white); min-width: 260px; }
.mega-heading { font-family: var(--font-display); font-style: italic; color: var(--sage-deep-dark); font-size: 1.1rem; margin: 0 0 12px; padding-bottom: 10px; border-bottom: 1px solid var(--line); }
.mega-col ul { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.mega-col a { color: var(--ink); text-decoration: none; font-size: 0.92rem; white-space: nowrap; }
.mega-col a:hover { color: var(--sage-dark); }
.mega-all { display: block; color: var(--deep-blue) !important; font-weight: 500; margin-top: 2px; padding-top: 10px; border-top: 1px dashed var(--line); }

/* Hero */
.hero {
  position: relative;
  overflow: hidden;
  padding: 72px 48px;
  margin-top: 24px;
  border-radius: var(--radius);
  background: linear-gradient(135deg, var(--sky) 0%, var(--bg) 62%);
}
.hero p { color: var(--sage-dark); font-size: 1.25rem; }
.hero.has-image { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); gap: 40px; align-items: center; }
.hero-media { overflow: hidden; border-radius: var(--radius); }
.hero-media img { border-radius: var(--radius); display: block; width: 100%; height: auto; }
.hero-copy { position: relative; z-index: 1; max-width: 620px; }
.hero-leaves { position: absolute; top: -15%; right: -8%; width: 56%; max-width: 420px; opacity: .14; fill: none; stroke: var(--sage-dark); stroke-width: 1.1; stroke-linecap: round; stroke-linejoin: round; pointer-events: none; z-index: 0; }
@media (max-width: 760px) {
  .hero { padding: 40px 24px; }
  .hero.has-image { grid-template-columns: 1fr; padding-block: 48px; }
  .hero.has-image .hero-media { order: -1; }
}

/* Hero slider (Admin > Hero slides). Full-bleed: this section carries NO
   .container class and sits directly in <main> (which itself has no
   padding -- see header.php), so it's a plain block element at 100% of
   the page's own width. That's deliberate: 100% of a normal-flow parent
   always equals the real available width, unlike `100vw` (the initial
   containing block), which can overshoot by the scrollbar's width and
   cause horizontal overflow. Every box-model property that could make
   this look like a card is reset explicitly below -- not just "not set",
   actually forced to zero/none -- so nothing inherited from .hero,
   .card, or anywhere else can ever reintroduce that look. */
.hero-slider {
  position: relative;
  display: block;
  width: 100%;
  overflow: hidden;
  margin: 0;
  padding: 0;
  border: 0;
  border-radius: 0;
  box-shadow: none;
  transform: none;
  max-width: none;
  background: var(--bg);
}
/* Height follows content, not a fixed box: every slide stacks in the same
   grid cell (grid-area 1 / 1, exactly on top of each other) so the row's
   height is simply the tallest slide's own natural height -- switching
   the active slide never changes that height, because every slide
   (shown or not) still occupies the same cell and still counts towards
   it. No aspect-ratio, no JS measuring required. */
.hero-slider-track { display: grid; grid-template-columns: 1fr; width: 100%; min-height: 120px; }
.hero-slide { grid-area: 1 / 1; position: relative; opacity: 0; transition: opacity .6s ease; }
.hero-slide.is-active { opacity: 1; z-index: 1; }
/* Default is "fit whole image" (contain): height: auto means the image's
   own natural proportions decide the row's height, so nothing is ever
   cropped. max-height is only a safety net for a very tall (e.g.
   portrait) photo, so it can never push the hero past 85% of the screen. */
.hero-slide-image { display: block; width: 100%; height: auto; max-height: 85vh; object-fit: contain; }
/* "Fill (crop)" instead stretches to the row's own (content-driven)
   height and crops width as needed, using the chosen focus point. */
.hero-slide-image.is-cover { height: 100%; object-fit: cover; object-position: var(--focus-x, 50%) var(--focus-y, 50%); }
.hero-slide-image-mobile { display: none; }
.hero-slide-overlay { position: absolute; inset: 0; background: #000; pointer-events: none; }
/* The text/button column: full-size so it can center itself over the
   image (.hero-slide-copy-wrap), but its child .container pulls the
   actual copy back to the site's normal centered column -- image and
   overlay stay full-bleed, text lines up with the rest of the page. */
.hero-slide-copy-wrap { position: absolute; inset: 0; z-index: 2; display: flex; align-items: center; }
.hero-slide-copy { display: flex; flex-direction: column; max-width: 560px; padding-block: 32px; color: var(--white); }
.hero-slide-eyebrow { font-weight: 600; text-transform: uppercase; letter-spacing: .06em; font-size: .82rem; margin: 0 0 10px; opacity: .92; }
.hero-slide-copy h1 { color: var(--white); margin: 0 0 10px; }
.hero-slide-subtitle { font-size: 1.15rem; margin: 0 0 18px; color: var(--white); opacity: .95; }
.hero-slide-pos-left .hero-slide-copy { align-items: flex-start; text-align: left; }
.hero-slide-pos-center .hero-slide-copy { align-items: center; text-align: center; margin-inline: auto; }
.hero-slide-pos-right .hero-slide-copy { align-items: flex-end; text-align: right; margin-left: auto; }

/* "slide" transition mode: a flex row main.js moves with transform
   instead of toggling opacity. The row's height still follows its
   tallest child exactly the same way (flex and grid both size an
   auto-height row/track to the tallest item), so there's no separate
   height mechanism to keep in sync with the fade mode above. */
.hero-slider[data-transition="slide"] .hero-slider-track { display: flex; grid-template-columns: none; transition: transform .6s ease; }
.hero-slider[data-transition="slide"] .hero-slide { flex: 0 0 100%; opacity: 1; transition: none; }

.hero-slider-arrow {
  position: absolute; top: 50%; transform: translateY(-50%); z-index: 3;
  width: 40px; height: 40px; border-radius: 50%; border: 0;
  background: rgba(255, 255, 255, .85); color: var(--ink); font-size: 1.5rem; line-height: 1;
  display: flex; align-items: center; justify-content: center; cursor: pointer;
}
.hero-slider-arrow:hover { background: var(--white); }
.hero-slider-prev { left: 20px; }
.hero-slider-next { right: 20px; }
.hero-slider-dots { position: absolute; bottom: 20px; left: 0; right: 0; z-index: 3; display: flex; justify-content: center; gap: 8px; }
.hero-slider-dot { width: 9px; height: 9px; padding: 0; border: 0; border-radius: 50%; background: rgba(255, 255, 255, .55); cursor: pointer; }
.hero-slider-dot.is-active { background: var(--white); }

@media (max-width: 760px) {
  /* Height still follows the image (grid-stacking above), not a fixed
     ratio -- a slide with no mobile image keeps showing its desktop
     photo here too; "contain" (the default fit) means it's letterboxed,
     never cropped, regardless of the box being a different shape. */
  .hero-slide-copy { padding-block: 28px; max-width: 100%; }
  .has-mobile-image .hero-slide-image-desktop { display: none; }
  .has-mobile-image .hero-slide-image-mobile { display: block; }
}

/* Admin: hero slide image preview -- same box shape/fit/focus logic as
   the real slider above, so what the admin sees here is what shows live. */
.hero-preview-box { position: relative; aspect-ratio: 8 / 3; max-width: 480px; margin-bottom: 10px; border-radius: 10px; overflow: hidden; background: var(--bg); border: 1px solid var(--line); }
.hero-preview-box img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; display: block; }
.hero-preview-box[data-fit="cover"] img { object-fit: cover; object-position: var(--focus-x, 50%) var(--focus-y, 50%); }
.hero-preview-placeholder { display: flex; align-items: center; justify-content: center; height: 100%; padding: 16px; text-align: center; color: var(--muted); font-size: .85rem; }

/* Admin: quick-pick dropdown + text input for a link field (hero slides) */
.link-picker { display: flex; flex-direction: column; gap: 8px; max-width: 480px; }
.admin-hero-settings { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 16px; }
.admin-hero-settings .field { margin-bottom: 0; }

/* Offers strip */

/* Pill rows: Shop by concern, Shop by brand */
.pill-row { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 28px; }
.concern-pill, .brand-pill { display: inline-flex; flex-direction: column; align-items: center; gap: 2px; background: var(--white); border: 1px solid var(--line); border-radius: 999px; padding: 12px 24px; text-decoration: none; color: var(--ink); font-weight: 500; transition: border-color .2s, color .2s; }
.concern-pill:hover, .brand-pill:hover { border-color: var(--sage); color: var(--sage-dark); }
.brand-pill-origin { font-size: 0.72rem; color: var(--muted); font-weight: 400; }

/* Shop by category tiles */
.category-tiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 16px; margin-top: 28px; }
.category-tile { position: relative; display: flex; align-items: flex-end; min-height: 170px; border-radius: var(--radius); background-size: cover; background-position: center; overflow: hidden; padding: 18px; text-decoration: none; }
.category-tile::after { content: ""; position: absolute; inset: 0; background: linear-gradient(to top, rgba(18, 48, 61, .55), rgba(18, 48, 61, 0) 65%); }
.category-tile.tile-variant-0 { background-color: var(--deep-blue); }
.category-tile.tile-variant-1 { background-color: var(--sage); }
.category-tile.tile-variant-2 { background-color: var(--mint); }
.category-tile.tile-variant-3 { background-color: var(--sky); }
.category-tile-label { position: relative; z-index: 1; color: var(--white); font-family: var(--font-display); font-size: 1.3rem; font-weight: 600; }

/* New launches heading row with "View all" */
.section-heading-row { display: flex; justify-content: space-between; align-items: flex-end; gap: 16px; flex-wrap: wrap; }
.section-heading-row h2 { margin-bottom: 0; }

/* Trust band */
.trust-band { padding-block: 56px; }
.trust-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 28px; text-align: center; }
.trust-icon { display: block; width: 32px; height: 32px; margin: 0 auto 14px; stroke: var(--sage-dark); fill: none; stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; }
.trust-title { font-family: var(--font-display); font-size: 1.3rem; color: var(--deep-blue); font-weight: 600; margin-bottom: 4px; }
.trust-text { color: var(--muted); margin: 0; }

/* Footer: deep-blue background, light text, 4 columns on desktop that
   collapse to a single stacked column on mobile. Only the brand (logo +
   footer text + social) and contact columns are admin-settings-driven and
   each disappears on its own when nothing is filled in; Shop/Customer care
   are always-present nav, same as the rest of the site. */
.site-footer { background: var(--deep-blue); color: var(--white); padding-top: 48px; margin-top: 64px; }
.site-footer p { margin: 0; }
.footer-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1fr; gap: 32px; padding-bottom: 40px; }
.footer-col-heading { font-family: var(--font-body); font-size: 0.85rem; font-weight: 600; text-transform: uppercase; letter-spacing: 0.06em; color: var(--white); margin: 0 0 14px; }
.footer-col-links { display: flex; flex-direction: column; gap: 10px; font-size: 0.92rem; }
.footer-col-links a { color: var(--white); text-decoration: none; }
.footer-col-links a:hover { color: var(--mint); }
.footer-contact-list span { color: var(--sky); }
.footer-logo { display: inline-block; margin-bottom: 14px; }
.footer-logo img { display: block; height: 36px; width: auto; filter: brightness(0) invert(1); }
.footer-text { font-size: 0.9rem; color: var(--sky); margin-bottom: 16px; max-width: 320px; }
.footer-social { display: flex; gap: 10px; }
.footer-social-link { display: inline-flex; align-items: center; justify-content: center; width: 36px; height: 36px; border-radius: 999px; background: rgba(255, 255, 255, .12); color: var(--white); transition: background .15s ease, color .15s ease; }
.footer-social-link:hover { background: var(--mint); color: var(--deep-blue-dark); }
.footer-social-link svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.footer-social-link svg path { fill: currentColor; stroke: none; }
.footer-bottom { border-top: 1px solid rgba(255, 255, 255, .18); padding-block: 18px; }
.footer-bottom p { font-size: 0.85rem; color: var(--sky); text-align: center; }

@media (max-width: 760px) {
  .footer-grid { grid-template-columns: 1fr; gap: 28px; }
  .footer-text { max-width: none; }
}

/* Account pages and forms */
.auth { padding-block: 56px; }
.form-card { max-width: 460px; margin-inline: auto; background: var(--white); border: 1px solid var(--line); border-radius: var(--radius); padding: 32px; }
.settings-form { max-width: 640px; }
.field { display: block; margin-bottom: 16px; font-weight: 500; }
.field-hint { display: block; margin-top: 6px; font-size: 0.85rem; font-weight: 400; color: var(--muted); }
.field input { display: block; width: 100%; margin-top: 6px; padding: 12px 14px; font: inherit; border: 1px solid var(--line); border-radius: 10px; background: var(--bg); color: var(--ink); }
.field input:focus, .field textarea:focus { outline: 2px solid var(--sage); border-color: var(--sage); }
.field textarea { display: block; width: 100%; margin-top: 6px; padding: 12px 14px; font: inherit; border: 1px solid var(--line); border-radius: 10px; background: var(--bg); color: var(--ink); resize: vertical; }
.alert { background: #FDECEC; color: #8A1F1F; border-radius: 10px; padding: 10px 14px; margin: 0 0 12px; font-size: 0.95rem; }
.form-note { margin: 20px 0 0; color: var(--muted); font-size: 0.95rem; }

/* Flash messages */
.flash { border-radius: 10px; padding: 12px 16px; margin: 20px 0 0; font-size: 0.95rem; }
.flash-success { background: #E8F6F0; color: #1F6B52; border: 1px solid var(--mint); }
.flash-error { background: #FDECEC; color: #8A1F1F; border: 1px solid #F3C9C9; }

/* Shop */
.shop-search { display: flex; gap: 10px; max-width: 420px; margin: 20px 0 8px; }
.shop-search input { flex: 1; padding: 12px 16px; font: inherit; border: 1px solid var(--line); border-radius: 999px; background: var(--white); color: var(--ink); }
.shop-search input:focus { outline: 2px solid var(--sage); border-color: var(--sage); }
.product-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 24px; margin-top: 32px; }
/* Minimal, Shopify-style card: no boxed background/border/padding from the
   base .card rule -- just the image, then flush text below. Hover lifts the
   whole card slightly and puts the shadow on the image only, not a visible
   box around the text, so the page never looks like a grid of white panels. */
.product-card { display: flex; flex-direction: column; background: none; border: 0; padding: 0; transition: transform .2s ease; }
.product-card:hover { transform: translateY(-3px); }
.product-card:hover .product-media { box-shadow: 0 16px 32px rgba(18, 48, 61, .14); }
.product-card h3 { margin-bottom: 4px; font-size: 1rem; }
.product-card .eyebrow { margin-bottom: 3px; }
.product-title-link { color: var(--ink); text-decoration: none; }
.product-title-link:hover { color: var(--sage-dark); }
/* Image load-in: the soft gradient placeholder lives on .product-media so it
   shows through while .product-image is still fading in (opacity on the img
   itself would hide its own background too, which is why this isn't on one
   element). Sizing/spacing lives here too so the placeholder box is exactly
   the image's box -- no layout shift once the real photo fades in.
   Everything that overlays the image (badges, wishlist heart) is an
   absolutely-positioned child of this same box, so none of it can ever
   push the image itself out of position -- see .badge-stack below, which
   replaced a sibling .badge-row that used to sit above .product-media and
   add a few pixels of height only on cards that had a badge. */
.product-media { position: relative; border-radius: 10px; margin-bottom: 12px; background: linear-gradient(135deg, var(--sky), var(--mint)); overflow: hidden; transition: box-shadow .2s ease; }
.product-image { display: block; width: 100%; aspect-ratio: 1 / 1; object-fit: cover; opacity: 1; transition: opacity .35s ease; }
/* Out-of-stock fade. Declared before .is-loading below so that if both
   classes are ever present at once (an out-of-stock image still loading),
   the loading state (opacity 0, showing the skeleton) wins; once loading
   finishes .is-loading is removed and this is the only rule left. */
.product-image.is-unavailable { opacity: .55; }
.product-image.is-loading { opacity: 0; }
.product-media-placeholder { display: flex; align-items: center; justify-content: center; aspect-ratio: 1 / 1; }
.product-media-placeholder.is-unavailable { opacity: .55; }
.product-media-placeholder svg { width: 36%; height: 36%; stroke: var(--white); fill: none; stroke-width: 1.3; opacity: .9; }

/* Product detail page: every image (single photo or gallery slide) fades
   in the same way via .product-image; the gallery's cursor-tracked hover
   zoom is a separate, stronger effect added below (.product-gallery-slide). */
.product-detail .product-image { transition: opacity .35s ease, transform .4s cubic-bezier(0.16, 1, 0.3, 1); }
.product-text { color: var(--muted); font-size: 0.9rem; }
.price { font-size: 1.05rem; font-weight: 600; color: var(--ink); margin-top: auto; margin-bottom: 14px; }
.price-was { color: var(--muted); font-size: 0.92rem; font-weight: 400; text-decoration: line-through; margin-left: 6px; }
.add-form { display: flex; gap: 10px; align-items: center; }
.add-form input { width: 70px; padding: 12px 10px; font: inherit; text-align: center; border: 1px solid var(--line); border-radius: 10px; background: var(--bg); color: var(--ink); }
.add-form .btn { flex: 1; padding-inline: 16px; }

/* Add-to-cart button: full-width pill, soft hover lift, a clear pressed
   state, and a distinct disabled/"out of stock" look. .btn-green supplies
   the base color; this adds the centered layout + motion. Text-only
   everywhere it appears (product cards, the product page, the wishlist
   page) -- see _add_to_cart.php. */
.btn-cart { display: inline-flex; align-items: center; justify-content: center; width: 100%; box-shadow: 0 1px 3px rgba(18, 48, 61, .08); transition: background .2s, color .2s, border-color .2s, transform .18s cubic-bezier(0.16, 1, 0.3, 1), box-shadow .2s ease; }
.btn-cart:hover:not(:disabled) { transform: translateY(-2px); box-shadow: 0 10px 20px rgba(18, 48, 61, .16); }
.btn-cart:active:not(:disabled) { transform: translateY(0) scale(.97); box-shadow: 0 2px 6px rgba(18, 48, 61, .12); }
.btn-cart:disabled { background: var(--line); color: var(--muted); border-color: var(--line); cursor: not-allowed; box-shadow: none; transform: none; }

/* Card CTA (Add to cart / "Out of stock" / "Choose options" for products
   with more than one variant -- see _add_to_cart.php): no visible quantity
   input here, cards always add quantity 1 (quantity stays editable on the
   product page and in the cart). Pinned to the bottom of the card
   (.product-card is already a flex column -- this is the margin-top:auto
   that does it) at a fixed 44px/full-width, so every card's button lines
   up with its neighbours regardless of how much text is above it, and
   never grows past the card's own width. */
.product-card .add-form,
.product-card > .btn-cart {
  margin-top: auto;
}
.product-card .btn-cart {
  height: 44px;
  padding-block: 0;
  max-width: 100%;
}

/* Status/sale badges: top-left over the image, absolutely positioned so
   they can never affect card layout. Same pill shape/size for every type;
   only the background tint changes. Colors checked at >=4.5:1 against
   white text (deep-blue ~6:1, sage-deep already documented above,
   amber-deep ~5.6:1, muted ~5:1). */
.badge-stack { position: absolute; top: 10px; left: 10px; z-index: 1; display: flex; flex-direction: column; align-items: flex-start; gap: 5px; max-width: calc(100% - 64px); }
.badge { display: inline-block; padding: 3px 9px; border-radius: 6px; font-size: 0.7rem; font-weight: 600; letter-spacing: 0.02em; white-space: nowrap; box-shadow: none; }
.badge-sale { background: var(--deep-blue); color: var(--white); }
.badge-offer { background: var(--sage-deep); color: var(--white); }
.badge-low-stock { background: var(--amber-deep); color: var(--white); }
.badge-out-of-stock { background: var(--muted); color: var(--white); }
.offer-note { background: var(--sky); border-radius: 10px; padding: 10px 14px; font-size: 0.92rem; color: var(--deep-blue-dark); }

/* Offers page */
.offer-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 24px; margin-top: 32px; }
.offer-card { display: flex; flex-direction: column; gap: 4px; }
.offer-card .btn { align-self: flex-start; margin-top: 10px; }

/* Single product page */
.product-detail-layout { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 36px; align-items: start; margin-top: 20px; }
@media (max-width: 760px) {
  .product-detail-layout { grid-template-columns: 1fr; }
}

/* Product page gallery: a horizontally-scrolling, scroll-snapped strip of
   full-size photos (native touch swipe on mobile, no JS required for that
   part) plus a thumbnail row that jumps to a slide on click and stays in
   sync when the visitor swipes instead (see the gallery script in main.js).
   overflow-y is pinned to hidden so the hover-zoom scale below can't push
   the viewer taller; overflow-x stays auto so swipe/scroll keeps working. */
.product-gallery-viewer { display: flex; overflow-x: auto; overflow-y: hidden; scroll-snap-type: x mandatory; scrollbar-width: none; border-radius: 10px; }
.product-gallery-viewer::-webkit-scrollbar { display: none; }
.product-gallery-slide { flex: 0 0 100%; width: 100%; scroll-snap-align: start; }
.has-thumbs .product-gallery-slide { cursor: zoom-in; }
@media (hover: hover) and (pointer: fine) {
  /* Stronger, cursor-tracked zoom for the gallery (transform-origin is set
     by JS on mousemove); replaces the plain hover scale used elsewhere. */
  .product-detail .product-gallery-viewer .product-gallery-slide:hover { transform: scale(1.6); }
}
.product-gallery-thumbs { display: flex; gap: 8px; margin-top: 10px; overflow-x: auto; padding-bottom: 2px; }
.product-gallery-thumb { flex: 0 0 56px; width: 56px; height: 56px; padding: 0; border: 2px solid transparent; border-radius: 8px; overflow: hidden; background: var(--bg); cursor: pointer; }
.product-gallery-thumb img { display: block; width: 100%; height: 100%; object-fit: cover; }
.product-gallery-thumb.is-active { border-color: var(--sage); }
.product-gallery-thumb:hover { border-color: var(--mint); }

/* Admin: product photo gallery manager */
.admin-gallery-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 16px; margin-top: 16px; }
.admin-gallery-item { background: var(--bg); border: 1px solid var(--line); border-radius: 10px; padding: 14px; }
.admin-gallery-status { min-height: 1.4em; margin: 0 0 6px; }
.admin-gallery-actions .link-button { margin-left: 10px; }
.admin-gallery-actions .link-button:first-of-type { margin-left: 0; }
.admin-gallery-upload { margin-top: 20px; padding-top: 20px; border-top: 1px solid var(--line); }
.tag-main { background: var(--sage-deep); border-color: var(--sage-deep); color: var(--white); margin-left: 0; }

/* Product page: variant option picker (size/volume/shade). A real radio
   group styled as pills -- the <input>s stay in the document (focusable,
   arrow-key-navigable, natively skipping `disabled` ones) but shrunk to
   nothing visually; the adjacent <label> carries every visual state via
   sibling selectors. This is why the markup order is always input, then
   label, inside a relatively-positioned wrapper (the input's auto margin
   trick below removes it from the layout flow without display:none,
   which would break keyboard navigation). */
.variant-picker { margin: 4px 0 18px; border: 0; padding: 0; }
.variant-picker-label { font-weight: 500; margin: 0 0 10px; padding: 0; color: var(--ink); }
.variant-picker-label strong { color: var(--deep-blue); }
.variant-picker-options { display: flex; flex-wrap: wrap; gap: 10px; max-width: 100%; }
.variant-pill-option { position: relative; display: inline-flex; }
.variant-pill-input { position: absolute; width: 1px; height: 1px; opacity: 0; margin: -1px; }

.variant-pill {
  display: inline-flex; align-items: center; justify-content: center;
  min-width: 44px; min-height: 40px; padding: 8px 16px;
  border: 1px solid var(--line); border-radius: 999px;
  background: var(--white); color: var(--ink);
  font: inherit; font-size: 0.9rem; line-height: 1.1;
  cursor: pointer; user-select: none; position: relative; overflow: hidden;
  transition: background .15s ease, color .15s ease, border-color .15s ease;
}
.variant-pill-input:hover + .variant-pill { border-color: var(--sage); }
.variant-pill-input:checked + .variant-pill { background: var(--deep-blue); border-color: var(--deep-blue); color: var(--white); }
.variant-pill-input:focus-visible + .variant-pill { outline: 2px solid var(--deep-blue); outline-offset: 2px; }

/* Out of stock: faded, diagonal strike, visible but not selectable --
   disabled on the input already stops selection/arrow-stop natively. */
.variant-pill-input:disabled + .variant-pill { opacity: .45; color: var(--muted); cursor: not-allowed; }
.variant-pill-input:disabled + .variant-pill:hover { border-color: var(--line); }
.variant-pill-input:disabled + .variant-pill::after {
  content: ''; position: absolute; inset: 0;
  background: linear-gradient(to top right, transparent calc(50% - 1px), currentColor calc(50% - 1px), currentColor calc(50% + 1px), transparent calc(50% + 1px));
}

/* Shade/colour swatch: a round photo instead of a text pill. */
.variant-swatch { min-width: 40px; min-height: 40px; width: 40px; height: 40px; padding: 0; border-radius: 50%; }
.variant-swatch img { display: block; width: 100%; height: 100%; object-fit: cover; border-radius: 50%; }
.variant-pill-input:checked + .variant-swatch { border-width: 2px; box-shadow: 0 0 0 2px var(--deep-blue) inset; }

.product-sku { color: var(--muted); font-size: 0.85rem; margin: -4px 0 14px; }

/* Product cards: small informational row of a product's variant values
   (not an interactive picker -- each one links straight to the product
   page with that variant preselected). */
.card-variant-row { display: flex; flex-wrap: wrap; gap: 6px; margin: 2px 0 8px; }
.card-variant-swatch {
  display: inline-flex; align-items: center; justify-content: center;
  min-width: 28px; height: 26px; padding: 0 10px;
  border: 1px solid var(--line); border-radius: 999px;
  background: var(--white); color: var(--muted); font-size: 0.75rem;
  text-decoration: none; overflow: hidden; position: relative;
}
.card-variant-swatch:hover { border-color: var(--sage); color: var(--sage-dark); }
.card-variant-swatch.is-image { width: 26px; height: 26px; padding: 0; border-radius: 50%; }
.card-variant-swatch.is-image img { display: block; width: 100%; height: 100%; object-fit: cover; border-radius: 50%; }
.card-variant-swatch.is-unavailable { opacity: .45; }
.card-variant-more { color: var(--muted); font-weight: 500; }

/* Admin: product variants manager */
.admin-variant-list { display: flex; flex-direction: column; gap: 14px; margin-top: 16px; }
.admin-variant-item { background: var(--bg); border: 1px solid var(--line); border-radius: 10px; padding: 14px; }
.admin-variant-fields { display: flex; flex-wrap: wrap; gap: 14px; align-items: flex-end; }
.admin-variant-fields .field { margin-bottom: 0; min-width: 120px; }
.admin-variant-thumb { width: 56px; height: 56px; border-radius: 8px; object-fit: cover; background: var(--white); flex-shrink: 0; }
.admin-variant-actions .link-button { margin-left: 10px; }
.admin-variant-upload { margin-top: 20px; padding-top: 20px; border-top: 1px solid var(--line); }

/* Star rating (decorative -- the real number lives in the aria-label) */
.star-rating { display: inline-flex; gap: 1px; font-size: 0.95rem; line-height: 1; }
.star { color: var(--line); }
.star.is-filled { color: var(--star-gold); }
.card-rating { margin: 2px 0 6px; }
.product-rating-line { display: flex; align-items: center; gap: 8px; margin: 0 0 10px; }
.product-rating-line a { color: var(--muted); font-size: 0.88rem; text-decoration: underline; }

/* Product page: rating summary + breakdown + reviews */
.product-reviews { margin-top: 48px; padding-top: 32px; border-top: 1px solid var(--line); }
.rating-overview { display: flex; flex-wrap: wrap; gap: 32px; margin: 20px 0; align-items: flex-start; }
.rating-overview-score { display: flex; flex-direction: column; gap: 6px; align-items: flex-start; }
.rating-overview-score strong { font-family: var(--font-display); font-size: 2.2rem; color: var(--deep-blue); line-height: 1; }
.rating-breakdown { display: flex; flex-direction: column; gap: 6px; min-width: 220px; flex: 1; max-width: 360px; }
.rating-breakdown-row { display: grid; grid-template-columns: 54px 1fr 32px; align-items: center; gap: 10px; font-size: 0.85rem; color: var(--muted); }
.rating-bar { display: block; height: 8px; border-radius: 999px; background: var(--bg); overflow: hidden; }
.rating-bar-fill { display: block; height: 100%; background: var(--star-gold); border-radius: 999px; }
.rating-breakdown-count { text-align: right; }
.review-form, .my-review { max-width: 560px; margin: 20px 0; }
.review-list { display: flex; flex-direction: column; gap: 16px; margin-top: 20px; }
.review-item { margin: 0; }
.review-title { margin: 6px 0 4px; }
.review-meta { margin: 4px 0 8px; }
.review-admin-reply { margin-top: 12px; padding: 12px 14px; background: var(--bg); border-radius: 10px; }
.pagination { display: flex; gap: 8px; margin-top: 20px; }

/* Admin > Reviews */
.admin-review-list { display: flex; flex-direction: column; gap: 16px; margin-top: 16px; }
.admin-review-item { margin: 0; }
.admin-review-meta { margin: 0 0 8px; }
.admin-review-actions .link-button { margin-left: 10px; }

/* Product page: info tabs (Description / How to use / Ingredients /
   Delivery info). All panels are visible by default -- see the comment in
   main.js -- so this reads fine even with JS disabled; .is-active/[hidden]
   only ever come from the tab script itself. */
.product-tabs { margin-top: 48px; padding-top: 32px; border-top: 1px solid var(--line); }
.product-tabs-nav { display: flex; flex-wrap: wrap; gap: 8px; border-bottom: 1px solid var(--line); margin-bottom: 20px; }
.product-tab-btn { padding: 10px 18px; border: 0; background: none; font: inherit; font-weight: 500; color: var(--muted); cursor: pointer; border-bottom: 2px solid transparent; margin-bottom: -1px; }
.product-tab-btn:hover { color: var(--sage-dark); }
.product-tab-btn.is-active { color: var(--deep-blue); border-color: var(--deep-blue); }
.product-tab-panel + .product-tab-panel { margin-top: 28px; }

/* Product page: related / recently viewed strips */
.related-products, .recently-viewed { margin-top: 48px; padding-top: 32px; border-top: 1px solid var(--line); }

/* Coupon box in the cart */
.coupon-box, .points-box { margin: 0 0 20px; }
.coupon-row { display: flex; gap: 8px; }
.coupon-row input { flex: 1; padding: 10px 12px; font: inherit; border: 1px solid var(--line); border-radius: 10px; background: var(--bg); color: var(--ink); }
.free-items { margin-bottom: 8px; }
.points-box .field { font-size: 0.9rem; margin-bottom: 8px; }

/* Admin: offer trigger-product checkboxes */
.checkbox-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 8px; margin-top: 10px; }
.checkbox-option { display: flex; align-items: center; gap: 8px; font-weight: 400; }
.offer-form .field { margin-bottom: 18px; }

/* Tables */
.table-wrap { overflow-x: auto; }
.data-table { width: 100%; border-collapse: collapse; background: var(--white); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.data-table th, .data-table td { padding: 12px 14px; text-align: left; border-bottom: 1px solid var(--line); font-size: 0.95rem; vertical-align: middle; }
.data-table th { background: var(--sky); color: var(--deep-blue); font-weight: 500; white-space: nowrap; }
.data-table tbody tr:last-child td { border-bottom: 0; }
.data-table .num { text-align: right; }
.qty-input { width: 72px; padding: 8px 10px; font: inherit; text-align: center; border: 1px solid var(--line); border-radius: 8px; background: var(--bg); color: var(--ink); }
.data-table textarea { width: 100%; min-width: 180px; padding: 6px 8px; font: inherit; border: 1px solid var(--line); border-radius: 8px; background: var(--bg); color: var(--ink); resize: vertical; }
.link-button { background: none; border: 0; padding: 0; font: inherit; color: var(--deep-blue); text-decoration: underline; cursor: pointer; }
.link-button:hover { color: var(--sage-dark); }
.link-button:disabled { color: var(--muted); text-decoration: none; cursor: default; }
.section-actions { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; justify-content: flex-end; }
.section-actions form { display: inline; }

/* Rich text editor (Admin > Pages) */
.richtext-toolbar { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 6px; }
.richtext-toolbar button { background: var(--bg); border: 1px solid var(--line); border-radius: 8px; padding: 7px 12px; font: inherit; font-size: 0.9rem; cursor: pointer; }
.richtext-toolbar button:hover { border-color: var(--sage); color: var(--sage-dark); }
.richtext-editor { min-height: 220px; margin-top: 8px; padding: 14px 16px; border: 1px solid var(--line); border-radius: 10px; background: var(--white); }
.richtext-editor:focus { outline: 2px solid var(--sage); border-color: var(--sage); }
.richtext-editor h2, .richtext-editor h3 { margin-top: 0; }
.richtext-editor ul, .richtext-editor ol { padding-left: 24px; }

/* Static content pages (About, Shipping, Returns, Privacy, Contact) */
.static-page-body { max-width: 760px; }
.static-page-body h2 { margin-top: 32px; }
.static-page-body h3 { margin-top: 24px; }
.static-page-body ul, .static-page-body ol { padding-left: 24px; }
.static-page-body a { text-decoration: underline; }

/* Cart and checkout layout */
.checkout-layout { display: grid; grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr); gap: 28px; align-items: start; margin-top: 28px; }
.cart-actions { display: flex; align-items: center; gap: 20px; margin-top: 20px; }
.checkout-form { padding: 28px; }
.checkout-guest { background: var(--sky); border-radius: 10px; padding: 12px 16px; font-size: 0.95rem; }
.summary-card { position: sticky; top: 100px; border-color: var(--mint); box-shadow: 0 20px 40px rgba(18, 48, 61, .07); }
.summary-card h3 { margin-bottom: 16px; }
.summary-items { list-style: none; margin: 0 0 16px; padding: 0; font-size: 0.95rem; }
.summary-items li { display: flex; justify-content: space-between; gap: 12px; padding: 6px 0; border-bottom: 1px solid var(--line); }
.summary-note { color: var(--muted); font-size: 0.9rem; margin: 0 0 16px; }
.summary-link { display: inline-block; margin-top: 14px; font-size: 0.95rem; }
.totals { margin: 0 0 16px; }
.totals div { display: flex; justify-content: space-between; gap: 12px; padding: 6px 0; }
.totals dt { color: var(--muted); }
.totals dd { margin: 0; font-weight: 500; }
.totals-grand { margin-top: 10px; padding: 14px 12px; font-size: 1.15rem; background: var(--sky); border-radius: 10px; }
.totals-grand dt { color: var(--ink); }
.totals-grand dd { color: var(--deep-blue); }
.btn-block { display: block; width: 100%; text-align: center; }
.btn-small { padding: 8px 16px; font-size: 0.9rem; }

/* Payment choice */
.payment-box { border: 1px solid var(--line); border-radius: 10px; padding: 16px; margin: 0 0 24px; }
.payment-box legend { padding-inline: 8px; font-weight: 500; color: var(--deep-blue); }
.payment-option { display: flex; gap: 12px; align-items: flex-start; }
.payment-option small { display: block; color: var(--muted); }

/* Orders */
.order-lead { max-width: 640px; }
.block-heading { margin-top: 28px; }
.order-address { color: var(--muted); margin: 0; }
.status-pill { display: inline-block; padding: 4px 12px; border-radius: 999px; font-size: 0.82rem; font-weight: 500; white-space: nowrap; background: var(--sky); color: var(--deep-blue); }
.status-pending { background: #FDF1DC; color: #8A5B12; }
.status-confirmed { background: var(--sky); color: var(--deep-blue); }
.status-out_for_delivery { background: var(--mint); color: #0F4A36; }
.status-completed { background: var(--sage-deep); color: var(--white); }
.status-cancelled { background: #FDECEC; color: #8A1F1F; }
.status-approved { background: var(--sage-deep); color: var(--white); }
.status-hidden { background: var(--line); color: var(--muted); }
.tag { display: inline-block; margin-left: 6px; padding: 2px 8px; border-radius: 999px; background: var(--bg); border: 1px solid var(--line); color: var(--muted); font-size: 0.75rem; text-transform: uppercase; letter-spacing: 0.08em; }
.tag-warn { background: var(--amber-deep); border-color: var(--amber-deep); color: var(--white); margin-left: 0; }
.tag-verified { background: var(--sky); border-color: var(--sky); color: var(--deep-blue); margin-left: 6px; }
.account-links { display: flex; flex-wrap: wrap; gap: 18px; margin-block: 20px; }

/* Admin > Products */
.admin-products-filters { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 16px; margin-block: 20px; padding: 20px; }
.admin-products-filters .field { margin-bottom: 0; min-width: 160px; }
.admin-products-filters .form-note { flex-basis: 100%; margin: 0; }
.admin-bulk-actions { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 12px; margin-bottom: 14px; }
.admin-bulk-actions .field { margin-bottom: 0; }
.admin-row-thumb { display: block; width: 44px; height: 44px; border-radius: 8px; object-fit: cover; background: var(--bg); }
.admin-row-thumb-empty { background: linear-gradient(135deg, var(--sky), var(--mint)); }
.admin-row-actions { white-space: nowrap; }
.admin-row-actions .link-button { margin-left: 10px; }
.admin-row-actions .link-button:first-child { margin-left: 0; }
.admin-product-form { max-width: 720px; }

/* Rewards */
.points-card { max-width: 320px; margin-top: 28px; text-align: center; }
.points-balance { font-family: var(--font-display); font-size: 3.2rem; color: var(--deep-blue); margin: 0; line-height: 1; }
.points-balance span { font-family: var(--font-body); font-size: 1rem; color: var(--muted); display: block; margin-top: 8px; }
.points-plus { color: var(--sage-dark); font-weight: 500; }
.points-minus { color: #8A1F1F; font-weight: 500; }

/* Home: Brand of the week */
.brand-of-week { background: var(--sky); border-radius: var(--radius); }
.brand-of-week-logo { max-height: 72px; width: auto; display: block; margin-bottom: 16px; }

/* Admin: image upload previews */
.admin-image-preview { display: block; max-width: 220px; max-height: 120px; border-radius: 10px; margin-bottom: 8px; object-fit: cover; }
.logo-thumb { display: block; max-width: 100px; max-height: 50px; margin-bottom: 6px; object-fit: contain; }

/* Home: Testimonials */
.testimonial-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 24px; margin-top: 32px; }
.testimonial-card { margin: 0; }
.testimonial-quote { font-family: var(--font-display); font-size: 1.25rem; color: var(--ink); line-height: 1.4; }
.testimonial-author { color: var(--sage-deep-dark); font-weight: 500; margin: 0; }

/* Home: Newsletter */
.newsletter-card { max-width: 560px; margin-inline: auto; text-align: center; background: linear-gradient(135deg, var(--sky), var(--white)); border-color: var(--mint); }
.newsletter-form { display: flex; gap: 10px; margin-top: 20px; flex-wrap: wrap; justify-content: center; }
.newsletter-form input { flex: 1 1 240px; padding: 12px 16px; font: inherit; border: 1px solid var(--line); border-radius: 999px; background: var(--bg); color: var(--ink); }
.newsletter-form input:focus { outline: 2px solid var(--sage); border-color: var(--sage); }

/* Brands page */
.brand-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 20px; margin-top: 32px; }
.brand-card { text-decoration: none; color: inherit; transition: border-color .2s; }
.brand-card:hover { border-color: var(--sage); }
.brand-card h3 { margin-bottom: 4px; }
.brand-origin { margin-bottom: 8px; }

/* Admin panel */
.admin h1 { font-size: clamp(2.2rem, 4vw, 3rem); }
.admin-topbar { display: flex; justify-content: space-between; align-items: flex-start; gap: 16px; flex-wrap: wrap; }
.admin-filters { display: flex; flex-wrap: wrap; gap: 10px; margin-block: 24px; }
.admin-filters:not(.admin-subnav) .chip { font-size: 0.85rem; padding: 6px 14px; }
.admin-subnav { margin-top: 20px; margin-bottom: 0; padding-bottom: 20px; border-bottom: 1px solid var(--line); }
.chip { background: var(--white); border: 1px solid var(--line); border-radius: 999px; padding: 7px 16px; font-size: 0.9rem; text-decoration: none; color: var(--ink); }
.chip:hover { border-color: var(--sage); color: var(--sage-dark); }
.chip.is-on { background: var(--deep-blue); border-color: var(--deep-blue); color: var(--white); }
.admin-table td, .admin-table th { font-size: 0.9rem; padding: 10px 12px; }
.status-form { display: flex; gap: 8px; align-items: center; background: var(--bg); border-radius: 10px; padding: 6px 8px; }
.status-form select { padding: 8px 10px; font: inherit; font-size: 0.9rem; border: 1px solid var(--line); border-radius: 8px; background: var(--white); color: var(--ink); }
.field select { display: block; width: 100%; margin-top: 6px; padding: 12px 14px; font: inherit; border: 1px solid var(--line); border-radius: 10px; background: var(--bg); color: var(--ink); }

/* Admin: bulk inline-edit tables (every cell is an input/select) get zebra striping
   and row hover so they read as editable, unlike plain read-only tables. */
.admin-table-editable tbody tr:nth-child(even) { background: var(--bg); }
.admin-table-editable tbody tr:hover { background: var(--sky); }

/* Admin shell: slim header/footer chrome shown on admin/* routes instead of the
   full storefront header (mega-menu, search, cart) — see header.php / footer.php */
.admin-shell-bar { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 16px; padding-block: 14px; }
.admin-shell-logo { display: flex; align-items: center; gap: 10px; text-decoration: none; }
.admin-shell-logo img { height: 40px; width: auto; display: block; }
.admin-shell-logo span { font-family: var(--font-display); font-style: italic; font-weight: 600; font-size: 1.15rem; color: var(--sage-dark); }
.admin-shell-actions { display: flex; align-items: center; gap: 18px; }
.admin-shell-view-site { color: var(--muted); text-decoration: none; font-size: 0.9rem; font-weight: 500; }
.admin-shell-view-site:hover { color: var(--sage-dark); }
.admin-shell-footer { padding-block: 18px; margin-top: 48px; }

.admin-grouped-nav { display: flex; flex-wrap: wrap; row-gap: 16px; column-gap: 28px; align-items: center; }
.admin-nav-group { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; padding-right: 24px; border-right: 1px solid var(--line); }
.admin-nav-group:last-child { border-right: 0; padding-right: 0; }
.admin-nav-group-label { font-size: 0.72rem; font-weight: 600; text-transform: uppercase; letter-spacing: 0.07em; color: var(--muted); margin-right: 2px; }

@media (max-width: 900px) {
  .checkout-layout { grid-template-columns: 1fr; }
  .summary-card { position: static; }
}

/* Desktop: mega menu opens on hover/focus, inline in the header */
@media (min-width: 901px) {
  .nav-toggle { display: none; }
  .mega-panel {
    position: absolute; top: 100%; left: 0; z-index: 60; border: 1px solid var(--line); border-radius: var(--radius); box-shadow: 0 16px 32px rgba(18, 48, 61, 0.12); padding: 20px;
    opacity: 0; transform: translateY(-6px);
    transition: opacity .16s ease, transform .16s ease;
    transition-behavior: allow-discrete;
  }
  .menu-item.has-panel:hover .mega-panel,
  .menu-item.has-panel:focus-within .mega-panel { display: block; opacity: 1; transform: translateY(0); }
  @starting-style {
    .menu-item.has-panel:hover .mega-panel,
    .menu-item.has-panel:focus-within .mega-panel { opacity: 0; transform: translateY(-6px); }
  }
}

/* Mobile: hamburger button + simple slide-down menu */
@media (max-width: 900px) {
  .logo img { height: 56px; }
  .header-top { display: flex; flex-wrap: wrap; grid-template-columns: none; }
  .header-icons { order: 1; gap: 2px; margin-left: auto; justify-self: auto; }
  .nav-toggle { display: inline-flex; order: 2; }
  .search-form { order: 3; flex-basis: 100%; width: 100%; justify-self: auto; margin-top: 10px; }
  .main-nav {
    display: none;
    opacity: 0; transform: translateY(-8px);
    transition: opacity .2s ease, transform .2s ease;
    transition-behavior: allow-discrete;
  }
  .main-nav.is-open { display: block; opacity: 1; transform: translateY(0); }
  @starting-style { .main-nav.is-open { opacity: 0; transform: translateY(-8px); } }
  .menu { flex-direction: column; gap: 0; margin-top: 12px; }
  .menu-item { width: 100%; border-top: 1px solid var(--line); }
  .menu-item > a { padding: 14px 4px; }
  .panel-toggle { display: block; width: 100%; text-align: left; background: none; border: 0; padding: 0 4px 14px; margin: -10px 0 0; font: inherit; font-size: 0.85rem; color: var(--sage-deep-dark); cursor: pointer; }
  .panel-toggle::after { content: " \25BE"; transition: transform .18s ease; display: inline-block; }
  .menu-item.is-open .panel-toggle::after { content: " \25BE"; transform: rotate(180deg); }
  .mega-panel {
    display: none; position: static; padding: 0 4px 14px 16px;
    opacity: 0; transform: translateY(-4px);
    transition: opacity .16s ease, transform .16s ease;
    transition-behavior: allow-discrete;
  }
  .menu-item.is-open .mega-panel { display: block; opacity: 1; transform: translateY(0); }
  @starting-style { .menu-item.is-open .mega-panel { opacity: 0; transform: translateY(-4px); } }
}

/* Welcome popup (home/shop only, assets/js/welcome-popup.js, text/image/
   coupon/timing editable at Admin > Popup). [hidden] must always win over
   the flex/grid display rules below: a class selector and the browser's
   built-in `[hidden] { display: none }` have equal specificity, so without
   this !important the author rule below used to win the tie and the
   popup/overlay stayed visible (flex/grid) even after JS set the `hidden`
   attribute to close it. */
.welcome-popup-overlay[hidden],
.welcome-popup[hidden] { display: none !important; }

.welcome-popup-overlay {
  position: fixed; inset: 0; z-index: 100; display: flex; align-items: center; justify-content: center;
  padding: 20px; background: rgba(18, 48, 61, .55);
}
/* Fixed ~600x430 box on desktop, split in two even halves. max-height/
   overflow-y are a safety net for short viewports, not the normal case. */
.welcome-popup {
  position: relative; width: 600px; max-width: 100%; height: 430px; max-height: 90vh; overflow-y: auto;
  background: var(--white); border-radius: var(--radius); box-shadow: 0 24px 60px rgba(18, 48, 61, .3);
  display: grid; grid-template-columns: 1fr 1fr;
}
.welcome-popup-close {
  position: absolute; top: 10px; right: 10px; z-index: 2; display: inline-flex; align-items: center; justify-content: center;
  width: 40px; height: 40px; border-radius: 999px; border: 0; background: rgba(255, 255, 255, .92); color: var(--ink);
  font-size: 1.4rem; line-height: 1; cursor: pointer; box-shadow: 0 1px 4px rgba(18, 48, 61, .2);
}
.welcome-popup-close:hover { background: var(--white); }
.welcome-popup-media {
  position: relative; min-height: 0; background: linear-gradient(135deg, var(--sky), var(--mint));
}
.welcome-popup-image { display: block; width: 100%; height: 100%; object-fit: cover; }
.welcome-popup-body { padding: 32px 30px; display: flex; flex-direction: column; justify-content: center; text-align: center; min-width: 0; }
.welcome-popup-headline { font-family: var(--font-display); color: var(--deep-blue); font-weight: 700; font-size: 1.5rem; line-height: 1.2; margin: 0 0 10px; }
.welcome-popup-text { color: var(--muted); font-size: 0.92rem; margin: 0 0 20px; }
.welcome-popup-form { text-align: left; }
/* Visually-hidden label -- the field's border + placeholder carry the
   design, but screen reader/AT users still need a real accessible name. */
.welcome-popup-email-label {
  position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap;
}
.welcome-popup-email {
  display: block; width: 100%; padding: 12px 18px; font: inherit; margin-bottom: 12px;
  border: 1px solid var(--line); border-radius: 999px; background: var(--bg); color: var(--ink);
}
.welcome-popup-email:focus { outline: 2px solid var(--sage); border-color: var(--sage); }
.welcome-popup-submit {
  display: block; width: 100%; height: 44px; font: inherit; font-weight: 600; text-align: center;
  background: var(--sage); color: var(--white); border: 0; border-radius: 999px; cursor: pointer;
  transition: background .2s ease, transform .18s cubic-bezier(0.16, 1, 0.3, 1);
}
.welcome-popup-submit:hover { background: var(--sage-dark); }
.welcome-popup-submit:active { transform: scale(.97); }
.welcome-popup-error { color: var(--amber-deep); font-size: 0.85rem; margin: -2px 0 10px; min-height: 1em; }
.welcome-popup-disclaimer { color: var(--muted); font-size: 0.78rem; margin: 10px 0 0; }
.welcome-popup-thanks { padding-block: 8px; }
/* Honeypot: off-screen (not display:none, so simple bots that skip hidden
   fields still fill it in), and unreachable by real keyboard/AT users via
   tabindex + aria-hidden on the wrapper. */
.hp-field { position: absolute; left: -9999px; top: -9999px; }

@media (max-width: 700px) {
  .welcome-popup { width: 100%; max-width: 440px; height: auto; grid-template-columns: 1fr; }
  .welcome-popup-media { height: 160px; }
  .welcome-popup-body { padding: 26px 22px; }
}

/* Respect reduced-motion preferences for hover/transition effects */
@media (prefers-reduced-motion: reduce) {
  * { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; scroll-behavior: auto !important; }
}
