/*
Theme Name: QlickMenu Theme
Theme URI: https://qlickmenu.it
Author: Fabio (FC Magazine)
Description: Tema dedicato per la piattaforma QlickMenu — menù digitali via QR code. Delivery style, mobile-first.
Version: 0.2.0
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: qlickmenu
Requires at least: 6.0
Requires PHP: 7.4
*/

/* -------------------------------------------------------------------------- */
/*  Reset base                                                                */
/* -------------------------------------------------------------------------- */

*, *::before, *::after { box-sizing: border-box; }

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

body {
    margin: 0;
    font-family: var(--qm-body-font, "Inter"), -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    line-height: 1.5;
    color: var(--qm-text, #1a1a1a);
    background: var(--qm-bg, #ffffff);
    -webkit-font-smoothing: antialiased;
    font-feature-settings: "ss01","ss02","cv01";
}

img { max-width: 100%; height: auto; display: block; }
a { color: var(--qm-accent, #ff5722); text-decoration: none; }
a:hover { text-decoration: underline; }

/* -------------------------------------------------------------------------- */
/*  Variabili tema — 4 varianti cromatiche                                    */
/*  Layout identico, cambiano solo colori                                     */
/* -------------------------------------------------------------------------- */

:root {
    --qm-bg: #ffffff;
    --qm-surface: #ffffff;
    --qm-surface-2: #fafafa;
    --qm-text: #1a1a1a;
    --qm-text-soft: #6b7280;
    --qm-accent: #ff5722;
    --qm-accent-2: #ff9800;
    --qm-accent-soft: #fff4ec;
    --qm-badge-hot: #ff5722;
    --qm-badge-veg: #4caf50;
    --qm-border: #eeeeee;
    --qm-radius: 14px;
    --qm-radius-sm: 10px;
    --qm-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
    --qm-shadow-hover: 0 8px 24px rgba(0, 0, 0, 0.10);
    --qm-body-font: "Inter";
    --qm-heading-font: "Inter";
    --qm-badge-text: #ffffff;
}

/* I colori/font di ciascuno dei 20 temi sono iniettati inline nell'head da
   qm_output_active_theme_vars() (functions.php), a partire dal catalogo
   qm_get_theme_catalog() — così non serve un blocco statico per ogni tema
   qui in stylesheet. Il :root sopra resta come fallback (= tema "vivace"). */

/* -------------------------------------------------------------------------- */
/*  Layout pagina                                                             */
/* -------------------------------------------------------------------------- */

.qm-page { max-width: 720px; margin: 0 auto; padding: 0 0 80px; background: var(--qm-bg); min-height: 100vh; }

/* -------------------------------------------------------------------------- */
/*  Header (delivery style)                                                   */
/*  Cover hero + overlay + card info sotto                                    */
/* -------------------------------------------------------------------------- */

.qm-header { position: relative; }

.qm-cover {
    position: relative;
    height: 220px;
    overflow: hidden;
    background: linear-gradient(135deg, var(--qm-accent) 0%, var(--qm-accent-2) 100%);
}
.qm-cover img { width: 100%; height: 100%; object-fit: cover; position: relative; z-index: 1; }
.qm-cover-fx { position: absolute; inset: 0; width: 100%; height: 100%; z-index: 1; opacity: 0.35; }
.qm-cover-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, rgba(0,0,0,0.1) 0%, rgba(0,0,0,0.5) 100%);
    z-index: 2;
    pointer-events: none;
}

/* Language switcher */
.qm-lang-switcher {
    position: absolute;
    top: 14px;
    right: 14px;
    z-index: 5;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(6px);
    border-radius: 999px;
    padding: 3px;
    display: flex;
    gap: 2px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}
.qm-lang-btn {
    display: inline-flex;
    padding: 6px 12px;
    border-radius: 999px;
    color: var(--qm-text-soft) !important;
    font-weight: 700;
    font-size: 12px;
    letter-spacing: 0.5px;
    text-decoration: none !important;
}
.qm-lang-btn.active {
    background: var(--qm-accent);
    color: #fff !important;
}

/* Card info sotto la cover */
.qm-header-content {
    position: relative;
    z-index: 3;
    padding: 24px 20px 22px;
    margin-top: -40px;
    background: var(--qm-surface);
    border-radius: 24px 24px 0 0;
    text-align: left;
}

.qm-logo {
    width: 68px; height: 68px;
    border-radius: 18px;
    margin: -50px 0 14px;
    border: 4px solid var(--qm-surface);
    background: var(--qm-surface);
    overflow: hidden;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.12);
}
.qm-logo img { width: 100%; height: 100%; object-fit: cover; }

.qm-title {
    font-family: var(--qm-heading-font);
    font-size: 26px;
    font-weight: 800;
    margin: 0 0 6px;
    letter-spacing: -0.02em;
    line-height: 1.15;
    color: var(--qm-text);
}
.qm-title::after { display: none; }

.qm-motto {
    font-size: 14px;
    color: var(--qm-text-soft);
    margin: 0 0 14px;
    line-height: 1.4;
}

.qm-tipi {
    display: flex; flex-wrap: wrap; gap: 6px;
    margin: 0 0 14px;
}
.qm-tipo {
    display: inline-block;
    padding: 4px 10px;
    background: var(--qm-accent-soft);
    color: var(--qm-accent);
    border-radius: 999px;
    font-size: 12px;
    font-weight: 700;
}

.qm-descrizione {
    color: var(--qm-text-soft);
    font-size: 14px;
    line-height: 1.55;
    margin: 4px 0 16px;
}

/* Contatti rapidi (pill buttons) */
.qm-actions {
    display: flex; flex-wrap: wrap; gap: 8px;
    margin: 4px 0 0;
}
.qm-action {
    display: inline-flex; align-items: center; gap: 6px;
    padding: 10px 16px;
    background: var(--qm-accent);
    color: #fff !important;
    border-radius: 999px;
    font-size: 13px;
    font-weight: 700;
    text-decoration: none !important;
    box-shadow: 0 2px 6px rgba(255,87,34,0.25);
    transition: transform 0.15s ease, box-shadow 0.15s ease;
}
.qm-action:hover { transform: translateY(-1px); box-shadow: 0 4px 12px rgba(255,87,34,0.35); }
.qm-action.qm-action-soft {
    background: var(--qm-surface-2);
    color: var(--qm-text) !important;
    border: 1px solid var(--qm-border);
    box-shadow: none;
}
.qm-action.qm-action-soft:hover { background: var(--qm-accent-soft); border-color: var(--qm-accent); color: var(--qm-accent) !important; }

/* -------------------------------------------------------------------------- */
/*  Nav sticky categorie                                                      */
/* -------------------------------------------------------------------------- */

.qm-nav {
    position: sticky; top: 0;
    background: var(--qm-surface);
    border-bottom: 1px solid var(--qm-border);
    z-index: 10;
    padding: 10px 16px;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    white-space: nowrap;
    scrollbar-width: none;
}
.qm-nav::-webkit-scrollbar { display: none; }
.qm-nav a {
    display: inline-block;
    padding: 8px 16px;
    margin-right: 6px;
    color: var(--qm-text-soft) !important;
    background: var(--qm-surface-2);
    border-radius: 999px;
    font-size: 13px;
    font-weight: 700;
    text-decoration: none !important;
    transition: background 0.15s ease, color 0.15s ease;
}
.qm-nav a:hover, .qm-nav a.active {
    background: var(--qm-accent);
    color: #fff !important;
}

/* -------------------------------------------------------------------------- */
/*  Sezione + categoria                                                       */
/* -------------------------------------------------------------------------- */

.qm-section {
    padding: 20px 16px 6px;
    /* Compensa l'altezza della nav sticky quando si clicca una categoria,
       altrimenti l'ancora finisce nascosta sotto la nav (position: sticky). */
    scroll-margin-top: 62px;
}
.qm-section-title {
    font-family: var(--qm-heading-font);
    font-size: 20px;
    font-weight: 800;
    margin: 0 0 14px;
    color: var(--qm-text);
    letter-spacing: -0.01em;
}
.qm-cat-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 6px;
}
.qm-cat-icona {
    width: 40px; height: 40px;
    display: flex; align-items: center; justify-content: center;
    background: var(--qm-accent-soft);
    color: var(--qm-accent);
    border-radius: 12px;
    flex-shrink: 0;
}
.qm-cat-icona img { width: 100%; height: 100%; object-fit: cover; border-radius: 12px; }
.qm-cat-icon-svg { width: 22px; height: 22px; }
.qm-cat-icon-svg svg { width: 100%; height: 100%; }
.qm-cat-title {
    margin: 0 !important;
    padding: 0 !important;
    border: none !important;
    font-size: 22px !important;
}
.qm-cat-desc {
    color: var(--qm-text-soft);
    font-size: 13px;
    margin: 2px 0 8px;
}

