:root {
  --bg: #faf7f2;
  --surface: #ffffff;
  --surface-2: #f1ece4;
  --slice: #f6e7cf;
  --text: #2a2118;
  --muted: #8a7d6b;
  --accent: #16a34a;
  --accent-dark: #15803d;
  --border: #e7e0d6;
  --radius: 16px;
  --shadow: 0 6px 22px rgba(40, 30, 15, .08);
}

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; }
body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.45;
}

.topbar {
  position: sticky; top: 0; z-index: 30;
  display: flex; align-items: center; justify-content: space-between;
  padding: 12px 16px; background: var(--surface);
  border-bottom: 1px solid var(--border);
}
.brand { display: flex; align-items: center; gap: 10px; }
.logo {
  width: 38px; height: 38px; border-radius: 12px;
  background: var(--accent); color: #fff;
  display: grid; place-items: center; font-weight: 800; font-size: 15px;
}
.brand h1 { font-size: 16px; margin: 0; line-height: 1.1; }
.tagline { font-size: 12px; color: var(--muted); margin: 0; }
.back { color: var(--muted); text-decoration: none; font-size: 13px; font-weight: 600; margin-right: 4px; }

.cart-fab {
  position: relative; border: none; background: var(--surface-2);
  border-radius: 14px; padding: 10px 14px; font-size: 18px; cursor: pointer;
}
.badge {
  position: absolute; top: -6px; right: -6px;
  background: var(--accent); color: #fff; font-size: 11px; font-weight: 700;
  min-width: 18px; height: 18px; border-radius: 9px; display: grid; place-items: center; padding: 0 4px;
}

.container { max-width: 560px; margin: 0 auto; padding: 16px 16px 60px; }
.lead { text-align: center; color: var(--muted); margin: 4px 0 14px; font-size: 14px; }

.sizes { display: flex; gap: 8px; justify-content: center; margin-bottom: 14px; flex-wrap: wrap; }
.size-chip {
  border: 1.5px solid var(--border); background: var(--surface);
  border-radius: 999px; padding: 9px 16px; font-size: 14px; font-weight: 600;
  cursor: pointer; color: var(--text);
}
.size-chip.active { background: var(--accent); border-color: var(--accent); color: #fff; }

.pizza-wrap { display: flex; flex-direction: column; align-items: center; gap: 8px; }
#pizza { width: 240px; max-width: 70vw; height: auto; filter: drop-shadow(0 8px 14px rgba(40,30,15,.12)); }
.pizza-price { font-size: 22px; font-weight: 800; }
.hint { text-align: center; color: var(--muted); font-size: 13px; margin: 4px 0 16px; min-height: 18px; }

.flavors h3 { font-size: 13px; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); margin: 16px 0 8px; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip {
  border: 1.5px solid var(--border); background: var(--surface);
  border-radius: 999px; padding: 8px 13px; font-size: 13.5px; cursor: pointer; color: var(--text);
}
.chip.active { background: var(--accent); border-color: var(--accent); color: #fff; }

.btn-primary {
  border: none; background: var(--accent); color: #fff;
  border-radius: 14px; padding: 14px 18px; font-size: 16px; font-weight: 700; cursor: pointer;
}
.btn-primary:disabled { background: var(--surface-2); color: var(--muted); cursor: not-allowed; }
.btn-primary.full { width: 100%; margin-top: 18px; }

.bebidas { margin-top: 30px; }
.beb-list { display: flex; flex-wrap: wrap; gap: 8px; }
.beb {
  display: flex; align-items: center; justify-content: space-between;
  gap: 10px; border: 1.5px solid var(--border); background: var(--surface);
  border-radius: 12px; padding: 10px 12px; min-width: 150px; cursor: pointer;
}
.beb:hover { border-color: var(--accent); }
.beb span { font-size: 14px; }
.beb small { color: var(--muted); }

.drawer-scrim { position: fixed; inset: 0; background: rgba(0,0,0,.4); opacity: 0; pointer-events: none; transition: opacity .2s; z-index: 40; }
.drawer-scrim.open { opacity: 1; pointer-events: auto; }
.drawer {
  position: fixed; top: 0; right: 0; height: 100%; width: min(420px, 92vw);
  background: var(--surface); z-index: 50; transform: translateX(100%);
  transition: transform .25s ease; display: flex; flex-direction: column; box-shadow: var(--shadow);
}
.drawer.open { transform: translateX(0); }
.drawer-head { display: flex; align-items: center; justify-content: space-between; padding: 16px; border-bottom: 1px solid var(--border); }
.drawer-head h2 { margin: 0; font-size: 18px; }
.drawer-close { border: none; background: none; font-size: 28px; line-height: 1; cursor: pointer; color: var(--muted); }
.drawer-items { flex: 1; overflow-y: auto; padding: 12px 16px; }
.cart-item { display: flex; align-items: flex-start; gap: 10px; padding: 10px 0; border-bottom: 1px solid var(--border); }
.cart-item .ci-main { flex: 1; }
.cart-item .ci-name { font-weight: 600; font-size: 14.5px; }
.cart-item .ci-detail { font-size: 12.5px; color: var(--muted); }
.cart-item .ci-price { font-weight: 700; }
.cart-qty { display: flex; align-items: center; gap: 8px; margin-top: 4px; }
.cart-qty button { width: 26px; height: 26px; border-radius: 8px; border: 1px solid var(--border); background: var(--surface-2); cursor: pointer; font-size: 16px; line-height: 1; }
.cart-remove { border: none; background: none; color: #c0392b; font-size: 12px; cursor: pointer; padding: 0; }
.drawer-total { padding: 12px 16px; font-size: 17px; font-weight: 800; border-top: 1px solid var(--border); }
.checkout { padding: 0 16px 18px; border-top: 1px solid var(--border); }
.field { margin-top: 14px; }
.field > span { display: block; font-size: 13px; font-weight: 600; margin-bottom: 6px; color: var(--muted); }
.radio { display: block; font-size: 14px; margin: 4px 0; cursor: pointer; }
.field input[type=text], .field select, .field textarea {
  width: 100%; border: 1.5px solid var(--border); border-radius: 10px; padding: 10px 12px; font-size: 14px; font-family: inherit; background: var(--surface);
}

.toast {
  position: fixed; bottom: 22px; left: 50%; transform: translateX(-50%) translateY(20px);
  background: var(--text); color: #fff; padding: 11px 18px; border-radius: 999px; font-size: 14px;
  opacity: 0; pointer-events: none; transition: all .25s; z-index: 60;
}
.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }
