/* ============================================================
   THE HANDLOOM AFFAIR — style.css
   Theme: "Earthy Handloom"
   ------------------------------------------------------------
   All colors, fonts, spacing & radii live in :root below.
   Change a token once and the whole site updates.
   ============================================================ */

/* ---------- 1. DESIGN TOKENS ---------- */
:root {
  /* Colors */
  --color-primary: #B5651D;        /* terracotta */
  --color-primary-dark: #8C4A15;
  --color-accent: #C9A227;         /* muted gold / mustard */
  --color-bg: #FAF6F0;             /* warm cream page background */
  --color-surface: #FFFFFF;        /* cards */
  --color-surface-alt: #F1E9DE;    /* beige sections */
  --color-text: #2B2B2B;           /* charcoal */
  --color-text-muted: #6B6357;
  --color-border: #E7DDCF;
  --color-success: #25D366;        /* WhatsApp green */
  --color-success-dark: #1DA851;
  --color-danger: #C0392B;         /* wishlist heart active */

  /* Typography */
  --font-heading: "Playfair Display", Georgia, serif;
  --font-body: "Poppins", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --fs-xs: 0.75rem;
  --fs-sm: 0.875rem;
  --fs-base: 1rem;
  --fs-lg: 1.125rem;
  --fs-h3: clamp(1.15rem, 1rem + 0.8vw, 1.5rem);
  --fs-h2: clamp(1.5rem, 1.2rem + 1.4vw, 2.25rem);
  --fs-h1: clamp(1.9rem, 1.4rem + 2.4vw, 3.25rem);

  /* Spacing scale */
  --sp-1: 0.25rem;
  --sp-2: 0.5rem;
  --sp-3: 0.75rem;
  --sp-4: 1rem;
  --sp-5: 1.5rem;
  --sp-6: 2rem;
  --sp-7: 3rem;
  --sp-8: 4rem;

  /* Radii & shadows */
  --radius: 12px;
  --radius-sm: 8px;
  --radius-pill: 999px;
  --shadow-sm: 0 1px 3px rgba(43, 43, 43, 0.08);
  --shadow-md: 0 4px 14px rgba(43, 43, 43, 0.10);
  --shadow-lg: 0 12px 32px rgba(43, 43, 43, 0.16);

  /* Layout */
  --max-width: 1240px;
  --header-height: 68px;
  --header-height-shrunk: 56px;

  /* Motion */
  --ease: cubic-bezier(0.22, 0.61, 0.36, 1);
  --dur: 220ms;
}

/* ---------- 2. RESET & BASE ---------- */
*, *::before, *::after { box-sizing: border-box; }

html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  font-family: var(--font-body);
  font-size: var(--fs-base);
  line-height: 1.6;
  color: var(--color-text);
  background: var(--color-bg);
  overflow-x: hidden;
}

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

/* The hidden attribute always wins, even over display classes */
[hidden] { display: none !important; }

h1, h2, h3, h4 {
  font-family: var(--font-heading);
  line-height: 1.25;
  margin: 0 0 var(--sp-4);
  color: var(--color-text);
}
h1 { font-size: var(--fs-h1); }
h2 { font-size: var(--fs-h2); }
h3 { font-size: var(--fs-h3); }

p { margin: 0 0 var(--sp-4); }

a { color: var(--color-primary); text-decoration: none; }
a:hover { color: var(--color-primary-dark); }

button {
  font-family: inherit;
  font-size: inherit;
  cursor: pointer;
  border: none;
  background: none;
  color: inherit;
}

/* Visible focus for keyboard users (AA) */
a:focus-visible, button:focus-visible, input:focus-visible, select:focus-visible, [tabindex]:focus-visible {
  outline: 3px solid var(--color-accent);
  outline-offset: 2px;
  border-radius: 4px;
}

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

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

