:root {
  /* Paleta de marca Fudge */
  --cocoa: #3D2319;
  --cream: #F8EEE4;
  --blush: #E7B8B1;
  --berry: #9F4B5B;
  --white: #FFFFFF;
  /* Blush al 35% sobre Cream, detrás de cada brownie */
  --blush-35: #F2DAD0;
  --cocoa-soft: #66483B;
  --line: #E6D2C5;

  --font-display: "Coiny", "Arial Rounded MT Bold", "Trebuchet MS", sans-serif;
  --font-body: "Montserrat", "Helvetica Neue", Arial, sans-serif;

  --radius-s: 14px;
  --radius-m: 20px;
  --radius-l: 32px;
  --float-shadow: drop-shadow(0 30px 28px rgb(61 35 25 / .22));
  --float-shadow-small: drop-shadow(0 12px 12px rgb(61 35 25 / .2));
  --ease: cubic-bezier(.2, .8, .2, 1);
  /* Goteo de chocolate, como el del logo */
  --drip: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='240' height='44' viewBox='0 0 240 44'%3E%3Cpath fill='%233D2319' d='M0 0H240V6C230 6 226 8 226 14V20C226 28 212 28 212 20V14C212 8 206 6 198 6H150C142 6 140 8 140 14V32C140 42 122 42 122 32V14C122 8 118 6 110 6H72C64 6 62 8 62 12V15C62 23 48 23 48 15V12C48 8 44 6 38 6H0Z'/%3E%3C/svg%3E");
  color-scheme: light;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 128px; -webkit-text-size-adjust: 100%; }
html:has(dialog[open]) { overflow: hidden; }
body {
  margin: 0;
  background: var(--cream);
  color: var(--cocoa);
  font: 400 1rem/1.6 var(--font-body);
  font-synthesis: none;
}
img { display: block; max-width: 100%; height: auto; }
picture { display: contents; }
source { display: none; }
h1, h2, h3 { margin: 0; font-family: var(--font-display); font-weight: 400; line-height: 1.08; text-wrap: balance; }
p { margin: 0; }
a { color: inherit; }
ul, ol { list-style: none; margin: 0; padding: 0; }
button, input, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
:focus-visible { outline: 3px solid var(--berry); outline-offset: 2px; }
.band-cocoa :focus-visible, .band-berry :focus-visible, .site-footer :focus-visible { outline-color: var(--cream); }

.container {
  width: 100%;
  max-width: 1200px;
  margin-inline: auto;
  padding-left: max(20px, env(safe-area-inset-left, 0px));
  padding-right: max(20px, env(safe-area-inset-right, 0px));
}
.skip-link {
  position: absolute; left: 12px; top: -80px; z-index: 30;
  background: var(--cocoa); color: var(--cream);
  padding: 10px 16px; border-radius: var(--radius-s);
}
.skip-link:focus { top: 12px; }

/* Texto de marca */
.kicker {
  margin-bottom: 14px;
  font-size: .8125rem; font-weight: 600; line-height: 1.5;
  letter-spacing: .3em; text-transform: uppercase;
  color: var(--berry);
}
.kicker-on-blush { color: var(--cocoa); }
.kicker-on-dark { color: var(--blush); }
.accent { color: var(--berry); }
.accent-blush { color: var(--blush); }
.hero-slogan .accent, h2 .accent, h2 .accent-blush { display: block; }
h2 a.accent { display: inline; }
.section { padding-block: clamp(56px, 9vw, 104px); }
.section h2 { font-size: clamp(2.2rem, 6vw, 3.6rem); }
.section-head { margin-bottom: 32px; }
.section-sub { margin-top: 14px; max-width: 34em; font-size: 1.08rem; font-weight: 500; }

/* Botones */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 52px; padding: 12px 28px;
  border: 2px solid transparent; border-radius: 999px;
  font-weight: 700; text-decoration: none; text-align: center;
  transition: transform .2s var(--ease), background-color .15s ease, color .15s ease, border-color .15s ease;
}
.btn:hover:not([disabled]) { transform: translateY(-2px); }
.btn-primary { background: var(--cocoa); color: var(--cream); }
.btn-secondary { background: transparent; border-color: var(--cocoa); color: var(--cocoa); }
.btn-secondary:hover { background: var(--cocoa); color: var(--cream); }
.btn-cream { background: var(--cream); color: var(--cocoa); }
.btn-send { background: var(--berry); color: var(--white); }
.btn-block { width: 100%; }
.btn[disabled] { opacity: .45; cursor: not-allowed; }

