/* ==========================================================================
   Kedn Hub — Base styles + Stage 1 layout shell (header, mega menu,
   mobile nav, search overlay, footer). Design tokens live in tokens.css.
   ========================================================================== */

/* ---- Reset ---- */
*,
*::before,
*::after {
  box-sizing: border-box;
}

/* overflow-x: hidden lives on html only (not also on body — it was
   previously set on both as "belt and suspenders", but overflow-x on an
   element forces its overflow-y to compute as auto per spec; with BOTH
   html and body doing that you get two nested scroll containers, which
   silently breaks position:sticky for every sticky element on the site,
   including .site-top-sticky). One overflow-x:hidden is enough to stop
   horizontal scroll — this is the actual scrolling viewport in standards
   mode, so it doesn't need help from body too. */
html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  overflow-x: hidden;
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}

body {
  margin: 0;
  background: var(--color-bg);
  color: var(--color-text);
  font-family: var(--font-body);
  font-size: var(--text-body);
  line-height: var(--leading-normal);
  -webkit-font-smoothing: antialiased;
}

img,
svg {
  display: block;
  max-width: 100%;
}

ul {
  list-style: none;
  margin: 0;
  padding: 0;
}

a {
  color: inherit;
  text-decoration: none;
}

button {
  font: inherit;
  color: inherit;
  background: none;
  border: 0;
  cursor: pointer;
}

input {
  font: inherit;
}

h1, h2, h3, p {
  margin: 0;
}

/* ---- Utilities ---- */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.skip-link {
  position: fixed;
  top: -100%;
  left: var(--space-4);
  z-index: 1000;
  background: var(--color-black);
  color: var(--color-off-white);
  padding: var(--space-3) var(--space-5);
  border-radius: var(--radius-sm);
  font-size: var(--text-small);
  letter-spacing: var(--tracking-wide);
  text-transform: uppercase;
  transition: top var(--duration-standard) var(--ease-out);
}

.skip-link:focus {
  top: var(--space-4);
}

.container {
  width: 100%;
  max-width: var(--container-max);
  margin-inline: auto;
  padding-inline: var(--container-pad);
}

.eyebrow {
  font-size: var(--text-label);
  letter-spacing: var(--tracking-wider);
  text-transform: uppercase;
  color: var(--color-accent-strong);
  font-weight: 600;
}

a.eyebrow:hover {
  text-decoration: underline;
}

/* ---- Scroll reveal (progressive enhancement, see js/scroll-reveal.js) ---- */
.reveal {
  opacity: 0;
  transform: translateY(16px);
  transition: opacity var(--duration-slow) var(--ease-out),
    transform var(--duration-slow) var(--ease-out);
}

.reveal.is-revealed {
  opacity: 1;
  transform: none;
}

.reveal-disabled .reveal {
  opacity: 1 !important;
  transform: none !important;
}

/* ---- Focus states (accessibility — never suppressed) ---- */
a:focus-visible,
button:focus-visible,
input:focus-visible {
  outline: 2px solid var(--color-accent-strong);
  outline-offset: 2px;
  border-radius: var(--radius-sm);
}

/* ==========================================================================
   Announcement bar
   ========================================================================== */

/* .site-top-sticky wraps the announcement bar + header as one unit and is
   the thing that's actually sticky (top:0) — the header no longer needs
   its own sticky offset, so however tall the bar gets (it wraps to 2
   lines on narrow screens, see below) the header always sits directly
   under it with no manual pixel math to keep in sync. */
.site-top-sticky {
  position: sticky;
  top: 0;
  z-index: 101;
}

/* white-space: normal (not nowrap+ellipsis) — the message is 3 clauses
   long now and nowrap+ellipsis would silently drop "Pay on Delivery..."
   on anything narrower than ~600px, which is most phones. Letting it wrap
   is what actually guarantees nothing gets cut off at any width; it still
   renders as one line on desktop since that's plenty wide enough.
   overflow-wrap guards against a single unbroken token (the phone number)
   ever forcing horizontal overflow on its own. */
