:root {
  --wine: #680a32;
  --wine-dark: #3b061e;
  --wine-bright: #8a1747;
  --caramel: #c9895b;
  --cream: #fff7ee;
  --ink: #23171b;
  --muted: #76686c;
  --line: rgba(59, 6, 30, .14);
  --white: #fffdf9;
  --shadow: 0 24px 70px rgba(59, 6, 30, .13);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; color: var(--ink); background: var(--cream); font: 16px/1.55 "DM Sans", sans-serif; }
button, input, textarea { font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
a { color: inherit; }
.topbar { height: 76px; padding: 0 clamp(20px, 4vw, 64px); display: flex; align-items: center; justify-content: space-between; position: sticky; top: 0; z-index: 20; background: rgba(255, 247, 238, .92); backdrop-filter: blur(14px); border-bottom: 1px solid var(--line); }
.wordmark { text-decoration: none; font-weight: 800; font-size: 1.05rem; letter-spacing: .1em; color: var(--wine); }
.top-actions { display: flex; gap: 18px; align-items: center; }
.batch { color: var(--wine); font-size: .9rem; font-weight: 600; }
.batch i { display: inline-block; width: 8px; height: 8px; border-radius: 50%; margin-right: 7px; background: #2f9a62; box-shadow: 0 0 0 4px rgba(47,154,98,.12); }
.bag-button { border: 0; border-radius: 99px; padding: 10px 12px 10px 18px; color: white; background: var(--wine); cursor: pointer; font-weight: 650; }
.bag-button span { display: inline-grid; place-items: center; min-width: 28px; height: 28px; margin-left: 8px; padding: 0 7px; border-radius: 99px; background: rgba(255,255,255,.16); }
.hero { max-width: 1440px; margin: 0 auto; padding: clamp(28px, 5vw, 72px) clamp(20px, 4vw, 64px) clamp(52px, 7vw, 96px); display: grid; grid-template-columns: .85fr 1.15fr; gap: clamp(32px, 6vw, 92px); align-items: center; min-height: calc(100vh - 76px); }
.eyebrow { margin: 0 0 12px; color: var(--wine-bright); font-size: .78rem; font-weight: 750; letter-spacing: .14em; text-transform: uppercase; }
h1, h2 { font-family: "Playfair Display", serif; font-weight: 600; line-height: 1.04; letter-spacing: -.035em; }
h1 { margin: 0; font-size: clamp(3.7rem, 7.4vw, 7.4rem); color: var(--wine-dark); }
h1 em { color: var(--caramel); font-weight: 600; }
.intro { max-width: 510px; margin: 26px 0 30px; color: var(--muted); font-size: clamp(1.03rem, 1.4vw, 1.2rem); }
.primary-link { display: inline-flex; align-items: center; gap: 20px; padding: 14px 20px; border-radius: 4px; color: white; background: var(--wine); text-decoration: none; font-weight: 700; transition: transform .2s, background .2s; }
.primary-link:hover { transform: translateY(-2px); background: var(--wine-dark); }
.hero-notes { display: flex; gap: 20px; flex-wrap: wrap; margin-top: 34px; color: var(--muted); font-size: .82rem; }
.hero-notes span:not(:last-child)::after { content: "·"; margin-left: 20px; color: var(--caramel); }
.hero-image { position: relative; aspect-ratio: 1.16; overflow: hidden; border-radius: 4px 56px 4px 4px; background: #b9754b center/cover no-repeat; box-shadow: var(--shadow); }
.hero-image::after { content: ""; position: absolute; inset: 0; background: linear-gradient(150deg, transparent 48%, rgba(59,6,30,.36)); }
.image-fallback { position: absolute; inset: 0; background: #7d3025 url("assets/hero.webp") center/cover no-repeat; }
.hero-stamp { position: absolute; right: 24px; bottom: 24px; z-index: 2; width: 88px; height: 88px; border-radius: 50%; display: grid; place-items: center; text-align: center; border: 1px solid rgba(255,255,255,.55); color: white; font: italic 600 1rem/1.1 "Playfair Display", serif; background: rgba(104,10,50,.72); backdrop-filter: blur(8px); transform: rotate(7deg); }
.order-layout { max-width: 1440px; margin: 0 auto; padding: 80px clamp(20px, 4vw, 64px) 96px; display: grid; grid-template-columns: minmax(0, 1fr) 390px; gap: 42px; border-top: 1px solid var(--line); }
.section-heading { display: flex; justify-content: space-between; align-items: end; gap: 20px; margin-bottom: 28px; }
h2 { margin: 0; font-size: clamp(2.35rem, 4vw, 4.2rem); color: var(--wine-dark); }
.demo-note { margin: 0; color: var(--muted); font-size: .78rem; }
.product-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; }
.product-card { min-width: 0; overflow: hidden; border: 1px solid var(--line); border-radius: 22px; background: rgba(255,253,249,.85); transition: transform .25s, box-shadow .25s; }
.product-card:hover { transform: translateY(-4px); box-shadow: 0 18px 50px rgba(59,6,30,.1); }
.product-image { aspect-ratio: 1.42; background-position: center; background-size: cover; }
.product-image.classic { background-image: url("assets/classic.webp"); }
.product-image.bites { background-image: url("assets/bites.webp"); }
.product-image.custard { background-image: linear-gradient(rgba(104,10,50,.1), rgba(104,10,50,.1)), url("assets/hero.webp"); }
.product-image.mix { background-image: linear-gradient(rgba(59,6,30,.08), rgba(59,6,30,.08)), url("assets/bites.webp"); }
.product-body { padding: 22px; }
.product-kicker { margin: 0 0 3px; color: var(--caramel); font-size: .73rem; font-weight: 750; letter-spacing: .1em; text-transform: uppercase; }
.product-card h3 { margin: 0; color: var(--wine-dark); font-size: 1.28rem; }
.product-copy > p:last-child { min-height: 50px; margin: 8px 0 20px; color: var(--muted); font-size: .9rem; }
.product-footer { display: flex; align-items: center; justify-content: space-between; gap: 14px; }
.product-footer strong { color: var(--wine); }
.add-button { min-width: 82px; padding: 9px 12px; border: 1px solid var(--wine); border-radius: 99px; color: var(--wine); background: transparent; cursor: pointer; font-weight: 700; }
.add-button:hover, .add-button:focus-visible { color: white; background: var(--wine); }
.order-panel { position: sticky; top: 98px; align-self: start; max-height: calc(100vh - 120px); overflow: auto; padding: 28px; border-radius: 26px; color: var(--ink); background: var(--white); box-shadow: var(--shadow); }
.panel-header { display: flex; align-items: start; justify-content: space-between; }
.panel-header h2 { font-size: 2.25rem; }
.close-panel { display: none; border: 0; color: var(--wine); background: transparent; font-size: 2rem; cursor: pointer; }
.empty-cart { min-height: 300px; display: grid; place-content: center; text-align: center; color: var(--muted); }
.empty-cart span { display: grid; place-items: center; margin: 0 auto 16px; width: 60px; height: 60px; border: 1px solid var(--line); border-radius: 50%; color: var(--wine); font-weight: 700; }
.empty-cart p { margin: 0 0 5px; color: var(--ink); font-weight: 700; }
.empty-cart small { font-size: .82rem; }
.cart-line { display: grid; grid-template-columns: 1fr auto; gap: 10px; padding: 16px 0; border-bottom: 1px solid var(--line); }
.cart-line h3 { margin: 0 0 3px; font-size: .98rem; }
.cart-line p { margin: 0; color: var(--muted); font-size: .83rem; }
.qty-control { display: flex; align-items: center; align-self: center; border: 1px solid var(--line); border-radius: 99px; }
.qty-control button { width: 32px; height: 32px; border: 0; color: var(--wine); background: transparent; cursor: pointer; font-weight: 700; }
.qty-control span { width: 24px; text-align: center; font-size: .88rem; }
.totals { margin: 22px 0; display: grid; grid-template-columns: 1fr auto; gap: 6px 18px; font-size: .9rem; }
.totals span { color: var(--muted); }
.method-switch { margin: 0 0 18px; padding: 0; border: 0; display: grid; grid-template-columns: 1fr 1fr; gap: 6px; }
.method-switch legend { margin-bottom: 8px; color: var(--muted); font-size: .78rem; }
.method-switch label { cursor: pointer; }
.method-switch input { position: absolute; opacity: 0; }
.method-switch span { display: block; padding: 10px; border: 1px solid var(--line); border-radius: 9px; text-align: center; font-size: .88rem; font-weight: 650; }
.method-switch input:checked + span { border-color: var(--wine); color: var(--wine); background: rgba(104,10,50,.06); }
form > label, .field-row label { display: grid; gap: 6px; margin-bottom: 13px; color: var(--muted); font-size: .78rem; font-weight: 650; }
form label span { font-weight: 400; }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
input, textarea { width: 100%; min-width: 0; padding: 11px 12px; border: 1px solid var(--line); border-radius: 9px; color: var(--ink); background: white; outline: none; }
input:focus, textarea:focus { border-color: var(--wine); box-shadow: 0 0 0 3px rgba(104,10,50,.08); }
textarea { resize: vertical; }
.checkout-button { width: 100%; margin-top: 5px; padding: 14px 16px; border: 0; border-radius: 10px; display: flex; justify-content: space-between; color: white; background: var(--wine); cursor: pointer; font-weight: 750; }
.fine-print { margin: 10px 0 0; color: var(--muted); text-align: center; font-size: .72rem; }
.how-it-works { padding: 90px clamp(20px, 6vw, 100px); color: white; background: var(--wine-dark); }
.how-it-works .eyebrow { color: #e3a478; }
.how-it-works h2 { max-width: 760px; color: white; }
.steps { margin-top: 58px; display: grid; grid-template-columns: repeat(3, 1fr); gap: 32px; }
.steps > div { padding-top: 24px; border-top: 1px solid rgba(255,255,255,.2); }
.steps b { color: #e3a478; font-size: .8rem; }
.steps h3 { margin: 24px 0 8px; font-size: 1.15rem; }
.steps p { max-width: 300px; margin: 0; color: rgba(255,255,255,.65); }
footer { padding: 32px clamp(20px, 4vw, 64px); display: flex; gap: 24px; align-items: center; justify-content: space-between; border-top: 1px solid var(--line); }
footer p { color: var(--muted); font-size: .86rem; }
footer > a:last-child { color: var(--wine); font-size: .86rem; font-weight: 700; }
.mobile-bar, .scrim { display: none; }
dialog { width: min(560px, calc(100% - 32px)); max-height: 85vh; overflow: auto; padding: 34px; border: 0; border-radius: 24px; color: var(--ink); background: var(--white); box-shadow: 0 30px 100px rgba(22,4,12,.35); }
dialog::backdrop { background: rgba(34,9,19,.65); backdrop-filter: blur(5px); }
dialog h2 { font-size: 2.2rem; }
.dialog-close { position: absolute; right: 18px; top: 14px; border: 0; color: var(--wine); background: transparent; font-size: 2rem; cursor: pointer; }
pre { margin: 22px 0; padding: 18px; overflow: auto; white-space: pre-wrap; border: 1px solid var(--line); border-radius: 12px; color: var(--ink); background: #fffaf5; font: .88rem/1.6 "DM Sans", sans-serif; }
.whatsapp-button, .copy-button { display: block; width: 100%; padding: 14px; border-radius: 10px; text-align: center; text-decoration: none; cursor: pointer; font-weight: 750; }
.whatsapp-button { color: white; background: #177d51; }
.copy-button { margin-top: 9px; border: 1px solid var(--wine); color: var(--wine); background: transparent; }
.toast { position: fixed; left: 50%; bottom: 24px; z-index: 60; padding: 10px 16px; border-radius: 99px; color: white; background: var(--wine-dark); opacity: 0; pointer-events: none; transform: translate(-50%, 20px); transition: .25s; }
.toast.show { opacity: 1; transform: translate(-50%, 0); }

@media (max-width: 980px) {
  .hero { grid-template-columns: 1fr 1fr; gap: 30px; }
  .order-layout { grid-template-columns: 1fr; }
  .order-panel { position: fixed; inset: auto 0 0; z-index: 45; max-height: 88vh; border-radius: 26px 26px 0 0; transform: translateY(105%); transition: transform .3s ease; }
  .order-panel.open { transform: translateY(0); }
  .close-panel { display: block; }
  .scrim { position: fixed; inset: 0; z-index: 40; background: rgba(34,9,19,.55); }
  .scrim.show { display: block; }
  .mobile-bar { position: fixed; left: 12px; right: 12px; bottom: 12px; z-index: 35; padding: 11px 12px 11px 18px; align-items: center; justify-content: space-between; border-radius: 16px; color: white; background: var(--wine-dark); box-shadow: 0 18px 50px rgba(34,9,19,.35); }
  .mobile-bar.show { display: flex; }
  .mobile-bar div { display: grid; }
  .mobile-bar small { color: rgba(255,255,255,.65); }
  .mobile-bar button { border: 0; border-radius: 10px; padding: 11px 14px; color: var(--wine-dark); background: #f1c49f; font-weight: 750; }
}

@media (max-width: 680px) {
  .topbar { height: 68px; }
  .batch { display: none; }
  .bag-button { padding: 8px 10px 8px 14px; font-size: .85rem; }
  .bag-button span { min-width: 25px; height: 25px; }
  .hero { min-height: 0; padding-top: 34px; grid-template-columns: 1fr; }
  .hero-copy { display: contents; }
  .hero-copy .eyebrow { order: 0; }
  h1 { order: 1; font-size: clamp(3.4rem, 17vw, 5.4rem); }
  .intro { order: 2; margin: 10px 0 4px; }
  .primary-link { order: 4; justify-content: space-between; }
  .hero-notes { display: none; }
  .hero-image { order: 3; aspect-ratio: 1.08; margin: 14px 0 4px; border-radius: 3px 38px 3px 3px; }
  .order-layout { padding-top: 58px; padding-bottom: 72px; }
  .section-heading { align-items: start; flex-direction: column; }
  .product-grid { grid-template-columns: 1fr; }
  .product-image { aspect-ratio: 1.55; }
  .product-card { display: grid; grid-template-columns: 42% 1fr; border-radius: 16px; }
  .product-image { aspect-ratio: auto; min-height: 210px; }
  .product-body { padding: 18px; display: grid; }
  .product-copy > p:last-child { min-height: 0; font-size: .82rem; }
  .product-footer { align-self: end; flex-wrap: wrap; }
  .add-button { min-width: 70px; }
  .how-it-works { padding-top: 72px; padding-bottom: 82px; }
  .steps { grid-template-columns: 1fr; gap: 24px; }
  .steps h3 { margin-top: 15px; }
  footer { padding-bottom: 104px; flex-direction: column; text-align: center; gap: 5px; }
  .field-row { grid-template-columns: 1fr; gap: 0; }
  .order-panel { padding: 24px 20px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition: none !important; }
}
