/*
Theme Name: Messina's Pizza
Theme URI: https://www.messinaspizza.com
Author: José Améndola
Description: Tema personalizado para Messina's Pizza - cadena de pizzerías de Mérida, Yucatán
Version: 1.3
License: GNU General Public License v2 or later
Text Domain: messinas
*/

/* =============================================
   RESET & BASE
============================================= */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

:root {
  --red:        #C8102E;
  --red-dark:   #9e0c23;
  --cream:      #FAF3E8;
  --dark:       #1a1008;
  --gold:       #D4A843;
  --text:       #2c1a0e;
  --text-light: #6b4c35;
  --white:      #ffffff;
  --shadow:     0 4px 24px rgba(0,0,0,0.15);
  --font-display: 'Playfair Display', Georgia, serif;
  --font-body:    'Lato', 'Helvetica Neue', sans-serif;
}

html { scroll-behavior: smooth; }

body {
  font-family: var(--font-body);
  background: var(--cream);
  color: var(--text);
  line-height: 1.6;
  overflow-x: hidden;
  /* Ensure no child can cause horizontal overflow */
  max-width: 100vw;
}

img { max-width: 100%; height: auto; display: block; }
a  { text-decoration: none; color: inherit; }
ul { list-style: none; }

/* =============================================
   TYPOGRAPHY
============================================= */
h1, h2, h3 {
  font-family: var(--font-display);
  font-weight: 700;
  line-height: 1.2;
}

h2 {
  font-size: clamp(1.8rem, 4vw, 2.8rem);
  color: var(--dark);
  text-align: center;
  margin-bottom: 0.4em;
}

.section-subtitle {
  text-align: center;
  color: var(--text-light);
  font-size: 1rem;
  margin-bottom: 2.5rem;
  letter-spacing: 0.05em;
}

/* =============================================
   SECTION WRAPPER
============================================= */
.section {
  padding: 80px 0;
  /* Safety: prevent any section from causing horizontal scroll on mobile */
  max-width: 100%;
  overflow-x: hidden;
}

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
}

.section-header {
  text-align: center;
  margin-bottom: 3rem;
  position: relative;
}

.section-header::after {
  content: '';
  display: block;
  width: 60px;
  height: 3px;
  background: var(--red);
  margin: 16px auto 0;
}

/* =============================================
   HEADER & NAV
============================================= */
#site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  background: rgba(26, 16, 8, 0.96);
  backdrop-filter: blur(8px);
  border-bottom: 2px solid var(--red);
  transition: all 0.3s ease;
}

#site-header.scrolled {
  background: rgba(26, 16, 8, 1);
  box-shadow: var(--shadow);
}

.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 70px;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
}

/* Nav logo — fallback img and WordPress custom logo */
.nav-logo img,
.nav-logo .custom-logo-link,
.nav-logo .custom-logo-link img,
.nav-logo .custom-logo {
  display: block;
  height: 44px !important;
  width: auto !important;
  max-width: 220px !important;
  object-fit: contain;
}

.nav-logo span {
  font-family: var(--font-display);
  font-size: 1.6rem;
  font-weight: 700;
  color: var(--white);
  letter-spacing: 0.02em;
}

.nav-logo span em {
  color: var(--red);
  font-style: normal;
}

nav ul {
  display: flex;
  align-items: center;
  gap: 2rem;
}

nav ul li a {
  color: rgba(255,255,255,0.85);
  font-size: 0.9rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 6px 0;
  border-bottom: 2px solid transparent;
  transition: all 0.25s ease;
}

nav ul li a:hover {
  color: var(--gold);
  border-bottom-color: var(--gold);
}

nav ul li a.btn-nav {
  background: var(--red);
  color: var(--white);
  padding: 8px 18px;
  border-radius: 4px;
  border-bottom: none;
}

nav ul li a.btn-nav:hover {
  background: var(--red-dark);
  color: var(--white);
}

/* Hamburger */
.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  cursor: pointer;
  padding: 4px;
}

.nav-toggle span {
  display: block;
  width: 26px;
  height: 2px;
  background: var(--white);
  transition: 0.3s;
}

/* =============================================
   HERO SLIDER
============================================= */
#hero {
  position: relative;
  overflow: hidden;
  margin-top: 70px;
}

.slider-track {
  display: flex;
  transition: transform 0.7s cubic-bezier(0.77, 0, 0.18, 1);
  touch-action: pan-y pinch-zoom;
}

.slide {
  min-width: 100%;
  position: relative;
  background: var(--dark);
}

.slide img {
  width: 100%;
  aspect-ratio: 1500 / 664;
  object-fit: cover;
  display: block;
}

.slide-content {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  color: var(--white);
  padding: 2rem;
  background: linear-gradient(to bottom, transparent 30%, rgba(26,16,8,0.7));
}

.slide-content h2 {
  color: var(--white);
  font-size: clamp(2rem, 6vw, 4rem);
  text-shadow: 0 2px 20px rgba(0,0,0,0.5);
  margin-bottom: 1rem;
}