.visually-hidden {
  position: absolute !important;
  width: 1px; height: 1px;
  margin: -1px; padding: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

/* Section title with thin accent underline */
.section-title {
  position: relative;
  display: inline-block;
  padding-bottom: var(--sp-2);
  margin-bottom: var(--sp-5);
}
.section-title::after {
  content: "";
  position: absolute;
  left: 0; bottom: 0;
  width: 64px; height: 3px;
  background: var(--color-accent);
  border-radius: var(--radius-pill);
}
.section-head { text-align: left; }

/* ---------- 3. BUTTONS ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--sp-2);
  min-height: 44px;
  padding: 0.6rem 1.4rem;
  border-radius: var(--radius-pill);
  font-weight: 500;
  font-size: var(--fs-sm);
  line-height: 1.2;
  transition: background var(--dur) var(--ease), color var(--dur) var(--ease),
              box-shadow var(--dur) var(--ease), transform var(--dur) var(--ease);
  text-align: center;
}
.btn:active { transform: translateY(1px); }

.btn-primary { background: var(--color-primary); color: #fff; }
.btn-primary:hover { background: var(--color-primary-dark); color: #fff; box-shadow: var(--shadow-md); }

.btn-outline {
  background: transparent;
  color: var(--color-primary);
  border: 2px solid var(--color-primary);
}
.btn-outline:hover { background: var(--color-primary); color: #fff; }

.btn-whatsapp { background: var(--color-success); color: #fff; }
.btn-whatsapp:hover { background: var(--color-success-dark); color: #fff; box-shadow: var(--shadow-md); }
.btn-whatsapp svg { flex: none; }

.btn[disabled], .btn.is-disabled {
  opacity: 0.55;
  cursor: not-allowed;
  box-shadow: none;
}

.btn-block { width: 100%; }

/* ---------- 4. ANNOUNCEMENT BAR ---------- */
.announcement-bar {
  background: var(--color-primary-dark);
  color: #fff;
  font-size: var(--fs-sm);
  text-align: center;
  padding: var(--sp-2) var(--sp-6);
  position: relative;
}
.announcement-bar__close {
  position: absolute;
  right: var(--sp-3);
  top: 50%;
  transform: translateY(-50%);
  color: #fff;
  opacity: 0.85;
  width: 32px; height: 32px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
}
.announcement-bar__close:hover { opacity: 1; background: rgba(255,255,255,0.12); }

/* ---------- 5. HEADER ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 900;
  background: rgba(250, 246, 240, 0.95);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--color-border);
  transition: box-shadow var(--dur) var(--ease);
}
.site-header.is-shrunk { box-shadow: var(--shadow-sm); }

.header-inner {
  display: flex;
  align-items: center;
  gap: var(--sp-4);
  min-height: var(--header-height);
  transition: min-height var(--dur) var(--ease);
}
.site-header.is-shrunk .header-inner { min-height: var(--header-height-shrunk); }

.brand {
  display: inline-flex;
  align-items: center;
  gap: var(--sp-2);
  flex: 1 1 auto;
  min-width: 0;               /* allow the name to shrink on small screens */
}
.brand img { height: 40px; width: auto; flex: none; }
.brand__name {
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 1.25rem;
  color: var(--color-text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  min-width: 0;
}
@media (max-width: 767px) {
  .brand img { height: 30px; }
  .brand__name { font-size: 1.02rem; }
  .header-inner { gap: var(--sp-2); }
}
@media (min-width: 1024px) {
  .brand { flex: none; }
}
.brand:hover .brand__name { color: var(--color-primary); }

/* Desktop nav with dropdowns */
.main-nav { display: none; flex: 1; }
.main-nav > ul {
  display: flex;
  gap: var(--sp-1);
  list-style: none;
  margin: 0;
  padding: 0;
  flex-wrap: wrap;
}
.nav-item { position: relative; }
.nav-item > a, .nav-item > button {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 0.6rem 0.75rem;
  font-size: var(--fs-sm);
  font-weight: 500;
  color: var(--color-text);
  border-radius: var(--radius-sm);
  white-space: nowrap;
}
.nav-item > a:hover, .nav-item > button:hover,
.nav-item.is-open > button {
  color: var(--color-primary);
  background: var(--color-surface-alt);
}
.nav-item > button svg { transition: transform var(--dur) var(--ease); }
.nav-item.is-open > button svg { transform: rotate(180deg); }

.nav-dropdown {
  position: absolute;
  top: calc(100% + 6px);
  left: 0;
  min-width: 220px;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-lg);
  padding: var(--sp-2);
  list-style: none;
  margin: 0;
  opacity: 0;
  visibility: hidden;
  transform: translateY(6px);
  transition: opacity var(--dur) var(--ease), transform var(--dur) var(--ease), visibility var(--dur);
  z-index: 950;
}
.nav-item.is-open .nav-dropdown {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}
.nav-dropdown a {
  display: block;
  padding: 0.55rem 0.85rem;
  border-radius: var(--radius-sm);
  color: var(--color-text);
  font-size: var(--fs-sm);
}
.nav-dropdown a:hover { background: var(--color-surface-alt); color: var(--color-primary); }

/* Header action icons */
.header-actions {
  display: flex;
  align-items: center;
  gap: var(--sp-1);
  margin-left: auto;
}
.icon-btn {
  position: relative;
  width: 44px; height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  color: var(--color-text);
  transition: background var(--dur) var(--ease), color var(--dur) var(--ease);
}
.icon-btn:hover { background: var(--color-surface-alt); color: var(--color-primary); }

