/* ====================================
   SNZ APP - Modern UI/UX
   Bootstrap 5 base, custom touches
   ==================================== */

:root {
  --brand: #f1c234;
  --brand-dark: #664228;
  --brand-accent: #e4b556;
  --brand-soft: #fff6df;
  --success: #3f9d3f;
  --danger: #dc3545;
  --ink: #1f1f1f;
  --muted: #6b7280;
  --bg: #fafafa;
  --card: #ffffff;
  --border: #e9ecef;
  --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.06);
  --shadow-md: 0 8px 24px rgba(0, 0, 0, 0.08);
  --shadow-lg: 0 18px 50px rgba(0, 0, 0, 0.18);
  --radius: 14px;
  --radius-lg: 22px;
}

* {
  font-family: 'Plus Jakarta Sans', system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
}

html, body {
  background: var(--bg);
  color: var(--ink);
  margin: 0;
  padding: 0;
  overscroll-behavior: none;
}

body { min-height: 100vh; }

/* ===== Splash ===== */
.splash-screen {
  position: fixed; inset: 0; z-index: 9999;
  display: flex; align-items: center; justify-content: center;
  background: #ffffff;
  transition: opacity .35s ease, visibility .35s ease;
}
.splash-screen.hide { opacity: 0; visibility: hidden; }
.splash-spinner {
  width: 36px; height: 36px; border-radius: 50%;
  border: 2px solid rgba(0, 0, 0, 0.08);
  border-top-color: rgba(0, 0, 0, 0.55);
  animation: spin .75s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

.fatal-error {
  position: fixed; inset: 0; z-index: 9999;
  display: flex; align-items: center; justify-content: center;
  background: #fff;
}

/* ===== News carousel (home, sotto i pulsanti azione) ===== */
.news-carousel {
  margin: 14px -16px 0;
  padding: 0 16px;
}
.news-carousel-track {
  display: flex;
  gap: 12px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;
  padding-bottom: 8px;
  scrollbar-width: none;
}
.news-carousel-track::-webkit-scrollbar { display: none; }
.news-card {
  flex: 0 0 78%;
  max-width: 320px;
  scroll-snap-align: start;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  text-decoration: none;
  color: inherit;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: transform .18s ease, box-shadow .18s ease;
}
.news-card:hover { transform: translateY(-2px); box-shadow: var(--shadow-md); }
.news-card-img {
  width: 100%;
  aspect-ratio: 16 / 9;
  background-color: #f3f3f3;
  overflow: hidden;
}
.news-card-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.news-card-body { padding: 12px 14px 14px; }
.news-card-title {
  font-weight: 700;
  font-size: 15px;
  line-height: 1.25;
  margin-bottom: 4px;
  color: var(--ink);
}
.news-card-text {
  font-size: 13px;
  color: var(--muted);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.app-root.d-none { display: none !important; }

/* ===== HERO / Header ===== */
.hero {
  position: relative;
  height: 20vh;
  min-height: 160px;
  color: #fff;
  overflow: hidden;
  display: flex; align-items: flex-end;
  background: #1a1a1a;
}
.hero-bg {
  position: absolute; inset: 0; z-index: 0;
  background-size: cover; background-position: center;
  filter: saturate(1.08);
  transform: scale(1.04);
  animation: kenburns 18s ease-in-out infinite alternate;
}
@keyframes kenburns { from{transform:scale(1.04)} to{transform:scale(1.12) translateY(-6px)} }
.hero::after {
  content: ''; position: absolute; inset: 0; z-index: 1; pointer-events: none;
  background: linear-gradient(180deg, rgba(0,0,0,.0) 0%, rgba(0,0,0,.15) 35%, rgba(0,0,0,.75) 100%);
}
.hero-inner {
  position: relative; z-index: 2;
  width: 100%; padding: 14px 16px;
  display: flex; align-items: center; gap: 12px;
}
.hero-logo {
  width: 52px; height: 52px; border-radius: 14px;
  object-fit: cover;
  border: 2px solid rgba(255,255,255,.95);
  box-shadow: var(--shadow-md);
  background: #fff;
  flex-shrink: 0;
  display: inline-flex; align-items: center; justify-content: center;
}
.hero-logo--initials {
  background: linear-gradient(135deg, var(--brand) 0%, var(--brand-accent) 100%);
  color: var(--brand-dark);
  font-weight: 900; font-size: 22px;
}
.hero-meta { min-width: 0; flex: 1; }
.hero-meta h1 {
  font-size: 18px; font-weight: 800; margin: 0;
  text-shadow: 0 4px 16px rgba(0,0,0,.45);
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.hero-meta .meta-sub {
  font-size: 12px; opacity: .9; margin-top: 2px;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.hero-socials { flex-shrink: 0; }
.hero-socials a { width: 32px; height: 32px; }
.hero-socials a i { font-size: 13px; }
.hero-socials { margin-left: auto; display: flex; gap: 8px; }
.hero-socials a {
  width: 36px; height: 36px; border-radius: 50%;
  background: rgba(255,255,255,.16);
  display: inline-flex; align-items: center; justify-content: center;
  color: #fff; backdrop-filter: blur(6px);
  border: 1px solid rgba(255,255,255,.2);
  transition: transform .2s, background .2s;
}
.hero-socials a:hover { transform: scale(1.1); background: rgba(255,255,255,.28); }

/* Convenzione badge */
.badge-conv {
  display: inline-block;
  padding: 6px 12px; border-radius: 999px;
  background: linear-gradient(135deg, #28a745, #1e7e34);
  color: #fff; font-weight: 700; font-size: 12px;
  letter-spacing: .4px; text-transform: uppercase;
  box-shadow: 0 4px 12px rgba(40,167,69,.4);
}

/* ===== News strip / About ===== */
.news-strip {
  background: linear-gradient(135deg, #fff 0%, var(--brand-soft) 100%);
  margin: 14px;
  padding: 14px 16px;
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
}
.news-strip h3 { font-size: 16px; margin: 0 0 4px; font-weight: 800; }
.news-strip p {
  color: var(--ink); margin: 0; font-size: 13px; line-height: 1.5;
  display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical;
  overflow: hidden;
}

/* ===== Closed banner ===== */
.closed-banner {
  background: linear-gradient(135deg, #ffe5e8 0%, #ffd1d6 100%);
  color: #8b1f1f;
  padding: 12px 16px; font-weight: 600; font-size: 13.5px;
  text-align: center; border-bottom: 1px solid rgba(139,31,31,.15);
}

/* ===== Action buttons (home) ===== */
.action-buttons { padding: 6px 14px 24px; display: grid; gap: 8px; grid-template-columns: 1fr; }
.btn-action-app {
  border: 0; border-radius: 12px;
  background: linear-gradient(135deg, var(--brand) 0%, var(--brand-accent) 100%);
  color: var(--brand-dark);
  font-weight: 800; font-size: 14px;
  padding: 13px 16px;
  display: flex; align-items: center; justify-content: center;
  box-shadow: var(--shadow-sm);
  transition: transform .15s, box-shadow .15s;
  text-transform: uppercase; letter-spacing: .8px;
  position: relative; overflow: hidden;
}
.btn-action-app:hover { transform: translateY(-1px); box-shadow: var(--shadow-md); }
.btn-action-app:active { transform: translateY(0); }

/* ===== Sezione (vista delivery / booking / etc.) ===== */
.app-section { display: none; padding-bottom: 140px; }
.app-section.active { display: block; animation: fadeUp .35s ease; }
@keyframes fadeUp { from{opacity:0; transform:translateY(8px)} to{opacity:1; transform:none} }

.section-head {
  display: flex; align-items: center; gap: 10px;
  padding: 8px 12px; background: rgba(255,255,255,.96);
  backdrop-filter: blur(8px);
  position: sticky; top: 0; z-index: 20;
  border-bottom: 1px solid var(--border);
  min-height: 56px;
}
.section-head .back-btn {
  flex-shrink: 0;
  border: 0; background: #f3f3f3; width: 36px; height: 36px;
  border-radius: 50%; color: var(--ink); font-size: 13px;
  display: inline-flex; align-items: center; justify-content: center;
  transition: background .15s;
}
.section-head .back-btn:hover { background: #e8e8e8; }
.section-head h2 { margin: 0; font-size: 16px; font-weight: 800; line-height: 1.15; }
.section-head .header-logo {
  flex-shrink: 0;
  width: 38px; height: 38px; border-radius: 50%;
  object-fit: cover;
  border: 2px solid var(--brand);
  background: #fff;
  display: inline-flex; align-items: center; justify-content: center;
  box-shadow: 0 2px 8px rgba(0,0,0,.08);
}
.section-head .header-logo--initials {
  background: linear-gradient(135deg, var(--brand) 0%, var(--brand-accent) 100%);
  color: var(--brand-dark);
  font-weight: 900; font-size: 16px;
}
.section-head .header-titles {
  min-width: 0; flex: 1; display: flex; flex-direction: column; justify-content: center;
}
.section-head .header-subtitle {
  font-size: 11px; color: var(--muted); font-weight: 600;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
  margin-top: 1px;
}

/* ===== Categories tabs (con thumb) ===== */
.categories-bar {
  display: flex; gap: 8px; overflow-x: auto;
  padding: 12px 14px;
  background: #fff;
  border-bottom: 1px solid var(--border);
  position: sticky; top: 0; z-index: 18;
  scrollbar-width: none;
  scroll-padding-left: 14px;
}
.categories-bar::-webkit-scrollbar { display: none; }
.btn-category {
  flex: 0 0 auto; border: 1px solid var(--border);
  background: #fff; color: var(--ink);
  padding: 5px 14px 5px 5px; border-radius: 999px;
  font-weight: 700; font-size: 13px;
  transition: all .2s;
  white-space: nowrap;
  display: inline-flex; align-items: center; gap: 8px;
  height: 38px;
}
.btn-category .cat-thumb {
  width: 28px; height: 28px; border-radius: 50%;
  object-fit: cover; background: #f3f3f3; flex-shrink: 0;
}
.btn-category:not(:has(.cat-thumb)) { padding-left: 14px; }
.btn-category.btn-active {
  background: var(--brand-dark); color: #fff;
  border-color: var(--brand-dark);
  box-shadow: 0 4px 12px rgba(0,0,0,.18);
  transform: translateY(-1px);
}

/* ===== Product list (compact horizontal cards, app-style) ===== */
.products-list { padding: 10px 12px 110px; display: grid; gap: 8px; }
.product-card {
  background: var(--card);
  border: 1px solid var(--border); border-radius: 14px;
  overflow: hidden;
  transition: transform .15s, box-shadow .15s;
  animation: cardIn .25s ease-out backwards;
  display: grid; grid-template-columns: 92px 1fr;
  min-height: 92px;
}
@keyframes cardIn { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
.product-card:nth-child(2) { animation-delay: .03s; }
.product-card:nth-child(3) { animation-delay: .06s; }
.product-card:nth-child(4) { animation-delay: .09s; }
.product-card:hover { box-shadow: var(--shadow-md); }
.product-card:active { transform: scale(.99); }

.product-media {
  width: 92px; height: 92px;
  overflow: hidden; background: linear-gradient(135deg, #f7f7f7, #efefef);
  position: relative; flex-shrink: 0;
}
.product-media img {
  width: 100%; height: 100%; object-fit: cover;
  transition: transform .35s ease;
}
.product-card:hover .product-media img { transform: scale(1.06); }
.product-media--empty::after {
  content: '\f0f5'; font-family: 'Font Awesome 6 Free'; font-weight: 900;
  position: absolute; top: 50%; left: 50%; transform: translate(-50%,-50%);
  font-size: 28px; color: #ddd;
}
.product-body {
  padding: 8px 10px; display: flex; flex-direction: column; gap: 4px;
  min-width: 0;
}
.product-info { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.product-card h4 {
  margin: 0; font-size: 14px; font-weight: 800; line-height: 1.2;
  letter-spacing: .1px;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.product-card p {
  margin: 0; font-size: 12px; color: var(--muted); line-height: 1.35;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical;
  overflow: hidden;
}
.product-card .product-foot {
  margin-top: auto; display: flex; align-items: center; justify-content: space-between; gap: 6px;
}
.product-card .price { font-weight: 800; color: var(--brand-dark); font-size: 14px; }

/* Stepper compatto */
.product-card .qty-stepper { padding: 2px; }
.product-card .qty-stepper button { width: 26px; height: 26px; font-size: 14px; }
.product-card .qty-stepper input.input-product { width: 22px; font-size: 13px; }

.product-card .btn-open-choice {
  width: auto; padding: 6px 14px; font-size: 12px;
  background: var(--brand); color: var(--brand-dark);
  display: inline-flex; align-items: center;
  border-radius: 999px;
  box-shadow: 0 2px 6px rgba(241,194,52,.4);
}

/* ===== Badge "in carrello" sulla card prodotto ===== */
.product-card { position: relative; }
.product-added-badge {
  position: absolute;
  top: 6px; left: 6px;
  z-index: 3;
  min-width: 26px; height: 26px;
  padding: 0 8px;
  border-radius: 999px;
  background: linear-gradient(135deg, var(--success) 0%, #2d8a2d 100%);
  color: #fff;
  font-weight: 800; font-size: 13px;
  display: inline-flex; align-items: center; justify-content: center;
  box-shadow: 0 4px 10px rgba(63,157,63,.5);
  border: 2px solid #fff;
  pointer-events: none;
}
.product-added-badge.bump {
  animation: badgeBump .45s cubic-bezier(.2,1.5,.4,1);
}
@keyframes badgeBump {
  0% { transform: scale(1); }
  35% { transform: scale(1.35); }
  70% { transform: scale(.92); }
  100% { transform: scale(1); }
}

/* Bump anche per cart-badge nel bottom bar */
.cart-badge.bump { animation: badgeBump .45s cubic-bezier(.2,1.5,.4,1); }

/* Quando aggiunto, sfumare bordo card per evidenziarla */
.product-card:has(.product-added-badge:not([style*="display: none"])) {
  border-color: rgba(63,157,63,.35);
  background: linear-gradient(135deg, #fff 0%, #f3fbf3 100%);
}

/* Quantity stepper */
.qty-stepper {
  display: inline-flex; align-items: center; background: var(--brand-soft);
  border-radius: 999px; padding: 3px;
}
.qty-stepper button {
  width: 30px; height: 30px; border-radius: 50%;
  border: 0; background: var(--brand); color: var(--brand-dark);
  font-weight: 800; font-size: 16px; line-height: 1;
  display: inline-flex; align-items: center; justify-content: center;
  transition: transform .15s;
}
.qty-stepper button:hover { transform: scale(1.08); }
.qty-stepper input.input-product {
  width: 30px; text-align: center; border: 0; background: transparent;
  font-weight: 800; color: var(--brand-dark); padding: 0; margin: 0 4px;
  font-size: 14px;
}

/* Variants */
.variants { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 6px; }
.variant-chip {
  padding: 4px 10px; border-radius: 999px;
  background: #fff; border: 1px solid var(--border);
  font-size: 12px; cursor: pointer;
  transition: all .15s;
}
.variant-chip.active {
  background: var(--brand); border-color: var(--brand);
  color: var(--brand-dark); font-weight: 700;
}

/* Composed choice */
.btn-open-choice {
  width: 100%; border: 0; border-radius: 999px;
  padding: 8px 14px; font-weight: 700; font-size: 13px;
  background: var(--brand-soft); color: var(--brand-dark);
}
.choice-modal {
  position: fixed; inset: 0; z-index: 1500;
  background: rgba(0,0,0,.45);
  display: flex; align-items: flex-end; justify-content: center;
  animation: fadeIn .25s ease;
}
.choice-modal .choice-sheet {
  width: 100%; max-width: 560px;
  background: #fff; border-top-left-radius: 22px; border-top-right-radius: 22px;
  padding: 18px; max-height: 86vh; overflow-y: auto;
  animation: slideUp .35s ease;
}
.choice-modal .choice-head {
  display: flex; align-items: flex-start; justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
  padding-right: 4px;
}
.choice-modal h5 {
  font-weight: 800; margin: 0;
  font-size: 18px; line-height: 1.25;
  flex: 1; min-width: 0;
}
.choice-modal .close-btn {
  flex-shrink: 0;
  width: 36px; height: 36px;
  border-radius: 50%;
  background: #f3f3f3;
  color: var(--ink);
  border: 0;
  font-size: 14px;
  display: inline-flex; align-items: center; justify-content: center;
  cursor: pointer;
  transition: background .15s, transform .15s, color .15s;
}
.choice-modal .close-btn:hover {
  background: var(--danger); color: #fff;
  transform: rotate(90deg);
}
.choice-modal .close-btn:active { transform: rotate(90deg) scale(.92); }
.choice-modal .property { margin-bottom: 14px; }
.choice-modal .property-name { font-size: 13px; font-weight: 700; color: var(--muted); margin-bottom: 6px; }
.choice-modal .options { display: flex; flex-wrap: wrap; gap: 6px; }
.choice-modal .opt {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 7px 12px; border: 1px solid var(--border); border-radius: 999px;
  cursor: pointer; font-size: 13px;
  transition: all .15s;
}
.choice-modal .opt input { display: none; }
.choice-modal .opt.checked {
  background: var(--brand); border-color: var(--brand);
  color: var(--brand-dark); font-weight: 700;
}
.choice-modal .actions {
  display: flex; gap: 8px; margin-top: 8px;
  position: sticky; bottom: 0; background: #fff; padding: 8px 0 0;
}
.choice-modal .actions button {
  flex: 1; border: 0; border-radius: 12px;
  padding: 12px; font-weight: 700;
}
.btn-close-choice { background: #f3f3f3; color: var(--ink); }
.btn-add-choice { background: var(--brand); color: var(--brand-dark); }

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

/* ===== Delivery options ===== */
.delivery-tabs { display: flex; gap: 6px; padding: 12px 14px; }
.delivery-option-btn {
  flex: 1; border: 1px solid var(--border); background: #fff;
  padding: 10px; border-radius: 12px; font-weight: 600; font-size: 13px;
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
}
.delivery-option-btn.active-element {
  background: var(--brand); border-color: var(--brand);
  color: var(--brand-dark); font-weight: 800;
  box-shadow: 0 4px 14px rgba(241,194,52,.4);
}

/* ===== Step indicator stile chevron (frecce orizzontali) ===== */
.step-bar {
  display: flex; align-items: stretch;
  padding: calc(10px + env(safe-area-inset-top, 0px)) 10px 10px;
  background: #fff;
  border-bottom: 1px solid var(--border);
  gap: 0;
}
.step-bar-item {
  flex: 1; min-width: 0;
  background: #e9ecef;
  color: #adb5bd;
  font-weight: 800;
  font-size: 10.5px;
  letter-spacing: .4px;
  text-transform: uppercase;
  padding: 9px 6px 9px 16px;
  display: flex; align-items: center; justify-content: center;
  position: relative;
  clip-path: polygon(0 0, calc(100% - 11px) 0, 100% 50%, calc(100% - 11px) 100%, 0 100%, 11px 50%);
  margin-left: -11px;
  text-align: center;
  white-space: nowrap;
  transition: background .25s, color .25s;
}
.step-bar-item span {
  overflow: hidden;
  text-overflow: ellipsis;
  display: inline-block;
  max-width: 100%;
}
.step-bar-item:first-child {
  clip-path: polygon(0 0, calc(100% - 11px) 0, 100% 50%, calc(100% - 11px) 100%, 0 100%);
  margin-left: 0;
  padding-left: 12px;
  border-radius: 6px 0 0 6px;
}
.step-bar-item:last-child {
  clip-path: polygon(0 0, 100% 0, 100% 100%, 0 100%, 11px 50%);
  border-radius: 0 6px 6px 0;
  padding-right: 12px;
}
/* Done: gold brand (come bottoni) */
.step-bar-item.done {
  background: linear-gradient(135deg, var(--brand) 0%, var(--brand-accent) 100%);
  color: var(--brand-dark);
}
/* Active: brown brand-dark, alta contrasto per step corrente */
.step-bar-item.active {
  background: var(--brand-dark);
  color: #fff;
  font-size: 11px;
}
/* Pending: grigio chiaro */
.step-bar-item.pending {
  background: #e9ecef;
  color: #adb5bd;
}

/* ===== Wizard navigation buttons (sticky bottom) ===== */
.wizard-actions {
  display: flex; gap: 10px; align-items: stretch;
  position: fixed; left: 0; right: 0; bottom: 0;
  z-index: 70;
  padding: 12px 14px calc(12px + env(safe-area-inset-bottom, 0px));
  background: rgba(255,255,255,.96);
  backdrop-filter: blur(12px);
  border-top: 1px solid var(--border);
  box-shadow: 0 -8px 24px rgba(0,0,0,.06);
}
.wizard-actions .btn-back-step {
  flex: 0 0 auto;
  min-width: 50px;
  background: #fff; color: var(--ink);
  border: 1px solid var(--border); border-radius: 14px;
  padding: 14px 18px;
  font-weight: 800; font-size: 16px;
  display: inline-flex; align-items: center; justify-content: center;
  transition: background .15s, transform .15s;
}
.wizard-actions .btn-back-step:hover { background: #f3f3f3; }
.wizard-actions .btn-back-step:active { transform: scale(.96); }
.wizard-actions .btn-conferma { flex: 1; }

@media (min-width: 720px) {
  .wizard-actions {
    max-width: 720px; left: 50%; transform: translateX(-50%);
  }
}

/* ===== Customer / Zone step (compatto) ===== */
.zone-step {
  padding: 14px 14px 110px;
  animation: stepIn .28s cubic-bezier(.2,.8,.2,1);
}
@keyframes stepIn {
  from { opacity: 0; transform: translateY(6px); }
  to { opacity: 1; transform: none; }
}
.zone-step-intro { text-align: center; margin-bottom: 14px; }
.zone-step-intro h3 { margin: 0 0 2px; font-weight: 800; font-size: 19px; line-height: 1.2; }
.zone-step-intro p { margin: 0; color: var(--muted); font-size: 13px; }
.zone-step .field-group { margin-bottom: 10px; padding: 0; }
.zone-step .field-group label { margin-bottom: 4px; font-size: 11px; }
.zone-step .field-group .form-control { padding: 10px 14px; font-size: 14px; }
.zone-step .field-group .input-icon .form-control { padding-left: 36px; }

.section-divider {
  margin: 18px 0 8px;
  font-size: 11px; font-weight: 800;
  color: var(--muted); letter-spacing: 1px;
  text-transform: uppercase;
  display: flex; align-items: center; gap: 10px;
}
.section-divider::before, .section-divider::after {
  content: ''; flex: 1; height: 1px; background: var(--border);
}

.zone-step textarea.form-control { padding: 10px 14px; resize: vertical; }
.zone-step .field-group { padding: 0; margin-bottom: 14px; }
.zone-step .field-group label { font-size: 12px; font-weight: 700; color: var(--muted); display: block; margin-bottom: 6px; text-transform: uppercase; letter-spacing: .3px; }

.checkout-summary-line {
  margin: 12px 14px;
  background: var(--brand-soft); color: var(--brand-dark);
  border-radius: 12px; padding: 10px 14px;
  font-size: 13px;
  display: flex; align-items: center; gap: 4px;
}

.zonas-grid { display: grid; gap: 8px; margin-bottom: 8px; }
.delivery-zona-btn {
  border: 1px solid var(--border); background: #fff;
  padding: 12px 14px; border-radius: 14px;
  display: flex; justify-content: space-between; align-items: center;
  font-size: 14px; font-weight: 600;
  text-align: left; cursor: pointer;
  width: 100%;
  transition: all .15s;
}
.delivery-zona-btn:hover { border-color: var(--brand); }
.delivery-zona-btn .z-name { font-weight: 700; }
.delivery-zona-btn .zona-meta { font-size: 12px; color: var(--muted); margin-top: 2px; }
.delivery-zona-btn.active-element {
  background: linear-gradient(135deg, var(--brand-soft) 0%, #fff 100%);
  border-color: var(--brand);
  box-shadow: 0 4px 14px rgba(241,194,52,.25);
}

.field-group { padding: 0 14px 14px; }
.field-group label { font-size: 12px; font-weight: 700; color: var(--muted); display: block; margin-bottom: 6px; text-transform: uppercase; letter-spacing: .3px; }
.field-group .form-control,
.field-group .form-select {
  border-radius: 12px; padding: 12px 14px; font-size: 15px;
}
.field-group .input-icon { position: relative; }
.field-group .input-icon i {
  position: absolute; left: 14px; top: 50%; transform: translateY(-50%);
  color: var(--muted);
}
.field-group .input-icon .form-control { padding-left: 38px; }
.error { color: var(--danger); font-size: 12px; margin-top: 4px; min-height: 14px; }

.app-box-date-order { display: flex; gap: 8px; padding: 0 14px; }
.btn-order-data-app {
  flex: 1; border: 1px solid var(--border); background: #fff;
  border-radius: 12px; padding: 10px;
  font-size: 12.5px; font-weight: 600; line-height: 1.25;
  cursor: pointer;
}
.btn-order-data-app.active-element { background: var(--brand); border-color: var(--brand); }

.shifts { display: flex; flex-wrap: wrap; gap: 6px; padding: 12px 14px; }
.btn-orario {
  flex: 0 0 calc(33.33% - 4px);
  text-align: center; border: 1px solid var(--border);
  background: #fff; border-radius: 10px; padding: 8px;
  font-size: 13px; font-weight: 600;
}
.btn-orario.active-element { background: var(--brand); border-color: var(--brand); }

/* ===== Bottom checkout bar (sticky) ===== */
.bottom-bar {
  position: fixed; bottom: 0; left: 0; right: 0;
  z-index: 80;
  background: rgba(255,255,255,.96);
  backdrop-filter: blur(12px);
  border-top: 1px solid var(--border);
  padding: 12px 14px 16px;
  box-shadow: 0 -8px 24px rgba(0,0,0,.06);
}
.bottom-bar .row-info {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 8px;
}
.bottom-bar-actions {
  display: flex; gap: 10px; align-items: stretch;
}
.bottom-bar-actions .btn-back-step {
  flex: 0 0 auto; min-width: 50px;
  background: #fff; color: var(--ink);
  border: 1px solid var(--border); border-radius: 14px;
  padding: 14px 18px;
  font-weight: 800; font-size: 16px;
  display: inline-flex; align-items: center; justify-content: center;
  transition: background .15s, transform .15s;
}
.bottom-bar-actions .btn-back-step:hover { background: #f3f3f3; }
.bottom-bar-actions .btn-back-step:active { transform: scale(.96); }
.bottom-bar-actions .btn-checkout { flex: 1; }
.bottom-bar .total-display {
  font-size: 18px; font-weight: 800; color: var(--brand-dark);
}
.bottom-bar .min-info { font-size: 12px; color: var(--muted); }
.btn-checkout,
.btn-ordina {
  width: 100%; border: 0; border-radius: 14px;
  padding: 14px; font-weight: 800; font-size: 16px;
  background: linear-gradient(135deg, var(--brand) 0%, var(--brand-accent) 100%);
  color: var(--brand-dark);
  text-transform: uppercase; letter-spacing: .6px;
  box-shadow: var(--shadow-md);
  transition: transform .15s, box-shadow .15s;
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
}
.btn-checkout:disabled { opacity: .55; cursor: not-allowed; box-shadow: none; }
.btn-checkout:not(:disabled):hover { transform: translateY(-1px); box-shadow: var(--shadow-lg); }
.btn-checkout:active { transform: translateY(0); }

.cart-badge {
  display: inline-flex; align-items: center; justify-content: center;
  min-width: 20px; height: 20px; padding: 0 6px;
  border-radius: 999px; background: var(--danger); color: #fff;
  font-size: 11px; font-weight: 700;
  margin-left: 6px;
}

/* ===== Cart drawer (riepilogo) ===== */
.cart-drawer {
  position: fixed; inset: 0; z-index: 900;
  background: #fff;
  display: flex; flex-direction: column;
  transform: translateY(100%);
  transition: transform .35s cubic-bezier(.2,.8,.2,1);
}
.cart-drawer.open { transform: translateY(0); }
.cart-drawer .head {
  background: linear-gradient(135deg, var(--brand) 0%, var(--brand-accent) 100%);
  color: var(--brand-dark);
  padding: 16px 18px;
  display: flex; align-items: center; gap: 12px;
  box-shadow: var(--shadow-md);
}
.cart-drawer .head h3 { margin: 0; font-weight: 800; font-size: 17px; line-height: 1.15; }
.cart-drawer .head .head-logo {
  width: 42px; height: 42px; border-radius: 50%;
  object-fit: cover;
  border: 2px solid rgba(255,255,255,.85);
  box-shadow: 0 2px 8px rgba(0,0,0,.12);
  background: #fff;
  flex-shrink: 0;
}
.cart-drawer .head .head-icon {
  width: 42px; height: 42px; border-radius: 50%;
  background: rgba(255,255,255,.3);
  display: inline-flex; align-items: center; justify-content: center;
  font-size: 18px; color: var(--brand-dark);
  flex-shrink: 0;
}
.cart-drawer .head .head-titles {
  flex: 1; min-width: 0;
  display: flex; flex-direction: column;
}
.cart-drawer .head .head-sub {
  font-size: 11.5px; font-weight: 700; opacity: .75;
  margin-top: 1px;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.cart-drawer .head .close-btn {
  flex-shrink: 0;
  width: 36px; height: 36px; border-radius: 50%;
  background: rgba(255,255,255,.3); border: 0; color: var(--brand-dark);
  font-size: 14px;
  display: inline-flex; align-items: center; justify-content: center;
  transition: background .15s, transform .15s;
}
.cart-drawer .head .close-btn:hover { background: rgba(255,255,255,.55); transform: rotate(90deg); }
.cart-drawer .body { flex: 1; overflow-y: auto; padding: 14px; background: #fafafa; }
.cart-item {
  display: grid;
  grid-template-columns: 56px 1fr auto;
  grid-template-rows: auto auto;
  grid-template-areas:
    "img info delete"
    "img stepper total";
  gap: 4px 10px; align-items: center;
  background: #fff; border: 1px solid var(--border); border-radius: 14px;
  padding: 10px; margin-bottom: 8px;
  animation: fadeUp .2s ease;
}
.cart-item img,
.cart-item .cart-item-img-empty {
  grid-area: img;
  width: 56px; height: 56px; border-radius: 10px; object-fit: cover; background: #eee;
}
/* Item omaggio (gift_product) */
.cart-item.is-gift {
  background: linear-gradient(135deg, #fff8e1 0%, #fffaf0 60%);
  border-color: #f1c234;
}
.cart-gift-badge {
  display: inline-block;
  background: #f1c234; color: #1f1f1f;
  font-size: 10px; font-weight: 800; letter-spacing: .4px;
  padding: 2px 8px; border-radius: 999px;
  margin-left: 6px; vertical-align: middle;
}
.cart-item > div:nth-of-type(1) { grid-area: info; min-width: 0; }
.cart-item .name {
  font-size: 14px; font-weight: 700; line-height: 1.2;
  overflow: hidden; text-overflow: ellipsis;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical;
}
.cart-item .unit { font-size: 12px; color: var(--muted); margin-top: 2px; }
.cart-item .item-actions { display: contents; }
.cart-item .qty-stepper { grid-area: stepper; justify-self: start; }
.cart-item .item-total {
  grid-area: total; justify-self: end;
  font-size: 15px; font-weight: 800; color: var(--brand-dark);
}
.cart-item .item-delete {
  grid-area: delete; justify-self: end;
  border: 0; background: transparent; color: var(--danger);
  width: 32px; height: 32px; border-radius: 50%; font-size: 13px;
}
.cart-item .item-delete:hover { background: rgba(220,53,69,.08); }
.cart-item .qty-stepper { padding: 2px; }
.cart-item .qty-stepper button { width: 26px; height: 26px; font-size: 14px; }
.cart-item .qty-stepper input.input-product { width: 22px; font-size: 13px; }

.cart-empty {
  text-align: center; padding: 40px 14px; color: var(--muted);
}
.cart-empty i { font-size: 60px; color: #ddd; margin-bottom: 12px; }

.cart-drawer .foot {
  background: #fff; border-top: 1px solid var(--border);
  padding: 14px;
}
.totals-row { display: flex; justify-content: space-between; align-items: center; margin-bottom: 6px; font-size: 14px; }
.totals-row.final { font-size: 17px; font-weight: 800; padding-top: 10px; border-top: 2px dashed var(--brand); margin-top: 6px; color: var(--brand-dark); }
.totals-row .sale { color: var(--success); }

/* ===== Checkout sheet ===== */
.checkout-sheet {
  position: fixed; inset: 0; z-index: 1000;
  background: #fff;
  display: flex; flex-direction: column;
  transform: translateY(100%);
  transition: transform .4s cubic-bezier(.2,.8,.2,1);
  overflow-y: auto;
}
.checkout-sheet.open { transform: translateY(0); }
.checkout-sheet .checkout-head {
  background: linear-gradient(135deg, var(--brand-dark) 0%, #4a3020 100%);
  color: #fff; padding: 22px 18px; text-align: center;
}
.checkout-sheet .checkout-head h3 { margin: 0; font-weight: 800; }
.checkout-sheet .checkout-head p { margin: 4px 0 0; font-size: 13px; opacity: .85; }
.checkout-sheet dl { padding: 16px; margin: 0; }
.checkout-sheet dt {
  font-size: 12px; color: var(--muted); font-weight: 700;
  text-transform: uppercase; letter-spacing: .3px; margin-top: 10px;
}
.checkout-sheet dd { font-size: 15px; margin: 2px 0 6px; font-weight: 600; }
.checkout-sheet .checkout-actions {
  position: sticky; bottom: 0; background: rgba(255,255,255,.97); backdrop-filter: blur(10px);
  padding: 14px;
  border-top: 1px solid var(--border); box-shadow: 0 -8px 16px rgba(0,0,0,.04);
  z-index: 5;
}

/* Nuova lista checkout (cards) */
.ck-list {
  padding: 14px 14px 6px;
  display: flex; flex-direction: column; gap: 8px;
}
.ck-row {
  display: flex; align-items: center; gap: 12px;
  background: #fff;
  border: 1px solid var(--border); border-radius: 14px;
  padding: 10px 12px;
}
.ck-row-ic {
  width: 36px; height: 36px; border-radius: 12px;
  background: var(--brand-soft); color: var(--brand-dark);
  display: inline-flex; align-items: center; justify-content: center;
  font-size: 14px; flex-shrink: 0;
}
.ck-row-body { min-width: 0; flex: 1; }
.ck-row-label {
  font-size: 11px; color: var(--muted); font-weight: 700;
  text-transform: uppercase; letter-spacing: .4px;
  margin-bottom: 1px;
}
.ck-row-value {
  font-size: 14px; color: var(--ink); font-weight: 700;
  line-height: 1.25;
  word-break: break-word;
}

/* Totali */
.ck-totals {
  margin: 14px 14px 0;
  padding: 14px 16px;
  background: linear-gradient(135deg, var(--brand-soft) 0%, #fff 100%);
  border: 1px solid var(--border); border-radius: 16px;
}
.ck-tot-row {
  display: flex; justify-content: space-between; align-items: center;
  font-size: 14px; padding: 4px 0;
}
.ck-tot-row.sale { color: var(--success); font-weight: 700; }
.ck-tot-row.final {
  font-size: 18px; font-weight: 800; color: var(--brand-dark);
  margin-top: 8px; padding-top: 12px;
  border-top: 2px dashed var(--brand);
}
.btn-conferma {
  width: 100%; border: 0; border-radius: 14px;
  padding: 14px; font-weight: 800; font-size: 16px;
  background: linear-gradient(135deg, var(--success) 0%, #2d8a2d 100%);
  color: #fff;
  text-transform: uppercase; letter-spacing: .5px;
  box-shadow: 0 8px 22px rgba(63,157,63,.3);
}
.btn-edit-order {
  width: 100%; background: transparent; border: 0;
  font-size: 13px; color: var(--muted); margin-top: 8px; text-decoration: underline;
}

/* ===== Stripe area ===== */
.payment-wrap { padding: 18px; }
.btn-payment {
  width: 100%; border: 0; border-radius: 14px;
  padding: 14px; font-weight: 800; font-size: 16px;
  background: var(--brand-dark); color: #fff;
  margin-top: 14px;
}
.btn-payment:disabled { opacity: .6; }

/* ===== Success ===== */
.success-screen {
  height: 100vh; display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  text-align: center; padding: 20px;
  background: linear-gradient(180deg, #fff6df, #fff);
}
.success-icon {
  width: 88px; height: 88px; border-radius: 50%;
  background: linear-gradient(135deg, var(--success), #2d8a2d);
  color: #fff; font-size: 44px;
  display: inline-flex; align-items: center; justify-content: center;
  margin-bottom: 18px;
  animation: pop .5s cubic-bezier(.2,1.4,.4,1);
}
@keyframes pop { from{transform:scale(.6); opacity:0} to{transform:none; opacity:1} }
.success-screen h3 { font-weight: 800; }
.success-screen .order-code { font-size: 20px; font-weight: 800; color: var(--brand-dark); margin: 8px 0 4px; }
.success-screen .total-paid { font-size: 28px; font-weight: 800; color: var(--brand); margin: 12px 0; }

/* ===== Toast ===== */
.snz-toast {
  background: var(--ink); color: #fff;
  padding: 12px 16px; border-radius: 12px;
  font-size: 14px; font-weight: 600;
  box-shadow: var(--shadow-md);
  animation: fadeUp .25s ease;
}
.snz-toast.success { background: var(--success); }
.snz-toast.error { background: var(--danger); }

/* ===== Convenzione box ===== */
.convenzione-box {
  margin: 14px; padding: 14px;
  border-radius: var(--radius-lg);
  background: linear-gradient(135deg, #e8f5e9 0%, #c8e6c9 100%);
  border: 1px solid rgba(40,167,69,.25);
  color: #1b5e20;
}
.convenzione-box .conv-title { font-weight: 800; font-size: 15px; margin-bottom: 4px; }
.convenzione-box .conv-desc { font-size: 13px; }
.convenzione-box .conv-discount {
  display: inline-block; margin-top: 6px;
  padding: 3px 10px; border-radius: 999px;
  background: #28a745; color: #fff; font-weight: 700; font-size: 12px;
}

/* ===== Pagamento (blocco prominente, ultimo step) ===== */
.payment-block { padding: 16px 14px 8px; }
.payment-block > label {
  font-size: 13px !important; font-weight: 800 !important;
  color: var(--ink) !important; text-transform: none !important;
  letter-spacing: 0 !important; margin-bottom: 10px !important;
  display: flex; align-items: center; gap: 6px;
}
.payment-block > label i { color: var(--brand-dark); }
.payment-options {
  display: grid; gap: 10px;
}
.payment-opt {
  position: relative;
  display: grid;
  grid-template-columns: 48px 1fr auto;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  background: #fff;
  border: 2px solid var(--border);
  border-radius: 16px;
  cursor: pointer;
  text-align: left;
  transition: border-color .2s, box-shadow .2s, background .2s, transform .15s;
}
.payment-opt:hover { border-color: var(--brand); }
.payment-opt:active { transform: scale(.98); }
.payment-opt-ic {
  width: 48px; height: 48px; border-radius: 14px;
  background: var(--brand-soft); color: var(--brand-dark);
  display: inline-flex; align-items: center; justify-content: center;
  font-size: 20px;
  transition: background .2s, color .2s;
}
.payment-opt-body { display: flex; flex-direction: column; min-width: 0; }
.payment-opt-body strong {
  font-size: 16px; font-weight: 800; color: var(--ink); line-height: 1.1;
  margin-bottom: 2px;
}
.payment-opt-body span {
  font-size: 12.5px; color: var(--muted); font-weight: 500;
}
.payment-opt-badge {
  position: absolute; top: 10px; right: 10px;
  font-size: 10px; font-weight: 800;
  color: #635bff; background: #f3f1ff;
  padding: 3px 7px; border-radius: 6px;
  letter-spacing: .3px;
  display: inline-flex; align-items: center; gap: 3px;
}
.payment-opt-check {
  width: 26px; height: 26px; border-radius: 50%;
  border: 2px solid var(--border);
  background: #fff;
  display: inline-flex; align-items: center; justify-content: center;
  color: transparent;
  font-size: 11px;
  transition: all .2s;
  flex-shrink: 0;
}
.payment-opt.active-element {
  border-color: var(--brand-dark);
  background: linear-gradient(135deg, var(--brand-soft) 0%, #fff 100%);
  box-shadow: 0 6px 18px rgba(102,66,40,.15);
}
.payment-opt.active-element .payment-opt-ic {
  background: linear-gradient(135deg, var(--brand) 0%, var(--brand-accent) 100%);
  color: var(--brand-dark);
}
.payment-opt.active-element .payment-opt-check {
  background: var(--success);
  border-color: var(--success);
  color: #fff;
}

/* ===== Coupon row ===== */
.coupon-row { display: flex; gap: 6px; padding: 0 14px 14px; }
.coupon-row input { flex: 1; border-radius: 12px; padding: 10px 14px; border: 1px solid var(--border); }
.coupon-row input.coupon-applied { background: #f3fbf3; border-color: rgba(63,157,63,.4); color: var(--success); font-weight: 700; }
.coupon-row button {
  border: 0; padding: 10px 14px; border-radius: 12px;
  background: var(--brand-dark); color: #fff; font-weight: 700; font-size: 13px;
}
.coupon-row button.applied { background: var(--success); }
.coupon-row button:disabled { opacity: .6; cursor: not-allowed; }

/* ===== Responsive ===== */
@media (min-width: 720px) {
  .app-root { max-width: 720px; margin: 0 auto; box-shadow: 0 0 60px rgba(0,0,0,.06); background: #fff; min-height: 100vh; }
  .bottom-bar, .cart-drawer, .checkout-sheet { max-width: 720px; left: 50%; transform: translateX(-50%); }
  .cart-drawer { transform: translate(-50%, 100%); }
  .cart-drawer.open { transform: translate(-50%, 0); }
  .checkout-sheet { transform: translate(-50%, 100%); }
  .checkout-sheet.open { transform: translate(-50%, 0); }
}

/* utilities */
.line-through { text-decoration: line-through; color: var(--muted); margin-right: 6px; font-size: .9em; }
.text-success-strong { color: var(--success); font-weight: 700; }
.muted { color: var(--muted); }
.hidden { display: none !important; }
