/* =====================================================================
   MENÚ DIGITAL — DESIGN SYSTEM (sitio público)
   Vibe: vibrante · moderno · editorial gastronómico
   Base: Bootstrap 5 + variables CSS propias (tokens configurables)
   ===================================================================== */

:root {
  /* Paleta */
  --primary: #EB0029;      /* acento principal */
  --primary-dark: #BC0021; /* hover / pressed */
  --secondary: #010F1C;    /* texto de marca / botones */
  --bg: #FFFFFF;
  --bg-elevated: #F4F1EA;
  --surface: #FFFFFF;
  --text: #000000;
  --text-soft: #222222;
  --muted: #6B6B6B;
  --muted-2: #ababab;
  --border: #D2D2D1;
  --border-strong: #373737;

  /* Tipografía */
  --font-heading: 'Epilogue', sans-serif;
  --font-body: 'Roboto', sans-serif;

  /* Radios */
  --radius-sm: 8px;
  --radius-card: 16px;
  --radius-pill: 999px;

  /* Espaciado (escala 4px) */
  --sp-1: 4px;
  --sp-2: 12px;
  --sp-3: 16px;
  --sp-4: 20px;
  --sp-5: 24px;
  --sp-6: 32px;
  --sp-7: 40px;
  --sp-8: 52px;
  --sp-9: 120px;

  /* Elevación */
  --shadow-subtle: 0px 4px 25px 0px rgba(0, 0, 0, 0.06);
  --shadow-elevated: 0px 6px 30px 0px rgba(1, 15, 28, 0.12);

  /* Movimiento */
  --ease: ease-in-out;
  --dur-fast: 0.15s;
  --dur-base: 0.3s;
  --dur-slow: 0.4s;
}

/* Preparado para dark mode futuro (no activo por defecto) */
[data-theme="dark"] {
  --bg: #02142A;
  --bg-elevated: #0A2035;
  --surface: #0D2740;
  --text: #FFFFFF;
  --text-soft: #F4F1EA;
  --muted: #ababab;
  --border: #ffffff17;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  font-family: var(--font-body);
  background-color: var(--bg);
  color: var(--text);
  line-height: 1.58;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4, h5, .font-heading {
  font-family: var(--font-heading);
  color: var(--text);
  letter-spacing: -0.02em;
  margin: 0;
}

a { color: inherit; text-decoration: none; }
a:focus, button:focus, input:focus, textarea:focus, select:focus {
  outline: 2px solid var(--primary);
  outline-offset: 2px;
}

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

.container-app {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 var(--sp-3);
}

/* ---------------------------------------------------------------------
   TOP BAR
   --------------------------------------------------------------------- */
.topbar {
  position: sticky;
  top: 0;
  z-index: 40;
  background: rgba(255, 255, 255, 0.85);
  backdrop-filter: saturate(180%) blur(14px);
  border-bottom: 1px solid var(--border);
}

.topbar-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: var(--sp-2) var(--sp-3);
  max-width: 1200px;
  margin: 0 auto;
}

.brand {
  display: flex;
  align-items: center;
  gap: var(--sp-2);
  font-family: var(--font-heading);
  font-weight: 800;
  font-size: 1.15rem;
}

.brand img {
  height: 36px;
  width: 36px;
  border-radius: var(--radius-sm);
  object-fit: cover;
}

.brand-dot { color: var(--primary); }

.topbar-actions .btn-share {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text);
  border-radius: var(--radius-pill);
  padding: 8px 16px;
  font-size: 0.85rem;
  font-weight: 600;
  transition: all var(--dur-fast) var(--ease);
}
.topbar-actions .btn-share:hover {
  border-color: var(--primary);
  color: var(--primary);
}

/* ---------------------------------------------------------------------
   HERO
   --------------------------------------------------------------------- */
.hero {
  position: relative;
  overflow: hidden;
  background: linear-gradient(180deg, var(--bg-elevated) 0%, var(--bg) 100%);
  padding: var(--sp-8) 0 var(--sp-7);
}

.hero-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 var(--sp-3);
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: var(--sp-7);
  align-items: center;
}