.badge {
  position: absolute;
  top: 4px; right: 2px;
  min-width: 18px; height: 18px;
  padding: 0 4px;
  border-radius: var(--radius-pill);
  background: var(--color-danger);
  color: #fff;
  font-size: 0.68rem;
  font-weight: 600;
  display: flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
}
.badge[hidden] { display: none; }

.hamburger { display: inline-flex; }

@media (min-width: 1024px) {
  .main-nav { display: block; }
  .hamburger { display: none; }
}

/* ---------- 6. MOBILE DRAWER ---------- */
.drawer-backdrop, .search-backdrop, .lightbox-backdrop, .sheet-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(43, 43, 43, 0.5);
  z-index: 1000;
  opacity: 0;
  visibility: hidden;
  transition: opacity var(--dur) var(--ease), visibility var(--dur);
}
.drawer-backdrop.is-open, .search-backdrop.is-open,
.lightbox-backdrop.is-open, .sheet-backdrop.is-open {
  opacity: 1;
  visibility: visible;
}

.mobile-drawer {
  position: fixed;
  top: 0; left: 0; bottom: 0;
  width: min(320px, 88vw);
  background: var(--color-surface);
  z-index: 1010;
  transform: translateX(-102%);
  transition: transform 280ms var(--ease);
  display: flex;
  flex-direction: column;
  overflow-y: auto;
  box-shadow: var(--shadow-lg);
}
.mobile-drawer.is-open { transform: translateX(0); }

.mobile-drawer__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: var(--sp-4);
  border-bottom: 1px solid var(--color-border);
}
.mobile-drawer__body { padding: var(--sp-3) var(--sp-4) var(--sp-7); }

.drawer-group { border-bottom: 1px solid var(--color-border); }
.drawer-group > button {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: var(--sp-3) 0;
  font-weight: 500;
  color: var(--color-text);
  min-height: 44px;
}
.drawer-group > button svg { transition: transform var(--dur) var(--ease); flex: none; }
.drawer-group.is-open > button svg { transform: rotate(180deg); }
.drawer-group__list {
  list-style: none;
  margin: 0;
  padding: 0 0 var(--sp-2);
  display: none;
}
.drawer-group.is-open .drawer-group__list { display: block; }
.drawer-group__list a {
  display: block;
  padding: 0.55rem var(--sp-3);
  color: var(--color-text-muted);
  border-radius: var(--radius-sm);
  min-height: 44px;
  display: flex;
  align-items: center;
}
.drawer-group__list a:hover { background: var(--color-surface-alt); color: var(--color-primary); }

.drawer-links { list-style: none; margin: var(--sp-3) 0 0; padding: 0; }
.drawer-links a {
  display: flex;
  align-items: center;
  gap: var(--sp-2);
  padding: var(--sp-3) 0;
  color: var(--color-text);
  font-weight: 500;
  min-height: 44px;
}

/* ---------- 7. SEARCH OVERLAY ---------- */
.search-overlay {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 1010;
  background: var(--color-surface);
  box-shadow: var(--shadow-lg);
  transform: translateY(-102%);
  transition: transform 280ms var(--ease);
  max-height: 86vh;
  display: flex;
  flex-direction: column;
  border-radius: 0 0 var(--radius) var(--radius);
}
.search-overlay.is-open { transform: translateY(0); }

.search-bar {
  display: flex;
  align-items: center;
  gap: var(--sp-2);
  padding: var(--sp-4);
  border-bottom: 1px solid var(--color-border);
}
.search-bar input {
  flex: 1;
  border: none;
  font-size: var(--fs-lg);
  font-family: inherit;
  color: var(--color-text);
  background: transparent;
  min-height: 44px;
}
.search-bar input:focus { outline: none; }
.search-bar input::placeholder { color: var(--color-text-muted); }

.search-results {
  overflow-y: auto;
  padding: var(--sp-4);
}
.search-results__grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--sp-3);
}
@media (min-width: 768px) { .search-results__grid { grid-template-columns: repeat(3, 1fr); } }
@media (min-width: 1024px) { .search-results__grid { grid-template-columns: repeat(4, 1fr); } }

.search-hint, .search-empty {
  color: var(--color-text-muted);
  text-align: center;
  padding: var(--sp-5) var(--sp-4);
}

/* ---------- 8. HERO ---------- */
.hero {
  position: relative;
  overflow: hidden;
  background: var(--color-surface-alt);
}
.hero__slide {
  position: relative;
  display: none;
  min-height: clamp(320px, 46vw, 520px);
  align-items: center;
}
.hero__slide.is-active { display: flex; }
.hero__bg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.55;
}
.hero__content {
  position: relative;
  z-index: 2;
  padding-block: var(--sp-8);
  max-width: 640px;
}
.hero__content h1 { margin-bottom: var(--sp-3); }
.hero__content p {
  font-size: var(--fs-lg);
  color: var(--color-text-muted);
  margin-bottom: var(--sp-5);
}
.hero__dots {
  position: absolute;
  bottom: var(--sp-4);
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: var(--sp-2);
  z-index: 3;
}
.hero__dot {
  width: 10px; height: 10px;
  border-radius: 50%;
  background: rgba(43,43,43,0.25);
  transition: background var(--dur) var(--ease), transform var(--dur) var(--ease);
  padding: 0;
}
.hero__dot.is-active { background: var(--color-primary); transform: scale(1.2); }

