/* ---------- Design tokens ---------- */
:root {
  --bg: #fff8f4;
  --surface: #ffffff;
  --ink: #2b1d26;
  --muted: #8a7782;
  --pink: #ff5d8f;
  --pink-dark: #e8447a;
  --line: #f0e3dc;
  --shadow: 0 18px 40px -20px rgba(120, 40, 70, 0.35);
  --radius: 20px;
  --maxw: 1180px;
}

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

html { scroll-behavior: smooth; }

body {
  font-family: "Inter", system-ui, sans-serif;
  background: var(--bg);
  color: var(--ink);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4 { font-family: "Fraunces", Georgia, serif; line-height: 1.05; }

a { color: inherit; text-decoration: none; }
.muted { color: var(--muted); }

/* ---------- Announcement bar ---------- */
.announce {
  background: var(--ink);
  color: #ffe9f1;
  text-align: center;
  font-size: 13px;
  letter-spacing: 0.04em;
  padding: 9px 16px;
}

/* ---------- Header ---------- */
.header {
  position: sticky;
  top: 0;
  z-index: 50;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 16px clamp(16px, 5vw, 48px);
  background: rgba(255, 248, 244, 0.82);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line);
}

.logo {
  font-family: "Fraunces", serif;
  font-weight: 900;
  font-size: 26px;
  display: inline-flex;
  align-items: center;
  gap: 9px;
  letter-spacing: -0.02em;
}
.logo-dot {
  width: 16px; height: 16px; border-radius: 50%;
  background: linear-gradient(135deg, #ff5d8f, #ff8a5b, #c084fc);
}

.nav { display: flex; gap: 28px; font-weight: 500; }
.nav a { position: relative; }
.nav a::after {
  content: ""; position: absolute; left: 0; bottom: -4px;
  width: 0; height: 2px; background: var(--pink); transition: width 0.25s;
}
.nav a:hover::after { width: 100%; }

.cart-btn {
  position: relative;
  background: var(--ink);
  color: #fff;
  border: none;
  width: 44px; height: 44px;
  border-radius: 50%;
  display: grid; place-items: center;
  cursor: pointer;
  transition: transform 0.2s;
}
.cart-btn:hover { transform: scale(1.07); }
.cart-count {
  position: absolute; top: -4px; right: -4px;
  background: var(--pink);
  color: #fff;
  font-size: 11px; font-weight: 700;
  min-width: 20px; height: 20px;
  border-radius: 10px;
  display: grid; place-items: center;
  padding: 0 5px;
  border: 2px solid var(--bg);
}

/* ---------- Hero ---------- */
.hero {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: clamp(32px, 7vw, 80px) clamp(16px, 5vw, 48px);
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 48px;
  align-items: center;
}
.eyebrow {
  text-transform: lowercase;
  letter-spacing: 0.1em;
  font-weight: 600;
  font-size: 13px;
  color: var(--pink-dark);
  margin-bottom: 16px;
}
.hero h1 { font-size: clamp(40px, 7vw, 76px); font-weight: 900; letter-spacing: -0.02em; }
.rainbow {
  background: linear-gradient(90deg, #ff5d8f, #ff8a5b, #fbbf24, #c084fc, #ff5d8f);
  background-size: 300% 100%;
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  animation: hue 8s linear infinite;
}
@keyframes hue { to { background-position: 300% 0; } }

.hero-sub { margin: 22px 0 28px; font-size: 18px; color: var(--muted); max-width: 46ch; }
.hero-cta { display: flex; gap: 14px; flex-wrap: wrap; }

.hero-stats {
  display: flex; gap: 36px; margin-top: 40px; flex-wrap: wrap;
}
.hero-stats strong { font-family: "Fraunces", serif; font-size: 28px; display: block; }
.hero-stats span { font-size: 13px; color: var(--muted); }

/* Hero art */
.hero-art { display: grid; place-items: center; }
.balm-stack { display: flex; gap: 14px; align-items: flex-end; height: 340px; }
.balm {
  width: 58px;
  border-radius: 40px 40px 14px 14px;
  background: linear-gradient(160deg, color-mix(in srgb, var(--c) 78%, white), var(--c));
  box-shadow: var(--shadow), inset 0 -20px 30px -20px rgba(0,0,0,0.25);
  position: relative;
  animation: float 4s ease-in-out infinite;
}
.balm::before {
  content: ""; position: absolute; top: -22px; left: 50%; transform: translateX(-50%);
  width: 40px; height: 30px; border-radius: 12px 12px 4px 4px;
  background: color-mix(in srgb, var(--c) 60%, black);
  opacity: 0.85;
}
.balm:nth-child(1) { height: 70%; animation-delay: 0s; }
.balm:nth-child(2) { height: 88%; animation-delay: 0.4s; }
.balm:nth-child(3) { height: 100%; animation-delay: 0.8s; }
.balm:nth-child(4) { height: 84%; animation-delay: 1.2s; }
.balm:nth-child(5) { height: 66%; animation-delay: 1.6s; }
@keyframes float { 50% { transform: translateY(-14px); } }

/* ---------- Marquee ---------- */
.marquee { overflow: hidden; border-block: 1px solid var(--line); background: var(--surface); }
.marquee-track {
  display: flex; gap: 28px; align-items: center;
  white-space: nowrap; padding: 14px 0;
  width: max-content;
  animation: scroll 26s linear infinite;
  font-family: "Fraunces", serif; font-size: 18px; color: var(--ink);
}
.marquee-track span:nth-child(even) { color: var(--pink); }
@keyframes scroll { to { transform: translateX(-50%); } }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  font-weight: 600; font-size: 15px;
  padding: 14px 26px; border-radius: 999px;
  cursor: pointer; border: none; transition: transform 0.15s, box-shadow 0.2s, background 0.2s;
}
.btn-primary { background: var(--pink); color: #fff; box-shadow: 0 10px 24px -10px var(--pink); }
.btn-primary:hover { background: var(--pink-dark); transform: translateY(-2px); }
.btn-ghost { background: transparent; color: var(--ink); border: 1.5px solid var(--ink); }
.btn-ghost:hover { background: var(--ink); color: #fff; }
.btn-full { width: 100%; }

/* ---------- Shop ---------- */
.shop { max-width: var(--maxw); margin: 0 auto; padding: clamp(40px, 7vw, 88px) clamp(16px, 5vw, 48px); }
.shop-head {
  display: flex; justify-content: space-between; align-items: flex-end;
  gap: 24px; flex-wrap: wrap; margin-bottom: 32px;
}
.shop-head h2 { font-size: clamp(30px, 4.5vw, 46px); }
.shop-head .muted { margin-top: 6px; }

.filters { display: flex; gap: 8px; flex-wrap: wrap; }
.filter {
  border: 1.5px solid var(--line); background: var(--surface);
  padding: 8px 16px; border-radius: 999px; font-size: 14px; font-weight: 600;
  cursor: pointer; transition: all 0.18s; color: var(--ink);
  display: inline-flex; align-items: center; gap: 8px;
}
.filter:hover { border-color: var(--pink); }
.filter.active { background: var(--ink); color: #fff; border-color: var(--ink); }
.filter .swatch { width: 12px; height: 12px; border-radius: 50%; }

.grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
  gap: 22px;
}

.card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  display: flex; flex-direction: column;
  transition: transform 0.2s, box-shadow 0.25s;
}
.card:hover { transform: translateY(-6px); box-shadow: var(--shadow); }

.card-art {
  aspect-ratio: 4 / 3;
  display: grid; place-items: center;
  position: relative; overflow: hidden;
}
.card-balm {
  width: 56px; height: 130px;
  border-radius: 40px 40px 12px 12px;
  background: linear-gradient(160deg, color-mix(in srgb, var(--c) 80%, white), var(--c));
  box-shadow: inset 0 -16px 26px -18px rgba(0,0,0,0.35), 0 12px 22px -14px rgba(0,0,0,0.4);
  position: relative;
  transition: transform 0.25s;
}
.card:hover .card-balm { transform: translateY(-6px) rotate(-4deg); }
.card-balm::before {
  content: ""; position: absolute; top: -18px; left: 50%; transform: translateX(-50%);
  width: 40px; height: 26px; border-radius: 10px 10px 4px 4px;
  background: color-mix(in srgb, var(--c) 55%, black);
}
.badge {
  position: absolute; top: 12px; left: 12px;
  background: #fff; color: var(--ink);
  font-size: 11px; font-weight: 700; letter-spacing: 0.04em;
  text-transform: uppercase;
  padding: 5px 10px; border-radius: 999px;
  box-shadow: 0 4px 10px -6px rgba(0,0,0,0.3);
}

.card-body { padding: 16px 18px 18px; display: flex; flex-direction: column; gap: 4px; flex: 1; }
.card-name { font-family: "Fraunces", serif; font-size: 20px; font-weight: 600; }
.card-flavor { font-size: 13px; color: var(--muted); }
.card-rating { font-size: 13px; color: #f59e0b; margin-top: 2px; }
.card-foot { display: flex; align-items: center; justify-content: space-between; margin-top: 12px; }
.card-price { font-weight: 700; font-size: 18px; }
.add-btn {
  background: var(--ink); color: #fff; border: none;
  border-radius: 999px; padding: 9px 16px; font-weight: 600; font-size: 14px;
  cursor: pointer; transition: background 0.18s, transform 0.15s;
}
.add-btn:hover { background: var(--pink); transform: scale(1.04); }

/* ---------- About ---------- */
.about { max-width: var(--maxw); margin: 0 auto; padding: 0 clamp(16px, 5vw, 48px) clamp(40px, 7vw, 88px); }
.about-card {
  background: linear-gradient(135deg, #fff0f5, #fff6ec);
  border: 1px solid var(--line);
  border-radius: 28px;
  padding: clamp(28px, 5vw, 56px);
}
.about-card h2 { font-size: clamp(28px, 4vw, 42px); max-width: 16ch; }
.about-card p { margin: 18px 0 24px; max-width: 60ch; color: #5a4853; font-size: 17px; }
.perks { list-style: none; display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 14px; }
.perks li { display: flex; align-items: center; gap: 10px; font-weight: 600; }
.perks span { font-size: 22px; }

/* ---------- FAQ ---------- */
.faq { max-width: var(--maxw); margin: 0 auto; padding: 0 clamp(16px, 5vw, 48px) clamp(48px, 7vw, 88px); }
.faq-inner h2 { font-family: "Fraunces", serif; font-size: clamp(26px, 4vw, 38px); margin-bottom: 32px; }
.faq-list { display: flex; flex-direction: column; gap: 12px; }
details {
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 20px 24px;
  background: var(--surface);
  cursor: pointer;
}
details[open] { background: #fff8f4; }
summary {
  font-weight: 600;
  font-size: 16px;
  list-style: none;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  color: var(--ink);
}
summary::-webkit-details-marker { display: none; }
summary::after {
  content: "+";
  font-size: 22px;
  font-weight: 300;
  color: var(--pink);
  flex-shrink: 0;
  transition: transform 0.2s;
}
details[open] summary::after { transform: rotate(45deg); }
details p { margin-top: 14px; color: #5a4853; line-height: 1.7; font-size: 15px; }

/* ---------- Footer ---------- */
.footer {
  background: var(--ink); color: #f5e6ec;
  padding: clamp(40px, 6vw, 72px) clamp(16px, 5vw, 48px) 32px;
}
.footer-top { max-width: var(--maxw); margin: 0 auto 36px; }
.footer-top .logo { color: #fff; }
.footer-top .muted { color: #c9aeba; margin-top: 8px; }
.footer-cols {
  max-width: var(--maxw); margin: 0 auto;
  display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 28px;
  border-top: 1px solid rgba(255,255,255,0.12); padding-top: 32px;
}
.footer-cols h4 { font-family: "Inter", sans-serif; font-size: 13px; text-transform: uppercase; letter-spacing: 0.08em; margin-bottom: 12px; color: #fff; }
.footer-cols a { display: block; color: #c9aeba; padding: 4px 0; font-size: 14px; }
.footer-cols a:hover { color: #fff; }
.copyright { max-width: var(--maxw); margin: 36px auto 0; font-size: 13px; color: #a98c98; }

/* ---------- Cart drawer ---------- */
.cart-overlay {
  position: fixed; inset: 0; background: rgba(43, 29, 38, 0.45);
  opacity: 0; visibility: hidden; transition: opacity 0.25s; z-index: 90;
}
.cart-overlay.open { opacity: 1; visibility: visible; }

.cart-drawer {
  position: fixed; top: 0; right: 0; height: 100%;
  width: min(420px, 100%);
  background: var(--bg);
  z-index: 100;
  transform: translateX(100%);
  transition: transform 0.32s cubic-bezier(0.22, 1, 0.36, 1);
  display: flex; flex-direction: column;
  box-shadow: -20px 0 50px -30px rgba(0,0,0,0.5);
}
.cart-drawer.open { transform: translateX(0); }
.cart-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 22px 24px; border-bottom: 1px solid var(--line);
}
.cart-header h3 { font-size: 24px; }
.cart-close { background: none; border: none; font-size: 30px; line-height: 1; cursor: pointer; color: var(--muted); }
.cart-close:hover { color: var(--ink); }

.cart-items { flex: 1; overflow-y: auto; padding: 16px 24px; display: flex; flex-direction: column; gap: 14px; }
.cart-empty { text-align: center; color: var(--muted); margin-top: 48px; }
.cart-empty span { font-size: 44px; display: block; margin-bottom: 12px; }

.cart-item { display: flex; gap: 14px; align-items: center; }
.ci-art {
  width: 54px; height: 54px; border-radius: 14px; flex-shrink: 0;
  background: linear-gradient(160deg, color-mix(in srgb, var(--c) 78%, white), var(--c));
}
.ci-info { flex: 1; min-width: 0; }
.ci-name { font-weight: 600; font-size: 15px; }
.ci-price { font-size: 13px; color: var(--muted); }
.ci-qty { display: flex; align-items: center; gap: 8px; margin-top: 4px; }
.ci-qty button {
  width: 24px; height: 24px; border-radius: 7px; border: 1px solid var(--line);
  background: #fff; cursor: pointer; font-weight: 700; color: var(--ink);
}
.ci-qty button:hover { border-color: var(--pink); }
.ci-qty span { font-size: 14px; min-width: 18px; text-align: center; }
.ci-remove { background: none; border: none; color: var(--muted); cursor: pointer; font-size: 12px; text-decoration: underline; }

.cart-footer { padding: 20px 24px calc(20px + env(safe-area-inset-bottom)); border-top: 1px solid var(--line); }
.cart-progress { font-size: 13px; color: var(--pink-dark); margin-bottom: 14px; font-weight: 600; }
.cart-total { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 16px; }
.cart-total strong { font-size: 24px; font-family: "Fraunces", serif; }

/* ---------- Toast ---------- */
.toast {
  position: fixed; bottom: 24px; left: 50%; transform: translateX(-50%) translateY(120%);
  background: var(--ink); color: #fff;
  padding: 14px 22px; border-radius: 999px; font-weight: 600; font-size: 14px;
  box-shadow: var(--shadow); z-index: 200; transition: transform 0.3s; pointer-events: none;
}
.toast.show { transform: translateX(-50%) translateY(0); }

/* ---------- Success page ---------- */
.success-wrap { min-height: 100vh; display: grid; place-items: center; padding: 24px; }
.success-card {
  background: var(--surface); border: 1px solid var(--line); border-radius: 28px;
  box-shadow: var(--shadow); padding: clamp(32px, 6vw, 56px);
  text-align: center; max-width: 480px;
}
.success-card .logo { justify-content: center; margin-bottom: 8px; }
.success-card h1 { font-size: clamp(32px, 6vw, 48px); margin-top: 4px; }
.success-sub { color: var(--muted); margin: 14px 0 18px; font-size: 17px; }
.success-order { font-family: "Fraunces", serif; font-size: 14px; color: var(--ink); margin-bottom: 24px; }
.confirm-check {
  width: 72px; height: 72px; border-radius: 50%; margin: 0 auto 18px;
  background: linear-gradient(135deg, #ff5d8f, #ff8a5b);
  color: #fff; font-size: 38px; display: grid; place-items: center;
  box-shadow: 0 12px 28px -12px var(--pink);
}

/* ---------- Product cards (updated for image) ---------- */
.card-art { position: relative; overflow: hidden; border-radius: 16px 16px 0 0; aspect-ratio: 4/5; background: #f1f5f9; }
.card-art img { width: 100%; height: 100%; object-fit: cover; display: block; position: relative; z-index: 1; }
.card-img-fallback { position: absolute; inset: 0; }
.card-category { font-size: 11px; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); margin-bottom: 2px; }
.card-desc { font-size: 13px; color: var(--muted); line-height: 1.5; margin: 4px 0; }

/* ---------- Variant picker modal ---------- */
.picker-modal {
  position: fixed; bottom: 0; left: 50%; transform: translateX(-50%) translateY(100%);
  width: min(480px, 100vw); background: var(--surface);
  border-radius: 24px 24px 0 0; border: 1px solid var(--line);
  box-shadow: 0 -8px 40px rgba(0,0,0,.12); padding: 24px;
  z-index: 210; transition: transform .3s cubic-bezier(.4,0,.2,1);
}
.picker-modal.open { transform: translateX(-50%) translateY(0); }
.picker-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 20px; }
.picker-label { font-size: 14px; color: var(--muted); margin: 16px 0 8px; }
.swatch-btn {
  width: 32px; height: 32px; border-radius: 50%; cursor: pointer;
  margin: 0 6px 6px 0; transition: transform .15s, box-shadow .15s;
}
.swatch-btn:hover, .swatch-btn.selected { transform: scale(1.15); box-shadow: 0 0 0 2px var(--ink); }
.size-btn {
  padding: 7px 14px; border-radius: 8px; border: 1.5px solid var(--line);
  font-size: 13px; font-weight: 600; cursor: pointer; margin: 0 6px 6px 0;
  background: transparent; color: var(--ink); transition: all .15s;
}
.size-btn:hover { border-color: var(--ink); }
.size-btn.selected { background: var(--ink); color: #fff; border-color: var(--ink); }
.picker-footer { display: flex; align-items: center; justify-content: space-between; margin-top: 24px; padding-top: 16px; border-top: 1px solid var(--line); }
.picker-price { font-size: 22px; font-family: "Fraunces", serif; font-weight: 700; }

/* ---------- Card image enhancements ---------- */
.card-art img { transition: transform 0.35s ease; }
.card:hover .card-art img { transform: scale(1.04); }
.card-img-count {
  position: absolute; bottom: 10px; right: 10px; z-index: 2;
  background: rgba(43,29,38,0.7); color: #fff;
  font-size: 11px; font-weight: 600; padding: 3px 9px; border-radius: 99px;
  backdrop-filter: blur(4px);
}
.no-img { background: linear-gradient(135deg, #f1e9f5, #fce7f3); }

/* ---------- Cart item thumbnail ---------- */
.ci-thumb {
  width: 58px; height: 58px; border-radius: 12px; flex-shrink: 0;
  overflow: hidden; display: grid; place-items: center;
  border: 1px solid var(--line);
}
.ci-thumb img { width: 100%; height: 100%; object-fit: cover; }

/* ---------- Product detail modal ---------- */
.detail-modal {
  position: fixed; inset: 0;
  background: var(--surface);
  z-index: 210;
  overflow-y: auto;
  opacity: 0; visibility: hidden;
  transform: translateY(30px);
  transition: opacity 0.3s, transform 0.3s, visibility 0.3s;
}
.detail-modal.open { opacity: 1; visibility: visible; transform: translateY(0); }

.detail-back {
  position: sticky; top: 0; z-index: 10;
  display: inline-flex; align-items: center; gap: 8px;
  padding: 14px clamp(16px, 4vw, 48px);
  background: var(--surface);
  border: none; border-bottom: 1px solid var(--line);
  width: 100%; cursor: pointer;
  font-size: 15px; font-weight: 600; color: var(--ink);
  transition: color 0.15s;
}
.detail-back:hover { color: var(--pink); }
.detail-back svg { flex-shrink: 0; }

.detail-layout {
  max-width: 1100px; margin: 0 auto;
  display: grid; grid-template-columns: 1fr 1fr; gap: 48px;
  padding: 0 clamp(16px, 4vw, 48px) 64px;
}

/* Media side */
.detail-media { position: relative; }
.detail-main {
  width: 100%; border-radius: 20px; overflow: hidden;
  background: #f8f0f5; aspect-ratio: 4/5;
}
.detail-img { width: 100%; height: 100%; object-fit: cover; display: block; }
.detail-video { width: 100%; height: 100%; object-fit: cover; display: block; }

.detail-arrow {
  position: absolute; top: 50%; transform: translateY(-50%);
  width: 40px; height: 40px; border-radius: 50%;
  background: rgba(255,255,255,0.9); border: 1px solid var(--line);
  font-size: 24px; cursor: pointer; display: flex; align-items: center; justify-content: center;
  z-index: 2; transition: background 0.15s;
}
.detail-arrow:hover { background: #fff; }
.detail-prev { left: 12px; }
.detail-next { right: 12px; }

.detail-thumbs {
  display: flex; gap: 8px; flex-wrap: wrap; margin-top: 12px;
}
.thumb-btn {
  width: 64px; height: 64px; border-radius: 10px; overflow: hidden;
  border: 2px solid transparent; cursor: pointer; padding: 0;
  background: #f1e9f5; position: relative; flex-shrink: 0;
  transition: border-color 0.15s;
}
.thumb-btn.active { border-color: var(--ink); }
.thumb-btn img { width: 100%; height: 100%; object-fit: cover; display: block; }
.thumb-play {
  position: absolute; inset: 0; display: grid; place-items: center;
  background: rgba(43,29,38,0.45); color: #fff; font-size: 18px;
}

/* Info side */
.detail-info { display: flex; flex-direction: column; gap: 16px; padding-top: 8px; }
.detail-rating { font-size: 14px; color: #f59e0b; }
.detail-name { font-size: clamp(26px, 3vw, 38px); }
.detail-price { font-size: 28px; font-family: "Fraunces", serif; font-weight: 700; }
.detail-desc { font-size: 15px; color: var(--muted); line-height: 1.65; }
.detail-colors, .detail-sizes { display: flex; flex-wrap: wrap; align-items: center; gap: 4px; }
.detail-add { margin-top: 8px; }
.detail-trust {
  display: flex; gap: 12px; flex-wrap: wrap;
  font-size: 13px; color: var(--muted); margin-top: 4px;
}
.detail-trust span { display: flex; align-items: center; gap: 4px; }

/* ---------- Responsive ---------- */
@media (max-width: 860px) {
  .hero { grid-template-columns: 1fr; text-align: center; }
  .hero-sub { margin-inline: auto; }
  .hero-cta, .hero-stats { justify-content: center; }
  .hero-art { order: -1; }
  .balm-stack { height: 240px; }
  .nav { display: none; }
  .detail-layout { grid-template-columns: 1fr; gap: 24px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto; }
}
