/* ==========================================================================
   Menù Bar Mirò - Foglio di Stile Ufficiale (Stile Scuro & Cocktail Bar)
   Palette Bar Mirò:
   - Sfondo Principale (Antracite Scuro) : #171513
   - Sfondo delle Schede                 : #211C19
   - Arancio Acceso (Brand)              : #F06432
   - Rame Scuro (Brand)                  : #B94B2D
   - Turchese (Accento Pop Fresco)       : #35C6C0
   - Magenta (Accento Pop Creativo)      : #D94D87
   - Viola (Accento Pop Serale)          : #8B6BD6
   - Ambra (Accento Caldo)               : #E7A447
   - Testi Chiari (Color Crema)          : #F8F0E6
   ========================================================================== */

/* 1. Variabili di Stile */
:root {
    --bg-main: #171513;                /* Antracite scuro elegante di sfondo */
    --card-bg: #211C19;                /* Superficie scura per le schede */
    --card-bg-elevated: #29221E;       /* Superficie rialzata per hover e dettagli */
    --text-primary: #F8F0E6;           /* Testo chiaro color crema per massima leggibilità */
    --text-secondary: #BFAFA2;         /* Crema sfumato per descrizioni e dettagli */
    --text-muted: #8E7E73;             /* Testo attenuato per note e dettagli minori */
    
    /* Colori Identitari Bar Mirò */
    --accent-orange: #F06432;          /* Arancio acceso distintivo */
    --accent-orange-hover: #FA7646;    /* Arancio chiaro per hover */
    --accent-copper: #B94B2D;          /* Rame scuro per bordi e finiture */
    --accent-copper-soft: rgba(185, 75, 45, 0.35);
    --accent-orange-glow: rgba(240, 100, 50, 0.28);
    
    /* Accenti Secondari Premium Pop (Distribuiti con criterio) */
    --accent-turquoise: #35C6C0;       /* Turchese: freschezza, pillole attive, dettagli drink */
    --accent-magenta: #D94D87;         /* Magenta: accento creativo, pillole speciali */
    --accent-purple: #8B6BD6;          /* Viola: drink signature, accento serale */
    --accent-amber: #E7A447;           /* Ambra: calore, demo tag, note di gusto */
    
    --border-card: #352B24;            /* Bordo discreto delle schede */
    --border-subtle: #29221C;          /* Bordo di separazione morbido */
    --badge-bg: #2D2520;
    --badge-text: #B8A89A;
    --shadow-card: 0 4px 14px rgba(0, 0, 0, 0.4);
    --shadow-hover: 0 8px 22px rgba(240, 100, 50, 0.2);
    --radius-card: 12px;
    --radius-thumb: 10px;
    --radius-pill: 9999px;
    --font-stack: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

/* 2. Reset di base */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
    -webkit-text-size-adjust: 100%;
}

body {
    font-family: var(--font-stack);
    background-color: var(--bg-main);
    background-image:
        /* Gradienti morbidi di luce calda ramata */
        radial-gradient(ellipse 55% 45% at 15% 18%, rgba(185, 75, 45, 0.055) 0%, transparent 70%),
        radial-gradient(ellipse 50% 50% at 85% 55%, rgba(240, 100, 50, 0.04) 0%, transparent 70%),
        radial-gradient(ellipse 60% 40% at 25% 85%, rgba(185, 75, 45, 0.045) 0%, transparent 70%),
        /* Filigrana astratta e discreta: vortici di liquidi, cerchi incompleti e riflessi ramati */
        url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='600' height='600' viewBox='0 0 600 600'%3E%3Cpath d='M100 80 C 180 30 260 90 230 180 C 200 270 90 240 80 330 C 70 420 180 470 270 420' fill='none' stroke='%23B94B2D' stroke-width='1.2' stroke-opacity='0.11'/%3E%3Cpath d='M340 580 C 370 510 320 440 360 380 C 400 320 450 360 480 280 C 510 200 460 140 520 80' fill='none' stroke='%23B94B2D' stroke-width='1' stroke-opacity='0.08'/%3E%3Cpath d='M440 200 A 110 110 0 1 1 370 320' fill='none' stroke='%23F06432' stroke-width='1.1' stroke-opacity='0.08' stroke-dasharray='10 7'/%3E%3Ccircle cx='440' cy='200' r='50' fill='none' stroke='%23B94B2D' stroke-width='0.8' stroke-opacity='0.07'/%3E%3Cpath d='M480 490 Q 550 410 500 320 T 570 150' fill='none' stroke='%23B94B2D' stroke-width='1' stroke-opacity='0.08'/%3E%3Cpath d='M40 510 L 130 420 L 190 480' fill='none' stroke='%23F06432' stroke-width='0.9' stroke-opacity='0.07'/%3E%3Cpath d='M280 40 L 330 90 L 390 30' fill='none' stroke='%23B94B2D' stroke-width='0.9' stroke-opacity='0.07'/%3E%3Ccircle cx='200' cy='130' r='2' fill='%23F06432' fill-opacity='0.13'/%3E%3Ccircle cx='380' cy='460' r='2.5' fill='%23B94B2D' fill-opacity='0.12'/%3E%3Ccircle cx='510' cy='240' r='1.8' fill='%23F06432' fill-opacity='0.1'/%3E%3Ccircle cx='120' cy='290' r='1.5' fill='%23B94B2D' fill-opacity='0.1'/%3E%3Ccircle cx='430' cy='120' r='2' fill='%23F06432' fill-opacity='0.1'/%3E%3C/svg%3E");
    background-repeat: no-repeat, no-repeat, no-repeat, repeat;
    background-size: 100% 100%, 100% 100%, 100% 100%, 600px 600px;
    background-attachment: fixed;
    color: var(--text-primary);
    line-height: 1.5;
    padding-bottom: 30px;
}

