/* ============================================================
   Ordina Conca Verde — UI 2.0 (revamp 2026-05-07)
   Tema "piscina": cieli sky + acqua cyan + sole amber + sabbia
   Layout: sticky tabs categorie + grid cards + bottom bar morbido
   ============================================================ */

:root {
  /* Palette piscina */
  --c-sky-50:    #F0F9FF;
  --c-sky-100:   #E0F2FE;
  --c-sky-200:   #BAE6FD;
  --c-sky-400:   #38BDF8;
  --c-sky-500:   #0EA5E9;
  --c-sky-600:   #0284C7;
  --c-sky-700:   #0369A1;
  --c-sky-900:   #0C4A6E;
  --c-cyan-300:  #67E8F9;
  --c-cyan-400:  #22D3EE;
  --c-amber-300: #FCD34D;
  --c-amber-400: #FBBF24;
  --c-amber-500: #F59E0B;
  --c-rose-400:  #FB7185;
  --c-rose-500:  #F43F5E;
  --c-emerald-500: #10B981;
  --c-slate-50:  #F8FAFC;
  --c-slate-100: #F1F5F9;
  --c-slate-200: #E2E8F0;
  --c-slate-300: #CBD5E1;
  --c-slate-500: #64748B;
  --c-slate-700: #334155;

  /* Semantici */
  --bg:           var(--c-sky-50);
  --bg-card:      #ffffff;
  --bg-elevated:  #ffffff;
  --primary:      var(--c-sky-500);
  --primary-dark: var(--c-sky-700);
  --accent:       var(--c-amber-400);
  --success:      var(--c-emerald-500);
  --danger:       var(--c-rose-500);
  --text:         var(--c-sky-900);
  --text-secondary: var(--c-slate-500);
  --text-muted:   var(--c-slate-300);
  --border:       var(--c-slate-200);
  --border-soft:  var(--c-slate-100);

  /* Spacing & radius */
  --gap-xs: 6px;
  --gap-sm: 10px;
  --gap-md: 16px;
  --gap-lg: 24px;
  --gap-xl: 32px;
  --r-sm: 10px;
  --r-md: 16px;
  --r-lg: 24px;
  --r-pill: 999px;

  /* Shadows soft */
  --shadow-sm:  0 1px 2px rgba(14, 165, 233, 0.08);
  --shadow-md:  0 4px 12px rgba(14, 165, 233, 0.10), 0 1px 3px rgba(14, 165, 233, 0.06);
  --shadow-lg:  0 10px 30px rgba(14, 165, 233, 0.18), 0 4px 12px rgba(14, 165, 233, 0.10);

  /* Heights */
  --h-navbar:     58px;
  --h-cat-tabs:   60px;
  --h-bottom-bar: 76px;
}

/* ============================================================
   RESET & BASE
   ============================================================ */
* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  font-family: 'SF Pro Display', -apple-system, BlinkMacSystemFont, 'Inter', system-ui, sans-serif;
  font-size: 15px;
  line-height: 1.45;
  color: var(--text);
  background: var(--bg);
  background-image:
    radial-gradient(circle at 0% 0%, var(--c-sky-100) 0, transparent 40%),
    radial-gradient(circle at 100% 0%, var(--c-cyan-300) 0, transparent 35%);
  background-attachment: fixed;
  min-height: 100vh;
  padding-bottom: calc(var(--h-bottom-bar) + env(safe-area-inset-bottom, 0));
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; display: block; }
a { color: var(--primary-dark); text-decoration: none; }
button { font-family: inherit; cursor: pointer; border: 0; background: 0; }
input, select { font-family: inherit; font-size: inherit; }

/* ============================================================
   NAVBAR (sticky top)
   ============================================================ */