.hero-kicker {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(235, 0, 41, 0.08);
  color: var(--primary);
  font-weight: 700;
  font-size: 0.78rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 7px 16px;
  border-radius: var(--radius-pill);
  margin-bottom: var(--sp-4);
  animation: fadeInUp var(--dur-slow) var(--ease) both;
}

.hero-title {
  font-size: clamp(2.4rem, 5vw, 4rem);
  font-weight: 900;
  line-height: 1.09;
  margin-bottom: var(--sp-4);
  animation: fadeInUp var(--dur-slow) var(--ease) both;
  animation-delay: 0.05s;
}

.hero-title .accent { color: var(--primary); }

.hero-quote {
  font-size: 1.2rem;
  color: var(--muted);
  font-style: italic;
  margin-bottom: var(--sp-4);
  max-width: 46ch;
  animation: fadeInUp var(--dur-slow) var(--ease) both;
  animation-delay: 0.1s;
}

.hero-date {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 700;
  color: var(--secondary);
  background: var(--surface);
  border: 1px solid var(--border);
  padding: 10px 18px;
  border-radius: var(--radius-pill);
  box-shadow: var(--shadow-subtle);
  animation: fadeInUp var(--dur-slow) var(--ease) both;
  animation-delay: 0.15s;
}

.hero-date .dot {
  width: 8px; height: 8px; border-radius: 50%;
  background: var(--primary);
  display: inline-block;
}

.hero-media {
  position: relative;
  border-radius: 24px;
  overflow: hidden;
  aspect-ratio: 4/5;
  box-shadow: var(--shadow-elevated);
  animation: fadeIn var(--dur-slow) var(--ease) both;
  animation-delay: 0.1s;
}

.hero-media img {
  width: 100%; height: 100%; object-fit: cover;
}

.hero-media::after {
  content: "";
  position: absolute; inset: 0;
  background: linear-gradient(180deg, transparent 55%, rgba(1,15,28,0.55) 100%);
}

.hero-media-badge {
  position: absolute;
  bottom: var(--sp-4);
  left: var(--sp-4);
  color: #fff;
  z-index: 2;
  font-family: var(--font-heading);
  font-weight: 800;
  font-size: 1.4rem;
}

@media (max-width: 900px) {
  .hero-inner { grid-template-columns: 1fr; gap: var(--sp-5); }
  .hero-media { aspect-ratio: 16/10; order: -1; }
}

/* ---------------------------------------------------------------------
   NAV DE CATEGORÍAS (pills desplazables)
   --------------------------------------------------------------------- */
.cat-nav-wrap {
  position: sticky;
  top: 61px;
  z-index: 30;
  background: var(--bg);
  border-bottom: 1px solid var(--border);
  padding: var(--sp-3) 0;
}

.cat-nav {
  display: flex;
  gap: var(--sp-2);
  overflow-x: auto;
  padding: 0 var(--sp-3);
  scrollbar-width: none;
  max-width: 1200px;
  margin: 0 auto;
}
.cat-nav::-webkit-scrollbar { display: none; }

.cat-pill {
  flex: none;
  padding: 10px 20px;
  border-radius: var(--radius-pill);
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text-soft);
  font-weight: 700;
  font-size: 0.88rem;
  white-space: nowrap;
  transition: all var(--dur-fast) var(--ease);
  cursor: pointer;
}

.cat-pill:hover { border-color: var(--primary); color: var(--primary); }

.cat-pill.active {
  background: var(--primary);
  border-color: var(--primary);
  color: #fff;
  box-shadow: var(--shadow-subtle);
}

/* ---------------------------------------------------------------------
   DESTACADOS
   --------------------------------------------------------------------- */
.section { padding: var(--sp-8) 0; }
.section-tight { padding: var(--sp-7) 0; }

.section-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  margin-bottom: var(--sp-6);
  gap: var(--sp-3);
}

.section-eyebrow {
  color: var(--primary);
  font-weight: 700;
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 6px;
  display: block;
}

.section-title {
  font-size: clamp(1.6rem, 3vw, 2.4rem);
  font-weight: 800;
}