.announcement-bar {
  background: var(--color-black);
  color: var(--color-off-white);
  text-align: center;
  padding: 8px var(--container-pad);
  font-size: 11px;
  line-height: 1.5;
  letter-spacing: var(--tracking-wider);
  text-transform: uppercase;
  white-space: normal;
  overflow-wrap: break-word;
}

.announcement-bar strong {
  color: var(--color-off-white);
  font-weight: 700;
}

/* ---- Floating WhatsApp button ----
   Sticky at the bottom-right of every customer-facing page (not admin),
   independent of the announcement-bar's inline WhatsApp pill above — this
   one stays reachable while scrolling, not just in the top strip.
   z-index sits just above the header but below the mega-menu/mobile-nav/
   overlay layers, so a full-screen menu correctly covers it when open
   instead of floating on top of it. */
.whatsapp-fab {
  position: fixed;
  left: var(--space-5);
  bottom: var(--space-5);
  z-index: 105;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 3.5rem;
  height: 3.5rem;
  border-radius: 50%;
  background: #25d366;
  color: #ffffff;
  box-shadow: var(--shadow-lg);
  transition: transform var(--duration-standard) var(--ease-standard),
    background var(--duration-standard) var(--ease-standard);
}

.whatsapp-fab svg {
  width: 1.75rem;
  height: 1.75rem;
}

.whatsapp-fab:hover {
  background: #1ebe5b;
  transform: scale(1.08);
}

.whatsapp-fab__tooltip {
  position: absolute;
  left: calc(100% + 12px);
  top: 50%;
  transform: translateY(-50%) translateX(-4px);
  max-width: 11rem;
  white-space: normal;
  text-align: left;
  background: var(--color-black);
  color: var(--color-off-white);
  padding: var(--space-2) var(--space-4);
  border-radius: var(--radius-sm);
  font-size: 8px;
  font-weight: 500;
  line-height: var(--leading-snug);
  box-shadow: var(--shadow-md);
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity var(--duration-standard) var(--ease-standard),
    transform var(--duration-standard) var(--ease-standard),
    visibility var(--duration-standard);
}

.whatsapp-fab:hover .whatsapp-fab__tooltip,
.whatsapp-fab:focus-visible .whatsapp-fab__tooltip {
  opacity: 1;
  visibility: visible;
  transform: translateY(-50%) translateX(0);
}

/* ==========================================================================
   Site header
   ========================================================================== */

.site-header {
  position: relative;
  z-index: var(--z-header);
  background: var(--color-surface);
  border-bottom: 1px solid var(--color-border);
  transition: box-shadow var(--duration-standard) var(--ease-standard);
}

.site-header.is-scrolled {
  box-shadow: var(--shadow-sm);
}

body.nav-locked {
  overflow: hidden;
}

.site-header__inner {
  max-width: var(--container-max);
  margin-inline: auto;
  padding-inline: var(--container-pad);
  height: var(--header-height);
  display: grid;
  grid-template-columns: auto auto 1fr auto;
  align-items: center;
  gap: var(--space-4);
}

.logo {
  font-family: var(--font-display);
  font-size: 1.375rem;
  font-weight: 500;
  letter-spacing: var(--tracking-wider);
  text-transform: uppercase;
  white-space: nowrap;
}

/* ---- Primary nav (desktop) ---- */
.primary-nav {
  display: none;
}

.primary-nav__list {
  display: flex;
  align-items: center;
  gap: var(--space-5);
}

.primary-nav__list > li {
  position: relative;
}

.primary-nav__link {
  display: inline-flex;
  align-items: center;
  gap: var(--space-1);
  padding: var(--space-2) 0;
  font-size: var(--text-small);
  letter-spacing: var(--tracking-wide);
  text-transform: uppercase;
  position: relative;
}

.primary-nav__list a.primary-nav__link,
.primary-nav__list > li > a {
  font-family: "Jost", var(--font-body);
  font-weight: 600;
  font-size: 10px;
  letter-spacing: var(--tracking-wide);
  text-transform: uppercase;
  padding: var(--space-2) 0;
}

.primary-nav__list > li > a:not(.primary-nav__link--sale) {
  color: var(--color-text-muted);
}

