/* ===================== TOKENS ===================== */
:root {
  --cream:        #fbf4ec;
  --cream-nav:    #f5ebe0;
  --cream-card:   #f6ede3;
  --brown:        #3a2318;
  --brown-deep:   #2c1810;
  --yellow:       #fcd20a;
  --yellow-deep:  #f5c800;
  --text-muted:   #9a8f86;
  --purple:       #d9b6f0;
  --orange:       #f0a23b;
  --green:        #2f8f4e;
  --blue:         #3aa6d8;
  --display: "Alfa Slab One", "Cooper Black", Georgia, serif;
  --body: "Poppins", system-ui, sans-serif;

  /* Fluid container padding & gutters */
  --pad-x: clamp(20px, 5vw, 56px);
}

* { margin: 0; padding: 0; box-sizing: border-box; }

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

body {
  font-family: var(--body);
  background: #fff;
  color: var(--brown);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

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

.page { width: 100%; margin: 0 auto; background: #fff; }

/* Image placeholder fallback */
.placeholder {
  display: flex !important;
  align-items: center;
  justify-content: center;
  background: repeating-linear-gradient(45deg, #efe6da, #efe6da 12px, #e7dccd 12px, #e7dccd 24px);
}
.placeholder::after {
  content: "🍪 " attr(data-label);
  font-family: var(--body);
  font-size: 11px;
  color: #a99a88;
  font-weight: 500;
  text-align: center;
  padding: 8px;
}

/* ===================== HEADER (mobile base) ===================== */
.header {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 16px var(--pad-x);
  background: var(--cream-nav);
}
.logo {
  font-family: var(--display);
  font-size: clamp(17px, 4.5vw, 22px);
  color: var(--brown);
  text-decoration: none;
  white-space: nowrap;
}
.burger {
  display: inline-flex;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 44px; height: 44px;
  padding: 10px;
  border: none;
  background: transparent;
  cursor: pointer;
}
.burger span {
  display: block; height: 2px; width: 100%;
  background: var(--brown);
  border-radius: 2px;
  transition: transform .25s, opacity .25s;
}
.nav {
  display: none;
  position: absolute;
  top: 100%; left: 0; right: 0;
  flex-direction: column;
  gap: 0;
  background: var(--cream-nav);
  padding: 8px var(--pad-x) 20px;
  border-top: 1px solid rgba(58,35,24,.08);
  box-shadow: 0 12px 18px -10px rgba(0,0,0,.1);
  z-index: 10;
}
.nav.is-open { display: flex; }
.nav-link {
  font-size: 15px;
  font-weight: 500;
  color: var(--brown);
  text-decoration: none;
  padding: 14px 0;
  border-bottom: 1px solid rgba(58,35,24,.06);
}
.nav-link:last-child { border-bottom: none; }
.nav-link .plus { color: var(--orange); font-weight: 700; }
.cart-btn {
  flex-shrink: 0;
  width: 44px; height: 44px;
  border: none; border-radius: 50%;
  background: var(--yellow);
  display: grid; place-items: center;
  cursor: pointer;
  box-shadow: 0 4px 10px rgba(252,210,10,.4);
}

/* ===================== HERO (mobile base) ===================== */
.hero {
  padding: 32px var(--pad-x) 16px;
}
.hero-title {
  font-family: var(--display);
  font-size: clamp(38px, 11vw, 64px);
  line-height: .98;
  text-align: center;
  color: var(--brown);
  letter-spacing: .005em;
  margin-bottom: 28px;
}
.hero-grid {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 32px;
}

/* Hero left */
.hero-left { width: 100%; max-width: 360px; text-align: center; }
.hero-desc {
  font-size: 13px;
  line-height: 1.7;
  color: var(--text-muted);
  margin-bottom: 18px;
}
.hero-actions {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  margin-bottom: 26px;
  flex-wrap: wrap;
}
.btn-yellow {
  background: var(--yellow);
  color: var(--brown);
  font-family: var(--display);
  font-size: 12px;
  letter-spacing: .04em;
  text-decoration: none;
  padding: 13px 24px;
  border-radius: 999px;
  white-space: nowrap;
  box-shadow: 0 6px 14px rgba(252,210,10,.45);
  display: inline-block;
  min-height: 44px;
  line-height: 1.4;
}
.btn-video {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--display);
  font-size: 12px;
  letter-spacing: .03em;
  color: var(--brown);
  text-decoration: none;
  white-space: nowrap;
  min-height: 44px;
  padding: 6px 0;
}
.play-circle {
  width: 22px; height: 22px;
  border: 1.5px solid var(--brown);
  border-radius: 50%;
  display: grid; place-items: center;
}
.hero-tagline {
  font-family: var(--display);
  font-size: clamp(15px, 4vw, 20px);
  line-height: 1.35;
  color: var(--brown);
}

/* Hero center */
.hero-center { display: flex; justify-content: center; width: 100%; }
.hero-card {
  width: 100%;
  max-width: 360px;
  aspect-ratio: 1 / 1;
  border-radius: 24px;
  background: radial-gradient(circle at 50% 45%, #ffe23a 0%, #fcd20a 45%, #f6c500 100%);
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}
.hero-card img { width: 100%; height: 100%; object-fit: cover; }

/* Hero right */
.hero-right {
  width: 100%;
  max-width: 360px;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}
.choose-title {
  font-family: var(--display);
  font-size: clamp(18px, 5vw, 22px);
  color: var(--brown);
  margin-bottom: 16px;
}
.badges {
  display: flex;
  flex-direction: column;
  gap: 10px;
  align-items: center;
}
.badge {
  font-family: var(--display);
  font-size: 12px;
  letter-spacing: .03em;
  color: var(--brown);
  padding: 9px 22px;
  border-radius: 999px;
  text-align: center;
  width: max-content;
}
.badge-purple { background: var(--purple); }
.badge-orange { background: var(--orange); color:#fff; }
.badge-green  { background: var(--green);  color:#fff; }
.badge-blue   { background: var(--blue);   color:#fff; }

/* ===================== MARQUEE ===================== */
.marquee {
  background: var(--brown-deep);
  overflow: hidden;
  transform: rotate(-2deg) scale(1.08);
  margin: 36px 0 48px;
  padding: 14px 0;
}
.marquee-track {
  display: flex;
  width: max-content;
  animation: scroll 22s linear infinite;
}
.marquee-content {
  font-family: var(--display);
  font-size: clamp(15px, 3.5vw, 22px);
  letter-spacing: .05em;
  color: var(--cream);
  white-space: nowrap;
  padding-right: 24px;
}
.marquee-content .diamond {
  color: var(--yellow);
  font-size: .65em;
  vertical-align: middle;
  margin: 0 4px;
}
@keyframes scroll {
  from { transform: translateX(0); }
  to   { transform: translateX(-50%); }
}

/* ===================== BEST PRODUCTS (mobile base) ===================== */
.products { padding: 0 var(--pad-x) 56px; }
.products-head {
  display: flex;
  flex-direction: column;
  gap: 16px;
  align-items: flex-start;
  margin-bottom: 28px;
}
.section-title {
  font-family: var(--display);
  font-size: clamp(30px, 7.5vw, 56px);
  line-height: 1.02;
  color: var(--brown);
}
.btn-video--dark { font-size: 12px; }

.products-grid {
  display: flex;
  flex-direction: column;
  gap: 22px;
}
.product-photo {
  position: relative;
  background: var(--cream-card);
  border-radius: 20px;
  overflow: hidden;
  aspect-ratio: 4 / 3;
}
.product-photo img { width: 100%; height: 100%; object-fit: cover; }
.product-photo--main { aspect-ratio: 1 / 1; }
.product-photo--main .dots {
  position: absolute;
  top: 18px; left: 18px;
  width: 60px; height: 50px;
  background-image: radial-gradient(var(--brown) 2px, transparent 2.5px);
  background-size: 12px 12px;
  z-index: 2;
}

.products-right { display: flex; flex-direction: column; gap: 16px; }
.products-desc {
  font-size: 13px;
  line-height: 1.7;
  color: var(--text-muted);
}
.rating { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.rating-score { font-family: var(--display); font-size: 22px; color: var(--brown); }
.stars { color: var(--yellow-deep); font-size: 15px; letter-spacing: 1px; }
.rating-meta { font-size: 12px; color: var(--text-muted); }

.product-photo--video { aspect-ratio: 4 / 3; }
.video-play {
  position: absolute;
  inset: 0;
  margin: auto;
  width: 56px; height: 56px;
  border: none; border-radius: 50%;
  background: rgba(58,35,24,.55);
  display: grid; place-items: center;
  cursor: pointer;
}

/* ===================== BEST SELLERS (mobile base) ===================== */
.sellers {
  background: var(--cream);
  padding: 48px var(--pad-x) 56px;
}
.sellers-head {
  display: flex;
  flex-direction: column;
  gap: 18px;
  margin-bottom: 24px;
}
.sellers-desc {
  font-size: 13px;
  line-height: 1.7;
  color: var(--text-muted);
  margin-top: 14px;
}
.sellers-arrows { display: flex; gap: 12px; }
.arrow-btn {
  width: 44px; height: 44px;
  border: none; border-radius: 50%;
  background: var(--yellow);
  display: grid; place-items: center;
  cursor: pointer;
  box-shadow: 0 4px 10px rgba(252,210,10,.4);
}

.sellers-grid {
  display: flex;
  flex-direction: column;
  gap: 22px;
  margin-top: 24px;
}
.seller-card {
  background: #fff;
  border: 1px solid #efe4d6;
  border-radius: 18px;
  padding: 18px;
}
.seller-img {
  background: var(--cream-card);
  border-radius: 14px;
  aspect-ratio: 1 / 1;
  overflow: hidden;
  margin-bottom: 16px;
}
.seller-img img { width: 100%; height: 100%; object-fit: cover; }
.seller-info { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.seller-name { font-family: var(--display); font-size: 15px; color: var(--brown); }
.seller-price { font-size: 13px; font-weight: 600; color: var(--brown); }

/* Featured card */
.seller-card--featured {
  position: relative;
  text-align: center;
  padding: 24px 22px 28px;
  box-shadow: 0 24px 40px rgba(58,35,24,.12);
  border: none;
}
.seller-img--lg { aspect-ratio: 1 / 1; background: transparent; }
.seller-name--lg { font-size: 17px; margin-bottom: 4px; }
.seller-price--lg { display: block; font-size: 13px; color: var(--text-muted); margin-bottom: 18px; }
.card-cart {
  position: absolute;
  right: 18px;
  bottom: 70px;
  width: 32px; height: 32px;
  border: 1px solid #e74c3c;
  border-radius: 50%;
  background: #fff;
  display: grid; place-items: center;
  cursor: pointer;
}
.btn-yellow--card { display: inline-block; padding: 13px 28px; }

/* ===================== TABLET (>= 640px) ===================== */
@media (min-width: 640px) {
  .hero { padding: 40px var(--pad-x) 24px; }
  .hero-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 28px;
    align-items: center;
  }
  .hero-left { text-align: left; max-width: none; }
  .hero-actions { justify-content: flex-start; }
  .hero-right { grid-column: span 2; align-items: center; }
  .hero-center { grid-column: span 1; }

  .products-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 24px;
  }
  .products-head {
    flex-direction: row;
    justify-content: space-between;
    align-items: flex-start;
  }

  .sellers-head {
    flex-direction: row;
    justify-content: space-between;
    align-items: flex-start;
  }
  .sellers-desc { max-width: 560px; }
  .sellers-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 22px;
    align-items: end;
  }
}

/* ===================== DESKTOP (>= 1024px) ===================== */
@media (min-width: 1024px) {
  /* Header: show full nav, hide burger */
  .header { padding: 22px var(--pad-x); gap: 40px; }
  .burger { display: none; }
  .nav {
    display: flex;
    flex-direction: row;
    position: static;
    background: transparent;
    border: none;
    box-shadow: none;
    padding: 0;
    gap: 34px;
    margin: 0 auto;
  }
  .nav-link {
    font-size: 13.5px;
    padding: 0;
    border: none;
  }
  .cart-btn { width: 40px; height: 40px; }

  /* Constrain content width on big screens */
  .hero, .products, .sellers {
    padding-left: max(var(--pad-x), calc((100% - 1280px) / 2));
    padding-right: max(var(--pad-x), calc((100% - 1280px) / 2));
  }

  /* Hero: 3-col layout */
  .hero { padding-top: 48px; padding-bottom: 24px; }
  .hero-title { margin-bottom: 32px; }
  .hero-grid {
    grid-template-columns: 1fr 1.15fr 1fr;
    gap: 24px;
    align-items: center;
  }
  .hero-left { max-width: 260px; }
  .hero-desc { font-size: 12px; }
  .hero-right {
    grid-column: auto;
    align-items: flex-start;
    text-align: left;
    padding-left: 10px;
  }
  .badges { align-items: flex-start; max-width: 220px; }
  .badge-orange { margin-left: 26px; }
  .badge-green  { margin-left: 8px; }
  .badge-blue   { margin-left: 40px; }

  /* Products */
  .products { padding-bottom: 80px; }
  .products-head { margin-bottom: 36px; }
  .products-grid { gap: 30px; }
  .product-photo--main { aspect-ratio: auto; min-height: 320px; }
  .product-photo--video { aspect-ratio: auto; min-height: 220px; }
  .products-right { gap: 18px; }

  /* Sellers */
  .sellers { padding-top: 56px; padding-bottom: 80px; }
  .sellers-grid {
    grid-template-columns: repeat(3, 1fr);
    gap: 26px;
  }
  .seller-card--featured { transform: translateY(-26px); }
}

/* ===================== REDUCED MOTION ===================== */
@media (prefers-reduced-motion: reduce) {
  .marquee-track { animation: none; }
  * { transition: none !important; }
}