.slide-content p {
  font-size: 1.1rem;
  opacity: 0.9;
  max-width: 500px;
  margin-bottom: 2rem;
}

.btn-primary {
  display: inline-block;
  background: var(--red);
  color: var(--white);
  font-weight: 700;
  font-size: 0.95rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 14px 36px;
  border-radius: 4px;
  border: 2px solid var(--red);
  transition: all 0.25s ease;
  cursor: pointer;
  font-family: var(--font-body);
}

.btn-primary:hover {
  background: transparent;
  color: var(--white);
}

.btn-outline {
  background: transparent;
  color: var(--white);
  border: 2px solid rgba(255,255,255,0.7);
}

.btn-outline:hover {
  background: var(--white);
  color: var(--dark);
  border-color: var(--white);
}

/* Slider controls */
.slider-btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 10;
  background: rgba(255,255,255,0.12);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  border: 1px solid rgba(255,255,255,0.2);
  color: rgba(255,255,255,0.85);
  width: 34px;
  height: 34px;
  border-radius: 50%;
  font-size: 0.85rem;
  cursor: pointer;
  transition: background 0.2s, color 0.2s, transform 0.2s;
  display: flex;
  align-items: center;
  justify-content: center;
}

.slider-btn:hover {
  background: rgba(255,255,255,0.25);
  color: #fff;
  transform: translateY(-50%) scale(1.08);
}
.slider-btn.prev { left: 12px; }
.slider-btn.next { right: 12px; }

@media (max-width: 680px) {
  .slider-btn {
    position: static;
    transform: none;
    top: auto;
  }
  .slider-btn:hover {
    transform: scale(1.08);
  }
  /* REMOVED: overflow:visible on #hero — this was causing off-screen slides
     to expand the page width, making all content appear squished to the left.
     The JS moves buttons outside #hero so overflow:hidden is safe here. */
  .slider-mobile-controls {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 12px;
    padding: 12px 0 4px;
    background: var(--cream);
  }
  .slider-btn.prev,
  .slider-btn.next {
    background: var(--dark);
    color: var(--white);
    border: none;
    border-radius: 8px;
    width: 48px;
    height: 36px;
    font-size: 1rem;
    box-shadow: 0 2px 8px rgba(0,0,0,0.18);
    transition: background 0.2s, transform 0.15s;
  }
  .slider-btn.prev:hover,
  .slider-btn.next:hover,
  .slider-btn.prev:active,
  .slider-btn.next:active {
    background: var(--red);
    transform: scale(1.06);
  }
}

.slider-dots {
  display: flex;
  justify-content: center;
  gap: 10px;
  padding: 14px 0 4px;
  background: var(--cream);
}

.dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: rgba(255,255,255,0.5);
  cursor: pointer;
  border: 2px solid transparent;
  transition: 0.25s;
}

.dot.active {
  background: var(--red);
  border-color: var(--white);
  transform: scale(1.2);
}

/* historia-strip eliminada */

/* =============================================
   MENU SECTION
============================================= */
#menu {
  background: var(--cream);
}

.menu-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: 16px;
}

@media (min-width: 481px) {
  .menu-grid {
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 24px;
  }
}

.menu-card {
  position: relative;
  border-radius: 10px;
  overflow: hidden;
  aspect-ratio: 285 / 356;
  cursor: pointer;
  background: var(--cream);
  box-shadow: var(--shadow);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.menu-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 12px 40px rgba(0,0,0,0.22);
}

.menu-card img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  transition: transform 0.5s ease;
}

.menu-card:hover img { transform: scale(1.04); }

.menu-card-overlay {
  display: none;
}

/* =============================================
   PROMOCIONES SLIDER
============================================= */
#promociones {
  background: #f5ebe0;
}

.promo-slider-wrap {
  position: relative;
  /* Botones fuera del overflow */
  padding: 0 52px;
}

/* Viewport — oculta slides fuera de foco */
.promo-slider-viewport {
  overflow: hidden;
  border-radius: 12px;
}

/* Track deslizable — flex, animado con transform */
.promo-slider-track {
  display: flex;
  gap: 16px;
  transition: transform 0.45s cubic-bezier(0.4, 0, 0.2, 1);
  will-change: transform;
  cursor: grab;
  user-select: none;
  touch-action: pan-y pinch-zoom;
}

/* Cada slide — ancho calculado por JS según perPage */
.promo-slide {
  flex: 0 0 auto;
  border-radius: 10px;
  overflow: hidden;
  box-shadow: var(--shadow);
}

.promo-slide img {
  width: 100%;
  aspect-ratio: 532 / 500;
  object-fit: cover;
  display: block;
}