/* ---------- 9. CATEGORY TILES ---------- */
.category-section { padding-block: var(--sp-7); }
.category-group { margin-bottom: var(--sp-6); }
.category-group__title {
  font-size: var(--fs-sm);
  font-family: var(--font-body);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--color-text-muted);
  margin-bottom: var(--sp-3);
}
.tile-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--sp-3);
}
@media (min-width: 768px) { .tile-grid { grid-template-columns: repeat(3, 1fr); gap: var(--sp-4); } }
@media (min-width: 1024px) { .tile-grid { grid-template-columns: repeat(4, 1fr); } }

.category-tile {
  display: block;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  overflow: hidden;
  transition: transform var(--dur) var(--ease), box-shadow var(--dur) var(--ease);
}
.category-tile:hover { transform: translateY(-4px); box-shadow: var(--shadow-md); }
.category-tile__img {
  aspect-ratio: 16 / 10;
  width: 100%;
  object-fit: cover;
  background: var(--color-surface-alt);
}
.category-tile__name {
  padding: var(--sp-3);
  font-weight: 500;
  color: var(--color-text);
  font-size: var(--fs-sm);
  text-align: center;
}
.category-tile:hover .category-tile__name { color: var(--color-primary); }

/* ---------- 10. PRODUCT GRID & CARDS ---------- */
.product-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--sp-3);
}
@media (min-width: 768px) { .product-grid { grid-template-columns: repeat(3, 1fr); gap: var(--sp-4); } }
@media (min-width: 1024px) { .product-grid { grid-template-columns: repeat(4, 1fr); } }

.product-card {
  position: relative;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: transform var(--dur) var(--ease), box-shadow var(--dur) var(--ease);
}
.product-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-md); }
.product-card:target { outline: 3px solid var(--color-accent); outline-offset: 2px; }

.product-card__media {
  position: relative;
  aspect-ratio: 4 / 5;           /* Myntra-style portrait */
  overflow: hidden;
  background: var(--color-surface-alt);
  cursor: zoom-in;
  border: none;
  padding: 0;
  display: block;
  width: 100%;
}
.product-card__media img {
  width: 100%; height: 100%;
  object-fit: cover;
  transition: transform 400ms var(--ease);
}
.product-card:hover .product-card__media img { transform: scale(1.04); }

.product-card__quickview {
  position: absolute;
  left: 50%; bottom: var(--sp-3);
  transform: translate(-50%, 8px);
  background: rgba(255,255,255,0.95);
  color: var(--color-text);
  font-size: var(--fs-xs);
  font-weight: 600;
  padding: 0.45rem 0.9rem;
  border-radius: var(--radius-pill);
  box-shadow: var(--shadow-sm);
  opacity: 0;
  pointer-events: none;
  transition: opacity var(--dur) var(--ease), transform var(--dur) var(--ease);
  white-space: nowrap;
}
.product-card:hover .product-card__quickview,
.product-card__media:focus-visible .product-card__quickview {
  opacity: 1;
  transform: translate(-50%, 0);
}

.discount-badge {
  position: absolute;
  top: var(--sp-2); left: var(--sp-2);
  background: var(--color-accent);
  color: #fff;
  font-size: var(--fs-xs);
  font-weight: 600;
  padding: 3px 8px;
  border-radius: var(--radius-sm);
  z-index: 2;
}
.stock-ribbon {
  position: absolute;
  bottom: 0; left: 0; right: 0;
  background: rgba(43,43,43,0.78);
  color: #fff;
  text-align: center;
  font-size: var(--fs-xs);
  font-weight: 600;
  padding: var(--sp-1) 0;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  z-index: 2;
}

.wishlist-btn {
  position: absolute;
  top: var(--sp-2); right: var(--sp-2);
  width: 40px; height: 40px;
  border-radius: 50%;
  background: rgba(255,255,255,0.92);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--color-text-muted);
  box-shadow: var(--shadow-sm);
  z-index: 3;
  transition: color var(--dur) var(--ease), transform var(--dur) var(--ease);
}
.wishlist-btn:hover { color: var(--color-danger); }
.wishlist-btn.is-active { color: var(--color-danger); }
.wishlist-btn.is-active svg path { fill: currentColor; }
.wishlist-btn.is-pop { animation: heart-pop 320ms var(--ease); }
@keyframes heart-pop {
  0% { transform: scale(1); }
  40% { transform: scale(1.35); }
  100% { transform: scale(1); }
}