/* -------------------------------------------------------------------------- */
/*  Piatti in evidenza (slider orizzontale)                                   */
/* -------------------------------------------------------------------------- */

.qm-featured {
    padding: 22px 16px 8px;
}
.qm-featured .qm-section-title { display: flex; align-items: center; gap: 8px; }
.qm-featured .qm-section-title::before {
    content: "★";
    color: var(--qm-accent);
    font-size: 22px;
}
.qm-featured-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 12px;
    margin-top: 12px;
}

/* -------------------------------------------------------------------------- */
/*  Prodotti — delivery card style                                            */
/*  Layout orizzontale: foto sinistra grande + body + prezzo destra           */
/* -------------------------------------------------------------------------- */

.qm-prodotti-grid,
.qm-prodotti-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-top: 14px;
}

.qm-prodotto {
    background: var(--qm-surface);
    border-radius: var(--qm-radius);
    box-shadow: var(--qm-shadow);
    overflow: hidden;
    cursor: pointer;
    display: grid;
    grid-template-columns: 96px 1fr auto;
    gap: 12px;
    padding: 12px;
    align-items: center;
    transition: transform 0.15s ease, box-shadow 0.15s ease;
    border: 1px solid var(--qm-border);
}
.qm-prodotto:hover {
    transform: translateY(-2px);
    box-shadow: var(--qm-shadow-hover);
    border-color: var(--qm-accent);
}

