/* ============================================================
   MEMU.PK — Global Stylesheet
   Soft Earthy Aesthetic · Casting Powder Home Decor
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=DM+Sans:wght@300;400;500;600&family=Fraunces:opsz,wght@9..144,300;9..144,400;9..144,500;9..144,600&display=swap');

/* ── CSS Variables ─────────────────────────────────────── */
:root {
  --cream:       #F6EFE5;   /* soft card / panel fill */
  --cream-dark:  #EBE4DA;   /* hairlines & borders */
  --warm-white:  #FBFAF6;   /* page background */
  --sand:        #A89F94;
  --sand-light:  #CFC8BE;
  --terracotta:  #C4877A;   /* dusty rose accent */
  --terracotta-dark: #A5675A;
  --charcoal:    #2C2B29;
  --charcoal-mid:#55524D;
  --brown-light: #7C7770;
  --gold:        #B8946A;
  --gold-light:  #CBA97F;
  --sale-red:    #A5675A;
  --white:       #FFFFFF;
  --blush:       #FBECE5;   /* tag pill fill */
  --blush-line:  #E8C9BF;   /* tag pill border */
  --radius-lg:   1.75rem;
  --radius-md:   1.25rem;
  --shadow:      0 0.25rem 1.5rem rgba(44,43,41,0.07);
  --shadow-hover:0 0.625rem 2.25rem rgba(44,43,41,0.12);

  --font-display: 'Fraunces', Georgia, serif;
  --font-body:    'DM Sans', system-ui, sans-serif;

  /* Base font size */
  /* Proportional scaling: 16px up to a 1920px-wide viewport, then grows with it
     (32px at 3840px). Everything sized in rem scales with it. */
  font-size: max(16px, 0.8333vw);
}

/* ── Reset & Base ──────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html {
  scroll-behavior: smooth;
  overflow-x: hidden; /* Prevent horizontal scroll at html level */
}

body {
  font-family: var(--font-body);
  background: var(--warm-white);
  color: var(--charcoal);
  line-height: 1.7;
  font-size: 1rem;
  /* NOTE: overflow-x:hidden on body clips fixed-position elements (cart drawer).
     We handle overflow prevention at html level instead. */
}

img { max-width: 100%; display: block; }
a  { text-decoration: none; color: inherit; }
ul { list-style: none; }
button { cursor: pointer; font-family: var(--font-body); border: none; background: none; }

/* ── Typography Scale ─────────────────────────── */
h1, h2, h3, h4, h5 {
  font-family: var(--font-display);
  font-weight: 400;
  line-height: 1.15;
  letter-spacing: -0.01em;
}
h1 { font-size: clamp(2.2rem, 5vw, 3.9rem); }
h2 { font-size: clamp(1.8rem, 3.2vw, 2.6rem); }
h3 { font-size: clamp(1.4rem, 2.4vw, 1.9rem); }
h4 { font-size: clamp(1.2rem, 2vw, 1.5rem); }
h5 { font-size: clamp(1.05rem, 1.6vw, 1.25rem); }
p  { font-size: 0.97rem; }
small { font-size: 0.86rem; }

/* ── Utility Classes ───────────────────────────────────── */
/* The page column grows with big screens instead of capping at 1600px, so
   grids and carousels keeps getting larger as the resolution increases. */
.container      { max-width: 112rem; margin: 0 auto; padding: 0 1.25rem; }
@media (min-width: 600px) { .container { padding: 0 2rem; } }
.text-center    { text-align: center; }
.flex-center    { display: flex; align-items: center; justify-content: center; }
.section-pad    { padding: 5rem 0; }
.section-pad-sm { padding: 3rem 0; }

.btn-primary {
  display: inline-block;
  padding: 0.95em 2.2em;
  background: var(--charcoal);
  color: var(--cream);
  font-family: var(--font-body);
  font-size: 0.82rem;
  font-weight: 500;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  border: 1.5px solid var(--charcoal);
  border-radius: 999px;
  transition: all 0.3s ease;
  cursor: pointer;
}
.btn-primary:hover {
  background: var(--terracotta);
  border-color: var(--terracotta);
  color: var(--white);
}

.btn-outline {
  display: inline-block;
  padding: 0.9em 2.2em;
  background: transparent;
  color: var(--charcoal);
  font-family: var(--font-body);
  font-size: 0.82rem;
  font-weight: 500;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  border: 1.5px solid var(--charcoal);
  border-radius: 999px;
  transition: all 0.3s ease;
  cursor: pointer;
}
.btn-outline:hover {
  background: var(--charcoal);
  color: var(--cream);
}

.btn-gold {
  display: inline-block;
  padding: 0.9em 2.2em;
  background: var(--gold);
  color: var(--white);
  font-family: var(--font-body);
  font-size: 0.82rem;
  font-weight: 500;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  border: 1.5px solid var(--gold);
  border-radius: 999px;
  transition: all 0.3s ease;
  cursor: pointer;
}
.btn-gold:hover { background: var(--gold-light); border-color: var(--gold-light); }

/* ── Sale Banner ───────────────────────────────────────── */
.sale-banner {
  background: var(--charcoal);
  color: var(--cream);
  text-align: center;
  padding: 0.55rem 1rem;
  font-family: var(--font-body);
  font-size: 0.72rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  font-weight: 500;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}
@media (max-width: 700px) {
  .sale-banner { font-size: 0.7rem; letter-spacing: 0.06em; padding: 0.5rem 0.75rem; }
}

/* ── Header ────────────────────────────────────────────── */
.site-header {
  position: sticky;
  top: 0;
  z-index: 900;
  background: var(--warm-white);
  border-bottom: 1px solid var(--cream-dark);
}
/* Centered logo, nav row beneath, cart on the right */
.header-inner {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  grid-template-areas: ". logo actions" "nav nav nav";
  align-items: center;
  padding: 0.9rem 2rem 0;
  max-width: 112rem;
  margin: 0 auto;
  column-gap: 1.5rem;
}
.logo {
  grid-area: logo;
  font-family: var(--font-display);
  font-size: 1.9rem;
  font-weight: 600;
  letter-spacing: 0;
  line-height: 1.1;
  color: var(--charcoal);
  text-transform: capitalize;
  text-align: center;
}
.logo::after {
  content: 'Handmade Home';
  display: block;
  font-family: var(--font-body);
  font-size: 0.58rem;
  font-weight: 400;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--terracotta);
  margin-top: 0.15rem;
}
.logo span { color: inherit; }

/* Category nav — single scrollable row so all categories fit */
.nav-wrap {
  grid-area: nav;
  position: relative;
  padding: 0.55rem 0 0.8rem;
}
.main-nav {
  display: flex;
  gap: 0.1rem 0.35rem;
  flex-wrap: nowrap;
  align-items: center;
  justify-content: flex-start;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scrollbar-width: none;        /* Firefox */
  -ms-overflow-style: none;     /* IE/Edge */
  padding: 0 2.6rem;            /* clearance for overlay scroll buttons */
}
.main-nav::-webkit-scrollbar { display: none; }
.main-nav a {
  flex-shrink: 0;
  scroll-snap-align: start;
  font-size: 0.88rem;
  letter-spacing: 0.01em;
  color: var(--charcoal-mid);
  padding: 0.3rem 0.7rem;
  transition: color 0.2s;
  white-space: nowrap;
}
.main-nav a:hover, .main-nav a.active { color: var(--charcoal); }
.main-nav a.active { font-weight: 500; }

/* The "Deals" nav item is highlighted in red + bold */
.main-nav a[href*="shop/deals"],
.mobile-nav a[href*="shop/deals"] { color: var(--sale-red); font-weight: 700; }

/* Hover dropdown for top-level groups that have sub-collections (Home Decor, Deals).
   Shown by JS on hover / keyboard focus of the parent nav item. */
.nav-drop {
  position: fixed;
  display: none;
  min-width: 14rem;
  background: var(--warm-white);
  border: 1px solid var(--cream-dark);
  border-radius: 0.9rem;
  box-shadow: 0 1.25rem 3rem rgba(44, 43, 41, 0.16);
  padding: 0.45rem;
  z-index: 950;
}
.nav-drop a {
  display: block;
  padding: 0.55rem 0.85rem;
  border-radius: 0.6rem;
  font-size: 0.86rem;
  color: var(--charcoal-mid);
  white-space: nowrap;
}
.nav-drop a:hover { background: var(--cream); color: var(--charcoal); }
@media (max-width: 700px) { .nav-drop { display: none !important; } }

/* Scroll buttons (desktop only) */
.nav-btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 2.1rem; height: 2.1rem;
  border: 1px solid var(--cream-dark);
  background: var(--warm-white);
  color: var(--charcoal);
  border-radius: 50%;
  display: grid; place-items: center;
  font-size: 1.1rem; line-height: 1;
  cursor: pointer; z-index: 3;
  transition: background 0.2s, color 0.2s, opacity 0.2s;
}
.nav-btn:hover:not(:disabled) { background: var(--terracotta); color: var(--cream); }
.nav-btn:disabled { opacity: 0.45; cursor: not-allowed; pointer-events: none; }
.nav-prev { left: 0; }
.nav-next { right: 0; }

@media (max-width: 700px) {
  .nav-wrap { display: none; }   /* mobile uses the vertical .mobile-nav instead */
}

.header-actions { grid-area: actions; justify-self: end; display: flex; align-items: center; gap: 1rem; }
.cart-btn {
  position: relative;
  background: none;
  color: var(--charcoal);
  border: none;
  padding: 0.4rem;
  font-size: 0.8rem;
  display: flex;
  align-items: center;
  gap: 0.45rem;
  transition: color 0.2s;
  white-space: nowrap;
}
.cart-btn:hover { color: var(--terracotta-dark); }
.cart-btn .cart-icon { display: block; }
.cart-count {
  background: var(--charcoal);
  color: var(--cream);
  border-radius: 999px;
  height: 1.35rem;
  min-width: 1.35rem;
  padding: 0 0.35rem;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.7rem;
  font-weight: 600;
}
.cart-btn.has-items .cart-count { background: var(--terracotta-dark); }
.cart-btn .cart-label { display: none; }

/* ── Footer ────────────────────────────────────────────── */
.site-footer {
  position: relative;
  overflow: hidden;
  background: var(--charcoal);
  color: var(--sand-light);
  padding: 4.5rem 0 2rem;
}
/* Large faded wordmark */
.site-footer::after {
  content: 'MEMU';
  position: absolute;
  left: 50%; bottom: 3.2rem;
  transform: translateX(-50%);
  font-family: var(--font-display);
  font-weight: 500;
  font-size: clamp(6rem, 24vw, 20rem);
  line-height: 0.8;
  letter-spacing: 0.04em;
  color: rgba(255,255,255,0.045);
  pointer-events: none;
  white-space: nowrap;
}
.footer-grid, .footer-bottom { position: relative; z-index: 1; }
.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1.5fr;
  gap: 3rem;
  max-width: 112rem;
  margin: 0 auto 7rem;
  padding: 0 1.25rem;
}
@media (min-width: 600px) { .footer-grid { padding: 0 2rem; } }
.footer-brand .logo { color: var(--white); font-size: 1.9rem; text-align: left; margin-bottom: 1rem; }
.footer-brand p { font-size: 0.9rem; color: var(--sand-light); line-height: 1.8; max-width: 34ch; }
.footer-col h5 {
  font-family: var(--font-body);
  font-size: 0.7rem;
  font-weight: 500;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--white);
  margin-bottom: 1.25rem;
}
.footer-col ul { display: flex; flex-direction: column; gap: 0.65rem; }
.footer-col ul a {
  font-size: 0.9rem;
  color: var(--sand-light);
  transition: color 0.2s;
}
.footer-col ul a:hover { color: var(--white); }
.footer-bottom {
  border-top: 1px solid rgba(255,255,255,0.1);
  margin-top: 0;
  padding-top: 1.5rem;
  text-align: left;
  font-size: 0.75rem;
  color: var(--sand);
  max-width: 112rem;
  margin-left: auto;
  margin-right: auto;
  padding-left: 2rem;
  padding-right: 2rem;
}
.footer-bottom a { color: var(--sand-light); }