.product-card__body {
  padding: var(--sp-3);
  display: flex;
  flex-direction: column;
  gap: var(--sp-2);
  flex: 1;
}
.product-card__name {
  font-family: var(--font-body);
  font-size: var(--fs-sm);
  font-weight: 500;
  margin: 0;
  color: var(--color-text);
  display: -webkit-box;
  -webkit-line-clamp: 2;         /* clamp long names to 2 lines */
  -webkit-box-orient: vertical;
  overflow: hidden;
  min-height: 2.6em;
}
.product-card__price {
  display: flex;
  align-items: baseline;
  gap: 6px;
  flex-wrap: wrap;
}
/* "Starting from" label sits just before the price, small and muted */
.price-from {
  font-size: var(--fs-xs);
  color: var(--color-text-muted);
  font-weight: 500;
}
.price-current { font-weight: 600; font-size: var(--fs-base); color: var(--color-primary-dark); }
.price-current--ask { color: var(--color-text-muted); font-weight: 500; font-size: var(--fs-sm); }
/* Legacy classes kept for safety; no longer rendered under "starting from" pricing */
.price-mrp { color: var(--color-text-muted); text-decoration: line-through; font-size: var(--fs-sm); }
.price-off { color: var(--color-success-dark); font-size: var(--fs-xs); font-weight: 600; }

.product-card__actions { margin-top: auto; }
.product-card .btn-whatsapp { width: 100%; font-size: var(--fs-xs); padding: 0.55rem 0.6rem; }

/* ---------- 11. CATEGORY PAGE ---------- */
.breadcrumb {
  padding-block: var(--sp-4) 0;
  font-size: var(--fs-sm);
  color: var(--color-text-muted);
}
.breadcrumb ol {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: var(--sp-1);
  margin: 0;
  padding: 0;
}
.breadcrumb li + li::before { content: "/"; margin-inline: var(--sp-1); color: var(--color-border); }
.breadcrumb a { color: var(--color-text-muted); }
.breadcrumb a:hover { color: var(--color-primary); }
.breadcrumb [aria-current] { color: var(--color-text); font-weight: 500; }

.category-head { padding-block: var(--sp-4) var(--sp-2); }
.category-head p { color: var(--color-text-muted); max-width: 60ch; }

.toolbar {
  display: flex;
  align-items: center;
  gap: var(--sp-3);
  flex-wrap: wrap;
  padding-block: var(--sp-3);
  border-top: 1px solid var(--color-border);
  border-bottom: 1px solid var(--color-border);
  margin-bottom: var(--sp-5);
}
.result-count { font-size: var(--fs-sm); color: var(--color-text-muted); margin-right: auto; }

.sort-wrap {
  display: inline-flex;
  align-items: center;
  gap: var(--sp-2);
  font-size: var(--fs-sm);
}
.sort-wrap select {
  font-family: inherit;
  font-size: var(--fs-sm);
  padding: 0.5rem 0.75rem;
  min-height: 44px;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  background: var(--color-surface);
  color: var(--color-text);
}

.filter-toggle-btn {
  display: inline-flex;
  align-items: center;
  gap: var(--sp-2);
  min-height: 44px;
  padding: 0.5rem 1rem;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  background: var(--color-surface);
  font-size: var(--fs-sm);
  font-weight: 500;
}
.filter-toggle-btn:hover { border-color: var(--color-primary); color: var(--color-primary); }
.filter-count-chip {
  background: var(--color-primary);
  color: #fff;
  font-size: var(--fs-xs);
  min-width: 20px; height: 20px;
  border-radius: var(--radius-pill);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 5px;
}

/* Active filter chips */
.active-chips {
  display: flex;
  flex-wrap: wrap;
  gap: var(--sp-2);
  margin-bottom: var(--sp-4);
}
.active-chips:empty { display: none; }
.chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: var(--color-surface-alt);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-pill);
  padding: 0.35rem 0.5rem 0.35rem 0.85rem;
  font-size: var(--fs-xs);
  color: var(--color-text);
  min-height: 34px;
}
.chip button {
  width: 22px; height: 22px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--color-text-muted);
}
.chip button:hover { background: var(--color-border); color: var(--color-danger); }
.chip--clear {
  background: transparent;
  border-style: dashed;
  color: var(--color-primary);
  cursor: pointer;
  padding-inline: 0.85rem;
  font-weight: 600;
}
.chip--clear:hover { border-color: var(--color-primary); }