.navbar {
  position: sticky;
  top: 0;
  z-index: 100;
  height: var(--h-navbar);
  display: flex;
  align-items: center;
  padding: 0 var(--gap-md);
  background: rgba(255, 255, 255, 0.85);
  backdrop-filter: saturate(180%) blur(20px);
  -webkit-backdrop-filter: saturate(180%) blur(20px);
  border-bottom: 1px solid var(--border-soft);
}
.nav-btn {
  width: 38px; height: 38px;
  border-radius: var(--r-pill);
  display: inline-flex; align-items: center; justify-content: center;
  background: transparent;
  color: var(--primary);
  font-size: 22px; font-weight: 600;
  text-decoration: none;
  transition: background 0.15s;
}
.nav-btn:hover { background: var(--c-sky-100); }
.nav-btn:active { transform: scale(0.94); }
.nav-title {
  flex: 1; text-align: center;
  font-weight: 700; font-size: 17px;
  color: var(--text);
  letter-spacing: -0.2px;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.nav-cart-link {
  position: relative;
  width: 38px; height: 38px;
  border-radius: var(--r-pill);
  display: inline-flex; align-items: center; justify-content: center;
  color: var(--primary);
  font-size: 22px;
}
.nav-cart-badge {
  position: absolute; top: 0; right: 0;
  min-width: 18px; height: 18px; padding: 0 5px;
  border-radius: var(--r-pill);
  background: var(--c-rose-500);
  color: #fff; font-size: 11px; font-weight: 700;
  display: flex; align-items: center; justify-content: center;
}

/* ============================================================
   CATEGORY TABS BAR (sticky sotto navbar)
   ============================================================ */
.cat-tabs-wrap {
  position: sticky;
  top: var(--h-navbar);
  z-index: 99;
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: saturate(180%) blur(16px);
  -webkit-backdrop-filter: saturate(180%) blur(16px);
  border-bottom: 1px solid var(--border-soft);
  padding: 8px 0;
}
.cat-tabs {
  display: flex;
  gap: var(--gap-xs);
  overflow-x: auto;
  scroll-snap-type: x proximity;
  padding: 0 var(--gap-md);
  -webkit-overflow-scrolling: touch;
}
.cat-tabs::-webkit-scrollbar { display: none; }
.cat-tab {
  flex-shrink: 0;
  padding: 8px 16px;
  border-radius: var(--r-pill);
  background: var(--c-sky-100);
  color: var(--c-sky-700);
  font-size: 14px; font-weight: 600;
  white-space: nowrap;
  text-decoration: none;
  scroll-snap-align: start;
  transition: all 0.15s;
  border: 2px solid transparent;
  display: inline-flex; align-items: center; gap: 6px;
}
.cat-tab:hover {
  background: var(--c-sky-200);
}
.cat-tab.active {
  background: var(--primary);
  color: #fff;
  box-shadow: var(--shadow-md);
}
.cat-tab .cat-emoji {
  font-size: 16px;
}

/* ============================================================
   HERO HOME (decorativo con onda)
   ============================================================ */
.hero {
  position: relative;
  padding: 28px var(--gap-md) 36px;
  text-align: center;
  background: linear-gradient(135deg, var(--c-sky-400), var(--c-cyan-400));
  color: #fff;
  overflow: hidden;
}
.hero::after {
  content: '';
  position: absolute;
  bottom: -1px; left: 0; right: 0;
  height: 36px;
  background: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 1440 80' preserveAspectRatio='none'><path fill='%23F0F9FF' d='M0,32L60,42.7C120,53,240,75,360,69.3C480,64,600,32,720,21.3C840,11,960,21,1080,32C1200,43,1320,53,1380,58.7L1440,64L1440,80L1380,80C1320,80,1200,80,1080,80C960,80,840,80,720,80C600,80,480,80,360,80C240,80,120,80,60,80L0,80Z'/></svg>") no-repeat center/cover;
}
.hero h1 {
  font-size: 28px;
  font-weight: 800;
  letter-spacing: -0.5px;
  margin-bottom: 4px;
  text-shadow: 0 2px 8px rgba(0,0,0,0.15);
}
.hero .greeting {
  font-size: 15px;
  opacity: 0.95;
  font-weight: 500;
}

/* Hero cat (più piccolo, su pagina categoria) */
.hero-cat {
  padding: 18px var(--gap-md) 16px;
  text-align: center;
  background: linear-gradient(135deg, var(--c-sky-400), var(--c-cyan-400));
  color: #fff;
}
.hero-cat h1 {
  font-size: 22px;
  font-weight: 700;
  letter-spacing: -0.3px;
}
.hero-cat .greeting {
  font-size: 13px;
  opacity: 0.92;
  margin-top: 2px;
}

/* ============================================================
   STATUS BANNER (aperto/chiuso)
   ============================================================ */
.status-banner {
  display: flex;
  align-items: center;
  gap: var(--gap-sm);
  margin: -10px var(--gap-md) var(--gap-lg);
  padding: 12px 16px;
  background: var(--bg-card);
  border-radius: var(--r-md);
  box-shadow: var(--shadow-md);
  position: relative; z-index: 1;
}
.status-banner.aperto { border-left: 4px solid var(--success); }
.status-banner.chiuso { border-left: 4px solid var(--c-rose-400); }
.status-banner .dot {
  width: 10px; height: 10px;
  border-radius: 50%;
  flex-shrink: 0;
}
.status-banner.aperto .dot {
  background: var(--success);
  box-shadow: 0 0 0 4px rgba(16, 185, 129, 0.2);
  animation: pulse 2s infinite;
}
.status-banner.chiuso .dot {
  background: var(--c-rose-400);
}
@keyframes pulse {
  0%, 100% { box-shadow: 0 0 0 4px rgba(16, 185, 129, 0.2); }
  50%      { box-shadow: 0 0 0 8px rgba(16, 185, 129, 0.05); }
}
.status-banner .info { flex: 1; line-height: 1.3; }
.status-banner .info strong {
  display: block;
  font-size: 14px;
  color: var(--text);
}
.status-banner .info span {
  font-size: 12px;
  color: var(--text-secondary);
}

/* ============================================================
   SEARCH BAR (sticky nelle pagine prodotti)
   ============================================================ */
.search-wrap {
  padding: 12px var(--gap-md);
  background: var(--bg);
}
.search-input {
  width: 100%;
  padding: 12px 16px 12px 42px;
  border: 0;
  border-radius: var(--r-pill);
  background: var(--bg-card);
  font-size: 15px;
  color: var(--text);
  box-shadow: var(--shadow-sm);
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2364748B' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'><circle cx='11' cy='11' r='8'/><path d='m21 21-4.3-4.3'/></svg>");
  background-repeat: no-repeat;
  background-position: 14px center;
  background-size: 18px;
  outline: 0;
  transition: box-shadow 0.15s;
}
.search-input:focus {
  box-shadow: var(--shadow-md), 0 0 0 3px var(--c-sky-200);
}
.search-input::placeholder { color: var(--text-muted); }

/* ============================================================
   CARDS GRID (categorie home)
   ============================================================ */
.cards-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--gap-md);
  padding: 0 var(--gap-md);
}
@media (min-width: 600px) {
  .cards-grid { grid-template-columns: repeat(3, 1fr); }
}
@media (min-width: 900px) {
  .cards-grid { grid-template-columns: repeat(4, 1fr); }
}
.card {
  display: flex;
  flex-direction: column;
  background: var(--bg-card);
  border-radius: var(--r-md);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  text-decoration: none;
  color: inherit;
  position: relative;
}
.card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
}
.card:active {
  transform: translateY(-2px) scale(0.98);
}
.card-img {
  width: 100%; height: 110px;
  object-fit: cover;
  background: linear-gradient(135deg, var(--c-sky-100), var(--c-cyan-300));
}
.card-img.icon {
  display: flex; align-items: center; justify-content: center;
  font-size: 50px;
  color: var(--c-sky-700);
}
.card-body {
  padding: 12px 14px;
  display: flex; flex-direction: column;
  flex: 1;
}
.card-title {
  font-weight: 700;
  font-size: 15px;
  color: var(--text);
  margin-bottom: 2px;
  line-height: 1.25;
}
.card-meta {
  font-size: 12px;
  color: var(--text-secondary);
}

/* ============================================================
   PRODUCT GRID — Layout 2 colonne grandi
   ============================================================ */
.products-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--gap-sm);
  padding: var(--gap-sm) var(--gap-md) var(--gap-md);
}
@media (min-width: 700px) {
  .products-grid {
    grid-template-columns: repeat(3, 1fr);
    gap: var(--gap-md);
  }
}
@media (min-width: 1000px) {
  .products-grid {
    grid-template-columns: repeat(4, 1fr);
  }
}