.primary-nav__link::after,
.primary-nav__list > li > a::after {
  content: "";
  position: absolute;
  left: 0;
  right: 100%;
  bottom: -1px;
  height: 1px;
  background: var(--color-accent-strong);
  transition: right var(--duration-standard) var(--ease-out);
}

.primary-nav__link:hover::after,
.primary-nav__list > li > a:hover::after,
.has-mega.is-open .primary-nav__link::after {
  right: 0;
}

.primary-nav__link--sale {
  color: var(--color-lime-strong);
}

.primary-nav__link--sale::after {
  background: var(--color-lime-strong);
}

.has-mega.is-current .primary-nav__link::after {
  right: 0;
}

.mega-caret {
  width: 10px;
  height: 10px;
  transition: transform var(--duration-standard) var(--ease-out);
}

.has-mega.is-open .mega-caret {
  transform: rotate(180deg);
}

/* ---- Mega menu (desktop) ----
   position: fixed + centered on the viewport (not the trigger's own <li>)
   so every mega menu lands in the same place regardless of how close its
   trigger sits to the edge of the header — a menu positioned relative to
   a left-edge trigger like "Shop" would otherwise render partly off the
   left edge of the viewport at typical laptop widths. */
.mega-menu {
  display: none;
  position: fixed;
  top: var(--sticky-top-height, var(--header-height));
  left: 50%;
  transform: translateX(-50%);
  min-width: 40rem;
  max-width: calc(100vw - var(--space-6) * 2);
  max-height: calc(100vh - var(--sticky-top-height, var(--header-height)) - var(--space-6));
  overflow-y: auto;
  background: var(--color-surface);
  border: 1px solid var(--color-hairline);
  box-shadow: var(--shadow-md);
  padding: var(--space-7);
  z-index: var(--z-mega-menu);
}

.has-mega.is-open .mega-menu {
  display: grid;
}

.mega-menu {
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-6);
}

.mega-menu--wide {
  min-width: 52rem;
}

.mega-menu__col-title {
  font-family: var(--font-display);
  font-size: var(--text-body-lg);
  margin-bottom: var(--space-3);
}

.mega-menu__col ul {
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
}

.mega-menu__col a {
  font-size: var(--text-small);
  color: var(--color-text-muted);
  transition: color var(--duration-fast) var(--ease-standard);
}

.mega-menu__col a:hover {
  color: var(--color-accent-strong);
}

.mega-menu__feature {
  background: var(--color-bg);
  padding: var(--space-5);
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  gap: var(--space-2);
  min-height: 10rem;
}

.mega-menu__feature-title {
  font-family: var(--font-display);
  font-size: var(--text-h3);
  line-height: var(--leading-tight);
}

.mega-menu__feature-link {
  font-size: var(--text-label);
  letter-spacing: var(--tracking-wide);
  text-transform: uppercase;
  color: var(--color-accent-strong);
}

/* ---- Header actions (search / account / wishlist / cart) ---- */
.header-actions {
  display: flex;
  align-items: center;
  gap: var(--space-2);
}

/* Picker hidden — currency.js still auto-detects/converts prices by
   location, visitors just lose the manual override control. */
.currency-select {
  display: none;
  border: 1px solid var(--color-border);
  background: var(--color-surface);
  color: var(--color-text);
  font-family: var(--font-body);
  font-size: var(--text-label);
  letter-spacing: var(--tracking-wide);
  padding: var(--space-1) var(--space-2);
  border-radius: var(--radius-sm);
  cursor: pointer;
  max-width: 4.5rem;
}

/* Below the desktop nav breakpoint, keep only Search + Cart in the compact
   header bar — Account + Wishlist stay reachable from the off-canvas menu.
   Prevents 4 icons + hamburger + wordmark from overflowing narrow phones.
   (Selector is scoped to beat .icon-btn's own display value regardless of
   source order.) */
.header-actions .icon-btn--menu-only {
  display: none;
}

.icon-btn {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.5rem;
  height: 2.5rem;
  border-radius: var(--radius-pill);
  transition: background var(--duration-fast) var(--ease-standard);
}