.promo-slide-placeholder {
  width: 100%;
  aspect-ratio: 532 / 500;
  background: linear-gradient(135deg, #f0d9bc, #e8c99a);
  display: flex;
  align-items: center;
  justify-content: center;
}

.promo-slide-placeholder span {
  color: rgba(44,26,14,0.4);
  font-size: 1rem;
  text-align: center;
  border: 1px dashed rgba(44,26,14,0.2);
  padding: 20px 32px;
  border-radius: 8px;
}

/* Flechas — minimalistas, fuera del viewport */
.promo-slider-btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(26,16,8,0.08);
  color: var(--dark);
  border: 1px solid rgba(26,16,8,0.12);
  width: 40px;
  height: 40px;
  border-radius: 50%;
  font-size: 1rem;
  cursor: pointer;
  z-index: 2;
  transition: background 0.2s, color 0.2s, transform 0.2s;
  display: flex;
  align-items: center;
  justify-content: center;
}

.promo-slider-btn:hover {
  background: var(--dark);
  color: #fff;
  transform: translateY(-50%) scale(1.08);
}
.promo-slider-btn:disabled {
  opacity: 0.3;
  cursor: default;
  pointer-events: none;
}
.promo-slider-btn.prev { left: 4px; }
.promo-slider-btn.next { right: 4px; }

@media (max-width: 680px) {
  .promo-slider-wrap { padding: 0; }
  .promo-slider-btn {
    position: static;
    transform: none;
    top: auto;
  }
  .promo-slider-btn:hover {
    transform: scale(1.08);
  }
  .promo-mobile-controls {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 12px;
    margin-top: 12px;
  }
  .promo-slider-btn {
    background: var(--dark);
    color: var(--white);
    border: none;
    border-radius: 8px;
    width: 48px;
    height: 36px;
    font-size: 1rem;
    box-shadow: 0 2px 8px rgba(0,0,0,0.18);
    transition: background 0.2s, transform 0.15s;
  }
  .promo-slider-btn:hover,
  .promo-slider-btn:active {
    background: var(--red);
    transform: scale(1.06);
  }
}

.promo-slider-dots {
  display: flex;
  justify-content: center;
  gap: 8px;
  margin-top: 20px;
}

.promo-slider-dots .dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: rgba(26,16,8,0.2);
  cursor: pointer;
  transition: background 0.2s, transform 0.2s;
}

.promo-slider-dots .dot.active {
  background: var(--red);
  transform: scale(1.35);
}

/* =============================================
   UBICACIONES
============================================= */
#ubicaciones {
  background: var(--dark);
  color: var(--white);
}

#ubicaciones h2 { color: var(--white); }
#ubicaciones .section-subtitle { color: rgba(255,255,255,0.6); }
#ubicaciones .section-header::after { background: var(--gold); }

.ubicacion-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 20px;
}

.ubicacion-card {
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 10px;
  padding: 24px;
  transition: background 0.25s ease, border-color 0.25s ease;
}

.ubicacion-card:hover {
  background: rgba(200,16,46,0.15);
  border-color: var(--red);
}

.ubicacion-card h3 {
  font-family: var(--font-display);
  color: var(--gold);
  font-size: 1.15rem;
  margin-bottom: 10px;
}

.ubicacion-info {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin-bottom: 8px;
  font-size: 0.9rem;
  color: rgba(255,255,255,0.75);
}

.ubicacion-info .icon {
  font-size: 1rem;
  margin-top: 2px;
  flex-shrink: 0;
}

.ubicacion-links {
  display: flex;
  gap: 12px;
  margin-top: 16px;
  flex-wrap: wrap;
}

.ubicacion-links a {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.82rem;
  font-weight: 600;
  padding: 6px 14px;
  border-radius: 20px;
  border: 1px solid;
  transition: 0.25s;
}

.link-tel {
  color: var(--gold);
  border-color: var(--gold);
}
.link-tel:hover { background: var(--gold); color: var(--dark); }

.link-wa {
  color: #25D366;
  border-color: #25D366;
}
.link-wa:hover { background: #25D366; color: var(--white); }

/* =============================================
   NUESTRA HISTORIA
============================================= */
#historia {
  background: var(--cream);
}

.historia-inner {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 60px;
  align-items: center;
}

.historia-img {
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 20px 60px rgba(0,0,0,0.2);
  aspect-ratio: 4/3;
}

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

.historia-text h2 {
  text-align: left;
  margin-bottom: 0.5rem;
}

.historia-text h2::after {
  content: '';
  display: block;
  width: 50px;
  height: 3px;
  background: var(--red);
  margin-top: 14px;
}

.historia-text p {
  color: var(--text-light);
  font-size: 0.97rem;
  line-height: 1.8;
  margin-top: 1rem;
}

.historia-year {
  display: inline-block;
  font-family: var(--font-display);
  font-size: 4rem;
  font-weight: 700;
  color: var(--red);
  opacity: 0.15;
  line-height: 1;
  margin-bottom: -1rem;
}

/* =============================================
   CONTACTO
============================================= */
#contacto {
  background: #f0e6d6;
}

.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1.4fr;
  gap: 60px;
  align-items: start;
}

.contact-info h3 {
  font-family: var(--font-display);
  font-size: 1.6rem;
  color: var(--dark);
  margin-bottom: 1rem;
}

.contact-info p {
  color: var(--text-light);
  line-height: 1.8;
  margin-bottom: 1.5rem;
}