.product-card {
  display: flex;
  flex-direction: column;
  background: var(--bg-card);
  border-radius: var(--r-md);
  padding: 14px 12px 12px;
  box-shadow: var(--shadow-sm);
  text-decoration: none;
  color: inherit;
  position: relative;
  cursor: pointer;
  transition: all 0.18s cubic-bezier(0.4, 0, 0.2, 1);
  overflow: hidden;
}
.product-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}
.product-card:active {
  transform: scale(0.97);
}
.product-card .product-icon {
  width: 80px; height: 80px;
  margin: 0 auto 10px;
  display: flex; align-items: center; justify-content: center;
  background: linear-gradient(135deg, var(--c-sky-50), var(--c-sky-100));
  border-radius: var(--r-md);
  overflow: hidden;
  font-size: 50px;
}
.product-card .product-icon img {
  width: 64px; height: 64px;
  object-fit: contain;
}
.product-card .product-name {
  font-size: 14px;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 4px;
  line-height: 1.25;
  text-align: center;
  /* clamp 2 lines */
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.product-card .product-desc {
  font-size: 11.5px;
  color: var(--text-secondary);
  margin-bottom: 8px;
  text-align: center;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  min-height: 0;
}
.product-card .product-bottom {
  margin-top: auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}
.product-card .product-price {
  font-size: 16px;
  font-weight: 800;
  color: var(--primary-dark);
}
.product-card .product-add {
  flex-shrink: 0;
  width: 36px; height: 36px;
  border-radius: var(--r-pill);
  background: var(--primary);
  color: #fff;
  font-size: 22px; font-weight: 600; line-height: 1;
  display: inline-flex; align-items: center; justify-content: center;
  transition: all 0.15s;
  box-shadow: 0 2px 6px rgba(14, 165, 233, 0.35);
}
.product-card .product-add:hover {
  background: var(--primary-dark);
  transform: scale(1.08);
}
.product-card .product-add:active {
  transform: scale(0.92);
}
.product-card.is-config .product-add {
  background: var(--accent);
  color: var(--c-sky-900);
  box-shadow: 0 2px 6px rgba(245, 158, 11, 0.35);
}
.product-card .product-config-badge {
  position: absolute;
  top: 6px; right: 6px;
  background: var(--accent);
  color: var(--c-sky-900);
  font-size: 9.5px; font-weight: 700;
  padding: 3px 8px;
  border-radius: var(--r-pill);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

/* ============================================================
   EMPTY STATE
   ============================================================ */
.empty {
  text-align: center;
  padding: 60px 20px;
  color: var(--text-secondary);
}
.empty .icon {
  font-size: 64px;
  margin-bottom: 16px;
  opacity: 0.5;
}
.empty p {
  font-size: 15px;
}

/* ============================================================
   BOTTOM BAR (carrello)
   ============================================================ */
.bottom-bar {
  position: fixed;
  bottom: 0; left: 0; right: 0;
  z-index: 95;
  display: flex;
  align-items: center;
  gap: var(--gap-md);
  padding: 12px var(--gap-md) calc(12px + env(safe-area-inset-bottom, 0));
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: saturate(180%) blur(20px);
  -webkit-backdrop-filter: saturate(180%) blur(20px);
  border-top: 1px solid var(--border-soft);
  box-shadow: 0 -6px 24px rgba(14, 165, 233, 0.10);
  animation: slideUp 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}
@keyframes slideUp { from { transform: translateY(100%); } to { transform: translateY(0); } }
.bottom-bar .cart-info { flex: 1; line-height: 1.2; }
.bottom-bar .cart-count {
  font-size: 12px;
  color: var(--text-secondary);
  font-weight: 600;
}
.bottom-bar .cart-total {
  font-size: 18px;
  font-weight: 800;
  color: var(--text);
}

/* ============================================================
   BUTTONS
   ============================================================ */
.btn {
  display: inline-flex;
  align-items: center; justify-content: center;
  gap: 6px;
  padding: 12px 20px;
  border-radius: var(--r-pill);
  font-size: 15px;
  font-weight: 700;
  text-decoration: none;
  transition: all 0.15s;
  border: 0;
  cursor: pointer;
}
.btn-primary {
  background: var(--primary);
  color: #fff;
  box-shadow: 0 2px 8px rgba(14, 165, 233, 0.4);
}
.btn-primary:hover { background: var(--primary-dark); }
.btn-primary:active { transform: scale(0.96); }
.btn-secondary {
  background: var(--c-sky-100);
  color: var(--primary-dark);
}
.btn-large {
  padding: 14px 24px;
  font-size: 16px;
}
.btn-block { width: 100%; }

/* ============================================================
   MODAL PRODOTTO (variazioni) — revamp piscina 2026-05-07
   ============================================================ */
body.modal-open { overflow: hidden; }

.modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 200;
  display: flex; align-items: flex-end; justify-content: center;
  background: rgba(12, 74, 110, 0.55);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  animation: fadeIn 0.2s;
  padding: 0;
}
@media (min-width: 700px) { .modal-overlay { align-items: center; padding: 24px; } }
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
.modal-overlay-nested { background: rgba(12, 74, 110, 0.30); }

.modal-card {
  width: 100%;
  max-width: 560px;
  max-height: 92vh;
  background: var(--bg-card);
  border-radius: var(--r-lg) var(--r-lg) 0 0;
  display: flex; flex-direction: column;
  position: relative;
  overflow: hidden;
  animation: slideUpBig 0.28s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 0 -10px 40px rgba(12, 74, 110, 0.30);
}
@media (min-width: 700px) {
  .modal-card { border-radius: var(--r-lg); max-height: 88vh; }
}
@keyframes slideUpBig { from { transform: translateY(100%); } to { transform: translateY(0); } }

.modal-close {
  position: absolute;
  top: 12px; right: 12px;
  z-index: 5;
  width: 36px; height: 36px;
  border-radius: var(--r-pill);
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(8px);
  color: var(--text);
  font-size: 22px; line-height: 1; font-weight: 400;
  display: inline-flex; align-items: center; justify-content: center;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.12);
  transition: all 0.15s;
}
.modal-close:hover { background: #fff; transform: scale(1.05); }
.modal-close:active { transform: scale(0.92); }

.modal-img {
  width: 100%; height: 200px;
  background: linear-gradient(135deg, var(--c-sky-100), var(--c-cyan-300));
  overflow: hidden;
}
.modal-img img { width: 100%; height: 100%; object-fit: cover; display: block; }

.modal-body {
  flex: 1;
  overflow-y: auto;
  padding: 22px 20px 12px;
  -webkit-overflow-scrolling: touch;
}
.modal-body .caption {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 1.2px;
  text-transform: uppercase;
  color: var(--primary);
  margin-bottom: 4px;
}
.modal-title {
  font-size: 24px;
  font-weight: 800;
  color: var(--text);
  margin-bottom: 6px;
  letter-spacing: -0.4px;
  line-height: 1.2;
}
.modal-desc {
  font-size: 14px;
  color: var(--text-secondary);
  margin-bottom: 10px;
  line-height: 1.45;
}
.modal-allerg {
  display: inline-block;
  font-size: 12px;
  font-weight: 600;
  background: #FEF3C7;
  color: #92400E;
  padding: 5px 10px;
  border-radius: var(--r-sm);
  margin-bottom: 12px;
}
.modal-price {
  font-size: 22px;
  font-weight: 800;
  color: var(--primary-dark);
  margin-bottom: 18px;
}

/* ----- gruppi opzioni ----- */
.modal-gruppo {
  margin-bottom: 16px;
  padding: 14px 12px 10px;
  background: var(--c-sky-50);
  border-radius: var(--r-md);
  border: 1px solid var(--c-sky-100);
}
.modal-gruppo:last-of-type { margin-bottom: 8px; }

.modal-gruppo-head {
  display: flex; align-items: center; justify-content: space-between;
  gap: 8px;
  margin-bottom: 10px;
  padding: 0 4px;
}
.modal-gruppo-title {
  font-size: 14.5px;
  font-weight: 700;
  color: var(--text);
  letter-spacing: -0.1px;
}

.badge-obbligatorio,
.badge-opzionale {
  display: inline-flex;
  align-items: center;
  font-size: 10.5px;
  font-weight: 700;
  padding: 3px 9px;
  border-radius: var(--r-pill);
  letter-spacing: 0.4px;
  text-transform: uppercase;
  white-space: nowrap;
}
.badge-obbligatorio {
  background: #FEE2E2;
  color: #B91C1C;
}
.badge-opzionale {
  background: var(--c-sky-100);
  color: var(--primary-dark);
}

.modal-opzioni {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

/* ----- opt button (selezione opzione) ----- */
.opt-btn {
  display: flex;
  align-items: center;
  width: 100%;
  padding: 12px 14px;
  background: var(--bg-card);
  border: 2px solid var(--border-soft);
  border-radius: var(--r-sm);
  font-size: 14px;
  font-weight: 600;
  color: var(--text);
  text-align: left;
  cursor: pointer;
  transition: all 0.12s;
  position: relative;
  gap: 10px;
}
.opt-btn:hover {
  border-color: var(--c-sky-200);
  background: var(--c-sky-50);
}
.opt-btn:active { transform: scale(0.98); }
.opt-btn.active {
  background: linear-gradient(135deg, var(--c-sky-100), var(--c-sky-50));
  border-color: var(--primary);
  box-shadow: 0 0 0 1px var(--primary);
}
.opt-btn.active::before {
  content: '';
  position: absolute;
  left: 12px;
  width: 18px; height: 18px;
  border-radius: var(--r-pill);
  background: var(--primary);
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'><polyline points='20 6 9 17 4 12'/></svg>");
  background-size: 14px;
  background-position: center;
  background-repeat: no-repeat;
  flex-shrink: 0;
}
.opt-btn.active .opt-name { padding-left: 26px; }
.opt-btn .opt-name {
  flex: 1;
  line-height: 1.3;
  transition: padding 0.12s;
}
.opt-btn .opt-prezzo {
  font-size: 13px;
  font-weight: 700;
  color: var(--primary-dark);
  white-space: nowrap;
}
.opt-btn.active .opt-prezzo { color: var(--primary-dark); }

/* ----- field note ----- */
.modal-field {
  margin-top: 14px;
  margin-bottom: 8px;
}
.modal-field label {
  display: block;
  font-size: 12.5px;
  font-weight: 700;
  color: var(--text-secondary);
  margin-bottom: 6px;
  letter-spacing: 0.2px;
  text-transform: uppercase;
}
.modal-field textarea {
  width: 100%;
  min-height: 64px;
  resize: vertical;
  padding: 10px 12px;
  border: 1.5px solid var(--border-soft);
  border-radius: var(--r-sm);
  font-family: inherit;
  font-size: 14px;
  color: var(--text);
  background: var(--bg-card);
  transition: border-color 0.12s, box-shadow 0.12s;
  outline: 0;
}
.modal-field textarea:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px var(--c-sky-100);
}
.modal-field textarea::placeholder { color: var(--text-muted); }

/* ----- footer (qty + add) ----- */
.modal-footer {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 16px calc(14px + env(safe-area-inset-bottom, 0));
  background: var(--bg-card);
  border-top: 1px solid var(--border-soft);
  box-shadow: 0 -4px 16px rgba(14, 165, 233, 0.06);
}
.modal-footer .btn { flex: 1; }
.modal-footer .btn-lg { padding: 14px 20px; font-size: 16px; }

/* qty stepper */
.qty-stepper {
  display: inline-flex;
  align-items: center;
  background: var(--c-sky-50);
  border-radius: var(--r-pill);
  padding: 4px;
  gap: 0;
  flex-shrink: 0;
}
.qty-stepper button {
  width: 36px; height: 36px;
  border-radius: var(--r-pill);
  background: transparent;
  color: var(--primary-dark);
  font-size: 20px; font-weight: 700; line-height: 1;
  display: inline-flex; align-items: center; justify-content: center;
  transition: all 0.12s;
}
.qty-stepper button:hover {
  background: var(--c-sky-200);
}
.qty-stepper button:active { transform: scale(0.86); }
.qty-stepper button:disabled {
  opacity: 0.35;
  cursor: not-allowed;
}
.qty-stepper .qty-val {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 32px;
  font-size: 16px;
  font-weight: 800;
  color: var(--text);
  padding: 0 4px;
}

/* btn-lg / btn-outline */
.btn-lg { padding: 14px 22px; font-size: 16px; min-height: 50px; }
.btn-outline {
  background: transparent;
  color: var(--primary-dark);
  border: 1.5px solid var(--c-sky-200);
}
.btn-outline:hover { background: var(--c-sky-50); border-color: var(--primary); }

/* ----- riepilogo sub-prodotto (mostrato sotto opt-btn quando configurato) ----- */
.opt-btn .opt-sub-summary {
  display: block;
  font-size: 11.5px;
  color: var(--text-secondary);
  font-weight: 500;
  margin-top: 4px;
  font-style: italic;
}
.opt-btn .opt-sub-arrow {
  font-size: 18px;
  color: var(--primary);
  margin-left: 6px;
}


/* ============================================================
   CHECKOUT / GRAZIE / PRODOTTO / 404 — revamp 2026-05-07
   ============================================================ */

.container {
  max-width: 720px;
  margin: 0 auto;
  padding: 0 var(--gap-md);
}

/* ----- alert (errori orari, etc) ----- */
.alert {
  padding: 14px 18px;
  border-radius: var(--r-md);
  font-size: 14px;
  font-weight: 600;
  display: flex; align-items: center; gap: 10px;
  margin-bottom: var(--gap-md);
}
.alert-error {
  background: #FEE2E2;
  color: #B91C1C;
  border: 1px solid #FECACA;
}
.alert-success {
  background: #D1FAE5;
  color: #047857;
  border: 1px solid #A7F3D0;
}
.alert-info {
  background: var(--c-sky-100);
  color: var(--primary-dark);
  border: 1px solid var(--c-sky-200);
}

/* ----- checkout cards (riepilogo / sconti / dati cliente) ----- */
.checkout-summary {
  background: var(--bg-card);
  border-radius: var(--r-md);
  padding: 18px 18px 16px;
  margin-bottom: var(--gap-md);
  box-shadow: var(--shadow-sm);
}
.checkout-summary h3 {
  font-size: 16px;
  font-weight: 800;
  color: var(--text);
  margin-bottom: 14px;
  letter-spacing: -0.2px;
}

.checkout-row {
  display: flex; align-items: center; justify-content: space-between;
  gap: 10px;
  padding: 10px 0;
  border-bottom: 1px solid var(--border-soft);
  font-size: 14px;
  color: var(--text);
}
.checkout-row:last-child { border-bottom: 0; }
.checkout-row .price {
  font-weight: 700;
  color: var(--primary-dark);
  white-space: nowrap;
}
.checkout-row .qty-pill {
  display: inline-block;
  background: var(--c-sky-100);
  color: var(--primary-dark);
  font-weight: 700;
  font-size: 12px;
  padding: 2px 8px;
  border-radius: var(--r-pill);
  margin-right: 8px;
}
.checkout-row .row-name { flex: 1; line-height: 1.35; }
.checkout-row .row-name .row-extras {
  display: block;
  font-size: 11.5px;
  color: var(--text-secondary);
  font-weight: 500;
  margin-top: 2px;
}

/* totale finale grande */
.checkout-totals {
  margin-top: 12px;
  padding-top: 12px;
  border-top: 2px dashed var(--c-sky-200);
}
.checkout-totals .row {
  display: flex; justify-content: space-between; align-items: center;
  font-size: 14px; padding: 4px 0;
  color: var(--text-secondary);
}
.checkout-totals .row .val { color: var(--text); font-weight: 600; }
.checkout-totals .row.discount .val { color: var(--c-rose-500); }
.checkout-totals .total {
  display: flex; justify-content: space-between; align-items: center;
  margin-top: 8px;
  padding-top: 10px;
  border-top: 1px solid var(--border-soft);
  font-size: 18px;
  font-weight: 800;
  color: var(--text);
}
.checkout-totals .total span:last-child {
  font-size: 22px;
  color: var(--primary-dark);
}

/* form fields uniformi (checkout) */
.field {
  margin-bottom: 14px;
}
.field:last-child { margin-bottom: 0; }
.field label {
  display: block;
  font-size: 12.5px;
  font-weight: 700;
  color: var(--text-secondary);
  margin-bottom: 6px;
  letter-spacing: 0.2px;
  text-transform: uppercase;
}
.field input,
.field textarea {
  width: 100%;
  padding: 12px 14px;
  border: 1.5px solid var(--border-soft);
  border-radius: var(--r-sm);
  font-family: inherit;
  font-size: 15px;
  color: var(--text);
  background: var(--bg-card);
  transition: border-color 0.12s, box-shadow 0.12s;
  outline: 0;
  -webkit-appearance: none;
}
.field textarea {
  min-height: 70px;
  resize: vertical;
}
.field input:focus,
.field textarea:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px var(--c-sky-100);
}
.field input::placeholder,
.field textarea::placeholder { color: var(--text-muted); }

