/* =========================================================
   CARTA INDIVIDUAL - DISEÑO MODERNO
   ========================================================= */

/* Fondo general */
.menu-page {
    background: #000;
    color: #fff;
    min-height: 100vh;
    font-family: "Poppins", sans-serif;
}

/* ================= HERO ================= */
.menu-hero {
    position: relative;
    height: 65vh;
    min-height: 400px;
    /* asegura altura mínima para contenido largo */
    overflow: hidden;
    display: flex;
    align-items: center;
    /* centrado vertical flexible */
    justify-content: center;
    /* centrado horizontal */
    text-align: center;
}

.menu-hero-bg {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    filter: brightness(0.55);
    z-index: 0;
}

.menu-hero-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.8) 10%, rgba(0, 0, 0, 0.2) 70%);
    z-index: 1;
    pointer-events: none;
}

.menu-hero-content,
.menu-hero-actions,
#menu-toggle {
    position: relative;
    z-index: 2;
}

.menu-hero-content {
    position: relative;
    /* ya no absolute */
    z-index: 2;
    max-width: 750px;
    width: 90%;
    padding: 1.5rem 1rem;
    line-height: 1.6;
}

.menu-hero-title {
    font-size: 2.8rem;
    font-weight: 700;
    letter-spacing: 0.5px;
}

.menu-hero-price {
    font-size: 1.6rem;
    font-weight: 600;
    margin-top: 0.5rem;
    color: #fff;
}

.menu-hero-desc {
    font-size: 1.1rem;
    opacity: 0.9;
    margin-top: 0.8rem;
}

.menu-hero-actions {
    position: absolute;
    top: 1.2rem;
    right: 1.2rem;
    display: flex;
    gap: 0.5rem;
}

/* ================= SWIPER NAV ================= */
:root {
    /* ajusta si quieres más/menos hueco cuando quede sticky */
    --topbar-height: 0px;
    /* si tienes un topbar fijo, pon su altura aquí */
    --swiper-gap: 12px;
    /* espacio al top cuando queda sticky */
    --swiper-lift: 20px;
    /* cuánto “muerde” al hero inicialmente */
}

.mySwiper {
    position: sticky;
    top: calc(var(--topbar-height) + var(--swiper-gap));
    z-index: 50;
    width: 100%;

    /* look translúcido */
    background: rgba(0, 0, 0, 0.55);
    backdrop-filter: blur(10px);

    /* sombra sutil */
    box-shadow: 0 6px 24px rgba(0, 0, 0, .25);

    /* estilado */
    padding: .65rem .8rem;
    border-bottom: 1px solid rgba(255, 255, 255, .08);
    margin-top: calc(-1 * var(--swiper-lift));
    overflow: hidden;
}

/* degradado inferior para transición suave con el contenido */
.mySwiper::after {
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    bottom: -16px;
    height: 16px;
    pointer-events: none;
    background: linear-gradient(to bottom, rgba(0, 0, 0, .35), rgba(0, 0, 0, 0));
}

/* centrar y ajustar slides */
.mySwiper .swiper-wrapper {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: .5rem;
    padding-left: 0 !important;
    padding-right: 0 !important;
}

