/* ──────────────────────────────────────────────────────────────────────────
   Nav móvil compartido (Jack's Smash Burger)
   Activo SOLO en pantallas <=900px. Desktop no se ve afectado.
   Incluir en cada página DESPUÉS del <style> inline para ganar en cascada.
   ────────────────────────────────────────────────────────────────────────── */

.nav-hamburger { display: none; }
.nav-backdrop { display: none; }
.nav-mobile { display: none; }
.nav-cta-mobile { display: none; }

@media (max-width: 900px) {
  /* Override del nav existente: logo compacto + ocultar nav-links inline */
  nav { padding: 0 18px !important; height: 72px !important; }
  .nav-logo img { height: 48px !important; }
  .nav-links { display: none !important; }

  /* CTA "Pide Ahora" inline en la barra superior móvil (no se muestra
     cuando estamos en pide-ahora.html — esa página simplemente no
     incluye el <a class="nav-cta-mobile">). margin-left:auto empuja el
     botón a la derecha del logo; margin-right:12px lo separa de la
     hamburguesa. */
  .nav-cta-mobile {
    display: inline-block;
    background: #F5C800;
    color: #0f0f0f;
    font-family: 'Barlow Condensed', sans-serif;
    font-weight: 700;
    font-size: 0.78rem;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    padding: 8px 14px;
    border-radius: 3px;
    text-decoration: none;
    line-height: 1.2;
    margin-left: auto;
    margin-right: 12px;
    white-space: nowrap;
  }
  .nav-cta-mobile:active { background: #d4a800; }

  /* Botón hamburguesa */
  .nav-hamburger {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 5px;
    width: 44px; height: 44px;
    background: transparent;
    border: 1px solid rgba(0,0,0,0.08);
    border-radius: 8px;
    cursor: pointer;
    padding: 0;
    transition: background 0.2s ease, border-color 0.2s ease;
  }
  .nav-hamburger:hover { background: rgba(0,0,0,0.04); }
  .nav-hamburger span {
    display: block;
    width: 22px; height: 2px;
    background: #0f0f0f;
    transition: transform 0.3s ease, opacity 0.2s ease;
  }
  .nav-hamburger.is-open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
  .nav-hamburger.is-open span:nth-child(2) { opacity: 0; }
  .nav-hamburger.is-open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

  /* Backdrop oscuro sobre el resto de la web */
  .nav-backdrop {
    display: block;
    position: fixed;
    top: 72px; left: 0; right: 0; bottom: 0;
    background: rgba(0,0,0,0.55);
    z-index: 198;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
  }
  .nav-backdrop.is-open {
    opacity: 1;
    pointer-events: auto;
  }

  /* Drawer del menú */
  .nav-mobile {
    display: block;
    position: fixed;
    top: 72px; left: 0; right: 0;
    background: rgba(255,255,255,0.98);
    backdrop-filter: blur(22px);
    -webkit-backdrop-filter: blur(22px);
    border-bottom: 1px solid rgba(0,0,0,0.08);
    box-shadow: 0 18px 36px rgba(0,0,0,0.08);
    z-index: 199;
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.35s cubic-bezier(0.32, 0.72, 0, 1);
  }
  .nav-mobile.is-open { max-height: 80vh; }
  .nav-mobile-links {
    list-style: none;
    padding: 12px 24px 20px;
    display: flex;
    flex-direction: column;
    gap: 4px;
    margin: 0;
  }
  .nav-mobile-links a {
    display: block;
    padding: 14px 8px;
    font-family: 'Barlow Condensed', sans-serif;
    font-weight: 600;
    font-size: 1.05rem;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: #555;
    text-decoration: none;
    border-bottom: 1px solid rgba(0,0,0,0.08);
  }
  .nav-mobile-links li:last-child a { border-bottom: none; }
  .nav-mobile-links a.nav-mobile-cta {
    background: #F5C800;
    color: #0f0f0f;
    border-radius: 3px;
    text-align: left;
    margin-top: 8px;
    border-bottom: none;
  }
  .nav-mobile-links a.active { color: #F5C800; }
  /* Caso especial: estás EN pide-ahora.html → el CTA lleva .active sobre
     fondo amarillo. Forzar texto blanco para que se lea. */
  .nav-mobile-links a.nav-mobile-cta.active { color: #ffffff; }
}