/* ── Section Headings ──────────────────────────────────── */
.section-heading {
  text-align: center;
  margin-bottom: 3.5rem;
}
.section-heading .eyebrow {
  display: inline-block;
  font-size: 0.66rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--terracotta-dark);
  background: var(--blush);
  border: 1px solid var(--blush-line);
  border-radius: 999px;
  padding: 0.28rem 0.85rem;
  margin-bottom: 1rem;
}
.section-heading h2 { color: var(--charcoal); }
.section-heading p { color: var(--brown-light); max-width: 55ch; margin: 0.75rem auto 0; font-size: 1.08rem; }

.divider {
  width: 3rem; height: 2px;
  background: var(--blush-line);
  margin: 1rem auto 0;
}

/* ── Product Grid & Cards ──────────────────────────────── */
/* Column count follows the screen so a card never shrinks below ~345px:
   2 up to 1169px, 3 up to 1549px, then 4. Same steps as the home carousels. */
.product-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1.75rem;
}
@media (max-width: 1549px) { .product-grid { grid-template-columns: repeat(3,1fr); } }
@media (max-width: 1169px) { .product-grid { grid-template-columns: repeat(2,1fr); } }
@media (max-width: 750px)  { .product-grid { grid-template-columns: repeat(2,1fr); gap: 1rem; } }
@media (max-width: 400px)  { .product-grid { grid-template-columns: repeat(2,1fr); gap: 0.6rem; } }

.product-card {
  background: var(--white);
  border: 1px solid var(--cream-dark);
  border-radius: var(--radius-lg);
  padding: 0.75rem 0.75rem 0;
  transition: box-shadow 0.3s, transform 0.3s;
  cursor: pointer;
  position: relative;
  overflow: hidden;
}
.product-card:hover {
  box-shadow: var(--shadow-hover);
  transform: translateY(-0.25rem);
}
.card-img-wrap {
  position: relative;
  overflow: hidden;
  aspect-ratio: 1 / 1;
  background: var(--cream);
  border-radius: var(--radius-md);
}
.card-img-wrap img {
  width: 100%; height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
}
.product-card:hover .card-img-wrap img { transform: scale(1.07); }

.sale-badge {
  position: absolute;
  top: 0.75rem; left: 0.75rem;
  background: var(--white);
  color: var(--terracotta-dark);
  font-size: 0.62rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-weight: 600;
  padding: 0.28rem 0.7rem;
  border-radius: 999px;
  z-index: 5;
}

.card-body { padding: 0.95rem 0.4rem 1.2rem; }
.card-category {
  font-size: 0.78rem;
  color: var(--brown-light);
  margin-bottom: 0.3rem;
}
.card-name {
  font-family: var(--font-display);
  font-size: 1.2rem;
  font-weight: 400;
  color: var(--charcoal);
  margin-bottom: 0.5rem;
  line-height: 1.3;
}
.card-prices { display: flex; align-items: baseline; gap: 0.65rem; flex-wrap: wrap; }
.price-original {
  font-size: 0.88rem;
  color: var(--brown-light);
  text-decoration: line-through;
}
.price-sale {
  font-size: 1.15rem;
  font-weight: 500;
  color: var(--charcoal);
}

/* ── Category Section ──────────────────────────────────── */
.category-section {
  padding: 4rem 0;
  border-bottom: 1px solid var(--cream-dark);
}
.category-section:last-child { border-bottom: none; }
.cat-header {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  margin-bottom: 2.5rem;
  flex-wrap: wrap;
  gap: 1rem;
}
.cat-header h2 { font-size: 2rem; }
.cat-header a {
  font-size: 0.8rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--terracotta-dark);
  border-bottom: 1px solid var(--blush-line);
  padding-bottom: 2px;
  transition: color 0.2s;
}
.cat-header a:hover { color: var(--terracotta-dark); }

/* ── Product Page ──────────────────────────────────────── */
.product-page { padding: 3rem 0 5rem; }
.back-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.8rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--brown-light);
  margin-bottom: 2.5rem;
  transition: color 0.2s;
  border: none; background: none; cursor: pointer; padding: 0;
}
.back-btn:hover { color: var(--terracotta); }

.product-layout {
  display: grid;
  grid-template-columns: 1.1fr 1fr;
  gap: 4rem;
  align-items: start;
}
/* min-width:0 prevents grid children from overflowing their column */
.product-layout > * { min-width: 0; }
@media (max-width: 860px) { .product-layout { grid-template-columns: 1fr; gap: 2rem; } }

.product-gallery-main {
  aspect-ratio: 1/1;
  background: var(--cream);
  overflow: hidden;
  margin-bottom: 0.75rem;
  position: relative;
  border-radius: var(--radius-lg);
}
.product-gallery-main img {
  width: 100%; height: 100%;
  object-fit: cover;
  transition: transform 0.4s ease;
}
.product-gallery-main:hover img { transform: scale(1.04); }

.product-thumbs {
  display: grid;
  grid-template-columns: repeat(4,1fr);
  gap: 0.5rem;
  width: 100%;
  min-width: 0;
  box-sizing: border-box;
}
.product-thumbs img {
  width: 100%;
  aspect-ratio: 1/1;
  object-fit: cover;
  cursor: pointer;
  border: 2px solid transparent;
  border-radius: 0.875rem;
  transition: border-color 0.2s, opacity 0.2s;
  opacity: 0.7;
  display: block;
}
.product-thumbs img:hover,
.product-thumbs img.active { border-color: var(--charcoal); opacity: 1; }

.product-page { padding: 2rem 0 5rem; }
.product-gallery { min-width: 0; }
.product-info { position: sticky; top: 9rem; }

.pi-tags { display: flex; flex-wrap: wrap; gap: 0.5rem; margin-bottom: 0.9rem; }
.pi-tags .tag { margin-bottom: 0; }
.tag.tag-dark { background: var(--charcoal); border-color: var(--charcoal); color: var(--cream); }
.product-info h1 { font-size: clamp(1.9rem, 3.4vw, 2.75rem); margin-bottom: 0.5rem; word-break: break-word; }
.pi-meta { font-size: 0.85rem; color: var(--brown-light); margin-bottom: 1.25rem; }

.product-prices {
  display: flex; align-items: baseline; gap: 0.75rem;
  margin-bottom: 1.25rem; flex-wrap: wrap;
}
.product-prices .original { font-size: 1rem; color: var(--brown-light); text-decoration: line-through; white-space: nowrap; }
.product-prices .sale { font-size: 1.9rem; font-weight: 500; color: var(--charcoal); white-space: nowrap; }
.product-prices .discount-tag {
  background: var(--blush); color: var(--terracotta-dark); border: 1px solid var(--blush-line);
  font-size: 0.66rem; font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase;
  padding: 0.28rem 0.75rem; border-radius: 999px; white-space: nowrap; align-self: center;
}

.pi-desc { font-size: 0.95rem; color: var(--charcoal-mid); line-height: 1.8; margin-bottom: 1.75rem; word-break: break-word; }
.pi-block { margin-bottom: 1.5rem; }
.pi-label { font-size: 0.82rem; color: var(--brown-light); margin-bottom: 0.7rem; }
.pi-label strong { color: var(--charcoal); font-weight: 500; }

.pi-buy { display: flex; align-items: stretch; gap: 0.75rem; margin-bottom: 1.5rem; }
.pi-buy .qty-wrap { margin: 0; flex: 0 0 auto; }
.pi-buy .atc-btn { flex: 1; margin: 0; }

.pi-perks { display: flex; flex-direction: column; gap: 0.6rem; margin-bottom: 1.5rem; }
.pi-perks li { display: flex; align-items: center; gap: 0.75rem; font-size: 0.85rem; color: var(--charcoal-mid); }
.pi-perk-icon { flex: 0 0 auto; width: 2.1rem; height: 2.1rem; border-radius: 50%; background: var(--cream); display: grid; place-items: center; font-size: 0.95rem; }

.product-meta { background: var(--cream); border-radius: var(--radius-lg); padding: 0.5rem 1.5rem; overflow-x: hidden; }
.product-meta table { width: 100%; border-collapse: collapse; table-layout: fixed; }
.product-meta td { padding: 0.8rem 0; border-bottom: 1px solid rgba(44,43,41,0.08); font-size: 0.88rem; word-break: break-word; overflow-wrap: break-word; }
.product-meta tr:last-child td { border-bottom: none; }
.product-meta td:first-child { color: var(--brown-light); font-size: 0.78rem; width: 38%; }
.product-meta a { color: var(--terracotta-dark); }

.qty-wrap {
  display: flex; align-items: center; gap: 0;
  width: fit-content; max-width: 100%;
  border: 1.5px solid var(--charcoal); border-radius: 999px; overflow: hidden;
}
.qty-btn {
  width: 2.75rem; height: 3.25rem;
  display: flex; align-items: center; justify-content: center;
  font-size: 1.4rem; background: none; border: none; cursor: pointer;
  color: var(--charcoal); transition: background 0.2s; flex-shrink: 0;
}
.qty-btn:hover { background: var(--cream); }
.qty-val {
  width: 3rem; text-align: center; font-size: 1rem; font-weight: 500;
  border: none; background: none; outline: none; color: var(--charcoal);
  -moz-appearance: textfield;
}
.qty-val::-webkit-outer-spin-button, .qty-val::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }

.atc-btn {
  padding: 1rem 1.25rem;
  background: var(--charcoal); color: var(--cream);
  font-family: var(--font-body); font-size: 0.82rem; font-weight: 500;
  letter-spacing: 0.04em; text-transform: uppercase;
  border: 1.5px solid var(--charcoal); border-radius: 999px;
  transition: all 0.3s; word-break: break-word; white-space: normal; line-height: 1.4;
}
.atc-btn:hover { background: var(--terracotta-dark); border-color: var(--terracotta-dark); color: var(--white); }
.atc-btn.added { background: var(--gold); border-color: var(--gold); color: var(--white); }