/* discount input row (coupon/giftcard) */
.discount-row .discount-input-row {
  display: flex; gap: 8px;
}
.discount-row .discount-input-row input { flex: 1; }
.discount-row .discount-input-row .btn { flex-shrink: 0; padding: 10px 18px; }

/* applied coupon/gift card chip */
.discount-applied {
  display: flex; align-items: center; gap: 8px;
  padding: 10px 12px;
  background: var(--c-sky-50);
  border: 1px solid var(--c-sky-200);
  border-radius: var(--r-sm);
  font-size: 13px;
  font-weight: 600;
  color: var(--primary-dark);
  margin-top: 8px;
}
.discount-applied .remove {
  margin-left: auto;
  width: 26px; height: 26px;
  border-radius: var(--r-pill);
  background: var(--c-rose-500);
  color: #fff;
  font-size: 14px;
  display: inline-flex; align-items: center; justify-content: center;
}

/* ============================================================
   GRAZIE PAGE
   ============================================================ */
.success-card {
  margin: 24px var(--gap-md);
  padding: 32px 24px 28px;
  background: var(--bg-card);
  border-radius: var(--r-lg);
  text-align: center;
  box-shadow: var(--shadow-md);
  position: relative;
  overflow: hidden;
}
.success-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 90px;
  background: linear-gradient(135deg, var(--c-emerald-500), var(--c-cyan-400));
  opacity: 0.1;
  z-index: 0;
}
.success-icon {
  position: relative;
  width: 78px; height: 78px;
  margin: 0 auto 16px;
  border-radius: var(--r-pill);
  background: linear-gradient(135deg, var(--c-emerald-500), var(--c-cyan-400));
  color: #fff;
  font-size: 42px;
  font-weight: 700;
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 8px 24px rgba(16, 185, 129, 0.40);
  z-index: 1;
  animation: bounce 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
}
@keyframes bounce {
  0%   { transform: scale(0); }
  60%  { transform: scale(1.15); }
  100% { transform: scale(1); }
}
.success-card h2 {
  font-size: 24px;
  font-weight: 800;
  color: var(--text);
  margin-bottom: 4px;
  position: relative; z-index: 1;
}
.success-card > p {
  position: relative; z-index: 1;
  font-size: 15px;
}

