@charset "utf-8";

/* =====================
    RESET BÁSICO Y FUENTES
    ===================== */
*, *::before, *::after { box-sizing: border-box; }
body, h1, h2, h3, p { margin: 0; padding: 0; font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif; }
img { max-width: 100%; height: auto; display: block; }
html { scroll-behavior: smooth; }

body.no-scroll { overflow: hidden; }

/* =====================
    NAVBAR / HEADER
    ===================== */
.navbar { background: #fff; border-bottom: 1px solid #ddd; position: sticky; top: 0; z-index: 1000; }
.navbar-container { display: flex; justify-content: space-between; align-items: center; max-width: 1200px; margin: 0 auto; padding: 10px 20px; width: 100%; }
.nav-left, .nav-right { display: flex; align-items: center; gap: 15px; }
.logo img { height: 50px; flex-shrink: 0; }
.menu-toggle { display: none; flex-direction: column; justify-content: space-between; width: 32px; height: 26px; background: none; border: none; cursor: pointer; z-index: 1002; }
.menu-toggle span { display: block; height: 4px; width: 100%; background: #002d72; border-radius: 2px; transition: all 0.3s ease; }
.menu-toggle.active span { background: #002d72; }
.menu-toggle.active span:nth-child(1) { transform: rotate(45deg) translate(8px, 6px); }
.menu-toggle.active span:nth-child(2) { opacity: 0; }
.menu-toggle.active span:nth-child(3) { transform: rotate(-45deg) translate(8px, -6px); }
.nav-links { display: flex; flex-direction: row; align-items: center; gap: 5px; }
.nav-links a { text-decoration: none; color: #333; font-size: 15px; font-weight: 600; padding: 10px 14px; display: flex; align-items: center; gap: 8px; transition: background 0.2s ease, color 0.2s ease; border-radius: 8px; }
.nav-links a i { color: #002d72; }
.nav-links a:hover { background: #ffcc00; color: #002d72; }
.nav-links a:hover i { color: #002d72; }

/* ESTILOS PARA EL SELECTOR DE CIUDAD */
.ciudad-selector { position: relative; cursor: pointer; }
.ciudad-actual { display: flex; align-items: center; gap: 8px; padding: 10px 15px; border-radius: 8px; background-color: #f5f5f5; border: 1px solid #ddd; transition: background-color 0.2s ease; }
.ciudad-actual:hover { background-color: #eee; }
.ciudad-actual #ciudad-actual-nombre { font-weight: 600; color: #333; }
.ciudad-actual i.fas.fa-map-marker-alt { color: #002d72; }
.ciudad-actual .arrow { font-size: 0.8rem; transition: transform 0.3s ease; }
.ciudad-selector:hover .ciudad-actual .arrow { transform: rotate(180deg); }
.ciudades-dropdown { display: none; position: absolute; top: 100%; left: 0; background-color: #fff; border: 1px solid #ddd; border-radius: 8px; box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1); padding: 5px; margin-top: 5px; z-index: 1001; min-width: 150px; }
.ciudad-selector:hover .ciudades-dropdown { display: block; }
.ciudades-dropdown a { display: block; padding: 10px 15px; color: #333; text-decoration: none; border-radius: 6px; font-weight: 500; }
.ciudades-dropdown a:hover { background-color: #ffcc00; color: #002d72; }

/* Estilos para el fondo oscurecido */
.overlay { position: fixed; top: 0; left: 0; width: 100%; height: 100%; background-color: rgba(0, 0, 0, 0.5); z-index: 999; opacity: 0; pointer-events: none; transition: opacity 0.3s ease-in-out; }
.overlay.active { opacity: 1; pointer-events: all; }

/* =====================
    TITULAR PARALAJE
    ===================== */
.titulo-paralaje { background: url("https://ecuapixel.com/restaurantes/img/fondo-restaurantes-general.jpg") no-repeat center center / cover; background-attachment: fixed; height: 40vh; display: flex; justify-content: center; align-items: center; text-align: center; color: #fff; position: relative; }
.contenido-titulo { background: rgba(0, 0, 0, 0.5); padding: 30px; border-radius: 12px; max-width: 800px; }
.paralaje-logo { max-height: 120px; margin-bottom: 15px; margin-left: auto; margin-right: auto; }

/* =====================
    TÍTULOS DE SECCIÓN
    ===================== */
.section-title { text-align: center; font-size: 1.8rem; color: #333; margin: 40px 0 20px; }
.ciudad-en-titulo { color: #002d72; }

/* =====================
    CARRUSEL DE CATEGORÍAS
    ===================== */
.carousel-container { position: relative; max-width: 1200px; margin: 0 auto; }
.carousel-track { display: flex; overflow-x: auto; gap: 15px; padding: 10px 20px; flex-wrap: nowrap; -ms-overflow-style: none; scrollbar-width: none; }
.carousel-track::-webkit-scrollbar { display: none; }
.carousel-item { cursor: pointer; text-align: center; flex-shrink: 0; width: 110px; }
.carousel-img { width: 110px; height: 110px; border-radius: 12px; background-size: cover; background-position: center; margin: 0 auto 10px; transition: transform 0.2s ease, box-shadow 0.2s ease; }
.carousel-item:hover .carousel-img { transform: scale(1.05); box-shadow: 0 4px 15px rgba(0,0,0,0.1); }
.carousel-item h3 { font-size: 0.9rem; color: #333; font-weight: 600; }
.carousel-container::before, .carousel-container::after { content: ''; position: absolute; top: 0; bottom: 0; width: 30px; z-index: 2; pointer-events: none; }
.carousel-container::before { left: 0; background: linear-gradient(to right, rgba(255, 255, 255, 1), transparent); }
.carousel-container::after { right: 0; background: linear-gradient(to left, rgba(255, 255, 255, 1), transparent); }

.carousel-arrow { display: none; position: absolute; top: 50%; transform: translateY(-50%); background-color: rgba(255, 255, 255, 0.9); border: 1px solid #ddd; border-radius: 50%; width: 40px; height: 40px; font-size: 24px; font-weight: bold; color: #333; cursor: pointer; z-index: 10; transition: all 0.2s ease; box-shadow: 0 2px 5px rgba(0,0,0,0.1); }
.carousel-arrow:hover { background-color: #ffcc00; color: #002d72; border-color: #ffcc00; }
.carousel-arrow.prev { left: 5px; }
.carousel-arrow.next { right: 5px; }

/* =====================
    FILTROS Y BÚSQUEDA
    ===================== */
.filtros-container { padding: 20px; background-color: #f9f9f9; border-top: 1px solid #eee; }
.search-bar-container { position: relative; margin-bottom: 15px; max-width: 1200px; margin-left: auto; margin-right: auto; }
.search-bar-container .fa-search { position: absolute; top: 50%; left: 15px; transform: translateY(-50%); color: #aaa; }
#search-input { width: 100%; padding: 12px 15px 12px 40px; font-size: 1rem; border-radius: 25px; border: 1px solid #ddd; outline: none; transition: border-color 0.2s, box-shadow 0.2s; }
#search-input:focus { border-color: #002d72; box-shadow: 0 0 5px rgba(0, 45, 114, 0.2); }
.filtros-rapidos-container { max-width: 1200px; margin: 0 auto; }
.filtros-rapidos { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; }
.btn-filtro { display: flex; align-items: center; padding: 8px 15px; background: #fff; color: #333; border: 1px solid #ddd; border-radius: 20px; text-decoration: none; font-size: 0.9rem; font-weight: 600; transition: all 0.2s ease; cursor: pointer; flex-shrink: 0; }
.btn-filtro i { margin-right: 5px; }
.btn-filtro:hover { background: #f0f0f0; border-color: #ccc; }
.btn-filtro.active { background: #002d72; color: #fff; border-color: #002d72; font-weight: bold; }

/* =====================
    GRID DE RESTAURANTES Y BOTONES
    ===================== */
.locales-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(320px, 380px)); gap: 20px; padding: 20px; max-width: 1200px; margin: 0 auto; justify-content: center; }
.local-card-link { text-decoration: none; color: #333; }
.card { background: #fff; border-radius: 12px; overflow: hidden; box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08); text-align: center; max-width: 100%; transition: transform 0.2s ease, box-shadow 0.2s ease; }
.local-card-link:hover .card { box-shadow: 0 8px 25px rgba(0, 0, 0, 0.12); transform: translateY(-3px); }
.local-card { display: flex; flex-direction: column; text-align: left; padding: 20px; height: 100%; }
.local-card h3 { margin-bottom: 5px; font-size: 1.4rem; }
.local-card.cerrado { opacity: 0.6; background-color: #f5f5f5; }
.rating { color: #ffcc00; font-size: 1.1rem; margin-bottom: 10px; }
.promo-tag { display: inline-block; background-color: #ff0000; color: #fff; font-size: 0.75rem; font-weight: bold; padding: 2px 6px; border-radius: 4px; margin-left: 8px; vertical-align: middle; }
.logistics-info { display: flex; justify-content: space-between; align-items: center; font-size: 0.9rem; margin-bottom: 15px; padding-bottom: 10px; border-bottom: 1px solid #eee; }
.descripcion { font-size: 0.95rem; color: #555; margin-bottom: 15px; flex-grow: 1; }
.botones { margin-top: auto; gap: 8px; display: flex; justify-content: flex-start; }
.btn { display: inline-flex; align-items: center; justify-content: center; padding: 8px 12px; background: #002d72; color: #fff; border-radius: 6px; text-decoration: none; font-size: 0.9rem; transition: background 0.2s ease; border: none; cursor: pointer; text-align: center; }
.btn:hover { background: #ffcc00; color: #002d72; }
.btn.whatsapp { background: #25d366; }
.btn.whatsapp:hover { background: #128c4a; }
.no-results-message { text-align: center; padding: 40px 20px; font-size: 1.2rem; color: #777; }

/* =====================
    FOOTER
    ===================== */
footer { background-color: #333; color: #fff; padding: 30px 20px; margin-top: 20px; }
.footer-main { max-width: 1200px; margin: 0 auto 20px auto; display: flex; flex-direction: column; align-items: center; gap: 20px; }
.footer-links { display: flex; flex-wrap: wrap; justify-content: center; gap: 15px 25px; margin-bottom: 10px; }
.footer-links a { color: #fff; text-decoration: none; font-size: 14px; transition: color 0.3s; }
.footer-links a:hover { color: #ffcc00; }
.footer-social { text-align: center; }
.footer-social h4 { font-size: 18px; margin-bottom: 15px; color: #ffcc00; }
.social-icons { display: flex; justify-content: center; gap: 15px; }
.social-icons a { color: #fff; font-size: 24px; transition: color 0.3s; }
.social-icons a:hover { color: #ffcc00; }
.footer-legal { max-width: 1200px; margin: 0 auto; border-top: 1px solid #444; text-align: center; padding-top: 20px; font-size: 13px; }

/* ==================================================================
   --- SECCIÓN CORREGIDA: ESTILOS DEL CARRITO ---
   ================================================================== */
.cart-icon-link { position: relative; display: flex; align-items: center; color: #002d72; text-decoration: none; padding: 10px; }
.cart-icon-link .fa-shopping-cart { font-size: 1.5rem; }
.cart-counter { position: absolute; top: 2px; right: 2px; background-color: #ff0000; color: #fff; border-radius: 50%; width: 20px; height: 20px; font-size: 0.75rem; font-weight: bold; display: flex; align-items: center; justify-content: center; border: 2px solid #fff; }

.carrito-container { max-width: 800px; margin: 20px auto; padding: 20px; background-color: #fff; border-radius: 12px; box-shadow: 0 4px 15px rgba(0,0,0,0.08); }
.carrito-item { display: flex; align-items: center; padding: 15px 0; border-bottom: 1px solid #eee; gap: 15px; }
.carrito-item:last-child { border-bottom: none; }
.carrito-item-info { flex-grow: 1; }
.carrito-item-info h4 { margin: 0 0 5px 0; }
.carrito-item-info p { color: #666; font-size: 0.9rem; }
.cantidad-controls { display: flex; align-items: center; gap: 10px; }
.btn-cantidad { background-color: #f0f0f0; border: 1px solid #ddd; width: 30px; height: 30px; border-radius: 50%; cursor: pointer; font-weight: bold; }
.item-precio { font-weight: bold; min-width: 60px; text-align: right; }
.carrito-total { text-align: right; margin-top: 20px; padding-top: 20px; border-top: 2px solid #002d72; font-size: 1.2rem; font-weight: bold; }
.acciones-carrito { text-align: center; margin-top: 20px; }
.acciones-carrito .btn { width: 100%; max-width: 300px; padding: 12px; font-size: 1rem; }
.carrito-vacio-mensaje { text-align: center; padding: 40px 20px; }
.carrito-vacio-mensaje p { font-size: 1.2rem; margin-bottom: 20px; }

/* ==================================================================
   --- REGLAS RESPONSIVAS ---
   ================================================================== */
@media (max-width: 992px) {
    .menu-toggle { display: flex; }
    .nav-links { position: fixed; top: 0; right: 0; height: 100vh; width: 280px; background: #fff; flex-direction: column; align-items: flex-start; padding: 0; gap: 0; z-index: 1001; box-shadow: -5px 0 15px rgba(0,0,0,0.15); transform: translateX(100%); transition: transform 0.3s ease-in-out; }
    .nav-links.active { transform: translateX(0); }
    .nav-links a { width: 100%; padding: 15px 25px; border-radius: 0; border-bottom: 1px solid #f0f0f0; }
    .nav-header { display: flex; align-items: center; gap: 10px; padding: 15px 25px; width: 100%; border-bottom: 1px solid #ddd; }
    .nav-header img { height: 30px; }
    .nav-header span { font-weight: bold; font-size: 1.1rem; }
    .nav-separator-mobile { height: 1px; width: 100%; background-color: #eee; margin: 10px 0; }
}

@media (max-width: 767px) {
    .locales-grid { grid-template-columns: 1fr; }
    .filtros-rapidos { justify-content: flex-start; flex-wrap: nowrap; overflow-x: auto; padding-bottom: 10px; -ms-overflow-style: none; scrollbar-width: none; }
    .filtros-rapidos::-webkit-scrollbar { display: none; }
    .carousel-track { gap: 8px; padding: 10px 15px; scroll-snap-type: x mandatory; }
    .carousel-item { width: 85px; scroll-snap-align: start; }
    .carousel-img { width: 85px; height: 85px; margin-bottom: 5px; }
    .carousel-item h3 { font-size: 0.8rem; }
    .nav-left { gap: 10px; }
    .logo img { height: 40px; }
    .ciudad-actual { padding: 8px 12px; }
    .ciudad-actual #ciudad-actual-nombre, .ciudad-actual .arrow { display: none; }
    .cart-counter { width: 18px; height: 18px; font-size: 0.7rem; top: 4px; right: 4px; }
}

@media (min-width: 768px) {
    .carousel-arrow { display: block; }
}