/* Mac's Asados al Barril — shared components */

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  padding: 0.9rem 1.75rem;
  border-radius: var(--radius-pill);
  border: 1px solid transparent;
  font-family: var(--font-voice);
  font-weight: 700;
  font-size: var(--fs-sm);
  letter-spacing: 0.04em;
  text-transform: uppercase;
  transition: transform var(--transition-fast), box-shadow var(--transition-fast), background var(--transition-fast), color var(--transition-fast);
  white-space: nowrap;
}
.btn:hover { transform: translateY(-2px); }
.btn:active { transform: translateY(0); }
.btn svg { width: 18px; height: 18px; flex-shrink: 0; }

.btn-primary {
  background: var(--color-orange);
  color: var(--color-black);
  box-shadow: var(--shadow-sm);
}
.btn-primary:hover { background: var(--color-orange-light); box-shadow: var(--glow-orange); }

.btn-outline {
  background: transparent;
  border-color: currentColor;
  color: inherit;
}
.btn-outline:hover { background: rgba(245, 166, 35, 0.12); }

.btn-dark {
  background: var(--color-black);
  color: var(--color-white);
}
.btn-dark:hover { background: var(--color-charcoal-2); box-shadow: var(--shadow-md); }

.btn-block { width: 100%; }
.btn-sm { padding: 0.55rem 1.1rem; font-size: var(--fs-xs); }
.btn:disabled { opacity: 0.45; pointer-events: none; }

/* ---------- Header ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  height: var(--header-h);
  display: flex;
  align-items: center;
  background: var(--color-black);
  border-bottom: 1px solid rgba(245, 166, 35, 0.18);
  transition: box-shadow var(--transition-fast), transform var(--transition-base);
}
.site-header.is-scrolled { box-shadow: var(--shadow-md); }
/* En la carta, el header se oculta al bajar (deja ver más productos) y
   reaparece al subir. Solo se activa ahí: ver hideOnScroll en nav.js. */
.site-header.is-hidden { transform: translateY(-100%); }

.site-header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-5);
}

.site-logo { display: flex; align-items: center; }
.site-logo img { height: 52px; width: auto; }

.main-nav { display: flex; align-items: center; gap: var(--space-6); }
.main-nav ul { display: flex; gap: var(--space-5); }
.main-nav a {
  color: var(--color-cream);
  font-size: var(--fs-sm);
  font-weight: 600;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  position: relative;
  padding-bottom: 4px;
}
.main-nav a::after {
  content: '';
  position: absolute;
  left: 0; bottom: 0;
  width: 0; height: 2px;
  background: var(--color-orange);
  transition: width var(--transition-fast);
}
.main-nav a:hover::after, .main-nav a.is-active::after { width: 100%; }

.header-actions { display: flex; align-items: center; gap: var(--space-4); }

.nav-toggle {
  display: none;
  background: none;
  border: none;
  color: var(--color-cream);
  padding: var(--space-2);
}
.nav-toggle svg { width: 26px; height: 26px; }

@media (max-width: 900px) {
  .main-nav { position: fixed; z-index: 95; inset: var(--header-h) 0 0 auto; width: min(320px, 86vw); background: var(--color-charcoal); flex-direction: column; align-items: stretch; padding: var(--space-6) var(--space-5); gap: var(--space-6); transform: translateX(100%); transition: transform var(--transition-base); box-shadow: var(--shadow-lg); }
  .main-nav.is-open { transform: translateX(0); }
  .main-nav ul { flex-direction: column; gap: var(--space-5); }
  .nav-toggle { display: inline-flex; }
  .header-actions .btn-primary { padding: 0.65rem 1.1rem; font-size: 0.7rem; }
}

.nav-scrim {
  display: none;
  position: fixed;
  inset: var(--header-h) 0 0 0;
  background: rgba(20, 16, 13, 0.6);
  z-index: 90;
}
.nav-scrim.is-open { display: block; }