/* 3. Intestazione Principale (Cocktail Pub Bar Mirò - Atmosfera Calda, Creativa & Informale) */
.header {
    background:
        radial-gradient(ellipse 70% 55% at 50% 15%, rgba(240, 100, 50, 0.2) 0%, transparent 70%),
        linear-gradient(180deg, rgba(23, 21, 19, 0.45) 0%, rgba(23, 21, 19, 0.8) 72%, #171513 100%),
        url('../img/header-bg-pub.jpg') center 22% / cover no-repeat,
        #171513;
    color: var(--text-primary);
    padding: 28px 20px 22px;
    text-align: center;
    border-bottom: 2px solid var(--accent-copper);
    box-shadow: 0 4px 24px rgba(0, 0, 0, 0.72), 0 0 32px rgba(185, 75, 45, 0.16);
    position: relative;
    overflow: hidden;
}

.header-container {
    max-width: 680px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    position: relative;
    z-index: 2;
}

/* Logo Ufficiale Bar Mirò (Originale intatto, centrato, nessun filtro colore) */
.brand-logo-wrapper {
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 12px;
    filter: drop-shadow(0 6px 20px rgba(0, 0, 0, 0.8));
    transition: transform 0.25s ease;
}

@media (hover: hover) and (pointer: fine) {
    .brand-logo-wrapper:hover {
        transform: translateY(-2px);
    }
}

.brand-logo-img {
    width: 155px;
    height: 155px;
    max-width: 160px;
    max-height: 160px;
    object-fit: contain;
    display: block;
    user-select: none;
    -webkit-user-select: none;
}

/* Slogan in corsivo coordinato ai toni caldi, centrato sotto il logo */
.brand-slogan-cursive,
.brand-slogan {
    font-family: 'Caveat', 'Segoe Script', 'Brush Script MT', 'Dancing Script', 'Snell Roundhand', cursive, sans-serif;
    font-style: italic;
    font-weight: 700;
    font-size: 1.15rem;
    color: #F8EFE6;
    letter-spacing: 0.3px;
    line-height: 1.3;
    margin: 0 auto 16px;
    padding: 0;
    max-width: 440px;
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.9), 0 0 14px rgba(235, 120, 50, 0.35);
}

/* Box informativo allergeni centrato */
/* Box informativo allergeni centrato */
.allergen-box {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 9px;
    background-color: rgba(23, 21, 19, 0.88);
    border: 1px solid rgba(185, 75, 45, 0.42);
    border-radius: 9px;
    padding: 8px 16px;
    font-size: 0.86rem;
    color: #D2C5B8;
    line-height: 1.4;
    max-width: 100%;
}

.allergen-icon {
    font-size: 1.05rem; /* Ingrandito proporzionalmente */
    color: var(--accent-orange);
    flex-shrink: 0;
}

/* Parola 'allergeni' cliccabile nel box avvisi */
.allergen-link {
    background: none;
    border: none;
    padding: 0;
    margin: 0;
    font-family: inherit;
    font-size: inherit;
    font-weight: 700;
    color: var(--accent-orange);
    text-decoration: underline;
    text-decoration-color: rgba(240, 100, 50, 0.55);
    text-underline-offset: 3px;
    cursor: pointer;
    display: inline;
    vertical-align: baseline;
    -webkit-tap-highlight-color: transparent;
    transition: color 0.18s ease, text-decoration-color 0.18s ease;
}