/* Filter sheet (bottom sheet on mobile / dropdown panel on desktop) */
.filter-sheet {
  position: fixed;
  left: 0; right: 0; bottom: 0;
  background: var(--color-surface);
  z-index: 1010;
  border-radius: var(--radius) var(--radius) 0 0;
  transform: translateY(102%);
  transition: transform 280ms var(--ease);
  max-height: 82vh;
  display: flex;
  flex-direction: column;
  box-shadow: var(--shadow-lg);
}
.filter-sheet.is-open { transform: translateY(0); }
@media (min-width: 1024px) {
  .filter-sheet {
    left: auto; right: max(var(--sp-4), calc((100vw - var(--max-width)) / 2));
    bottom: auto; top: 20vh;
    width: 400px;
    border-radius: var(--radius);
    transform: translateY(12px);
    opacity: 0;
    visibility: hidden;
    transition: opacity var(--dur) var(--ease), transform var(--dur) var(--ease), visibility var(--dur);
  }
  .filter-sheet.is-open { opacity: 1; visibility: visible; transform: translateY(0); }
}

.filter-sheet__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: var(--sp-4);
  border-bottom: 1px solid var(--color-border);
}
.filter-sheet__head h3 { margin: 0; font-family: var(--font-body); font-size: var(--fs-base); font-weight: 600; }
.filter-sheet__body { padding: var(--sp-4); overflow-y: auto; }
.filter-sheet__foot {
  display: flex;
  gap: var(--sp-3);
  padding: var(--sp-4);
  border-top: 1px solid var(--color-border);
}
.filter-sheet__foot .btn { flex: 1; }

.filter-group { margin-bottom: var(--sp-5); }
.filter-group h4 {
  font-family: var(--font-body);
  font-size: var(--fs-sm);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--color-text-muted);
  margin-bottom: var(--sp-3);
}
.filter-option {
  display: flex;
  align-items: center;
  gap: var(--sp-2);
  padding: var(--sp-2) 0;
  font-size: var(--fs-sm);
  cursor: pointer;
  min-height: 40px;
}
.filter-option input[type="checkbox"], .filter-option input[type="radio"] {
  width: 18px; height: 18px;
  accent-color: var(--color-primary);
  flex: none;
}

/* ---------- 12. EMPTY / STATE BLOCKS ---------- */
.empty-state {
  text-align: center;
  padding: var(--sp-8) var(--sp-4);
  background: var(--color-surface);
  border: 1px dashed var(--color-border);
  border-radius: var(--radius);
}
.empty-state svg { margin-inline: auto; color: var(--color-border); margin-bottom: var(--sp-4); }
.empty-state h3 { font-family: var(--font-body); font-weight: 600; font-size: var(--fs-lg); }
.empty-state p { color: var(--color-text-muted); max-width: 46ch; margin-inline: auto; }

/* ---------- 13. TRUST BADGES ---------- */
.trust-strip {
  background: var(--color-surface-alt);
  padding-block: var(--sp-5);
}
.trust-strip__grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--sp-4);
}
@media (min-width: 768px) { .trust-strip__grid { grid-template-columns: repeat(4, 1fr); } }
.trust-item {
  display: flex;
  align-items: center;
  gap: var(--sp-3);
  font-size: var(--fs-sm);
  font-weight: 500;
  color: var(--color-text);
}
.trust-item svg { color: var(--color-primary); flex: none; }

/* ---------- 14. ABOUT TEASER & PAGES ---------- */
.about-teaser {
  padding-block: var(--sp-7);
  background: var(--color-surface);
}
.about-teaser__inner {
  display: grid;
  gap: var(--sp-5);
  align-items: center;
}
@media (min-width: 768px) { .about-teaser__inner { grid-template-columns: 1.2fr 1fr; } }
.about-teaser p { color: var(--color-text-muted); }

.page-hero {
  background: var(--color-surface-alt);
  padding-block: var(--sp-7);
  text-align: center;
}
.page-hero p { color: var(--color-text-muted); max-width: 60ch; margin-inline: auto; margin-bottom: 0; }

.prose {
  max-width: 72ch;
  margin-inline: auto;
  padding-block: var(--sp-7);
}
.prose p { color: var(--color-text); }

/* Contact page */
.contact-grid {
  display: grid;
  gap: var(--sp-5);
  padding-block: var(--sp-7);
}
@media (min-width: 768px) { .contact-grid { grid-template-columns: 1fr 1fr; } }
.contact-card {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  padding: var(--sp-5);
}
.contact-card h3 { font-family: var(--font-body); font-size: var(--fs-base); font-weight: 600; }
.contact-row {
  display: flex;
  align-items: flex-start;
  gap: var(--sp-3);
  padding-block: var(--sp-2);
  font-size: var(--fs-sm);
  color: var(--color-text);
}
.contact-row svg { color: var(--color-primary); flex: none; margin-top: 2px; }
.contact-row a { color: var(--color-text); }
.contact-row a:hover { color: var(--color-primary); }
.map-embed {
  width: 100%;
  aspect-ratio: 16 / 10;
  border: 0;
  border-radius: var(--radius);
  background: var(--color-surface-alt);
}
.map-placeholder {
  aspect-ratio: 16 / 10;
  border-radius: var(--radius);
  background: var(--color-surface-alt);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--color-text-muted);
  font-size: var(--fs-sm);
  text-align: center;
  padding: var(--sp-4);
}

