/* ═══════════════════════════════════════════════════
   Ristorante Gnam — QR Table Ordering System
   Mobile-first • Brand Palette • Light Theme
   ═══════════════════════════════════════════════════ */

/* ─── Reset & Base ─── */
*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    /* Brand Colors */
    --red:          #E10600;
    --red-hover:    #B00500;
    --red-alt:      #D32F2F;
    --pink-soft:    #F5C7B8;
    --pink-light:   #FADBD2;
    --bg-base:      #FFF7F4;

    /* Text */
    --text-dark:    #1A1A1A;
    --text-mid:     #666666;
    --text-light:   #999999;

    /* UI Support */
    --border:       #E5E5E5;
    --white:        #FFFFFF;
    --success:      #2E7D32;
    --success-light: rgba(46,125,50,0.12);
    --warning:      #F57C00;
    --error:        #C62828;

    /* Shadows */
    --shadow-sm:    0 1px 4px rgba(0,0,0,0.08);
    --shadow-md:    0 4px 16px rgba(0,0,0,0.10);
    --shadow-lg:    0 8px 32px rgba(0,0,0,0.13);
    --shadow-red:   0 4px 20px rgba(225,6,0,0.22);
    --shadow-red-lg:0 6px 32px rgba(225,6,0,0.32);

    /* Radii */
    --radius-sm:    8px;
    --radius-md:    12px;
    --radius-lg:    16px;
    --radius-xl:    20px;
    --radius-full:  9999px;

    --font: 'Outfit', -apple-system, BlinkMacSystemFont, sans-serif;
    --safe-bottom: env(safe-area-inset-bottom, 0px);
}

html {
    font-size: 16px;
    -webkit-text-size-adjust: 100%;
}

body {
    font-family: var(--font);
    background: var(--bg-base);
    color: var(--text-dark);
    min-height: 100vh;
    min-height: 100dvh;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
}

/* ─── Subtle background texture ─── */
.bg-blobs {
    position: fixed;
    inset: 0;
    z-index: 0;
    overflow: hidden;
    pointer-events: none;
}

.bg-blobs .blob {
    position: absolute;
    border-radius: 50%;
    filter: blur(90px);
    opacity: 0.55;
    animation: blobFloat 22s ease-in-out infinite;
}

.bg-blobs .blob-1 {
    width: 340px;
    height: 340px;
    background: radial-gradient(circle, #F5C7B8 0%, #FADBD2 100%);
    top: -120px;
    left: -100px;
}

.bg-blobs .blob-2 {
    width: 280px;
    height: 280px;
    background: radial-gradient(circle, #FADBD2 0%, #F5C7B8 100%);
    bottom: -90px;
    right: -70px;
    animation-delay: -8s;
}

.bg-blobs .blob-3 {
    width: 200px;
    height: 200px;
    background: radial-gradient(circle, rgba(225,6,0,0.08) 0%, transparent 80%);
    top: 40%;
    left: 55%;
    animation-delay: -15s;
    opacity: 0.4;
}

@keyframes blobFloat {
    0%, 100% { transform: translate(0, 0) scale(1); }
    25%  { transform: translate(28px, -18px) scale(1.04); }
    50%  { transform: translate(-18px, 28px) scale(0.96); }
    75%  { transform: translate(18px, 18px) scale(1.02); }
}

/* ─── App Container ─── */
.app {
    position: relative;
    z-index: 1;
    max-width: 520px;
    margin: 0 auto;
    min-height: 100vh;
    min-height: 100dvh;
    display: flex;
    flex-direction: column;
}

/* ─── Top Header ─── */
.header {
    position: sticky;
    top: 0;
    z-index: 100;
    /* sfondo uguale al rosa del logo così si fonde */
    background: #F5C7B8;
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--pink-soft);
    padding: 0;           /* il logo occupa tutta la larghezza */
    overflow: hidden;
}

/* ─── Logo banner full-width ─── */
.header-logo-wrap {
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    line-height: 0;       /* elimina gap sotto l'img */
}

.header-logo {
    width: 100%;          /* larghezza uguale al container del menu */
    height: auto;         /* altezza proporzionale all'immagine */
    display: block;
    object-fit: cover;
    object-position: center;
}

/* badge tavolo in order.php — sopra il logo, in basso a destra */
.header-logo-wrap .table-badge {
    position: absolute;
    right: 12px;
    bottom: 8px;
    background: rgba(225,6,0,0.88);
    backdrop-filter: blur(4px);
}

/* ─── Order Button (sticky in header) ─── */
.order-btn-wrap {
    padding: 10px 16px;   /* padding spostato qui dall'header */
}

.order-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    width: 100%;
    padding: 12px 20px;
    border: none;
    border-radius: var(--radius-md);
    font-family: var(--font);
    font-size: 0.95rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.order-btn.empty {
    background: var(--pink-light);
    color: var(--text-mid);
    border: 1.5px dashed var(--pink-soft);
    cursor: default;
}

.order-btn.has-items {
    background: var(--red);
    color: white;
    box-shadow: var(--shadow-red);
    animation: pulseRed 2.2s ease-in-out infinite;
}

.order-btn.has-items:hover {
    background: var(--red-hover);
    box-shadow: var(--shadow-red-lg);
}

.order-btn.has-items:active {
    transform: scale(0.97);
}

.order-btn .badge {
    background: rgba(255, 255, 255, 0.25);
    padding: 2px 8px;
    border-radius: var(--radius-full);
    font-size: 0.8rem;
    min-width: 24px;
    text-align: center;
}

.order-btn .total {
    margin-left: auto;
    font-size: 1rem;
}

@keyframes pulseRed {
    0%, 100% { box-shadow: 0 4px 16px rgba(225,6,0,0.22); }
    50%       { box-shadow: 0 4px 28px rgba(225,6,0,0.40); }
}

/* ─── Meal Period Tabs ─── */
.periods-bar {
    position: sticky;
    top: var(--header-h, 80px);
    z-index: 91;
    background: rgba(255,247,244,0.95);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--pink-soft);
    padding: 10px 16px;
    transition: top 0.3s ease;
}

