:root{
  --bg:#f6f7fb;
  --surface:#ffffff;
  --surface-soft:#f2f5fb;
  --line:#e5eaf3;
  --text:#172033;
  --muted:#6e7890;
  --primary:#2f6bff;
  --primary-dark:#2556cd;
  --success-bg:#e7f8ee;
  --success-text:#157347;
  --error-bg:#fbe9ec;
  --error-text:#b42318;
  --shadow:0 10px 30px rgba(20,32,51,.08);
  --radius:18px;
}
*{box-sizing:border-box}
html,body{margin:0;padding:0}
body{
  font-family:var(--font-body, Inter, Segoe UI, Roboto, Arial, sans-serif);
  color:var(--text);
  background:
    radial-gradient(circle at top right, rgba(47,107,255,.06), transparent 22%),
    linear-gradient(180deg,#fafbfe,#f6f7fb);
}
a{text-decoration:none;color:inherit}
img{display:block;max-width:100%}
button,input,textarea,select{font:inherit}
.menu-title,.menu-category__head h2,.menu-subcategory,.menu-product-title{font-family:var(--font-heading, Inter, Segoe UI, Roboto, Arial, sans-serif)}
.site-wrap{width:min(980px,calc(100% - 20px));margin:0 auto}
.site-header{position:sticky;top:0;z-index:40;background:rgba(255,255,255,.86);backdrop-filter:blur(12px);border-bottom:1px solid rgba(229,234,243,.95)}
.site-header__inner{min-height:62px;display:flex;align-items:center;justify-content:space-between;gap:10px}
.site-brand{font-weight:900;letter-spacing:.03em;font-size:1rem}
.site-nav{display:flex;align-items:center;gap:8px;flex-wrap:wrap}
.site-nav a{color:var(--muted);padding:9px 12px;border-radius:999px}
.site-nav a:hover{background:var(--surface-soft);color:var(--text)}
.cart-pill{min-width:20px;height:20px;padding:0 6px;display:inline-flex;align-items:center;justify-content:center;border-radius:999px;background:var(--primary);color:#fff;font-size:.75rem;font-weight:800}
.page-shell{padding:20px 0 34px}
.menu-page-head{padding:6px 2px 18px}
.menu-eyebrow{display:inline-block;color:var(--primary);font-size:.76rem;font-weight:900;text-transform:uppercase;letter-spacing:.1em;margin-bottom:8px}
.menu-title{margin:0;font-size:clamp(1.9rem,6vw,2.8rem);line-height:1.02}
.menu-subtitle{margin:10px 0 0;color:var(--muted);max-width:640px;line-height:1.55}
.menu-category{margin-bottom:26px}
.menu-category__head{margin-bottom:12px}
.menu-category__head h2{margin:0;font-size:1rem;font-weight:900;color:#4a5670;letter-spacing:.02em}
.menu-category__head p,.menu-subcategory,.menu-empty-inline{color:var(--muted)}
.menu-category__head p{margin:6px 0 0;font-size:.95rem}
.menu-subcategory{margin:16px 0 10px;font-size:.78rem;font-weight:900;text-transform:uppercase;letter-spacing:.12em}
.menu-product-list{display:grid;gap:10px}
.menu-product-card{
  display:grid;
  grid-template-columns:minmax(0,1fr) auto;
  gap:14px;
  align-items:center;
  padding:14px 16px;
  background:var(--surface);
  border:1px solid var(--line);
  border-radius:16px;
  box-shadow:var(--shadow);
}
.menu-product-main{min-width:0}
.menu-product-top{display:grid;grid-template-columns:minmax(0,1fr) auto;gap:14px;align-items:start}
.menu-product-title-wrap{display:flex;align-items:center;gap:8px;min-width:0}
.menu-product-title{margin:0;font-size:1.02rem;font-weight:900;line-height:1.2}
.menu-product-price{font-weight:800;color:#3a4864;white-space:nowrap}
.menu-product-desc{margin:6px 0 0;color:var(--muted);line-height:1.45;font-size:.94rem}
.menu-product-info{position:relative;flex:0 0 auto}
.menu-product-info summary{list-style:none;cursor:pointer;display:flex;align-items:center}
.menu-product-info summary::-webkit-details-marker{display:none}
.menu-info-icon{width:22px;height:22px;display:inline-flex;align-items:center;justify-content:center;color:#75819a}
.menu-info-icon svg{width:20px;height:20px;stroke:currentColor;fill:none;stroke-width:1.7}
.menu-product-info[open] .menu-info-icon{color:var(--primary)}
.menu-product-info__panel{position:absolute;left:0;top:28px;z-index:30;width:min(300px,78vw);padding:12px;background:#fff;border:1px solid var(--line);border-radius:14px;box-shadow:0 18px 44px rgba(20,32,51,.14)}
.menu-product-info__block + .menu-product-info__block{margin-top:10px}
.menu-product-info__block strong{display:block;margin-bottom:4px;font-size:.76rem;letter-spacing:.08em;text-transform:uppercase;color:#55617a}
.menu-product-info__block span{display:block;color:var(--muted);font-size:.92rem;line-height:1.45}
.menu-product-buy{display:flex;gap:8px;align-items:center}
.menu-qty-select{width:72px;height:44px;border:1px solid var(--line);background:#fff;color:var(--text);border-radius:12px;padding:0 8px;font-weight:800;text-align:center}
.menu-buy-btn{height:44px;min-width:96px;padding:0 14px;border:none;border-radius:12px;background:linear-gradient(135deg,var(--primary),var(--primary-dark));color:#fff;font-weight:900;cursor:pointer}
.menu-buy-btn:hover{filter:brightness(.98)}
.btn{border:none;border-radius:14px;min-height:46px;padding:0 16px;font-weight:900;cursor:pointer;transition:.16s ease}
.btn:hover{transform:translateY(-1px)}
.btn-primary{background:linear-gradient(135deg,var(--primary),var(--primary-dark));color:#fff}
.btn-secondary,.btn-light{background:var(--surface-soft);color:var(--text);border:1px solid var(--line)}
.btn-link{background:transparent;color:#c43d4c;border:none;min-height:auto;padding:0}
.front-alert{border-radius:16px;padding:14px 16px;margin-bottom:14px;font-weight:800}
.front-alert--success{background:var(--success-bg);color:var(--success-text)}
.front-alert--error{background:var(--error-bg);color:var(--error-text)}
.front-alert--warning{background:#fff4db;color:#8a5a00}
.empty-state,.cart-card,.summary-card,.checkout-card,.order-status-card{background:var(--surface);border:1px solid var(--line);border-radius:20px;box-shadow:var(--shadow)}
.empty-state{padding:28px 20px;text-align:center}
.cart-layout,.checkout-grid{display:grid;gap:16px;align-items:start}
.cart-layout{grid-template-columns:minmax(0,1fr) 320px}
.checkout-grid{grid-template-columns:minmax(0,1fr) 320px}
.cart-card,.summary-card,.checkout-card,.order-status-card{padding:18px}
.cart-card__header,.checkout-card__header{margin-bottom:14px}
.cart-card__header h2,.checkout-card__header h2,.summary-card h2,.order-status-card h2{margin:0 0 6px}
.cart-table{display:grid;gap:10px}
.cart-row{display:grid;grid-template-columns:minmax(0,1fr) 74px auto 38px;gap:10px;align-items:center;padding:12px;border-radius:14px;background:#fbfcff;border:1px solid var(--line)}
.cart-info strong{display:block;font-size:1rem}
.cart-row__total{font-weight:900;white-space:nowrap}
.remove-btn{width:38px;height:38px;border-radius:12px;border:1px solid #f2c8d0;background:#fff1f3;color:#c43d4c;cursor:pointer;font-weight:900}
.cart-actions{display:grid;gap:10px;margin-top:14px}
.summary-card{display:grid;gap:12px}
.summary-row,.summary-total{display:flex;justify-content:space-between;gap:10px;padding:10px 0;border-bottom:1px solid var(--line)}
.summary-total{border-bottom:none;font-size:1.1rem;font-weight:900}
.cart-summary-sticky,.summary-card.sticky{position:sticky;top:80px}
.secure-box,.checkout-note-box,.cart-total-box{padding:12px 14px;border-radius:14px;background:var(--surface-soft);border:1px solid var(--line)}
.checkout-card{padding:0;overflow:hidden}
.form-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:14px;padding:0 18px 18px}
.form-grid label{display:grid;gap:8px;font-weight:800}
.form-grid label span{font-size:.9rem}
.form-grid input,.form-grid textarea{width:100%;border:1px solid var(--line);background:#fff;color:var(--text);border-radius:14px;padding:12px 14px}
.form-grid .full-width{grid-column:1/-1}
.checkout-submit{padding:0 18px 18px}
.checkout-submit .btn{width:100%}
.order-status-card{max-width:720px;margin:0 auto}
.order-status-number{display:inline-flex;align-items:center;justify-content:center;padding:12px 16px;border-radius:14px;background:#edf3ff;border:1px solid #d8e4ff;font-size:1.15rem;font-weight:900}
.status-pill{display:inline-flex;padding:10px 14px;border-radius:999px;font-size:.84rem;font-weight:900}
.status-pill.ok{background:#e7f8ee;color:#157347}
.status-pill.wait{background:#fff4db;color:#8a5a00}
.order-summary-meta{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px;margin-top:16px}
.order-summary-meta>div{padding:14px;border-radius:14px;background:var(--surface-soft);border:1px solid var(--line)}
.order-summary-meta span{display:block;color:var(--muted);font-size:.76rem;font-weight:900;text-transform:uppercase;letter-spacing:.08em;margin-bottom:6px}
.site-footer{padding:26px 0 34px;color:var(--muted);text-align:center}
@media (max-width:860px){.cart-layout,.checkout-grid{grid-template-columns:1fr}.cart-summary-sticky,.summary-card.sticky{position:static}.menu-product-card{grid-template-columns:1fr}}
@media (max-width:640px){.site-wrap{width:min(100%,calc(100% - 14px))}.form-grid,.order-summary-meta{grid-template-columns:1fr}}
@media (max-width:540px){
  .site-header__inner{min-height:58px}
  .site-brand{font-size:.94rem}
  .site-nav a{padding:8px 10px;font-size:.92rem}
  .cart-row{grid-template-columns:1fr 72px;grid-template-areas:"info remove" "qty total"}
  .cart-row .cart-info{grid-area:info}
  .cart-row .cart-qty{grid-area:qty}
  .cart-row .cart-row__total{grid-area:total}
  .cart-row .remove-btn{grid-area:remove;justify-self:end}
  .menu-product-top{grid-template-columns:1fr}
  .menu-product-price{margin-top:2px}
  .menu-product-buy{width:100%}
  .menu-qty-select{flex:0 0 72px}
  .menu-buy-btn{flex:1 1 auto}
}
@media (max-width: 600px){

  /* TOP LINE: nome + prezzo sulla stessa riga */
  .menu-product-top{
    display:flex !important;
    justify-content:space-between;
    align-items:center;
    gap:10px;
  }

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

  .menu-product-title{
    font-size:0.95rem;
  }

  .menu-product-price{
    font-size:0.9rem;
    font-weight:700;
    white-space:nowrap;
  }

  /* RIDUCI ALTEZZA CARD */
  .menu-product-card{
    padding:10px 12px;
    gap:8px;
  }

  /* NASCONDI DESCRIZIONE SU MOBILE (fondamentale) */
  .menu-product-desc{
    display:none;
  }

  /* BLOCCO AZIONE PIÙ COMPATTO */
  .menu-product-buy{
    margin-top:6px;
  }

  .menu-qty-select{
    height:36px;
    width:60px;
    font-size:0.9rem;
  }

  .menu-buy-btn{
    height:36px;
    font-size:0.9rem;
    padding:0 10px;
  }

  /* ICONA INFO PIÙ PICCOLA */
  .menu-info-icon{
    width:18px;
    height:18px;
  }

}
.btn-checkout{
  width:100%;
  height:52px;
  border:none;
  border-radius:14px;
  background:linear-gradient(135deg,#3b82f6,#2563eb);
  color:#fff;
  font-weight:700;
  font-size:1.05rem;
  cursor:pointer;
  box-shadow:0 6px 18px rgba(37,99,235,0.25);
  transition:all .2s ease;
}

.btn-checkout:hover{
  transform:translateY(-1px);
  box-shadow:0 10px 22px rgba(37,99,235,0.35);
}

.btn-checkout:active{
  transform:scale(0.98);
}
.btn-checkout{
  width:100%;
  min-height:52px;
  display:flex;
  align-items:center;
  justify-content:center;
  border:none;
  border-radius:14px;
  background:linear-gradient(135deg,#3b82f6,#2563eb);
  color:#fff;
  font-weight:700;
  font-size:1.05rem;
  cursor:pointer;
  box-shadow:0 6px 18px rgba(37,99,235,0.25);
  transition:all .2s ease;
  text-decoration:none;
}

.btn-checkout:hover{
  transform:translateY(-1px);
  box-shadow:0 10px 22px rgba(37,99,235,0.35);
  color:#fff;
}

.btn-checkout:active{
  transform:scale(0.98);
}
/* ===== CHECKOUT SPACING FIX ===== */

.checkout-grid{
  gap:28px;
}

/* CARD PRINCIPALE */
.checkout-card{
  padding:26px;
  border-radius:18px;
}

/* TITOLO SEZIONE */
.checkout-card h2{
  margin-bottom:6px;
}

.checkout-card p{
  margin-bottom:18px;
}

/* GRID FORM */
.form-grid{
  gap:16px 18px;
}

/* INPUT PIÙ ARIOSI */
.form-grid input,
.form-grid textarea{
  margin-top:6px;
}

/* BLOCCO NOTE */
.form-grid textarea{
  min-height:110px;
}

/* SPAZIO SOPRA BOTTONE */
.checkout-card button{
  margin-top:22px;
}

/* ===== COLONNA DESTRA ===== */

.summary-card{
  padding:22px;
  border-radius:18px;
}

/* SPAZI INTERNI */
.summary-row{
  padding:10px 0;
}

.summary-total{
  margin-top:12px;
  padding-top:12px;
}

/* BOX INFO PAGAMENTO */
.summary-card .muted-front,
.summary-card div{
  margin-top:10px;
}

/* ===== MOBILE ===== */

@media (max-width: 768px){

  .checkout-grid{
    gap:18px;
  }

  .checkout-card{
    padding:18px;
  }

  .summary-card{
    padding:16px;
  }

  /* bottone full width con più respiro */
  .checkout-card button{
    margin-top:18px;
  }

}

.supplement-toast-action {
    max-width: 1120px;
    margin: -10px auto 18px;
    padding: 0 18px;
}
.supplement-modal[hidden] {
    display: none;
}
.supplement-modal {
    position: fixed;
    inset: 0;
    z-index: 1000;
}
.supplement-modal__overlay {
    position: absolute;
    inset: 0;
    background: rgba(15, 23, 42, .55);
}
.supplement-modal__panel {
    position: relative;
    width: min(560px, calc(100% - 28px));
    max-height: calc(100vh - 40px);
    overflow: auto;
    margin: 36px auto;
    background: #fff;
    border-radius: 22px;
    padding: 24px;
    box-shadow: 0 24px 80px rgba(15, 23, 42, .28);
}
.supplement-modal__close {
    position: absolute;
    top: 12px;
    right: 14px;
    border: 0;
    background: transparent;
    font-size: 30px;
    cursor: pointer;
}
.supplement-list {
    display: grid;
    gap: 12px;
    margin-top: 18px;
}
.supplement-option {
    display: grid;
    grid-template-columns: auto 1fr auto;
    gap: 12px;
    align-items: center;
    padding: 14px;
    border: 1px solid #e5e7eb;
    border-radius: 16px;
    background: #fff;
}
.supplement-option small {
    display: block;
    color: #64748b;
    margin-top: 3px;
}
.supplement-modal__actions {
    display: flex;
    gap: 10px;
    justify-content: flex-end;
    flex-wrap: wrap;
    margin-top: 8px;
}
.cart-supplements {
    margin-top: 4px;
    font-size: 13px;
    color: #64748b;
}
body.modal-open {
    overflow: hidden;
}

.composable-option {
  grid-template-columns: 1fr 88px;
}
.composable-option input[type="number"] {
  width: 82px;
  padding: 10px 8px;
  border: 1px solid var(--line);
  border-radius: 12px;
  font-weight: 700;
  text-align: center;
}
.composable-counter {
  padding: 10px 0;
  color: var(--muted);
  font-size: .95rem;
}

/* Template e immagini menu pubblico */
.menu-page-logo{width:86px;max-height:86px;object-fit:contain;margin-bottom:12px;border-radius:18px;background:#fff;border:1px solid var(--line);padding:8px;box-shadow:var(--shadow)}
.menu-hero-image{width:100%;max-height:260px;object-fit:cover;border-radius:24px;margin-bottom:16px;border:1px solid var(--line);box-shadow:var(--shadow)}
.menu-category-image{width:100%;max-height:180px;object-fit:cover;border-radius:20px;margin-bottom:12px;border:1px solid var(--line)}
.menu-product-image{width:92px;height:92px;border-radius:16px;overflow:hidden;background:var(--surface-soft);border:1px solid var(--line)}
.menu-product-image img{width:100%;height:100%;object-fit:cover}
.menu-product-card:has(.menu-product-image){grid-template-columns:92px minmax(0,1fr) auto}
.menu-theme-visuale .menu-product-list{grid-template-columns:repeat(auto-fit,minmax(260px,1fr))}.menu-theme-visuale .menu-product-card{grid-template-columns:1fr;align-items:stretch}.menu-theme-visuale .menu-product-card:has(.menu-product-image){grid-template-columns:1fr}.menu-theme-visuale .menu-product-image{width:100%;height:170px;border-radius:18px}.menu-theme-visuale .menu-product-buy{justify-content:flex-end}.menu-theme-visuale .menu-category__head h2{font-size:1.3rem;color:var(--text)}
.menu-theme-compatto .page-shell{padding-top:12px}.menu-theme-compatto .menu-page-head{padding-bottom:10px}.menu-theme-compatto .menu-title{font-size:clamp(1.45rem,5vw,2rem)}.menu-theme-compatto .menu-category{margin-bottom:14px}.menu-theme-compatto .menu-product-list{gap:6px}.menu-theme-compatto .menu-product-card{padding:10px 12px;border-radius:13px;box-shadow:none}.menu-theme-compatto .menu-product-card:has(.menu-product-image){grid-template-columns:54px minmax(0,1fr) auto}.menu-theme-compatto .menu-product-image{width:54px;height:54px;border-radius:12px}.menu-theme-compatto .menu-product-desc{display:none}.menu-theme-compatto .menu-product-title{font-size:.95rem}.menu-theme-compatto .menu-buy-btn,.menu-theme-compatto .menu-qty-select{height:38px}
@media (max-width:860px){.menu-product-card:has(.menu-product-image){grid-template-columns:76px minmax(0,1fr)}.menu-product-image{width:76px;height:76px}.menu-product-buy{grid-column:1/-1}.menu-theme-visuale .menu-product-buy{grid-column:auto}.menu-theme-compatto .menu-product-buy{grid-column:1/-1}}
@media (max-width:540px){.menu-product-card:has(.menu-product-image){grid-template-columns:64px minmax(0,1fr)}.menu-product-image{width:64px;height:64px}.menu-theme-visuale .menu-product-image{height:150px}}

.home-menu-link__image{width:54px;height:54px;object-fit:cover;border-radius:14px;margin-right:10px;flex:0 0 auto}

/* Personalizzazione avanzata menu pubblico */
body{font-family:var(--font-body,Inter,Segoe UI,Roboto,Arial,sans-serif);background:radial-gradient(circle at top right, color-mix(in srgb,var(--primary) 8%,transparent), transparent 24%),linear-gradient(180deg,color-mix(in srgb,var(--bg) 88%,#fff),var(--bg))}
.menu-title,.menu-category__head h2,.menu-subcategory,.menu-product-title,.site-brand{font-family:var(--font-heading,var(--font-body,Inter,Segoe UI,sans-serif))}
.menu-theme-cards .menu-product-list{display:grid;gap:10px}.menu-theme-cards .menu-product-card{background:var(--surface)}
.menu-theme-elegante .site-wrap{width:min(1060px,calc(100% - 24px))}.menu-theme-elegante .site-header{background:color-mix(in srgb,var(--surface) 86%,transparent)}.menu-theme-elegante .page-shell{padding-top:28px}.menu-theme-elegante .menu-page-head{text-align:center;max-width:820px;margin:0 auto 24px;padding:34px 22px;border-radius:32px;background:radial-gradient(circle at top,color-mix(in srgb,var(--primary) 16%,transparent),transparent 48%),var(--surface);border:1px solid color-mix(in srgb,var(--primary) 14%,var(--line));box-shadow:0 24px 70px rgba(20,32,51,.10)}.menu-theme-elegante .menu-page-logo{margin-left:auto;margin-right:auto;border-radius:50%;width:96px;height:96px}.menu-theme-elegante .menu-title{font-size:clamp(2.35rem,7vw,4.15rem);letter-spacing:-.04em}.menu-theme-elegante .menu-subtitle{margin-left:auto;margin-right:auto}.menu-theme-elegante .menu-category{margin-bottom:34px}.menu-theme-elegante .menu-category__head{text-align:center;margin-bottom:18px}.menu-theme-elegante .menu-category__head h2{font-size:1.35rem;color:var(--text)}.menu-theme-elegante .menu-product-list{grid-template-columns:repeat(auto-fit,minmax(280px,1fr));gap:18px}.menu-theme-elegante .menu-product-card{grid-template-columns:1fr;align-items:stretch;padding:18px;border-radius:26px;background:var(--surface);box-shadow:0 20px 54px rgba(20,32,51,.11);border-color:color-mix(in srgb,var(--primary) 12%,var(--line))}.menu-theme-elegante .menu-product-card:has(.menu-product-image){grid-template-columns:1fr}.menu-theme-elegante .menu-product-image{width:100%;height:190px;border-radius:22px}.menu-theme-elegante .menu-product-top{grid-template-columns:1fr;gap:8px}.menu-theme-elegante .menu-product-title{font-size:1.18rem}.menu-theme-elegante .menu-product-price{color:var(--primary);font-size:1.08rem}.menu-theme-elegante .menu-product-buy{justify-content:space-between;margin-top:4px}.menu-theme-elegante .menu-buy-btn{border-radius:999px}.menu-theme-elegante .menu-qty-select{border-radius:999px}
.menu-theme-classico,.menu-theme-visuale,.menu-theme-compatto{--legacy-template-note:0}
@media (max-width:860px){.menu-theme-elegante .menu-product-list{grid-template-columns:1fr}.menu-theme-elegante .menu-product-buy{grid-column:auto}.menu-theme-elegante .menu-page-head{border-radius:24px}.menu-theme-elegante .menu-product-image{height:170px}}

/* Ricerca globale prodotti nel menu interno */
.internal-product-search{margin:0 0 22px;padding:16px;background:var(--surface);border:1px solid var(--line);border-radius:18px;box-shadow:var(--shadow)}
.internal-product-search__label{display:block;margin-bottom:9px;font-weight:900;color:var(--text)}
.internal-product-search__field{position:relative;display:flex;align-items:center}
.internal-product-search__icon{position:absolute;left:14px;color:var(--muted);font-size:1.25rem;pointer-events:none}
.internal-product-search__field input{width:100%;height:50px;padding:0 48px 0 43px;border:1px solid var(--line);border-radius:14px;background:#fff;color:var(--text);outline:none}
.internal-product-search__field input:focus{border-color:var(--primary);box-shadow:0 0 0 4px color-mix(in srgb,var(--primary) 14%,transparent)}
.internal-product-search__clear{position:absolute;right:8px;width:34px;height:34px;border:0;border-radius:10px;background:var(--surface-soft);color:var(--muted);font-size:1.25rem;cursor:pointer}
.internal-product-search__hint{margin:8px 0 0;color:var(--muted);font-size:.85rem}
.internal-search-results{margin-bottom:26px}
.internal-search-results__head{display:flex;align-items:center;justify-content:space-between;gap:12px;margin-bottom:12px}
.internal-search-results__head h2{margin:0;font-size:1.15rem}
.internal-search-results__head span{color:var(--muted);font-weight:800;font-size:.9rem}
.internal-search-product__location{margin:6px 0 0;color:var(--primary);font-size:.82rem;font-weight:800}
.internal-search-results__empty{padding:20px;text-align:center;background:var(--surface);border:1px solid var(--line);border-radius:16px}
