
        /* 2. CSS ANTI-SELEZIONE (VERSIONE POTENZIATA) */
        * {
            -webkit-touch-callout: none !important; /* Blocca menu iOS */
            -webkit-user-select: none !important;    /* Safari */
            -khtml-user-select: none !important;
            -moz-user-select: none !important;       /* Firefox */
            -ms-user-select: none !important;        /* IE/Edge */
            user-select: none !important;            /* Standard */
            -webkit-tap-highlight-color: transparent !important;
            touch-action: manipulation;
        }

        /* 3. ECCEZIONE PER CAMPI DI TESTO (Importante per Admin e Cerca) */
        input, textarea {
            -webkit-user-select: text !important;
            user-select: text !important;
            -webkit-touch-callout: default !important;
            cursor: auto;
        }

        :root {
            --primary: #00695c;
            --customer-title-extra: 0px;
            --customer-product-extra: 0px;
            --white: #fff; --gray: #888; --border: #eaeaea; --success: #27ae60; --badge-bg: #e74c3c;
            --glass-panel: linear-gradient(135deg, rgba(255,255,255,0.72), rgba(255,255,255,0.38) 48%, rgba(255,255,255,0.56));
            --glass-panel-strong: linear-gradient(135deg, rgba(255,255,255,0.84), rgba(255,255,255,0.58) 52%, rgba(255,255,255,0.74));
            --glass-border: rgba(255,255,255,0.62);
            --glass-shadow: 0 22px 70px rgba(15,23,42,0.22), inset 0 1px 0 rgba(255,255,255,0.55), inset 0 -1px 0 rgba(255,255,255,0.18);
        }
        html.customer-text-1 { --customer-title-extra: 4px; --customer-product-extra: 2px; }
        html.customer-text-2 { --customer-title-extra: 8px; --customer-product-extra: 4px; }
        html.customer-text-3 { --customer-title-extra: 12px; --customer-product-extra: 6px; }
        * { box-sizing: border-box; margin: 0; padding: 0; outline: none; -webkit-tap-highlight-color: transparent; }
        body { font-family: 'Inter', sans-serif; background: var(--bg); color: var(--theme-text); padding-top: 50px; }
        ::-webkit-scrollbar { width: 6px; height: 6px; }
        ::-webkit-scrollbar-track { background: transparent; }
        ::-webkit-scrollbar-thumb { background: #ccc; border-radius: 10px; }
        ::-webkit-scrollbar-thumb:hover { background: var(--primary); }
        header { position: fixed; top: 0; left: 0; width: 100%; height: 65px; z-index: 900; background: transparent; border-bottom: none; box-shadow: none; padding-top: 10px; }
        .top-bar {
            position: relative;
            display: flex;
            justify-content: space-between;
            align-items: center;
            width: min(95%, 1400px);
            padding: 0 10px;
            height: 61px;
            margin: 0 auto;
            gap: 8px;
            border-radius: 30px;
            background: var(--theme-toolbar-bg);
            font-family: var(--theme-font-toolbar);
            border: 1px solid rgba(255, 255, 255, 0.38);
            box-shadow: 0 8px 24px rgba(0,0,0,0.08), inset 0 1px 0 rgba(255,255,255,0.42), inset 0 -1px 0 rgba(255,255,255,0.12);
            backdrop-filter: blur(28px) saturate(220%) contrast(112%) brightness(108%);
            -webkit-backdrop-filter: blur(28px) saturate(220%) contrast(112%) brightness(108%);
        }
        .top-bar::before {
            content: "";
            position: absolute;
            inset: 1px;
            border-radius: inherit;
            pointer-events: none;
            background:
                radial-gradient(circle at 18% 12%, rgba(255,255,255,0.42), rgba(255,255,255,0.05) 30%, rgba(255,255,255,0) 54%),
                linear-gradient(115deg, rgba(255,255,255,0.30), rgba(255,255,255,0.04) 38%, rgba(255,255,255,0.18) 63%, rgba(255,255,255,0.02)),
                linear-gradient(180deg, rgba(255,255,255,0.12), rgba(255,255,255,0.01));
            mix-blend-mode: screen;
        }
        .top-bar > * { position: relative; z-index: 1; }
        .top-bar .header-btn,
        .top-bar .btn-menu-tall,
        .top-bar .btn-mobile-color,
        .top-bar .btn-search-header,
        .top-bar .btn-cart-floating,
        .top-bar .btn-call-waiter,
        .top-bar .info-pill,
        .top-bar .promo-test-pill,
        .top-bar .header-timer-pill {
            font-family: var(--theme-font-toolbar) !important;
            box-shadow: none !important;
        }
        .top-bar .header-btn,
        .top-bar .btn-menu-tall,
        .top-bar .btn-mobile-color,
        .top-bar .btn-search-header,
        .top-bar .btn-cart-floating,
        .top-bar .info-pill {
            background: var(--theme-toolbar-button-bg) !important;
            color: var(--theme-toolbar-button-text) !important;
            border: 1px solid rgba(255, 255, 255, 0.28);
        }
        .top-bar .btn-call-waiter {
            background: var(--theme-toolbar-button-bg) !important;
            color: var(--theme-toolbar-button-text) !important;
            border: 1px solid rgba(217, 119, 6, 0.24);
        }
        .top-bar .btn-mobile-color,
        .top-bar .btn-cart-floating,
        .top-bar .btn-menu-tall {
            border: 1px solid rgba(255, 255, 255, 0.28);
        }
        .header-group { display: flex; align-items: center; gap: 6px; }
        
        /* PULSANTE GENERICO HEADER + OMBRA NERA MARCATA */
        .header-btn, .btn-menu-tall, .btn-mobile-color, .btn-search-header, .btn-cart-floating, .btn-call-waiter { 
            box-shadow: 0 5px 15px rgba(0,0,0,0.8) !important; /* OMBRA NERA INTENSA */
            height: 50px !important; /* ALTEZZA UNIFORME PER TUTTI I TASTI */
        }

        .header-btn { display: flex; align-items: center; justify-content: center; padding: 0 15px; border-radius: 25px; font-weight: 700; font-size: 0.9rem; cursor: pointer; border: none; transition: 0.2s; background: white; color: var(--primary); gap: 5px; white-space: nowrap; }
        .pressed { transform: scale(0.95) !important; transition: transform 0.05s ease-out !important; background-color: #ddd !important; }
        .btn-menu-main { background: white; color: var(--primary); } 
        .btn-mobile-color { background: #2980b9; color: white; padding: 0 14px !important; }
        .btn-mobile-color:hover { background: #1f6391; }
        @keyframes soft-blink { 0%, 100% { opacity: 1; text-shadow: 0 0 5px rgba(255,255,255,0.4); } 50% { opacity: 0.5; } }
        .text-respiro { display: flex; align-items: center; justify-content: center; gap: 5px; animation: soft-blink 2s infinite ease-in-out; font-weight: bold; line-height: 1.05; text-align: center; }
        .mobile-order-copy { display: block; }
        
        /* TASTO MENU UNIFORMATO */
        .btn-menu-tall { padding: 0 8px !important; border-radius: 27px !important; display: flex; align-items: center; gap: 6px; text-align: left; background: var(--primary); color: white; }
        .menu-text-col { display: flex; flex-direction: column; justify-content: center; line-height: 1.1; }
        .menu-label-small { font-size: 1rem; font-weight: 700; opacity: 1; letter-spacing: 0.5px; text-transform: uppercase; color: currentColor; }
        
        /* TITOLO CATEGORIA PRINCIPALE */
        .main-category-title {
            text-align: center;
            font-size: calc(var(--theme-category-title-size) + var(--customer-title-extra));
            font-weight: 900;
            color: var(--theme-category-title);
            margin: 20px 0 10px 0;
            text-transform: capitalize;
            letter-spacing: -1px;
            font-family: var(--theme-font-category-title);
        }

        .btn-menu-tall .header-icon-svg { stroke: currentColor; }
        .info-pill { display: flex; align-items: center; gap: 7px; flex-shrink: 0; background: white; padding: 0 10px; border-radius: 30px; box-shadow: 0 5px 15px rgba(0,0,0,0.8) !important; color: var(--primary); font-weight: 700; height: 50px !important; }
        .info-item { display: flex; align-items: center; gap: 4px; font-size: 0.95rem; }
        .info-item.table-info { min-width: 46px; height: 100%; display: grid; grid-template-rows: 10px 20px; align-content: center; justify-items: center; gap: 1px; line-height: 1; }
        .info-pill .table-info + .table-info { border-left: 1px solid rgba(255,255,255,0.35); padding-left: 7px; }
        .info-item.menu-info { min-width: 68px; }
        .table-info-label { height: 10px; font-size: 0.58rem; font-weight: 800; line-height: 10px; opacity: 0.72; text-transform: uppercase; }
        .table-info-number { height: 20px; display: flex; align-items: center; justify-content: center; font-size: 1.18rem; font-weight: 900; line-height: 20px; }
        .menu-info .table-info-number { font-size: 1.18rem; white-space: nowrap; }
        .promo-test-pill { min-height: 42px; padding: 0 16px; border-radius: 22px; background: #111; color: #fff; border: 2px solid #22c55e; font-size: 0.82rem; font-weight: 900; text-transform: uppercase; box-shadow: 0 5px 15px rgba(0,0,0,0.35); animation: promoTestPulse 1s infinite alternate; cursor:pointer; white-space:nowrap; }
        .promo-test-pill.error { border-color: #e74c3c; color: #ffd8d8; animation: none; }
        @keyframes promoTestPulse { from { transform: scale(1); box-shadow: 0 5px 15px rgba(0,0,0,0.35); } to { transform: scale(1.04); box-shadow: 0 5px 22px rgba(34,197,94,0.75); } }
        .header-icon-svg { width: 20px; height: 20px; stroke-width: 2.5; stroke: currentColor; fill: none; }
        .right-icons { display: flex; gap: 8px; align-items: center; margin-left: auto; }
        
        /* TASTO CERCA E CARRELLO UNIFORMATI */
        .btn-search-header { background-color: white; color: var(--primary); border: none; padding: 0 15px; border-radius: 25px; font-weight: bold; font-size: 0.9rem; cursor: pointer; transition: transform 0.1s; display: flex; align-items: center; gap: 5px; }
        .btn-cart-floating { position: relative; width: 162px; min-width: 162px; box-sizing: border-box; justify-content: center; background: var(--primary); color: white; border: none; padding: 0 10px; border-radius: 25px; font-weight: 800; font-size: 0.95rem; cursor: pointer; display: flex; align-items: center; gap: 5px; transition: transform 0.1s, background-color 0.18s ease, box-shadow 0.18s ease; overflow: visible; }
        .btn-cart-floating #cart-label { position: absolute; left: 12px; width: 90px; min-width: 90px; text-align: left; display: inline-block; box-sizing: border-box; }
        .btn-cart-floating.cart-add-feedback { background: #16a34a !important; box-shadow: none !important; }
        .btn-cart-floating.cart-add-feedback #cart-label { color: #bbf7d0; font-size: 0.95rem; font-weight: 900; line-height: 1; animation: cartLabelFlash 0.85s ease-in-out; }
        .btn-cart-floating.cart-add-feedback #cart-badge { background: #facc15; color: #111827; transform: scale(1.85); box-shadow: none; }
        .btn-cart-floating.cart-remove-feedback { background: #dc2626 !important; box-shadow: none !important; }
        .btn-cart-floating.cart-remove-feedback #cart-label { color: #fee2e2; animation: cartLabelFlash 0.85s ease-in-out; }
        .btn-cart-floating.cart-remove-feedback #cart-badge { background: #fee2e2; color: #991b1b; transform: scale(1.65); box-shadow: none; }
        
        #cart-badge { position: absolute; right: 13px; min-width: 28px; box-sizing: border-box; text-align: center; background: white; color: var(--primary); font-size: 0.8rem; font-weight: 800; padding: 2px 6px; border-radius: 10px; display: block; transform-origin: center; transition: background-color 0.18s ease, color 0.18s ease, box-shadow 0.18s ease; }
        @keyframes cartLabelFlash { 0% { opacity: 0; transform: translateY(5px); } 20%, 80% { opacity: 1; transform: translateY(0); } 100% { opacity: 1; transform: translateY(0); } }
        .sidebar-info-box { background: #f1f8f6; margin: 10px 15px; padding: 15px; border-radius: 8px; border: 1px solid #d0e2de; }
        .grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 15px; padding: 15px; max-width: 1200px; margin: 0 auto; padding-bottom: 80px; margin-top: 25px; }
        main.category-loading { opacity: 0.45; pointer-events: none; transition: opacity 0.18s ease; }
        @media (min-width: 768px) { .grid { grid-template-columns: repeat(4, 1fr); } }
        
        /* CARD: NO ZOOM/NO FADE SCROLL */
        .card { background: var(--theme-product-bg); color: var(--theme-text); border: 1px solid #eee; border-radius: var(--theme-product-radius); overflow: hidden; display: flex; flex-direction: column; position: relative; box-shadow: 0 2px 5px rgba(0,0,0,0.05); }
        .card.product-detail-opening { z-index: 80; animation: productCardOpenFeedback 0.2s cubic-bezier(0.22, 0.8, 0.3, 1) both; }
        .card.product-detail-opening .card-img-wrap::after { content: ""; position: absolute; inset: 0; z-index: 12; pointer-events: none; background: rgba(72,112,34,0.16); box-shadow: inset 0 0 0 4px rgba(72,112,34,0.82); animation: productCardImageFlash 0.2s ease-out both; }
        @keyframes productCardOpenFeedback { 0% { transform: scale(1); box-shadow: 0 2px 5px rgba(0,0,0,0.05); } 48% { transform: scale(0.965); box-shadow: 0 5px 16px rgba(72,112,34,0.24); } 100% { transform: scale(1); box-shadow: 0 7px 22px rgba(72,112,34,0.3); } }
        @keyframes productCardImageFlash { 0% { opacity: 0; } 38% { opacity: 1; } 100% { opacity: 0.34; } }
        .card-img-wrap { position: relative; padding-top: 55%; background: #f4f4f4; overflow: hidden; z-index: 1; }
        .card-img-wrap[role="button"] { cursor: zoom-in; touch-action: manipulation; }
        .card-img-wrap[role="button"]:focus-visible { outline: 4px solid #2563eb; outline-offset: -4px; }
        .card-img-wrap img { position: absolute; top: 0; left: 0; width: 100%; height: 100%; object-fit: cover; transition: transform 0.3s; user-select: none; -webkit-user-drag: none; }
        /* .card:hover .card-img-wrap img { transform: scale(1.1); } */ /* Rimosso anche hover per max performance */
        .card-badge-row { position: absolute; top: 0; left: 0; right: 6px; z-index: 6; display: flex; align-items: flex-start; gap: 5px; pointer-events: none; }
        .limit-badge { position: static; flex: 0 0 auto; background: #d35400; color: white; padding: 5px 10px; border-bottom-right-radius: 10px; font-weight: 700; font-size: 0.8rem; box-shadow: 2px 2px 5px rgba(0,0,0,0.2); }
        .ordered-history-badge { display: none; min-width: 0; max-width: 100%; overflow: hidden; margin-top: 5px; padding: 4px 7px; border: 1px solid rgba(255,255,255,0.78); border-radius: 7px; background: #162e75; color: #fff; box-shadow: 0 2px 6px rgba(15,23,42,0.28); font-size: 0.7rem; font-weight: 400; line-height: 1.1; text-overflow: ellipsis; white-space: nowrap; }
        .ordered-history-badge.visible { display: block; }
        .ordered-history-badge:first-child { margin-left: 6px; }
        .price-tag { position: absolute; bottom: 0; right: 0; background: var(--theme-price-bg); color: var(--theme-price-text); padding: 5px 10px; border-top-left-radius: 10px; font-weight: 700; font-size: calc(0.9rem + var(--customer-product-extra)); z-index: 5; font-family: var(--theme-font-price); }
        .card-body { padding: 10px; flex: 1; display: flex; flex-direction: column; justify-content: space-between; position: relative; z-index: 2; }
        .card-title { font-size: calc(var(--theme-product-font-size) + var(--customer-product-extra)); font-weight: 700; color: var(--theme-text); margin-bottom: 5px; line-height: 1.2; font-family: var(--theme-font-product-title); }
        .card-title .product-code { font-family: var(--theme-font-product-description); font-size: calc(var(--theme-product-font-size) - 3px + var(--customer-product-extra)); font-weight: 400; font-variant-numeric: proportional-nums; letter-spacing: 0; }
        .card-desc { font-size: calc(var(--theme-product-font-size) - 3px + var(--customer-product-extra)); color: var(--theme-text); opacity: 0.76; margin-bottom: 15px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; position: relative; z-index: 5; font-family: var(--theme-font-product-description); }
        .modal-box.product-detail-box { width: min(800px, 88vw); max-width: 800px !important; height: min(500px, 72vh); max-height: 72vh; padding: 15px !important; overflow: hidden; text-align: left; display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(310px, 0.85fr); gap: 18px; border-radius: 28px; touch-action: pan-y; }
        .product-detail-media { min-width: 0; min-height: 0; display: grid; grid-template-rows: minmax(0, 1fr) auto; gap: 10px; }
        .product-detail-image-wrap { position: relative; width: 100%; height: 100%; min-height: 0; background: #e8edf2; overflow: hidden; border-radius: 22px; }
        .product-detail-image-stage { position: relative; width: 100%; height: 100%; min-height: 0; overflow: hidden; background: #f8fafc; }
        .product-detail-image { width: 100%; height: 100%; display: block; object-fit: contain; object-position: center top; border-radius: 22px 22px 0 0; }
        .product-detail-image-caption { position: absolute; left: 0; right: 0; bottom: 0; z-index: 2; min-width: 0; min-height: 90px; padding: 9px 14px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 5px; background: rgba(232,237,242,0.97); text-align: center; }
        .product-detail-swipe-hint { color: #64748b; font-size: 0.72rem; font-weight: 750; line-height: 1.15; }
        .product-detail-media-actions { display: grid; }
        .product-detail-nav { position: fixed; top: 50%; z-index: 3002; width: 48px; height: 62px; margin-top: -31px; border: 1px solid rgba(255,255,255,0.82); border-radius: 16px; background: rgba(15,23,42,0.78); color: #fff; font-size: 2.65rem; font-weight: 700; line-height: 1; display: flex; align-items: center; justify-content: center; cursor: pointer; box-shadow: 0 7px 20px rgba(15,23,42,0.34); animation: productDetailNavPulse 1.45s ease-in-out infinite; }
        .product-detail-nav.previous { left: max(12px, calc(50% - min(400px, 44vw) - 68px)); }
        .product-detail-nav.next { right: max(12px, calc(50% - min(400px, 44vw) - 68px)); animation-delay: 0.18s; }
        .product-detail-nav:active { animation: none; transform: scale(0.9); }
        .product-detail-nav[hidden] { display: none; }
        @keyframes productDetailNavPulse { 0%, 100% { transform: scale(0.9); } 50% { transform: scale(1.1); } }
        .product-detail-box.slide-out-left { animation: productDetailSlideOutLeft 0.18s ease-in forwards; }
        .product-detail-box.slide-out-right { animation: productDetailSlideOutRight 0.18s ease-in forwards; }
        .product-detail-box.slide-in-right { animation: productDetailSlideInRight 0.24s ease-out both; }
        .product-detail-box.slide-in-left { animation: productDetailSlideInLeft 0.24s ease-out both; }
        @keyframes productDetailSlideOutLeft { to { transform: translateX(-115%); opacity: 0.18; } }
        @keyframes productDetailSlideOutRight { to { transform: translateX(115%); opacity: 0.18; } }
        @keyframes productDetailSlideInRight { from { transform: translateX(115%); opacity: 0.18; } to { transform: translateX(0); opacity: 1; } }
        @keyframes productDetailSlideInLeft { from { transform: translateX(-115%); opacity: 0.18; } to { transform: translateX(0); opacity: 1; } }
        .product-detail-box > .product-detail-close-icon { position: absolute; top: 12px; right: 12px; z-index: 4; width: 40px; height: 40px; border: 1px solid rgba(255,255,255,0.82); border-radius: 50%; background: rgba(15,23,42,0.78); color: #fff; font-size: 1.8rem; line-height: 1; display: flex; align-items: center; justify-content: center; cursor: pointer; box-shadow: 0 6px 18px rgba(15,23,42,0.3); }
        .product-detail-content { min-width: 0; padding: 14px 14px 12px 0; overflow-y: auto; display: flex; flex-direction: column; }
        .product-detail-heading { display: flex; align-items: flex-start; padding-right: 38px; margin-bottom: 12px; }
        .product-detail-title { margin: 0; color: #162e75; font-size: 1.43rem; line-height: 1.18; }
        .product-detail-price { flex: 0 0 auto; border-radius: 9px; background: var(--theme-price-bg); color: var(--theme-price-text); padding: 6px 10px; font-family: var(--theme-font-price); font-size: 1.02rem; font-weight: 800; white-space: nowrap; }
        .price-tag.is-paid, .product-detail-price.is-paid { background: #14532d; color: #fff; }
        .product-detail-description { margin: 0; color: #334155; font-family: var(--theme-font-product-description); font-size: 0.92rem; line-height: 1.44; white-space: pre-line; text-align: left; }
        .product-detail-allergens { margin-top: 18px; }
        .product-detail-allergens-title { margin-bottom: 8px; color: #475569; font-size: 0.8rem; font-weight: 900; text-transform: uppercase; }
        .product-detail-allergen-list { display: flex; flex-wrap: wrap; gap: 7px; }
        .product-detail-allergen-chip { display: inline-flex; align-items: center; gap: 6px; min-height: 34px; padding: 6px 9px; border: 1px solid #fed7aa; border-radius: 9px; background: #fff7ed; color: #7c2d12; font-size: 0.82rem; font-weight: 800; }
        .product-detail-allergen-chip.is-selected-risk { border-color: #ef4444; background: #fee2e2; color: #991b1b; }
        .product-detail-allergen-icon { font-size: 1.15rem; line-height: 1; }
        .product-detail-allergen-empty { color: #64748b; font-size: 0.88rem; }
        .product-detail-purchase { margin: 0; padding: 0; }
        .product-detail-ordered { margin: 0; color: #475569; font-size: 0.82rem; font-weight: 800; line-height: 1.2; text-align: center; }
        .product-detail-buy { width: 100%; min-height: 52px; border: none; border-radius: 14px; background: var(--theme-buy-bg); color: var(--theme-buy-text); font-family: var(--theme-font-buy); font-size: 1.02rem; font-weight: 900; cursor: pointer; }
        .product-detail-buy:disabled { background: #94a3b8; cursor: default; }
        .product-detail-qty { min-height: 52px; display: grid; grid-template-columns: 62px minmax(0, 1fr) 62px; gap: 8px; }
        .product-detail-qty-btn { border: none; border-radius: 13px; font-size: 2rem; font-weight: 900; cursor: pointer; }
        .product-detail-qty-btn.minus { background: #ffedd5; color: #c2410c; }
        .product-detail-qty-btn.plus { background: #dcfce7; color: #15803d; }
        .product-detail-qty-btn:disabled { background: #e2e8f0; color: #94a3b8; cursor: default; }
        .product-detail-qty-value { border-radius: 13px; background: #f1f5f9; color: #0f172a; display: flex; flex-direction: column; align-items: center; justify-content: center; line-height: 1; }
        .product-detail-qty-value strong { font-size: 1.45rem; }
        .product-detail-qty-value span { margin-top: 4px; color: #64748b; font-size: 0.7rem; font-weight: 900; text-transform: uppercase; }
        @media (max-width: 700px), (orientation: portrait) {
            .modal-box.product-detail-box { width: 88vw; height: auto; max-height: 76vh; padding: 12px !important; grid-template-columns: 1fr; gap: 0; overflow-y: auto; border-radius: 26px; }
            .product-detail-media { grid-template-rows: minmax(180px, min(25vh, 260px)) auto; }
            .product-detail-image-wrap { min-height: 180px; height: min(25vh, 260px); border-radius: 20px; }
            .product-detail-image { border-radius: 20px 20px 0 0; }
            .product-detail-image-caption { min-height: 84px; padding: 7px 11px; gap: 4px; }
            .product-detail-swipe-hint { font-size: 0.68rem; }
            .product-detail-nav { width: 40px; height: 50px; margin-top: -25px; font-size: 2.2rem; }
            .product-detail-media-actions { padding-top: 10px; }
            .product-detail-content { padding: 16px 8px 6px; }
            .product-detail-heading { padding-right: 34px; }
            .product-detail-title { font-size: 1.2rem; }
            .product-detail-price { font-size: 0.92rem; padding: 6px 9px; }
            .product-detail-description { font-size: 0.88rem; }
        }
        .card-actions { margin-top: auto; height: 36px; position: relative; z-index: 50; pointer-events: auto; }
        .btn-acquista { width: 100%; height: 100%; background: var(--theme-buy-bg); color: var(--theme-buy-text); border: none; border-radius: 18px; font-weight: 700; font-size: 0.85rem; cursor: pointer; transition: background 0.2s, transform 0.1s, box-shadow 0.2s; display: block; position: relative; box-shadow: 0 3px 5px rgba(0,0,0,0.1); font-family: var(--theme-font-buy); }
        .btn-acquista.disabled { background: #ccc; pointer-events: none; box-shadow: none; }
        .btn-acquista.esaurito { --product-rest-bg: #e74c3c; --product-rest-text: #fff; background: var(--product-rest-bg); color: var(--product-rest-text); opacity: 0.7; }
        .btn-acquista.product-highlight {
            --product-highlight-color: #268f7f;
            --product-highlight-shadow: rgba(38, 143, 127, 0.28);
            overflow: hidden;
            transform-origin: center;
            animation: productHighlightPulse 3.2s ease-in-out infinite both;
        }
        .btn-acquista.product-highlight.highlight-consigliato {
            --product-highlight-color: #b9852c;
            --product-highlight-shadow: rgba(185, 133, 44, 0.28);
        }
        .btn-acquista.product-highlight::after {
            content: attr(data-highlight-label);
            position: absolute;
            inset: 0;
            display: flex;
            align-items: center;
            justify-content: center;
            padding: 0 5px;
            color: #fff;
            font-size: 0.78rem;
            font-weight: 850;
            opacity: 0;
            pointer-events: none;
            animation: productHighlightLabel 3.2s ease-in-out infinite both;
        }
        .btn-acquista.product-highlight.allergen-blocked {
            animation: none;
            transform: none;
        }
        .btn-acquista.product-highlight.allergen-blocked::after { display: none; }
        @keyframes productHighlightPulse {
            0%, 40%, 100% {
                transform: scale(1.035);
                background-color: var(--product-highlight-color);
                color: transparent;
                box-shadow: 0 6px 13px var(--product-highlight-shadow);
            }
            54%, 87% {
                transform: scale(1);
                background-color: var(--product-rest-bg, var(--theme-buy-bg));
                color: var(--product-rest-text, var(--theme-buy-text));
                box-shadow: 0 3px 5px rgba(0,0,0,0.1);
            }
        }
        @keyframes productHighlightLabel {
            0%, 40%, 100% { opacity: 1; }
            54%, 87% { opacity: 0; }
        }
        
        /* Gruppo controllo quantità - Stile aggiornato con pulsanti allargati */
        .qty-control-group { 
            display: flex; 
            align-items: center; 
            justify-content: center; 
            width: 100%; 
            height: 100%; 
            position: relative; 
            z-index: 51; 
            gap: 8px; 
            background-color: #f5f5f5; 
            border-radius: 20px; 
            padding: 3px 0; 
        }

        /* Stile specifico per i tasti nella card prodotto (ALLARGATI) */
        .card .qty-control-group .btn-circle { 
            width: 60px !important; /* Allargati orizzontalmente */
            height: 40px !important; 
            border-radius: 8px !important; /* Rettangolo stondato */
            flex: 1; 
            color: white !important; 
            font-weight: 900; 
            font-size: 1.5rem; 
            box-shadow: none;
            transition: none; /* Rimosso transition per evitare lag su touch */
            display: flex;
            align-items: center;
            justify-content: center;
            padding: 0;
            line-height: 1;
            transform: scale(0.9);
        }

        /* Colori e Animazioni Click */
        .card .qty-control-group .minus { 
            background-color: #ffcc80 !important; /* Arancione Chiaro */
            color: #d35400 !important; /* Testo Scuro */
            border: 1px solid #ffcc80 !important;
            border-radius: 18px 8px 8px 18px !important;
            transform-origin: left center;
            transform: scale(0.9);
        }
        .card .qty-control-group .plus { 
            background-color: #c8e6c9 !important; /* Verde Chiaro */
            color: #27ae60 !important; /* Testo Scuro */
            border: 1px solid #c8e6c9 !important;
            border-radius: 8px 18px 18px 8px !important;
            transform-origin: right center;
            transform: scale(0.9);
        }

        /* Cambio colore immediato su active */
        .card .qty-control-group .minus:active { 
            background-color: #e74c3c !important; /* Rosso */
            color: white !important;
            transform: scale(0.86) !important;
        }
        .card .qty-control-group .plus:active { 
            background-color: #27ae60 !important;
            color: #ffffff !important;
            border-color: #27ae60 !important;
            transform: scale(0.86) !important;
        }

        .card-qty-display { position: relative; z-index: 3; display: inline-flex; align-items: center; justify-content: center; font-weight: 800; font-size: 1.1rem; color: #333; min-width: 30px; min-height: 30px; text-align: center; border-radius: 50%; transform-origin: center; }
        .card-qty-display.qty-add-feedback { animation: productQtyAddPulse 0.95s ease-out; }
        .card-qty-display.qty-remove-feedback { animation: productQtyRemovePulse 0.95s ease-out; }
        @keyframes productQtyAddPulse {
            0% { transform: scale(1); background: transparent; color: #333; }
            32% { transform: scale(1.75); background: #16a34a; color: #fff; box-shadow: 0 3px 10px rgba(22,163,74,0.35); }
            72% { transform: scale(1.48); background: #16a34a; color: #fff; }
            100% { transform: scale(1); background: transparent; color: #333; box-shadow: none; }
        }
        @keyframes productQtyRemovePulse {
            0% { transform: scale(1); background: transparent; color: #333; }
            32% { transform: scale(1.75); background: #dc2626; color: #fff; box-shadow: 0 3px 10px rgba(220,38,38,0.32); }
            72% { transform: scale(1.48); background: #dc2626; color: #fff; }
            100% { transform: scale(1); background: transparent; color: #333; box-shadow: none; }
        }
        
        /* -------------------------------------------------------------
            SEZIONE CSS SPECIFICA PER IL CARRELLO (Per non rompere il layout) 
            ------------------------------------------------------------- */
        .cart-controls {
            display: flex;
            flex-direction: row; /* Forza orizzontale */
            align-items: center;
            gap: 10px;
            white-space: nowrap; /* Impedisce a capo */
            background-color: #f1f1f1; 
            padding: 5px; 
            border-radius: 25px;
        }
        
        /* Reset dimensioni bottoni nel carrello (PICCOLI e CIRCOLARI) */
        .cart-controls .qty-btn, 
        .cart-controls .btn-note {
            width: 35px !important;  
            height: 35px !important;
            border-radius: 50% !important; /* Cerchi perfetti */
            font-size: 1.2rem !important;
            padding: 0 !important;
            display: flex;
            justify-content: center;
            align-items: center;
            box-shadow: 0 2px 4px rgba(0,0,0,0.1);
        }
        .cart-controls .plus { color: var(--primary); background: white; }
        .cart-controls .minus { color: #c0392b; background: white; }

        .cart-footer { padding: 15px; background: rgba(255,255,255,0.54); border-top: 1px solid rgba(255,255,255,0.56); box-shadow: 0 -5px 20px rgba(0,0,0,0.05); -webkit-backdrop-filter: blur(18px) saturate(150%); backdrop-filter: blur(18px) saturate(150%); }
        
        /* BUTTON INVIA ORDINE */
        .btn-submit { width: 100%; background: var(--primary); color: white; border: none; padding: 20px; border-radius: 12px; font-weight: 700; font-size: 1.3rem; cursor: pointer; transition: transform 0.1s; text-transform: uppercase; letter-spacing: 1px; box-shadow: 0 4px 15px rgba(0,0,0,0.2); }
        .btn-submit.auto-submit-scheduled {
            display: flex;
            flex-direction: column;
            align-items: center;
            justify-content: center;
            gap: 4px;
            background: #168653 !important;
            color: #fff !important;
            box-shadow: 0 5px 18px rgba(22, 134, 83, 0.34) !important;
        }
        .btn-submit.auto-submit-scheduled small {
            font-size: 0.72rem;
            font-weight: 700;
            line-height: 1.15;
            letter-spacing: 0;
            text-transform: none;
        }

        /* MODALE */
        .modal-bg { position: fixed; top: 0; left: 0; width: 100%; height: 100%; background: rgba(15, 23, 42, 0.18); -webkit-backdrop-filter: blur(14px) saturate(150%); backdrop-filter: blur(14px) saturate(150%); z-index: 3000; display: none; justify-content: center; align-items: center; animation: fadeInEffect 0.3s ease-out forwards; }
        html.tablet-overlay-page-locked, body.tablet-overlay-page-locked { overflow: hidden; overscroll-behavior: none; }
        #productDetailModal { overscroll-behavior: contain; }
        .modal-bg.fade-out { animation: fadeOutEffect 0.3s ease-out forwards; }
        .modal-box { background: var(--glass-panel-strong); padding: 25px; border-radius: 18px; text-align: center; max-width: 600px; width: 90%; box-shadow: var(--glass-shadow); position: relative; border: 1px solid var(--glass-border); -webkit-backdrop-filter: blur(28px) saturate(190%) contrast(108%); backdrop-filter: blur(28px) saturate(190%) contrast(108%); overflow: hidden; }
        .modal-box::before, .modal-box-top::before, .modal-box-large::before, .cart-container::before, .chat-modal-box::before, .modal-message-box::before, .tablet-setup-box::before { content: ""; position: absolute; inset: 1px; border-radius: inherit; pointer-events: none; background: radial-gradient(circle at 18% 10%, rgba(255,255,255,0.48), rgba(255,255,255,0.08) 34%, rgba(255,255,255,0) 58%), linear-gradient(115deg, rgba(255,255,255,0.34), rgba(255,255,255,0.04) 42%, rgba(255,255,255,0.18) 68%, rgba(255,255,255,0.02)); mix-blend-mode: screen; z-index: 0; }
        .modal-box > *, .modal-box-top > *, .modal-box-large > *, .cart-container > *, .chat-modal-box > *, .modal-message-box > *, .tablet-setup-box > * { position: relative; z-index: 1; }
        .alert-content { display: block; }
        .alert-icon { display: none; width: 96px; height: 96px; object-fit: contain; flex: 0 0 auto; }
        #alertModal.order-sent-alert .modal-box { max-width: 720px; padding: 36px 40px; }
        #alertModal.order-sent-alert .alert-content { display: flex; align-items: center; gap: 28px; text-align: left; }
        #alertModal.order-sent-alert .alert-icon { display: block; }
        #alertModal.order-sent-alert .alert-icon { width: 150px; height: 150px; }
        #alertModal.order-sent-alert #alertTitle { font-size: 2.8rem; margin-bottom: 10px; }
        #alertModal.order-sent-alert #alertMsg { font-size: 2.35rem; line-height: 1.16; margin-bottom: 0; font-weight: 900; }
        #alertModal.order-sent-alert .modal-btn { font-size: 1.35rem; padding: 16px; margin-top: 24px; }
        
        #menuOverlay { position: fixed; top: 0; left: 0; height: 100%; width: 90%; max-width: 900px; z-index: 2000; background: var(--theme-categories-bg); transition: opacity 0.18s ease, visibility 0s linear 0.18s; opacity: 0; visibility: hidden; pointer-events: none; display: flex; flex-direction: column; box-shadow: var(--glass-shadow); border-right: 1px solid var(--glass-border); -webkit-backdrop-filter: blur(32px) saturate(210%) contrast(108%); backdrop-filter: blur(32px) saturate(210%) contrast(108%); overflow: hidden; will-change: opacity; contain: layout paint style; font-family: var(--theme-font-category-menu); }
        #menuOverlay::before { content: ""; position: absolute; inset: 1px; border-radius: 0 22px 22px 0; pointer-events: none; background: radial-gradient(circle at 18% 10%, rgba(255,255,255,0.50), rgba(255,255,255,0.08) 32%, rgba(255,255,255,0) 56%), linear-gradient(115deg, rgba(255,255,255,0.32), rgba(255,255,255,0.03) 40%, rgba(255,255,255,0.18) 66%, rgba(255,255,255,0.02)); mix-blend-mode: screen; z-index: 0; }
        #menuOverlay > * { position: relative; z-index: 1; }
        
        #menuOverlay.open { opacity: 1; visibility: visible; pointer-events: auto; transition: opacity 0.18s ease; }
        
        #menuBackdrop { position: fixed; top: 0; left: 0; width: 100%; height: 100%; background: rgba(15,23,42,0.24); -webkit-backdrop-filter: blur(10px) saturate(135%); backdrop-filter: blur(10px) saturate(135%); z-index: 1999; opacity: 0; visibility: hidden; pointer-events: none; transition: opacity 0.18s ease, visibility 0s linear 0.18s; will-change: opacity; }
        #menuBackdrop.open { opacity: 1; visibility: visible; pointer-events: auto; transition: opacity 0.18s ease; }
        .overlay-header { padding: 15px; display: flex; justify-content: space-between; align-items: center; border-bottom: 1px solid rgba(255,255,255,0.48); background: rgba(255,255,255,0.28); -webkit-backdrop-filter: blur(18px) saturate(160%); backdrop-filter: blur(18px) saturate(160%); }
        .menu-grid-container { padding: 20px; overflow-y: auto; flex: 1; display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; background: var(--theme-categories-bg); }
        
        .sidebar-cat-link { text-decoration: none; color: var(--primary); font-weight: 700; background: rgba(255,255,255,0.58); border: 1px solid rgba(255,255,255,0.72); border-radius: 14px; padding: 15px 20px; text-align: left; display: flex; flex-direction: row; justify-content: flex-start; align-items: center; min-height: 60px; box-shadow: 0 8px 22px rgba(15,23,42,0.10), inset 0 1px 0 rgba(255,255,255,0.68); transition: transform 0.1s, background-color 0.2s, box-shadow 0.2s; gap: 15px; -webkit-backdrop-filter: blur(16px) saturate(160%); backdrop-filter: blur(16px) saturate(160%); font-family: var(--theme-font-category-menu); }
        .cat-text-wrap { display: flex; flex-direction: column; justify-content: center; align-items: flex-start; }
        .sidebar-cat-link.active-cat { background: linear-gradient(135deg, rgba(0,105,92,0.94), rgba(22,163,74,0.80)); color: white; border-color: rgba(255,255,255,0.52); box-shadow: 0 10px 26px rgba(0, 105, 92, 0.28), inset 0 1px 0 rgba(255,255,255,0.32); }
        .sidebar-cat-link.active-cat .limit-span { color: #ffe0b2 !important; }
        .sidebar-cat-link.category-click-feedback { background: #16a34a !important; color: #ffffff !important; border-color: #86efac !important; transform: scale(0.96); box-shadow: inset 0 0 0 2px rgba(255,255,255,0.32) !important; }
        .sidebar-cat-link.category-click-feedback .limit-span { color: #fff7cc !important; }
        .sidebar-cat-link.category-click-feedback::after { content: ""; width: 17px; height: 17px; flex: 0 0 17px; margin-left: auto; border: 3px solid rgba(255,255,255,0.42); border-top-color: #ffffff; border-radius: 50%; animation: categoryClickSpinner 0.6s linear infinite; }
        @keyframes categoryClickSpinner { to { transform: rotate(360deg); } }
        
        #searchOverlay { align-items: flex-start; padding-top: 30px; } 
        .modal-box-top { background: var(--glass-panel-strong); padding: 25px; border-radius: 18px; width: 70%; height: 40%; box-shadow: var(--glass-shadow); display: flex; flex-direction: column; position: relative; border: 1px solid var(--glass-border); -webkit-backdrop-filter: blur(28px) saturate(190%) contrast(108%); backdrop-filter: blur(28px) saturate(190%) contrast(108%); overflow: hidden; }
        #cartOverlay { z-index: 2000; display: flex !important; opacity: 0; visibility: hidden; pointer-events: none; transition: none; animation: none !important; will-change: opacity; overscroll-behavior: contain; }
        #cartOverlay.open { opacity: 1; visibility: visible; pointer-events: auto; transition: none; animation: fadeInEffect 0.3s ease-out forwards !important; }
        #cartOverlay.open.fade-out { animation: fadeOutEffect 0.3s ease-out forwards !important; }
        #cartOverlay.fade-out .cart-container { pointer-events: none; }
        .cart-container { background: var(--theme-cart-bg); width: 70%; height: 95%; border-radius: 18px; display: flex; flex-direction: column; overflow: hidden; box-shadow: var(--glass-shadow); position: relative; border: 1px solid var(--glass-border); -webkit-backdrop-filter: blur(28px) saturate(190%) contrast(108%); backdrop-filter: blur(28px) saturate(190%) contrast(108%); font-family: var(--theme-font-cart); }
        .cart-container button, .cart-container input, .cart-container textarea { font-family: var(--theme-font-cart); }
        .cart-content { flex: 1; min-height: 0; overflow-y: auto; overscroll-behavior-y: contain; -webkit-overflow-scrolling: touch; padding: 20px; width: 100%; background-color: var(--theme-cart-bg); }
        .cart-item { display: flex; gap: 10px; padding: 15px; margin-bottom: 12px; align-items: center; background: white; border-radius: 12px; box-shadow: 0 2px 8px rgba(0,0,0,0.06); border: 1px solid #eaeaea; }
        .cart-img { width: 60px; height: 60px; border-radius: 8px; background: #eee; object-fit: cover; border: 1px solid #eee; }
        .cart-details { flex: 1; }
        .cart-title { font-weight: 700; font-size: 1rem; color: #333; margin-bottom: 4px; }
        .cart-price { font-weight: 700; color: var(--primary); font-size: 0.95rem; }

        .modal-box-large { background: var(--glass-panel-strong); padding: 30px; border-radius: 18px; text-align: center; width: 70%; height: 90%; box-shadow: var(--glass-shadow); display: flex; flex-direction: column; align-items: center; justify-content: center; overflow-y: auto; position: relative; border: 1px solid var(--glass-border); -webkit-backdrop-filter: blur(28px) saturate(190%) contrast(108%); backdrop-filter: blur(28px) saturate(190%) contrast(108%); }
        .modal-btn { background: var(--primary); color: white; border: none; padding: 12px; width: 100%; margin-top: 15px; border-radius: 8px; font-weight: 700; cursor: pointer; font-size: 1rem; }
        .modal-actions { display: flex; gap: 15px; margin-top: 25px; }
        .modal-actions button { flex: 1; padding: 25px 10px; border-radius: 12px; border: none; font-weight: 800; cursor: pointer; font-size: 1.6rem; text-transform: uppercase; box-shadow: 0 4px 10px rgba(0,0,0,0.2); }
        .btn-cancel { background: #c0392b; color: white; } 
        .btn-confirm { background: #27ae60; color: white; }
        .modal-box h3 { font-size: 2rem; margin-bottom: 15px; color: var(--primary); }
        .modal-box p { font-size: 1.5rem; margin-bottom: 20px; color: #333; }

        .btn-close-red { background: #c0392b; color: white; border: none; padding: 12px 30px; font-size: 1rem; font-weight: 800; border-radius: 8px; cursor: pointer; text-transform: uppercase; letter-spacing: 1px; box-shadow: 0 4px 10px rgba(192, 57, 43, 0.3); transition: transform 0.2s; }
        .btn-close-header { background: #c0392b; color: white; border: none; padding: 8px 20px; font-size: 0.9rem; font-weight: 700; border-radius: 6px; cursor: pointer; text-transform: uppercase; transition: transform 0.1s; }
        .btn-admin-menu { color: white; border: none; padding: 8px 20px; min-height: 35px; border-radius: 6px; font-weight: 700; font-size: 0.9rem; cursor: pointer; display: inline-flex; align-items: center; justify-content: center; gap: 6px; box-shadow: none; text-transform: uppercase; white-space: nowrap; transition: transform 0.1s, filter 0.12s ease; }
        .btn-admin-menu:hover { transform: translateY(-1px); filter: brightness(1.06); }
        .btn-admin-menu.allergen-action { background: #c0392b; color: white; }
        .btn-admin-menu.text-size-action { background: #3f51b5; color: white; }
        .btn-admin-menu.admin-action { background: var(--primary); color: white; }
        .text-size-options { display:grid; grid-template-columns:repeat(2, minmax(0, 1fr)); gap:12px; margin:20px 0; }
        .text-size-choice { min-height:72px; border:2px solid #cbd5e1; border-radius:12px; background:#f8fafc; color:#334155; font-weight:900; cursor:pointer; }
        .text-size-choice.active { background:#162e75; border-color:#162e75; color:#fff; box-shadow:0 6px 16px rgba(22,46,117,.24); }
        .text-size-choice span { display:block; margin-top:4px; font-size:.78rem; opacity:.78; }
        .poke-item-card { background: var(--theme-product-bg) !important; color: var(--theme-text) !important; border-radius: var(--theme-product-radius) !important; }
        .poke-item-name { color: var(--theme-text) !important; font-size: calc(var(--theme-product-font-size) + var(--customer-product-extra)) !important; font-family: var(--theme-font-product-title) !important; }
        .poke-section-title { color: var(--theme-category-title) !important; font-size: calc(1rem + var(--customer-product-extra)) !important; font-family: var(--theme-font-category-title) !important; }
        .poke-section-subtitle { color: var(--theme-text) !important; font-size: calc(.8rem + var(--customer-product-extra)) !important; font-family: var(--theme-font-product-description) !important; }
        .btn-add-poke { font-family: var(--theme-font-buy) !important; }
        .total-value { font-family: var(--theme-font-price) !important; }
        .allergen-disclaimer { display: flex; align-items: flex-start; gap: 10px; margin: 4px 0 16px 0; padding: 12px 14px; border-radius: 12px; background: #fff7ed; border: 1px solid #fed7aa; color: #7c2d12; text-align: left; font-size: 0.95rem; line-height: 1.35; font-weight: 700; }
        .allergen-disclaimer strong { color: #9a3412; }
        .virtual-keypad { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin-top: 15px; }
        .key-btn { background: #f1f1f1; border: 1px solid #ddd; padding: 15px; font-size: 1.5rem; font-weight: 700; border-radius: 8px; cursor: pointer; color: #333; }
        .key-btn.clear { background: #e74c3c; color: white; }
        @keyframes pulse-attention { 0% { transform: scale(1); border: 4px solid white; box-shadow: 0 0 20px rgba(0,0,0,0.5); } 50% { transform: scale(1.05); border: 4px solid #e74c3c; box-shadow: 0 0 30px #c0392b, 0 0 60px #e74c3c, 0 0 100px rgba(231, 76, 60, 0.8); } 100% { transform: scale(1); border: 4px solid white; box-shadow: 0 0 20px rgba(0,0,0,0.5); } }
        .text-blink { animation: blinkGray 1.5s infinite; font-size: 2rem; font-weight: 800; margin-bottom: 30px; }
        .modal-message-box { background: var(--glass-panel-strong); width: 80%; height: 90%; border-radius: 22px; display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 40px; text-align: center; animation: pulse-attention 1.5s infinite ease-in-out; border: 4px solid rgba(255,255,255,0.78); position: relative; box-shadow: var(--glass-shadow); -webkit-backdrop-filter: blur(30px) saturate(190%); backdrop-filter: blur(30px) saturate(190%); overflow: hidden; }
        .btn-note { width: 32px; height: 32px; border-radius: 50%; border: 1px solid #ccc; background: white; color: #333; font-size: 1rem; cursor: pointer; display: flex; align-items: center; justify-content: center; box-shadow: 0 2px 4px rgba(0,0,0,0.1); margin-right: 5px; }
        .btn-note.has-note { background: #f1c40f; color: #333; border-color: #f39c12; }
        .note-remove-box { margin: 0 0 14px; padding: 12px; border: 1px solid #e5e7eb; border-radius: 10px; background: #f8fafc; text-align: left; }
        .note-remove-title { font-size: 0.9rem; font-weight: 900; color: #334155; margin-bottom: 8px; }
        .note-remove-list { display: flex; flex-wrap: wrap; gap: 8px; }
        .note-remove-ingredient-btn { border: 1px solid #cbd5e1; background: #fff; color: #334155; border-radius: 999px; padding: 8px 12px; font-size: 0.9rem; font-weight: 800; cursor: pointer; }
        .note-remove-ingredient-btn.active { background: #fee2e2; border-color: #ef4444; color: #991b1b; box-shadow: 0 0 0 2px rgba(239,68,68,0.12); }

        /* DEBUGGER STYLE (CENTER BOTTOM + SAFE CLICKS) */
        #debuggerPanel { position: fixed; bottom: 0; left: 50%; transform: translateX(-50%); width: 90%; max-width: 600px; max-height: 250px; background: rgba(0, 0, 0, 0.95); color: #00ff00; border-top: 3px solid #00ff00; padding: 10px; font-family: 'Consolas', 'Monaco', monospace; font-size: 11px; z-index: 99999; overflow-y: auto; box-shadow: 0 -5px 30px rgba(0,0,0,0.8); display: block; pointer-events: none; }
        #debuggerPanel > * { pointer-events: auto; }
        .dbg-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 5px; margin-bottom: 5px; }
        .dbg-item { background: #222; padding: 4px; border-radius: 4px; text-align: center; }
        .dbg-label { display: block; color: #888; font-size: 9px; text-transform: uppercase; }
        .dbg-value { display: block; color: #fff; font-weight: bold; font-size: 12px; }
        .dbg-error-box { background: #300; border: 1px solid #f00; color: #ffcccc; padding: 10px; margin-top: 5px; white-space: pre-wrap; font-size: 11px; display: none; }
        .dbg-diag-box { background: #332b00; border: 1px solid #ffcc00; color: #ffeb99; padding: 5px; margin-top: 5px; font-size: 10px; display: none; }
        
        /* --- STILE TIMER HEADER (PILLOLA ELEGANTE) --- */
        .header-timer-pill {
            display: none; /* Gestito da JS */
            align-items: center;
            gap: 6px;
            background: linear-gradient(135deg, #e67e22, #d35400); 
            color: white;
            padding: 0 12px;
            height: 50px !important;
            border-radius: 30px;
            font-weight: 800;
            font-size: 0.92rem;
            margin-left: 8px;
            box-shadow: 0 6px 20px rgba(0,0,0,0.8) !important;
            transition: all 0.3s ease;
            white-space: nowrap;
            letter-spacing: 0.5px;
            text-transform: uppercase;
        }
        
        /* Animazione pulsazione morbida per header */
        @keyframes pulse-soft {
            0% { transform: scale(1); }
            50% { transform: scale(1.02); }
            100% { transform: scale(1); }
        }
        .timer-active { animation: pulse-soft 2s infinite; }
        .header-timer-icon { font-size: 1rem; line-height: 1; }
        .header-timer-copy {
            display: flex;
            flex-direction: column;
            align-items: center;
            justify-content: center;
            gap: 3px;
            min-width: 44px;
            line-height: 1;
        }
        .header-timer-copy > span {
            display: block;
            font-size: 0.9rem;
            line-height: 1;
            font-variant-numeric: tabular-nums;
        }
        .header-timer-copy small {
            display: inline-flex;
            align-items: center;
            justify-content: center;
            margin: 0;
            padding: 2px 6px;
            border-radius: 8px;
            background: #168653;
            color: #fff;
            font-size: 0.5rem;
            font-weight: 900;
            line-height: 1;
            letter-spacing: 0.55px;
            box-shadow: 0 2px 5px rgba(22, 134, 83, 0.28);
        }

        /* --- STILE TIMER CARRELLO (BOX DETTAGLIATO) --- */
        #cart-timer-container {
            margin-bottom: 20px;
            padding: 15px;
            border-radius: 12px;
            text-align: center;
            border: 1px solid transparent; /* Bordo sottile */
            transition: all 0.3s ease;
            display: none; 
            box-shadow: 0 2px 10px rgba(0,0,0,0.05);
        }
        
        /* STATO: ATTESA */
        .cart-timer-wait { background-color: #fff8e1 !important; border-color: #ffe0b2 !important; color: #d35400 !important; }
        /* STATO: PRONTO */
        .cart-timer-ready { background-color: #e8f5e9 !important; border-color: #c8e6c9 !important; color: #27ae60 !important; }
        
        #cart-timer-text { font-weight: 900; font-size: 1.3rem; display: block; margin-bottom: 5px; }
        #cart-timer-subtext { font-size: 0.95rem; line-height: 1.4; opacity: 0.9; }
        #cart-auto-submit-badge {
            display: none;
            width: fit-content;
            margin: 10px auto 0;
            padding: 7px 15px;
            border-radius: 18px;
            background: #168653;
            color: #fff;
            font-size: 0.9rem;
            font-weight: 800;
            font-family: inherit;
            box-shadow: 0 4px 12px rgba(22, 134, 83, 0.25);
            border: none;
            cursor: pointer;
            -webkit-appearance: none;
            appearance: none;
        }
        #cart-auto-submit-badge:active { transform: scale(0.96); }

        /* --- NUOVE REGOLE RICHIESTE --- */
        /* Animazione lampeggio pulsante mobile (Sfondo Blu) */
        @keyframes bg-pulse-blue {
            0% { background-color: #2980b9; }
            50% { background-color: #3498db; }
            100% { background-color: #2980b9; }
        }
        .btn-mobile-blink { animation: bg-pulse-blue 2s infinite; }
        
        /* NUOVO: PULSANTE CAMERIERE */
        .btn-call-waiter {
            height: 50px !important; 
            display: flex; 
            align-items: center; 
            justify-content: center; 
            position: relative;
            flex: 0 0 50px;
            width: 50px;
            min-width: 50px;
            padding: 0;
            border-radius: 25px; 
            font-weight: 700; 
            font-size: 0.9rem; 
            cursor: pointer; 
            border: none; 
            transition: 0.2s; 
            background: white; 
            color: #333; 
            white-space: nowrap; 
            box-shadow: 0 6px 20px rgba(0,0,0,0.8) !important;
        }

        /* Spostamento Info nel Menu Overlay */
        .overlay-info-group { display: flex; align-items: center; gap: 15px; margin-right: 15px; color: #334155; font-weight: 600; background: rgba(255,255,255,0.52); padding: 8px 15px; border-radius: 20px; border: 1px solid rgba(255,255,255,0.62); box-shadow: inset 0 1px 0 rgba(255,255,255,0.58); -webkit-backdrop-filter: blur(14px) saturate(150%); backdrop-filter: blur(14px) saturate(150%); }
        
        @keyframes fadeInEffect { 0% { opacity: 0; -webkit-backdrop-filter: blur(0px) saturate(100%); backdrop-filter: blur(0px) saturate(100%); } 100% { opacity: 1; -webkit-backdrop-filter: blur(14px) saturate(150%); backdrop-filter: blur(14px) saturate(150%); } }
        @keyframes fadeOutEffect { 0% { opacity: 1; -webkit-backdrop-filter: blur(14px) saturate(150%); backdrop-filter: blur(14px) saturate(150%); } 100% { opacity: 0; -webkit-backdrop-filter: blur(0px) saturate(100%); backdrop-filter: blur(0px) saturate(100%); } }
        
        /* --- STILE MENU FISSO AGGIORNATO --- */
        .fixed-menu-container {
            background-color: #e0f2f1; /* Sfondo verdino chiaro unico */
            border: 2px solid #00695c;
            border-radius: 12px;
            margin-bottom: 15px;
            overflow: hidden;
            box-shadow: 0 2px 5px rgba(0,0,0,0.1);
        }
        .fixed-menu-header {
            background-color: #00695c;
            color: white;
            padding: 10px 15px;
            display: flex;
            justify-content: space-between;
            align-items: center;
        }
        .btn-remove-menu {
            background-color: #c0392b;
            color: white;
            border: none;
            padding: 8px 15px;
            border-radius: 20px; /* Pillola */
            font-weight: 700;
            font-size: 0.8rem;
            cursor: pointer;
            white-space: nowrap;
            box-shadow: 0 2px 5px rgba(0,0,0,0.2);
            height: auto !important; width: auto !important;
        }
        .fixed-menu-items-list { padding: 10px; }
        .fixed-menu-row {
            display: flex; align-items: center;
            background: white; border-radius: 8px;
            padding: 8px; margin-bottom: 8px;
            border: 1px solid #ddd; gap: 10px;
        }
        .fixed-menu-row:last-child { margin-bottom: 0; }
        .fixed-menu-img { width: 50px; height: 50px; border-radius: 6px; object-fit: cover; border: 1px solid #eee; }
        .fixed-menu-info { flex: 1; display: flex; flex-direction: column; justify-content: center; }

        /* Raggruppamento menu fisso allineato alla visualizzazione staff. */
        .fixed-menu-order-group {
            --fixed-menu-accent: #2563eb;
            --fixed-menu-bg: #eaf2ff;
            margin: 7px 0 11px;
            padding: 6px;
            overflow: hidden;
            background: var(--fixed-menu-bg);
            border: 2px solid var(--fixed-menu-accent);
            border-left-width: 7px;
            border-radius: 10px;
            box-shadow: 0 2px 7px rgba(15,23,42,0.12);
        }
        .fixed-menu-order-group.tone-1 { --fixed-menu-accent: #15803d; --fixed-menu-bg: #ecfdf3; }
        .fixed-menu-order-group.tone-2 { --fixed-menu-accent: #c2410c; --fixed-menu-bg: #fff7ed; }
        .fixed-menu-order-group.tone-3 { --fixed-menu-accent: #7e22ce; --fixed-menu-bg: #faf5ff; }
        .fixed-menu-order-header {
            min-width: 0;
            padding: 5px 5px 8px 7px;
            display: grid;
            grid-template-columns: minmax(0, 1fr) auto;
            align-items: center;
            gap: 8px;
            color: var(--fixed-menu-accent);
        }
        .fixed-menu-cart-heading { min-width: 0; display: grid; gap: 4px; }
        .fixed-menu-cart-title-row {
            min-width: 0;
            display: flex;
            align-items: baseline;
            justify-content: space-between;
            gap: 8px;
        }
        .fixed-menu-cart-title {
            min-width: 0;
            overflow-wrap: anywhere;
            font-size: 1.32rem;
            font-weight: 900;
            line-height: 1.2;
            text-transform: uppercase;
        }
        .fixed-menu-cart-price {
            flex: 0 0 auto;
            padding: 3px 7px;
            border-radius: 999px;
            background: rgba(255,255,255,0.88);
            color: #1f2937;
            font-size: 0.74rem;
            font-weight: 900;
            white-space: nowrap;
        }
        .fixed-menu-cart-extra {
            color: #475569;
            font-size: 0.68rem;
            font-weight: 800;
            line-height: 1.25;
        }
        .fixed-menu-cart-items { display: grid; gap: 5px; }
        .fixed-menu-cart-row {
            min-width: 0;
            min-height: 54px;
            padding: 6px;
            display: grid;
            grid-template-columns: 42px minmax(0, 1fr) 30px;
            align-items: center;
            gap: 8px;
            border: 1px solid var(--fixed-menu-accent);
            border-radius: 8px;
            background: rgba(255,255,255,0.90);
            box-shadow: 0 1px 2px rgba(15,23,42,0.05);
        }
        .fixed-menu-cart-row:last-child { margin-bottom: 0; }
        .fixed-menu-cart-img {
            width: 42px;
            height: 42px;
            border: 1px solid rgba(15,23,42,0.09);
            border-radius: 6px;
            background: #fff;
            object-fit: cover;
        }
        .fixed-menu-cart-item-info { min-width: 0; display: grid; gap: 2px; }
        .fixed-menu-cart-item-title {
            min-width: 0;
            color: #253041;
            font-size: 1.17rem;
            font-weight: 750;
            line-height: 1.2;
            overflow-wrap: anywhere;
        }
        .fixed-menu-cart-note-button {
            width: 28px !important;
            height: 28px !important;
            min-width: 28px;
            padding: 0 !important;
            justify-self: end;
            border-radius: 7px !important;
            font-size: 0.72rem !important;
        }
        @media (max-width: 600px) {
            .fixed-menu-order-group { padding: 5px; border-left-width: 6px; }
            .fixed-menu-order-header { padding-left: 5px; }
            .fixed-menu-cart-title-row { align-items: flex-start; gap: 6px; }
            .fixed-menu-cart-row { grid-template-columns: 38px minmax(0, 1fr) 28px; gap: 6px; }
            .fixed-menu-cart-img { width: 38px; height: 38px; }
        }
        
        /* STILE PER I GRUPPI ORDINE */
        .order-group-header {
            background-color: #e0f2f1; /* Colore simile al tema */
            color: #00695c;
            padding: 8px 15px;
            border-radius: 8px;
            font-weight: 800;
            font-size: 0.9rem;
            margin-bottom: 10px;
            margin-top: 15px;
            text-transform: uppercase;
            letter-spacing: 0.5px;
            border-left: 5px solid #00695c;
            display: flex;
            align-items: center;
            gap: 8px;
        }
        .order-group-header:first-child { margin-top: 0; }
        
        /* --- ANIMAZIONI CLICK --- */
        .btn-circle:active, 
        .qty-btn:active, 
        .btn-acquista:active,
        .header-btn:active,
        .btn-submit:active,
        .modal-actions button:active,
        .btn-note:active {
            transform: scale(0.92) !important;
            transition: transform 0.05s ease-out;
        }

        /* --- NUOVI STILI PER ALLERGENI --- */
        .allergen-btn { background: #f8f9fa; border: 2px solid #ddd; border-radius: 8px; padding: 10px; font-weight: 700; color: #555; cursor: pointer; transition: 0.2s; display: flex; align-items: center; justify-content: space-between; text-align: left; font-size: 0.9rem; }
        .allergen-btn.active { background: #ffebee; border-color: #e74c3c; color: #c0392b; box-shadow: 0 4px 10px rgba(231,76,60,0.2); }
        .card-img-wrap img.allergen-blocked { filter: grayscale(100%) opacity(0.5); }
        .btn-acquista.allergen-blocked { background: #7f8c8d !important; pointer-events: none !important; color: white !important; font-size: 0.8rem; border: 2px solid #555; }
        .btn-circle.plus.allergen-blocked { background: #7f8c8d !important; color: #fff !important; border-color: #666 !important; pointer-events: none !important; }

        .assist-chat-badge {
            position: absolute;
            top: -5px;
            right: -5px;
            display: inline-flex;
            align-items: center;
            justify-content: center;
            min-width: 24px;
            height: 24px;
            margin-left: 0;
            padding: 0 6px;
            border-radius: 999px;
            background: #dc2626;
            color: #fff;
            font-size: 0.8rem;
            font-weight: 950;
            line-height: 1;
        }
        .btn-call-waiter.chat-unread {
            animation: assistanceChatPulse 0.75s ease-in-out infinite;
        }
        @keyframes assistanceChatPulse {
            0%, 100% { box-shadow: 0 0 0 0 rgba(220,38,38,0.28); }
            50% { box-shadow: 0 0 0 8px rgba(220,38,38,0.12); }
        }
        .assistance-action-grid {
            display: grid;
            grid-template-columns: repeat(3, minmax(0, 1fr));
            gap: 14px;
            margin: 18px 0 8px;
        }
        .assistance-action-btn {
            min-height: 110px;
            border: none;
            border-radius: 14px;
            color: #fff;
            font-size: 1.25rem;
            font-weight: 950;
            cursor: pointer;
            box-shadow: 0 6px 0 rgba(0,0,0,0.18);
        }
        .assistance-action-btn.waiter { background: #f59e0b; color: #3b2200; }
        .assistance-action-btn.bill { background: #0f766e; }
        .assistance-action-btn.chat { background: #2563eb; }
        .assistance-action-btn small {
            display: block;
            margin-top: 5px;
            font-size: 0.72rem;
            line-height: 1.15;
            font-weight: 750;
        }
        .assistance-action-btn:disabled {
            opacity: 0.62;
            cursor: default;
            box-shadow: none;
        }
        #chatFullscreenNotification {
            display: none;
            position: fixed;
            inset: 0;
            width: 100%;
            height: 100vh;
            height: 100dvh;
            z-index: 110000;
            align-items: center;
            justify-content: center;
            box-sizing: border-box;
            padding: max(24px, env(safe-area-inset-top)) max(24px, env(safe-area-inset-right)) max(24px, env(safe-area-inset-bottom)) max(24px, env(safe-area-inset-left));
            color: #fff;
            text-align: center;
            cursor: pointer;
            -webkit-tap-highlight-color: transparent;
        }
        #chatFullscreenNotification.visible {
            display: flex;
            -webkit-animation: chatFullscreenFlash 0.56s steps(1, end) infinite;
            animation: chatFullscreenFlash 0.56s steps(1, end) infinite;
        }
        .chat-fullscreen-content { max-width: 820px; text-shadow: 0 3px 10px rgba(0,0,0,0.38); }
        .chat-fullscreen-title { margin-bottom: 24px; font-size: 4.2rem; font-weight: 800; line-height: 1.05; }
        .chat-fullscreen-text { font-size: 2rem; font-weight: 500; line-height: 1.25; }
        .chat-fullscreen-open { min-width: 270px; margin-top: 38px; padding: 20px 46px; border: 3px solid rgba(255,255,255,0.88); border-radius: 14px; background: #064e3b; color: #fff; box-shadow: 0 8px 22px rgba(0,0,0,0.3); font-size: 1.65rem; font-weight: 800; cursor: pointer; }
        @-webkit-keyframes chatFullscreenFlash {
            0%, 49% { background: #16a34a; color: #fff; }
            50%, 100% { background: #fff; color: #15803d; }
        }
        @keyframes chatFullscreenFlash {
            0%, 49% { background: #16a34a; color: #fff; }
            50%, 100% { background: #fff; color: #15803d; }
        }
        @media (max-width: 700px) {
            .chat-fullscreen-title { font-size: 3rem; }
            .chat-fullscreen-text { font-size: 1.55rem; }
            .chat-fullscreen-open { min-width: 230px; padding: 17px 36px; font-size: 1.4rem; }
        }
        #tableChatModal {
            align-items: flex-start !important;
            justify-content: center !important;
            padding-top: max(8px, env(safe-area-inset-top));
            box-sizing: border-box;
            height: 100vh !important;
            min-height: 100vh !important;
            overflow: hidden !important;
        }
        html.table-chat-open,
        body.table-chat-open { overflow: hidden !important; }
        .chat-modal-box {
            position: fixed;
            top: max(8px, env(safe-area-inset-top));
            left: 50%;
            transform: translateX(-50%);
            width: min(92vw, 720px);
            height: min(46vh, 391px);
            max-height: calc(100vh - 18px);
            margin-top: 0;
            background: var(--glass-panel-strong);
            border: 1px solid var(--glass-border);
            border-radius: 18px;
            box-shadow: var(--glass-shadow);
            color: #1f2937;
            display: flex;
            flex-direction: column;
            overflow: hidden;
            -webkit-backdrop-filter: blur(28px) saturate(190%) contrast(108%);
            backdrop-filter: blur(28px) saturate(190%) contrast(108%);
        }
        .chat-title-island {
            position: absolute;
            top: 7px;
            left: 50%;
            transform: translateX(-50%);
            z-index: 3;
            padding: 5px 15px;
            border-radius: 999px;
            background: rgba(16,42,103,0.86);
            color: #fff;
            border: 1px solid rgba(255,255,255,0.36);
            box-shadow: 0 8px 24px rgba(15,23,42,0.18), inset 0 1px 0 rgba(255,255,255,0.22);
            -webkit-backdrop-filter: blur(18px) saturate(170%);
            backdrop-filter: blur(18px) saturate(170%);
            font-size: 0.9rem;
            font-weight: 950;
            line-height: 1;
            letter-spacing: 0.2px;
            pointer-events: none;
            white-space: nowrap;
        }
        .chat-messages {
            flex: 1 1 auto;
            min-height: 0;
            overflow-y: auto;
            padding: 7px 9px 7px;
            background: rgba(244,247,251,0.52);
            display: flex;
            flex-direction: column;
            gap: 5px;
        }
        .chat-empty { text-align: center; color: #64748b; font-weight: 850; padding: 24px 10px 10px; }
        .chat-bubble {
            max-width: 82%;
            padding: 8px 10px;
            border-radius: 12px;
            font-size: 0.95rem;
            font-weight: 800;
            line-height: 1.22;
            word-break: break-word;
        }
        .chat-bubble.staff { align-self: flex-start; background: #fff; color: #111827; border: 1px solid #dbe3ef; border-bottom-left-radius: 4px; }
        .chat-bubble.cliente { align-self: flex-end; background: #dcfce7; color: #14532d; border: 1px solid #86efac; border-bottom-right-radius: 4px; }
        .chat-bubble-time { display: none; }
        .chat-input-area { flex: 0 0 auto; display: flex; gap: 6px; padding: 6px; border-top: 1px solid rgba(255,255,255,0.56); background: rgba(255,255,255,0.48); -webkit-backdrop-filter: blur(18px) saturate(150%); backdrop-filter: blur(18px) saturate(150%); }
        .chat-input-area textarea { flex: 1; min-height: 40px; max-height: 58px; resize: none; border: 1px solid rgba(203,213,225,0.92); border-radius: 10px; padding: 7px 9px; font-size: 0.92rem; font-weight: 800; line-height: 1.18; color: #111827; background: rgba(255,255,255,0.86); overflow-y: auto; }
        .chat-input-area textarea::placeholder { color: #64748b; opacity: 0.9; }
        .chat-send-btn, .chat-exit-btn { width: 82px; border: none; border-radius: 10px; color: #fff; font-size: 0.88rem; font-weight: 950; cursor: pointer; }
        .chat-send-btn { background: #16a34a; }
        .chat-exit-btn { background: #c0392b; }
        .mobile-order-modal { width: min(72vw, 700px); height: auto; max-height: 86vh; padding: 22px 24px; justify-content: flex-start; }
        .mobile-order-modal-title { color: var(--primary); margin-bottom: 6px; font-size: 1.45rem; line-height: 1.16; }
        .mobile-order-qr-wrap { margin: 12px auto 10px; display: flex; justify-content: center; align-items: flex-start; }
        .mobile-order-qr-box { width: 210px; height: 210px; border: 2px solid #eee; padding: 8px; border-radius: 10px; margin: 0 auto; background: white; display: flex; justify-content: center; align-items: center; }
        .mobile-order-qr-note { margin-top: 8px; font-size: 0.84rem; color: #16a34a; font-weight: 900; }
        .mobile-order-pin-title { margin-bottom: 12px; font-size: 1.15rem; }
        .mobile-order-pin-title #display_pin_tavolo { font-size: 1.45rem; }
        .mobile-order-info-grid { display:grid; grid-template-columns:repeat(2, minmax(0, 1fr)); gap:10px; max-width:680px; margin:0 auto; text-align:left; }
        .mobile-order-info-card { background:rgba(248,250,252,0.68); border:2px solid rgba(191,219,254,0.86); border-radius:14px; padding:16px; color:#1f2937; box-shadow:0 6px 16px rgba(15,23,42,0.08); -webkit-backdrop-filter: blur(12px) saturate(145%); backdrop-filter: blur(12px) saturate(145%); }
        .mobile-order-modal .mobile-order-info-card { padding: 12px; }
        .mobile-order-modal .mobile-order-info-card div { line-height: 1.32 !important; }
        .mobile-order-modal .mobile-order-info-card div:first-child { margin-bottom: 6px !important; font-size: 0.98rem !important; }
        .mobile-order-modal .mobile-order-info-card div:last-child { font-size: 0.9rem !important; }
        .mobile-order-modal .btn-close-red { margin-top: 18px !important; padding: 12px 24px; font-size: 1rem; }
        .mobile-order-info-card.promo { border-color:#bbf7d0; }
        @media (max-height: 760px) {
            .mobile-order-modal { max-height: 84vh; padding: 18px 22px; }
            .mobile-order-modal-title { font-size: 1.28rem; }
            .mobile-order-qr-box { width: 190px; height: 190px; padding: 7px; }
            .mobile-order-pin-title { font-size: 1.05rem; margin-bottom: 10px; }
            .mobile-order-pin-title #display_pin_tavolo { font-size: 1.3rem; padding: 4px 12px; }
            .mobile-order-modal .mobile-order-info-card { padding: 10px; }
            .mobile-order-modal .mobile-order-info-card div:first-child { font-size: 0.92rem !important; margin-bottom: 4px !important; }
            .mobile-order-modal .mobile-order-info-card div:last-child { font-size: 0.84rem !important; line-height: 1.24 !important; }
            .mobile-order-modal .btn-close-red { margin-top: 14px !important; padding: 10px 22px; }
        }

        @media (max-height: 760px) {
            .chat-modal-box { height: min(42vh, 320px); }
            .chat-bubble { font-size: 0.86rem; padding: 7px 9px; }
            .chat-title-island { top: 6px; padding: 5px 13px; font-size: 0.84rem; }
            .chat-input-area textarea { min-height: 38px; max-height: 52px; }
            .chat-send-btn, .chat-exit-btn { width: 70px; font-size: 0.8rem; }
        }

        @media (orientation: portrait) and (max-width: 1100px) {
            .info-pill,
            #btn-cameriere,
            #headerTimerDisplay { display: none !important; }
            .header-group { min-width: 0; gap: 4px; }
            .header-timer-pill { margin-left: 4px; padding: 0 12px; font-size: 0.9rem; }
            .btn-cart-floating { flex-shrink: 0; padding: 0 10px; }
            .mobile-order-info-grid { grid-template-columns:1fr; }
        }

        #tabletSetupModal { z-index: 12000 !important; background: rgba(15, 23, 42, 0.22); -webkit-backdrop-filter: blur(14px) saturate(150%); backdrop-filter: blur(14px) saturate(150%); }
        .tablet-setup-box { width: min(94vw, 860px); max-height: 92vh; overflow-y: auto; background: var(--glass-panel-strong); border: 1px solid var(--glass-border); border-radius: 20px; padding: 28px; box-shadow: var(--glass-shadow); text-align: center; position: relative; -webkit-backdrop-filter: blur(30px) saturate(190%) contrast(108%); backdrop-filter: blur(30px) saturate(190%) contrast(108%); }
        .tablet-setup-box h2 { margin: 0 0 8px 0; color: var(--primary); font-size: clamp(1.7rem, 3vw, 2.5rem); text-transform: uppercase; }
        .tablet-setup-box p { margin: 0 0 20px 0; color: #475569; font-size: 1.1rem; font-weight: 650; }
        .tablet-setup-section { text-align: left; margin-top: 16px; }
        .tablet-setup-label { display: block; margin-bottom: 10px; color: #1f2937; font-size: 1.12rem; line-height: 1.15; font-weight: 900; text-align: center; text-transform: uppercase; }
        .tablet-people-grid { display: grid; grid-template-columns: repeat(10, minmax(44px, 1fr)); gap: 8px; }
        .tablet-kids-grid { display: grid; grid-template-columns: repeat(11, minmax(42px, 1fr)); gap: 7px; }
        .tablet-menu-grid { display: grid; grid-template-columns: repeat(5, minmax(120px, 1fr)); gap: 10px; }
        .tablet-menu-grid-special { grid-template-columns: repeat(4, minmax(120px, 1fr)); }
        .tablet-setup-choice { min-height: 52px; border: 2px solid rgba(216,222,233,0.82); border-radius: 10px; background: rgba(248,250,252,0.68); color: #1f2937; font-weight: 900; font-size: 1.15rem; cursor: pointer; box-shadow: 0 3px 8px rgba(15,23,42,0.08), inset 0 1px 0 rgba(255,255,255,0.55); transition: transform 0.12s, background 0.12s, border-color 0.12s; -webkit-backdrop-filter: blur(12px) saturate(145%); backdrop-filter: blur(12px) saturate(145%); }
        .tablet-menu-choice { min-height: 78px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; line-height: 1.15; }
        .tablet-menu-choice > span:first-child { display: flex; align-items: center; justify-content: center; min-height: 2.3em; text-align: center; }
        .tablet-menu-price { font-size: 0.78rem; font-weight: 850; color: #64748b; text-transform: none; }
        .tablet-setup-choice.active .tablet-menu-price { color: rgba(255,255,255,0.92); }
        .tablet-setup-choice:active { transform: scale(0.96); }
        .tablet-setup-choice.active { background: #15803d; border-color: #15803d; color: #fff; box-shadow: 0 7px 16px rgba(21,128,61,0.28); }
        .tablet-setup-hidden { visibility: hidden !important; pointer-events: none !important; }
        .tablet-menu-unavailable { display: none !important; }
        .tablet-setup-content { display: block; }
        .tablet-setup-wifi-wait { display: none; position: absolute; inset: 0; z-index: 20; min-height: 100%; padding: 34px 22px 28px; border-radius: inherit; background: rgba(248,250,252,0.62); border: none; margin: 0; align-items: center; justify-content: center; flex-direction: column; pointer-events: auto; backdrop-filter: blur(20px) saturate(170%); -webkit-backdrop-filter: blur(20px) saturate(170%); }
        .tablet-setup-checking .tablet-setup-wifi-wait,
        .tablet-setup-opening .tablet-setup-wifi-wait { display: flex; }
        .tablet-wifi-spinner { width: 54px; height: 54px; border-radius: 50%; border: 6px solid #dbeafe; border-top-color: var(--primary); margin: 0 auto 18px; animation: tabletWifiSpin 0.8s linear infinite; }
        .tablet-wifi-title { color: var(--primary); font-size: clamp(1.4rem, 3vw, 2.1rem); font-weight: 950; text-transform: uppercase; margin-bottom: 10px; }
        .tablet-wifi-text { color: #475569; font-size: 1.15rem; font-weight: 800; line-height: 1.35; }
        @keyframes tabletWifiSpin { to { transform: rotate(360deg); } }
        .tablet-setup-error { display: none; margin-top: 16px; padding: 12px 14px; border-radius: 10px; background: #fee2e2; color: #991b1b; font-weight: 800; text-align: left; }
        .tablet-setup-actions { display: flex; gap: 12px; margin-top: 22px; }
        .tablet-setup-confirm { flex: 1; border: none; border-radius: 12px; padding: 18px 16px; background: var(--primary); color: #fff; font-weight: 900; font-size: 1.2rem; text-transform: uppercase; cursor: pointer; box-shadow: 0 8px 18px rgba(0,105,92,0.25); }
        .tablet-setup-confirm:disabled { background: #94a3b8; cursor: wait; box-shadow: none; }
        .tablet-setup-admin { flex: 0 0 230px; border: 2px solid rgba(0,105,92,0.82); border-radius: 12px; padding: 18px 16px; background: rgba(238,247,245,0.68); color: var(--primary); font-weight: 900; font-size: 1.05rem; text-transform: uppercase; cursor: pointer; box-shadow: 0 8px 18px rgba(0,105,92,0.12), inset 0 1px 0 rgba(255,255,255,0.55); -webkit-backdrop-filter: blur(12px) saturate(145%); backdrop-filter: blur(12px) saturate(145%); }
        #adminModal { z-index: 13000 !important; }
        @media (max-width: 700px) {
            .tablet-setup-box { width: 94vw; padding: 20px; }
            .tablet-people-grid { grid-template-columns: repeat(5, minmax(44px, 1fr)); }
            .tablet-kids-grid { grid-template-columns: repeat(6, minmax(42px, 1fr)); }
            .tablet-menu-grid { grid-template-columns: repeat(2, minmax(110px, 1fr)); }
            .tablet-setup-actions { flex-direction: column; }
            .tablet-setup-admin { flex: 1; width: 100%; }
        }

        /* Modalita performance tablet: niente vetro/blur, categorie con scorrimento laterale. */
        :root {
            --glass-panel: #ffffff;
            --glass-panel-strong: #ffffff;
            --glass-border: #dbe3ef;
            --glass-shadow: 0 8px 24px rgba(15,23,42,0.16);
        }
        .top-bar,
        .modal-bg,
        .modal-box,
        .modal-box-top,
        .modal-box-large,
        .modal-message-box,
        .cart-container,
        .chat-modal-box,
        .tablet-setup-box,
        .tablet-setup-choice,
        .tablet-setup-admin,
        .tablet-setup-wifi-wait,
        .overlay-header,
        .overlay-info-group,
        .sidebar-cat-link,
        .cart-footer,
        .chat-title-island,
        .chat-input-area,
        .mobile-order-info-card,
        #menuOverlay,
        #menuBackdrop,
        #tabletSetupModal {
            -webkit-backdrop-filter: none !important;
            backdrop-filter: none !important;
        }
        .top-bar::before,
        #menuOverlay::before,
        .modal-box::before,
        .modal-box-top::before,
        .modal-box-large::before,
        .cart-container::before,
        .chat-modal-box::before,
        .modal-message-box::before,
        .tablet-setup-box::before {
            display: none !important;
        }
        .top-bar { background: var(--theme-toolbar-bg) !important; border-color: #dbe3ef !important; }
        .modal-bg { background: rgba(15,23,42,0.55) !important; }
        .modal-box,
        .modal-box-top,
        .modal-box-large,
        .modal-message-box,
        .chat-modal-box,
        .tablet-setup-box { background: #ffffff !important; border-color: #dbe3ef !important; }
        .cart-container { background: var(--theme-cart-bg) !important; border-color: #dbe3ef !important; }
        .overlay-header,
        .cart-footer,
        .chat-input-area { background: #f8fafc !important; border-color: #dbe3ef !important; }
        .chat-messages { background: #f4f7fb !important; }
        .menu-grid-container { background: var(--theme-categories-bg) !important; }
        .cart-content { background: var(--theme-cart-bg) !important; }
        #cartOverlay[data-cart-tab] { --cart-draft-bg: #eaf5ef; --cart-history-bg: #eaf1fc; --cart-tab-bg: var(--cart-draft-bg); }
        #cartOverlay[data-cart-tab="history"] { --cart-tab-bg: var(--cart-history-bg); }
        #cartOverlay .cart-tabs { flex: 0 0 auto; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; padding: 12px 20px 0; background: #f8fafc; }
        #cartOverlay .cart-tab { min-width: 0; min-height: 54px; padding: 12px 10px; border: 1px solid #d4dce6; border-top: 3px solid transparent; border-bottom: 0; border-radius: 12px 12px 0 0; background: #e2e8f0; color: #475569; font-size: clamp(0.9rem, 1.75vw, 1.08rem); font-weight: 800; line-height: 1.25; cursor: pointer; }
        #cartOverlay #cart-tab-draft[aria-selected="true"] { background: var(--cart-draft-bg); color: #14532d; border-color: #cee4d7; border-top-color: #166534; }
        #cartOverlay #cart-tab-history[aria-selected="true"] { background: var(--cart-history-bg); color: #1e3a8a; border-color: #d0def2; border-top-color: #1d4ed8; }
        #cartOverlay .cart-tab:focus-visible { outline: 3px solid #2563eb; outline-offset: -5px; }
        #cartOverlay[data-cart-tab] .cart-content,
        #cartOverlay[data-cart-tab] .cart-tab-panel,
        #cartOverlay[data-cart-tab] .cart-footer { background: var(--cart-tab-bg) !important; }
        #cartOverlay .cart-tab-panel[hidden], #cartOverlay .cart-footer[hidden] { display: none !important; }
        #cartOverlay[data-cart-tab] .overlay-header, #cartOverlay[data-cart-tab] .cart-footer { flex-shrink: 0; }
        .overlay-info-group,
        .mobile-order-info-card,
        .tablet-setup-choice,
        .tablet-setup-wifi-wait { background: #f8fafc !important; }
        .tablet-setup-choice.active {
            background: #15803d !important;
            border-color: #15803d !important;
            color: #ffffff !important;
            box-shadow: 0 8px 18px rgba(21,128,61,0.28) !important;
        }
        .tablet-setup-choice.active .tablet-menu-price { color: rgba(255,255,255,0.92) !important; }
        .tablet-setup-admin { background: #eef7f5 !important; }
        .chat-title-island { background: #102a67 !important; border-color: #dbe3ef !important; box-shadow: 0 4px 12px rgba(15,23,42,0.14) !important; }
        .top-bar .btn-call-waiter { background: var(--theme-toolbar-button-bg) !important; color: var(--theme-toolbar-button-text) !important; }
        .sidebar-cat-link { background: #ffffff !important; border-color: #dbe3ef !important; box-shadow: 0 2px 8px rgba(15,23,42,0.08) !important; }
        .sidebar-cat-link.active-cat { background: #00695c !important; border-color: #00695c !important; color: #ffffff !important; }
        #menuOverlay {
            background: var(--theme-categories-bg) !important;
            transform: translateX(-100%) !important;
            opacity: 1 !important;
            visibility: visible !important;
            pointer-events: none !important;
            transition: transform 0.28s ease !important;
            will-change: transform !important;
            box-shadow: 8px 0 28px rgba(15,23,42,0.24) !important;
        }
        #menuOverlay.open {
            transform: translateX(0) !important;
            pointer-events: auto !important;
        }
        #menuBackdrop { background: rgba(0,0,0,0.55) !important; }

        /* iPad verticale: categorie leggibili e testata completa senza elementi tagliati. */
        @media (orientation: portrait) and (min-width: 701px) and (max-width: 1100px) {
            #menuOverlay {
                width: 85% !important;
            }
            #menuOverlay .overlay-header {
                justify-content: flex-start;
                gap: 8px;
                padding: 10px 12px;
            }
            #menuOverlay .overlay-header > h3 {
                display: none !important;
            }
            #menuOverlay .overlay-info-group {
                flex: 0 0 auto;
                gap: 8px;
                margin-right: 0;
                padding: 7px 10px;
                font-size: 0.85rem;
                white-space: nowrap;
            }
            #menuOverlay .overlay-header > div:last-child {
                display: flex !important;
                flex: 1 1 auto;
                min-width: 0;
                justify-content: flex-end;
                gap: 6px !important;
            }
            #menuOverlay .promo-test-pill,
            #menuOverlay .btn-admin-menu,
            #menuOverlay .btn-close-header {
                min-height: 38px;
                padding: 8px 11px;
                font-size: 0.78rem;
            }
            #menuOverlay .menu-grid-container {
                grid-template-columns: repeat(2, minmax(0, 1fr));
                align-content: start;
                padding: 14px;
                gap: 10px;
            }
        }
    

        /* Keep the note editor above the keyboard, within the visible viewport. */
        #noteModal {
            top: var(--note-viewport-top, 0px);
            height: var(--note-viewport-height, 100%);
            align-items: flex-start;
            padding: max(10px, env(safe-area-inset-top)) 0 10px;
            box-sizing: border-box;
        }
        #noteModal > .modal-box {
            max-height: 100%;
            overflow-y: auto;
            overscroll-behavior-y: contain;
            -webkit-overflow-scrolling: touch;
            box-sizing: border-box;
        }

        #noteModal .note-header {
            display: flex;
            align-items: center;
            justify-content: space-between;
            gap: 16px;
            margin-bottom: 12px;
        }
        #noteModal .note-header h3 {
            flex: 0 0 auto;
            margin: 0;
            font-size: 1.3rem;
            text-align: left;
        }
        #noteModal .note-product {
            display: flex;
            align-items: center;
            justify-content: flex-end;
            gap: 10px;
            min-width: 0;
        }
        #noteModal #noteTitle {
            margin: 0;
            color: #666;
            font-size: 0.9rem;
            font-weight: 700;
            text-align: right;
            overflow-wrap: anywhere;
        }
        #noteProductImage {
            flex: 0 0 52px;
            width: 52px;
            height: 52px;
            object-fit: cover;
            background: #fff;
            border-radius: 8px;
        }
        @media (max-width: 480px) {
            #noteModal .note-header { gap: 10px; }
            #noteModal .note-header h3 { font-size: 1.05rem; }
            #noteModal .note-product { gap: 6px; }
            #noteProductImage { flex-basis: 44px; width: 44px; height: 44px; }
        }

/* Sent fixed menus use the same frame, preserving each dish's status/actions. */
.fixed-menu-history-group > .fixed-menu-order-header { display:block; padding:0 0 5px; }
.fixed-menu-history-group .fixed-menu-history-master { background:transparent !important; border:0 !important; }
.fixed-menu-history-master .cart-title { color:var(--fixed-menu-accent); font-weight:900; }
.fixed-menu-history-group .fixed-menu-cart-extra { padding:0 5px 5px; }
.fixed-menu-history-group .history-item { min-width:0; }
.fixed-menu-history-group .cart-details { min-width:0; }
.fixed-menu-history-group .cart-title { overflow-wrap:anywhere; }

/* First subdivision: 25px grid margin + 15px padding - 25px = 15px. */
main > .main-category-title + .grid > .product-section-heading:first-child { margin-top:-25px !important; }

/* Category groups only change presentation of the existing visible buttons. */
#menuOverlay .menu-grid-container.has-category-groups { align-content: start; }
#menuOverlay .category-group-heading { grid-column: 1 / -1; display: flex; align-items: center; gap: 14px; margin: 16px 0 3px; min-width: 0; color: var(--theme-category-title, #26382b); font-family: var(--theme-font-category-menu, inherit); font-size: clamp(1.1rem, 2.4vw, 1.5rem); line-height: 1.3; font-weight: 800; text-align: center; }
#menuOverlay .category-group-heading:first-child { margin-top: 0; }
#menuOverlay .category-group-heading::before, #menuOverlay .category-group-heading::after { content: ""; flex: 1; min-width: 14px; border-top: 2px solid currentColor; opacity: .3; }
#menuOverlay .category-group-heading > span { max-width: 80%; overflow-wrap: anywhere; }

/* iOS-style limit badge over the corner; highlight centred below its category name. */
#menuOverlay .menu-grid-container { grid-template-columns: repeat(3, minmax(0, 1fr)); grid-auto-rows: max-content; align-content: start; align-items: stretch; gap: 26px; padding: 26px; }
#menuOverlay a.sidebar-cat-link { position: relative; overflow: visible; min-width: 0; height: 69.3px; min-height: 69.3px; max-height: 69.3px; box-sizing: border-box; padding: 5px 10px; display: grid; grid-template-columns: minmax(0, 1fr); align-content: center; column-gap: 8px; row-gap: 0; }
#menuOverlay a.sidebar-cat-link.has-category-workload { padding: 5px 10px; row-gap: 0; }
#menuOverlay .sidebar-cat-link.has-category-photo, #menuOverlay .sidebar-cat-link.has-category-workload { grid-template-columns: auto minmax(0, 1fr); }
#menuOverlay .sidebar-cat-link.has-category-photo.has-category-workload { grid-template-columns: auto auto minmax(0, 1fr); }
#menuOverlay .sidebar-cat-link > .cat-text-wrap { grid-row: 1; grid-column: 1; min-width: 0; max-width: 100%; box-sizing: border-box; align-items: center; text-align: center; overflow-wrap: anywhere; }
#menuOverlay .sidebar-cat-link.has-category-photo > .cat-text-wrap, #menuOverlay .sidebar-cat-link.has-category-workload > .cat-text-wrap { grid-column: 2; }
#menuOverlay .sidebar-cat-link.has-category-photo.has-category-workload > .cat-text-wrap { grid-column: 3; }
#menuOverlay .sidebar-cat-link > img { grid-row: 1; grid-column: 1; width: 44px !important; max-width: 44px; height: 44px !important; object-fit: contain; }
#menuOverlay .sidebar-cat-link > .category-workload-badge { grid-row: 1; grid-column: 1; }
#menuOverlay .sidebar-cat-link.has-category-workload > img { grid-column: 2; width: 44px !important; max-width: 44px; height: 44px !important; }
#menuOverlay .category-name { display: block; font-size: 1.05rem !important; line-height: 1.02 !important; letter-spacing: -.3px; }
#menuOverlay .sidebar-cat-link.has-category-limit > .cat-text-wrap { padding-right: 10px; }
#menuOverlay .sidebar-cat-link.category-highlight > .cat-text-wrap { gap: 3px; }
#menuOverlay .category-limit-circle {
    position: absolute; z-index: 3; top: -24px; right: -18px;
    width: 36px; height: 36px; box-sizing: border-box; border-radius: 50%;
    display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 1px;
    border: 1px solid #e3bf75; background: #fff2d8; color: #805217 !important;
    box-shadow: 0 2px 5px #5c3b0c12; pointer-events: none;
}
#menuOverlay .category-limit-caption { font-size: 8.5px; line-height: 1; font-weight: 750; }
#menuOverlay .category-limit-value { font-size: 15px; line-height: 1.1; font-weight: 850; font-variant-numeric: tabular-nums; }
#menuOverlay .sidebar-cat-link.category-highlight {
    overflow: visible;
    --category-badge-idle-bg: #fff0cf; --category-badge-idle-color: #805219; --category-badge-idle-border: #e2bd73;
    --category-badge-active-bg: #16854b; --category-badge-active-color: #ffffff; --category-badge-active-border: #3aa66b;
    --category-badge-active-shadow: 0 3px 10px #16854b45;
}
#menuOverlay .category-highlight-badge {
    align-self: center; flex: 0 0 auto;
    display: inline-flex; align-items: center; justify-content: center; gap: 4px;
    position: static; box-sizing: border-box; max-width: calc(100% - 10px);
    margin: 0; padding: 2px 8px; border: 1px solid var(--category-badge-active-border);
    border-radius: 999px; background: var(--category-badge-active-bg); color: var(--category-badge-active-color);
    font-size: .7rem; font-weight: 800; line-height: 1.05; letter-spacing: -.1px; text-align: center;
    overflow-wrap: anywhere; pointer-events: none; transform-origin: center; animation-play-state: paused;
}
#menuOverlay .category-highlight-badge::before { content: ''; flex: 0 0 7px; width: 7px; height: 7px; border-radius: 50%; background: currentColor; }
#menuOverlay .sidebar-cat-link.category-highlight-consigliato { --category-badge-active-bg: #996616; --category-badge-active-border: #b78836; --category-badge-active-shadow: 0 3px 10px #99661640; }
#menuOverlay .sidebar-cat-link.category-highlight-promo { --category-badge-active-bg: #b64c37; --category-badge-active-border: #d47664; --category-badge-active-shadow: 0 3px 10px #b64c3740; }
#menuOverlay .sidebar-cat-link.category-highlight-offerte { --category-badge-active-bg: #406cb0; --category-badge-active-border: #7195cf; --category-badge-active-shadow: 0 3px 10px #406cb040; }
#menuOverlay.open .category-highlight-badge { animation-play-state: running; }
#menuOverlay .category-click-feedback .category-highlight-badge { animation: none !important; opacity: 1; transform: none; }
#menuOverlay .sidebar-cat-link.category-click-feedback::after { position: absolute; bottom: 7px; right: 7px; margin: 0; }
@media (max-width: 900px) { #menuOverlay .menu-grid-container { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 600px) { #menuOverlay .menu-grid-container { grid-template-columns: minmax(0, 1fr); } }
@media (prefers-reduced-motion: reduce) { #menuOverlay .category-highlight-badge { animation: none !important; opacity: 1; transform: none; } }
#cartOverlay #cart-empty { color: #475569; text-align: center; padding: clamp(36px, 7vh, 72px) 12px; font-size: clamp(2rem, 3.5vw, 2.75rem); line-height: 1.25; font-weight: 800; }

/* Cart labels, prices and actions share each product row. */
#cartOverlay .cart-details { min-width: 0; }
#cartOverlay .cart-img { flex-shrink: 0; }
#cartOverlay .cart-title { overflow-wrap: anywhere; line-height: 1.2; }
#cartOverlay .cart-draft-title { font-size: 1.35rem; }
#cartOverlay .cart-history-title { font-size: 1.275rem; }
#cartOverlay .cart-row-tools { flex: 0 0 auto; display: flex; align-items: center; justify-content: flex-end; gap: 6px; }
#cartOverlay .cart-price-note { padding: 2px; background: transparent; gap: 6px; }
#cartOverlay .cart-draft-price { font-size: .8rem; white-space: nowrap; }
#cartOverlay .cart-history-side { flex: 0 0 auto; margin-left: auto; display: flex; flex-direction: column; align-items: flex-end; min-width: 65px; }
#cartOverlay .cart-history-price { font-size: .75rem; white-space: nowrap; margin-bottom: 4px; }
#cartOverlay .cart-total-line { display: flex; justify-content: flex-end; align-items: baseline; gap: 14px; text-align: right; line-height: 1.3; }
#cartOverlay .cart-total-line > span:first-child { min-width: 0; overflow-wrap: anywhere; }
#cartOverlay .cart-total-amount { flex: 0 0 auto; min-width: 88px; white-space: nowrap; }
#cartOverlay .cart-total-current { font-size: 1.33rem; }
#cartOverlay .cart-total-previous { font-size: 1.26rem; color: #666; margin-top: 6px; }
#cartOverlay .cart-total-combined { font-size: 1.512rem; margin-top: 8px; padding-top: 8px; border-top: 1px dashed #ddd; }
@media (max-width: 600px) {
    #cartOverlay .cart-row-tools { flex-direction: column; align-items: flex-end; gap: 3px; }
    #cartOverlay .cart-row-tools .cart-controls { gap: 6px; }
}
@media (max-width: 600px) {
    #cartOverlay .cart-container { width: calc(100% - 16px); }
    #cartOverlay .cart-content { padding: 12px 8px; }
    #cartOverlay .cart-total-line { gap: 8px; }
    #cartOverlay .cart-tabs { padding: 12px 8px 0; }
}

/* Sent items: title and price share a baseline; status stays in its own column. */
#cartOverlay .overlay-header { gap: 12px; }
#cartOverlay .overlay-header h3 { margin: 0; font-size: 2rem; font-weight: 800; line-height: 1.15; }
#cartOverlay .cart-history-main { flex: 1; min-width: 0; display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: baseline; gap: 10px; }
#cartOverlay .cart-history-meta { min-width: 0; text-align: right; }
#cartOverlay .cart-history-price { margin-bottom: 2px; }
#cartOverlay .cart-history-time { font-size: .65rem; line-height: 1.2; color: #555; white-space: nowrap; }
@media (max-width: 600px) {
    #cartOverlay .overlay-header h3 { font-size: 1.65rem; }
    #cartOverlay .cart-history-main { gap: 6px; }
}

/* Product offer labels use the existing purchase animation. */
.btn-acquista.product-highlight.highlight-scontato { --product-highlight-color:#b44737; --product-highlight-shadow:#b4473747; }
.btn-acquista.product-highlight.highlight-offerta { --product-highlight-color:#b46a16; --product-highlight-shadow:#b46a1647; }
.btn-acquista.product-highlight.highlight-promozione { --product-highlight-color:#7753a3; --product-highlight-shadow:#7753a347; }

#menuOverlay .category-highlight-promo{--category-highlight-color:#b64c37}#menuOverlay .category-highlight-offerte{--category-highlight-color:#406cb0}

/* Category drawer owns scrolling until its closing transition finishes. */
#menuOverlay { overscroll-behavior: contain; }
#menuOverlay .overlay-header { flex-shrink: 0; touch-action: none; }
#menuOverlay .menu-grid-container { min-height: 0; overscroll-behavior-y: contain; -webkit-overflow-scrolling: touch; touch-action: pan-y; }
#menuBackdrop { touch-action: none; overscroll-behavior: none; }