.periods-scroll {
    display: flex;
    gap: 8px;
    width: 100%;
}

.period-tab {
    flex: 1 1 0px;
    width: 0;
    min-width: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 12px 6px;
    border: 1.5px solid var(--border);
    border-radius: var(--radius-md);
    background: var(--white);
    color: var(--text-mid);
    font-size: 0.8rem;
    font-family: var(--font);
    font-weight: 800;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    cursor: pointer;
    transition: all 0.22s ease;
    white-space: normal;
}

.period-tab span {
    white-space: normal;
    text-align: center;
    line-height: 1.1;
    word-wrap: break-word;
}

.period-tab:hover {
    background: var(--pink-light);
    border-color: var(--pink-soft);
    color: var(--text-dark);
}

.period-tab:active {
    transform: scale(0.97);
}

.period-tab.active {
    background: var(--red);
    color: white;
    border-color: var(--red);
    box-shadow: var(--shadow-red);
}

.period-tab i {
    font-size: 1.05rem;
    flex-shrink: 0;
}

@media (max-width: 380px) {
    .period-tab {
        padding: 10px 4px;
        font-size: 0.72rem;
        gap: 4px;
    }
    .period-tab i {
        font-size: 0.95rem;
    }
}

/* ─── Category Tabs ─── */
.categories-bar {
    position: sticky;
    top: var(--periods-offset, 130px);   /* aggiornato da JS dopo il render */
    z-index: 90;
    background: rgba(255,247,244,0.92);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--border);
    padding: 10px 0;
    overflow: hidden;
}

.categories-scroll {
    display: flex;
    gap: 8px;
    overflow-x: auto;
    padding: 0 16px;
    scrollbar-width: none;
    -ms-overflow-style: none;
    scroll-behavior: smooth;
    -webkit-overflow-scrolling: touch;
}

.categories-scroll::-webkit-scrollbar {
    display: none !important;
}

.business-subnav {
    display: flex;
    gap: 10px;
    overflow-x: auto;
    padding: 0 0 8px 0; /* reduced slightly to prevent large empty space under tabs */
    margin-bottom: 15px;
    scrollbar-width: none;
    -ms-overflow-style: none;
    -webkit-overflow-scrolling: touch;
}

.business-subnav::-webkit-scrollbar {
    display: none !important;
}

.cat-tab {
    flex: 0 0 145px;
    padding: 10px 8px;
    text-align: center;
    border: 1.5px solid var(--border);
    border-radius: var(--radius-md);  /* 12px instead of 8px */
    background: var(--white);
    color: var(--text-mid);
    font-size: 0.8rem;
    font-family: var(--font);
    font-weight: 800;
    letter-spacing: 0.05em;
    text-transform: uppercase;        /* stampatello */
    cursor: pointer;
    transition: all 0.22s ease;
    white-space: normal;
    word-wrap: break-word;
    line-height: 1.1;
    display: flex;
    align-items: center;
    justify-content: center;
}