/* ── Variation Selector ────────────────────────────────── */
.variation-selector { display: flex; flex-wrap: wrap; gap: 0.5rem; }
.variation-btn {
  padding: 0.5rem 1.05rem; border-radius: 999px;
  border: 1.5px solid var(--cream-dark); background: var(--white); color: var(--charcoal-mid);
  font-family: var(--font-body); font-size: 0.82rem; letter-spacing: 0.02em;
  cursor: pointer; transition: all 0.2s; white-space: nowrap;
}
.variation-btn:hover { border-color: var(--charcoal); color: var(--charcoal); }
.variation-btn.active { border-color: var(--charcoal); background: var(--charcoal); color: var(--cream); }

@media (max-width: 860px) {
  .product-info { position: static; }
}
@media (max-width: 480px) {
  .pi-buy { flex-wrap: wrap; }
  .pi-buy .atc-btn { flex: 1 1 100%; }
  .product-prices .sale { font-size: 1.6rem; }
  .product-meta { padding: 0.25rem 1.1rem; }
}

/* ── Cart Drawer ───────────────────────────────────────── */
.cart-overlay {
  position: fixed; inset: 0;
  background: rgba(44,43,41,0.5);
  z-index: 1000;
  opacity: 0; pointer-events: none;
  transition: opacity 0.3s;
}
.cart-overlay.open { opacity: 1; pointer-events: all; }

.cart-drawer {
  position: fixed;
  top: 0; right: 0; bottom: 0;
  width: min(30rem, 100vw);
  max-width: 100vw;
  background: var(--warm-white);
  z-index: 1001;
  transform: translateX(100%);
  transition: transform 0.4s cubic-bezier(0.25,0.46,0.45,0.94);
  display: flex; flex-direction: column;
  border-radius: var(--radius-lg) 0 0 var(--radius-lg);
  overflow: hidden;
  box-shadow: -0.5rem 0 2.5rem rgba(44,43,41,0.15);
}
.cart-drawer.open { transform: translateX(0); }

.cart-drawer-header {
  padding: 1.5rem 1.75rem 1.25rem;
  display: flex; align-items: center; justify-content: space-between;
}
.cart-drawer-header h3 { font-family: var(--font-display); font-size: 1.6rem; }
.close-cart {
  width: 2.5rem; height: 2.5rem; border-radius: 50%;
  display: grid; place-items: center;
  font-size: 0;                        /* hides the "Close" / ✕ text; × drawn below */
  background: var(--cream); color: var(--charcoal);
  border: none; cursor: pointer;
  transition: background 0.2s, color 0.2s;
}
.close-cart::after { content: '\00d7'; font-size: 1.5rem; line-height: 1; }
.close-cart:hover { background: var(--charcoal); color: var(--cream); }

.cart-items { flex: 1; overflow-y: auto; padding: 0 1.75rem 1rem; }

.cart-empty { text-align: center; padding: 3.5rem 1rem; color: var(--brown-light); }
.cart-empty-icon {
  width: 4.5rem; height: 4.5rem; border-radius: 50%; margin: 0 auto 1.25rem;
  display: grid; place-items: center; background: var(--cream); color: var(--charcoal-mid);
}
.cart-empty h4 { font-size: 1.35rem; color: var(--charcoal); margin-bottom: 0.5rem; }
.cart-empty p { font-size: 0.9rem; margin-bottom: 1.75rem; }

.cart-item {
  display: grid;
  grid-template-columns: 5rem 1fr auto;
  gap: 1rem; align-items: start;
  padding: 1rem 0;
  border-top: 1px solid var(--cream-dark);
}
.cart-item:first-child { border-top: none; padding-top: 0.25rem; }
.cart-item-img { aspect-ratio: 1/1; background: var(--cream); overflow: hidden; border-radius: 1rem; }
.cart-item-img img { width: 100%; height: 100%; object-fit: cover; }
.cart-item-info { min-width: 0; }
.cart-item-name { font-family: var(--font-display); font-size: 1.05rem; line-height: 1.25; margin-bottom: 0.2rem; }
.cart-item-variant { font-size: 0.78rem; color: var(--brown-light); margin-bottom: 0.65rem; }
.cart-item-qty {
  display: inline-flex; align-items: center;
  border: 1px solid var(--cream-dark); border-radius: 999px; background: var(--white);
  font-size: 0.85rem; color: var(--charcoal);
}
.cart-item-qty span { min-width: 1.75rem; text-align: center; font-weight: 500; }
.cart-item-qty button {
  width: 1.9rem; height: 1.9rem; border: none; background: none; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 1.05rem; color: var(--charcoal); cursor: pointer; transition: background 0.2s;
}
.cart-item-qty button:hover { background: var(--cream); }
.cart-item-side { display: flex; flex-direction: column; align-items: flex-end; gap: 0.5rem; }
.cart-item-price { font-weight: 500; font-size: 0.95rem; white-space: nowrap; }
.cart-item-remove {
  font-size: 0.75rem; color: var(--brown-light); background: none; border: none; cursor: pointer;
  text-decoration: underline; text-underline-offset: 3px; transition: color 0.2s;
}
.cart-item-remove:hover { color: var(--terracotta-dark); }

.cart-footer {
  padding: 1.5rem 1.75rem 1.75rem;
  background: var(--white);
  border-top: 1px solid var(--cream-dark);
  border-radius: var(--radius-lg) 0 0 0;
}
.cart-subtotal {
  display: flex; justify-content: space-between; gap: 1rem;
  font-size: 0.88rem; margin-bottom: 0.55rem; color: var(--charcoal-mid);
}
.cart-note { color: var(--terracotta-dark); }
.cart-total {
  display: flex; justify-content: space-between; align-items: baseline;
  font-family: var(--font-display); font-size: 1.4rem;
  margin: 0.9rem 0 1.25rem; padding-top: 0.9rem; border-top: 1px solid var(--cream-dark);
}
.checkout-btn {
  display: block; width: 100%; box-sizing: border-box; text-align: center;
  padding: 1rem;
  background: var(--charcoal); color: var(--cream);
  font-family: var(--font-body); font-size: 0.82rem; font-weight: 500;
  letter-spacing: 0.04em; text-transform: uppercase;
  border: 1.5px solid var(--charcoal); border-radius: 999px;
  transition: all 0.3s;
}
.checkout-btn:hover { background: var(--terracotta-dark); border-color: var(--terracotta-dark); color: var(--white); }
.cart-clear {
  display: block; margin: 0.9rem auto 0; background: none; border: none; cursor: pointer;
  font-size: 0.78rem; color: var(--brown-light);
  text-decoration: underline; text-underline-offset: 3px; transition: color 0.2s;
}
.cart-clear:hover { color: var(--terracotta-dark); }

/* ── Checkout / Order Page ─────────────────────────────── */
.checkout-page { padding: 2rem 0 5rem; }
.checkout-head { margin-bottom: 2rem; }
.checkout-head h1 { margin-bottom: 0.5rem; }
.checkout-head p { color: var(--brown-light); font-size: 0.95rem; }
.checkout-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr);
  gap: 2.5rem; align-items: start;
}
@media (max-width: 860px) { .checkout-grid { grid-template-columns: minmax(0, 1fr); gap: 1.75rem; } }

.checkout-form {
  order: 1;
  background: var(--white); border: 1px solid var(--cream-dark);
  border-radius: var(--radius-lg); padding: 2rem;
}
.order-summary { order: 2; }
.checkout-form h3 { font-size: 1.5rem; margin-bottom: 1.5rem; }

.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
@media (max-width: 560px) { .form-row { grid-template-columns: 1fr; gap: 0; } }
.form-group { margin-bottom: 1.25rem; }
.form-group label { display: block; font-size: 0.82rem; color: var(--charcoal-mid); margin-bottom: 0.45rem; }
.form-group input,
.form-group select,
.form-group textarea {
  width: 100%; box-sizing: border-box;
  padding: 0.85rem 1.1rem;
  border: 1.5px solid var(--cream-dark);
  border-radius: 1rem;
  background: var(--warm-white);
  font-family: var(--font-body); font-size: 0.95rem; color: var(--charcoal);
  outline: none; transition: border-color 0.2s, background 0.2s;
  -webkit-appearance: none; appearance: none;
}
.form-group select {
  padding-right: 2.5rem;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%232C2B29' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 1rem center; background-size: 1rem;
}
.form-group textarea { resize: vertical; }
.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus { border-color: var(--charcoal); background: var(--white); }

/* The border colour of this box is set by checkout.html's script (city state) */
.city-highlight-box {
  background: var(--cream);
  border: 2px solid var(--terracotta);
  border-radius: var(--radius-md);
  padding: 1.1rem 1.25rem;
  margin-bottom: 1.5rem;
  display: flex; align-items: flex-start; gap: 0.85rem;
}
.city-highlight-box .icon {
  flex: 0 0 auto; width: 2.4rem; height: 2.4rem; border-radius: 50%;
  background: var(--white); display: grid; place-items: center; font-size: 1.1rem;
}
.city-highlight-box p { font-size: 0.85rem; line-height: 1.65; color: var(--charcoal-mid); }
.city-highlight-box strong { color: var(--charcoal); }

.lahore-note {
  background: var(--blush); border: 1px solid var(--blush-line); border-radius: 1rem;
  padding: 0.8rem 1rem; font-size: 0.82rem; color: var(--charcoal-mid);
  margin: -0.25rem 0 1.25rem; display: none;
}
.lahore-note.visible { display: block; }

.order-summary-box {
  background: var(--cream);
  padding: 2rem;
  border-radius: var(--radius-lg);
  position: sticky; top: 9rem;
}
.order-summary-box h3 { font-size: 1.5rem; margin-bottom: 1.25rem; padding-bottom: 1rem; border-bottom: 1px solid rgba(44,43,41,0.1); }
.summary-item {
  display: flex; justify-content: space-between;
  font-size: 0.88rem; margin-bottom: 0.85rem;
  align-items: flex-start; gap: 0.75rem;
}
.summary-item .item-name { color: var(--charcoal-mid); flex: 1; line-height: 1.5; }
.summary-item .item-price { font-weight: 500; white-space: nowrap; }
.summary-divider { border: none; border-top: 1px solid rgba(44,43,41,0.1); margin: 1rem 0; }
.summary-dc { display: flex; justify-content: space-between; font-size: 0.88rem; margin-bottom: 0.75rem; }
.summary-total { display: flex; justify-content: space-between; align-items: baseline; font-family: var(--font-display); font-size: 1.5rem; margin-top: 0.75rem; }

.promo-box { margin: 1.25rem 0; }
.promo-row { display: flex; gap: 0.5rem; }
.promo-row input {
  flex: 1; min-width: 0; padding: 0.7rem 1.1rem; text-transform: uppercase;
  border: 1.5px solid transparent; border-radius: 999px; background: var(--white);
  font-family: var(--font-body); font-size: 0.85rem; color: var(--charcoal); outline: none;
}
.promo-row input:focus { border-color: var(--charcoal); }
.promo-row .btn-outline { padding: 0.7rem 1.3rem; white-space: nowrap; }
#promo-msg { font-size: 0.78rem; margin-top: 0.5rem; padding-left: 0.5rem; }