.contact-item {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  margin-bottom: 12px;
  color: var(--text-light);
  font-size: 0.95rem;
}

.contact-item .icon { font-size: 1.1rem; margin-top: 2px; }

.contact-form .form-group {
  margin-bottom: 18px;
}

.contact-form label {
  display: block;
  font-size: 0.82rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  color: var(--text);
  margin-bottom: 6px;
}

.contact-form input,
.contact-form textarea,
.contact-form select {
  width: 100%;
  padding: 12px 16px;
  border: 2px solid #d9cfc4;
  border-radius: 6px;
  background: var(--white);
  font-family: var(--font-body);
  font-size: 0.95rem;
  color: var(--text);
  transition: border-color 0.25s ease;
  outline: none;
}

.contact-form input:focus,
.contact-form textarea:focus,
.contact-form select:focus {
  border-color: var(--red);
}

.contact-form textarea {
  height: 130px;
  resize: vertical;
}

.contact-form .btn-primary {
  width: 100%;
  padding: 14px;
  font-size: 1rem;
}

/* =============================================
   FOOTER
============================================= */
#site-footer {
  background: var(--dark);
  color: rgba(255,255,255,0.6);
  padding: 48px 0 28px;
}

.footer-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
}

.footer-top {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 40px;
  padding-bottom: 36px;
  border-bottom: 1px solid rgba(255,255,255,0.1);
  margin-bottom: 24px;
}

/* Footer logo wrapper */
.footer-logo-wrap {
  display: block;
  max-width: 180px;
  max-height: 64px;
  margin-bottom: 20px;
  overflow: hidden;
}

/* Target fallback img, WordPress custom logo link and img — all constrained */
.footer-logo-wrap img,
.footer-logo-wrap .custom-logo-link,
.footer-logo-wrap .custom-logo-link img,
.footer-logo-wrap .custom-logo,
.footer-logo-img {
  display: block !important;
  max-width: 180px !important;
  max-height: 64px !important;
  width: auto !important;
  height: auto !important;
  object-fit: contain;
}

.footer-social {
  display: flex;
  gap: 14px;
  margin-top: 4px;
}

.social-link {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: rgba(255,255,255,0.08);
  color: rgba(255,255,255,0.7);
  transition: background 0.2s, color 0.2s, transform 0.2s;
}

.social-link:hover {
  background: var(--red);
  color: var(--white);
  transform: translateY(-2px);
}

.footer-col h4 {
  color: var(--white);
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  margin-bottom: 16px;
}

.footer-col ul li {
  margin-bottom: 10px;
}

.footer-col ul li a {
  font-size: 0.9rem;
  color: rgba(255,255,255,0.55);
  transition: color 0.2s;
}

.footer-col ul li a:hover { color: var(--gold); }

.footer-bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.82rem;
  flex-wrap: wrap;
  gap: 12px;
}

.footer-bottom a { color: rgba(255,255,255,0.5); margin-left: 16px; }
.footer-bottom a:hover { color: var(--gold); }

/* =============================================
   LIGHTBOX (para fotos del menú)
============================================= */
.lightbox {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 9999;
  background: rgba(0,0,0,0.92);
  align-items: center;
  justify-content: center;
}

.lightbox.active { display: flex; }

.lightbox img {
  max-width: 90vw;
  max-height: 90vh;
  border-radius: 8px;
  object-fit: contain;
}

.lightbox-close {
  position: absolute;
  top: 20px;
  right: 24px;
  color: white;
  font-size: 2.5rem;
  cursor: pointer;
  line-height: 1;
  opacity: 0.7;
  transition: opacity 0.2s;
}

.lightbox-close:hover { opacity: 1; }

/* =============================================
   RESPONSIVE
============================================= */
@media (max-width: 900px) {
  .historia-inner,
  .contact-grid {
    grid-template-columns: 1fr;
    gap: 36px;
  }

  .footer-top {
    grid-template-columns: 1fr 1fr;
  }

  .footer-brand {
    grid-column: 1 / -1;
  }
}

