/* ============ Gennaro Pizza y Focaccia · Landing (trattoria verde bottiglia) ============ */
:root {
  --crema:     #f5efe2;   /* fondo base (harina/masa) */
  --crema-2:   #fffdf7;   /* tarjetas / superficies */
  --crema-3:   #ece3d0;   /* alterno sutil */
  --line:      #e2d8c2;   /* bordes */
  --text:      #24221c;   /* texto principal */
  --muted:     #776d5b;   /* texto secundario */
  --verde:     #14362b;   /* verde botella profundo (hero/footer/marca) */
  --verde-2:   #1e4d3a;   /* verde medio */
  --verde-soft:#dfe7de;   /* verde muy claro (fondos suaves) */
  --tomate:    #c23b2e;   /* rojo tomate (precios / CTA) */
  --tomate-2:  #a72f24;
  --oliva:     #c39a3f;   /* dorado oliva (detalles / filetes) */
  --accent:    #c23b2e;   /* alias (JS lo sobreescribe con primaryColor) */
  --accent-ink:#ffffff;
  --wa:        #1faf54;
  --wa-ink:    #ffffff;

  --font-display: "Fraunces", Georgia, "Times New Roman", serif;
  --font:         "Inter", system-ui, -apple-system, Segoe UI, Roboto, sans-serif;

  --radius:    16px;
  --radius-sm: 11px;
  --shadow:    0 18px 40px -22px rgba(20,54,43,.5);
  --shadow-sm: 0 6px 18px -12px rgba(20,54,43,.35);
  --header-h:  64px;
  --maxw:      1080px;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }

html { scroll-behavior: smooth; scroll-padding-top: calc(var(--header-h) + 58px); }
body {
  margin: 0;
  font-family: var(--font);
  background: var(--crema);
  color: var(--text);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  padding-bottom: env(safe-area-inset-bottom);
}
.wrap { width: 100%; max-width: var(--maxw); margin: 0 auto; padding: 0 20px; }
img { display: block; max-width: 100%; }
button { font-family: inherit; cursor: pointer; }
.muted { color: var(--muted); }

/* Filete dorado (firma tipo menú de trattoria): doble hairline con oliva */
.checker {
  height: 6px;
  background: var(--verde);
  border-top: 1px solid var(--oliva);
  border-bottom: 1px solid var(--oliva);
  box-shadow: inset 0 0 0 2px var(--verde), inset 0 0 0 3px rgba(195,154,63,.55);
}