/* ---------- Footer ---------- */
.site-footer {
  background: var(--color-black);
  background-image: linear-gradient(180deg, rgba(20,16,13,0.92), rgba(20,16,13,0.97)), url('../img/fondo.jpg');
  background-size: cover;
  background-position: center;
  color: var(--color-cream);
  padding: var(--space-8) 0 var(--space-5);
}
.footer-grid {
  display: grid;
  grid-template-columns: 1.3fr 1fr 1fr 1.1fr;
  gap: var(--space-6);
  padding-bottom: var(--space-7);
  border-bottom: 1px solid rgba(251, 243, 230, 0.14);
}
.footer-brand img { height: 56px; margin-bottom: var(--space-4); }
.footer-brand p { color: rgba(251, 243, 230, 0.75); font-size: var(--fs-sm); max-width: 30ch; }
.footer-tagline { margin-top: var(--space-4); font-family: var(--font-script); font-size: var(--fs-lg); color: var(--color-orange-light); }
.footer-social { display: flex; gap: var(--space-3); margin-top: var(--space-5); }
.footer-social a {
  width: 38px; height: 38px;
  display: flex; align-items: center; justify-content: center;
  border: 1px solid rgba(251, 243, 230, 0.3);
  border-radius: 50%;
  transition: background var(--transition-fast), border-color var(--transition-fast);
}
.footer-social a:hover { background: var(--color-orange); border-color: var(--color-orange); color: var(--color-black); }
.footer-social svg { width: 17px; height: 17px; }

.footer-col h4 { font-family: var(--font-display); font-size: var(--fs-sm); letter-spacing: 0.1em; color: var(--color-orange); margin-bottom: var(--space-4); }
.footer-col ul { display: flex; flex-direction: column; gap: var(--space-3); }
.footer-col a, .footer-col address { font-size: var(--fs-sm); color: rgba(251, 243, 230, 0.85); font-style: normal; }
.footer-col a:hover { color: var(--color-orange); }
.footer-copy {
  display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: var(--space-2);
  padding-top: var(--space-5);
  font-size: var(--fs-xs);
  color: rgba(251, 243, 230, 0.55);
}
/* Crédito del desarrollador: en amarillo/naranja para que resalte y se note
   que es un link, distinto del texto apagado del copyright. Tipografía
   propia (Plus Jakarta Sans) más sobria/profesional que el resto del sitio. */
.footer-credit {
  font-family: var(--font-pro);
  color: var(--color-orange-light);
  font-weight: 600;
  transition: color var(--transition-fast);
}
.footer-credit:hover { color: var(--color-orange); text-decoration: underline; }
/* Banda de promo "demo gratis 7 días": pill amarillo bien visible para que
   la gente lo toque y escriba por WhatsApp. */
.footer-promo {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  margin-top: var(--space-5);
  padding: var(--space-4) var(--space-5);
  border-radius: var(--radius-pill);
  background: var(--color-orange);
  color: var(--color-black);
  text-align: center;
  font-family: var(--font-pro);
  font-size: var(--fs-sm);
  font-weight: 600;
  transition: background var(--transition-fast), transform var(--transition-fast);
}
.footer-promo svg { width: 18px; height: 18px; flex-shrink: 0; }
.footer-promo strong { font-weight: 800; }
.footer-promo:hover { background: var(--color-orange-light); transform: translateY(-2px); }
@media (max-width: 640px) {
  .footer-promo { border-radius: var(--radius-md); text-align: left; }
}

@media (max-width: 860px) {
  .footer-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 540px) {
  .footer-grid { grid-template-columns: 1fr; }
}

/* ---------- WhatsApp float ---------- */
.whatsapp-float-wrap {
  position: fixed;
  right: var(--space-5);
  bottom: var(--space-5);
  z-index: 80;
}
.whatsapp-float {
  width: 58px; height: 58px;
  border-radius: 50%;
  background: #25d366;
  border: none;
  display: flex; align-items: center; justify-content: center;
  box-shadow: var(--shadow-lg);
  animation: float-pulse 2.6s ease-in-out infinite;
}
.whatsapp-float svg { width: 30px; height: 30px; color: #fff; }
.whatsapp-float:hover { transform: scale(1.08); }
/* En la carta, este mismo botón flotante funciona como acceso al carrito
   (abre el drawer) en vez de abrir WhatsApp: se distingue con el naranja de
   la marca en vez del verde de WhatsApp. */
.whatsapp-float.cart-float { background: var(--color-orange); animation: none; position: relative; }
.whatsapp-float.cart-float svg { color: var(--color-black); }
.whatsapp-float.cart-float .cart-count {
  position: absolute; top: -3px; right: -3px;
  background: var(--color-black);
  color: var(--color-white);
  border: 2px solid var(--color-cream);
  min-width: 20px; height: 20px;
  font-size: 0.7rem;
}
@keyframes float-pulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(37, 211, 102, 0.45), var(--shadow-lg); }
  50% { box-shadow: 0 0 0 12px rgba(37, 211, 102, 0), var(--shadow-lg); }
}

.wa-picker-wrap { position: relative; display: inline-flex; }