@media (max-width: 680px) {
  /* Toggle visible, nav links ocultos por defecto */
  .nav-toggle { display: flex; }
  nav ul { display: none; }

  /* nav-inner: logo a la izquierda, hamburguesa a la derecha */
  .nav-inner { position: relative; }

  /* El nav se convierte en dropdown debajo del header */
  nav {
    position: absolute;
    top: 70px;
    left: 0;
    right: 0;
    z-index: 999;
    background: linear-gradient(160deg, #1e0a08 0%, #2d0f0c 100%);
    border-top: 2px solid var(--red);
    box-shadow: 0 8px 32px rgba(0,0,0,0.45);
    pointer-events: none;
  }
  nav ul.open {
    display: flex;
    flex-direction: column;
    gap: 0;
    pointer-events: auto;
    animation: menuSlideDown 0.22s ease;
  }
  @keyframes menuSlideDown {
    from { opacity: 0; transform: translateY(-8px); }
    to   { opacity: 1; transform: translateY(0); }
  }
  nav ul {
    padding: 8px 0 16px;
    flex-direction: column;
    gap: 0;
  }
  nav ul li a {
    display: block;
    padding: 14px 28px;
    font-size: 1rem;
    letter-spacing: 0.06em;
    border-bottom: 1px solid rgba(255,255,255,0.06);
    color: rgba(255,255,255,0.88);
  }
  nav ul li a:hover {
    background: rgba(200,16,46,0.15);
    color: var(--gold);
    border-bottom-color: rgba(255,255,255,0.06);
    padding-left: 36px;
    transition: padding 0.2s, background 0.2s, color 0.2s;
  }
  nav ul li:last-child a {
    border-bottom: none;
    margin: 12px 20px 4px;
    padding: 12px 20px;
    border-radius: 6px;
    background: var(--red);
    color: #fff;
    text-align: center;
    letter-spacing: 0.08em;
  }
  nav ul li:last-child a:hover {
    background: var(--red-dark);
    padding-left: 20px;
    color: #fff;
  }

  .menu-grid { grid-template-columns: repeat(2, 1fr); }
  .footer-top { grid-template-columns: 1fr; }
}

/* =============================================
   MENU MODAL (rico)
============================================= */
.menu-card {
  cursor: pointer;
}

.menu-card-icon {
  display: inline-block;
  margin-left: 8px;
  opacity: 0;
  transform: translateY(4px);
  transition: opacity 0.25s, transform 0.25s;
  font-size: 1rem;
}

.menu-card:hover .menu-card-icon {
  opacity: 1;
  transform: translateY(0);
}

.menu-modal {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 10000;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.menu-modal.active {
  display: flex;
}

.menu-modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(26, 16, 8, 0.88);
  backdrop-filter: blur(4px);
  animation: fadeIn 0.25s ease;
}

.menu-modal-box {
  position: relative;
  z-index: 1;
  background: var(--white);
  border-radius: 16px;
  overflow: hidden;
  max-width: 680px;
  width: 100%;
  display: grid;
  grid-template-columns: 1fr 1fr;
  box-shadow: 0 32px 80px rgba(0,0,0,0.4);
  animation: modalSlideIn 0.35s cubic-bezier(0.34, 1.56, 0.64, 1);
}

@keyframes fadeIn {
  from { opacity: 0; }
  to   { opacity: 1; }
}

@keyframes modalSlideIn {
  from { opacity: 0; transform: scale(0.88) translateY(20px); }
  to   { opacity: 1; transform: scale(1)    translateY(0); }
}

.menu-modal-close {
  position: absolute;
  top: 14px;
  right: 16px;
  z-index: 10;
  background: rgba(0,0,0,0.5);
  border: none;
  color: var(--white);
  width: 34px;
  height: 34px;
  border-radius: 50%;
  font-size: 1rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s;
}

.menu-modal-close:hover { background: var(--red); }

.menu-modal-img-wrap {
  aspect-ratio: 1;
  overflow: hidden;
}

.menu-modal-img-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
}

.menu-modal.active .menu-modal-img-wrap img {
  transform: scale(1.04);
}

.menu-modal-body {
  padding: 32px 28px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 12px;
}

.menu-modal-tag {
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--red);
  background: rgba(200,16,46,0.08);
  display: inline-block;
  padding: 4px 12px;
  border-radius: 20px;
  width: fit-content;
}

.menu-modal-body h2 {
  text-align: left;
  font-size: 1.6rem;
  color: var(--dark);
  margin: 0;
}

.menu-modal-body h2::after { display: none; }

.menu-modal-body p {
  color: var(--text-light);
  font-size: 0.95rem;
  line-height: 1.7;
}

.menu-modal-body .btn-primary {
  margin-top: 8px;
  text-align: center;
  font-size: 0.88rem;
}

@media (max-width: 580px) {
  .menu-modal-box {
    grid-template-columns: 1fr;
    max-width: 360px;
  }
  .menu-modal-img-wrap { aspect-ratio: 16/9; }
}

/* =============================================
   MAPA + SUCURSALES LAYOUT
============================================= */
#ubicaciones {
  background: var(--dark);
  color: var(--white);
}

#ubicaciones h2 { color: var(--white); }
#ubicaciones .section-subtitle { color: rgba(255,255,255,0.6); }
#ubicaciones .section-header::after { background: var(--gold); }

.mapa-layout {
  display: grid;
  grid-template-columns: 360px 1fr;
  gap: 0;
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 24px 60px rgba(0,0,0,0.4);
  height: 560px;
}

.sucursales-lista {
  overflow-y: auto;
  background: rgba(255,255,255,0.04);
  border-right: 1px solid rgba(255,255,255,0.08);
  scroll-behavior: smooth;
}

.sucursales-lista::-webkit-scrollbar { width: 4px; }
.sucursales-lista::-webkit-scrollbar-track { background: transparent; }
.sucursales-lista::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.2); border-radius: 4px; }

.sucursal-item {
  padding: 20px 22px;
  border-bottom: 1px solid rgba(255,255,255,0.07);
  cursor: pointer;
  transition: background 0.2s;
}