.qm-prodotto-img {
    width: 96px; height: 96px;
    border-radius: var(--qm-radius-sm);
    overflow: hidden;
    background: linear-gradient(135deg, var(--qm-accent-soft), var(--qm-surface-2));
    position: relative;
    flex-shrink: 0;
}
.qm-prodotto-img img {
    width: 100%; height: 100%; object-fit: cover;
}
.qm-prodotto.qm-no-img { grid-template-columns: 1fr auto; }
.qm-prodotto.qm-no-img .qm-prodotto-img { display: none; }

.qm-featured-badge {
    position: absolute;
    top: 6px; left: 6px;
    background: var(--qm-badge-hot);
    color: var(--qm-badge-text, #fff);
    padding: 3px 8px;
    border-radius: 6px;
    font-size: 10px;
    font-weight: 800;
    letter-spacing: 0.5px;
    text-transform: uppercase;
}

.qm-prodotto-body { min-width: 0; }
.qm-prodotto-header {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 10px;
    min-width: 0;
}
.qm-prodotto-header .qm-prodotto-title { margin: 0; min-width: 0; }
.qm-prodotto-header .qm-prodotto-prezzo { flex-shrink: 0; align-self: baseline; }
.qm-prodotto-title {
    font-family: var(--qm-heading-font);
    font-weight: 700;
    font-size: 15px;
    line-height: 1.2;
    color: var(--qm-text);
    margin: 0 0 4px;
    letter-spacing: -0.01em;
}
.qm-prodotto-star {
    color: var(--qm-accent);
    margin-left: 4px;
    font-size: 12px;
}
.qm-prodotto-desc {
    font-size: 12px;
    color: var(--qm-text-soft);
    line-height: 1.4;
    margin: 0;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.qm-badges {
    display: flex; flex-wrap: wrap; gap: 4px;
    margin-top: 6px;
}
.qm-badge {
    font-size: 10px;
    padding: 2px 7px;
    border-radius: 4px;
    font-weight: 700;
    letter-spacing: 0.3px;
    text-transform: uppercase;
}
.qm-badge.qm-badge-veg { background: #dcfce7; color: #15803d; }
.qm-badge.qm-badge-vegan { background: #bbf7d0; color: #14532d; }
.qm-badge.qm-badge-piccante { background: #fee2e2; color: #b91c1c; }
.qm-badge.qm-badge-durata { background: #e0e7ff; color: #3730a3; }
.qm-badge.qm-badge-appt { background: #fef3c7; color: #78350f; }

.qm-prodotto-prezzo {
    font-family: var(--qm-heading-font);
    font-weight: 800;
    font-size: 18px;
    color: var(--qm-accent);
    white-space: nowrap;
    align-self: center;
    text-align: right;
}
.qm-prezzo-scontato {
    color: var(--qm-text-soft);
    text-decoration: line-through;
    font-weight: 500;
    font-size: 13px;
    margin-right: 4px;
    display: block;
}
.qm-prezzo-unita {
    font-size: 11px;
    font-weight: 600;
    color: var(--qm-text-soft);
    display: block;
    margin-top: 2px;
    text-transform: none;
    letter-spacing: 0;
}

/* Prodotto non disponibile */
.qm-prodotto.qm-non-disponibile { opacity: 0.45; }
.qm-prodotto.qm-non-disponibile::after {
    content: "Non disponibile";
    position: absolute;
    top: 8px; right: 8px;
    background: #dc2626; color: #fff;
    padding: 2px 8px; border-radius: 4px; font-size: 10px; font-weight: 700;
}

/* -------------------------------------------------------------------------- */
/*  Dettaglio modal                                                           */
/* -------------------------------------------------------------------------- */

.qm-prodotto-detail { display: none; }
.qm-modal {
    position: fixed; inset: 0;
    background: rgba(0, 0, 0, 0.6);
    display: none;
    align-items: flex-end;
    justify-content: center;
    z-index: 100;
}
.qm-modal.open { display: flex; }
.qm-modal-body {
    background: var(--qm-surface);
    width: 100%;
    max-width: 500px;
    max-height: 90vh;
    border-radius: 24px 24px 0 0;
    overflow-y: auto;
    padding: 20px;
    animation: qm-slide-up 0.28s cubic-bezier(0.16, 1, 0.3, 1);
}
@keyframes qm-slide-up { from { transform: translateY(30px); opacity: 0; } to { transform: translateY(0); opacity: 1; } }
.qm-modal-close {
    background: var(--qm-surface-2);
    border: none;
    float: right;
    font-size: 22px;
    cursor: pointer;
    padding: 4px 10px;
    border-radius: 999px;
    color: var(--qm-text-soft);
}
.qm-modal-img { width: 100%; aspect-ratio: 16/9; object-fit: cover; border-radius: 14px; margin: 12px 0; }
.qm-modal-allergeni {
    margin-top: 14px;
    padding: 12px 14px;
    background: var(--qm-surface-2);
    border-radius: 10px;
    font-size: 13px;
    color: var(--qm-text-soft);
}
.qm-modal-allergeni strong { color: var(--qm-text); }

/* -------------------------------------------------------------------------- */
/*  Foto locale (strip / button + lightbox)                                   */
/* -------------------------------------------------------------------------- */

.qm-photo-section { padding: 22px 16px 8px; }
.qm-photo-section .qm-section-title {
    display: flex; align-items: center; gap: 8px;
    font-size: 20px;
}
.qm-inline-icon { display: inline-flex; color: var(--qm-accent); }
.qm-inline-icon svg { width: 22px; height: 22px; }

.qm-photo-strip {
    display: flex; gap: 10px;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scroll-snap-type: x mandatory;
    padding-bottom: 6px;
    scrollbar-width: none;
    margin-top: 4px;
}
.qm-photo-strip::-webkit-scrollbar { display: none; }
.qm-photo-tile {
    flex: 0 0 auto;
    width: 200px; height: 130px;
    border-radius: var(--qm-radius);
    overflow: hidden;
    scroll-snap-align: start;
    cursor: pointer;
    box-shadow: var(--qm-shadow);
    text-decoration: none !important;
}
.qm-photo-tile img { width: 100%; height: 100%; object-fit: cover; display: block; }

.qm-photo-section-button { padding: 16px 20px 24px; text-align: center; }
.qm-photo-open-btn {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 12px 20px;
    background: var(--qm-accent-soft);
    color: var(--qm-accent);
    border: none;
    border-radius: 999px;
    font-family: inherit;
    font-size: 14px;
    font-weight: 700;
    cursor: pointer;
}
.qm-photo-open-btn:hover { background: var(--qm-accent); color: #fff; }
.qm-photo-count {
    background: rgba(0,0,0,0.15);
    padding: 2px 8px;
    border-radius: 999px;
    font-size: 11px;
    font-weight: 800;
}

/* Modal galleria */
.qm-gallery-modal {
    position: fixed; inset: 0;
    background: rgba(0, 0, 0, 0.92);
    z-index: 200;
    display: none;
    align-items: center;
    justify-content: center;
}
.qm-gallery-modal.open { display: flex; }
.qm-gallery-viewport {
    position: relative;
    width: 100%; height: 100%;
    display: flex; align-items: center; justify-content: center;
    padding: 40px;
}
.qm-gallery-slide {
    max-width: 100%; max-height: 100%;
    object-fit: contain;
    display: none;
    border-radius: 10px;
}
.qm-gallery-slide.active { display: block; }
.qm-gallery-close, .qm-gallery-prev, .qm-gallery-next {
    position: absolute;
    background: rgba(255, 255, 255, 0.15);
    color: #fff;
    border: none;
    cursor: pointer;
    width: 44px; height: 44px;
    border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    font-size: 26px;
    line-height: 1;
}
.qm-gallery-close { top: 16px; right: 16px; }
.qm-gallery-prev  { left: 16px; top: 50%; transform: translateY(-50%); font-size: 32px; }
.qm-gallery-next  { right: 16px; top: 50%; transform: translateY(-50%); font-size: 32px; }
.qm-gallery-counter {
    position: absolute;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    color: #fff;
    background: rgba(0, 0, 0, 0.5);
    padding: 6px 14px;
    border-radius: 999px;
    font-size: 13px;
    font-weight: 600;
}

/* -------------------------------------------------------------------------- */
/*  Orari + Coperto                                                           */
/* -------------------------------------------------------------------------- */

.qm-orari {
    max-width: 360px;
    margin: 0 auto;
    background: var(--qm-surface-2);
    border-radius: var(--qm-radius);
    padding: 6px 16px;
}
.qm-orari-row {
    display: flex; justify-content: space-between;
    padding: 8px 0;
    border-bottom: 1px solid var(--qm-border);
    font-size: 14px;
}
.qm-orari-row:last-child { border-bottom: none; }
.qm-orari-day { font-weight: 700; color: var(--qm-text); }
.qm-orari-time { color: var(--qm-text-soft); }
.qm-orari-time.qm-chiuso { color: #dc2626; font-weight: 500; }

.qm-coperto {
    max-width: 360px;
    margin: 16px auto 0;
    padding: 12px 18px;
    background: var(--qm-surface);
    border: 1px solid var(--qm-border);
    border-radius: var(--qm-radius);
    display: flex;
    align-items: baseline;
    gap: 10px;
    justify-content: center;
    text-align: center;
    font-size: 13px;
    flex-wrap: wrap;
}
.qm-coperto-label { font-weight: 700; color: var(--qm-text); }
.qm-coperto-value { color: var(--qm-accent); font-weight: 800; font-size: 15px; }
.qm-coperto-note { color: var(--qm-text-soft); font-size: 12px; flex-basis: 100%; margin-top: 2px; }

/* -------------------------------------------------------------------------- */
/*  Footer                                                                    */
/* -------------------------------------------------------------------------- */

.qm-footer {
    padding: 30px 20px;
    text-align: center;
    color: var(--qm-text-soft);
    font-size: 13px;
    border-top: 1px solid var(--qm-border);
    margin-top: 30px;
}
.qm-social {
    display: flex; justify-content: center; gap: 10px;
    margin: 0 0 16px;
}
.qm-social a {
    display: inline-flex; align-items: center; justify-content: center;
    width: 42px; height: 42px;
    border-radius: 50%;
    background: var(--qm-accent-soft);
    color: var(--qm-accent);
    text-decoration: none !important;
    transition: transform 0.15s ease;
}
.qm-social a:hover { transform: translateY(-2px); }

/* -------------------------------------------------------------------------- */
/*  Empty state                                                               */
/* -------------------------------------------------------------------------- */

.qm-empty {
    text-align: center;
    padding: 40px 20px;
    color: var(--qm-text-soft);
    font-style: italic;
}

/* -------------------------------------------------------------------------- */
/*  Micro-animazioni                                                          */
/* -------------------------------------------------------------------------- */

@keyframes qm-slide-in-up {
    from { opacity: 0; transform: translateY(16px); }
    to   { opacity: 1; transform: translateY(0); }
}
.qm-section, .qm-featured, .qm-photo-section {
    animation: qm-slide-in-up 0.4s cubic-bezier(0.16, 1, 0.3, 1) both;
}
.qm-section:nth-child(2) { animation-delay: 0.05s; }
.qm-section:nth-child(3) { animation-delay: 0.1s; }
.qm-section:nth-child(4) { animation-delay: 0.15s; }
.qm-header-content > * {
    animation: qm-slide-in-up 0.5s cubic-bezier(0.16, 1, 0.3, 1) both;
}
.qm-motto  { animation-delay: 0.05s; }
.qm-tipi   { animation-delay: 0.1s; }
.qm-actions{ animation-delay: 0.15s; }

@media (prefers-reduced-motion: reduce) {
    .qm-section, .qm-featured, .qm-photo-section, .qm-header-content > * { animation: none; }
    .qm-prodotto:hover { transform: none; }
}

/* -------------------------------------------------------------------------- */
/*  Responsive                                                                */
/* -------------------------------------------------------------------------- */

@media (max-width: 480px) {
    .qm-prodotto {
        grid-template-columns: 80px 1fr auto;
        gap: 10px;
        padding: 10px;
    }
    .qm-prodotto-img { width: 80px; height: 80px; }
    .qm-prodotto-prezzo { font-size: 16px; }
    .qm-title { font-size: 22px; }
    .qm-cover { height: 180px; }
}

/* -------------------------------------------------------------------------- */
/*  Tablet / desktop                                                          */
/*  Il layout resta mobile-first, ma su schermi larghi evita l'effetto        */
/*  "telefono incollato al centro di uno schermo enorme": più respiro,        */
/*  colonna più larga e prodotti in griglia multi-colonna.                   */
/* -------------------------------------------------------------------------- */

@media (min-width: 640px) {
    .qm-page { max-width: 900px; }
    .qm-cover { height: 280px; }

    /* Card prodotto: righe orizzontali (foto+testo+prezzo) che riempiono
       tutta la larghezza della colonna — niente griglia a più colonne,
       altrimenti con 1-2 prodotti per categoria restano card strette
       con un vuoto a destra. */
    .qm-prodotto { padding: 14px 16px; gap: 16px; }
    .qm-prodotto-img { width: 108px; height: 108px; }

    .qm-nav { padding-left: 32px; padding-right: 32px; }
}

@media (min-width: 1024px) {
    .qm-page { max-width: 1140px; }
    .qm-cover { height: 340px; }

    .qm-header-content,
    .qm-section,
    .qm-photo-section,
    .qm-photo-section-button,
    .qm-footer {
        padding-left: 48px;
        padding-right: 48px;
    }
    .qm-nav { padding-left: 48px; padding-right: 48px; }

    .qm-prodotto {
        grid-template-columns: 120px 1fr auto;
        padding: 16px 20px;
        gap: 20px;
    }
    .qm-prodotto-img { width: 120px; height: 120px; }
    .qm-prodotto-title { font-size: 17px; }
    .qm-prodotto-desc { font-size: 13px; -webkit-line-clamp: 3; }
    .qm-prodotto-prezzo { font-size: 20px; }

    .qm-title { font-size: 32px; }
    .qm-logo { width: 84px; height: 84px; }

    .qm-orari,
    .qm-coperto { max-width: 480px; }
}

/* -------------------------------------------------------------------------- */
/*  Layout Premium                                                            */
/*  I 20 temi condividono lo stesso markup HTML (single-menu_locale.php):     */
/*  a cambiare qui è solo la struttura CSS in base a body.qm-layout-{nome},   */
/*  mentre i colori/font arrivano dalle CSS variable del tema (qm-tema-X).    */
/*  "delivery" è il layout originale e non ha bisogno di override: le regole  */
/*  di base più sopra in questo file SONO il layout delivery.                */
/* -------------------------------------------------------------------------- */

/* ---- trattoria: niente foto, editoriale calda, divisori tratteggiati ---- */
body.qm-layout-trattoria .qm-prodotti-grid,
body.qm-layout-trattoria .qm-prodotti-list,
body.qm-layout-trattoria .qm-featured-grid { gap: 0; }
body.qm-layout-trattoria .qm-prodotto-img { display: none; }
body.qm-layout-trattoria .qm-prodotto {
    grid-template-columns: 1fr auto;
    background: transparent;
    box-shadow: none;
    border: none;
    border-bottom: 1px dashed var(--qm-border);
    border-radius: 0;
    padding: 16px 2px;
}
body.qm-layout-trattoria .qm-prodotto:hover { transform: none; border-color: var(--qm-accent); }
body.qm-layout-trattoria .qm-prodotto-title { font-weight: 600; font-size: 16px; }
body.qm-layout-trattoria .qm-prodotto-prezzo { font-weight: 600; font-size: 16px; }
body.qm-layout-trattoria .qm-cat-header { flex-direction: column; text-align: center; gap: 2px; }
body.qm-layout-trattoria .qm-cat-icona { display: none; }
body.qm-layout-trattoria .qm-section-title,
body.qm-layout-trattoria .qm-cat-title { font-style: italic; font-weight: 600; }
body.qm-layout-trattoria .qm-featured .qm-section-title::before { display: none; }
body.qm-layout-trattoria .qm-nav a { font-style: italic; }
body.qm-layout-trattoria .qm-header-content,
body.qm-layout-trattoria .qm-tipi,
body.qm-layout-trattoria .qm-actions { text-align: center; justify-content: center; }
body.qm-layout-trattoria .qm-logo { margin-left: auto; margin-right: auto; }
body.qm-layout-trattoria .qm-cover { height: 130px; }

/* ---- fine: dark elegante, letter-spacing ampio, minimal ---- */
body.qm-layout-fine .qm-prodotti-grid,
body.qm-layout-fine .qm-prodotti-list,
body.qm-layout-fine .qm-featured-grid { gap: 0; }
body.qm-layout-fine .qm-prodotto-img { display: none; }
body.qm-layout-fine .qm-prodotto {
    grid-template-columns: 1fr auto;
    background: transparent;
    box-shadow: none;
    border: none;
    border-bottom: 1px solid var(--qm-border);
    border-radius: 0;
    padding: 18px 2px;
}
body.qm-layout-fine .qm-prodotto:hover { transform: none; border-color: var(--qm-accent); }
body.qm-layout-fine .qm-prodotto-title { letter-spacing: 0.02em; }
body.qm-layout-fine .qm-title { letter-spacing: 0.04em; text-transform: uppercase; }
body.qm-layout-fine .qm-section-title,
body.qm-layout-fine .qm-cat-title {
    letter-spacing: 0.12em;
    text-transform: uppercase;
    font-size: 14px;
    font-weight: 600;
}
body.qm-layout-fine .qm-cat-header { flex-direction: column; text-align: center; }
body.qm-layout-fine .qm-cat-icona { display: none; }
body.qm-layout-fine .qm-nav a {
    text-transform: uppercase;
    font-size: 11px;
    letter-spacing: 0.08em;
    background: transparent;
    border: 1px solid var(--qm-border);
}
body.qm-layout-fine .qm-nav a.active,
body.qm-layout-fine .qm-nav a:hover { background: var(--qm-accent); color: var(--qm-badge-text, #fff); border-color: var(--qm-accent); }
body.qm-layout-fine .qm-action { border-radius: 3px; }
body.qm-layout-fine .qm-header-content,
body.qm-layout-fine .qm-tipi,
body.qm-layout-fine .qm-actions { text-align: center; justify-content: center; }
body.qm-layout-fine .qm-logo { margin-left: auto; margin-right: auto; border-radius: 50%; }
body.qm-layout-fine .qm-cover { height: 160px; }

/* ---- card: foto in alto, griglia colorata, playful ---- */
body.qm-layout-card .qm-prodotti-grid,
body.qm-layout-card .qm-prodotti-list,
body.qm-layout-card .qm-featured-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
}
body.qm-layout-card .qm-prodotto {
    grid-template-columns: 1fr;
    padding: 0 0 12px;
    align-content: start;
}
body.qm-layout-card .qm-prodotto-img {
    width: 100%;
    height: 120px;
    border-radius: var(--qm-radius) var(--qm-radius) 0 0;
}
body.qm-layout-card .qm-prodotto-body { padding: 10px 12px 0; }
body.qm-layout-card .qm-prodotto.qm-no-img .qm-prodotto-body { padding-top: 14px; }
body.qm-layout-card .qm-cat-header { justify-content: center; text-align: center; flex-direction: column; }
body.qm-layout-card .qm-section-title { text-align: center; }
body.qm-layout-card .qm-nav a { border-radius: 999px; font-weight: 700; }
@media (min-width: 1024px) {
    body.qm-layout-card .qm-prodotti-grid,
    body.qm-layout-card .qm-prodotti-list,
    body.qm-layout-card .qm-featured-grid { grid-template-columns: repeat(3, 1fr); }
}

/* ---- ledger: lista tipografica minimal, divisore puntinato ---- */
body.qm-layout-ledger .qm-prodotti-grid,
body.qm-layout-ledger .qm-prodotti-list,
body.qm-layout-ledger .qm-featured-grid { gap: 0; }
body.qm-layout-ledger .qm-prodotto-img { display: none; }
body.qm-layout-ledger .qm-prodotto {
    grid-template-columns: 1fr auto;
    background: transparent;
    box-shadow: none;
    border: none;
    border-bottom: 1px dotted var(--qm-border);
    border-radius: 0;
    padding: 12px 2px;
}
body.qm-layout-ledger .qm-prodotto:hover { transform: none; border-color: var(--qm-accent); }
body.qm-layout-ledger .qm-prodotto-title { font-weight: 500; }
body.qm-layout-ledger .qm-prodotto-prezzo { font-weight: 700; font-variant-numeric: tabular-nums; }
body.qm-layout-ledger .qm-cat-icona { display: none; }
body.qm-layout-ledger .qm-section-title,
body.qm-layout-ledger .qm-cat-title {
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    font-size: 14px;
}
body.qm-layout-ledger .qm-nav a {
    border-radius: 3px;
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}
body.qm-layout-ledger .qm-badge { border-radius: 2px; }

/* -------------------------------------------------------------------------- */
/*  Stampa / PDF                                                              */
/*  Attivata sia dal comando di stampa del browser sia dal tasto "Stampa      */
/*  menù in PDF" della dashboard (apre il menù pubblico e lancia print()).   */
/*  Sovrascrivere le CSS variable basta a "schiarire" anche il tema Notte,   */
/*  perché tutti i componenti leggono i colori da lì.                        */
/* -------------------------------------------------------------------------- */

@media print {
    @page { margin: 14mm; }

    /* !important necessario: le variabili del tema attivo arrivano da uno
       <style> inline nell'head (qm_output_active_theme_vars), stampato DOPO
       questo foglio e con selettore "body.qm-tema-X" più specifico di "body"
       — senza !important vincerebbe sempre lui, anche in stampa. Con 20 temi
       possibili non elenchiamo le classi una per una: !important + "body"
       copre tutti, presenti e futuri. */
    body {
        --qm-bg: #ffffff !important;
        --qm-surface: #ffffff !important;
        --qm-surface-2: #f6f6f6 !important;
        --qm-text: #111111 !important;
        --qm-text-soft: #444444 !important;
        --qm-border: #dddddd !important;
        --qm-badge-text: #ffffff !important;
        --qm-shadow: none !important;
        --qm-shadow-hover: none !important;
    }

    .qm-page { max-width: none !important; margin: 0 !important; padding: 0 0 20px !important; }

    /* Elementi interattivi/non utili su carta */
    .qm-lang-switcher,
    .qm-nav,
    .qm-actions,
    .qm-photo-section,
    .qm-photo-section-button,
    .qm-gallery-modal,
    .qm-modal,
    .qm-social {
        display: none !important;
    }

    .qm-cover { height: 140px; }
    .qm-cover-overlay { background: rgba(0,0,0,0.25); }

    .qm-prodotto {
        box-shadow: none !important;
        border: 1px solid var(--qm-border);
        break-inside: avoid;
    }
    .qm-section { break-inside: avoid-page; animation: none !important; }
    .qm-header-content > * { animation: none !important; }

    .qm-empty, .qm-footer { break-inside: avoid; }
}