.mySwiper .swiper-slide {
    width: auto !important;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* pills */
.mySwiper .nav-link {
    background: rgba(255, 255, 255, .12);
    border-radius: 5px;
    color: #fff;
    font-weight: 500;
    padding: .5rem 1.2rem;
    border: none;
    white-space: nowrap;
    line-height: 1;
    transition: transform .2s ease, background .2s ease, box-shadow .2s ease;
}

.mySwiper .nav-link:hover {
    background: rgba(255, 255, 255, .24);
    transform: scale(1.05);
}

.mySwiper .nav-link.active {
    background: var(--accent-color);
    /* color: #fff; */
    box-shadow: 0 0 8px rgba(1, 88, 97, 0.6);
}

/* Ajustes responsivos */
@media (max-width: 1024px) {
    .mySwiper {
        padding: 0.6rem 0;
    }

    .mySwiper .swiper-wrapper {
        padding-left: 1rem;
        padding-right: 1rem;
    }
}

@media (max-width: 768px) {
    .mySwiper .swiper-wrapper {
        padding-left: 0.75rem;
        padding-right: 0.75rem;
    }

    .mySwiper .nav-link {
        font-size: 0.9rem;
        padding: 0.45rem 1rem;
    }
}

/* al hacer scroll, un poco más opaco/definido */
body.scrolled .mySwiper {
    background: rgba(0, 0, 0, .75);
    backdrop-filter: blur(14px);
}

/* responsive fino */
@media (max-width: 575px) {
    :root {
        --swiper-lift: 44px;
    }

    .mySwiper {
        padding: .55rem .6rem;
    }

    .mySwiper .nav-link {
        padding: .46rem 1rem;
        font-size: .9rem;
    }
}


/* ================= SECCIONES ================= */
.section-bg {
    position: relative;
    border-radius: 16px;
    overflow: hidden;
}

.section-bg img {
    width: 100%;
    height: 250px;
    object-fit: cover;
    filter: brightness(0.5);
    transition: transform 0.3s ease;
}

.section-bg:hover img {
    transform: scale(1.05);
}

.section-bg h3 {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: #fff;
    text-transform: uppercase;
    font-weight: 700;
    font-size: 1.5rem;
    letter-spacing: 1px;
}

.section-title {
    color: #fff;
    font-weight: 600;
    font-size: 1.5rem;
}

/* ================= PRODUCTOS ================= */
.row.equal-cols>[class*="col-"] {
    display: flex;
    transition: all 0.3s ease, opacity 0.3s ease;
}

.product-card {
    background: #121212;
    border-radius: 16px;
    padding: 1.2rem 1.5rem;
    display: flex;
    justify-content: space-between;
    align-items: stretch;
    width: 100%;
    min-height: 220px;
    transition: transform 0.25s ease, box-shadow 0.25s ease;
    gap: 1rem;
}

.product-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.3);
}

.product-info {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
}

.product-info h5 {
    font-size: 1.1rem;
    font-weight: 700;
    margin-bottom: 0.4rem;
    text-transform: uppercase;
    line-height: 25px;
    margin-bottom: 0.5rem;
}

.product-desc {
    font-size: 0.95rem;
    opacity: 0.95;
    margin-bottom: 0.6rem;
    text-transform: lowercase;
    margin-bottom: 0.5rem;
}

.product-desc::first-letter {
    text-transform: uppercase;
}

.product-price {
    font-weight: 700;
    color: #fff;
    margin-top: 0.6rem;
    text-align: center;
}

.product-image {
    flex-shrink: 0;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    align-items: center;
}

.product-image img {
    width: 120px;
    height: 120px;
    object-fit: cover;
    border-radius: 12px;
    transition: transform 0.25s ease;
}

.product-card:hover .product-image img {
    transform: scale(1.05);
}

/* igualar alturas */
.row.equal-cols {
    display: flex;
    flex-wrap: wrap;
    align-items: stretch;
    transition: all 0.3s ease;
}



.row.equal-cols>div {
    display: flex;
}

/* ================= ALÉRGENOS ================= */
.allergens-list {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    align-items: center;
    margin-top: auto;
}

.allergen-item {
    background: transparent !important;
    border: none;
    padding: 0;
}

.allergen-icon {
    width: 28px;
    height: 28px;
    object-fit: contain;
    filter: brightness(1);
    transition: transform 0.2s ease;
}

.allergen-icon:hover {
    transform: scale(1.15);
}

@media (min-width: 768px) {
    .row.equal-cols {
        grid-template-columns: repeat(2, 1fr);
    }
}


/* Animación de entrada suave */
.fade-in {
    opacity: 1 !important;
    transform: translateY(0) !important;
    transition: opacity 0.6s ease, transform 0.6s ease;
}

.product-card,
.section-bg {
    opacity: 0;
    transform: translateY(25px);
}

.menu-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.9);
    backdrop-filter: blur(8px);
    color: #fff;
    display: flex;
    justify-content: center;
    align-items: center;

    /* estado inicial oculto */
    opacity: 0;
    pointer-events: none;
    visibility: hidden;

    transition: opacity 0.3s ease, visibility 0.3s ease;
    z-index: 9999;
}