/* Packaging & gift wrap options (checkout) */
.packaging-box { margin: 1.25rem 0; }
.packaging-title { font-family: var(--font-display); font-size: 1.3rem; margin-bottom: 0.85rem; }
.packaging-options { display: flex; flex-direction: column; gap: 0.6rem; }
.packaging-option {
  display: flex; align-items: flex-start; gap: 0.75rem;
  padding: 0.85rem 1.1rem; background: var(--white);
  border: 1.5px solid var(--cream-dark); border-radius: 1rem;
  cursor: pointer; transition: border-color 0.2s, box-shadow 0.2s;
}
.packaging-option:hover { border-color: var(--sand-light); }
.packaging-option.selected { border-color: var(--charcoal); box-shadow: var(--shadow); }
.packaging-option input { margin-top: 0.3rem; accent-color: var(--terracotta); width: 1.05rem; height: 1.05rem; flex: 0 0 auto; }
.packaging-option .po-text { display: flex; flex-direction: column; gap: 0.15rem; }
.packaging-option .po-name { font-size: 0.9rem; font-weight: 600; color: var(--charcoal); }
.packaging-option .po-desc { font-size: 0.78rem; color: var(--brown-light); }
.packaging-option .po-fee { margin-left: auto; font-size: 0.85rem; font-weight: 600; color: var(--charcoal-mid); white-space: nowrap; }
.packaging-note { font-size: 0.78rem; color: var(--brown-light); margin-top: 0.6rem; line-height: 1.6; }

.whatsapp-btn {
  width: 100%;
  padding: 1.1rem;
  background: #25D366; color: var(--white);
  font-family: var(--font-body); font-size: 0.85rem; font-weight: 500;
  letter-spacing: 0.04em; text-transform: uppercase;
  border: none; border-radius: 999px;
  display: flex; align-items: center; justify-content: center; gap: 0.6rem;
  margin-top: 1.5rem; transition: background 0.2s; cursor: pointer;
}
.whatsapp-btn:hover { background: #1da851; }
.checkout-note { font-size: 0.78rem; color: var(--brown-light); text-align: center; margin-top: 0.85rem; line-height: 1.6; }

.checkout-empty {
  text-align: center; padding: 4rem 1.5rem; background: var(--cream); border-radius: 2.75rem;
}
.checkout-empty h2 { margin-bottom: 0.75rem; }
.checkout-empty p { color: var(--brown-light); margin-bottom: 1.75rem; }

/* ── Order info table (order-placed confirmation + PDF) ─── */
.order-info-table { width: 100%; border-collapse: collapse; margin: 0 auto 1.75rem; text-align: left; }
.order-info-table th, .order-info-table td { border-bottom: 1px solid var(--cream-dark); padding: 0.6rem 0.85rem; font-size: 0.9rem; vertical-align: top; }
.order-info-table tr:last-child th, .order-info-table tr:last-child td { border-bottom: none; }
.order-info-table .oit-title { font-family: var(--font-display); font-size: 1.15rem; font-weight: 600; text-align: center; border: none; border-bottom: 1px solid var(--cream-dark); padding: 0.85rem 0; letter-spacing: 0; }
.order-info-table .oit-label { font-size: 0.72rem; font-weight: 600; letter-spacing: 0.06em; text-transform: uppercase; color: var(--brown-light); }
.order-info-table .oit-value { color: var(--charcoal); }
.order-info-table .oit-head-row th { background: var(--cream); font-size: 0.72rem; font-weight: 600; letter-spacing: 0.06em; text-transform: uppercase; color: var(--brown-light); }
.order-info-table .oit-sr { width: 2.75rem; text-align: center; color: var(--brown-light); }
.order-info-table .oit-sum { background: var(--cream); font-weight: 600; color: var(--charcoal-mid); }
.order-info-table .oit-grand-row .oit-label,
.order-info-table .oit-grand-row .oit-value,
.order-info-table .oit-grand { font-weight: 700; font-size: 1.02rem; color: var(--charcoal); }

@media (max-width: 700px) {
  .checkout-form { padding: 1.35rem; border-radius: 1.75rem; }
  .order-summary-box { padding: 1.35rem; position: static; }
  .checkout-empty { border-radius: 2rem; padding: 3rem 1.25rem; }
}

/* ── Toast notification ────────────────────────────────── */
.toast {
  position: fixed;
  bottom: 2rem; left: 50%; transform: translateX(-50%) translateY(4rem);
  background: var(--charcoal);
  color: var(--cream);
  padding: 0.85rem 2rem;
  border-radius: 999px;
  font-size: 0.85rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  z-index: 2000;
  opacity: 0;
  transition: all 0.3s;
  pointer-events: none;
  white-space: nowrap;
}
.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }

/* ── Responsive ────────────────────────────────────────── */
@media (max-width: 1000px) {
  .footer-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 700px) {
  .main-nav { display: none; } /* handled properly in hamburger section below */
  .logo { font-size: 1.5rem; }
  .footer-grid { grid-template-columns: 1fr; gap: 2rem; margin-bottom: 5rem; }
  .section-pad { padding: 2.5rem 0; }
  .cat-header h2 { font-size: 1.5rem; }
  /* Tighten product cards on small screens */
  .card-body { padding: 0.7rem 0.25rem 0.9rem; }
  .card-name { font-size: 1rem; }
  .product-card { padding: 0.5rem 0.5rem 0; border-radius: 1.375rem; }
  .card-img-wrap { border-radius: 1rem; }
  /* Make cart footer scrollable if needed */
  .cart-footer { padding: 1rem 1.25rem; }
  .cart-items { padding: 0.75rem 1.25rem; }
  .cart-item { grid-template-columns: 4rem 1fr auto; gap: 0.75rem; }
  /* Prevent any element from busting viewport width */
  .category-section,
  .product-page,
  .checkout-page { overflow-x: hidden; }
}

/* ── Admin Table ───────────────────────────────────────── */
.admin-page { padding: 3rem 0 5rem; }
.admin-table-wrap { overflow-x: auto; margin-top: 2rem; }
.admin-table {
  width: 100%; border-collapse: collapse;
  font-size: 0.82rem;
  background: var(--white);
  border: 1px solid var(--cream-dark);
}
.admin-table th {
  background: var(--charcoal);
  color: var(--cream);
  padding: 0.85rem 0.75rem;
  text-align: left;
  font-family: var(--font-body);
  font-size: 0.7rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  white-space: nowrap;
}
.admin-table td {
  padding: 0.6rem 0.75rem;
  border-bottom: 1px solid var(--cream-dark);
  vertical-align: middle;
}
.admin-table tr:hover td { background: var(--cream); }
.admin-table input,
.admin-table select,
.admin-table textarea {
  width: 100%;
  border: 1px solid var(--cream-dark);
  padding: 0.35rem 0.5rem;
  font-family: var(--font-body);
  font-size: 0.82rem;
  background: var(--warm-white);
  outline: none;
  min-width: 5rem;
  transition: border-color 0.2s;
}
.admin-table input:focus,
.admin-table select:focus { border-color: var(--terracotta); }
.admin-save-btn {
  background: var(--charcoal); color: var(--cream);
  border: none; padding: 0.55rem 1.25rem;
  font-size: 0.78rem; letter-spacing: 0.1em;
  text-transform: uppercase; cursor: pointer;
  transition: background 0.2s;
  white-space: nowrap;
}
.admin-save-btn:hover { background: var(--terracotta); }

/* ── Scroll animation ──────────────────────────────────── */
.fade-up {
  opacity: 0; transform: translateY(1.5rem);
  transition: opacity 0.6s ease, transform 0.6s ease;
}
.fade-up.visible { opacity: 1; transform: none; }

/* ── Mobile hamburger nav ──────────────────────────────── */
.hamburger {
  display: none;
  flex-direction: column; gap: 0.3125rem; cursor: pointer;
  padding: 0.25rem;
}
.hamburger span {
  width: 1.375rem; height: 2px; background: var(--charcoal);
  display: block; transition: all 0.3s;
}
.mobile-nav {
  display: none;
}
@media (max-width: 700px) {
  /* Hamburger left, logo center, cart right */
  .header-inner {
    display: grid;
    grid-template-columns: 2.5rem 1fr auto auto auto;
    grid-template-areas: none;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1rem;
  }
  /* header-actions contains hamburger + cart: split them */
  .header-actions {
    display: contents; /* children participate directly in header-inner grid */
  }
  .hamburger {
    display: flex;
    grid-column: 1;
    grid-row: 1;
  }
  .logo {
    grid-column: 2;
    grid-row: 1;
    text-align: center;
    font-size: 1.5rem;
  }
  .main-nav { display: none; }
  .search-btn { grid-column: 3; grid-row: 1; }
  .wish-link { grid-column: 4; grid-row: 1; }
  .cart-btn {
    grid-column: 5;
    grid-row: 1;
    padding: 0.4rem;
    white-space: nowrap;
  }

  .mobile-nav {
    position: fixed; inset: 0;
    background: var(--warm-white);
    z-index: 950;
    flex-direction: column;
    align-items: center;
    gap: 1.5rem;
    overflow-y: auto;
    padding: 2rem 1rem;
    max-height: 100vh;
  }
  .mobile-nav.open { display: flex; }
  .mobile-nav a {
    font-size: 1.5rem;
    font-family: var(--font-display);
    color: var(--charcoal);
    letter-spacing: 0.12em;
  }
  /* Expanding sub-list inside the mobile drawer nav */
  .mobile-nav .nav-sub { display: none; width: 100%; }
  .mobile-nav .nav-sub a { display: block; font-size: 1.5rem; font-family: var(--font-display); color: var(--charcoal); letter-spacing: 0.12em; padding: 0.35rem 0; text-align: center; }
  .mobile-nav .nav-sub a:hover { color: var(--charcoal); }
  .mobile-nav-close {
    position: absolute; top: 1.5rem; right: 1.5rem;
    font-size: 2rem; background: none; border: none; cursor: pointer;
    color: var(--charcoal);
  }
}

/* ══════════════════════════════════════════════════════════
   Cart icon — replaces the 🛒 emoji text node on every page
   without editing each page's HTML
   ══════════════════════════════════════════════════════════ */
.cart-btn { font-size: 0; }
.cart-btn::before {
  content: '';
  width: 1.3rem; height: 1.3rem;
  background: currentColor;
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 8h14l-1 12H6L5 8z'/%3E%3Cpath d='M9 8V6a3 3 0 0 1 6 0v2'/%3E%3C/svg%3E") center/contain no-repeat;
          mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 8h14l-1 12H6L5 8z'/%3E%3Cpath d='M9 8V6a3 3 0 0 1 6 0v2'/%3E%3C/svg%3E") center/contain no-repeat;
}
.cart-count { font-size: 0.7rem; }

/* ══════════════════════════════════════════════════════════
   Landing page (index.html)
   ══════════════════════════════════════════════════════════ */
.tag {
  display: inline-block;
  font-size: 0.66rem; letter-spacing: 0.1em; text-transform: uppercase;
  color: var(--terracotta-dark);
  background: var(--blush); border: 1px solid var(--blush-line);
  border-radius: 999px; padding: 0.28rem 0.85rem; margin-bottom: 1.1rem;
}
.lp-section { padding: 5rem 0; }
.lp-section.alt { background: var(--white); }
.lp-head { margin-bottom: 2.5rem; }
.lp-head.center { text-align: center; }
.lp-head.row { display: flex; align-items: flex-end; justify-content: space-between; gap: 1.5rem; flex-wrap: wrap; }
.lp-head h2 { max-width: 16ch; }
.lp-head.center h2 { max-width: none; }