.cat-tab:hover {
    background: var(--pink-light);
    border-color: var(--pink-soft);
    color: var(--text-dark);
}

.cat-tab.active {
    background: var(--red);
    color: white;
    border-color: var(--red);
    box-shadow: var(--shadow-red);
}

.combo-tab {
    padding: 10px 20px;
    border-radius: var(--radius-md);
    border: 1.5px solid var(--border);
    white-space: nowrap;
    background: var(--white);
    color: var(--text-mid);
    font-weight: 800;
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    font-family: var(--font);
    cursor: pointer;
    transition: all 0.22s ease;
}

.combo-tab.active {
    background: var(--red);
    color: white;
    border-color: var(--red);
    box-shadow: var(--shadow-red);
}

.menu-card-price {
    font-size: 1.15rem;
    font-weight: 800;
    color: var(--red);
    white-space: nowrap;
}

.bl-combo-name, .bl-group-title, .bl-item-name {
    text-transform: uppercase !important;
    letter-spacing: 0.03em;
}
.bl-combo-name {
    font-size: 1.3rem !important;
}
.bl-group-title {
    font-size: 1.05rem !important;
}
.bl-item-name {
    font-size: 0.95rem !important;
}

/* ─── Menu Items Grid ─── */
.menu-section {
    flex: 1;
    padding: 16px;
    padding-bottom: calc(20px + var(--safe-bottom));
}

.menu-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 10px;
}

/* ─── Menu Item Card ─── */
.menu-card {
    background: var(--white);
    border: 1.5px solid var(--border);
    border-radius: var(--radius-lg);
    overflow: hidden;
    transition: all 0.25s ease;
    display: flex;
    flex-direction: row;
    min-height: 100px;
    box-shadow: var(--shadow-sm);
}

.menu-card:hover {
    background: var(--white);
    border-color: var(--pink-soft);
    transform: translateY(-1px);
    box-shadow: var(--shadow-md);
}

.menu-card.in-basket {
    border-color: var(--red);
    box-shadow: 0 0 0 2px rgba(225,6,0,0.12), var(--shadow-sm);
}

.menu-card-img {
    width: 100px;
    min-height: 100px;
    flex: 0 0 100px;
    object-fit: cover;
    background: var(--pink-light);
}

.menu-card-img.placeholder {
    display: grid;
    place-items: center;
    font-size: 2rem;
    color: var(--pink-soft);
    opacity: 0.7;
    background: var(--pink-light);
}

.menu-card-body {
    flex: 1;
    padding: 12px 14px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    gap: 6px;
    min-width: 0;
}

.menu-card-name {
    font-size: 0.88rem;
    font-weight: 700;
    color: var(--text-dark);
    line-height: 1.3;
    text-transform: capitalize;
}

.menu-card-allergens {
    font-size: 0.86rem;
    color: var(--text-light);
    line-height: 1.3;
    white-space: normal;
    word-wrap: break-word;
    text-transform: uppercase;
    letter-spacing: 0.02em;
}

.menu-card-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 8px;
}

.menu-card-price {
    font-size: 1rem;
    font-weight: 800;
    color: var(--red);
    white-space: nowrap;
}

/* ─── Quantity Stepper ─── */
.stepper {
    display: flex;
    align-items: center;
    gap: 0;
    background: var(--pink-light);
    border-radius: var(--radius-full);
    border: 1.5px solid var(--border);
    overflow: hidden;
}

.stepper button {
    width: 34px;
    height: 34px;
    border: none;
    background: transparent;
    color: var(--text-mid);
    font-size: 1.1rem;
    font-weight: 700;
    cursor: pointer;
    display: grid;
    place-items: center;
    transition: all 0.2s ease;
    font-family: var(--font);
}

.stepper button:hover {
    background: var(--pink-soft);
    color: var(--text-dark);
}

.stepper button:active {
    transform: scale(0.9);
}

.stepper button.plus {
    color: var(--success);
}

.stepper button.plus:hover {
    background: var(--success-light);
    color: var(--success);
}

.stepper button.minus {
    color: var(--error);
}

.stepper button.minus:hover {
    background: rgba(198,40,40,0.10);
    color: var(--error);
}

.stepper .qty {
    min-width: 28px;
    text-align: center;
    font-size: 0.88rem;
    font-weight: 700;
    color: var(--text-dark);
    padding: 0 2px;
}