/* ---------- Header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 40;
  height: var(--header-h);
  display: flex; align-items: center;
  background: rgba(245,239,226,.88);
  backdrop-filter: saturate(150%) blur(12px);
  border-bottom: 1px solid transparent;
  transition: border-color .25s, box-shadow .25s;
}
.site-header.scrolled { border-bottom-color: var(--line); box-shadow: 0 6px 20px -14px rgba(20,54,43,.4); }
.header-inner { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.brand { display: flex; align-items: center; gap: 12px; text-decoration: none; color: var(--verde); min-width: 0; }
.brand-mark {
  width: 42px; height: 42px; flex: 0 0 42px; display: grid; place-items: center;
  background: var(--verde); color: var(--crema); border-radius: 50%;
  font-family: var(--font-display); font-weight: 900; font-size: 22px; line-height: 1;
  border: 1.5px solid var(--oliva);
}
.brand-mark img { width: 100%; height: 100%; object-fit: contain; border-radius: 50%; }
.brand-text { display: flex; flex-direction: column; min-width: 0; line-height: 1.1; }
.brand-name { font-family: var(--font-display); font-weight: 900; font-size: 19px; letter-spacing: -.2px; color: var(--verde); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.brand-tag { font-size: 11px; letter-spacing: .12em; text-transform: uppercase; color: var(--oliva); font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

.cart-pill {
  position: relative; display: inline-flex; align-items: center; justify-content: center;
  width: 44px; height: 44px;
  border: 1.5px solid var(--verde); border-radius: 12px;
  background: var(--crema-2); color: var(--verde);
  transition: transform .12s, background .2s;
}
.cart-pill:active { transform: scale(.92); }
.cart-pill.bump { animation: bump .35s; }
.cart-count {
  position: absolute; top: -8px; right: -8px;
  min-width: 21px; height: 21px; padding: 0 5px;
  display: grid; place-items: center;
  font-size: 11px; font-weight: 800;
  background: var(--tomate); color: #fff;
  border-radius: 999px; border: 2px solid var(--crema);
  transform: scale(0); transition: transform .2s cubic-bezier(.2,1.4,.4,1);
}
.cart-count.show { transform: scale(1); }

/* ---------- Hero ---------- */
.hero { position: relative; background: var(--verde); overflow: hidden; }
.hero::before {
  /* textura sutil de puntos (masa) sobre el verde */
  content: ""; position: absolute; inset: 0; opacity: .5; pointer-events: none;
  background-image: radial-gradient(rgba(195,154,63,.10) 1px, transparent 1.4px);
  background-size: 22px 22px;
}
.hero-inner { position: relative; text-align: center; padding: 40px 20px 38px; }
.hero-kicker {
  display: inline-block; margin: 0 0 20px;
  font-size: 12px; font-weight: 800; letter-spacing: .16em; text-transform: uppercase;
  color: var(--verde); background: var(--oliva);
  padding: 8px 16px; border-radius: 999px;
}
.hero-logo { display: block; width: min(420px, 82%); margin: 0 auto; }
.hero-title {
  margin: 0; font-family: var(--font-display); font-weight: 900;
  font-size: clamp(40px, 9vw, 82px); line-height: .98; letter-spacing: -.5px;
  color: var(--crema);
}
.hero-sub { margin: 18px auto 0; max-width: 460px; color: rgba(245,239,226,.82); font-size: 16.5px; font-weight: 400; }
.hero-meta { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; margin-top: 22px; }
.chip-meta {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: 13px; font-weight: 600; color: var(--crema);
  background: rgba(255,255,255,.08); border: 1px solid rgba(195,154,63,.4);
  padding: 7px 14px; border-radius: 999px;
}
.chip-meta svg { color: var(--oliva); }
.hero-photo { position: relative; height: clamp(200px, 42vw, 340px); background: url("assets/hero-bg.png") center 45% / cover no-repeat; }

/* Cinta de marca (elegante, no diner) */
.papas-ribbon {
  display: flex; align-items: center; justify-content: center; gap: 18px; flex-wrap: wrap;
  background: var(--crema-2); color: var(--verde);
  font-family: var(--font-display); font-weight: 600; font-style: italic;
  font-size: clamp(14px, 3.2vw, 18px); letter-spacing: .2px;
  padding: 14px 20px; text-align: center;
  border-bottom: 1px solid var(--line);
}
.papas-ribbon .dot { color: var(--oliva); font-style: normal; }

/* ---------- Category nav ---------- */
.catnav {
  position: sticky; top: var(--header-h); z-index: 30;
  background: rgba(245,239,226,.95);
  backdrop-filter: saturate(150%) blur(12px);
  border-bottom: 1px solid var(--line);
}
.catnav-inner { display: flex; gap: 8px; overflow-x: auto; padding: 12px 20px; scrollbar-width: none; -ms-overflow-style: none; }
.catnav-inner::-webkit-scrollbar { display: none; }
.cat-chip {
  flex: 0 0 auto; font-size: 13.5px; font-weight: 700; white-space: nowrap;
  color: var(--verde); background: var(--crema-2); border: 1.5px solid var(--line);
  padding: 9px 16px; border-radius: 999px; transition: all .16s;
}
.cat-chip:hover { border-color: var(--verde); }
.cat-chip.active { color: var(--crema); background: var(--verde); border-color: var(--verde); }

/* ---------- Content / sections ---------- */
.content { padding: 30px 0 44px; }
.cat-section { scroll-margin-top: calc(var(--header-h) + 64px); margin-bottom: 42px; }
.cat-title {
  display: flex; align-items: center; gap: 16px; margin: 0 0 18px;
  font-family: var(--font-display); font-weight: 900; font-size: clamp(24px, 5vw, 34px);
  color: var(--verde); letter-spacing: -.3px;
}
/* filete dorado doble (detalle de carta italiana) */
.cat-title::after {
  content: ""; flex: 1; height: 5px;
  border-top: 1.5px solid var(--oliva);
  border-bottom: 1.5px solid var(--oliva);
}