/* Hero */
.hero { padding: 4.5rem 0 3rem; }
.hero-grid { display: grid; grid-template-columns: 1fr 1.15fr; gap: 4rem; align-items: center; }
.hero h1 { margin-bottom: 1.5rem; }
.hero p.lead { color: var(--charcoal-mid); font-size: 1.05rem; line-height: 1.75; max-width: 44ch; margin-bottom: 2rem; }
.hero-cta { display: flex; gap: 0.9rem; flex-wrap: wrap; margin-bottom: 2.75rem; }
.hero-stats { display: flex; align-items: center; gap: 1.75rem; }
.hero-stats .stat b { display: block; font-family: var(--font-display); font-weight: 400; font-size: 1.7rem; color: var(--terracotta); line-height: 1.2; }
.hero-stats .stat span { font-size: 0.78rem; color: var(--brown-light); }
.hero-stats .sep { width: 1px; align-self: stretch; background: var(--cream-dark); }
.hero-img { aspect-ratio: 1.18 / 1; border-radius: var(--radius-lg); overflow: hidden; background: var(--cream); }
.hero-img img { width: 100%; height: 100%; object-fit: cover; }

/* Feature cards */
.features { padding: 1.5rem 0 5rem; }
.feature-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.5rem; align-items: stretch; }
.feature-card { background: var(--cream); border-radius: var(--radius-lg); padding: 1.75rem; }
.feature-icon { width: 2.6rem; height: 2.6rem; border-radius: 50%; background: var(--white); display: grid; place-items: center; margin-bottom: 1.5rem; font-size: 1.1rem; }
.feature-card h3 { font-size: 1.25rem; margin-bottom: 0.5rem; }
.feature-card p { font-size: 0.88rem; color: var(--brown-light); line-height: 1.65; }

/* ── Carousel component ─────────────────────────────────────
   A reusable single-row carousel. Markup:

     <div class="carousel-wrap">
       <button class="carousel-btn carousel-prev">‹</button>
       <div class="carousel-track">…cards…</div>
       <button class="carousel-btn carousel-next">›</button>
     </div>

   Behaviour is attached with MemuCarousel.init(track, prev, next) in ui.js.
   Cards per view step 2 → 3 → 4 on shared thresholds so every row on the
   site changes count at the same width and no card shrinks below ~345px.
   Each card is sized to divide the row exactly, so a card is never cut in
   half. Override --carousel-gap per instance when a row needs more air. */
.carousel-wrap { position: relative; }
.carousel-track {
  --carousel-gap: 1.5rem;
  --carousel-per: 4;                              /* 1550px and wider */
  display: grid;
  grid-template-columns: none;
  grid-auto-flow: column;
  grid-auto-columns: calc((100% - (var(--carousel-per) - 1) * var(--carousel-gap)) / var(--carousel-per));
  gap: var(--carousel-gap);
  align-items: stretch;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scrollbar-width: none;        /* Firefox */
  -ms-overflow-style: none;     /* IE/Edge */
}
.carousel-track::-webkit-scrollbar { display: none; }
.carousel-track > * { scroll-snap-align: start; }
/* Entrance animations (fade-up uses a translateY transform) must not leak
   into the scrollable overflow area of the horizontal track — otherwise the
   track reports a vertical scroll (scrollHeight > clientHeight). */
.carousel-track .fade-up { transform: none; }
@media (max-width: 1549px) { .carousel-track { --carousel-per: 3; } }   /* 3 cards in view */
@media (max-width: 1169px) { .carousel-track { --carousel-per: 2; } }   /* 2 cards in view */
@media (max-width: 700px)  { .carousel-track { --carousel-gap: 1rem; } }

/* Scroll buttons */
.carousel-btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 2.75rem; height: 2.75rem;    /* matches the top hero banner carousel arrows */
  border: 1px solid var(--cream-dark);
  background: var(--warm-white);
  color: var(--charcoal);
  border-radius: 50%;
  display: grid; place-items: center;
  font-size: 1.5rem; line-height: 1;   /* matches the top hero banner carousel arrows */
  cursor: pointer; z-index: 3;
  box-shadow: 0 2px 10px rgba(44,43,41,0.12);
  transition: background 0.2s, color 0.2s, opacity 0.2s;
}
.carousel-btn:hover:not(:disabled) { background: var(--terracotta); color: var(--cream); }
.carousel-btn:disabled { opacity: 0.45; cursor: not-allowed; pointer-events: none; }
.carousel-prev { left: -1rem; }
.carousel-next { right: -1rem; }
.carousel-wrap.no-arrows .carousel-btn { display: none; }

/* Category tiles — the card style used inside a carousel on the home page */
.cat-tile { position: relative; display: block; aspect-ratio: 3 / 4; border-radius: var(--radius-lg); overflow: hidden; background: var(--cream); }
.cat-tile img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.6s ease; }
.cat-tile:hover img { transform: scale(1.05); }
.cat-tile::after { content: ''; position: absolute; inset: 0; background: linear-gradient(to top, rgba(44,43,41,0.35), transparent 45%); }
.cat-pill {
  position: absolute; left: 1rem; right: 1rem; bottom: 1rem; z-index: 2;
  display: flex; align-items: center; justify-content: space-between;
  background: var(--white); border-radius: 999px; padding: 0.8rem 1.25rem;
  font-size: 0.88rem; font-weight: 500;
}
.cat-pill i { font-style: normal; color: var(--terracotta); }

/* Best sellers — product cards need a little more breathing room */
.best-grid { --carousel-gap: 1.75rem; }

/* Maker story */
.story-grid { display: grid; grid-template-columns: 0.9fr 1.1fr; gap: 4.5rem; align-items: center; }
.story-img { aspect-ratio: 0.92 / 1; border-radius: var(--radius-lg); overflow: hidden; }
.story-img img { width: 100%; height: 100%; object-fit: cover; }
.story-text h2 { margin-bottom: 1.5rem; }
.story-text p { color: var(--charcoal-mid); font-size: 0.95rem; line-height: 1.8; margin-bottom: 1rem; max-width: 56ch; }
.story-sign { margin-top: 1.5rem; }
.story-sign b { display: block; font-family: var(--font-display); font-weight: 400; font-size: 1.05rem; }
.story-sign span { font-size: 0.68rem; letter-spacing: 0.08em; text-transform: uppercase; color: var(--terracotta); }

/* Freshly Cast Arrivals + Instagram inspirations — both now ride the shared
   .carousel-track / .carousel-wrap / .carousel-btn component defined above, so they
   inherit the same 2 -> 3 -> 4 column steps and whole-card sizing. */

.arrival { cursor: pointer; }
.arrival .img { aspect-ratio: 0.9 / 1; border-radius: var(--radius-lg); overflow: hidden; background: var(--cream); margin-bottom: 0.9rem; }
.arrival .img img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.5s ease; }
.arrival:hover .img img { transform: scale(1.05); }
.arrival h3 { font-size: 1.1rem; margin-bottom: 0.15rem; }
.arrival .price { font-size: 0.85rem; color: var(--terracotta-dark); font-weight: 500; }

/* Instagram inspirations — square cards, sized by the shared carousel grid */
.insta a { display: block; aspect-ratio: 1; border-radius: var(--radius-md); overflow: hidden; }
.insta img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.5s ease; }
.insta a:hover img { transform: scale(1.05); }

/* Join card */
.join-card { max-width: 48.75rem; margin: 0 auto; background: var(--cream); border-radius: 2.75rem; padding: 3.5rem 2rem; text-align: center; }
.join-card h2 { margin-bottom: 0.9rem; }
.join-card p { color: var(--brown-light); font-size: 0.92rem; max-width: 52ch; margin: 0 auto 1.75rem; }

@media (max-width: 1000px) {
  .hero-grid, .story-grid { grid-template-columns: 1fr; gap: 2.5rem; }
}
@media (max-width: 700px) {
  .lp-section { padding: 3rem 0; }
  .hero { padding: 2.5rem 0 2rem; }
  .feature-grid { grid-template-columns: 1fr; }
  .cat-pill { left: 0.5rem; right: 0.5rem; bottom: 0.5rem; padding: 0.6rem 0.9rem; font-size: 0.78rem; }
  .cat-prev { left: -0.6rem; }
  .cat-next { right: -0.6rem; }
  .join-card { border-radius: 2rem; padding: 2.5rem 1.25rem; }
}

/* Product page: shown when Add to Cart is pressed with no variation chosen */
.variation-selector.needs-choice { outline: 2px solid var(--terracotta); outline-offset: 0.375rem; border-radius: 0.875rem; }

/* ══════════════════════════════════════════════════════════
   Product card extras + quick-add popup
   ══════════════════════════════════════════════════════════ */
.new-badge {
  position: absolute; bottom: 0.75rem; left: 0.75rem; z-index: 5;
  background: var(--charcoal); color: var(--cream);
  font-size: 0.62rem; letter-spacing: 0.08em; text-transform: uppercase; font-weight: 600;
  padding: 0.28rem 0.7rem; border-radius: 999px;
}
.card-material { font-size: 0.78rem; color: var(--brown-light); margin-bottom: 0.3rem; }
.card-foot { display: flex; align-items: center; justify-content: space-between; gap: 0.75rem; }
.card-add {
  flex: 0 0 auto; width: 2.5rem; height: 2.5rem; border-radius: 50%;
  display: grid; place-items: center;
  background: var(--cream); color: var(--charcoal); border: none;
  transition: background 0.2s, color 0.2s;
}
.card-add:hover { background: var(--charcoal); color: var(--cream); }

body.qa-lock { overflow: hidden; }
.qa-overlay {
  position: fixed; inset: 0; z-index: 1500;
  display: flex; align-items: center; justify-content: center; padding: 1rem;
  background: rgba(44,43,41,0.5);
  opacity: 0; pointer-events: none; transition: opacity 0.25s;
}
.qa-overlay.open { opacity: 1; pointer-events: all; }
.qa-modal {
  position: relative; display: grid; grid-template-columns: minmax(0,1.1fr) minmax(0,1fr); gap: 2rem;
  width: min(54rem, 100%); max-height: 92vh; overflow-y: auto;
  background: var(--white); border-radius: var(--radius-lg); padding: 1.5rem;
  transform: translateY(1rem); transition: transform 0.25s;
}
.qa-overlay.open .qa-modal { transform: none; }
.qa-close {
  position: absolute; top: 0.9rem; right: 0.9rem; z-index: 2;
  width: 2.25rem; height: 2.25rem; border-radius: 50%; border: none;
  background: var(--cream); color: var(--charcoal); font-size: 1.4rem; line-height: 1;
}
.qa-close:hover { background: var(--charcoal); color: var(--cream); }
.qa-main { aspect-ratio: 1; border-radius: var(--radius-md); overflow: hidden; background: var(--cream); margin-bottom: 0.75rem; }
.qa-main img { width: 100%; height: 100%; object-fit: cover; }
.qa-thumbs { display: grid; grid-template-columns: repeat(4, minmax(0,1fr)); gap: 0.5rem; }
.qa-thumbs img { aspect-ratio: 1; width: 100%; object-fit: cover; border-radius: 0.75rem; background: var(--cream); cursor: pointer; border: 2px solid transparent; opacity: 0.7; transition: opacity 0.2s, border-color 0.2s; }
.qa-thumbs img.active, .qa-thumbs img:hover { opacity: 1; border-color: var(--charcoal); }
.qa-info { display: flex; flex-direction: column; justify-content: center; padding: 1rem 0.5rem 0.5rem 0; }
.qa-name { margin-bottom: 0.6rem; padding-right: 2.5rem; }
.qa-price { margin-bottom: 1.5rem; }
.qa-price .price-sale { font-size: 1.4rem; }
.qa-label { font-size: 0.82rem; color: var(--brown-light); margin-bottom: 0.7rem; }
.qa-label strong { color: var(--charcoal); font-weight: 500; }
.qa-variants { display: flex; flex-wrap: wrap; gap: 0.5rem; margin-bottom: 1.75rem; }
.qa-variants.needs-choice { outline: 2px solid var(--terracotta); outline-offset: 0.375rem; border-radius: 0.875rem; }
.qa-add { width: 100%; justify-content: center; }

@media (max-width: 700px) {
  .qa-overlay { align-items: flex-end; padding: 0; }
  .qa-modal { grid-template-columns: minmax(0,1fr); gap: 1rem; box-sizing: border-box; width: 100%; max-height: 92vh; border-radius: 1.75rem 1.75rem 0 0; padding: 1.1rem; }
  .qa-info { padding: 0; }
  .qa-main { aspect-ratio: 1 / 0.8; margin-bottom: 0.5rem; }
}

.qa-gallery, .qa-info { min-width: 0; }
.qa-modal { box-sizing: border-box; }

/* ══════════════════════════════════════════════════════════
   Hero carousel
   ══════════════════════════════════════════════════════════ */
.hero-carousel { position: relative; touch-action: pan-y; user-select: none; }
.hc-track { display: flex; height: 100%; transition: transform 0.6s cubic-bezier(.65,0,.35,1); }
.hc-slide { flex: 0 0 100%; height: 100%; }
.hc-btn {
  position: absolute; top: 50%; transform: translateY(-50%); z-index: 3;
  width: 2.75rem; height: 2.75rem; border-radius: 50%; border: none;
  background: rgba(255,255,255,0.88); color: var(--charcoal);
  font-size: 1.5rem; line-height: 1; display: grid; place-items: center;
  box-shadow: var(--shadow); opacity: 0; transition: opacity 0.25s, background 0.2s;
}
.hc-prev { left: 1rem; }
.hc-next { right: 1rem; }
.hero-carousel:hover .hc-btn, .hc-btn:focus-visible { opacity: 1; }
.hc-btn:hover { background: var(--white); }
.hc-dots {
  position: absolute; left: 50%; bottom: 1rem; transform: translateX(-50%); z-index: 3;
  display: flex; gap: 0.45rem; padding: 0.4rem 0.65rem; border-radius: 999px;
  background: rgba(44,43,41,0.35); backdrop-filter: blur(4px);
}
.hc-dots button {
  width: 0.5rem; height: 0.5rem; padding: 0; border: none; border-radius: 999px;
  background: rgba(255,255,255,0.6); transition: width 0.3s, background 0.3s;
}
.hc-dots button.active { width: 1.4rem; background: var(--white); }
.hero-carousel.single .hc-btn, .hero-carousel.single .hc-dots { display: none; }
@media (hover: none) { .hc-btn { opacity: 1; width: 2.25rem; height: 2.25rem; font-size: 1.25rem; } }
@media (prefers-reduced-motion: reduce) { .hc-track { transition: none; } }

/* ══════════════════════════════════════════════════════════
   Shop & collection pages
   ══════════════════════════════════════════════════════════ */
.collection { padding-top: 2rem; padding-bottom: 5rem; }
.breadcrumb { font-size: 0.78rem; color: var(--brown-light); margin-bottom: 1.25rem; }
.breadcrumb a { color: var(--brown-light); transition: color 0.2s; }
.breadcrumb a:hover { color: var(--charcoal); }
.breadcrumb span { color: var(--charcoal); }

.page-banner {
  background: var(--cream); border-radius: 2.75rem;
  padding: 3.5rem 2rem; text-align: center; margin-bottom: 1.75rem;
}
.page-banner h1 { margin-bottom: 0.9rem; }
.page-banner p { color: var(--charcoal-mid); font-size: 0.98rem; line-height: 1.75; max-width: 56ch; margin: 0 auto; }

.chips { display: flex; flex-wrap: wrap; gap: 0.55rem; margin-bottom: 2rem; }
.chip {
  font-size: 0.85rem; color: var(--charcoal-mid); background: var(--white);
  border: 1px solid var(--cream-dark); border-radius: 999px; padding: 0.5rem 1.1rem;
  transition: all 0.2s; white-space: nowrap;
}
.chip:hover { border-color: var(--charcoal); color: var(--charcoal); }
.chip.active { background: var(--charcoal); border-color: var(--charcoal); color: var(--cream); }

.toolbar {
  display: flex; align-items: center; justify-content: space-between; gap: 1rem; flex-wrap: wrap;
  margin-bottom: 1.75rem;
}
.toolbar .count { font-size: 0.88rem; color: var(--brown-light); }
.sort { display: flex; align-items: center; gap: 0.75rem; font-size: 0.85rem; color: var(--brown-light); }
.sort-select {
  font-family: var(--font-body); font-size: 0.85rem; color: var(--charcoal);
  background: var(--white); border: 1px solid var(--cream-dark); border-radius: 999px;
  padding: 0.55rem 2.25rem 0.55rem 1.1rem; outline: none; cursor: pointer;
  appearance: none; -webkit-appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%232C2B29' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 0.85rem center; background-size: 0.9rem;
}
.sort-select:hover, .sort-select:focus { border-color: var(--charcoal); }
.empty-state {
  display: none; text-align: center; padding: 4rem 1rem; color: var(--brown-light);
  background: var(--cream); border-radius: var(--radius-lg);
}
@media (max-width: 700px) {
  .page-banner { border-radius: 2rem; padding: 2.25rem 1.25rem; }
  .chips { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; margin-left: -1.25rem; margin-right: -1.25rem; padding: 0 1.25rem 0.25rem; }
  .chips::-webkit-scrollbar { display: none; }
  .toolbar { margin-bottom: 1.25rem; }
}

/* ══════════════════════════════════════════════════════════
   FAQ page
   ══════════════════════════════════════════════════════════ */
.faq-page { padding: 2rem 0 5rem; }
.faq-list { max-width: 56rem; margin: 0 auto 3.5rem; display: flex; flex-direction: column; gap: 0.85rem; }
.faq-item {
  background: var(--white); border: 1px solid var(--cream-dark); border-radius: 1.5rem;
  transition: background 0.3s, border-color 0.3s;
}
.faq-item.open { background: var(--cream); border-color: transparent; }
.faq-question {
  display: flex; align-items: center; justify-content: space-between; gap: 1rem;
  width: 100%; padding: 1.25rem 1.5rem; background: none; border: none; cursor: pointer;
  text-align: left; font-family: var(--font-display); font-size: 1.1rem; line-height: 1.35; color: var(--charcoal);
}
.faq-question:focus-visible { outline: 2px solid var(--charcoal); outline-offset: -2px; border-radius: 1.5rem; }
.faq-icon {
  flex: 0 0 auto; width: 2.1rem; height: 2.1rem; border-radius: 50%;
  display: grid; place-items: center; font-family: var(--font-body); font-size: 1.2rem; line-height: 1;
  background: var(--cream); color: var(--charcoal);
  transition: transform 0.3s, background 0.3s, color 0.3s;
}
.faq-item.open .faq-icon { background: var(--charcoal); color: var(--cream); transform: rotate(45deg); }
/* Height animates from 0 to the answer's real height, however long it is */
.faq-answer { display: grid; grid-template-rows: 0fr; transition: grid-template-rows 0.35s ease; }
.faq-answer.active { grid-template-rows: 1fr; }
.faq-content { overflow: hidden; min-height: 0; }
.faq-content p { padding: 0 1.5rem 1.4rem; color: var(--charcoal-mid); font-size: 0.95rem; line-height: 1.8; max-width: 62ch; }
@media (max-width: 700px) {
  .faq-item { border-radius: 1.25rem; }
  .faq-question { padding: 1.1rem; font-size: 1rem; }
  .faq-content p { padding: 0 1.1rem 1.2rem; }
}
@media (prefers-reduced-motion: reduce) { .faq-answer, .faq-icon { transition: none; } }

/* ══════════════════════════════════════════════════════════
   Search (header button, popup, results page)
   ══════════════════════════════════════════════════════════ */
.search-btn {
  background: none; border: none; color: var(--charcoal); padding: 0.4rem;
  display: grid; place-items: center; cursor: pointer; transition: color 0.2s;
}
/* The search glyph only fills ~69% of its viewBox, so it is drawn slightly
   larger than the wishlist/cart icons to look the same optical size. */
.search-btn svg { width: 1.55rem; height: 1.55rem; }
.search-btn:hover { color: var(--terracotta-dark); }

body.search-lock { overflow: hidden; }
.search-overlay {
  position: fixed; inset: 0; z-index: 1600;
  background: rgba(44,43,41,0.5);
  display: flex; align-items: flex-start; justify-content: center; padding: 6vh 1rem 1rem;
  opacity: 0; pointer-events: none; transition: opacity 0.2s;
}
.search-overlay.open { opacity: 1; pointer-events: all; }
.search-panel {
  width: min(42rem, 100%); max-height: 86vh; display: flex; flex-direction: column;
  background: var(--white); border-radius: var(--radius-lg); overflow: hidden;
  box-shadow: 0 1.5rem 4rem rgba(44,43,41,0.25);
  transform: translateY(-0.75rem); transition: transform 0.25s;
}
.search-overlay.open .search-panel { transform: none; }
.search-bar {
  display: flex; align-items: center; gap: 0.85rem;
  padding: 1rem 1.25rem; border-bottom: 1px solid var(--cream-dark); color: var(--brown-light);
}
.search-bar input {
  flex: 1; min-width: 0; border: none; outline: none; background: none;
  font-family: var(--font-body); font-size: 1.05rem; color: var(--charcoal);
  -webkit-appearance: none; appearance: none;
}
.search-bar input::-webkit-search-cancel-button { display: none; }
.search-close {
  flex: 0 0 auto; width: 2.25rem; height: 2.25rem; border-radius: 50%; border: none;
  background: var(--cream); color: var(--charcoal); font-size: 1.4rem; line-height: 1; cursor: pointer;
}
.search-close:hover { background: var(--charcoal); color: var(--cream); }
.search-results { overflow-y: auto; padding: 0.75rem; }
.sr-hint { font-size: 0.85rem; color: var(--brown-light); padding: 0.5rem 0.65rem 0.85rem; }
.search-results .chips { margin: 0 0 0.5rem; padding: 0 0.65rem; }
.sr-row {
  display: flex; align-items: center; gap: 0.9rem; padding: 0.6rem 0.65rem;
  border-radius: 1rem; transition: background 0.15s;
}
.sr-row:hover, .sr-row.active { background: var(--cream); }
.sr-row img { flex: 0 0 auto; width: 3.5rem; height: 3.5rem; border-radius: 0.85rem; object-fit: cover; background: var(--cream); }
.sr-text { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 0.1rem; }
.sr-name { font-family: var(--font-display); font-size: 1.05rem; color: var(--charcoal); }
.sr-meta { font-size: 0.78rem; color: var(--brown-light); }
.sr-price { flex: 0 0 auto; font-size: 0.92rem; font-weight: 500; white-space: nowrap; }
.sr-all {
  display: block; margin-top: 0.5rem; padding: 0.85rem 0.65rem; text-align: center;
  font-size: 0.85rem; color: var(--terracotta-dark); border-top: 1px solid var(--cream-dark);
}
.sr-all:hover { color: var(--charcoal); }