.order-code {
  display: inline-block;
  margin: 18px auto 12px;
  padding: 10px 24px;
  background: var(--c-sky-100);
  color: var(--primary-dark);
  border-radius: var(--r-pill);
  font-family: 'SF Mono', 'Menlo', monospace;
  font-size: 18px;
  font-weight: 800;
  letter-spacing: 2px;
}

.pickup-time {
  margin: 14px -8px 4px;
  padding: 14px 16px;
  background: linear-gradient(135deg, var(--c-amber-300), var(--c-amber-400));
  border-radius: var(--r-md);
  color: var(--c-sky-900);
  text-align: center;
  box-shadow: 0 6px 16px rgba(245, 158, 11, 0.25);
}
.pickup-time .label {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 1.4px;
  opacity: 0.8;
  margin-bottom: 2px;
}
.pickup-time .time {
  font-size: 36px;
  font-weight: 800;
  letter-spacing: -1px;
  line-height: 1;
}

/* stato ordine (live) */
#grazie-stato .stato-pill {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 8px 16px;
  background: var(--c-sky-100);
  color: var(--primary-dark);
  border-radius: var(--r-pill);
  font-size: 13px;
  font-weight: 700;
}
#grazie-stato .stato-pill.pronto { background: #D1FAE5; color: #047857; }
#grazie-stato .stato-pill.in-preparazione { background: var(--c-amber-300); color: #92400E; }