.stepper .qty.has-qty {
    color: var(--red);
}

/* ─── Order Summary Overlay ─── */
.overlay {
    position: fixed;
    inset: 0;
    z-index: 500;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    transition: visibility 0.3s, opacity 0.3s;
}

.overlay.hidden {
    visibility: hidden;
    opacity: 0;
    pointer-events: none;
}

.overlay.hidden .summary-panel {
    transform: translateY(100%);
}

.overlay-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(26,26,26,0.45);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
}

.summary-panel {
    position: relative;
    z-index: 1;
    background: var(--white);
    border-top: 1.5px solid var(--border);
    border-radius: var(--radius-xl) var(--radius-xl) 0 0;
    max-height: 85vh;
    max-height: 85dvh;
    display: flex;
    flex-direction: column;
    transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    padding-bottom: var(--safe-bottom);
    box-shadow: 0 -8px 40px rgba(0,0,0,0.12);
}

.summary-handle {
    width: 40px;
    height: 4px;
    background: var(--border);
    border-radius: 2px;
    margin: 10px auto 6px;
}

.summary-header {
    padding: 10px 20px 14px;
    border-bottom: 1px solid var(--border);
}

.summary-header h2 {
    font-size: 1.15rem;
    font-weight: 800;
    color: var(--text-dark);
    display: flex;
    align-items: center;
    gap: 8px;
}

.summary-header h2 i {
    color: var(--red);
}

.summary-header .table-info {
    font-size: 0.82rem;
    color: var(--text-mid);
    margin-top: 2px;
}

.summary-items {
    flex: 1;
    overflow-y: auto;
    padding: 12px 20px;
    -webkit-overflow-scrolling: touch;
}

.summary-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 0;
    border-bottom: 1px solid var(--border);
}

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

.summary-item-info {
    flex: 1;
    min-width: 0;
}

.summary-item-name {
    font-size: 0.85rem;
    font-weight: 700;
    color: var(--text-dark);
    text-transform: capitalize;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.summary-item-price {
    font-size: 0.75rem;
    color: var(--text-mid);
}

.summary-item-total {
    font-size: 0.9rem;
    font-weight: 800;
    color: var(--red);
    white-space: nowrap;
}

.summary-item .stepper {
    flex: 0 0 auto;
}

/* Summary Footer */
.summary-footer {
    padding: 16px 20px;
    border-top: 1px solid var(--border);
    background: var(--white);
}

.summary-total-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
}

.summary-total-label {
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-mid);
}

.summary-total-value {
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--text-dark);
}

.summary-actions {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 14px 20px;
    border: none;
    border-radius: var(--radius-md);
    font-family: var(--font);
    font-size: 0.92rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.25s ease;
}

.btn:active {
    transform: scale(0.97);
}

/* CTA principale — rosso brand */
.btn-send {
    background: var(--red);
    color: white;
    box-shadow: var(--shadow-red);
}

.btn-send:hover {
    background: var(--red-hover);
    box-shadow: var(--shadow-red-lg);
}

.btn-send:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none;
}

.btn-back {
    background: var(--bg-base);
    color: var(--text-dark);
    border: 1.5px solid var(--border);
}

.btn-back:hover {
    background: var(--pink-light);
    border-color: var(--pink-soft);
}

.btn-clear {
    background: transparent;
    color: var(--error);
    font-size: 0.82rem;
    padding: 8px;
}

.btn-clear:hover {
    background: rgba(198,40,40,0.08);
}

.btn-row {
    display: flex;
    gap: 10px;
}

.btn-row .btn {
    flex: 1;
}

/* ─── Loading State ─── */
.loading-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 80px 20px;
    gap: 16px;
}

