:root {
  --bg: #fff8f3;
  --surface: #ffffff;
  --ink: #3b2a2f;
  --muted: #8a7479;
  --line: #f0dfd8;
  --accent: #d9577a;
  --accent-ink: #ffffff;
  --accent-soft: #fde7ee;
  --cream: #fff1e0;
  --whatsapp: #1f9d55;
  --radius: 18px;
  --shadow: 0 6px 24px rgba(91, 46, 58, 0.08);
  --font-head: "Fraunces", Georgia, serif;
  --font-body: "Nunito", system-ui, -apple-system, "Segoe UI", sans-serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.55;
}
body.no-scroll { overflow: hidden; }
h1, h2, h3 { font-family: var(--font-head); line-height: 1.15; margin: 0 0 .5em; }
a { color: var(--accent); }
[hidden] { display: none !important; }

/* Top bar */
.topbar {
  position: sticky; top: 0; z-index: 20;
  display: flex; align-items: center; justify-content: space-between;
  padding: 12px 16px;
  background: rgba(255, 248, 243, 0.92);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--line);
}
.brand { display: flex; align-items: center; gap: 8px; text-decoration: none; color: var(--ink); }
.brand-mark { font-size: 26px; }
.brand-name { font-family: var(--font-head); font-weight: 700; font-size: 22px; }
.cart-btn {
  display: inline-flex; align-items: center; gap: 6px;
  border: 0; border-radius: 999px; padding: 9px 14px;
  background: var(--ink); color: #fff; font: 700 15px var(--font-body); cursor: pointer;
}
.cart-count {
  min-width: 22px; height: 22px; padding: 0 6px; border-radius: 999px;
  background: var(--accent); display: inline-grid; place-items: center; font-size: 13px;
}
.cart-count.bump { animation: bump .35s ease; }
@keyframes bump { 50% { transform: scale(1.35); } }

/* Hero */
.hero {
  max-width: 760px; margin: 0 auto; padding: 56px 16px 32px; text-align: center;
}
.eyebrow { color: var(--accent); font-weight: 700; letter-spacing: .04em; font-size: 14px; margin: 0 0 12px; }
.hero h1 { font-size: clamp(32px, 6vw, 52px); }
.hero-sub { color: var(--muted); font-size: 18px; margin: 0 auto 24px; max-width: 560px; }

/* Steps */
.steps {
  max-width: 980px; margin: 0 auto; padding: 8px 16px 24px;
  display: grid; gap: 12px; grid-template-columns: repeat(3, 1fr);
}
.step {
  display: flex; gap: 12px; align-items: flex-start;
  background: var(--cream); border-radius: var(--radius); padding: 16px;
}
.step p { margin: 2px 0 0; color: var(--muted); font-size: 14px; }
.step-n {
  flex: none; width: 30px; height: 30px; border-radius: 50%;
  background: var(--accent); color: #fff; display: grid; place-items: center; font-weight: 700;
}