/* ---------- Selector de sede (dropdown de los botones de WhatsApp) ---------- */
.wa-picker {
  position: absolute;
  right: 0;
  min-width: 250px;
  background: var(--color-white);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-lg);
  padding: var(--space-2);
  z-index: 150;
  flex-direction: column;
  gap: 2px;
}
.wa-picker[hidden] { display: none; }
.wa-picker:not([hidden]) { display: flex; }
.wa-picker-wrap .wa-picker { top: calc(100% + 12px); }
.whatsapp-float-wrap .wa-picker { bottom: calc(100% + 12px); }
.wa-picker__hint { padding: 0.4rem 0.7rem 0.3rem; font-size: var(--fs-xs); font-weight: 700; text-transform: uppercase; letter-spacing: 0.05em; color: var(--color-text-muted); }
.wa-picker__item {
  display: flex; flex-direction: column; gap: 2px;
  padding: 0.6rem 0.7rem;
  border-radius: var(--radius-sm);
  transition: background var(--transition-fast);
}
.wa-picker__item:hover { background: var(--color-cream-2); }
.wa-picker__name { font-weight: 700; color: var(--color-text-dark); font-size: var(--fs-sm); }
.wa-picker__phone { display: flex; align-items: center; gap: 6px; font-size: var(--fs-xs); font-weight: 600; color: #1fa855; }
.wa-picker__phone svg { width: 13px; height: 13px; flex-shrink: 0; }
@media (max-width: 420px) {
  .wa-picker { min-width: 0; width: min(280px, 82vw); }
}

/* ---------- Section heading pattern ---------- */
.section-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  font-family: var(--font-display);
  font-size: var(--fs-md);
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--color-orange-deep);
  margin-bottom: var(--space-3);
}
.section-eyebrow::before { content: ''; width: 28px; height: 1px; background: var(--color-orange-deep); }
.section-title { font-family: var(--font-display); font-size: var(--fs-3xl); letter-spacing: 0.02em; text-transform: uppercase; }
.section-title .font-script { display: block; font-family: var(--font-script); text-transform: none; font-size: 0.85em; line-height: 1.1; letter-spacing: 0.01em; }
.section-note { margin-top: var(--space-3); color: var(--color-text-muted); font-size: var(--fs-sm); max-width: 60ch; }

/* ---------- Badges ---------- */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 0.3em;
  font-size: var(--fs-xs);
  font-weight: 700;
  padding: 0.2rem 0.6rem;
  border-radius: var(--radius-pill);
  white-space: nowrap;
}
.badge svg { width: 12px; height: 12px; }
.badge--star { background: rgba(245, 166, 35, 0.16); color: var(--color-orange-deep); }
.badge--fire { background: rgba(217, 72, 47, 0.14); color: var(--color-error); }
.badge--trophy { background: rgba(245, 166, 35, 0.22); color: #8a5a10; }
.badge--gem { background: rgba(36, 28, 23, 0.1); color: var(--color-charcoal-2); }

/* ---------- Cards / misc ---------- */
.card {
  background: var(--color-white);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-sm);
}

.dish-photo-placeholder {
  width: 100%; height: 100%;
  display: flex; align-items: center; justify-content: center;
  background: linear-gradient(135deg, var(--color-charcoal-2), var(--color-black));
  color: rgba(245, 166, 35, 0.55);
}
.dish-photo-placeholder svg { width: 34%; height: 34%; }

/* ---------- Modal (dish detail) ---------- */
.modal-overlay {
  position: fixed; inset: 0;
  background: rgba(20, 16, 13, 0.65);
  display: flex; align-items: center; justify-content: center;
  padding: var(--space-5);
  z-index: 200;
  opacity: 0;
  pointer-events: none;
  transition: opacity var(--transition-base);
}
.modal-overlay.is-open { opacity: 1; pointer-events: auto; }
.modal-panel {
  background: var(--color-white);
  border-radius: var(--radius-lg);
  max-width: 560px;
  width: 100%;
  max-height: 88vh;
  overflow-y: auto;
  transform: translateY(24px) scale(0.98);
  transition: transform var(--transition-base);
  box-shadow: var(--shadow-lg);
}
.modal-overlay.is-open .modal-panel { transform: translateY(0) scale(1); }
.modal-close {
  position: absolute;
  top: var(--space-4); right: var(--space-4);
  width: 38px; height: 38px;
  border-radius: 50%;
  background: rgba(20, 16, 13, 0.55);
  color: #fff;
  display: flex; align-items: center; justify-content: center;
  border: none;
  z-index: 2;
}
.modal-close svg { width: 18px; height: 18px; }
.modal-photo { position: relative; aspect-ratio: 4 / 3; overflow: hidden; border-radius: var(--radius-lg) var(--radius-lg) 0 0; }
.modal-photo img { width: 100%; height: 100%; object-fit: cover; }
.modal-body { padding: var(--space-6); }
.modal-body .badges { display: flex; gap: var(--space-2); margin-bottom: var(--space-3); flex-wrap: wrap; }
.modal-body h3 { font-size: var(--fs-2xl); margin-bottom: var(--space-2); }
.modal-body p.desc { color: var(--color-text-muted); margin-bottom: var(--space-5); line-height: 1.6; }
.modal-body .dish-tiers-hint { margin-top: 0; }
.modal-body .dish-tiers { margin-bottom: var(--space-5); }
.modal-price { font-size: var(--fs-xl); font-weight: 800; color: var(--color-orange-deep); margin-bottom: var(--space-5); }
.modal-actions { display: flex; align-items: center; gap: var(--space-4); flex-wrap: wrap; }