/* Encabezado */
.site-header {
  position: sticky; top: 0; z-index: 10;
  background: var(--cream);
  padding-top: env(safe-area-inset-top, 0px);
}
.header-row { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; column-gap: 16px; min-height: 72px; }
.brand { display: block; padding-block: 6px; }
.brand img { width: 124px; }
/* En móvil, los enlaces van en una segunda fila bajo el logo. */
.site-nav {
  order: 1; width: 100%;
  display: flex; justify-content: space-between; gap: 14px;
  overflow-x: auto; scrollbar-width: none;
  font-weight: 600; font-size: .9rem;
}
.site-nav a { display: inline-flex; align-items: center; flex: none; min-width: 44px; min-height: 44px; text-decoration: none; }
.site-nav a:hover { color: var(--berry); }
.cart-button {
  display: inline-flex; align-items: center; gap: 8px;
  min-height: 46px; padding: 8px 18px;
  background: var(--cocoa); color: var(--cream);
  border: 0; border-radius: 999px; font-weight: 700;
}
.cart-count {
  min-width: 24px; height: 24px; padding-inline: 6px;
  display: inline-grid; place-items: center;
  background: var(--blush); color: var(--cocoa);
  border-radius: 999px; font-size: .85rem; font-variant-numeric: tabular-nums;
}
.cart-count[hidden] { display: none; }

/* Portada */
.hero { padding-block: 40px 56px; text-align: center; }
.hero-copy { display: grid; justify-items: center; }
.hero h1 { font-family: var(--font-body); }
.hero-slogan { font-family: var(--font-display); font-size: clamp(2.2rem, 10.6vw, 6.2rem); line-height: 1.04; text-wrap: balance; }
.lede { margin-top: 18px; max-width: 34em; text-wrap: balance; font-size: 1.15rem; font-weight: 500; }
.hero-actions { margin-top: 26px; width: 100%; display: flex; flex-wrap: wrap; justify-content: center; gap: 12px; }
.hero-actions .btn { flex: 1 1 200px; }

/* Beneficios */
.perks { position: relative; z-index: 2; background: var(--cocoa); color: var(--cream); }
.perks-list {
  display: flex; flex-wrap: wrap; justify-content: center; gap: 4px 34px;
  padding-block: 18px 12px; font-weight: 600; font-size: .95rem; text-align: center;
}
.perks-list li { padding-block: 2px; }
.has-drip { position: relative; }
.has-drip::after {
  content: ""; position: absolute; left: 0; right: 0; top: 100%; height: 44px; z-index: 2;
  background: var(--drip) repeat-x center top; pointer-events: none;
}

