:root {
  --red: #E30613;
  --red-dark: #a10410;
  --navy: #17213E;
  --black: #1D1D1B;
  --white: #FFFFFF;
  --cream: #FFF7EC;
  --green: #1e8e3e;

  --font-display: 'Bebas Neue', sans-serif;
  --font-body: 'Poppins', sans-serif;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }

body {
  font-family: var(--font-body);
  color: var(--navy);
  background: var(--cream);
  line-height: 1.5;
  padding-bottom: 5rem;
}

img { max-width: 100%; display: block; }

.container {
  width: 100%;
  max-width: 720px;
  margin: 0 auto;
  padding: 0 1rem;
}

a { color: inherit; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  font-family: var(--font-display);
  letter-spacing: 0.03em;
  font-size: 1.1rem;
  padding: 0.8rem 1.6rem;
  border-radius: 999px;
  text-decoration: none;
  border: 2px solid transparent;
  cursor: pointer;
  transition: transform 0.15s ease, background 0.15s ease, opacity 0.15s ease;
  width: 100%;
}
.btn:disabled { opacity: 0.45; cursor: not-allowed; }
.btn:not(:disabled):hover { transform: translateY(-2px); }

.btn-primary { background: var(--red); color: var(--white); box-shadow: 0 5px 0 var(--red-dark); }
.btn-primary:not(:disabled):hover { background: #ff1424; }

.btn-secondary { background: var(--navy); color: var(--white); box-shadow: 0 5px 0 #0c1327; }

.btn-outline { background: transparent; color: var(--navy); border-color: var(--navy); box-shadow: none; }

.btn-whatsapp { background: #25D366; color: var(--white); box-shadow: 0 5px 0 #128c39; }
.btn-whatsapp:not(:disabled):hover { background: #2ee273; }

/* ---------- Top bar (header + banner + tabs, pinned together) ---------- */
.top-bar {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255, 247, 236, 0.92);
  backdrop-filter: blur(6px);
  border-bottom: 3px solid var(--navy);
}

/* ---------- Header ---------- */
.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.6rem 0;
}
.header-logo { height: 44px; width: 44px; border-radius: 50%; object-fit: cover; }
.header-title { font-family: var(--font-display); font-size: 1.4rem; letter-spacing: 0.03em; }
.header-title span { color: var(--red); }

.cart-btn {
  position: relative;
  display: flex;
  align-items: center;
  gap: 0.4rem;
  background: var(--navy);
  color: var(--white);
  border: none;
  padding: 0.55rem 1rem;
  border-radius: 999px;
  font-family: var(--font-display);
  font-size: 1rem;
  letter-spacing: 0.02em;
  cursor: pointer;
}
.cart-count {
  background: var(--red);
  color: var(--white);
  font-size: 0.75rem;
  min-width: 1.3rem;
  height: 1.3rem;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 0.2rem;
}

/* ---------- Horario banner ---------- */
.hours-banner {
  background: var(--red);
  color: var(--white);
  text-align: center;
  font-weight: 600;
  padding: 0.6rem 1rem;
  font-size: 0.9rem;
}

/* ---------- Category tabs ---------- */
.tabs {
  display: flex;
  gap: 0.5rem;
  overflow-x: auto;
  padding: 1rem;
  scrollbar-width: none;
}
.tabs::-webkit-scrollbar { display: none; }
.tab-btn {
  flex-shrink: 0;
  font-family: var(--font-display);
  letter-spacing: 0.02em;
  font-size: 1rem;
  padding: 0.5rem 1.1rem;
  border-radius: 999px;
  border: 2px solid var(--navy);
  background: var(--white);
  color: var(--navy);
  cursor: pointer;
}
.tab-btn.is-active { background: var(--navy); color: var(--white); }

/* ---------- Feed estilo TikTok (paquetes) ---------- */
/* Caja de scroll aislada: el snap "mandatory" solo aplica aquí adentro,
   así la sección de complementos/salsas (fuera de esta caja) puede
   desplazarse libre sin que el snap la jale de regreso. */
.feed-container {
  height: calc(100vh - var(--topbar-h, 120px));
  overflow-y: scroll;
  scroll-snap-type: y mandatory;
  -webkit-overflow-scrolling: touch;
}
.feed-card {
  position: relative;
  height: 100%;
  min-height: 420px;
  scroll-snap-align: start;
  scroll-snap-stop: always;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  background: linear-gradient(180deg, #FFFFFF 0%, #FFF7EC 100%);
}
.feed-card-img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
  padding: 2rem 1.5rem 10rem;
  box-sizing: border-box;
}
.feed-card-gradient {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(255,247,236,0.9) 0%, rgba(255,247,236,0.2) 40%, rgba(255,247,236,0) 60%);
}
.feed-card-content {
  position: relative;
  z-index: 2;
  color: var(--navy);
  padding: 1.2rem 5.5rem 1.6rem 1.2rem;
}
.feed-card-category {
  display: inline-block;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  background: var(--red);
  color: var(--white);
  padding: 0.2rem 0.6rem;
  border-radius: 999px;
  margin-bottom: 0.5rem;
}
.feed-card-name { font-family: var(--font-display); font-size: 1.6rem; letter-spacing: 0.01em; line-height: 1.1; color: var(--navy); }
.feed-card-caption { font-size: 1rem; font-weight: 600; margin-top: 0.35rem; color: var(--navy); }
.feed-card-desc { font-size: 0.85rem; opacity: 0.7; margin-top: 0.3rem; color: var(--navy); }
.feed-card-price { font-family: var(--font-display); font-size: 1.6rem; color: var(--red); margin-top: 0.5rem; }

.feed-card-actions {
  position: absolute;
  right: 0.8rem;
  bottom: 1.6rem;
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.1rem;
}
.feed-action-btn {
  background: rgba(255,255,255,0.8);
  border: none;
  color: var(--navy);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.1rem;
  font-size: 0.62rem;
  font-weight: 600;
  cursor: pointer;
  width: 3.4rem;
  height: 3.4rem;
  border-radius: 50%;
  box-shadow: 0 2px 8px rgba(23,33,62,0.18);
}
.feed-action-btn .icon { font-size: 1.5rem; line-height: 1; transition: transform 0.15s ease; }
.feed-action-btn:active .icon { transform: scale(1.25); }
.heart-btn.is-active { background: var(--red); color: var(--white); }

/* ---------- Separador entre tarjetas del feed ---------- */
.feed-divider {
  height: 96px;
  background: var(--white);
  border-top: 3px solid var(--red);
  border-bottom: 3px solid var(--red);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.8rem;
}
.feed-divider-mascot { height: 64px; width: auto; object-fit: contain; }
.feed-divider-text {
  font-family: var(--font-display);
  font-size: 1.3rem;
  letter-spacing: 0.02em;
  color: var(--navy);
}

.feed-scroll-hint {
  position: absolute;
  top: 1rem;
  right: 1rem;
  z-index: 2;
  color: rgba(255,255,255,0.85);
  font-size: 0.75rem;
  display: flex;
  align-items: center;
  gap: 0.25rem;
}

/* ---------- Heart burst (doble-tap) ---------- */
.heart-burst {
  position: fixed;
  top: 50%;
  left: 50%;
  font-size: 6rem;
  transform: translate(-50%, -50%) scale(0);
  opacity: 0;
  z-index: 200;
  pointer-events: none;
}
.heart-burst.is-bursting {
  animation: heartBurst 0.7s ease;
}
@keyframes heartBurst {
  0% { transform: translate(-50%, -50%) scale(0); opacity: 0; }
  30% { transform: translate(-50%, -50%) scale(1.15); opacity: 1; }
  50% { transform: translate(-50%, -50%) scale(1); opacity: 1; }
  100% { transform: translate(-50%, -50%) scale(1); opacity: 0; }
}

/* ---------- Toast ---------- */
.toast {
  position: fixed;
  bottom: 1.5rem;
  left: 50%;
  transform: translate(-50%, 20px);
  background: var(--navy);
  color: var(--white);
  padding: 0.7rem 1.2rem;
  border-radius: 999px;
  font-size: 0.85rem;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease, transform 0.2s ease;
  z-index: 200;
}
.toast.is-visible { opacity: 1; transform: translate(-50%, 0); }

/* ---------- A la carta wrap ---------- */
.alacarta-wrap { padding-top: 0.5rem; }

/* ---------- Menu section (usado por complementos/salsas a la carta) ---------- */
.menu-section { padding: 0 1rem 1.5rem; }
.menu-section-title {
  font-family: var(--font-display);
  font-size: 1.5rem;
  color: var(--navy);
  margin: 1rem 0 0.75rem;
  letter-spacing: 0.02em;
}
.add-btn {
  background: var(--red);
  color: var(--white);
  border: none;
  border-radius: 999px;
  padding: 0.5rem 1rem;
  font-family: var(--font-display);
  font-size: 0.95rem;
  cursor: pointer;
  box-shadow: 0 4px 0 var(--red-dark);
}
.add-btn:hover { background: #ff1424; }

/* ---------- A la carta rows ---------- */
.carta-row {
  background: var(--white);
  border-radius: 14px;
  padding: 0.9rem 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
  box-shadow: 0 3px 10px rgba(23, 33, 62, 0.08);
}
.carta-row-name { font-family: var(--font-display); font-size: 1.1rem; }
.carta-row-controls { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 0.5rem; }
.size-pills { display: flex; gap: 0.4rem; flex-wrap: wrap; }
.size-pill {
  border: 2px solid var(--navy);
  background: var(--white);
  color: var(--navy);
  border-radius: 999px;
  padding: 0.3rem 0.7rem;
  font-size: 0.82rem;
  cursor: pointer;
}
.size-pill.is-active { background: var(--navy); color: var(--white); }

/* ---------- Modal (variant picker) ---------- */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(23, 33, 62, 0.55);
  display: flex;
  align-items: flex-end;
  justify-content: center;
  z-index: 100;
}
.modal-overlay.hidden { display: none; }
.modal-sheet {
  background: var(--cream);
  width: 100%;
  max-width: 480px;
  max-height: 85vh;
  overflow-y: auto;
  border-radius: 20px 20px 0 0;
  padding: 1.2rem;
}
.modal-title { font-family: var(--font-display); font-size: 1.4rem; margin-bottom: 0.2rem; }
.modal-price { color: var(--red); font-family: var(--font-display); font-size: 1.1rem; margin-bottom: 0.8rem; }
.variant-group { margin-bottom: 1rem; }
.variant-group-label { font-weight: 600; font-size: 0.9rem; margin-bottom: 0.4rem; color: var(--navy); }
.variant-options { display: flex; gap: 0.5rem; flex-wrap: wrap; }
.variant-option {
  border: 2px solid var(--navy);
  border-radius: 999px;
  padding: 0.4rem 0.9rem;
  font-size: 0.85rem;
  cursor: pointer;
  background: var(--white);
}
.variant-option.is-selected { background: var(--navy); color: var(--white); }
.modal-close {
  position: absolute;
  top: 0.8rem;
  right: 1.2rem;
  background: none;
  border: none;
  font-size: 1.4rem;
  cursor: pointer;
  color: var(--navy);
}
.modal-sheet { position: relative; }

/* ---------- Cart drawer ---------- */
.cart-drawer {
  position: fixed;
  top: 0; right: 0; bottom: 0;
  width: 100%;
  max-width: 420px;
  background: var(--cream);
  z-index: 110;
  display: flex;
  flex-direction: column;
  transform: translateX(100%);
  transition: transform 0.25s ease;
  box-shadow: -8px 0 24px rgba(0,0,0,0.2);
}
.cart-drawer.is-open { transform: translateX(0); }
.cart-drawer-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 1rem; border-bottom: 2px solid var(--navy);
}
.cart-drawer-title { font-family: var(--font-display); font-size: 1.4rem; }
.cart-drawer-items { flex: 1; overflow-y: auto; padding: 1rem; display: flex; flex-direction: column; gap: 0.8rem; }
.cart-item { background: var(--white); border-radius: 14px; padding: 0.8rem; }
.cart-item-top { display: flex; justify-content: space-between; gap: 0.5rem; }
.cart-item-name { font-family: var(--font-display); font-size: 1rem; }
.cart-item-detail { font-size: 0.78rem; color: #4a5372; margin-top: 0.15rem; }
.cart-item-bottom { display: flex; align-items: center; justify-content: space-between; margin-top: 0.5rem; }
.qty-control { display: flex; align-items: center; gap: 0.5rem; }
.qty-btn {
  width: 28px; height: 28px; border-radius: 50%; border: 2px solid var(--navy);
  background: var(--white); cursor: pointer; font-size: 1rem; line-height: 1;
}
.remove-btn { background: none; border: none; color: var(--red); font-size: 0.8rem; cursor: pointer; text-decoration: underline; }
.cart-empty { text-align: center; color: #4a5372; padding: 2rem 1rem; }

.cart-drawer-footer { padding: 1rem; border-top: 2px solid var(--navy); display: flex; flex-direction: column; gap: 0.5rem; }
.summary-line { display: flex; justify-content: space-between; font-size: 0.95rem; }
.summary-line.total { font-family: var(--font-display); font-size: 1.3rem; color: var(--red); }

.overlay-dim {
  position: fixed; inset: 0; background: rgba(0,0,0,0.4); z-index: 105;
}
.overlay-dim.hidden, .cart-drawer.hidden { display: none; }

/* ---------- Forms (checkout) ---------- */
.form-group { margin-bottom: 1rem; }
.form-label { display: block; font-weight: 600; margin-bottom: 0.3rem; font-size: 0.9rem; }
.form-input, .form-textarea {
  width: 100%;
  padding: 0.7rem 0.9rem;
  border-radius: 10px;
  border: 2px solid #cbd0e0;
  font-family: var(--font-body);
  font-size: 0.95rem;
  background: var(--white);
}
.form-input:focus, .form-textarea:focus { outline: none; border-color: var(--navy); }

.location-status { font-size: 0.85rem; margin-top: 0.4rem; }
.location-status.ok { color: var(--green); }
.location-status.error { color: var(--red); }

.payment-options { display: flex; flex-direction: column; gap: 0.6rem; }
.payment-option {
  display: flex; align-items: center; gap: 0.6rem;
  border: 2px solid #cbd0e0; border-radius: 12px; padding: 0.8rem;
  cursor: pointer;
}
.payment-option.is-selected { border-color: var(--navy); background: #eef0f7; }
.payment-option.is-disabled { opacity: 0.5; cursor: not-allowed; }
.payment-option-title { font-weight: 600; }
.payment-option-sub { font-size: 0.78rem; color: #4a5372; }

.card-block {
  background: var(--white);
  border-radius: 16px;
  padding: 1.1rem;
  margin-bottom: 1.2rem;
  box-shadow: 0 3px 10px rgba(23, 33, 62, 0.08);
}
.card-block-title { font-family: var(--font-display); font-size: 1.2rem; margin-bottom: 0.7rem; }

.page-title { font-family: var(--font-display); font-size: 1.8rem; padding: 1rem 0 0.3rem; }
.page-sub { color: #4a5372; font-size: 0.9rem; padding-bottom: 0.8rem; }

.sticky-footer {
  position: fixed; bottom: 0; left: 0; right: 0;
  background: var(--cream); border-top: 2px solid var(--navy);
  padding: 0.8rem 1rem; z-index: 40;
}

/* ---------- Confirmación ---------- */
.confirm-icon { font-size: 3rem; text-align: center; }
.order-summary-list { display: flex; flex-direction: column; gap: 0.5rem; margin: 0.8rem 0; }
.order-summary-line { display: flex; justify-content: space-between; font-size: 0.9rem; }