/* ============================================================
   PRODOTTO singolo (pagina dettaglio non config)
   ============================================================ */
.product-hero {
  width: 100%;
  height: 240px;
  background: linear-gradient(135deg, var(--c-sky-100), var(--c-cyan-300));
  display: flex; align-items: center; justify-content: center;
  font-size: 100px;
  overflow: hidden;
}
.product-hero img {
  width: 160px; height: 160px;
  object-fit: contain;
}

.product-info {
  padding: 22px var(--gap-md) calc(80px + env(safe-area-inset-bottom, 0));
  max-width: 720px;
  margin: 0 auto;
}
.product-info .caption {
  font-size: 11.5px;
  font-weight: 700;
  color: var(--primary);
  letter-spacing: 1.2px;
  margin-bottom: 4px;
}
.product-info h1 {
  font-size: 28px;
  font-weight: 800;
  color: var(--text);
  margin-bottom: 8px;
  letter-spacing: -0.5px;
  line-height: 1.15;
}
.product-info .price-big {
  font-size: 26px;
  font-weight: 800;
  color: var(--primary-dark);
  margin-bottom: 16px;
}
.product-info .description {
  font-size: 15px;
  color: var(--text-secondary);
  line-height: 1.55;
  margin-bottom: 16px;
}
.product-info .allergens {
  display: inline-block;
  padding: 8px 14px;
  background: #FEF3C7;
  color: #92400E;
  border-radius: var(--r-sm);
  font-size: 13px;
  font-weight: 600;
  margin-bottom: 18px;
}

.product-config-summary {
  margin-top: 20px;
  padding: 16px;
  background: var(--c-sky-50);
  border-radius: var(--r-md);
  border: 1px solid var(--c-sky-100);
}
.product-config-summary .caption {
  margin-bottom: 8px;
}
.product-config-summary ul {
  list-style: none;
  padding: 0; margin: 0;
}
.product-config-summary li {
  display: flex; align-items: center; gap: 10px;
  padding: 8px 0;
  border-bottom: 1px dashed var(--c-sky-200);
  font-size: 14px;
}
.product-config-summary li:last-child { border-bottom: 0; }
.product-config-summary li strong {
  font-weight: 700;
  color: var(--text);
}

/* prod-detail-add (cta in fondo per non config) */
#prod-detail-add {
  margin-top: 24px;
  padding: 16px;
  background: var(--bg-card);
  border-radius: var(--r-md);
  box-shadow: var(--shadow-sm);
  display: flex; gap: 12px; align-items: center;
}
#prod-detail-add .btn { flex: 1; }

/* ============================================================
   404
   ============================================================ */
/* (.empty già definito) */


/* checkout-row generato dinamicamente da app.js: usa <strong> + .qty + .row-note */
.checkout-row > div:first-child { flex: 1; min-width: 0; }
.checkout-row strong {
  font-size: 14px;
  font-weight: 700;
  color: var(--text);
  display: block;
}
.checkout-row .qty {
  display: inline-block;
  margin-top: 6px;
  font-size: 12px;
  color: var(--text-secondary);
  font-weight: 600;
}
.checkout-row .row-note {
  font-size: 12.5px;
  color: var(--c-amber-500);
  font-style: italic;
  margin-top: 4px;
}
.checkout-row .scelte-list {
  margin-top: 4px;
  font-size: 12px;
  color: var(--text-secondary);
  line-height: 1.4;
  padding-left: 10px;
  border-left: 2px solid var(--c-sky-200);
}

/* spacing tra le sezioni del checkout */
#checkout-page .container { padding-top: 4px; padding-bottom: 24px; }
#checkout-page .hero { padding: 18px var(--gap-md) 22px; }
#checkout-page .hero h2 {
  font-size: 22px;
  font-weight: 700;
  color: #fff;
  margin: 0;
}

/* btn-block + btn-primary nel checkout */
#btn-paga, #btn-conferma-pagamento {
  margin-top: 16px;
  height: 56px;
  font-size: 17px;
  border-radius: var(--r-md);
  background: linear-gradient(135deg, var(--primary), var(--c-cyan-400));
  box-shadow: 0 4px 14px rgba(14, 165, 233, 0.40);
}
#btn-paga:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  background: var(--c-slate-300);
  box-shadow: none;
}


/* ============================================================
   NAVBAR LOGO + ORARI STRIP — 2026-05-07
   ============================================================ */