/* Results page */
.search-banner .search-form {
  display: flex; gap: 0.6rem; max-width: 34rem; margin: 1.5rem auto 0;
}
.search-banner .search-form input {
  flex: 1; min-width: 0; padding: 0.85rem 1.35rem; border: 1.5px solid transparent; border-radius: 999px;
  background: var(--white); font-family: var(--font-body); font-size: 0.95rem; color: var(--charcoal); outline: none;
}
.search-banner .search-form input:focus { border-color: var(--charcoal); }
.search-empty-msg { margin-bottom: 1.25rem; }
@media (max-width: 700px) {
  .search-overlay { padding: 0.75rem; }
  .search-panel { max-height: 90vh; border-radius: 1.5rem; }
  .search-banner .search-form { flex-direction: column; }
}

/* ══════════════════════════════════════════════════════════
   Wishlist, WhatsApp button, sticky Add to Cart
   ══════════════════════════════════════════════════════════ */
.wish-btn {
  position: absolute; top: 0.75rem; right: 0.75rem; z-index: 6;
  width: 2.25rem; height: 2.25rem; border-radius: 50%; border: none; padding: 0;
  display: grid; place-items: center; cursor: pointer;
  background: rgba(255,255,255,0.92); color: var(--charcoal); box-shadow: var(--shadow);
  transition: transform 0.2s, color 0.2s;
}
.wish-btn svg { width: 1.1rem; height: 1.1rem; fill: none; stroke: currentColor; stroke-width: 1.8; transition: fill 0.2s; }
.wish-btn:hover { transform: scale(1.1); }
.wish-btn.on { color: var(--terracotta-dark); }
.wish-btn.on svg { fill: currentColor; }
.product-gallery-main .wish-btn { width: 2.75rem; height: 2.75rem; top: 1rem; right: 1rem; }
.product-gallery-main .wish-btn svg { width: 1.3rem; height: 1.3rem; }

.wish-link {
  position: relative; display: grid; place-items: center; padding: 0.4rem;
  color: var(--charcoal); transition: color 0.2s;
}
.wish-link:hover { color: var(--terracotta-dark); }
.wish-link svg { width: 1.3rem; height: 1.3rem; fill: none; stroke: currentColor; stroke-width: 1.8; }
.wish-count {
  position: absolute; top: -0.05rem; right: -0.2rem; min-width: 1rem; height: 1rem; padding: 0 0.25rem;
  border-radius: 999px; background: var(--terracotta-dark); color: var(--white);
  font-size: 0.62rem; font-weight: 600; display: none; place-items: center;
}
.wish-count.has { display: grid; }

.wa-float {
  position: fixed; right: 1.25rem; bottom: 1.25rem; z-index: 850;
  width: 3.5rem; height: 3.5rem; border-radius: 50%;
  background: #25D366; color: var(--white);
  display: grid; place-items: center;
  box-shadow: 0 0.5rem 1.5rem rgba(37,211,102,0.35);
  transition: transform 0.2s, bottom 0.3s;
}
.wa-float:hover { transform: scale(1.08); }
body.sticky-atc-on .wa-float { bottom: 5.75rem; }   /* lift above the sticky Add to Cart bar */