.icon-btn:hover {
  background: var(--color-warm-neutral-soft);
}

.icon-btn svg {
  width: 20px;
  height: 20px;
}

.icon-btn__count {
  position: absolute;
  top: 2px;
  right: 2px;
  min-width: 16px;
  height: 16px;
  padding-inline: 3px;
  border-radius: var(--radius-pill);
  background: var(--color-accent-strong);
  color: var(--color-white);
  font-size: 10px;
  line-height: 16px;
  text-align: center;
  font-weight: 600;
}

/* ---- Mobile nav toggle ---- */
.nav-toggle {
  display: inline-flex;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 2.5rem;
  height: 2.5rem;
}

.nav-toggle__bar {
  width: 20px;
  height: 1.5px;
  background: var(--color-text);
  transition: transform var(--duration-standard) var(--ease-out),
    opacity var(--duration-standard) var(--ease-out);
}

.nav-toggle[aria-expanded="true"] .nav-toggle__bar:nth-child(1) {
  transform: translateY(6.5px) rotate(45deg);
}

.nav-toggle[aria-expanded="true"] .nav-toggle__bar:nth-child(2) {
  opacity: 0;
}

.nav-toggle[aria-expanded="true"] .nav-toggle__bar:nth-child(3) {
  transform: translateY(-6.5px) rotate(-45deg);
}

/* ==========================================================================
   Search overlay
   ========================================================================== */

.search-overlay {
  position: fixed;
  inset: 0;
  z-index: var(--z-overlay);
  background: rgba(11, 10, 8, 0.6);
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding-top: 12vh;
}

.search-overlay[hidden] {
  display: none;
}

.search-overlay__panel {
  width: min(40rem, 90vw);
  display: flex;
  flex-direction: column;
}

.search-overlay__form {
  width: 100%;
  background: var(--color-surface);
  display: flex;
  align-items: center;
  gap: var(--space-3);
  padding: var(--space-5);
  box-shadow: var(--shadow-lg);
}

.search-overlay__results {
  background: var(--color-surface);
  box-shadow: var(--shadow-lg);
  max-height: 60vh;
  overflow-y: auto;
}

.search-overlay__results:empty {
  display: none;
}

.search-result {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: var(--space-4);
  padding: var(--space-3) var(--space-5);
  border-top: 1px solid var(--color-border);
  font-size: var(--text-small);
}

.search-result:hover {
  background: var(--color-warm-neutral-soft);
}

.search-result__meta {
  color: var(--color-text-muted);
  white-space: nowrap;
}

.search-result--seeall {
  justify-content: flex-start;
  color: var(--color-accent-strong);
  letter-spacing: var(--tracking-wide);
  text-transform: uppercase;
  font-size: var(--text-label);
}

.search-overlay__form input {
  flex: 1;
  border: none;
  border-bottom: 1px solid var(--color-border);
  padding: var(--space-2) 0;
  font-size: var(--text-body-lg);
  background: transparent;
  color: var(--color-text);
}

.search-overlay__form input:focus {
  outline: none;
  border-color: var(--color-accent-strong);
}

.search-overlay__form button[type="submit"] {
  font-size: var(--text-small);
  letter-spacing: var(--tracking-wide);
  text-transform: uppercase;
  color: var(--color-accent-strong);
}

.search-overlay__close {
  position: fixed;
  top: 12vh;
  right: max(var(--space-6), calc(50vw - 20rem - var(--space-8)));
  width: 2.5rem;
  height: 2.5rem;
  color: var(--color-white);
}

/* ==========================================================================
   Mobile nav (off-canvas)
   ========================================================================== */

.nav-scrim {
  position: fixed;
  inset: 0;
  z-index: var(--z-mobile-nav);
  background: rgba(11, 10, 8, 0.45);
}

.nav-scrim[hidden] {
  display: none;
}

.mobile-nav {
  position: fixed;
  top: 0;
  left: 0;
  bottom: 0;
  z-index: calc(var(--z-mobile-nav) + 1);
  width: min(22rem, 88vw);
  background: var(--color-surface);
  overflow-y: auto;
  padding: var(--space-6) var(--space-5);
  transform: translateX(-100%);
  transition: transform var(--duration-slow) var(--ease-out);
}