.allergen-link:hover {
    color: #FA7646;
    text-decoration-color: #FA7646;
}

.allergen-link:focus-visible {
    color: #FA7646;
    text-decoration-color: #FA7646;
    outline: 2px solid var(--accent-orange);
    outline-offset: 2px;
    border-radius: 2px;
}

/* 4. Barra di Navigazione Categorie (Sticky / Orizzontale) */
.category-nav {
    position: sticky;
    top: 0;
    z-index: 50;
    background-color: rgba(23, 21, 19, 0.95);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    border-bottom: 1px solid var(--border-subtle);
    padding: 8px 0;
}

.category-nav-scroll {
    position: relative;
    max-width: 720px;
    margin: 0 auto;
    display: flex;
    gap: 8px;
    overflow-x: auto;
    overflow-y: hidden;
    scrollbar-width: none;
    -webkit-overflow-scrolling: touch;
    padding: 4px 16px;
    scroll-padding: 0 16px;
}

.category-nav-scroll::-webkit-scrollbar {
    display: none;
}

.category-pill {
    flex-shrink: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    white-space: nowrap;
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 600;
    padding: 8px 18px;
    border-radius: var(--radius-pill);
    color: var(--text-primary);
    background-color: var(--card-bg);
    border: 1px solid var(--border-card);
    transition: all 0.2s ease-in-out;
    box-sizing: border-box;
}

.category-pill:hover {
    color: var(--accent-orange);
    border-color: var(--accent-copper);
    background-color: #28211C;
}

.category-pill.active {
    background-color: var(--accent-orange);
    color: #171513;
    border-color: var(--accent-orange);
    font-weight: 700;
    box-shadow: 0 2px 10px var(--accent-orange-glow);
}

/* 5. Contenitore Principale e Sezioni */
.menu-wrapper {
    max-width: 680px;
    margin: 0 auto;
    padding: 20px 16px 36px;
}

.menu-section {
    margin-bottom: 30px;
    scroll-margin-top: 68px;
}

.section-title {
    font-size: 1.35rem;
    font-weight: 800;
    color: var(--text-primary);
    margin: 22px 0 14px;
    padding-bottom: 8px;
    border-bottom: 1px solid rgba(185, 75, 45, 0.32);
    letter-spacing: 0.3px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.title-indicator {
    display: inline-block;
    width: 6px;
    height: 18px;
    background: linear-gradient(180deg, var(--accent-orange) 0%, var(--accent-copper) 100%);
    border-radius: 3px;
}

/* 6. Schede dei Prodotti (Supporto Casi A, B, C, D) */
.product-card {
    background-color: var(--card-bg); /* #211C19 fondo solido e uniforme */
    border: 1px solid rgba(185, 75, 45, 0.38); /* Bordo sottile color rame */
    border-radius: var(--radius-card);
    padding: 13px 15px;
    margin-bottom: 12px;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.42), 0 1px 3px rgba(185, 75, 45, 0.08);
    display: flex;
    align-items: center;
    gap: 14px;
    cursor: default; /* Non cliccabile per impostazione predefinita */
    user-select: text;
    -webkit-tap-highlight-color: transparent;
    transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease;
}

/* Schede con dettaglio attivo (Casi D, E, F): cliccabili e con feedback visivo */
.product-card.has-detail {
    cursor: pointer;
    user-select: none;
}

.product-card.has-detail:not(.unavailable):hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 22px rgba(0, 0, 0, 0.55), 0 0 14px rgba(240, 100, 50, 0.18);
    border-color: rgba(240, 100, 50, 0.55);
}

.product-card.has-detail:focus-visible {
    outline: none;
    border-color: var(--accent-orange);
    box-shadow: 0 0 0 3px rgba(240, 100, 50, 0.4);
}

/* Schede senza dettaglio (Casi A, B, C): non cliccabili, nessun movimento al passaggio del mouse */
.product-card:not(.has-detail):hover {
    transform: none;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.42), 0 1px 3px rgba(185, 75, 45, 0.08);
    border-color: rgba(185, 75, 45, 0.38);
}

/* Riquadro Foto a Sinistra (Solo se il prodotto ha un'immagine - Casi B, D, E) */
.product-thumb-container {
    width: 72px;
    height: 72px;
    flex-shrink: 0;
    border-radius: var(--radius-thumb);
    overflow: hidden;
    border: 1px solid var(--accent-copper);
    background-color: #181513;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
}