.nav-brand {
  flex: 1;
  display: flex; align-items: center; justify-content: center;
  height: 100%;
  text-decoration: none;
  min-width: 0;
  padding: 0 8px;
}
.nav-logo {
  max-height: 36px;
  max-width: 160px;
  width: auto;
  height: auto;
  object-fit: contain;
  filter: drop-shadow(0 1px 2px rgba(0,0,0,0.06));
}

/* Override: tolgo il nav-title (lo sostituisce il logo) */
.nav-title { display: none; }

/* ----- ORARI STRIP (sticky sotto cat-tabs su tutte le pagine) ----- */
.orari-strip {
  position: sticky;
  top: calc(var(--h-navbar) + var(--h-cat-tabs));
  z-index: 90;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 16px;
  background: var(--c-sky-100);
  color: var(--primary-dark);
  font-size: 13px;
  font-weight: 600;
  border-bottom: 1px solid var(--c-sky-200);
  transition: background 0.3s, color 0.3s;
}
.orari-strip.aperto {
  background: linear-gradient(90deg, #D1FAE5, #ECFEFF);
  color: #047857;
  border-bottom-color: #A7F3D0;
}
.orari-strip.chiuso {
  background: #FEE2E2;
  color: #B91C1C;
  border-bottom-color: #FECACA;
}
.orari-strip.orari-loading {
  background: var(--c-slate-100);
  color: var(--text-secondary);
  border-bottom-color: var(--border-soft);
}
.orari-strip .orari-dot {
  width: 8px; height: 8px;
  border-radius: 50%;
  background: currentColor;
  flex-shrink: 0;
  opacity: 0.6;
}
.orari-strip.aperto .orari-dot {
  background: #10B981;
  box-shadow: 0 0 0 4px rgba(16, 185, 129, 0.20);
  animation: pulse 2.4s infinite;
  opacity: 1;
}
.orari-strip.chiuso .orari-dot {
  background: var(--c-rose-500);
  opacity: 1;
}
.orari-strip .orari-text {
  flex: 1;
  line-height: 1.3;
}
.orari-strip strong { font-weight: 800; }

/* su pagine con orari-strip lo status-banner della home diventa ridondante: lo nascondo se anche orari-strip presente */
body:has(#orari-strip[data-aperto]) .status-banner { display: none; }

/* mobile: navbar logo size più piccolo */
@media (max-width: 380px) {
  .nav-logo { max-height: 28px; max-width: 110px; }
}


/* ============================================================
   ADMIN PANEL — revamp 2026-05-07
   ============================================================ */
body:has(.admin-shell), body:has(.admin-login-card) {
  background: linear-gradient(180deg, var(--c-sky-50), var(--c-sky-100));
  min-height: 100vh;
  padding-bottom: 0;
}

/* ----- LOGIN ----- */
.admin-login-card {
  max-width: 420px;
  width: 100%;
  background: #fff;
  padding: 36px 30px;
  border-radius: var(--r-lg);
  box-shadow: var(--shadow-lg);
  margin: auto;
}
.admin-login-card .login-brand {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  margin-bottom: 26px;
}
.admin-login-card .login-brand img {
  max-height: 60px;
  width: auto;
}
.admin-login-card .login-brand h2 {
  font-size: 18px;
  font-weight: 700;
  color: var(--text);
}
.admin-login-card .login-brand .login-sub {
  font-size: 12px;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: var(--primary);
  font-weight: 700;
}

/* ----- SHELL: sidebar + main ----- */
.admin-shell {
  display: grid;
  grid-template-columns: 240px 1fr;
  min-height: 100vh;
}
@media (max-width: 768px) {
  .admin-shell { grid-template-columns: 1fr; }
  .admin-side { position: sticky; top: 0; z-index: 50; }
}

.admin-side {
  background: linear-gradient(180deg, var(--c-sky-700), var(--c-sky-900));
  color: #fff;
  display: flex;
  flex-direction: column;
  padding: 18px 12px;
  height: 100vh;
  position: sticky;
  top: 0;
  overflow-y: auto;
}
@media (max-width: 768px) {
  .admin-side {
    height: auto;
    flex-direction: row;
    overflow-x: auto;
    overflow-y: hidden;
    padding: 10px;
    gap: 4px;
    align-items: center;
  }
  .admin-side > div[style*="flex:1"] { display: none; }
  .admin-side .brand { flex-shrink: 0; padding-right: 12px; border-right: 1px solid rgba(255,255,255,0.2); margin-right: 4px; }
  .admin-side a { flex-shrink: 0; padding: 8px 12px; font-size: 13px; }
  .admin-side a .ico { font-size: 14px; }
  .admin-side > div[style*="padding: 12px"] { flex-shrink: 0; padding: 0 8px !important; border-top: 0 !important; }
  .admin-side > div[style*="padding: 12px"] form { display: inline-block; margin-top: 0 !important; }
  .admin-side > div[style*="padding: 12px"] button { white-space: nowrap; }
}

.admin-side .brand {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 12px 18px;
  font-size: 16px;
  font-weight: 800;
  letter-spacing: -0.2px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.15);
  margin-bottom: 12px;
  color: #fff;
}
.admin-side .brand img {
  max-height: 32px;
  width: auto;
  filter: brightness(0) invert(1) drop-shadow(0 1px 2px rgba(0,0,0,0.25));
}

.admin-side a {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 11px 14px;
  border-radius: var(--r-sm);
  color: rgba(255, 255, 255, 0.85);
  font-size: 14px;
  font-weight: 600;
  text-decoration: none;
  margin-bottom: 4px;
  transition: all 0.12s;
}
.admin-side a:hover {
  background: rgba(255, 255, 255, 0.10);
  color: #fff;
}
.admin-side a.active,
.admin-side a[aria-current="page"] {
  background: rgba(255, 255, 255, 0.18);
  color: #fff;
  box-shadow: inset 3px 0 0 var(--c-amber-300);
}
.admin-side a .ico {
  font-size: 18px;
  width: 22px;
  text-align: center;
}

/* User block bottom (non admin-side a) */
.admin-side > div[style*="padding: 12px"] {
  font-size: 12px;
  color: rgba(255, 255, 255, 0.70);
}
.admin-side > div[style*="padding: 12px"] .btn-secondary {
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
  font-weight: 600;
}
.admin-side > div[style*="padding: 12px"] .btn-secondary:hover {
  background: rgba(255, 255, 255, 0.20);
}

/* ----- MAIN ----- */
.admin-main {
  padding: 22px 24px 60px;
  overflow-y: auto;
  max-width: 1400px;
}
.admin-main h1 {
  font-size: 26px;
  font-weight: 800;
  letter-spacing: -0.3px;
  margin-bottom: 18px;
  color: var(--text);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.admin-main h3 {
  font-size: 15px;
  font-weight: 700;
  color: var(--text);
  letter-spacing: -0.1px;
}

/* ----- KPI CARDS ----- */
.kpi-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 12px;
  margin-bottom: 22px;
}
.kpi {
  background: #fff;
  padding: 18px 20px;
  border-radius: var(--r-md);
  box-shadow: var(--shadow-sm);
  border-left: 4px solid var(--primary);
  transition: transform 0.15s, box-shadow 0.15s;
}
.kpi:hover { transform: translateY(-2px); box-shadow: var(--shadow-md); }
.kpi:nth-child(2) { border-left-color: var(--c-emerald-500); }
.kpi:nth-child(3) { border-left-color: var(--c-amber-400); }
.kpi:nth-child(4) { border-left-color: var(--c-cyan-400); }
.kpi:nth-child(5) { border-left-color: var(--c-rose-400); }
.kpi:nth-child(6) { border-left-color: var(--c-sky-400); }
.kpi .label {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 1.2px;
  color: var(--text-secondary);
  font-weight: 700;
  margin-bottom: 6px;
}
.kpi .value {
  font-size: 28px;
  font-weight: 800;
  color: var(--text);
  letter-spacing: -0.5px;
}
.kpi .delta {
  font-size: 11px;
  font-weight: 600;
  color: var(--success);
  margin-top: 4px;
}

/* ----- TABLE ----- */
.table-wrap {
  background: #fff;
  border-radius: var(--r-md);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  margin-bottom: 18px;
  border: 1px solid var(--border-soft);
}
.table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13.5px;
}
.table thead {
  background: var(--c-sky-50);
  border-bottom: 2px solid var(--c-sky-200);
}
.table th {
  text-align: left;
  padding: 12px 14px;
  font-weight: 700;
  color: var(--primary-dark);
  font-size: 12px;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  white-space: nowrap;
}
.table td {
  padding: 12px 14px;
  border-bottom: 1px solid var(--border-soft);
  vertical-align: middle;
  color: var(--text);
}
.table tbody tr:hover {
  background: var(--c-sky-50);
}
.table tbody tr:last-child td { border-bottom: 0; }
.table strong { font-weight: 700; }