.mobile-nav[hidden] {
  display: block;
  visibility: hidden;
  transform: translateX(-100%);
}

.mobile-nav.is-open {
  transform: translateX(0);
}

.mobile-nav__close {
  width: 2.5rem;
  height: 2.5rem;
  margin-bottom: var(--space-4);
}

.mobile-nav__section {
  border-bottom: 1px solid var(--color-border);
}

.mobile-nav__trigger {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: var(--space-4) 0;
  font-size: var(--text-body-lg);
  font-family: var(--font-display);
  text-align: left;
}

.mobile-nav__trigger .mega-caret {
  width: 12px;
  height: 12px;
}

.mobile-nav__panel {
  display: none;
  padding-bottom: var(--space-4);
}

.mobile-nav__section.is-open .mobile-nav__panel {
  display: block;
}

.mobile-nav__section.is-open .mega-caret {
  transform: rotate(180deg);
}

.mobile-nav__panel ul {
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
}

.mobile-nav__panel a {
  font-size: var(--text-small);
  color: var(--color-text-muted);
}

.mobile-nav__simple-link {
  display: block;
  padding: var(--space-4) 0;
  border-bottom: 1px solid var(--color-border);
  font-size: var(--text-body-lg);
  font-family: var(--font-display);
}

.mobile-nav__utility {
  display: flex;
  flex-direction: column;
  gap: var(--space-4);
  margin-top: var(--space-6);
}

.mobile-nav__utility a {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  font-size: var(--text-small);
  letter-spacing: var(--tracking-wide);
  text-transform: uppercase;
}

.mobile-nav__utility svg {
  width: 18px;
  height: 18px;
}

/* ==========================================================================
   Shared primitives (buttons, links, section rhythm) — used across the
   homepage and, later, every other page.
   ========================================================================== */

.section {
  padding-block: var(--space-9);
}

.section-head {
  margin-bottom: var(--space-6);
  max-width: 42rem;
}

.section-head--center {
  margin-inline: auto;
  text-align: center;
}

.section-head .eyebrow {
  display: block;
  margin-bottom: var(--space-3);
}

.section-head h2 {
  font-family: var(--font-display);
  font-size: var(--text-h2);
  line-height: var(--leading-tight);
}

.section-head p {
  margin-top: var(--space-3);
  color: var(--color-text-muted);
}

.eyebrow--on-dark {
  color: var(--color-gold-tint);
}

.text-link {
  display: inline-flex;
  align-items: center;
  gap: var(--space-1);
  font-size: var(--text-small);
  letter-spacing: var(--tracking-wide);
  text-transform: uppercase;
  color: var(--color-accent-strong);
  white-space: nowrap;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: var(--space-4) var(--space-6);
  font-size: var(--text-small);
  letter-spacing: var(--tracking-wide);
  text-transform: uppercase;
  border: 1px solid transparent;
  border-radius: var(--radius-sm);
  transition: background var(--duration-standard) var(--ease-standard),
    border-color var(--duration-standard) var(--ease-standard),
    color var(--duration-standard) var(--ease-standard),
    transform var(--duration-fast) var(--ease-standard);
}

.btn:active {
  transform: scale(0.98);
}

.btn:disabled {
  cursor: default;
  pointer-events: none;
  opacity: 0.7;
  transform: none;
}

.btn--primary {
  background: var(--color-black);
  color: var(--color-off-white);
}

.btn--primary:hover {
  background: var(--color-charcoal);
}

.btn--ghost {
  border-color: rgba(247, 244, 238, 0.5);
  color: var(--color-off-white);
}

.btn--ghost:hover {
  border-color: var(--color-off-white);
  background: rgba(247, 244, 238, 0.08);
}

.btn--whatsapp {
  background: #25d366;
  color: #ffffff;
  gap: var(--space-2);
  margin-top: var(--space-3);
}

.btn--whatsapp svg {
  width: 1.1rem;
  height: 1.1rem;
  flex-shrink: 0;
}