.promo-modal-wrap { position: relative; max-width: 380px; width: 100%; }
.promo-modal-img-link { display: block; }
.promo-modal-img { display: block; width: 100%; border-radius: var(--radius-lg) var(--radius-lg) 0 0; }
.promo-modal-body { padding: var(--space-5); }
.promo-modal-body .btn { width: 100%; justify-content: center; }
.promo-modal .modal-close {
  top: -16px;
  right: -16px;
  background: var(--color-error);
  color: var(--color-white);
  box-shadow: var(--shadow-md);
}

/* ---------- Stepper ---------- */
.stepper {
  display: inline-flex;
  align-items: center;
  border: 1px solid rgba(122, 107, 91, 0.4);
  border-radius: var(--radius-pill);
  overflow: hidden;
}
.stepper button {
  width: 38px; height: 38px;
  background: var(--color-cream-2);
  border: none;
  display: flex; align-items: center; justify-content: center;
  color: var(--color-text-dark);
  font-size: 1.1rem;
}
.stepper button:hover { background: var(--color-orange); color: var(--color-black); }
.stepper span { width: 34px; text-align: center; font-weight: 700; }
.stepper--sm button { width: 28px; height: 28px; font-size: 0.9rem; }
.stepper--sm span { width: 24px; }
.stepper input[type="number"] { -moz-appearance: textfield; appearance: none; }
.stepper input[type="number"]::-webkit-inner-spin-button,
.stepper input[type="number"]::-webkit-outer-spin-button { -webkit-appearance: none; margin: 0; }

/* ---------- Cart drawer ---------- */
.cart-toggle {
  position: relative;
  display: inline-flex; align-items: center; justify-content: center;
  width: 42px; height: 42px;
  color: var(--color-cream);
  background: none;
  border: none;
  padding: 0;
  border-radius: 50%;
}
.cart-toggle:hover { background: rgba(251, 243, 230, 0.1); }
.cart-toggle svg { width: 24px; height: 24px; }
.cart-count {
  position: absolute; top: -2px; right: -4px;
  background: var(--color-orange);
  color: var(--color-black);
  font-size: 0.65rem; font-weight: 800;
  min-width: 18px; height: 18px;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  padding: 0 3px;
}