.sucursal-item:hover {
  background: rgba(255,255,255,0.06);
}

.sucursal-item.active {
  background: rgba(200,16,46,0.18);
  border-left: 3px solid var(--red);
}

.sucursal-item-header {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 10px;
}

.sucursal-num {
  width: 26px;
  height: 26px;
  background: var(--red);
  color: var(--white);
  border-radius: 50%;
  font-size: 0.75rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.sucursal-item h3 {
  font-family: var(--font-display);
  color: var(--white);
  font-size: 1rem;
}

.sucursal-item .ubicacion-info {
  font-size: 0.82rem;
  color: rgba(255,255,255,0.65);
  margin-bottom: 5px;
}

.sucursal-item .ubicacion-links {
  margin-top: 12px;
}

.sucursal-item .ubicacion-links a {
  font-size: 0.78rem;
  padding: 4px 10px;
}

.link-maps {
  color: #4285F4;
  border-color: #4285F4;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 0.82rem;
  font-weight: 600;
  padding: 6px 14px;
  border-radius: 20px;
  border: 1px solid;
  transition: 0.25s;
}

.link-maps:hover { background: #4285F4; color: var(--white); }

.mapa-container {
  position: relative;
  background: #1a1a2e;
}

#google-map {
  width: 100%;
  height: 100%;
}

#google-map iframe {
  width: 100%;
  height: 100%;
  border: 0;
  display: block;
}

.mapa-nota {
  position: absolute;
  bottom: 12px;
  left: 50%;
  transform: translateX(-50%);
  background: rgba(26,16,8,0.85);
  color: rgba(255,255,255,0.75);
  font-size: 0.78rem;
  padding: 6px 16px;
  border-radius: 20px;
  white-space: nowrap;
  pointer-events: none;
}

@media (max-width: 768px) {
  .mapa-layout {
    grid-template-columns: 1fr;
    grid-template-rows: 300px 1fr;
    height: auto;
  }

  .mapa-container { order: -1; height: 280px; }
  .sucursales-lista { max-height: 380px; }
}

/* =============================================
   TOAST NOTIFICACIÓN
============================================= */
.toast-notif {
  position: fixed;
  bottom: 30px;
  left: 50%;
  transform: translateX(-50%) translateY(0);
  background: #1a7a3a;
  color: var(--white);
  padding: 14px 28px;
  border-radius: 50px;
  font-weight: 600;
  font-size: 0.95rem;
  box-shadow: 0 8px 32px rgba(0,0,0,0.3);
  z-index: 99999;
  animation: toastIn 0.4s ease, toastOut 0.4s ease 4s forwards;
}

@keyframes toastIn {
  from { opacity: 0; transform: translateX(-50%) translateY(20px); }
  to   { opacity: 1; transform: translateX(-50%) translateY(0); }
}

@keyframes toastOut {
  from { opacity: 1; }
  to   { opacity: 0; pointer-events: none; }
}

/* =============================================
   SUCURSAL DROPDOWN WIDGET
============================================= */
#ubicaciones {
  background: var(--dark);
  color: var(--white);
}
#ubicaciones h2 { color: var(--white); }
#ubicaciones .section-subtitle { color: rgba(255,255,255,0.6); }
#ubicaciones .section-header::after { background: var(--gold); }

.sucursal-widget {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
  margin-bottom: 24px;
  align-items: start;
}

/* Dropdown label */
.sucursal-dropdown-label {
  display: flex;
  align-items: center;
  gap: 8px;
  color: rgba(255,255,255,0.7);
  font-size: 0.8rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  margin-bottom: 10px;
}

/* Select box custom */
.sucursal-select-box {
  position: relative;
}

.sucursal-select-box select {
  width: 100%;
  appearance: none;
  -webkit-appearance: none;
  background: rgba(255,255,255,0.07);
  border: 1px solid rgba(255,255,255,0.15);
  color: var(--white);
  font-family: var(--font-display);
  font-size: 1.25rem;
  font-weight: 700;
  padding: 16px 50px 16px 20px;
  border-radius: 10px;
  cursor: pointer;
  transition: border-color 0.25s, background 0.25s;
  outline: none;
}

.sucursal-select-box select:hover,
.sucursal-select-box select:focus {
  border-color: var(--red);
  background: rgba(200,16,46,0.1);
}

.sucursal-select-box select option {
  background: #1a1008;
  color: var(--white);
  font-size: 1rem;
}

.select-arrow {
  position: absolute;
  right: 18px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--gold);
  font-size: 1.2rem;
  pointer-events: none;
}

/* Info card */
.sucursal-info-card {
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 10px;
  padding: 24px;
  transition: border-color 0.3s;
}

.sucursal-info-card:hover { border-color: rgba(200,16,46,0.4); }

.sic-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
  gap: 12px;
}

.sic-header h3 {
  font-family: var(--font-display);
  color: var(--gold);
  font-size: 1.2rem;
}