/* Prodotti SENZA immagine (Casi A, C, F): nessun riquadro vuoto o cornice, testo a tutta larghezza */
.product-card:not(.has-image) .product-thumb-container {
    display: none !important;
}

.product-card:not(.has-image) .product-content {
    flex: 1 1 100%;
    width: 100%;
}

.product-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    border-radius: calc(var(--radius-thumb) - 1px);
}

/* Segnaposto elegante se la foto non è ancora presente */
.product-thumb-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: radial-gradient(circle, #29211C 0%, #1A1714 100%);
    color: var(--accent-copper);
}

.placeholder-icon {
    width: 28px;
    height: 28px;
    color: var(--accent-copper);
    opacity: 0.85;
}

/* Contenuto Testuale a Destra */
.product-content {
    flex: 1;
    min-width: 0;
}

.product-header {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    gap: 10px;
    margin-bottom: 5px;
}

.product-title-group {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 6px;
}

.product-name {
    font-size: 1.05rem;
    font-weight: 750;
    color: var(--text-primary); /* #F8F0E6 chiaro e leggibile */
    line-height: 1.3;
    letter-spacing: 0.2px;
}

.product-price {
    font-size: 1.08rem;
    font-weight: 800;
    color: var(--accent-orange); /* #F06432 arancio acceso */
    white-space: nowrap;
    text-align: right;
}

.demo-tag {
    font-size: 0.72rem;
    font-weight: 600;
    color: var(--accent-amber);
    margin-left: 3px;
}

.product-description {
    font-size: 0.88rem;
    color: var(--text-secondary); /* #BFAFA2 crema attenuato */
    line-height: 1.45;
}

/* 7. Stato Prodotto: Non Disponibile (Effetto Desaturazione & Fascia ESAURITO) */
.product-card.unavailable {
    background-color: #1A1715;
    border: 1px dashed var(--border-card);
}

.product-card.unavailable:not(.has-detail):hover {
    transform: none;
    box-shadow: none;
    border-color: var(--border-card);
}

.product-card.unavailable.has-detail {
    cursor: pointer;
}

.product-card.unavailable.has-detail:hover {
    border-color: rgba(240, 100, 50, 0.45);
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.4);
    transform: translateY(-1px);
}

.product-card.unavailable .product-thumb-container {
    border-color: #4A3528;
}

/* Effetto desaturazione elegante per la fotografia / segnaposto della miniatura */
.product-card.unavailable .product-img,
.product-card.unavailable .product-thumb-placeholder {
    filter: grayscale(100%) contrast(1.1) brightness(0.78);
    opacity: 0.85;
    transition: filter 0.25s ease, opacity 0.25s ease;
}

/* Fascia diagonale ESAURITO sulla miniatura (Solo se il prodotto possiede immagine) */
.product-card.unavailable.has-image .product-thumb-container::after {
    content: "ESAURITO";
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) rotate(-45deg);
    width: 145%;
    text-align: center;
    background: linear-gradient(90deg, #8E341B 0%, #C44C27 50%, #8E341B 100%);
    border-top: 1px solid rgba(255, 255, 255, 0.4);
    border-bottom: 1px solid rgba(255, 255, 255, 0.4);
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.7);
    color: #FFFFFF;
    font-family: var(--font-stack);
    font-size: 0.58rem;
    font-weight: 850;
    letter-spacing: 1.2px;
    line-height: 1;
    padding: 3.5px 0;
    pointer-events: none;
    z-index: 2;
    user-select: none;
    white-space: nowrap;
}

.product-card.unavailable .product-name {
    color: #C8BAB0;
}

.product-card.unavailable .product-price {
    color: var(--text-secondary);
    text-decoration: line-through;
    opacity: 0.8;
}

.product-card.unavailable .product-description {
    color: #9E8F82;
}

.badge-unavailable {
    display: inline-block;
    font-size: 0.68rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.4px;
    padding: 2px 6px;
    border-radius: 4px;
    background-color: var(--badge-bg);
    color: var(--badge-text);
    border: 1px solid #44372F;
}

/* 8. Sezione Social ("Seguici sui social") */
.social-section {
    background-color: var(--card-bg);
    border: 1px solid var(--border-card);
    border-radius: var(--radius-card);
    padding: 24px 20px;
    margin-top: 36px;
    text-align: center;
    box-shadow: var(--shadow-card);
}

.social-title {
    font-size: 1.25rem;
    font-weight: 800;
    color: var(--accent-orange);
    margin-bottom: 6px;
}