/* Menú */
#menu { padding-top: clamp(84px, 11vw, 120px); }
.filters { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 26px; }
.pill {
  min-height: 44px; padding: 8px 18px;
  background: transparent; border: 2px solid var(--cocoa); border-radius: 999px;
  font-weight: 600; font-size: .95rem;
}
.pill[aria-pressed="true"] { background: var(--cocoa); color: var(--cream); }
.category-title { margin: 34px 0 16px; font-size: 1.6rem; }
.menu-group:first-child .category-title { margin-top: 0; }
.menu-grid { display: grid; gap: 14px; grid-template-columns: repeat(2, minmax(0, 1fr)); }
.product-card {
  position: relative; display: flex; flex-direction: column; width: 100%; height: 100%;
  padding: 0; text-align: left;
  background: var(--white); border: 0; border-radius: var(--radius-m);
  overflow: hidden;
}
.product-photo {
  position: relative; display: grid; place-items: center;
  aspect-ratio: 5 / 4; padding: 12px;
  background: var(--blush-35);
}
.product-photo img {
  width: 100%; height: 100%; object-fit: contain;
  filter: var(--float-shadow-small);
  transition: transform .35s var(--ease);
}
.product-card:hover .product-photo img { transform: translateY(-6px) rotate(-2deg) scale(1.04); }
.tag {
  position: absolute; top: 10px; left: 10px; z-index: 1;
  background: var(--blush); color: var(--cocoa);
  padding: 4px 11px; border-radius: 999px; font-size: .8125rem; font-weight: 700;
}
.product-info { display: flex; flex-direction: column; flex: 1; gap: 6px; padding: 12px 12px 14px; }
.product-name { font-family: var(--font-display); font-size: 1.22rem; line-height: 1.12; }
.product-desc { font-size: .9rem; line-height: 1.42; color: var(--cocoa-soft); }
.product-buy { margin-top: auto; min-height: 44px; padding-top: 8px; display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.product-price { font-weight: 700; font-size: .95rem; color: var(--berry); }
.product-plus {
  flex: none; width: 36px; height: 36px; display: grid; place-items: center;
  background: var(--cocoa); color: var(--cream); border-radius: 50%;
  font-size: 1.3rem; line-height: 1;
  transition: transform .2s var(--ease);
}
.product-card:hover .product-plus { transform: scale(1.12); }

/* Precios */
.price-block { margin-top: 56px; }
.price-block h3 { font-size: 1.9rem; margin-bottom: 16px; }
.table-wrap { overflow-x: auto; background: var(--white); border-radius: var(--radius-m); }
.prices { width: 100%; border-collapse: collapse; }
.prices th, .prices td { padding: 12px 12px; border-bottom: 1px solid var(--line); text-align: left; }
.prices tr:last-child th, .prices tr:last-child td { border-bottom: 0; }
.prices thead th { font-size: .8125rem; letter-spacing: .06em; text-transform: uppercase; color: var(--cocoa-soft); }
.prices tbody th { font-weight: 500; }
.prices td { font-weight: 700; font-variant-numeric: tabular-nums; white-space: nowrap; }
.note { margin-top: 12px; font-size: .95rem; color: var(--cocoa-soft); }

/* Secciones de color */
.band-blush { background: var(--blush); }
.band-blush .accent { color: var(--cocoa); }
.band-cocoa { background: var(--cocoa); color: var(--cream); }
.band-berry { background: var(--berry); color: var(--cream); }
.band-soft { background: var(--blush-35); }
.split { display: grid; gap: 32px; align-items: center; }
.split > * { min-width: 0; }

/* Caja */
.demo-slots { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; width: 100%; max-width: 440px; }
.demo-slots span {
  aspect-ratio: 1; display: grid; place-items: center;
  border: 2px dashed var(--cocoa); border-radius: var(--radius-s);
  font: 400 1.5rem var(--font-display);
}
.box-price { margin-top: 20px; font-size: 1.1rem; font-weight: 500; }
.box-price strong { font: 400 2.2rem var(--font-display); }
.free-note { font-weight: 700; }
#caja .btn { margin-top: 18px; }

/* Proteína */
.protein-prices { margin: 0; display: flex; flex-wrap: wrap; gap: 14px 40px; }
.protein-prices dt { font-size: .875rem; font-weight: 600; letter-spacing: .1em; text-transform: uppercase; color: var(--blush); }
.protein-prices dd { margin: 2px 0 0; font: 400 1.8rem var(--font-display); }

/* Cómo pedir */
#como-pedir { padding-top: clamp(88px, 12vw, 130px); }
.band-berry .section-sub { color: var(--cream); }
.steps { counter-reset: step; display: grid; gap: 26px; }
.steps li { counter-increment: step; display: grid; grid-template-columns: 76px 1fr; grid-template-rows: auto 1fr; column-gap: 10px; }
.steps li::before {
  content: counter(step); grid-row: span 2;
  font: 400 4.6rem/1 var(--font-display); color: var(--blush);
}
.steps strong { font: 400 1.45rem/1.15 var(--font-display); }
.steps span { font-weight: 500; }

/* Mayoreo */
.wholesale { display: grid; gap: 26px; justify-items: start; }

/* Instagram */

/* Pie */
.site-footer {
  padding-block: 56px 96px; background: var(--cocoa); color: var(--cream);
  padding-bottom: max(96px, calc(env(safe-area-inset-bottom, 0px) + 84px));
}
.footer-grid { display: grid; gap: 34px; }
.footer-brand img { width: 170px; margin-bottom: 12px; }
.footer-col { display: grid; gap: 6px; justify-items: start; }
.footer-col h2 { font-size: 1.5rem; color: var(--blush); }
.footer-col address { font-style: normal; }
.footer-col a { display: inline-flex; align-items: center; min-height: 44px; }

/* WhatsApp flotante */
.wa-float {
  position: fixed; z-index: 9;
  right: max(16px, env(safe-area-inset-right, 0px));
  bottom: max(16px, env(safe-area-inset-bottom, 0px));
  display: inline-flex; align-items: center; gap: 8px;
  min-height: 52px; padding: 10px 20px;
  background: var(--berry); color: var(--white);
  border-radius: 999px; font-weight: 700; text-decoration: none;
  box-shadow: 0 10px 24px rgb(61 35 25 / .3);
}

/* Ventanas: hoja inferior en celular */
dialog { color: var(--cocoa); border: 0; padding: 0; background: var(--white); }
dialog::backdrop { background: rgb(61 35 25 / .55); }
.sheet {
  width: 100%; max-width: 100%; max-height: 92dvh;
  margin: auto 0 0; border-radius: var(--radius-l) var(--radius-l) 0 0; overflow: hidden;
}
.sheet[open] { display: flex; flex-direction: column; animation: sheet-up .32s var(--ease); }
.sheet[open]::backdrop { animation: fade .25s ease; }
@keyframes sheet-up { from { transform: translateY(40px); opacity: 0; } }
@keyframes fade { from { opacity: 0; } }
.panel-head {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 14px 14px 12px 22px; border-bottom: 1px solid var(--line);
}
.panel-head h2 { font-size: 1.7rem; }
.icon-button {
  flex: none; width: 46px; height: 46px; display: grid; place-items: center;
  background: var(--blush-35); border: 0; border-radius: 50%; font-size: 1.5rem; line-height: 1;
}
.panel-body { flex: 1; min-height: 0; overflow-y: auto; padding: 20px 22px; display: grid; gap: 22px; align-content: start; }
.panel-foot {
  padding: 14px 22px; border-top: 1px solid var(--line); background: var(--white);
  padding-bottom: max(14px, env(safe-area-inset-bottom, 0px));
  display: grid; gap: 10px;
}

/* Detalle */
.detail-photo { display: grid; place-items: center; aspect-ratio: 16 / 10; background: var(--blush-35); border-radius: var(--radius-m); padding: 16px; }
.detail-photo img { width: 100%; height: 100%; object-fit: contain; filter: var(--float-shadow-small); }
.muted { color: var(--cocoa-soft); }
fieldset { border: 0; margin: 0; padding: 0; min-width: 0; display: grid; gap: 8px; }
legend { padding: 0; margin-bottom: 8px; font-weight: 700; }
.option { display: block; position: relative; cursor: pointer; }
.option input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.option-box {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  min-height: 58px; padding: 10px 16px;
  border: 2px solid var(--line); border-radius: var(--radius-s); font-weight: 600;
}
.option input:checked + .option-box { background: var(--blush-35); border-color: var(--cocoa); }
.option input:focus-visible + .option-box { outline: 3px solid var(--berry); outline-offset: 2px; }
.option small { display: block; font-weight: 400; color: var(--cocoa-soft); }
.option-price { font-weight: 700; font-variant-numeric: tabular-nums; }

.stepper { display: inline-flex; align-items: center; border: 2px solid var(--line); border-radius: 999px; }
.stepper button { width: 44px; height: 44px; background: transparent; border: 0; border-radius: 50%; font-size: 1.3rem; line-height: 1; }
.stepper button:hover:not([disabled]) { background: var(--blush-35); }
.stepper button[disabled] { opacity: .3; cursor: not-allowed; }
.stepper output { min-width: 28px; text-align: center; font-weight: 700; font-variant-numeric: tabular-nums; }
.row-between { display: flex; align-items: center; justify-content: space-between; gap: 12px; }

/* Caja surtida */
.slots { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; max-width: 460px; }
.slot {
  aspect-ratio: 1; padding: 4px; display: grid; place-items: center;
  background: var(--white); border: 2px dashed var(--blush); border-radius: var(--radius-s);
  color: var(--berry); font: 400 1.4rem var(--font-display);
}
button.slot { background: var(--blush-35); border-style: solid; border-color: transparent; }
.slot img { width: 100%; height: 100%; object-fit: contain; }
.flavor-grid { display: grid; gap: 10px; grid-template-columns: repeat(2, minmax(0, 1fr)); }
.flavor { display: flex; flex-direction: column; height: 100%; padding: 8px; border: 2px solid var(--line); border-radius: var(--radius-s); }
.flavor.is-picked { border-color: var(--cocoa); background: var(--blush-35); }
.flavor img { width: 100%; aspect-ratio: 4 / 3; object-fit: contain; }
.flavor-name { margin-block: 6px; font-size: .9rem; font-weight: 700; line-height: 1.25; flex: 1; }
.flavor .stepper { align-self: center; background: var(--white); }

/* Pedido */
.cart-empty { display: grid; gap: 14px; justify-items: center; text-align: center; padding-block: 40px; }
.cart-empty h3 { font-size: 1.6rem; }
.cart-lines { display: grid; gap: 14px; }
.cart-line { display: grid; grid-template-columns: 68px minmax(0, 1fr); gap: 12px; align-items: start; }
.cart-thumb { width: 68px; height: 68px; padding: 4px; background: var(--blush-35); border-radius: var(--radius-s); }
.cart-thumb img { width: 100%; height: 100%; object-fit: contain; }
.cart-thumb.mix { display: grid; grid-template-columns: 1fr 1fr; gap: 1px; }
.cart-line-info { display: grid; gap: 2px; min-width: 0; }
.cart-line-info strong { line-height: 1.25; }
.cart-line-meta { font-size: .88rem; color: var(--cocoa-soft); overflow-wrap: anywhere; }
.cart-line-actions { margin-top: 6px; display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.cart-line-actions .price { font-weight: 700; font-variant-numeric: tabular-nums; }

.field { display: grid; gap: 5px; }
.field label { font-weight: 700; font-size: .95rem; }
.field label small { font-weight: 400; color: var(--cocoa-soft); }
.field input, .field textarea {
  width: 100%; min-height: 50px; padding: 12px 14px;
  background: var(--white); border: 2px solid var(--line); border-radius: var(--radius-s);
  font-size: 1rem;
}
.field textarea { min-height: 78px; resize: vertical; }
.field [aria-invalid="true"] { border-color: var(--berry); }
.field-error { color: var(--berry); font-size: .9rem; font-weight: 500; }
.form-grid { display: grid; gap: 14px; }
.segmented { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.segmented .option-box { justify-content: center; min-height: 50px; font-weight: 700; }
.shipping-hint { font-size: .92rem; font-weight: 600; color: var(--berry); }

.totals { display: grid; gap: 6px; }
.totals div { display: flex; justify-content: space-between; gap: 12px; font-variant-numeric: tabular-nums; }
.totals .grand { font-size: 1.25rem; font-weight: 700; }
.privacy-note { color: var(--cocoa-soft); font-size: .85rem; }
.sent-card { display: grid; gap: 12px; }
.sent-card h3 { font-size: 1.6rem; }
.text-link { min-height: 44px; background: none; border: 0; padding: 8px; color: var(--berry); font-weight: 700; text-decoration: underline; text-align: center; }

/* Aviso */
.toast {
  position: fixed; z-index: 40; left: 50%; transform: translateX(-50%);
  bottom: max(84px, calc(env(safe-area-inset-bottom, 0px) + 72px));
  width: max-content; max-width: calc(100% - 32px);
  background: var(--cocoa); color: var(--cream);
  padding: 12px 20px; border-radius: 999px; font-weight: 600;
}

/* "arrepentimientos." no cabe en celulares angostos con el tamaño normal. */
@media (max-width: 359px) {
  .section h2 { font-size: 1.85rem; }
}
@media (min-width: 620px) {
  .menu-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .flavor-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .steps { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .footer-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .hero-actions .btn { flex: 0 1 auto; }
  /* Ventanas centradas */
  .sheet {
    width: min(100% - 32px, 560px); max-height: min(100dvh - 32px, 880px);
    margin: auto; border-radius: var(--radius-l);
  }
  .sheet-wide { width: min(100% - 32px, 860px); }
  .drawer {
    width: min(100%, 480px); height: 100dvh; max-height: none;
    margin: 0 0 0 auto; border-radius: var(--radius-l) 0 0 var(--radius-l);
  }
}
@media (min-width: 960px) {
  html { scroll-padding-top: 84px; }
  .header-row { flex-wrap: nowrap; }
  .site-nav { order: 0; width: auto; gap: 32px; font-size: .95rem; }
  .brand img { width: 136px; }
  .hero { padding-block: 72px 88px; }
  .menu-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 20px; }
  .flavor-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .product-info { padding: 14px 16px 16px; }
  .product-name { font-size: 1.4rem; }
  .product-desc { font-size: .95rem; }
  .split { grid-template-columns: 1fr 1fr; gap: 56px; }
  .demo-slots { justify-self: end; }
  .protein-prices { justify-self: end; flex-direction: column; }
  .protein-prices dd { font-size: 2.6rem; }
  .steps { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .steps li { grid-template-columns: 1fr; grid-template-rows: auto; row-gap: 8px; }
  .steps li::before { grid-row: auto; font-size: 5.6rem; }
  .wholesale { grid-template-columns: 1fr auto; align-items: center; gap: 48px; }
  .prices th, .prices td { padding: 14px 20px; }
  .wa-float { display: none; }
  .site-footer { padding-bottom: 56px; }
  .toast { bottom: 24px; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
}