.sic-badge {
  background: rgba(0,160,60,0.2);
  color: #4ade80;
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  padding: 4px 10px;
  border-radius: 20px;
  border: 1px solid rgba(74,222,128,0.3);
  white-space: nowrap;
}

.sic-details { margin-bottom: 16px; }

.sic-row {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  color: rgba(255,255,255,0.7);
  font-size: 0.88rem;
  margin-bottom: 8px;
  line-height: 1.5;
}

.sic-icon { font-size: 1rem; margin-top: 1px; flex-shrink: 0; }

.sic-links {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

/* Mapa full width */
.mapa-container-full {
  width: 100%;
  height: 420px;
  border-radius: 14px;
  overflow: hidden;
  box-shadow: 0 20px 60px rgba(0,0,0,0.5);
  border: 1px solid rgba(255,255,255,0.08);
  transition: opacity 0.3s;
}

.mapa-container-full.loading { opacity: 0.5; }

.mapa-container-full iframe {
  width: 100%;
  height: 100%;
  display: block;
  border: 0;
}

@media (max-width: 760px) {
  .sucursal-widget { grid-template-columns: 1fr; }
  .mapa-container-full { height: 300px; }
}


/* =============================================
   IMAGE LIGHTBOX (menú — solo imagen grande)
============================================= */
.img-lightbox {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 10000;
  align-items: flex-start;
  justify-content: center;
  padding: 48px 16px 24px;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch; /* smooth scroll on iOS */
}
.img-lightbox.active { display: flex; }

.ilb-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(10,5,2,0.94);
  backdrop-filter: blur(6px);
  animation: fadeIn 0.2s ease;
}

.ilb-box {
  position: relative;
  z-index: 1;
  animation: ilbZoom 0.3s cubic-bezier(0.34,1.56,0.64,1);
  /* ancho máximo cómodo para menús verticales */
  width: min(520px, 92vw);
  flex-shrink: 0;
  margin: auto;
  /* ensure box doesn't get clipped on small screens */
  padding-bottom: 16px;
}

@keyframes ilbZoom {
  from { opacity:0; transform: scale(0.92); }
  to   { opacity:1; transform: scale(1);    }
}

/* Contenedor con zoom */
.ilb-zoom-wrap {
  overflow: hidden;
  border-radius: 10px;
  box-shadow: 0 30px 80px rgba(0,0,0,0.7);
  cursor: zoom-in;
  touch-action: pan-x pan-y; /* allow scroll when not zoomed */
}
.ilb-zoom-wrap.zoomed {
  cursor: grab;
  touch-action: none; /* block native scroll only when zoomed */
}
.ilb-zoom-wrap.zoomed:active { cursor: grabbing; }

.ilb-box img {
  display: block;
  width: 100%;
  height: auto;
  border-radius: 10px;
  transform-origin: center center;
  transition: transform 0.15s ease;
  user-select: none;
  -webkit-user-drag: none;
  pointer-events: none; /* el zoom lo maneja el wrapper */
}

/* Hint de zoom */
.ilb-zoom-hint {
  text-align: center;
  color: rgba(255,255,255,0.45);
  font-size: 0.75rem;
  margin-top: 10px;
  letter-spacing: 0.04em;
  user-select: none;
}

/* Botón cerrar — fijo arriba a la derecha */
.ilb-close {
  position: fixed;
  top: 14px;
  right: 14px;
  z-index: 10001;
  background: var(--red);
  border: 3px solid rgba(255,255,255,0.2);
  color: var(--white);
  width: 40px;
  height: 40px;
  border-radius: 50%;
  font-size: 1.1rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s, transform 0.2s;
  box-shadow: 0 4px 16px rgba(0,0,0,0.4);
}
.ilb-close:hover { background: var(--red-dark); transform: scale(1.1); }


/* =============================================
   MODAL QUIÉNES SOMOS
============================================= */
.quienes-modal {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 10001;
  align-items: center;
  justify-content: center;
  padding: 20px;
}
.quienes-modal.active { display: flex; }

.qm-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(10,5,2,0.9);
  backdrop-filter: blur(5px);
  animation: fadeIn 0.25s ease;
}

.qm-box {
  position: relative;
  z-index: 1;
  background: var(--cream);
  border-radius: 18px;
  overflow: hidden;
  max-width: 820px;
  width: 100%;
  max-height: 90vh;
  overflow-y: auto;
  display: grid;
  grid-template-columns: 340px 1fr;
  box-shadow: 0 40px 100px rgba(0,0,0,0.5);
  animation: modalSlideIn 0.35s cubic-bezier(0.34,1.56,0.64,1);
}

.qm-close {
  position: absolute;
  top: 16px;
  right: 16px;
  z-index: 20;
  background: rgba(0,0,0,0.55);
  border: none;
  color: var(--white);
  width: 36px;
  height: 36px;
  border-radius: 50%;
  font-size: 0.95rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s;
}
.qm-close:hover { background: var(--red); }

.qm-img {
  position: relative;
  overflow: hidden;
}
.qm-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.qm-img::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(to right, transparent 60%, var(--cream));
}