.menu-overlay.show {
    opacity: 1;
    pointer-events: all;
    visibility: visible;
}

.menu-overlay-content {
    text-align: center;
    max-width: 300px;
    pointer-events: auto;
}

#menu-toggle {
    position: absolute;
    top: 1.2rem;
    left: 1.2rem;
    z-index: 1100;
}

#menu-content {
    transition: all 0.3s ease;
}


/* ============================================================
    FOOTER
   ============================================================ */
.menus-footer {
    background: #000;
    border-top: 1px solid rgba(255, 255, 255, 0.06);
    padding: 26px 16px;
}

.footer-made {
    color: #fff;
    font-weight: 600;
    letter-spacing: .2px;
    font-size: 0.90rem;
}

.footer-made .heart {
    display: inline-block;
    margin: 0 .35rem;
    transform: translateY(2px);
    color: #14b8a6;
}

.menus-footer a {
    color: #fff;
    text-decoration: none;
    border-bottom: 2px solid transparent;
    transition: border-color .2s ease, opacity .2s ease;
}

.menus-footer a:hover {
    border-color: rgba(255, 255, 255, .7);
    opacity: .95;
}

@media (max-width: 575px) {
    .footer-made {
        font-size: .98rem;
        font-weight: 600;
    }
}

/* =========================================================
    RESPONSIVE MEJORADO: TABLET & MOBILE
   ========================================================= */

/* === TABLET === */
@media (max-width: 1097px) and (min-width: 768px) {

    .menu-hero {
        height: 55vh;
    }

    .menu-hero-title {
        font-size: 2.2rem;
    }

    .menu-hero-desc {
        font-size: 1rem;
        max-width: 90%;
        margin: 0.5rem auto 0;
    }

    .product-image {
        align-self: center;
        margin-bottom: 0.6rem;
    }

    .product-image img {
        width: 110px;
        height: 110px;
    }

    .product-info {
        width: 100%;
    }

    .product-desc {
        font-size: 0.9rem;
        text-align: left;
    }

    .product-info h5 {
        font-size: 1rem;
    }

    .allergens-list {
        justify-content: flex-start;
    }
}

/* === MOBILE === */
@media (max-width: 767px) {

    /* Hero */
    .menu-hero {
        height: auto;
        /* deja que crezca según el texto */
        min-height: 55vh;
        padding: 4rem 1rem 2rem;
        /* da espacio arriba/abajo */
    }

    .menu-hero-title {
        font-size: 1.5rem;
    }

    .menu-hero-price {
        font-size: 1.1rem;
        margin-top: 0rem;
        margin-bottom: 0.3rem;
    }

    .menu-hero-desc {
        font-size: 0.8rem;
        margin-top: 0rem;
        line-height: 1.5;
        max-width: 95%;
        margin-left: auto;
        margin-right: auto;
    }

    .menu-hero-actions {
        top: 0.8rem;
        right: 0.8rem;
    }

    /* Overlay */
    .menu-overlay-content {
        max-width: 90%;
        font-size: 1rem;
    }

    .menu-overlay-content h4 {
        font-size: 1.2rem;
    }

    .menu-overlay-content .btn {
        margin-top: 0.4rem;
    }

    .menu-hero-content {
        position: relative;
        top: auto;
        left: auto;
        transform: none;
        width: 100%;
        padding: 1rem;
    }

    #menu-toggle {
        top: 1rem;
        left: 1rem;
        font-size: 1.2rem;
        padding: 0.4rem 0.6rem;
    }

    /* Swiper */
    .mySwiper {
        padding: 0.4rem 0.5rem;
        background: rgba(0, 0, 0, 0.75);
        backdrop-filter: blur(12px);
    }

    .mySwiper .nav-link {
        font-size: 0.85rem;
        padding: 0.4rem 0.8rem;
    }

    /* Filtro de alérgenos */
    #allergen-filter {
        overflow-x: auto;
        white-space: nowrap;
        -webkit-overflow-scrolling: touch;
        padding: 0.3rem 0.5rem;
    }

    #allergen-filter .btn {
        flex: 0 0 auto;
    }

    .product-image img {
        width: 100px;
        height: 100px;
    }

    .product-price {
        margin-top: 0.5rem;
        font-size: 1rem;
    }

    .product-info h5 {
        font-size: 0.9rem;
        line-height: 20px;
    }

    .product-desc {
        font-size: 0.8rem;
    }

    /* Botón arriba */
    #goTopBtn {
        right: 10px;
        bottom: 10px;
        font-size: 1.1rem;
        padding: 0.4rem 0.7rem;
    }

    .section-bg {
        display: flex;
        justify-content: center;
        align-items: center;
    }

    .section-bg h3 {
        font-size: 1.3rem;
        padding: 0 0.5rem;
        transform: translate(-50%, -50%);
    }
}