.btn--whatsapp:hover {
  background: #1ebe5b;
}

.btn--outline {
  border-color: var(--color-border);
  color: var(--color-text);
}

.btn--outline:hover {
  border-color: var(--color-accent-strong);
  color: var(--color-accent-strong);
}

.btn--add-to-cart {
  width: 100%;
  background: transparent;
  color: var(--color-text);
  border: none;
  border-top: 1px solid var(--color-hairline);
  border-radius: 0;
  padding: var(--space-3) 0;
  justify-content: space-between;
}

.btn--add-to-cart::after {
  content: "+";
  font-size: var(--text-body-lg);
  line-height: 1;
  transition: transform var(--duration-standard) var(--ease-out);
}

.btn--add-to-cart:hover {
  color: var(--color-accent-strong);
}

.btn--add-to-cart:hover::after {
  transform: rotate(90deg);
}

.stars {
  color: var(--color-accent-strong);
  letter-spacing: 1px;
  font-size: var(--text-small);
}

.price {
  font-family: var(--font-display);
  font-size: var(--text-body-lg);
}

.price--was {
  font-family: var(--font-body);
  font-size: var(--text-small);
  color: var(--color-text-muted);
  text-decoration: line-through;
  margin-left: var(--space-2);
}

.product-card__discount {
  display: inline-block;
  margin-left: var(--space-2);
  padding: 2px 8px;
  border-radius: var(--radius-sm);
  background: var(--color-gold-tint);
  color: var(--color-accent-strong);
  font-size: 11px;
  font-weight: 600;
}

/* ---- Product card (shared — homepage rails, listing grids, wishlist) ----
   Editorial treatment: no border box, no shadow-lift. Cards are separated by
   whitespace (grid/track gap) and let the photography carry the hierarchy;
   the only "hover" motion is a slow image zoom + a hairline CTA fill. */
.product-card {
  position: relative;
  background: transparent;
  display: flex;
  flex-direction: column;
}

.product-card__media {
  position: relative;
  aspect-ratio: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  color: var(--color-charcoal-soft);
  background: linear-gradient(155deg, var(--color-warm-neutral-soft) 0%, var(--color-off-white) 100%);
}

.product-card__media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform var(--duration-slower) var(--ease-out);
}

.product-card:hover .product-card__media img,
.product-card:focus-within .product-card__media img {
  transform: scale(1.055);
}

.product-card__media--alt {
  background: linear-gradient(155deg, var(--color-off-white) 0%, var(--color-warm-neutral-soft) 100%);
}

