/* ===== Paleta ===== */
:root {
  --salmon: #fe938c;
  --tan: #e6b89c;
  --cream: #ead2ac;
  --slate: #9cafb7;
  --wine: #540b0e;

  --bg: #fbf6ee;
  --surface: #ffffff;
  --ink: #2a0607;
  --ink-soft: #6b3a3b;
  --line: #ecdcc6;

  --radius: 18px;
  --font-display: "Bricolage Grotesque", system-ui, sans-serif;
  --font-body: "Figtree", system-ui, sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, monospace;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: var(--font-body);
  background: var(--bg);
  color: var(--ink);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}
a { color: var(--wine); text-decoration: none; }
a:hover { color: var(--ink); }
img { max-width: 100%; display: block; }
button { font: inherit; cursor: pointer; border: 0; background: none; color: inherit; }
h1, h2, h3 { font-family: var(--font-display); line-height: 1.05; letter-spacing: -0.02em; text-wrap: balance; }
p { text-wrap: pretty; }

.container { width: 100%; max-width: 1200px; margin: 0 auto; padding: 0 24px; }

/* ===== Botones ===== */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 14px 24px; border-radius: 999px; font-weight: 600; font-size: 15px;
  transition: transform .15s, background .15s, color .15s;
}
.btn:active { transform: scale(.97); }
.btn--primary { background: var(--wine); color: var(--bg); }
.btn--primary:hover { background: var(--ink); color: var(--bg); }
.btn--ghost { border: 1.5px solid var(--wine); color: var(--wine); }
.btn--ghost:hover { background: var(--wine); color: var(--bg); }
.btn--block { width: 100%; }
.btn--link { color: var(--ink-soft); padding: 10px; font-size: 14px; width: 100%; }
.btn--link:hover { color: var(--wine); }
.btn:disabled { opacity: .4; pointer-events: none; }

.icon-btn {
  width: 40px; height: 40px; border-radius: 50%;
  display: grid; place-items: center; background: var(--bg); font-size: 14px;
}
.icon-btn:hover { background: var(--cream); }

/* ===== Header ===== */
.header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(251, 246, 238, .88); backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line);
}
.header__inner { display: flex; align-items: center; gap: 32px; height: 72px; }
.logo { display: flex; align-items: center; gap: 10px; font-family: var(--font-display); font-weight: 800; font-size: 22px; color: var(--wine); }
.logo__mark { width: 26px; height: 26px; border-radius: 8px; background: var(--salmon); box-shadow: 6px 6px 0 var(--wine); transform: translate(-3px, -3px); }
.nav { display: flex; gap: 28px; margin-left: auto; }
.nav a { color: var(--ink-soft); font-weight: 500; font-size: 15px; }
.nav a:hover { color: var(--wine); }
.cart-btn {
  display: flex; align-items: center; gap: 10px;
  background: var(--wine); color: var(--bg);
  padding: 10px 10px 10px 20px; border-radius: 999px; font-weight: 600; font-size: 15px;
}
.cart-btn__count {
  min-width: 28px; height: 28px; padding: 0 8px; border-radius: 999px;
  background: var(--salmon); color: var(--wine); display: grid; place-items: center; font-size: 13px; font-weight: 700;
}
.cart-btn.bump .cart-btn__count { animation: bump .35s ease; }
@keyframes bump { 50% { transform: scale(1.35); } }

/* ===== Hero ===== */
.hero { padding: 72px 0 96px; }
.hero__inner { display: grid; grid-template-columns: 1.05fr 1fr; gap: 56px; align-items: center; }
.tag {
  display: inline-block; padding: 6px 14px; border-radius: 999px;
  background: var(--cream); color: var(--wine); font-weight: 600; font-size: 13px; margin-bottom: 24px;
}
.hero h1 { font-size: clamp(42px, 6vw, 76px); color: var(--wine); font-weight: 800; margin-bottom: 20px; }
.hero p { font-size: 19px; color: var(--ink-soft); max-width: 480px; margin-bottom: 32px; }
.hero__actions { display: flex; flex-wrap: wrap; gap: 12px; margin-bottom: 40px; }
.hero__facts { list-style: none; display: flex; gap: 40px; padding-top: 28px; border-top: 1px solid var(--line); }
.hero__facts li { display: flex; flex-direction: column; }
.hero__facts strong { font-family: var(--font-display); font-size: 28px; color: var(--wine); }
.hero__facts span { font-size: 14px; color: var(--ink-soft); }