/* ===== CENTRAR HERO CONTENT Y DAR MÁS ESPACIO ===== */
.menu-hero-content {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    text-align: center;
    max-width: 750px;
    /* un poco más ancho */
    width: 90%;
    line-height: 1.6;
    /* más aire entre líneas */
}

/* En tablets y móviles, asegurar buena proporción */
@media (max-width: 1097px) {
    .menu-hero-content {
        max-width: 90%;
        padding: 0 1rem;
        line-height: 1.5;
    }
}

.section-bg {
    position: relative;
    display: flex;
    justify-content: center;
    align-items: center;
    text-align: center;
}

.section-bg h3 {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    margin: 0;
    padding: 0 1rem;
    /* evita que el texto toque los bordes */
    width: 100%;
    text-align: center;
    line-height: 1.3;
}

.allergen-filter-btn .allergen-icon {
    pointer-events: none;
}

/* ===== ESTILO PARA BOTONES DE ALÉRGENOS ===== */
.allergen-filter-btn {
    background-color: transparent !important;
    border-color: rgba(255, 255, 255, 0.25);
    transition: background-color 0.2s ease, border-color 0.2s ease;
}

/* Cuando está activo */
.allergen-filter-btn.active {
    background-color: #fff !important;
    color: #000 !important;
    border-color: #fff !important;
}

/* El icono no intercepta el clic */
.allergen-filter-btn .allergen-icon {
    pointer-events: none;
}

/* ============================================================
    TEMA LIGHT PARA MENU INDIVIDUAL
    Solo se activa si .menu-page tiene la clase .theme-light
   ============================================================ */

/* Fondo general */
.menu-page.theme-light {
    background: #f8f9fa !important;
    color: #222 !important;
}

/* HERO */
.menu-page.theme-light .menu-hero-bg {
    filter: brightness(0.85) saturate(1.05);
    /* más luminoso */
}

.menu-page.theme-light .menu-hero-overlay {
    background: linear-gradient(to top, rgba(255, 255, 255, 0.85) 10%, rgba(255, 255, 255, 0.4) 70%) !important;
}

.menu-page.theme-light .menu-hero-content,
.menu-page.theme-light .menu-hero-title,
.menu-page.theme-light .menu-hero-price,
.menu-page.theme-light .menu-hero-desc {
    color: #222 !important;
}

.menu-page.theme-light .menu-hero-actions .btn,
.menu-page.theme-light #menu-toggle {
    border-color: #222 !important;
    color: #222 !important;
    background: rgba(255, 255, 255, 0.85) !important;
}

.menu-page.theme-light .menu-hero-actions .btn:hover,
.menu-page.theme-light #menu-toggle:hover {
    background: #222 !important;
    color: #fff !important;
}

/* SWIPER NAV */
.menu-page.theme-light .mySwiper {
    background: rgba(255, 255, 255, 0.85) !important;
    border-bottom: 1px solid rgba(0, 0, 0, 0.12) !important;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.12) !important;
}

.menu-page.theme-light .mySwiper::after {
    background: linear-gradient(to bottom, rgba(255, 255, 255, 0.4), rgba(255, 255, 255, 0)) !important;
}

.menu-page.theme-light .mySwiper .nav-link {
    background: rgba(0, 0, 0, 0.07) !important;
    color: #222 !important;
}

