/* ChefAir - stili base del sito (estratti da index.php: modali, carrello, banner, promo, ecc.) */
    /* Open/closed status badge (header + footer) */
    @keyframes pulse-dot {
        0%, 100% { opacity: 1; }
        50% { opacity: 0.35; }
    }
    /* Protezione Font Awesome */
    i.fa-solid,
    i.fa-regular,
    i.fa-light,
    i.fa-thin,
    i.fa-brands,
    i.fa-duotone,
    i[class*="fa-"] {
        font-family: "Font Awesome 6 Free" !important;
        font-style: normal !important;
    }

    i.fa-brands {
        font-family: "Font Awesome 6 Brands" !important;
    }

    /* Retrocompatibilità FA5 */
    i.fas,
    i.far,
    i.fal,
    i.fab {
        font-family: "Font Awesome 6 Free" !important;
        font-style: normal !important;
        font-weight: 900 !important;
    }

    i.far {
        font-weight: 400 !important;
    }

    i.fab {
        font-family: "Font Awesome 6 Brands" !important;
    }

    /* Stili per la modale */
    .modal-overlay {
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        background-color: rgba(0, 0, 0, 0.7);
        display: none;
        justify-content: center;
        align-items: flex-start;
        z-index: 1000;
        opacity: 0;
        transition: all 0.3s ease;
        overflow-y: auto;
        -webkit-overflow-scrolling: touch;
        padding: 20px 0;
    }

    /* Promo Banner Styles */
    #promoBanner {
        position: fixed;
        bottom: 20px;
        /* Mobile: Responsive width */
        left: 50%;
        transform: translate(-50%, 150%);
        /* Start hidden */
        width: 90vw;
        /* Use viewport width percentage for safety */
        max-width: 350px;
        z-index: 9998;
        transition: transform 0.6s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    }

    /* Desktop: Anchored to right */
    @media (min-width: 640px) {
        #promoBanner {
            left: auto;
            right: 20px;
            width: 350px;
            transform: translateY(150%);
        }

        #promoBanner.show {
            transform: translateY(0);
        }
    }

    /* Mobile show state */
    #promoBanner.show {
        transform: translate(-50%, 0);
    }

    /* "How it works" infographic: fade carousel.
       The 1st image of each carousel stays in normal flow and sets the box height;
       the others are absolutely positioned on top of it, and only their opacity is toggled. */
    .fade-slide {
        opacity: 0;
        transition: opacity 1.4s ease-in-out;
    }
    .fade-slide.is-active {
        opacity: 1;
    }

    /* Cookie notice */
    #cookieBanner {
        position: fixed;
        left: 0;
        right: 0;
        bottom: 0;
        z-index: 10020;
        transform: translateY(100%);
        transition: transform 0.4s ease;
        box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.15);
    }

    #cookieBanner.show {
        transform: translateY(0);
    }

    /* Welcome Banner Styles */
    #welcomeBanner {
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        width: auto;
        /* Let left/right define width */
        z-index: 9999;
        transform: translateY(-100%);
        transition: transform 0.5s cubic-bezier(0.68, -0.55, 0.265, 1.55);
        box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    }

    .modal-overlay.active {
        display: flex;
        opacity: 1;
        visibility: visible;
    }

    .modal-content {
        background: white;
        border-radius: 12px;
        width: 90%;
        max-width: 800px;
        height: 80%;
        max-height: 700px;
        overflow: hidden;
        transform: scale(0.9);
        transition: transform 0.3s ease;
        box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
        display: flex;
        flex-direction: column;
    }

    .modal-overlay.active .modal-content {
        transform: scale(1);
    }

    .modal-header {
        display: flex;
        justify-content: space-between;
        align-items: center;
        padding: 1rem 1.5rem;
        border-bottom: 1px solid #e5e7eb;
        flex-shrink: 0;
    }

    .modal-body {
        flex: 1;
        position: relative;
        overflow: hidden;
        -webkit-overflow-scrolling: touch;
        width: 100%;
    }

    .modal-body iframe {
        position: absolute;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        border: none;
        display: block;
    }

    /* Mobile adjustments for modal */
    @media (max-width: 640px) {
        .modal-content {
            width: 95%;
            height: 90%;
            max-height: 90vh;
        }

        .modal-body {
            height: calc(100% - 60px);
            /* Adjust based on header height */
        }
    }

    /* Stili per lo scrollbar hide - tutti i browser */
    .scrollbar-hide::-webkit-scrollbar {
        display: none;
    }

    .scrollbar-hide {
        -ms-overflow-style: none;
        /* IE and Edge */
        scrollbar-width: none;
        /* Firefox */
    }

    /* Snap scroll per mobile */
    .snap-x {
        scroll-snap-type: x mandatory;
    }

    .snap-center {
        scroll-snap-align: center;
    }

    /* Stili per la mappa */
    #storesMap {
        height: 500px;
        width: 100%;
        border-radius: 12px;
        z-index: 1;
    }

    .store-card {
        transition: all 0.3s ease;
    }

    .store-card:hover {
        transform: translateY(-4px);
        box-shadow: 0 10px 25px rgba(0, 0, 0, 0.15);
    }

    /* Welcome Banner Styles */
    #welcomeBanner {
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        z-index: 9999;
        transform: translateY(-100%);
        transition: transform 0.5s cubic-bezier(0.68, -0.55, 0.265, 1.55);
    }

    #welcomeBanner.show {
        transform: translateY(0);
    }

    @keyframes slideDown {
        from {
            transform: translateY(-100%);
        }

        to {
            transform: translateY(0);
        }
    }

    @keyframes pulse {

        0%,
        100% {
            opacity: 1;
        }

        50% {
            opacity: 0.8;
        }
    }

    .pulse-animation {
        animation: pulse 2s ease-in-out infinite;
    }

    @keyframes fadeIn {
        from {
            opacity: 0;
        }

        to {
            opacity: 1;
        }
    }

    .fade-in {
        animation: fadeIn 0.5s ease-in;
    }

    /* Promo Banner Styles */
    #promoBanner {
        position: fixed;
        bottom: 20px;
        /* Mobile: Simplified positioning */
        left: 20px;
        right: 20px;
        width: auto;
        max-width: 350px;
        margin: 0 auto;
        /* Centers it if max-width is hit */
        z-index: 9998;
        /* Start hidden below */
        transform: translateY(150%);
        transition: transform 0.6s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    }

    /* Desktop: Anchored to right */
    @media (min-width: 640px) {
        #promoBanner {
            left: auto;
            right: 20px;
            width: 350px;
            margin: 0;
        }
    }

    /* Show state - simple translate Y */
    #promoBanner.show {
        transform: translateY(0);
    }

    .promo-image-container {
        height: 160px;
        overflow: hidden;
        border-top-left-radius: 1rem;
        border-top-right-radius: 1rem;
        background-color: #f3f4f6;
        display: block;
        position: relative;
    }

    .promo-image {
        width: 100%;
        height: 100%;
        object-fit: cover;
        transition: transform 0.5s ease;
    }

    #promoBanner:hover .promo-image {
        transform: scale(1.1);
    }

    /* Ensure close button is always clickable */
    #promoBanner>button:first-of-type {
        z-index: 10;
        pointer-events: auto;
        cursor: pointer;
    }

    /* Ensure action button is clickable and responsive */
    #promoBanner .p-5 button {
        z-index: 5;
        pointer-events: auto;
        cursor: pointer;
        position: relative;
    }

    @keyframes float {
        0% {
            transform: translateY(0px);
        }

        50% {
            transform: translateY(-10px);
        }

        100% {
            transform: translateY(0px);
        }
    }

    .float-animation {
        animation: float 3s ease-in-out infinite;
    }

    /* Image Lightbox Modal */
    #imageLightbox {
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        background-color: rgba(0, 0, 0, 0.9);
        display: none;
        justify-content: center;
        align-items: center;
        z-index: 10000;
        opacity: 0;
        transition: opacity 0.3s ease;
        padding: 20px;
    }

    #imageLightbox.active {
        display: flex;
        opacity: 1;
    }

    #imageLightbox img {
        max-width: 90vw;
        max-height: 90vh;
        object-fit: contain;
        border-radius: 12px;
        box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
    }

    #imageLightbox .close-lightbox {
        position: absolute;
        top: 20px;
        right: 20px;
        background: white;
        border: none;
        border-radius: 50%;
        width: 50px;
        height: 50px;
        display: flex;
        align-items: center;
        justify-content: center;
        cursor: pointer;
        font-size: 24px;
        color: #333;
        box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
        transition: all 0.2s ease;
        z-index: 10001;
    }

    #imageLightbox .close-lightbox:hover {
        background: #f3f4f6;
        transform: scale(1.1);
    }


    /* Apple-style glass notification */
    .glass-toast-wrapper {
        position: fixed;
        inset: 0;
        z-index: 9999;
        display: flex;
        align-items: center;
        justify-content: center;
        padding: 16px;
        pointer-events: none;
        transition: opacity 0.35s ease;
    }

    .glass-toast-wrapper.glass-toast-out {
        opacity: 0;
    }

    /* Audio player - same "Apple glass" recipe as the toast notification */
    .glass-audio-player {
        background: rgba(255, 255, 255, 0.72);
        -webkit-backdrop-filter: saturate(180%) blur(24px);
        backdrop-filter: saturate(180%) blur(24px);
        border: 1px solid rgba(255, 255, 255, 0.65);
        box-shadow: 0 12px 40px rgba(0, 0, 0, 0.10), inset 0 1px 0 rgba(255, 255, 255, 0.8);
    }

    .glass-audio-btn {
        width: 48px;
        height: 48px;
        flex-shrink: 0;
        border-radius: 50%;
        background: #F03E62;
        color: #fff;
        display: flex;
        align-items: center;
        justify-content: center;
        font-size: 1.05rem;
        border: none;
        cursor: pointer;
        box-shadow: 0 6px 16px rgba(240, 62, 98, 0.35);
        transition: transform 0.15s ease;
    }

    .glass-audio-btn:active {
        transform: scale(0.92);
    }

    .glass-toast {
        display: flex;
        align-items: center;
        gap: 14px;
        width: 100%;
        max-width: 26rem;
        padding: 16px 20px;
        border-radius: 24px;
        background: rgba(255, 255, 255, 0.72);
        -webkit-backdrop-filter: saturate(180%) blur(24px);
        backdrop-filter: saturate(180%) blur(24px);
        border: 1px solid rgba(255, 255, 255, 0.65);
        box-shadow: 0 12px 40px rgba(0, 0, 0, 0.18), inset 0 1px 0 rgba(255, 255, 255, 0.8);
        animation: glassToastIn 0.35s cubic-bezier(0.2, 0.9, 0.3, 1.2);
    }

    .glass-toast-icon {
        font-size: 2rem;
        flex-shrink: 0;
    }

    .glass-toast-text {
        margin: 0;
        color: #1d1d1f;
        font-size: 1rem;
        font-weight: 600;
        line-height: 1.35;
        overflow-wrap: anywhere;
    }

    @keyframes glassToastIn {
        from {
            opacity: 0;
            transform: scale(0.92) translateY(8px);
        }

        to {
            opacity: 1;
            transform: scale(1) translateY(0);
        }
    }

    /* Prevent iOS Safari from zooming the page when an input is focused */
    @media (max-width: 767px) {
        input, select, textarea {
            font-size: 16px !important;
        }
    }


    /* Store name written with HTML in the CMS: every element on its own line */
    .store-name-html > strong,
    .store-name-html > b,
    .store-name-html > span,
    .store-name-html > em,
    .store-name-html > i {
        display: block;
    }

    /* Cart modal: never taller than the visible viewport (iOS Safari toolbars included) */
    .cart-panel {
        max-height: 85vh;
        max-height: calc(100dvh - 24px);
        min-height: 0;
    }

    /* Recipe/Ingredients Modal */
    #recipeModal {
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        background-color: rgba(0, 0, 0, 0.7);
        display: none;
        justify-content: center;
        align-items: center;
        z-index: 9999;
        opacity: 0;
        transition: opacity 0.3s ease;
        padding: 20px;
    }

    #recipeModal.active {
        display: flex;
        opacity: 1;
    }

    .recipe-content {
        background: white;
        border-radius: 16px;
        max-width: 500px;
        width: 100%;
        max-height: 80vh;
        overflow-y: auto;
        box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
        position: relative;
    }

    .recipe-header {
        background: linear-gradient(135deg, #9752A2 0%, #F03E62 100%);
        color: white;
        padding: 24px;
        border-radius: 16px 16px 0 0;
        position: sticky;
        top: 0;
        z-index: 1;
    }

    .recipe-body {
        padding: 24px;
    }

    .recipe-icon-btn {
        position: absolute;
        top: 12px;
        right: 12px;
        background: rgba(255, 255, 255, 0.2);
        backdrop-filter: blur(4px);
        border: 2px solid white;
        border-radius: 50%;
        width: 40px;
        height: 40px;
        display: flex;
        align-items: center;
        justify-content: center;
        cursor: pointer;
        transition: all 0.2s ease;
        z-index: 5;
    }

    .recipe-icon-btn:hover {
        background: #9752A2;
        color: white;
        transform: scale(1.1);
    }

    .recipe-icon-btn i {
        font-size: 18px;
        color: white;
        text-shadow: 0 1px 3px rgba(0, 0, 0, 0.5);
    }

    .recipe-icon-btn:hover i {
        color: white;
    }

    .ingredient-item {
        padding: 12px;
        border-bottom: 1px solid #e5e7eb;
        display: flex;
        align-items: center;
        gap: 12px;
    }

    .ingredient-item:last-child {
        border-bottom: none;
    }

    .ingredient-icon {
        width: 32px;
        height: 32px;
        background: #f3f4f6;
        border-radius: 50%;
        display: flex;
        align-items: center;
        justify-content: center;
        flex-shrink: 0;
    }

    .close-recipe {
        position: absolute;
        top: 20px;
        right: 20px;
        background: rgba(255, 255, 255, 0.2);
        border: none;
        border-radius: 50%;
        width: 36px;
        height: 36px;
        display: flex;
        align-items: center;
        justify-content: center;
        cursor: pointer;
        color: white;
        transition: all 0.2s ease;
    }

    .close-recipe:hover {
        background: rgba(255, 255, 255, 0.3);
        transform: scale(1.1);
    }

    /* Recipe Video Player */
    .recipe-video-container {
        width: 100%;
        background: #000;
        position: relative;
    }

    .recipe-video {
        width: 100%;
        max-height: 300px;
        display: block;
    }

    #phoneInputModal .iti {
        width: 100%;
    }
    #phoneInputModal .iti input {
        width: 100%;
        min-height: 44px;
    }
    #phoneInputModal .iti__country-container {
        z-index: 2;
    }
    #phoneInputModal .iti__dropdown-content {
        z-index: 10020;
    }
#cartModal{z-index: 9999;}