@media (max-width: 768px) {
  .table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; }
  .table { min-width: 600px; }
}

/* ----- BADGES (stato ordine) ----- */
.badge {
  display: inline-flex;
  align-items: center;
  padding: 4px 10px;
  border-radius: var(--r-pill);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.4px;
  text-transform: uppercase;
  white-space: nowrap;
}
.badge-nuovo,
.badge-pagato         { background: var(--c-sky-100);    color: var(--primary-dark); }
.badge-preparazione   { background: var(--c-amber-300);  color: #92400E; }
.badge-pronto         { background: #D1FAE5;             color: #047857; }
.badge-ritirato       { background: var(--c-slate-100);  color: var(--text-secondary); }
.badge-annullato,
.badge-rimborsato     { background: #FEE2E2;             color: #B91C1C; }

/* ----- BUTTONS specifici admin ----- */
.btn-danger {
  background: var(--c-rose-500);
  color: #fff;
}
.btn-danger:hover { background: #E11D48; }

/* admin field-row (form 2 colonne) */
.field-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}
@media (max-width: 600px) { .field-row { grid-template-columns: 1fr; } }

.checkbox-row {
  display: flex; align-items: center;
  gap: 8px;
  margin-bottom: 12px;
  padding: 10px 12px;
  background: var(--c-sky-50);
  border-radius: var(--r-sm);
  cursor: pointer;
}
.checkbox-row input { accent-color: var(--primary); width: 16px; height: 16px; }

/* mobile grid */
.grid-mob-1 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}
@media (max-width: 700px) { .grid-mob-1 { grid-template-columns: 1fr; } }

/* admin cards (sezioni form) */
.admin-card {
  background: #fff;
  padding: 20px;
  border-radius: var(--r-md);
  box-shadow: var(--shadow-sm);
  margin-bottom: 16px;
}
.admin-card h3 { margin-bottom: 12px; }

/* admin h1 azioni */
.admin-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  align-items: center;
}
.admin-actions .btn {
  padding: 8px 16px;
  font-size: 14px;
  min-height: 0;
}

/* admin filter-bar */
.admin-filter-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
  gap: 12px;
  flex-wrap: wrap;
  background: #fff;
  padding: 12px 14px;
  border-radius: var(--r-md);
  box-shadow: var(--shadow-sm);
}


/* Hide bottom-bar quando si è già nel checkout (no senso "vai al carrello") */
body:has(#checkout-page) .bottom-bar { display: none !important; }
body:has(#grazie-page)   .bottom-bar { display: none !important; }

/* Selettore metodo pagamento (cassa / stripe) */
#metodo-pagamento .pagamento-option {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px;
  border: 2px solid var(--border-soft);
  border-radius: var(--r-md);
  cursor: pointer;
  margin-bottom: 8px;
  transition: all 0.15s;
}
#metodo-pagamento .pagamento-option:last-child { margin-bottom: 0; }
#metodo-pagamento .pagamento-option:hover { border-color: var(--c-sky-200); background: var(--c-sky-50); }
#metodo-pagamento .pagamento-option.selected {
  border-color: var(--primary);
  background: linear-gradient(135deg, var(--c-sky-50), #fff);
  box-shadow: 0 0 0 1px var(--primary);
}
#metodo-pagamento .pagamento-option input { flex-shrink: 0; accent-color: var(--primary); width: 18px; height: 18px; }
#metodo-pagamento .pagamento-info { flex: 1; }
#metodo-pagamento .pagamento-title {
  font-size: 15px; font-weight: 700; color: var(--text);
  line-height: 1.2; margin-bottom: 2px;
}
#metodo-pagamento .pagamento-desc {
  font-size: 12.5px; color: var(--text-secondary); line-height: 1.3;
}