/* Promos */
.promos { margin-bottom: 42px; }
.promo-grid { display: grid; gap: 14px; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); }
.promo-card {
  position: relative; overflow: hidden; border-radius: var(--radius); padding: 20px;
  background: var(--verde); color: var(--crema); border: 1px solid var(--oliva); box-shadow: var(--shadow-sm);
}
.promo-card .badge {
  display: inline-block; font-size: 11px; font-weight: 800; letter-spacing: .12em; text-transform: uppercase;
  color: var(--verde); background: var(--oliva); padding: 4px 10px; border-radius: 6px; margin-bottom: 12px;
}
.promo-card h3 { margin: 0 0 6px; font-family: var(--font-display); font-weight: 700; font-size: 19px; color: var(--crema); }
.promo-card p { margin: 0 0 16px; font-size: 13.5px; color: rgba(245,239,226,.75); }
.promo-foot { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.promo-price { font-family: var(--font-display); font-weight: 900; font-size: 24px; color: var(--oliva); }

/* Product grid */
.prod-grid { display: grid; gap: 14px; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); }
.card {
  display: flex; gap: 15px; align-items: stretch;
  background: var(--crema-2); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 13px; box-shadow: var(--shadow-sm); transition: border-color .2s, transform .2s, box-shadow .2s;
  cursor: pointer;
}
.card:hover { border-color: var(--oliva); transform: translateY(-2px); box-shadow: var(--shadow); }
.card:active { transform: translateY(0); }
.card-img {
  position: relative; flex: 0 0 98px; width: 98px; height: 98px;
  border-radius: var(--radius-sm); overflow: hidden; background: var(--crema-3);
  display: grid; place-items: center;
}
.card-img img { width: 100%; height: 100%; object-fit: cover; }
.card-img .ph { font-family: var(--font-display); font-weight: 900; font-size: 30px; color: var(--verde-soft); }
.card.has-img .card-img::after {
  content: "⤢"; position: absolute; right: 5px; bottom: 5px;
  width: 22px; height: 22px; display: grid; place-items: center;
  font-size: 12px; color: #fff; background: rgba(20,54,43,.72); border-radius: 7px; opacity: 0; transition: opacity .2s;
}
.card.has-img:hover .card-img::after { opacity: 1; }
.card-body { display: flex; flex-direction: column; min-width: 0; flex: 1; }
.card-name { margin: 0; font-family: var(--font-display); font-weight: 700; font-size: 17px; letter-spacing: -.2px; color: var(--verde); }
.card-desc {
  margin: 5px 0 0; font-size: 12.5px; color: var(--muted); line-height: 1.5;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.card-foot { margin-top: auto; padding-top: 12px; display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.price { font-family: var(--font-display); font-weight: 900; font-size: 21px; color: var(--tomate); letter-spacing: 0; }

/* Add button + stepper */
.add-btn {
  display: inline-flex; align-items: center; gap: 6px; font-size: 13.5px; font-weight: 700;
  color: #fff; background: var(--tomate); border: none; border-radius: 10px; padding: 10px 16px;
  box-shadow: 0 6px 16px -6px rgba(194,59,46,.55); transition: transform .12s, background .2s;
}
.add-btn:hover { background: var(--tomate-2); }
.add-btn:active { transform: scale(.94); }
.stepper { display: inline-flex; align-items: center; gap: 2px; background: var(--crema-3); border: 1.5px solid var(--line); border-radius: 10px; padding: 3px; }
.stepper button {
  width: 30px; height: 30px; border: none; border-radius: 8px; background: transparent;
  color: var(--verde); font-size: 18px; font-weight: 800; display: grid; place-items: center; transition: background .15s;
}
.stepper button:hover { background: var(--crema-2); }
.stepper .qty { min-width: 26px; text-align: center; font-weight: 800; font-size: 14px; color: var(--verde); }

/* ---------- Cart bar ---------- */
.cartbar {
  position: fixed; left: 50%; transform: translateX(-50%) translateY(160%);
  bottom: calc(14px + env(safe-area-inset-bottom)); z-index: 45;
  width: min(560px, calc(100% - 28px));
  display: flex; align-items: center; justify-content: space-between; padding: 15px 20px;
  background: var(--verde); color: var(--crema); border: 1px solid var(--oliva); border-radius: 15px;
  box-shadow: 0 16px 36px -12px rgba(20,54,43,.6);
  font-weight: 700; font-size: 15px; transition: transform .3s cubic-bezier(.2,1,.3,1);
}
.cartbar.show { transform: translateX(-50%) translateY(0); }
.cartbar-left { display: flex; align-items: center; gap: 10px; }
.cartbar-count { display: grid; place-items: center; min-width: 24px; height: 24px; padding: 0 6px; background: var(--oliva); color: var(--verde); border-radius: 999px; font-size: 13px; font-weight: 800; }
.cartbar-total { font-family: var(--font-display); font-weight: 900; font-size: 19px; color: var(--oliva); }

/* ---------- Drawer ---------- */
.drawer-backdrop { position: fixed; inset: 0; z-index: 50; background: rgba(20,54,43,.5); backdrop-filter: blur(2px); opacity: 0; transition: opacity .25s; }
.drawer-backdrop.show { opacity: 1; }
.drawer {
  position: fixed; top: 0; right: 0; z-index: 55; width: min(420px, 100%); height: 100dvh;
  display: flex; flex-direction: column; background: var(--crema); border-left: 1px solid var(--line);
  transform: translateX(100%); transition: transform .3s cubic-bezier(.2,1,.3,1);
}
.drawer.show { transform: translateX(0); }
.drawer-head { display: flex; align-items: center; justify-content: space-between; padding: 20px; border-bottom: 1px solid var(--line); }
.drawer-head h2 { margin: 0; font-family: var(--font-display); font-weight: 900; font-size: 23px; color: var(--verde); letter-spacing: -.3px; }
.icon-btn { width: 36px; height: 36px; border-radius: 10px; border: 1.5px solid var(--line); background: var(--crema-2); color: var(--verde); font-size: 16px; }
.drawer-body { flex: 1; overflow-y: auto; padding: 12px 20px; }
.cart-empty { text-align: center; color: var(--muted); padding: 50px 10px; }
.cart-empty .em { font-size: 40px; }
.cart-line { display: flex; gap: 12px; padding: 14px 0; border-bottom: 1px solid var(--line); }
.cart-line:last-child { border-bottom: none; }
.cart-line .ci-img { flex: 0 0 52px; width: 52px; height: 52px; border-radius: 10px; overflow: hidden; background: var(--crema-3); display: grid; place-items: center; }
.cart-line .ci-img img { width: 100%; height: 100%; object-fit: cover; }
.cart-line .ci-img .ph { font-family: var(--font-display); font-weight: 900; font-size: 18px; color: var(--verde-soft); }
.ci-body { flex: 1; min-width: 0; }
.ci-name { font-weight: 700; font-size: 14px; color: var(--verde); }
.ci-price { font-size: 12.5px; color: var(--muted); margin-top: 2px; }
.ci-controls { display: flex; align-items: center; justify-content: space-between; margin-top: 8px; gap: 10px; }
.ci-sub { font-family: var(--font-display); font-weight: 900; font-size: 15px; color: var(--tomate); }

.drawer-foot { border-top: 1px solid var(--line); padding: 16px 20px calc(18px + env(safe-area-inset-bottom)); background: var(--crema-2); }
.notes-field { display: block; margin-bottom: 12px; }
.notes-field span { display: block; font-size: 12px; color: var(--muted); margin-bottom: 6px; }
.notes-field textarea {
  width: 100%; resize: none; background: var(--crema); color: var(--text);
  border: 1.5px solid var(--line); border-radius: 12px; padding: 11px 13px; font-family: inherit; font-size: 14px;
}
.notes-field textarea:focus { outline: none; border-color: var(--verde); }
.total-row { display: flex; align-items: center; justify-content: space-between; margin-bottom: 12px; font-size: 15px; color: var(--verde); }
.total-row strong { font-family: var(--font-display); font-weight: 900; font-size: 26px; color: var(--tomate); }

.btn { display: inline-flex; align-items: center; justify-content: center; gap: 9px; width: 100%; font-weight: 700; font-size: 16px; border: none; border-radius: 14px; padding: 15px; }
.btn-wa { background: var(--wa); color: #fff; transition: filter .2s, transform .12s; box-shadow: 0 10px 22px -10px rgba(31,175,84,.6); }
.btn-wa:hover { filter: brightness(1.05); }
.btn-wa:active { transform: scale(.98); }
.btn-wa[disabled] { opacity: .45; pointer-events: none; box-shadow: none; }
.btn-ghost { background: var(--crema-2); color: var(--verde); border: 1.5px solid var(--line); width: auto; padding: 12px 20px; }
.checkout-note { margin: 10px 0 0; text-align: center; font-size: 11.5px; color: var(--muted); }

/* ---------- Product detail modal ---------- */
.modal-backdrop {
  position: fixed; inset: 0; z-index: 60; display: flex; align-items: center; justify-content: center; padding: 18px;
  background: rgba(20,54,43,.55); backdrop-filter: blur(3px); opacity: 0; transition: opacity .22s;
}
.modal-backdrop.show { opacity: 1; }
.modal {
  position: relative; width: min(440px, 100%); min-width: 0; max-width: 100%; max-height: 92dvh; overflow: hidden;
  display: flex; flex-direction: column; background: var(--crema-2); border-radius: 20px; box-shadow: 0 26px 64px -22px rgba(20,54,43,.6);
}
.modal-close { position: absolute; top: 12px; right: 12px; z-index: 3; width: 36px; height: 36px; border-radius: 50%; border: none; background: rgba(20,54,43,.78); color: #fff; font-size: 16px; backdrop-filter: blur(4px); }
.modal-img { width: 100%; background: var(--crema-3); display: grid; place-items: center; }
.modal-img img { width: 100%; height: auto; max-height: 52dvh; object-fit: contain; display: block; }
.modal-img .ph { font-family: var(--font-display); font-weight: 900; font-size: 64px; color: var(--verde-soft); padding: 50px 0; }
.modal-body { padding: 20px 22px 22px; overflow-y: auto; }
.modal-name { margin: 0; font-family: var(--font-display); font-weight: 700; font-size: 24px; letter-spacing: -.3px; color: var(--verde); }
.modal-desc { margin: 10px 0 0; color: var(--muted); font-size: 14.5px; line-height: 1.6; }
.modal-foot { display: flex; align-items: center; justify-content: space-between; gap: 14px; margin-top: 22px; }
.modal-price { font-family: var(--font-display); font-weight: 900; font-size: 28px; color: var(--tomate); }
.modal-foot .add-btn { font-size: 15px; padding: 12px 20px; }
.modal-foot .stepper { transform: scale(1.05); }

/* ---------- Footer ---------- */
.site-footer { position: relative; background: var(--verde); color: var(--crema); padding: 40px 0 42px; text-align: center; border-top: 2px solid var(--oliva); }
.site-footer p { margin: 0; }
.site-footer #footerBrand { font-family: var(--font-display); font-weight: 900; font-size: 24px; letter-spacing: -.3px; margin-bottom: 6px; }
.site-footer .muted { color: rgba(245,239,226,.7); font-size: 13px; }
.site-footer .footer-credit { margin-top: 16px; font-size: 12.5px; color: rgba(245,239,226,.5); }
.site-footer .footer-credit a { color: var(--oliva); font-weight: 700; text-decoration: none; border-bottom: 1.5px solid var(--oliva); padding-bottom: 1px; }
.site-footer .footer-credit a:hover { color: var(--crema); }

/* ---------- States / skeleton ---------- */
.state { text-align: center; padding: 60px 16px; }
.state-emoji { font-size: 48px; margin-bottom: 8px; }
.state h2 { margin: 0 0 6px; font-family: var(--font-display); color: var(--verde); }
.state p { color: var(--muted); margin: 0 0 18px; }
.skeleton-grid { display: grid; gap: 14px; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); padding-top: 30px; }
.sk-card { height: 124px; border-radius: var(--radius); background: linear-gradient(100deg, var(--crema-2) 30%, var(--crema-3) 50%, var(--crema-2) 70%); background-size: 200% 100%; animation: shimmer 1.3s infinite; }

@keyframes shimmer { to { background-position: -200% 0; } }
@keyframes bump { 0%,100%{transform:scale(1)} 30%{transform:scale(1.18)} }

@media (max-width: 560px) {
  .card-img { flex: 0 0 86px; width: 86px; height: 86px; }
  .cat-title { font-size: 23px; }
  .hero-inner { padding: 32px 18px 30px; }
}
@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; transition: none !important; scroll-behavior: auto; }
}