.featured-scroll {
  display: flex;
  gap: var(--sp-4);
  overflow-x: auto;
  padding-bottom: var(--sp-4);
  scroll-snap-type: x mandatory;

  /* Firefox */
  scrollbar-width: thin;
  scrollbar-color: var(--primary) var(--bg-elevated);
}

.featured-scroll .dish-card { min-width: 280px; scroll-snap-align: start; }

/* Barra de scroll con acento de marca (Chrome, Edge, Safari) */
.featured-scroll::-webkit-scrollbar {
  height: 8px;
}
.featured-scroll::-webkit-scrollbar-track {
  background: var(--bg-elevated);
  border-radius: var(--radius-pill);
}
.featured-scroll::-webkit-scrollbar-thumb {
  background: linear-gradient(90deg, var(--primary), var(--primary-dark));
  border-radius: var(--radius-pill);
  border: 2px solid var(--bg-elevated);
  background-clip: padding-box;
  transition: box-shadow var(--dur-base) var(--ease), border-width var(--dur-base) var(--ease);
}
.featured-scroll::-webkit-scrollbar-thumb:hover {
  box-shadow: 0 0 12px rgba(235, 0, 41, 0.55);
  border-width: 1px;
}

/* ---------------------------------------------------------------------
   TARJETAS DE PLATOS
   --------------------------------------------------------------------- */
.dish-grid {
  display: grid;
  grid-template-columns: repeat(1, 1fr);
  gap: var(--sp-5);
}
@media (min-width: 576px) { .dish-grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 992px) { .dish-grid { grid-template-columns: repeat(3, 1fr); } }
@media (min-width: 1300px) { .dish-grid { grid-template-columns: repeat(4, 1fr); } }

.dish-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-card);
  overflow: hidden;
  cursor: pointer;
  transition: transform var(--dur-base) var(--ease), box-shadow var(--dur-base) var(--ease), border-color var(--dur-base) var(--ease);
  opacity: 0;
  transform: translateY(14px);
  animation: fadeInUp var(--dur-slow) var(--ease) forwards;
}

.dish-card:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-elevated);
  border-color: transparent;
}

.dish-media {
  position: relative;
  aspect-ratio: 4/3;
  background: var(--bg-elevated);
  overflow: hidden;
}

.dish-media img {
  width: 100%; height: 100%; object-fit: cover;
  transition: transform var(--dur-slow) var(--ease);
}

.dish-card:hover .dish-media img { transform: scale(1.06); }

.dish-badge {
  position: absolute;
  top: 12px;
  left: 12px;
  background: var(--primary);
  color: #fff;
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  padding: 6px 12px;
  border-radius: var(--radius-pill);
  z-index: 2;
}

.dish-badge.tag {
  left: auto;
  right: 12px;
  background: var(--secondary);
}

.dish-body { padding: var(--sp-4); }

.dish-top {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: var(--sp-2);
  margin-bottom: 6px;
}

.dish-name {
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 1.15rem;
  line-height: 1.3;
}

.dish-price {
  font-family: var(--font-heading);
  font-weight: 800;
  font-size: 1.15rem;
  color: var(--primary);
  white-space: nowrap;
}