/* Menu */
.menu { max-width: 1100px; margin: 0 auto; padding: 32px 16px 64px; }
.menu h2 { font-size: 34px; text-align: center; }
.filters { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; margin: 8px 0 28px; }
.chip {
  border: 1px solid var(--line); background: var(--surface); color: var(--ink);
  border-radius: 999px; padding: 8px 16px; font: 600 15px var(--font-body); cursor: pointer;
}
.chip[aria-selected="true"] { background: var(--ink); border-color: var(--ink); color: #fff; }

.grid { display: grid; gap: 20px; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); }
.card {
  background: var(--surface); border-radius: var(--radius); box-shadow: var(--shadow);
  overflow: hidden; display: flex; flex-direction: column;
}
.card-media {
  aspect-ratio: 4 / 3; display: grid; place-items: center; font-size: 72px;
  background: linear-gradient(135deg, var(--accent-soft), var(--cream));
}
.card-media img { width: 100%; height: 100%; object-fit: cover; display: block; }
.card-body { padding: 16px; display: flex; flex-direction: column; flex: 1; }
.card-body h3 { font-size: 20px; margin-bottom: 4px; }
.card-desc { color: var(--muted); font-size: 14px; margin: 0 0 14px; flex: 1; }
.card-foot { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.price { font-weight: 700; font-size: 18px; }
.unit { display: block; color: var(--muted); font-size: 13px; font-weight: 600; }

/* Buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  border: 0; border-radius: 999px; padding: 12px 22px;
  font: 700 16px var(--font-body); text-decoration: none; cursor: pointer;
}
.btn-primary { background: var(--accent); color: var(--accent-ink); }
.btn-primary:hover { filter: brightness(.95); }
.btn-secondary { background: var(--ink); color: #fff; }
.btn-whatsapp { background: var(--whatsapp); color: #fff; }
.btn-link { background: none; color: var(--muted); padding: 8px; font-weight: 600; }
.btn-block { width: 100%; margin-top: 8px; }
.btn-add { padding: 9px 16px; font-size: 15px; }
.btn:focus-visible, .chip:focus-visible, .icon-btn:focus-visible, .qty button:focus-visible {
  outline: 3px solid var(--accent); outline-offset: 2px;
}

/* Quantity stepper */
.qty { display: inline-flex; align-items: center; border: 1px solid var(--line); border-radius: 999px; }
.qty button {
  width: 34px; height: 34px; border: 0; background: none; font-size: 18px; cursor: pointer; color: var(--ink);
  border-radius: 50%;
}
.qty span { min-width: 24px; text-align: center; font-weight: 700; }

/* Drawer */
.overlay { position: fixed; inset: 0; background: rgba(40, 20, 25, .4); z-index: 40; }
.drawer {
  position: fixed; top: 0; right: 0; bottom: 0; z-index: 50;
  width: min(420px, 100%); background: var(--surface);
  display: flex; flex-direction: column;
  transform: translateX(100%); transition: transform .25s ease;
  box-shadow: -8px 0 30px rgba(0,0,0,.12);
}
.drawer.open { transform: none; }
.drawer-head { display: flex; align-items: center; justify-content: space-between; padding: 16px; border-bottom: 1px solid var(--line); }
.drawer-head h2 { margin: 0; font-size: 24px; }
.icon-btn { border: 0; background: var(--bg); width: 38px; height: 38px; border-radius: 50%; font-size: 16px; cursor: pointer; color: var(--ink); }
.drawer-body { flex: 1; overflow-y: auto; padding: 8px 16px 16px; }
.drawer-foot { border-top: 1px solid var(--line); padding: 14px 16px 18px; }
.total-row { display: flex; justify-content: space-between; align-items: baseline; font-size: 18px; }
.total-row strong { font-size: 22px; }

.cart-list { list-style: none; margin: 0; padding: 0; }
.cart-item { display: flex; gap: 12px; align-items: center; padding: 12px 0; border-bottom: 1px solid var(--line); }
.cart-thumb { flex: none; width: 48px; height: 48px; border-radius: 12px; background: var(--accent-soft); display: grid; place-items: center; font-size: 26px; overflow: hidden; }
.cart-thumb img { width: 100%; height: 100%; object-fit: cover; }
.cart-info { flex: 1; min-width: 0; }
.cart-info strong { display: block; font-size: 15px; }
.cart-info .muted { font-size: 13px; }
.cart-line { font-weight: 700; white-space: nowrap; }
.empty { color: var(--muted); text-align: center; padding: 32px 0; }
.muted { color: var(--muted); }

/* Checkout form */
.checkout { display: flex; flex-direction: column; gap: 14px; padding-top: 8px; }
.checkout label { display: flex; flex-direction: column; gap: 6px; font-weight: 700; font-size: 15px; }
.checkout input:not([type="radio"]), .checkout textarea {
  font: 400 16px var(--font-body); color: var(--ink);
  border: 1px solid var(--line); border-radius: 12px; padding: 11px 12px; background: var(--bg);
}
.checkout input:focus, .checkout textarea:focus { outline: 2px solid var(--accent); border-color: transparent; }
.checkout fieldset { border: 0; padding: 0; margin: 0; display: flex; gap: 18px; flex-wrap: wrap; }
.checkout legend { font-weight: 700; font-size: 15px; margin-bottom: 6px; width: 100%; }
.checkout .radio { flex-direction: row; align-items: center; gap: 8px; font-weight: 600; }
.checkout .radio input { accent-color: var(--accent); width: 18px; height: 18px; }
.form-error { color: #b42318; background: #fef3f2; border-radius: 10px; padding: 10px 12px; margin: 0; font-size: 14px; }
.order-note { font-size: 14px; color: var(--muted); margin: 10px 0 2px; }

/* Toast */
.toast {
  position: fixed; left: 50%; bottom: 24px; transform: translate(-50%, 120px);
  background: var(--ink); color: #fff; padding: 10px 18px; border-radius: 999px;
  font-weight: 700; transition: transform .25s ease; z-index: 60; max-width: calc(100% - 32px);
}
.toast.show { transform: translate(-50%, 0); }

/* Footer */
.footer { text-align: center; padding: 28px 16px 40px; border-top: 1px solid var(--line); color: var(--muted); font-size: 14px; }
.footer p { margin: 4px 0; }

@media (max-width: 640px) {
  .steps { grid-template-columns: 1fr; }
  .hero { padding-top: 36px; }
  .grid { grid-template-columns: 1fr 1fr; gap: 12px; }
  .card-media { font-size: 52px; }
  .card-body { padding: 12px; }
  .card-body h3 { font-size: 16px; }
  .card-desc { display: none; }
  .card-foot { flex-direction: column; align-items: stretch; }
  .btn-add { width: 100%; }
}
@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; animation: none !important; scroll-behavior: auto !important; }
}