.spinner {
    width: 40px;
    height: 40px;
    border: 3px solid var(--border);
    border-top-color: var(--red);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

.loading-container p {
    color: var(--text-mid);
    font-size: 0.88rem;
}

/* ─── Error / Empty State ─── */
.state-msg {
    text-align: center;
    padding: 60px 20px;
}

.state-msg i {
    font-size: 3rem;
    color: var(--pink-soft);
    margin-bottom: 12px;
    display: block;
}

.state-msg h3 {
    font-size: 1.1rem;
    color: var(--text-dark);
    margin-bottom: 6px;
}

.state-msg p {
    font-size: 0.85rem;
    color: var(--text-mid);
}

/* ─── Toast ─── */
.toast {
    position: fixed;
    top: 20px;
    left: 50%;
    transform: translateX(-50%) translateY(-120px);
    z-index: 1000;
    background: var(--white);
    border: 1.5px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 14px 22px;
    display: flex;
    align-items: center;
    gap: 12px;
    box-shadow: var(--shadow-lg);
    transition: transform 0.5s cubic-bezier(0.16, 1, 0.3, 1);
    max-width: 90vw;
}

.toast.show {
    transform: translateX(-50%) translateY(0);
}

.toast.success {
    border-color: rgba(46,125,50,0.35);
}

.toast.error {
    border-color: rgba(198,40,40,0.35);
}

.toast-icon {
    font-size: 1.5rem;
}

.toast.success .toast-icon {
    color: var(--success);
}

.toast.error .toast-icon {
    color: var(--error);
}

.toast-msg {
    font-size: 0.88rem;
    font-weight: 600;
    color: var(--text-dark);
}

/* ─── Sending Overlay ─── */
.sending-overlay {
    position: fixed;
    inset: 0;
    z-index: 900;
    background: rgba(255,247,244,0.82);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 20px;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.sending-overlay.active {
    opacity: 1;
    visibility: visible;
}

.sending-overlay .spinner {
    width: 56px;
    height: 56px;
    border-width: 4px;
}

.sending-overlay p {
    color: var(--text-dark);
    font-size: 1.05rem;
    font-weight: 600;
}

/* ─── Covers Modal ─── */
.covers-overlay {
    position: fixed;
    inset: 0;
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(26,26,26,0.5);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    padding: 20px;
    animation: fadeIn 0.4s ease;
}

.covers-overlay.hide {
    animation: fadeOut 0.35s ease forwards;
    pointer-events: none;
}

.covers-card {
    background: var(--white);
    border: 1.5px solid var(--border);
    border-radius: var(--radius-xl);
    padding: 40px 30px 30px;
    text-align: center;
    max-width: 340px;
    width: 100%;
    box-shadow: var(--shadow-lg), 0 0 40px rgba(225,6,0,0.08);
    animation: slideUp 0.45s cubic-bezier(0.16, 1, 0.3, 1);
}

.covers-icon {
    width: 68px;
    height: 68px;
    background: var(--red);
    border-radius: 50%;
    display: grid;
    place-items: center;
    font-size: 28px;
    color: white;
    margin: 0 auto 18px;
    box-shadow: var(--shadow-red);
}

.covers-card h2 {
    font-size: 1.55rem;
    font-weight: 800;
    margin-bottom: 6px;
    color: var(--text-dark);
}

.covers-card p {
    font-size: 0.95rem;
    color: var(--text-mid);
    margin-bottom: 28px;
}

.covers-selector {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0;
    margin-bottom: 28px;
    background: var(--bg-base);
    border: 1.5px solid var(--border);
    border-radius: var(--radius-full);
    overflow: hidden;
    max-width: 200px;
    margin-left: auto;
    margin-right: auto;
}

.covers-selector button {
    width: 56px;
    height: 56px;
    border: none;
    background: transparent;
    color: var(--text-mid);
    font-size: 1.6rem;
    font-weight: 700;
    cursor: pointer;
    display: grid;
    place-items: center;
    transition: all 0.2s ease;
    font-family: var(--font);
}

.covers-selector button:hover:not(:disabled) {
    background: var(--pink-light);
    color: var(--text-dark);
}

.covers-selector button:active:not(:disabled) {
    transform: scale(0.9);
}

.covers-selector button:disabled {
    opacity: 0.3;
    cursor: default;
}

.covers-selector .covers-minus {
    color: var(--error);
}

.covers-selector .covers-plus {
    color: var(--success);
}

.covers-value {
    min-width: 56px;
    text-align: center;
    font-size: 2rem;
    font-weight: 800;
    color: var(--red);
    padding: 0 4px;
}

.covers-confirm {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    width: 100%;
    padding: 16px 24px;
    border: none;
    border-radius: var(--radius-md);
    background: var(--red);
    color: white;
    font-family: var(--font);
    font-size: 1rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.25s ease;
    box-shadow: var(--shadow-red);
}

.covers-confirm:hover {
    background: var(--red-hover);
    box-shadow: var(--shadow-red-lg);
    transform: translateY(-1px);
}

.covers-confirm:active {
    transform: scale(0.97);
}

/* ─── Responsive ─── */
@media (min-width: 480px) {
    .menu-grid {
        grid-template-columns: 1fr;
    }
    .menu-card-img, .menu-card-img.placeholder {
        width: 120px;
        flex: 0 0 120px;
    }
}

@media (min-width: 600px) {
    .app {
        max-width: 600px;
    }
}

/* ─── Keyframes ─── */
@keyframes fadeIn {
    from { opacity: 0; }
    to   { opacity: 1; }
}

@keyframes fadeOut {
    from { opacity: 1; }
    to   { opacity: 0; }
}

@keyframes slideUp {
    from { opacity: 0; transform: translateY(40px) scale(0.95); }
    to   { opacity: 1; transform: translateY(0)    scale(1);    }
}

/* ─── Utilities ─── */
.hidden {
    display: none !important;
}

/* ═══════════════════════════════════════════════════
   Business Lunch — Combo-first Layout
   Tab = combo (es. "Completo")
   Sezioni = portate (Primi, Secondi, Contorni)
   Righe   = articoli
   ═══════════════════════════════════════════════════ */

/* ── Combo header card ─────────────────────────────── */
.bl-combo-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    background: linear-gradient(135deg, var(--red) 0%, var(--red-alt) 100%);
    border-radius: var(--radius-lg);
    padding: 16px 18px;
    margin-bottom: 20px;
    box-shadow: var(--shadow-red);
    color: white;
}

.bl-combo-meta {
    flex: 1;
    min-width: 0;
}

.bl-combo-name {
    font-size: 1.25rem;
    font-weight: 800;
    color: white;
    line-height: 1.2;
    margin-bottom: 4px;
}

.bl-combo-desc {
    font-size: 0.75rem;
    color: rgba(255,255,255,0.80);
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.bl-combo-price {
    flex: 0 0 auto;
    font-size: 1.5rem;
    font-weight: 800;
    color: white;
    background: rgba(255,255,255,0.18);
    border-radius: var(--radius-md);
    padding: 6px 14px;
    letter-spacing: -0.02em;
    backdrop-filter: blur(4px);
    white-space: nowrap;
}

@media (max-width: 400px) {
    .bl-combo-header {
        padding: 12px 14px;
        gap: 10px;
    }
    .bl-combo-name {
        font-size: 1.1rem !important;
    }
    .bl-combo-price {
        font-size: 1.25rem;
        padding: 4px 10px;
    }
}

/* ── Course group section ──────────────────────────── */
.bl-group-section {
    margin-bottom: 18px;
}

.bl-group-section:last-child {
    margin-bottom: 0;
}

.bl-group-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 10px;
    padding: 0 2px;
}

.bl-group-title {
    font-size: 0.80rem;
    font-weight: 800;
    color: var(--text-dark);
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

.bl-group-hint {
    font-size: 0.65rem;
    font-weight: 600;
    color: var(--red);
    background: rgba(225,6,0,0.08);
    border: 1px solid rgba(225,6,0,0.20);
    border-radius: var(--radius-full);
    padding: 3px 10px;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    white-space: nowrap;
}

/* ── Item list container ───────────────────────────── */
.bl-item-list {
    display: flex;
    flex-direction: column;
    background: var(--white);
    border: 1.5px solid var(--border);
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
}

/* ── Single item row ───────────────────────────────── */
.bl-item-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 13px 16px;
    border-bottom: 1px solid var(--border);
    transition: background 0.16s ease;
}

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

.bl-item-row:hover {
    background: var(--pink-light);
}

.bl-item-info {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 3px;
}

.bl-item-name {
    font-size: 0.88rem;
    font-weight: 700;
    color: var(--text-dark);
    line-height: 1.3;
}

.bl-item-allergens {
    font-size: 0.82rem;
    color: var(--text-light);
    line-height: 1.3;
    white-space: normal;
    word-wrap: break-word;
    text-transform: uppercase;
    letter-spacing: 0.02em;
}

.bl-item-price {
    flex: 0 0 auto;
    font-size: 0.88rem;
    font-weight: 800;
    color: var(--red);
    white-space: nowrap;
}

/* ── Empty state ───────────────────────────────────── */
.bl-empty {
    text-align: center;
    color: var(--text-light);
    font-size: 0.85rem;
    padding: 20px 16px;
}

.drinks-category-header {
    grid-column: 1 / -1;
    font-size: 1.1rem;
    font-weight: 700;
    margin: 2rem 0 1rem;
    color: #ffffff;
    background-color: var(--primary-color, #E10600);
    text-transform: uppercase;
    text-align: center;
    border-radius: 8px;
    padding: 0.75rem 1rem;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}