.menu-page.theme-light .mySwiper .nav-link:hover {
    background: rgba(0, 0, 0, 0.12) !important;
}

.menu-page.theme-light .mySwiper .nav-link.active {
    background: var(--accent-color) !important;
    color: #fff !important;
}

/* SECCIONES */
.menu-page.theme-light .section-title,
.menu-page.theme-light .section-bg {
    color: #222 !important;
}

.menu-page.theme-light .section-bg img {
    filter: brightness(0.9);
    /* más clara */
}

/* PRODUCT CARDS */
.menu-page.theme-light .product-card {
    background: #ffffff !important;
    color: #222 !important;
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.12);
}

.menu-page.theme-light .product-card:hover {
    box-shadow: 0 8px 26px rgba(0, 0, 0, 0.16);
}

.menu-page.theme-light .product-price {
    color: #111 !important;
}

.menu-page.theme-light .product-desc {
    color: #444 !important;
}

.menu-page.theme-light .product-info h5 {
    color: #111 !important;
}

.menu-page.theme-light .product-image img {
    border: 1px solid rgba(0, 0, 0, 0.1);
}

/* ALÉRGENOS */
.menu-page.theme-light .allergen-filter-btn {
    border-color: rgba(0, 0, 0, 0.25) !important;
}

.menu-page.theme-light .allergen-filter-btn.active {
    background-color: #000 !important;
    color: #fff !important;
    border-color: #000 !important;
}

.menu-page.theme-light .allergen-icon {
    filter: brightness(0.8);
}

/* OVERLAY */
.menu-page.theme-light .menu-overlay {
    background: rgba(255, 255, 255, 0.95) !important;
    color: #222 !important;
}

.menu-page.theme-light .menu-overlay a {
    color: #222 !important;
}

.menu-page.theme-light .menu-overlay .btn {
    border-color: #222 !important;
    color: #222 !important;
}

.menu-page.theme-light .footer-made,
.menu-page.theme-light .menus-footer a {
    color: #222 !important;
}

.menu-page-wrapper.light {
    background: #f8f9fa !important;
}

/* ==============================
   TEMA LIGHT -> FOOTER GENERAL
   ============================== */

.menu-page-wrapper.light .menus-footer {
    background: #f8f9fa !important;
    border-top: 1px solid rgba(0, 0, 0, 0.1) !important;
}

/* 🔹 Aquí pones el texto oscuro */
.menu-page-wrapper.light .footer-made {
    color: #111 !important;
}

.menu-page-wrapper.light .menus-footer a {
    color: #000 !important;
    border-color: transparent !important;
}

.menu-page-wrapper.light .menus-footer .heart {
    color: #e63946 !important;
}

/* PEDIDOS ONLINE */
.qty-control-wrapper button {
    width: 26px;
    height: 26px;
    padding: 0;
    border-radius: 50%;
    border: 1px solid #999;
    background: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
}

.qty-control-wrapper .qty-number {
    min-width: 20px;
    text-align: center;
    font-weight: 600;
    display: inline-block;
    font-size: 15px;
}

.product-price {
    min-width: 60px;
    text-align: left;
}

/* ========================================
   BOTÓN FLOTANTE CARRITO + BADGE
   ======================================== */
.floating-cart-btn {
    position: fixed;
    bottom: 85px;
    right: 20px;
    z-index: 9999;
}

.floating-cart-btn button {
    width: 62px;
    height: 62px;
    border-radius: 50%;
    background: var(--accent-color, #00d1b2);
    border: none;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.25);
    font-size: 28px;
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform .2s ease;
}

.floating-cart-btn button:hover {
    transform: scale(1.08);
}

/* BADGE flotante estilo WhatsApp */
.floating-cart-badge {
    position: absolute;
    top: -8px;
    right: -8px;
    background: #ff4d4f;
    color: white;
    border-radius: 50%;
    padding: 2px 8px;
    font-size: 0.85rem;
    font-weight: 700;
    min-width: 22px;
    text-align: center;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.3);
}

.qty-number {
    transition: transform .2s ease;
}

.qty-number.updated {
    transform: scale(1.25);
    transition: transform .2s ease;
}