.hero__visual { position: relative; }
.placeholder {
  display: flex; align-items: flex-end; padding: 16px; border-radius: var(--radius);
  background: repeating-linear-gradient(-45deg, var(--cream) 0 10px, #efdcbc 10px 20px);
}
.placeholder span { font-family: var(--font-mono); font-size: 12px; color: var(--ink-soft); background: rgba(255,255,255,.75); padding: 4px 8px; border-radius: 6px; }
.placeholder--hero { aspect-ratio: 4 / 5; border-radius: 28px; background: repeating-linear-gradient(-45deg, var(--tan) 0 12px, #ecc3aa 12px 24px); }
.hero__badge {
  position: absolute; left: -24px; bottom: 48px;
  display: flex; align-items: center; gap: 10px;
  background: var(--surface); padding: 14px 20px; border-radius: 14px;
  font-weight: 600; font-size: 15px; box-shadow: 0 12px 32px rgba(84, 11, 14, .14);
}
.hero__badge-dot { width: 10px; height: 10px; border-radius: 50%; background: var(--salmon); box-shadow: 0 0 0 4px rgba(254, 147, 140, .3); animation: pulse 1.6s infinite; }
@keyframes pulse { 50% { box-shadow: 0 0 0 9px rgba(254, 147, 140, 0); } }

/* ===== Secciones ===== */
.eyebrow { display: block; font-family: var(--font-mono); font-size: 13px; color: var(--ink-soft); margin-bottom: 12px; }
.eyebrow--light { color: var(--cream); }
h2 { font-size: clamp(32px, 4.4vw, 52px); color: var(--wine); font-weight: 800; }

/* ===== Catálogo ===== */
.catalog { padding: 96px 0; background: var(--surface); border-top: 1px solid var(--line); }
.section-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 24px; flex-wrap: wrap; margin-bottom: 32px; }
.search input {
  width: 300px; max-width: 100%; padding: 14px 20px; border-radius: 999px;
  border: 1.5px solid var(--line); background: var(--bg); font: inherit; color: var(--ink); outline: none;
}
.search input:focus { border-color: var(--slate); }

.filters { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 32px; }
.chip {
  padding: 9px 18px; border-radius: 999px; font-weight: 600; font-size: 14px;
  background: var(--bg); color: var(--ink-soft); border: 1.5px solid var(--line);
}
.chip:hover { border-color: var(--tan); color: var(--wine); }
.chip.active { background: var(--wine); color: var(--bg); border-color: var(--wine); }

.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 20px; }
.card {
  display: flex; flex-direction: column; background: var(--bg);
  border-radius: var(--radius); padding: 12px; border: 1px solid var(--line);
  transition: transform .2s, box-shadow .2s;
}
.card:hover { transform: translateY(-3px); box-shadow: 0 14px 30px rgba(84, 11, 14, .08); }
.card__img { aspect-ratio: 1; position: relative; }
.card__img.c1 { background: repeating-linear-gradient(-45deg, var(--cream) 0 10px, #efdcbc 10px 20px); }
.card__img.c2 { background: repeating-linear-gradient(-45deg, #f2cbb3 0 10px, var(--tan) 10px 20px); }
.card__img.c3 { background: repeating-linear-gradient(-45deg, #bccad0 0 10px, var(--slate) 10px 20px); }
.card__img.c4 { background: repeating-linear-gradient(-45deg, #ffb3ad 0 10px, var(--salmon) 10px 20px); }
.card__badge { position: absolute; top: 10px; left: 10px; background: var(--wine); color: var(--bg); font-size: 12px; font-weight: 700; padding: 4px 10px; border-radius: 999px; }
.card__body { padding: 14px 6px 6px; display: flex; flex-direction: column; gap: 2px; flex: 1; }
.card__cat { font-size: 12px; color: var(--ink-soft); text-transform: uppercase; letter-spacing: .06em; font-weight: 600; }
.card__name { font-weight: 600; font-size: 16px; }
.card__unit { font-size: 13px; color: var(--ink-soft); }
.card__foot { display: flex; align-items: center; justify-content: space-between; margin-top: auto; padding-top: 14px; }
.card__price { font-family: var(--font-display); font-weight: 700; font-size: 22px; color: var(--wine); }
.card__price s { font-family: var(--font-body); font-size: 13px; color: var(--ink-soft); font-weight: 400; margin-left: 4px; }
.add-btn {
  width: 44px; height: 44px; border-radius: 50%; background: var(--wine); color: var(--bg);
  font-size: 22px; display: grid; place-items: center; transition: background .15s;
}
.add-btn:hover { background: var(--salmon); color: var(--wine); }

.qty { display: flex; align-items: center; gap: 4px; background: var(--surface); border-radius: 999px; padding: 3px; border: 1px solid var(--line); }
.qty button { width: 34px; height: 34px; border-radius: 50%; background: var(--cream); color: var(--wine); font-weight: 700; font-size: 17px; }
.qty button:hover { background: var(--salmon); }
.qty span { min-width: 22px; text-align: center; font-weight: 700; font-size: 15px; }

.empty { text-align: center; padding: 48px; color: var(--ink-soft); }

/* ===== Delivery ===== */
.delivery { padding: 96px 0; background: var(--wine); color: var(--bg); }
.delivery h2 { color: var(--bg); margin-bottom: 48px; }
.steps { list-style: none; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; margin-bottom: 20px; }
.step { background: rgba(255, 255, 255, .06); border: 1px solid rgba(234, 210, 172, .2); border-radius: var(--radius); padding: 28px; }
.step__num {
  width: 44px; height: 44px; border-radius: 12px; background: var(--salmon); color: var(--wine);
  display: grid; place-items: center; font-family: var(--font-display); font-weight: 800; font-size: 20px; margin-bottom: 40px;
}
.step h3 { font-size: 26px; margin-bottom: 8px; }
.step p { color: var(--cream); }
.zones { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; }
.zone { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 22px 28px; border-radius: var(--radius); background: var(--cream); color: var(--wine); }
.zone span { font-size: 15px; font-weight: 500; }
.zone strong { font-family: var(--font-display); font-size: 22px; }
.zone--accent { background: var(--salmon); }

/* ===== Footer ===== */
.footer { padding: 48px 0; }
.footer__inner { display: flex; justify-content: space-between; align-items: center; gap: 24px; flex-wrap: wrap; }
.footer p { color: var(--ink-soft); font-size: 14px; margin-top: 8px; }
.footer__links { display: flex; gap: 24px; font-weight: 600; }

/* ===== Drawer carrito ===== */
.overlay { position: fixed; inset: 0; background: rgba(42, 6, 7, .4); opacity: 0; pointer-events: none; transition: opacity .25s; z-index: 90; }
.overlay.open { opacity: 1; pointer-events: auto; }
.drawer {
  position: fixed; top: 0; right: 0; height: 100%; width: 420px; max-width: 100%;
  background: var(--surface); z-index: 100; display: flex; flex-direction: column;
  transform: translateX(100%); transition: transform .3s cubic-bezier(.2, .8, .2, 1);
}
.drawer.open { transform: none; }
.drawer__head { display: flex; justify-content: space-between; align-items: center; padding: 20px 24px; border-bottom: 1px solid var(--line); }
.drawer__head h3 { font-size: 24px; color: var(--wine); }
.drawer__body { flex: 1; overflow-y: auto; padding: 16px 24px; }
.drawer__foot { padding: 20px 24px; border-top: 1px solid var(--line); background: var(--bg); }

.cart-list { list-style: none; }
.cart-item { display: grid; grid-template-columns: 56px 1fr auto; gap: 14px; align-items: center; padding: 14px 0; border-bottom: 1px solid var(--line); }
.cart-item__img { width: 56px; height: 56px; border-radius: 12px; }
.cart-item__name { font-weight: 600; font-size: 15px; }
.cart-item__price { font-size: 14px; color: var(--ink-soft); }
.cart-item .qty button { width: 28px; height: 28px; font-size: 15px; }
.cart-empty { text-align: center; padding: 64px 0; color: var(--ink-soft); display: flex; flex-direction: column; align-items: center; gap: 20px; }

.totals { display: flex; flex-direction: column; gap: 6px; margin-bottom: 12px; font-size: 15px; }
.totals div { display: flex; justify-content: space-between; color: var(--ink-soft); }
.totals__total { color: var(--ink) !important; font-weight: 700; font-size: 19px; padding-top: 8px; border-top: 1px dashed var(--line); margin-top: 4px; }
.free-hint { font-size: 13px; color: var(--wine); background: var(--cream); padding: 8px 12px; border-radius: 10px; margin-bottom: 14px; }
.free-hint:empty { display: none; }

.checkout { display: flex; flex-direction: column; gap: 14px; }
.checkout label { display: flex; flex-direction: column; gap: 6px; font-size: 14px; font-weight: 600; }
.checkout input, .checkout select, .checkout textarea {
  font: inherit; font-weight: 400; padding: 12px 14px; border-radius: 12px;
  border: 1.5px solid var(--line); background: var(--bg); color: var(--ink); outline: none; resize: vertical;
}
.checkout input:focus, .checkout select:focus, .checkout textarea:focus { border-color: var(--slate); }
.pay { border: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.pay legend { font-size: 14px; font-weight: 600; margin-bottom: 6px; }
.pay label { flex-direction: row; align-items: center; gap: 6px; padding: 10px 14px; border-radius: 999px; border: 1.5px solid var(--line); font-weight: 500; cursor: pointer; }
.pay label:has(input:checked) { border-color: var(--wine); background: var(--cream); }
.pay input { accent-color: var(--wine); }

.done { text-align: center; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 14px; }
.done__check { width: 72px; height: 72px; border-radius: 50%; background: var(--salmon); color: var(--wine); display: grid; place-items: center; font-size: 32px; font-weight: 700; }
.done h3 { font-size: 28px; color: var(--wine); }
.done p { color: var(--ink-soft); max-width: 280px; }

/* ===== Toast ===== */
.toast {
  position: fixed; left: 50%; bottom: 24px; transform: translate(-50%, 120px);
  background: var(--ink); color: var(--bg); padding: 12px 20px; border-radius: 999px;
  font-size: 14px; font-weight: 600; transition: transform .3s; z-index: 120;
}
.toast.show { transform: translate(-50%, 0); }

/* ===== Responsive ===== */
@media (max-width: 900px) {
  .hero__inner { grid-template-columns: 1fr; }
  .hero__visual { order: -1; }
  .placeholder--hero { aspect-ratio: 16 / 10; }
  .hero__badge { left: 16px; bottom: 16px; }
  .steps, .zones { grid-template-columns: 1fr; }
  .step__num { margin-bottom: 20px; }
}
@media (max-width: 640px) {
  .nav { display: none; }
  .cart-btn { margin-left: auto; }
  .hero { padding: 32px 0 64px; }
  .catalog, .delivery { padding: 64px 0; }
  .grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
  .card__price { font-size: 18px; }
  .add-btn { width: 40px; height: 40px; }
  .search, .search input { width: 100%; }
}