.ask-btn {
  display: flex; align-items: center; justify-content: center; gap: 0.6rem;
  width: 100%; box-sizing: border-box; padding: 0.9rem 1rem; margin-bottom: 1.5rem;
  background: var(--white); border: 1.5px solid var(--cream-dark); border-radius: 999px;
  font-size: 0.85rem; color: var(--charcoal); transition: border-color 0.2s;
}
.ask-btn:hover { border-color: var(--charcoal); }
.ask-btn svg { width: 1.2rem; height: 1.2rem; color: #25D366; }

.sticky-atc { display: none; }
@media (max-width: 860px) {
  .sticky-atc {
    display: flex; align-items: center; gap: 0.85rem;
    position: fixed; left: 0; right: 0; bottom: 0; z-index: 880;
    padding: 0.75rem 1rem calc(0.75rem + env(safe-area-inset-bottom, 0px));
    background: rgba(255,255,255,0.97); border-top: 1px solid var(--cream-dark);
    box-shadow: 0 -0.5rem 1.5rem rgba(44,43,41,0.08);
    transform: translateY(100%); visibility: hidden;
    transition: transform 0.3s ease, visibility 0s linear 0.3s;
  }
  .sticky-atc.show { transform: none; visibility: visible; transition: transform 0.3s ease; }
  .sticky-atc-info { flex: 1; min-width: 0; display: flex; flex-direction: column; }
  .sticky-atc-name { font-size: 0.78rem; color: var(--brown-light); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .sticky-atc-price { font-size: 1.15rem; font-weight: 500; color: var(--charcoal); }
  .sticky-atc-btn {
    flex: 0 0 auto; padding: 0.9rem 1.5rem; border-radius: 999px; border: 1.5px solid var(--charcoal);
    background: var(--charcoal); color: var(--cream); cursor: pointer;
    font-family: var(--font-body); font-size: 0.8rem; font-weight: 500; letter-spacing: 0.04em; text-transform: uppercase;
  }
  .wa-float { right: 1rem; bottom: 1rem; width: 3.25rem; height: 3.25rem; }
  body.has-sticky-atc { padding-bottom: 4.5rem; }   /* keeps the footer's last lines clear of the bar */
}
@media (prefers-reduced-motion: reduce) { .sticky-atc, .wa-float { transition: none; } }

.link-btn {
  background: none; border: none; cursor: pointer; font-size: 0.85rem; color: var(--brown-light);
  text-decoration: underline; text-underline-offset: 3px; transition: color 0.2s;
}
.link-btn:hover { color: var(--terracotta-dark); }

/* ══════════════════════════════════════════════════════════
   Photo viewer, stock labels, recently viewed, saved details
   ══════════════════════════════════════════════════════════ */

/* ── Photo viewer (lightbox) ───────────────────────────── */
body.lb-lock { overflow: hidden; }
.lb-overlay {
  position: fixed; inset: 0; z-index: 1700;
  background: rgba(20,19,18,0.98); color: #fff;
  overscroll-behavior: contain;
}
.lb-top {
  position: absolute; top: 0; left: 0; right: 0; z-index: 3;
  display: flex; align-items: center; justify-content: space-between;
  padding: 0.9rem 1.1rem; pointer-events: none;
}
.lb-top > * { pointer-events: auto; }
.lb-count { font-size: 0.85rem; letter-spacing: 0.08em; color: rgba(255,255,255,0.75); }
.lb-btn {
  border: none; border-radius: 50%; cursor: pointer; line-height: 1;
  background: rgba(255,255,255,0.14); color: #fff;
  display: grid; place-items: center; transition: background 0.2s;
}
.lb-btn:hover { background: rgba(255,255,255,0.28); }
.lb-btn:focus-visible { outline: 2px solid #fff; outline-offset: 2px; }
.lb-close { width: 2.75rem; height: 2.75rem; font-size: 1.8rem; }
.lb-nav { position: absolute; top: 50%; transform: translateY(-50%); z-index: 3; width: 3rem; height: 3rem; font-size: 1.8rem; }
.lb-prev { left: 1rem; }
.lb-next { right: 1rem; }
.lb-stage {
  position: absolute; inset: 0; box-sizing: border-box; padding: 3.75rem 1rem 1.5rem;
  display: flex; align-items: center; justify-content: center;
  overflow: hidden; touch-action: none; cursor: zoom-in; user-select: none;
}
.lb-stage.zoomed { cursor: grab; }
.lb-img {
  max-width: 100%; max-height: 100%; object-fit: contain;
  transform-origin: center; will-change: transform;
  -webkit-user-drag: none; user-select: none; border-radius: 0.5rem;
}
.lb-hint {
  position: absolute; left: 50%; bottom: 1.1rem; transform: translateX(-50%); z-index: 3;
  padding: 0.45rem 1rem; border-radius: 999px; background: rgba(255,255,255,0.14);
  font-size: 0.75rem; color: rgba(255,255,255,0.85); white-space: nowrap; pointer-events: none;
  animation: lb-hint-fade 4.5s ease forwards;
}
@keyframes lb-hint-fade { 0%, 70% { opacity: 1; } 100% { opacity: 0; } }
@media (max-width: 700px) {
  .lb-nav { width: 2.5rem; height: 2.5rem; font-size: 1.5rem; }
  .lb-prev { left: 0.5rem; } .lb-next { right: 0.5rem; }
  .lb-hint { white-space: normal; text-align: center; width: max-content; max-width: 90%; }
}
@media (prefers-reduced-motion: reduce) { .lb-hint { animation: none; opacity: 0.85; } }

/* magnifier on the product photo + pointer cue */
.product-gallery-main { cursor: zoom-in; }
.zoom-btn {
  position: absolute; right: 1rem; bottom: 1rem; z-index: 6;
  width: 2.75rem; height: 2.75rem; border-radius: 50%; border: none; padding: 0; cursor: pointer;
  display: grid; place-items: center; background: rgba(255,255,255,0.92); color: var(--charcoal);
  box-shadow: var(--shadow); transition: transform 0.2s;
}
.zoom-btn:hover { transform: scale(1.08); }
.zoom-btn svg { width: 1.3rem; height: 1.3rem; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; }

/* ── Stock labels ──────────────────────────────────────── */
.sale-badge.stock-out { background: var(--charcoal); color: var(--cream); }
.product-card.is-soldout .card-img-wrap img { opacity: 0.5; filter: grayscale(0.4); }
.product-card.is-soldout .price-sale { color: var(--brown-light); }
.card-stock { font-size: 0.75rem; font-weight: 500; color: var(--terracotta-dark); margin: -0.2rem 0 0.45rem; }
.card-add:disabled { opacity: 0.35; cursor: not-allowed; background: var(--cream); color: var(--charcoal); }
.card-add:disabled:hover { background: var(--cream); color: var(--charcoal); }
.qa-stock { font-size: 0.82rem; font-weight: 500; color: var(--terracotta-dark); margin: -1rem 0 1.25rem; }
.qa-add:disabled { opacity: 0.45; cursor: not-allowed; }
.pi-stock { font-size: 0.85rem; font-weight: 500; color: var(--terracotta-dark); margin: -0.5rem 0 1.25rem; }
.atc-btn:disabled, .atc-btn.soldout { background: var(--cream-dark); border-color: var(--cream-dark); color: var(--brown-light); cursor: not-allowed; }
.atc-btn:disabled:hover { background: var(--cream-dark); border-color: var(--cream-dark); color: var(--brown-light); }
.qty-wrap:has(input:disabled) { opacity: 0.45; }
.sticky-atc-btn:disabled { background: var(--cream-dark); border-color: var(--cream-dark); color: var(--brown-light); cursor: not-allowed; }
.cart-item-warn { font-size: 0.75rem; font-weight: 500; color: var(--terracotta-dark); margin: -0.35rem 0 0.55rem; }
.cart-item-qty button:disabled { opacity: 0.3; cursor: not-allowed; }
.cart-item-qty button:disabled:hover { background: none; }
.cart-problem { font-size: 0.8rem; color: var(--terracotta-dark); text-align: center; margin-bottom: 0.75rem; }
.checkout-btn.is-disabled { pointer-events: none; opacity: 0.4; }

/* ── Recently viewed (cart drawer strip) ───────────────── */
.cart-recent { margin-top: 1.25rem; padding-top: 1.25rem; border-top: 1px solid var(--cream-dark); }
.cart-recent h5 { font-family: var(--font-body); font-size: 0.7rem; font-weight: 500; letter-spacing: 0.14em; text-transform: uppercase; color: var(--brown-light); margin-bottom: 0.85rem; }
.cart-recent-row { display: flex; gap: 0.75rem; overflow-x: auto; scrollbar-width: none; padding-bottom: 0.25rem; }
.cart-recent-row::-webkit-scrollbar { display: none; }
.cart-recent-item { flex: 0 0 6.25rem; display: flex; flex-direction: column; gap: 0.3rem; }
.cart-recent-item img { width: 100%; aspect-ratio: 1; object-fit: cover; border-radius: 0.9rem; background: var(--cream); }
.cr-name { font-family: var(--font-display); font-size: 0.82rem; line-height: 1.25; color: var(--charcoal); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.cr-price { font-size: 0.75rem; color: var(--brown-light); }
.cart-empty + .cart-recent { margin-top: 0.5rem; }

/* ── Checkout: remember details ────────────────────────── */
.remember-row { display: flex; align-items: center; justify-content: space-between; gap: 1rem; flex-wrap: wrap; margin-top: 0.5rem; }
.remember { display: flex; align-items: flex-start; gap: 0.6rem; font-size: 0.82rem; color: var(--charcoal-mid); cursor: pointer; line-height: 1.5; }
.remember input { width: 1.1rem; height: 1.1rem; margin-top: 0.15rem; accent-color: var(--charcoal); flex: 0 0 auto; }

/* Equal-height cards: the price row always sits at the bottom, even when one card has an extra "Only N left" line */
.product-card { display: flex; flex-direction: column; }
.product-card .card-body { flex: 1; display: flex; flex-direction: column; }
.product-card .card-foot { margin-top: auto; }

/* ── App: offline notice + install link ───────────────── */
.offline-bar {
  position: fixed; top: 0; left: 0; right: 0; z-index: 2100;
  background: var(--charcoal); color: var(--cream); text-align: center;
  font-size: 0.8rem; padding: 0.55rem 1rem;
}
.footer-bottom { display: flex; align-items: center; justify-content: space-between; gap: 1rem; flex-wrap: wrap; }
.footer-bottom .link-btn { color: var(--sand-light); }
.footer-bottom .link-btn:hover { color: var(--white); }

/* ── Search & AI visibility: real links on cards, "About" section ── */
a.card-name { display: block; }
a.card-name:hover { color: var(--terracotta-dark); }
.arrival h3 a { color: inherit; }
.arrival h3 a:hover { color: var(--terracotta-dark); }

.product-about { background: var(--white); }
.about-grid { display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr); gap: 3rem; align-items: start; }
.about-text h2 { margin-bottom: 1.25rem; }
.about-text p { color: var(--charcoal-mid); line-height: 1.85; margin-bottom: 1rem; max-width: 62ch; }
.about-facts { background: var(--cream); border-radius: var(--radius-lg); padding: 0.75rem 1.5rem; margin: 0; }
.about-facts > div { display: flex; justify-content: space-between; gap: 1rem; padding: 0.8rem 0; border-bottom: 1px solid rgba(44,43,41,0.08); font-size: 0.9rem; }
.about-facts > div:last-child { border-bottom: none; }
.about-facts dt { color: var(--brown-light); font-size: 0.78rem; flex: 0 0 30%; }
.about-facts dd { margin: 0; flex: 1; word-break: break-word; }
@media (max-width: 860px) { .about-grid { grid-template-columns: minmax(0, 1fr); gap: 1.5rem; } }

/* ══════════════════════════════════════════════════════════
   Blog
   ══════════════════════════════════════════════════════════ */
.blog-page { padding: 2rem 0 5rem; }
.blog-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1.75rem; }
@media (max-width: 1000px) { .blog-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 640px)  { .blog-grid { grid-template-columns: minmax(0, 1fr); gap: 1.25rem; } }

.blog-card {
  background: var(--white); border: 1px solid var(--cream-dark); border-radius: var(--radius-lg);
  overflow: hidden; display: flex; flex-direction: column; transition: box-shadow 0.3s, transform 0.3s;
}
.blog-card:hover { box-shadow: var(--shadow-hover); transform: translateY(-0.25rem); }
.blog-card-img { display: block; aspect-ratio: 16 / 10; background: var(--cream); overflow: hidden; }
.blog-card-img img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.5s ease; }
.blog-card:hover .blog-card-img img { transform: scale(1.04); }
.blog-card-img.noimg { display: grid; place-items: center; font-family: var(--font-display); font-size: 1.6rem; color: var(--terracotta-dark); }
.blog-card-body { padding: 1.25rem 1.4rem 1.5rem; display: flex; flex-direction: column; gap: 0.6rem; flex: 1; align-items: flex-start; }
.blog-card-body .tag { margin-bottom: 0; }
.blog-card h3 { font-size: 1.3rem; line-height: 1.25; }
.blog-card h3 a { color: inherit; }
.blog-card h3 a:hover { color: var(--terracotta-dark); }
.blog-card p { color: var(--charcoal-mid); font-size: 0.9rem; line-height: 1.7; }
.blog-card-meta { margin-top: auto; padding-top: 0.4rem; font-size: 0.78rem; color: var(--brown-light); }

/* A post */
.post { max-width: 46rem; margin: 0 auto; }
.post-tags { display: flex; gap: 0.5rem; flex-wrap: wrap; margin-bottom: 0.9rem; }
.post-tags .tag { margin-bottom: 0; }
.post-head h1 { font-size: clamp(2rem, 4.4vw, 3.1rem); line-height: 1.12; margin-bottom: 1rem; }
.post-meta { color: var(--brown-light); font-size: 0.85rem; margin-bottom: 1.75rem; }
.post-hero { margin: 0 0 2.25rem; border-radius: var(--radius-lg); overflow: hidden; aspect-ratio: 16 / 9; background: var(--cream); }
.post-hero img { width: 100%; height: 100%; object-fit: cover; }

.post-toc { background: var(--cream); border-radius: var(--radius-md); padding: 1.1rem 1.4rem; margin-bottom: 2rem; font-size: 0.9rem; }
.post-toc strong { display: block; font-size: 0.72rem; letter-spacing: 0.12em; text-transform: uppercase; color: var(--brown-light); margin-bottom: 0.5rem; font-weight: 500; }
.post-toc ol { margin: 0; padding-left: 1.2rem; list-style: decimal; }
.post-toc li { padding: 0.15rem 0; }
.post-toc a:hover { color: var(--terracotta-dark); }

.post-body { font-size: 1.05rem; line-height: 1.9; color: var(--charcoal-mid); }
.post-body > :first-child { margin-top: 0; }
.post-body h2 { font-size: clamp(1.5rem, 2.6vw, 1.9rem); margin: 2.5rem 0 1rem; color: var(--charcoal); scroll-margin-top: 9rem; }
.post-body h3 { font-size: 1.35rem; margin: 2rem 0 0.75rem; color: var(--charcoal); scroll-margin-top: 9rem; }
.post-body h4 { font-size: 1.1rem; margin: 1.5rem 0 0.6rem; color: var(--charcoal); }
.post-body p { margin: 0 0 1.25rem; }
.post-body a { color: var(--terracotta-dark); text-decoration: underline; text-underline-offset: 3px; }
.post-body a:hover { color: var(--charcoal); }
.post-body ul, .post-body ol { margin: 0 0 1.25rem; padding-left: 1.5rem; }
.post-body ul { list-style: disc; }
.post-body ol { list-style: decimal; }
.post-body li { padding: 0.2rem 0; }
.post-body blockquote { margin: 2rem 0; padding: 1.25rem 1.5rem; background: var(--cream); border-radius: var(--radius-md); }
.post-body blockquote p { margin: 0; font-family: var(--font-display); font-size: 1.3rem; line-height: 1.5; color: var(--charcoal); }
.post-body figure { margin: 2rem 0; }
.post-body figure img, .post-body p img { width: 100%; height: auto; border-radius: var(--radius-md); }
.post-body figcaption { text-align: center; font-size: 0.82rem; color: var(--brown-light); margin-top: 0.6rem; }
.post-body hr { border: none; border-top: 1px solid var(--cream-dark); margin: 2.5rem 0; }
.post-body code { background: var(--cream); padding: 0.1rem 0.4rem; border-radius: 0.4rem; font-size: 0.9em; }
.post-body strong { color: var(--charcoal); font-weight: 600; }

.post-faq { margin-top: 3rem; }
.post-faq h2 { font-size: 1.6rem; margin-bottom: 1rem; }
.post-faq details { background: var(--white); border: 1px solid var(--cream-dark); border-radius: 1.25rem; margin-bottom: 0.7rem; }
.post-faq summary { cursor: pointer; padding: 1rem 1.25rem; font-family: var(--font-display); font-size: 1.05rem; list-style: none; }
.post-faq summary::-webkit-details-marker { display: none; }
.post-faq summary::after { content: '+'; float: right; font-family: var(--font-body); }
.post-faq details[open] { background: var(--cream); border-color: transparent; }
.post-faq details[open] summary::after { content: '\2212'; }
.post-faq details p { padding: 0 1.25rem 1.1rem; color: var(--charcoal-mid); line-height: 1.75; }

.post-foot { display: flex; align-items: center; justify-content: space-between; gap: 1rem; flex-wrap: wrap; margin-top: 3rem; padding-top: 1.5rem; border-top: 1px solid var(--cream-dark); }
.post-back { font-size: 0.88rem; color: var(--brown-light); }
.post-back:hover { color: var(--charcoal); }

.post-shop, .post-related { margin-top: 4.5rem; }
.post-shop h2, .post-related h2 { font-size: clamp(1.6rem, 3vw, 2.1rem); text-align: center; margin-bottom: 2rem; }
@media (max-width: 700px) { .post-body { font-size: 1rem; } .post-shop, .post-related { margin-top: 3rem; } }