/* ---------- 15. FOOTER ---------- */
.site-footer {
  background: #322A22;              /* deep warm charcoal-brown */
  color: #D8CFC2;
  margin-top: var(--sp-8);
  font-size: var(--fs-sm);
}
.footer-grid {
  display: grid;
  gap: var(--sp-5);
  padding-block: var(--sp-7);
  grid-template-columns: 1fr;
}
@media (min-width: 768px) { .footer-grid { grid-template-columns: 1.4fr 1fr 1fr 1.2fr; } }

.site-footer h4 {
  color: #fff;
  font-family: var(--font-body);
  font-size: var(--fs-sm);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: var(--sp-3);
}
.site-footer ul { list-style: none; margin: 0; padding: 0; }
.site-footer li { margin-bottom: var(--sp-2); }
.site-footer a { color: #D8CFC2; }
.site-footer a:hover { color: var(--color-accent); }
.footer-brand-name {
  font-family: var(--font-heading);
  color: #fff;
  font-size: 1.4rem;
  margin-bottom: var(--sp-3);
}
.footer-blurb { color: #B8AC9C; max-width: 34ch; }
.footer-contact-row {
  display: flex;
  gap: var(--sp-2);
  align-items: flex-start;
  margin-bottom: var(--sp-2);
}
.footer-contact-row svg { flex: none; margin-top: 3px; color: var(--color-accent); }
.footer-social {
  display: flex;
  gap: var(--sp-2);
  margin-top: var(--sp-3);
}
.footer-social a {
  width: 40px; height: 40px;
  border-radius: 50%;
  background: rgba(255,255,255,0.08);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: background var(--dur) var(--ease), color var(--dur) var(--ease);
}
.footer-social a:hover { background: var(--color-primary); color: #fff; }
.footer-bottom {
  border-top: 1px solid rgba(255,255,255,0.12);
  padding-block: var(--sp-4);
  text-align: center;
  color: #B8AC9C;
  font-size: var(--fs-xs);
  display: flex;
  flex-direction: column;
  gap: var(--sp-1);
}
.footer-credit a {
  color: var(--color-accent);
  font-weight: 500;
}
.footer-credit a:hover { color: #fff; text-decoration: underline; }

/* ---------- 16. STICKY FLOATING ACTION BUTTONS ---------- */
.fab-stack {
  position: fixed;
  right: var(--sp-4);
  bottom: var(--sp-4);
  display: flex;
  flex-direction: column;
  gap: var(--sp-3);
  z-index: 980;
}
.fab {
  width: 56px; height: 56px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  box-shadow: var(--shadow-lg);
  transition: transform var(--dur) var(--ease), box-shadow var(--dur) var(--ease);
  animation: fab-in 500ms var(--ease) backwards;
  position: relative;
}
.fab:nth-child(2) { animation-delay: 120ms; }
.fab:hover { transform: scale(1.08); color: #fff; }
.fab:active { transform: scale(0.96); }
.fab--whatsapp { background: var(--color-success); }
.fab--whatsapp:hover { background: var(--color-success-dark); }
.fab--call { background: var(--color-primary); }
.fab--call:hover { background: var(--color-primary-dark); }
@keyframes fab-in {
  from { opacity: 0; transform: translateY(16px) scale(0.8); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

/* Tooltip for unconfigured numbers */
.fab[data-tooltip]::after, .btn[data-tooltip]::after {
  content: attr(data-tooltip);
  position: absolute;
  right: calc(100% + 10px);
  top: 50%;
  transform: translateY(-50%);
  background: var(--color-text);
  color: #fff;
  font-size: var(--fs-xs);
  padding: 6px 10px;
  border-radius: var(--radius-sm);
  white-space: nowrap;
  opacity: 0;
  pointer-events: none;
  transition: opacity var(--dur) var(--ease);
}
.btn[data-tooltip] { position: relative; }
.btn[data-tooltip]::after {
  right: auto; left: 50%;
  top: auto; bottom: calc(100% + 8px);
  transform: translateX(-50%);
  white-space: normal;
  width: max-content;
  max-width: 220px;
}
.fab[data-tooltip]:hover::after, .fab[data-tooltip]:focus-visible::after,
.btn[data-tooltip]:hover::after, .btn[data-tooltip]:focus-visible::after { opacity: 1; }

/* ---------- 17. LIGHTBOX ---------- */
.lightbox {
  position: fixed;
  inset: 0;
  z-index: 1020;
  display: none;
  align-items: center;
  justify-content: center;
  padding: var(--sp-4);
}
.lightbox.is-open { display: flex; }

/* Inside the lightbox stacking context, the backdrop must sit UNDER the panel */
.lightbox .lightbox-backdrop { z-index: 1; }

.lightbox__panel {
  position: relative;
  background: var(--color-surface);
  border-radius: var(--radius);
  box-shadow: var(--shadow-lg);
  width: min(980px, 100%);
  max-height: 92vh;
  overflow-y: auto;
  display: grid;
  grid-template-columns: 1fr;
  z-index: 2;
}
@media (min-width: 768px) {
  .lightbox__panel { grid-template-columns: 1.1fr 1fr; overflow: hidden; max-height: 86vh; }
  .lightbox__info { overflow-y: auto; }
}

.lightbox__media {
  position: relative;
  background: var(--color-surface-alt);
}
.lightbox__img-wrap {
  position: relative;
  aspect-ratio: 4 / 5;
  overflow: hidden;
  cursor: zoom-in;
  touch-action: pinch-zoom;   /* allow native pinch on touch */
}
.lightbox__img-wrap.is-zoomed { cursor: zoom-out; }
.lightbox__img-wrap img {
  width: 100%; height: 100%;
  object-fit: cover;
  transition: transform 200ms var(--ease);
  transform-origin: center;
}
.lightbox__img-wrap.is-zoomed img { transform: scale(2); }

.lightbox__nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 44px; height: 44px;
  border-radius: 50%;
  background: rgba(255,255,255,0.92);
  box-shadow: var(--shadow-sm);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--color-text);
  z-index: 3;
}
.lightbox__nav:hover { color: var(--color-primary); }
.lightbox__nav--prev { left: var(--sp-2); }
.lightbox__nav--next { right: var(--sp-2); }

.lightbox__thumbs {
  display: flex;
  gap: var(--sp-2);
  padding: var(--sp-2);
  justify-content: center;
  flex-wrap: wrap;
}
.lightbox__thumb {
  width: 52px; height: 64px;
  border-radius: var(--radius-sm);
  overflow: hidden;
  border: 2px solid transparent;
  padding: 0;
  background: var(--color-surface-alt);
}
.lightbox__thumb img { width: 100%; height: 100%; object-fit: cover; }
.lightbox__thumb.is-active { border-color: var(--color-primary); }

.lightbox__info { padding: var(--sp-5); }
.lightbox__info h2 { font-size: var(--fs-h3); margin-bottom: var(--sp-2); }
.lightbox__detail {
  display: flex;
  gap: var(--sp-2);
  font-size: var(--fs-sm);
  padding-block: var(--sp-1);
  color: var(--color-text-muted);
}
.lightbox__detail strong { color: var(--color-text); font-weight: 500; }
.lightbox__actions {
  display: flex;
  gap: var(--sp-3);
  margin-top: var(--sp-4);
  flex-wrap: wrap;
}
.lightbox__actions .btn-whatsapp { flex: 1; min-width: 180px; }
.lightbox__wish {
  width: 48px; height: 48px;
  border-radius: 50%;
  border: 1px solid var(--color-border);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--color-text-muted);
  flex: none;
}
.lightbox__wish:hover, .lightbox__wish.is-active { color: var(--color-danger); }
.lightbox__wish.is-active svg path { fill: currentColor; }

.lightbox__close {
  position: absolute;
  top: var(--sp-2); right: var(--sp-2);
  width: 44px; height: 44px;
  border-radius: 50%;
  background: rgba(255,255,255,0.92);
  box-shadow: var(--shadow-sm);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--color-text);
  z-index: 5;
}
.lightbox__close:hover { color: var(--color-danger); }

.oos-note { color: var(--color-danger); font-weight: 600; font-size: var(--fs-sm); }

/* ---------- 18. WISHLIST PAGE ---------- */
.wishlist-section { padding-block: var(--sp-6); min-height: 40vh; }

/* ---------- 19. UTILITIES ---------- */
.mt-0 { margin-top: 0; }
.text-center { text-align: center; }
.section-pad { padding-block: var(--sp-7); }

main { min-height: 50vh; }

/* Make room so FABs never sit on top of the very last content */
main { padding-bottom: var(--sp-6); }

/* No horizontal scroll safety on tiny screens */
@media (max-width: 360px) {
  .container { padding-inline: var(--sp-3); }
  .product-grid, .tile-grid { gap: var(--sp-2); }
}

/* Print: hide chrome */
@media print {
  .site-header, .site-footer, .fab-stack, .announcement-bar { display: none !important; }
}