.qm-body {
  padding: 40px 36px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  overflow-y: auto;
}

.qm-tag {
  display: inline-block;
  background: rgba(200,16,46,0.1);
  color: var(--red);
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  padding: 5px 14px;
  border-radius: 20px;
  width: fit-content;
}

.qm-body h2 {
  text-align: left;
  font-size: 1.9rem;
  color: var(--dark);
  line-height: 1.1;
}
.qm-body h2::after { display: none; }

.qm-body p {
  color: var(--text-light);
  font-size: 0.92rem;
  line-height: 1.75;
}

.qm-stats {
  display: flex;
  gap: 20px;
  margin-top: 8px;
  padding-top: 20px;
  border-top: 1px solid rgba(0,0,0,0.08);
}

.qm-stat {
  display: flex;
  flex-direction: column;
  align-items: center;
  flex: 1;
}

.qm-num {
  font-family: var(--font-display);
  font-size: 1.8rem;
  font-weight: 700;
  color: var(--red);
  line-height: 1;
}

.qm-lbl {
  font-size: 0.72rem;
  color: var(--text-light);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  text-align: center;
  margin-top: 4px;
}

/* Link de footer que abre el modal */
#btn-quienes-somos,
#btn-quienes-somos-2 {
  cursor: pointer;
  border-bottom: 1px dashed rgba(255,255,255,0.3);
}
#btn-quienes-somos:hover,
#btn-quienes-somos-2:hover {
  color: var(--gold);
  border-bottom-color: var(--gold);
}

@media (max-width: 640px) {
  .qm-box { grid-template-columns: 1fr; }
  .qm-img { height: 200px; }
  .qm-img::after { background: linear-gradient(to bottom, transparent 50%, var(--cream)); }
  .qm-body { padding: 28px 24px; }
  .qm-stats { gap: 12px; }
}

/* =============================================
   LOGO en nav
============================================= */
.nav-logo-img {
  display: block;
  height: 44px !important;
  width: auto !important;
  max-width: 220px !important;
  object-fit: contain;
  transition: opacity 0.2s;
}
.nav-logo-img:hover { opacity: 0.85; }

/* =============================================
   HERO — solo imagen, sin texto
============================================= */
/* Quitar el overlay de texto del hero */
.slide-content { display: none !important; }

/* Placeholder cuando no hay imagen todavía */
.slide-placeholder {
  width: 100%;
  aspect-ratio: 1500 / 664;
  background: linear-gradient(135deg, #1a1008 0%, #3d1a0a 50%, #1a1008 100%);
  display: flex;
  align-items: center;
  justify-content: center;
}

.slide-placeholder span {
  color: rgba(255,255,255,0.35);
  font-size: 1rem;
  text-align: center;
  line-height: 1.8;
  font-family: var(--font-body);
  border: 1px dashed rgba(255,255,255,0.15);
  padding: 20px 32px;
  border-radius: 8px;
}

/* Hero sin gradiente overlay ya que no hay texto */
.slide img {
  opacity: 1;
}

/* =============================================
   EMPTY STATE (sin contenido aun)
============================================= */
.empty-state {
  text-align: center;
  padding: 48px 24px;
  color: rgba(0,0,0,0.5);
  font-size: 0.95rem;
  line-height: 1.8;
  width: 100%;
}
.empty-state strong { color: rgba(0,0,0,0.75); }

/* =============================================
   PROMO SLIDER — RESPONSIVE
============================================= */
/* Tablet: 2 columns */
@media (max-width: 900px) and (min-width: 681px) {
  .promo-slider-wrap { padding: 0 44px; }
}
/* Mobile: buttons moved below by JS, no side padding needed */
@media (max-width: 680px) {
  .promo-slider-wrap { padding: 0; }
}

/* =============================================
   HERO — aspect ratio 1500x664
============================================= */
/* On very tall/small screens keep a min height */
@media (max-width: 680px) {
  /* Hero: imagen completa sin recortar en móvil */
  .slide img {
    aspect-ratio: unset;
    width: 100%;
    height: auto;
    object-fit: contain;
  }
  .slide-placeholder {
    aspect-ratio: 4 / 3;
  }
  /* Prevent hero from being a source of horizontal overflow */
  #hero {
    max-width: 100vw;
    overflow: hidden;
  }
}

/* Menu card sin thumbnail */
.menu-card-no-thumb {
  width: 100%;
  aspect-ratio: 4/3;
  background: linear-gradient(135deg, var(--red-dark), var(--dark));
  display: flex;
  align-items: center;
  justify-content: center;
}
.menu-card-no-thumb span {
  color: rgba(255,255,255,0.7);
  font-family: var(--font-display);
  font-size: 1.1rem;
  text-align: center;
  padding: 16px;
}

/* Form notices */
.form-notice {
  padding: 12px 16px;
  border-radius: 6px;
  font-size: 0.9rem;
  margin-bottom: 16px;
}
.form-notice--error {
  background: rgba(200,16,46,0.1);
  border: 1px solid rgba(200,16,46,0.3);
  color: #9e0c23;
}