.drawer-overlay {
  position: fixed; inset: 0;
  background: rgba(20, 16, 13, 0.55);
  z-index: 210;
  opacity: 0; pointer-events: none;
  transition: opacity var(--transition-base);
}
.drawer-overlay.is-open { opacity: 1; pointer-events: auto; }
.drawer-panel {
  position: fixed; top: 0; right: 0; bottom: 0;
  width: min(420px, 92vw);
  background: var(--color-cream);
  display: flex; flex-direction: column;
  transform: translateX(100%);
  transition: transform var(--transition-base);
  box-shadow: var(--shadow-lg);
}
.drawer-overlay.is-open .drawer-panel { transform: translateX(0); }
.drawer-panel form {
  display: flex; flex-direction: column;
  flex: 1;
  min-height: 0;
}
.drawer-head {
  display: flex; align-items: center; justify-content: space-between;
  padding: var(--space-5);
  background: var(--color-black);
  color: var(--color-white);
}
.drawer-head button { background: none; border: none; color: inherit; }
.drawer-head svg { width: 22px; height: 22px; }
.drawer-body { flex: 1; min-height: 0; overflow-y: auto; padding: var(--space-5); display: flex; flex-direction: column; gap: var(--space-4); }
.drawer-empty { text-align: center; color: var(--color-text-muted); padding: var(--space-8) var(--space-4); }
.drawer-empty svg { width: 48px; height: 48px; margin: 0 auto var(--space-4); opacity: 0.4; }
.cart-item { display: flex; gap: var(--space-3); align-items: flex-start; }
.cart-item .cart-item-photo { width: 64px; height: 64px; border-radius: var(--radius-sm); overflow: hidden; flex-shrink: 0; }
.cart-item .cart-item-photo img { width: 100%; height: 100%; object-fit: cover; }
.cart-item-info { flex: 1; }
.cart-item-info h5 { font-size: var(--fs-sm); font-weight: 700; }
.cart-item-info .price { color: var(--color-orange-deep); font-weight: 700; font-size: var(--fs-sm); }
.cart-item-remove {
  flex-shrink: 0;
  width: 32px; height: 32px;
  border-radius: 50%;
  background: rgba(20, 16, 13, 0.85);
  color: #fff;
  border: none;
  display: flex; align-items: center; justify-content: center;
}
.cart-item-remove svg { width: 15px; height: 15px; }
.cart-item-remove:hover { background: var(--color-orange-deep); color: var(--color-black); }
.cart-item-note { display: block; font-size: var(--fs-xs); color: var(--color-text-muted); font-style: italic; margin-top: 2px; }
.cart-checkout-fields { margin-top: var(--space-6); padding-top: var(--space-6); border-top: 1px dashed rgba(122, 107, 91, 0.3); }
.cart-checkout-fields .field:last-child { margin-bottom: 0; }
.drawer-foot { padding: var(--space-5); border-top: 1px solid rgba(122, 107, 91, 0.25); background: var(--color-white); }
.drawer-subtotal { display: flex; justify-content: space-between; font-weight: 700; font-size: var(--fs-md); margin-bottom: var(--space-4); }
.drawer-sede-note { display: flex; align-items: center; gap: var(--space-2); font-size: var(--fs-xs); color: var(--color-text-muted); background: var(--color-cream-2); padding: 0.6rem 0.9rem; border-radius: var(--radius-md); margin-bottom: var(--space-4); }
.drawer-sede-note svg { width: 15px; height: 15px; color: var(--color-orange-deep); flex-shrink: 0; }
.drawer-sede-note b { color: var(--color-text-dark); }

/* ---------- Forms ---------- */
.field { margin-bottom: var(--space-5); }
.field label { display: block; font-size: var(--fs-sm); font-weight: 700; margin-bottom: var(--space-2); }
.field input, .field select, .field textarea {
  width: 100%;
  padding: 0.85rem 1rem;
  border: 1px solid rgba(122, 107, 91, 0.35);
  border-radius: var(--radius-sm);
  background: var(--color-white);
  color: var(--color-text-dark);
  transition: border-color var(--transition-fast);
}
.field input:focus, .field select:focus, .field textarea:focus {
  outline: none;
  border-color: var(--color-orange);
  box-shadow: 0 0 0 3px rgba(245, 166, 35, 0.2);
}
.field .error-msg { display: none; color: var(--color-error); font-size: var(--fs-xs); margin-top: var(--space-1); }
.field.has-error input, .field.has-error select { border-color: var(--color-error); }
.field.has-error .error-msg { display: block; }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: var(--space-4); }
@media (max-width: 560px) { .field-row { grid-template-columns: 1fr; } }

.chip-group { display: flex; flex-wrap: wrap; gap: var(--space-2); }
.chip {
  padding: 0.5rem 1rem;
  border-radius: var(--radius-pill);
  border: 1px solid rgba(122, 107, 91, 0.35);
  background: var(--color-white);
  font-family: var(--font-voice);
  font-size: var(--fs-sm);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.chip.is-active { background: var(--color-orange); border-color: var(--color-orange); color: var(--color-black); }

/* ---------- Toast ---------- */
.toast {
  position: fixed;
  left: 50%; bottom: var(--space-6);
  transform: translate(-50%, 20px);
  background: var(--color-black);
  color: var(--color-white);
  padding: 0.9rem 1.5rem;
  border-radius: var(--radius-pill);
  box-shadow: var(--shadow-lg);
  font-size: var(--fs-sm);
  font-weight: 600;
  display: flex; align-items: center; gap: var(--space-2);
  opacity: 0;
  pointer-events: none;
  transition: opacity var(--transition-fast), transform var(--transition-fast);
  z-index: 300;
}
.toast.is-visible { opacity: 1; transform: translate(-50%, 0); }
.toast svg { width: 18px; height: 18px; color: var(--color-orange); }