.product-card__media--perfume {
  background: linear-gradient(155deg, #efe6d3 0%, var(--color-warm-neutral-soft) 100%);
}

.product-card__media--gift {
  background: linear-gradient(155deg, #2a2620 0%, var(--color-black) 100%);
  color: var(--color-gold-tint);
}

.product-card__media--boot {
  background: linear-gradient(155deg, var(--color-charcoal-soft) 0%, var(--color-charcoal) 100%);
  color: var(--color-warm-neutral);
}

.product-card__media--sunglasses {
  background: linear-gradient(155deg, #3a352c 0%, var(--color-black) 100%);
  color: var(--color-gold-tint);
}

.product-card__media--jewelry {
  background: linear-gradient(155deg, #2e1620 0%, var(--color-black) 100%);
  color: var(--color-gold-tint);
}

.product-card__media svg {
  width: 42%;
  height: 42%;
}

.product-card__wishlist {
  position: absolute;
  top: var(--space-3);
  right: var(--space-3);
  z-index: 2;
  width: 2.25rem;
  height: 2.25rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: rgba(247, 244, 238, 0.4);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  border-radius: var(--radius-pill);
  color: var(--color-charcoal);
  opacity: 0.85;
  transition: transform var(--duration-fast) var(--ease-standard),
    opacity var(--duration-fast) var(--ease-standard),
    color var(--duration-fast) var(--ease-standard);
}

.product-card__wishlist svg {
  width: 17px;
  height: 17px;
}

.product-card:hover .product-card__wishlist,
.product-card__wishlist:hover,
.product-card__wishlist:focus-visible,
.product-card__wishlist[aria-pressed="true"] {
  opacity: 1;
}

.product-card__wishlist:hover {
  transform: scale(1.08);
}

.product-card__wishlist[aria-pressed="true"] {
  color: var(--color-accent-strong);
}

.product-card__wishlist[aria-pressed="true"] svg {
  fill: currentColor;
}

.product-card__badge {
  position: absolute;
  top: var(--space-3);
  left: var(--space-3);
  z-index: 2;
  background: rgba(11, 10, 8, 0.55);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  color: var(--color-off-white);
  font-size: 10px;
  letter-spacing: var(--tracking-wider);
  text-transform: uppercase;
  padding: 5px var(--space-3);
  border-radius: var(--radius-pill);
}

.product-card__badge--bestseller {
  background: rgba(182, 146, 79, 0.82);
}

.product-card__body {
  padding: var(--space-4) 0 0;
  display: flex;
  flex-direction: column;
  gap: var(--space-1);
  flex: 1;
}

.product-card__category {
  font-size: 11px;
  letter-spacing: var(--tracking-wider);
  text-transform: uppercase;
  color: var(--color-text-muted);
}

.product-card__name {
  font-family: var(--font-display);
  font-size: var(--text-body-lg);
  line-height: var(--leading-snug);
  margin-top: 2px;
}

.product-card__name a {
  background-image: linear-gradient(currentColor, currentColor);
  background-position: 0 100%;
  background-repeat: no-repeat;
  background-size: 0% 1px;
  transition: background-size var(--duration-standard) var(--ease-out);
}

.product-card:hover .product-card__name a {
  background-size: 100% 1px;
}

.product-card__rating {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  font-size: var(--text-small);
}

.product-card__rating-count {
  color: var(--color-text-muted);
}

.product-card__price {
  margin-top: auto;
  padding-top: var(--space-2);
}

/* Hover-reveal only applies where hovering is actually a real input mode
   (mouse/trackpad). On touch devices there is no hover state to reveal it
   with, so gating this behind (hover:hover) and (pointer:fine) leaves
   .btn--add-to-cart in its normal, always-visible, always-tappable flow
   on phones/tablets — otherwise Add to Cart was effectively unreachable
   from the grid on every touch device. */
@media (hover: hover) and (pointer: fine) {
  /* Hidden at rest, reveals on hover/keyboard-focus — collapses its own
     space (not just opacity) so the resting card ends flush at the price,
     matching the reference layout with no reserved gap underneath. */
  .product-card .btn--add-to-cart {
    margin-top: 0;
    max-height: 0;
    opacity: 0;
    overflow: hidden;
    pointer-events: none;
    transition: max-height var(--duration-standard) var(--ease-standard),
      opacity var(--duration-standard) var(--ease-standard),
      margin-top var(--duration-standard) var(--ease-standard);
  }

  .product-card:hover .btn--add-to-cart,
  .product-card:focus-within .btn--add-to-cart {
    margin-top: var(--space-4);
    max-height: 3.5rem;
    opacity: 1;
    pointer-events: auto;
  }
}

/* ==========================================================================
   Footer
   ========================================================================== */

.site-footer {
  background: var(--color-inverse-bg);
  color: var(--color-inverse-text);
  margin-top: var(--space-10);
}

.site-footer__newsletter {
  border-bottom: 1px solid rgba(247, 244, 238, 0.14);
  padding-block: var(--space-8);
}

.site-footer__newsletter-inner {
  display: flex;
  flex-direction: column;
  gap: var(--space-5);
  align-items: flex-start;
}

.site-footer__newsletter h2 {
  font-family: var(--font-display);
  font-size: var(--text-h2);
  max-width: 18ch;
}

.site-footer__newsletter p {
  color: var(--color-warm-neutral);
  max-width: 40ch;
}

.newsletter-form {
  display: flex;
  width: 100%;
  max-width: 28rem;
  border-bottom: 1px solid rgba(247, 244, 238, 0.4);
}

.newsletter-form input {
  flex: 1;
  background: transparent;
  border: none;
  color: var(--color-inverse-text);
  padding: var(--space-3) 0;
}

.newsletter-form input::placeholder {
  color: var(--color-warm-neutral);
}

.newsletter-form input:focus-visible {
  outline: 2px solid var(--color-accent);
  outline-offset: 2px;
}

.newsletter-form button {
  font-size: var(--text-small);
  letter-spacing: var(--tracking-wide);
  text-transform: uppercase;
  color: var(--color-accent);
  padding-inline-start: var(--space-4);
}

.newsletter-form__note {
  font-size: var(--text-label);
  color: var(--color-warm-neutral);
  min-height: 1em;
}

/* Same height-cap + overflow:hidden recipe used for the mobile hero/
   discover/gift-builder sections - see the hero's CSS comment in
   home.css for why a hard cap beats a min-height guess. Drops the
   descriptive paragraph - no vertical room for it at this size. */
@media (max-width: 639px) {
  .site-footer__newsletter {
    height: 12rem;
    overflow: hidden;
    padding-block: var(--space-4);
  }

  .site-footer__newsletter-inner {
    gap: var(--space-3);
  }

  .site-footer__newsletter h2 {
    font-size: var(--text-h3);
  }

  .site-footer__newsletter p {
    display: none;
  }
}

.site-footer__grid {
  padding-block: var(--space-8);
  display: grid;
  gap: var(--space-6);
  grid-template-columns: repeat(2, 1fr);
}

.footer-col__title {
  font-size: var(--text-label);
  letter-spacing: var(--tracking-wider);
  text-transform: uppercase;
  color: var(--color-warm-neutral);
  margin-bottom: var(--space-4);
}

.footer-col ul {
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
}

.footer-col a {
  font-size: var(--text-small);
  color: var(--color-inverse-text);
  opacity: 0.85;
  transition: opacity var(--duration-fast) var(--ease-standard);
}

.footer-col a:hover {
  opacity: 1;
  color: var(--color-accent);
}

.site-footer__bottom {
  border-top: 1px solid rgba(247, 244, 238, 0.14);
  padding-block: var(--space-5);
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
  font-size: var(--text-label);
  color: var(--color-warm-neutral);
}

.site-footer__bottom-inner {
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
}

.site-footer__social {
  display: flex;
  gap: var(--space-3);
}

.site-footer__social a {
  color: var(--color-inverse-text);
}

/* Icon-button variant, used by the Instagram/TikTok/Facebook/WhatsApp
   links specifically — kept as its own class rather than restyling
   .site-footer__social a directly, since that same class also styles the
   plain-text "Continue Shopping" link on checkout/gift-builder's
   deliberately stripped-down footer. */
.social-icon-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.25rem;
  height: 2.25rem;
  border-radius: var(--radius-pill);
  border: 1px solid rgba(247, 244, 238, 0.25);
  transition: border-color var(--duration-standard) var(--ease-standard),
    color var(--duration-standard) var(--ease-standard),
    transform var(--duration-fast) var(--ease-standard);
}

.social-icon-link svg {
  width: 18px;
  height: 18px;
}

.social-icon-link:hover {
  border-color: var(--color-gold-tint);
  color: var(--color-gold-tint);
  transform: translateY(-2px);
}

/* ==========================================================================
   Breakpoints
   ========================================================================== */

/* md — tablets: reveal desktop primary nav, hide hamburger */
@media (min-width: 768px) {
  .site-footer__grid {
    grid-template-columns: repeat(4, 1fr);
  }
}

/* lg — mega-menu breakpoint: desktop nav takes over from off-canvas */
@media (min-width: 1024px) {
  .site-header__inner {
    grid-template-columns: auto 1fr auto;
  }

  .nav-toggle,
  .mobile-nav,
  .nav-scrim {
    display: none;
  }

  .primary-nav {
    display: block;
    justify-self: center;
  }

  .header-actions .icon-btn--menu-only {
    display: inline-flex;
  }

  .site-footer__newsletter-inner {
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
  }
}

@media (min-width: 1280px) {
  .site-footer__grid {
    grid-template-columns: repeat(5, 1fr);
  }
}