.social-intro {
    font-size: 0.88rem;
    color: var(--text-secondary);
    margin-bottom: 18px;
    max-width: 440px;
    margin-left: auto;
    margin-right: auto;
}

.social-buttons {
    display: flex;
    justify-content: center;
    gap: 12px;
    flex-wrap: wrap;
}

.social-btn {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
    font-size: 0.95rem;
    font-weight: 600;
    padding: 10px 22px;
    border-radius: var(--radius-pill);
    transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.social-icon {
    width: 20px;
    height: 20px;
    flex-shrink: 0;
}

/* Bottone Facebook */
.social-facebook {
    background-color: #1877F2;
    color: #FFFFFF;
    box-shadow: 0 2px 8px rgba(24, 119, 242, 0.3);
}

.social-facebook:hover {
    background-color: #1365D0;
    transform: translateY(-2px);
    box-shadow: 0 4px 14px rgba(24, 119, 242, 0.45);
}

/* Bottone Instagram */
.social-instagram {
    background: linear-gradient(45deg, #F58529, #DD2A7B, #8134AF, #515BD4);
    color: #FFFFFF;
    box-shadow: 0 2px 8px rgba(221, 42, 123, 0.3);
}

.social-instagram:hover {
    opacity: 0.95;
    transform: translateY(-2px);
    box-shadow: 0 4px 14px rgba(221, 42, 123, 0.45);
}

/* 9. Sezione Dove Siamo */
.location-section {
    background-color: var(--card-bg);
    border: 1px solid var(--border-card);
    border-radius: var(--radius-card);
    padding: 24px 20px;
    margin-top: 20px;
    text-align: center;
    box-shadow: var(--shadow-card);
}

.location-title {
    font-size: 1.25rem;
    font-weight: 800;
    color: var(--accent-orange);
    margin-bottom: 6px;
}

.location-invite {
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 14px;
}

.location-address-box {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    background-color: rgba(23, 21, 19, 0.7);
    border: 1px solid var(--border-card);
    border-radius: 10px;
    padding: 12px 18px;
    margin-bottom: 18px;
    max-width: 100%;
}

.location-pin-icon {
    width: 24px;
    height: 24px;
    color: var(--accent-orange);
    flex-shrink: 0;
}

.location-address {
    font-style: normal;
    font-size: 0.9rem;
    color: var(--text-secondary);
    line-height: 1.45;
    text-align: left;
}

.location-address span {
    display: block;
}

.location-action {
    display: flex;
    justify-content: center;
}

.location-btn {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
    font-size: 0.95rem;
    font-weight: 700;
    background-color: var(--accent-orange);
    color: #171513;
    padding: 11px 24px;
    border-radius: var(--radius-pill);
    box-shadow: 0 3px 12px var(--accent-orange-glow);
    transition: transform 0.15s ease, box-shadow 0.15s ease, background-color 0.15s ease;
}

.location-btn:hover {
    background-color: #FA7646;
    transform: translateY(-2px);
    box-shadow: 0 5px 16px rgba(240, 100, 50, 0.4);
}

.location-btn-icon {
    width: 20px;
    height: 20px;
    flex-shrink: 0;
}

/* 10. Piè di Pagina (Firma promozionale discreta per Digital Craft Lab) */
.footer {
    text-align: center;
    padding: 28px 18px 36px;
    color: var(--text-secondary);
    border-top: 1px solid rgba(185, 75, 45, 0.28); /* Sottile linea divisoria color rame */
    margin-top: 30px;
}

.footer-promo-title {
    font-size: 1.05rem;
    font-weight: 700;
    color: var(--accent-orange);
    margin-bottom: 6px;
    letter-spacing: 0.2px;
}

.footer-promo-text {
    font-size: 0.88rem;
    color: var(--text-secondary);
    line-height: 1.45;
    margin-bottom: 8px;
}

.footer-promo-link-wrapper {
    margin: 0;
}

.footer-promo-link {
    display: inline-block;
    font-size: 0.92rem;
    font-weight: 600;
    color: var(--accent-orange);
    text-decoration: none;
    transition: color 0.18s ease, text-decoration 0.18s ease;
}

.footer-promo-link:hover,
.footer-promo-link:focus-visible {
    color: #FA7646;
    text-decoration: underline;
    outline: none;
}

/* 11. Pop-up Dettagli Prodotto (Modal) */
html, body {
    overscroll-behavior-x: none;
}

body.modal-open {
    overflow: hidden !important;
    overscroll-behavior: none;
    overscroll-behavior-x: none;
}

.modal-backdrop {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 1000;
    background-color: rgba(10, 9, 8, 0.85);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 14px;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.22s ease, visibility 0.22s ease;
    cursor: pointer;
    touch-action: pan-y;
    overscroll-behavior: none;
    overscroll-behavior-x: none;
}

.modal-backdrop.open {
    opacity: 1;
    visibility: visible;
}

.modal-card {
    position: relative;
    background-color: var(--card-bg);
    border: 1px solid var(--accent-copper);
    border-radius: 16px;
    width: 100%;
    max-width: 480px;
    max-height: 90vh;
    display: flex;
    flex-direction: column;
    box-shadow: 0 16px 40px rgba(0, 0, 0, 0.75), 0 0 24px rgba(185, 75, 45, 0.2);
    transform: scale(0.96) translateY(14px);
    transition: transform 0.22s cubic-bezier(0.16, 1, 0.3, 1);
    overflow: hidden;
    cursor: default;
    touch-action: pan-y;
    overscroll-behavior: none;
    overscroll-behavior-x: none;
    user-select: none;
    -webkit-user-select: none;
}

.modal-backdrop.open .modal-card {
    transform: scale(1) translateY(0);
}

/* Card specifica per il pop-up tabella allergeni */
.modal-card.modal-card-allergen {
    width: -moz-fit-content;
    width: fit-content;
    max-width: min(94vw, 920px);
    max-height: 90vh;
    padding: 0;
    background-color: var(--card-bg);
    border: 1px solid var(--accent-copper);
    border-radius: 16px;
    align-items: center;
    justify-content: center;
    cursor: default;
}

.allergen-modal-img {
    display: block;
    width: auto;
    height: auto;
    max-width: 100%;
    max-height: 88vh;
    object-fit: contain;
    border-radius: 15px;
    user-select: none;
    -webkit-user-select: none;
}

/* Corpo scrollabile del pop-up (mostra direttamente il contenuto senza testata e senza X) */
.modal-body {
    padding: 20px 18px;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none; /* Firefox: nasconde la barra */
    -ms-overflow-style: none; /* IE / Edge: nasconde la barra */
    display: flex;
    flex-direction: column;
    gap: 16px;
    touch-action: pan-y;
    overscroll-behavior-y: auto;
    overscroll-behavior-x: none;
}

.modal-body::-webkit-scrollbar {
    display: none; /* Chrome, Safari, Edge moderno: nasconde la barra */
    width: 0;
    height: 0;
}

/* Immagine ingrandita del cocktail / segnaposto (proporzioni naturali, nessun ritaglio) */
.modal-media-wrapper {
    width: auto;
    max-width: 320px;
    max-height: 320px;
    margin: 0 auto 16px auto;
    border-radius: 12px;
    overflow: hidden;
    border: 1px solid var(--accent-copper);
    background-color: #181513;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    position: relative;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.5);
}

/* Quando il prodotto non ha immagine (Caso C e F), il riquadro scompare del tutto */
.modal-media-wrapper.is-hidden {
    display: none !important;
}

/* Effetto desaturazione per la foto/segnaposto nella finestra di dettaglio */
.modal-media-wrapper.unavailable .modal-img,
.modal-media-wrapper.unavailable .modal-placeholder {
    filter: grayscale(100%) contrast(1.1) brightness(0.78);
    opacity: 0.9;
    transition: filter 0.25s ease;
}

/* Fascia diagonale ESAURITO nella finestra di dettaglio */
.modal-media-wrapper.unavailable::after {
    content: "ESAURITO";
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) rotate(-25deg);
    width: 140%;
    text-align: center;
    background: linear-gradient(90deg, #8E341B 0%, #C44C27 50%, #8E341B 100%);
    border-top: 1.5px solid rgba(255, 255, 255, 0.45);
    border-bottom: 1.5px solid rgba(255, 255, 255, 0.45);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.75);
    color: #FFFFFF;
    font-family: var(--font-stack);
    font-size: 0.95rem;
    font-weight: 850;
    letter-spacing: 3.5px;
    line-height: 1;
    padding: 7px 0;
    pointer-events: none;
    z-index: 2;
    user-select: none;
    white-space: nowrap;
}

.modal-img {
    display: block;
    max-width: 100%;
    max-height: 320px;
    width: auto;
    height: auto;
    object-fit: contain;
    border-radius: 11px;
}

.modal-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: radial-gradient(circle, #29211C 0%, #171513 100%);
    color: var(--accent-copper);
}

.modal-placeholder-icon {
    width: 64px;
    height: 64px;
    color: var(--accent-copper);
    opacity: 0.85;
}

.modal-info {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.modal-title {
    font-size: 1.35rem;
    font-weight: 800;
    color: var(--text-primary);
    line-height: 1.25;
}

.modal-meta-row {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
}

.modal-price {
    font-size: 1.35rem;
    font-weight: 800;
    color: var(--accent-orange);
}

.modal-divider {
    height: 1px;
    background-color: var(--border-card);
    margin: 2px 0;
}

.modal-desc-box {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.modal-desc-heading {
    font-size: 0.8rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--accent-copper);
}

.modal-description {
    font-size: 0.95rem;
    color: var(--text-secondary);
    line-height: 1.55;
}

/* 12. Ottimizzazioni per Schermi Grandi (Tablet & PC) */
@media (min-width: 768px) {
    .header {
        padding: 34px 24px 28px;
    }

    .header-hero,
    .header-hero-wrapper {
        gap: 36px;
        margin-bottom: 18px;
        max-width: 620px;
    }

    .hero-cocktail-img,
    .header-cocktail-img {
        height: 195px;
        max-width: 195px;
    }

    .brand-logo-img {
        width: 175px;
        height: 175px;
        max-width: 180px;
        max-height: 180px;
    }

    .brand-slogan-cursive,
    .brand-slogan {
        font-size: 1.25rem;
        max-width: 320px;
    }

    .menu-wrapper {
        padding: 24px 20px 48px;
    }

    .product-card {
        padding: 14px 18px;
        gap: 16px;
    }

    .product-thumb-container {
        width: 84px;
        height: 84px;
    }

    .placeholder-icon {
        width: 32px;
        height: 32px;
    }

    .product-name {
        font-size: 1.08rem;
    }

    .product-price {
        font-size: 1.1rem;
    }

    .product-card.unavailable.has-image .product-thumb-container::after {
        font-size: 0.65rem;
        padding: 4px 0;
        letter-spacing: 1.4px;
    }

    .modal-media-wrapper.unavailable::after {
        font-size: 1.05rem;
        padding: 8px 0;
        letter-spacing: 4px;
    }
}

/* 13. Adattamenti Header per Smartphone (QR Code Friendly - Layout Centrato) */
@media (max-width: 520px) {
    .modal-media-wrapper {
        max-width: 240px;
        max-height: 240px;
        margin: 0 auto 14px auto;
    }

    .modal-img {
        max-height: 240px;
    }

    .header {
        padding: 22px 14px 18px;
    }

    .brand-logo-wrapper {
        margin-bottom: 10px;
    }

    .brand-logo-img {
        width: 130px;
        height: 130px;
        max-width: 130px;
        max-height: 130px;
    }

    .brand-slogan-cursive,
    .brand-slogan {
        font-size: 0.98rem;
        line-height: 1.35;
        margin: 0 auto 14px;
        max-width: 320px;
    }

    .allergen-box {
        padding: 7px 14px;
        font-size: 0.82rem;
    }
}

@media (max-width: 360px) {
    .header {
        padding: 18px 10px 14px;
    }

    .brand-logo-img {
        width: 110px;
        height: 110px;
        max-width: 110px;
        max-height: 110px;
    }

    .brand-slogan-cursive,
    .brand-slogan {
        font-size: 0.88rem;
        margin: 0 auto 12px;
    }

    .allergen-box {
        padding: 5px 10px;
        font-size: 0.78rem;
    }
}

/* ==============================================================================
   14. NAVIGAZIONE POP-UP DETTAGLI (Varianti e Dettagli Prodotto)
   ============================================================================== */

/* Varianti nella Scheda Prodotto del Menù */
.product-variants-preview {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-top: 6px;
}

.variant-pill {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 0.72rem;
    padding: 2px 7px;
    border-radius: 4px;
    background: rgba(224, 90, 50, 0.12);
    border: 1px solid rgba(224, 90, 50, 0.3);
    color: #FFD2BC;
}

.variant-pill strong {
    color: #FFFFFF;
}

/* Sezione Varianti & Opzioni nel Modale */
.modal-variants-section {
    margin-top: 14px;
    padding: 12px;
    background-color: rgba(224, 90, 50, 0.08);
    border: 1px solid rgba(224, 90, 50, 0.35);
    border-radius: 8px;
}

.modal-variants-heading {
    font-size: 0.78rem;
    text-transform: uppercase;
    letter-spacing: 0.8px;
    color: var(--accent-orange, #FA7646);
    margin: 0 0 8px 0;
    font-weight: 750;
}

.modal-variants-list {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.modal-variant-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.86rem;
    padding: 6px 10px;
    background: rgba(0, 0, 0, 0.25);
    border-radius: 6px;
    border: 1px solid rgba(255, 255, 255, 0.06);
    transition: background 0.15s ease, border-color 0.15s ease;
}

.modal-variant-row .var-name {
    color: #F8F0E6;
    font-weight: 600;
}

.modal-variant-row .var-price {
    color: #FFDEB8;
    font-weight: 750;
}

/* Sezione Distillati Gin & Vodka Tonic nel Modale Pubblico */
.modal-gin-vodka-section {
    margin-top: 14px;
    padding: 12px;
    background-color: rgba(23, 21, 19, 0.7);
    border: 1px solid var(--accent-copper);
    border-radius: 8px;
}

.modal-gin-vodka-heading {
    font-size: 0.82rem;
    text-transform: uppercase;
    letter-spacing: 0.8px;
    color: var(--accent-orange, #FA7646);
    margin: 0 0 4px 0;
    font-weight: 750;
}

.modal-gin-vodka-sub {
    font-size: 0.8rem;
    color: var(--text-secondary);
    margin: 0 0 10px 0;
    line-height: 1.35;
}

.modal-gvl-tabs {
    display: flex;
    gap: 6px;
    margin-bottom: 10px;
}

.modal-gvl-tab-btn {
    background-color: var(--card-bg);
    border: 1px solid var(--border-card);
    color: var(--text-secondary);
    border-radius: var(--radius-pill);
    padding: 4px 12px;
    font-size: 0.76rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.15s ease;
}

.modal-gvl-tab-btn.active,
.modal-gvl-tab-btn:hover {
    background-color: var(--accent-orange);
    color: #171513;
    border-color: var(--accent-orange);
    font-weight: 700;
}

.modal-gin-vodka-list {
    display: flex;
    flex-direction: column;
    gap: 6px;
    max-height: 220px;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    padding-right: 4px;
}

.modal-gvl-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 8px 10px;
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid var(--border-card);
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.15s ease;
    user-select: none;
}

.modal-gvl-row:hover {
    background-color: #2F2620;
    border-color: var(--accent-copper);
}

.modal-gvl-row.active {
    background-color: rgba(224, 90, 43, 0.18);
    border-color: var(--accent-orange);
    box-shadow: 0 0 8px var(--accent-orange-glow);
}

.modal-gvl-row.active .modal-gvl-name {
    color: var(--accent-orange);
    font-weight: 700;
}

.modal-gvl-row.active .modal-gvl-price {
    color: #FFFFFF;
    font-weight: 800;
}

.modal-gvl-info {
    display: flex;
    align-items: center;
    gap: 8px;
}

.modal-gvl-badge {
    font-size: 0.64rem;
    font-weight: 800;
    letter-spacing: 0.5px;
    padding: 2px 6px;
    border-radius: 4px;
    text-transform: uppercase;
}

.modal-gvl-badge.gin {
    background-color: rgba(67, 160, 71, 0.18);
    color: #81C784;
    border: 1px solid rgba(67, 160, 71, 0.4);
}

.modal-gvl-badge.vodka {
    background-color: rgba(33, 150, 243, 0.18);
    color: #64B5F6;
    border: 1px solid rgba(33, 150, 243, 0.4);
}

.modal-gvl-name {
    font-size: 0.88rem;
    font-weight: 600;
    color: #F8F0E6;
}

.modal-gvl-price {
    font-size: 0.9rem;
    font-weight: 750;
    color: #FFDEB8;
}

.modal-gin-vodka-empty-hint {
    font-size: 0.82rem;
    font-style: italic;
    color: var(--text-secondary);
    margin: 4px 0 0 0;
    line-height: 1.4;
}

/* Sezione Ingredienti & Preparazione nel Modale */
.modal-ingredients-section {
    margin-top: 12px;
    padding-top: 10px;
    border-top: 1px dashed rgba(240, 100, 50, 0.25);
}

.modal-ingredients-heading {
    font-size: 0.78rem;
    text-transform: uppercase;
    letter-spacing: 0.8px;
    color: var(--accent-amber, #E5A93C);
    margin: 0 0 4px 0;
    font-weight: 700;
}

.modal-ingredients-text {
    font-size: 0.88rem;
    color: #E2D6CB;
    margin: 0;
    line-height: 1.45;
}

.modal-category-pos {
    font-size: 0.74rem;
    color: #A89B91;
    margin-top: 2px;
}