.dish-desc {
  color: var(--muted);
  font-size: 0.92rem;
  line-height: 1.6;
  margin: 0;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.dish-media.is-loading { background: linear-gradient(90deg, #F4F1EA 25%, #ECEAE2 37%, #F4F1EA 63%); background-size: 400% 100%; animation: shimmer 1.4s ease infinite; }

/* ---------------------------------------------------------------------
   CATEGORÍAS COMO SECCIONES
   --------------------------------------------------------------------- */
.category-section { scroll-margin-top: 130px; padding: var(--sp-7) 0; }
.category-section:nth-child(even) { background: var(--bg-elevated); }

/* ---------------------------------------------------------------------
   INFO DEL RESTAURANTE / FOOTER
   --------------------------------------------------------------------- */
.site-footer {
  background: var(--secondary);
  color: #fff;
  padding: var(--sp-8) 0 var(--sp-5);
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.3fr 1fr 1fr;
  gap: var(--sp-6);
}
@media (max-width: 767px) { .footer-grid { grid-template-columns: 1fr; gap: var(--sp-5); } }

.footer-brand { display: flex; align-items: center; gap: var(--sp-2); margin-bottom: var(--sp-3); }
.footer-brand img { height: 40px; width: 40px; border-radius: var(--radius-sm); object-fit: cover; }
.footer-brand span { font-family: var(--font-heading); font-weight: 800; font-size: 1.2rem; }

.footer-desc { color: #ffffffb0; font-size: 0.92rem; max-width: 40ch; }

.footer-col-title {
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 0.95rem;
  margin-bottom: var(--sp-3);
  color: #fff;
}

.footer-item {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  color: #ffffffcc;
  font-size: 0.92rem;
  margin-bottom: var(--sp-2);
}
.footer-item i { color: var(--primary); margin-top: 3px; flex: none; width: 16px; }

.footer-social { display: flex; gap: 10px; margin-top: var(--sp-3); }
.footer-social a {
  width: 40px; height: 40px;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  background: #ffffff14;
  transition: background var(--dur-fast) var(--ease), transform var(--dur-fast) var(--ease);
}
.footer-social a:hover { background: var(--primary); transform: translateY(-3px); }

.footer-bottom {
  border-top: 1px solid #ffffff17;
  margin-top: var(--sp-6);
  padding-top: var(--sp-4);
  text-align: center;
  color: #ffffff80;
  font-size: 0.82rem;
}

/* ---------------------------------------------------------------------
   MODAL COMPARTIR
   --------------------------------------------------------------------- */
#shareModal .modal-dialog {
  max-width: 420px;
}

.share-modal-content {
  border-radius: 20px;
  border: none;
  box-shadow: var(--shadow-elevated);
  overflow: hidden;
}

.share-modal-header {
  border-bottom: 1px solid var(--border);
  padding: var(--sp-5) var(--sp-5) var(--sp-4);
}

.share-modal-header .modal-title {
  display: flex;
  align-items: center;
  gap: 12px;
  font-family: var(--font-heading);
  font-weight: 800;
  font-size: 1.15rem;
  color: var(--text);
}

.share-modal-icon {
  width: 38px;
  height: 38px;
  border-radius: 12px;
  background: rgba(235, 0, 41, 0.1);
  color: var(--primary);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
  flex: none;
}

.share-modal-content .modal-body {
  padding: var(--sp-5);
}

.share-modal-subtitle {
  color: var(--muted);
  font-size: 0.92rem;
  margin: 0 0 var(--sp-4);
}

.share-options {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.share-option {
  /* Reset de estilos nativos de <button>/<a> */
  appearance: none;
  -webkit-appearance: none;
  font: inherit;
  text-align: left;
  cursor: pointer;

  display: flex;
  align-items: center;
  gap: 14px;
  width: 100%;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 14px 16px;
  color: var(--text);
  text-decoration: none;
  transition: border-color var(--dur-fast) var(--ease),
              background var(--dur-fast) var(--ease),
              transform var(--dur-fast) var(--ease),
              box-shadow var(--dur-fast) var(--ease);
}

.share-option:hover,
.share-option:focus-visible {
  border-color: var(--primary);
  background: #FFF5F6;
  transform: translateY(-2px);
  box-shadow: var(--shadow-subtle);
  color: var(--text);
  text-decoration: none;
}

.share-option-icon {
  width: 40px;
  height: 40px;
  border-radius: 12px;
  flex: none;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
}

.share-option-icon img {
  display: block;
  width: 22px;
  height: 22px;
  object-fit: contain;
}

.share-option-text {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
  flex: 1;
}

.share-option-title {
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 0.98rem;
  color: var(--text);
  line-height: 1.3;
}

.share-option-sub {
  color: var(--muted);
  font-size: 0.82rem;
  line-height: 1.3;
}

.share-option-arrow {
  flex: none;
  color: var(--muted-2);
  font-size: 0.8rem;
  transition: transform var(--dur-fast) var(--ease), color var(--dur-fast) var(--ease);
}

.share-option:hover .share-option-arrow {
  transform: translateX(3px);
  color: var(--primary);
}

.share-option.copied {
  border-color: #17803D;
  background: #E7F7EE;
}
.share-option.copied .share-option-arrow {
  display: none;
}

/* ---------------------------------------------------------------------
   MODAL DETALLE DEL PLATO
   --------------------------------------------------------------------- */
.dish-modal .modal-dialog {
  max-width: 480px;
}

.dish-modal-content {
  border: none;
  border-radius: 22px;
  overflow: hidden;
  box-shadow: var(--shadow-elevated);
}

.dish-modal-close {
  position: absolute;
  top: 14px;
  right: 14px;
  z-index: 5;
  width: 36px;
  height: 36px;
  border: none;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.92);
  color: var(--text);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
  box-shadow: var(--shadow-subtle);
  transition: background var(--dur-fast) var(--ease), transform var(--dur-fast) var(--ease);
}
.dish-modal-close:hover {
  background: #fff;
  transform: scale(1.06);
}

.dish-modal-media {
  position: relative;
  aspect-ratio: 16/10;
  background: var(--bg-elevated);
}
.dish-modal-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.dish-modal-content .modal-body {
  padding: var(--sp-5);
}

.dish-modal-category {
  display: inline-block;
  color: var(--primary);
  font-weight: 700;
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-bottom: 8px;
}

.dish-modal-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 12px;
}

.dish-modal-name {
  font-family: var(--font-heading);
  font-weight: 800;
  font-size: 1.4rem;
  line-height: 1.25;
}

.dish-modal-price {
  font-family: var(--font-heading);
  font-weight: 800;
  font-size: 1.35rem;
  color: var(--primary);
  white-space: nowrap;
  flex: none;
}

.dish-modal-desc {
  color: var(--muted);
  font-size: 0.96rem;
  line-height: 1.75;
  margin: 0 0 var(--sp-4);
}

.dish-modal-whatsapp {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: #25D366;
  color: #fff;
  font-weight: 700;
  font-size: 0.9rem;
  padding: 12px 20px;
  border-radius: var(--radius-pill);
  transition: transform var(--dur-fast) var(--ease), box-shadow var(--dur-fast) var(--ease);
}
.dish-modal-whatsapp:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 24px rgba(37, 211, 102, 0.35);
  color: #fff;
}

/* ---------------------------------------------------------------------
   BOTÓN FLOTANTE DE WHATSAPP
   --------------------------------------------------------------------- */
.whatsapp-float {
  position: fixed;
  bottom: 22px;
  right: 22px;
  z-index: 999999;
  display: flex;
  align-items: center;
  gap: 10px;
  background: #25D366;
  color: #fff;
  padding: 14px 20px;
  border-radius: var(--radius-pill);
  box-shadow: 0 10px 30px rgba(37, 211, 102, 0.4);
  font-weight: 700;
  font-size: 0.9rem;
  transition: transform var(--dur-fast) var(--ease);
}
.whatsapp-float:hover { transform: scale(1.05); color: #fff; }
.whatsapp-float i { font-size: 1.3rem; }

@media (max-width: 576px) {
  .whatsapp-float span { display: none; }
  .whatsapp-float { padding: 14px; }
}

/* ---------------------------------------------------------------------
   ESTADO VACÍO
   --------------------------------------------------------------------- */
.empty-state {
  text-align: center;
  padding: var(--sp-8) var(--sp-3);
  color: var(--muted);
}
.empty-state i { font-size: 2.5rem; color: var(--border-strong); margin-bottom: var(--sp-3); }

/* ---------------------------------------------------------------------
   ANIMACIONES
   --------------------------------------------------------------------- */
@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(16px); }
  to { opacity: 1; transform: translateY(0); }
}
@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}
@keyframes shimmer {
  0% { background-position: 100% 0; }
  100% { background-position: 0 0; }
}

@media (prefers-reduced-motion: reduce) {
  * { animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; transition-duration: 0.01ms !important; }
}
