:root{
  --bg:#070A0F;
  --surface: rgba(255,255,255,.06);
  --surface2: rgba(255,255,255,.08);
  --line: rgba(255,255,255,.10);

  --text: rgba(255,255,255,.92);
  --muted: rgba(255,255,255,.62);
  --muted2: rgba(255,255,255,.48);

  --accent: #7AF0FF;      /* accento freddo lounge */
  --accentSoft: rgba(122,240,255,.14);

  --ok: rgba(92,255,178,.18);
  --warn: rgba(255,211,110,.18);
  --danger: rgba(255,90,122,.18);

  --radius: 18px;
  --radius2: 22px;

  --shadow: 0 18px 46px rgba(0,0,0,.46);
  --shadow2: 0 10px 26px rgba(0,0,0,.36);
}

*{box-sizing:border-box}
html{scroll-behavior:smooth}
body{
  margin:0;
  min-height:100%;
  color:var(--text);
  font-family: ui-sans-serif, system-ui, -apple-system, Segoe UI, Roboto, Helvetica, Arial;
  background: var(--bg);
}

/* Sfondo “lounge” stabile (una sola luce morbida, fissa) */
body::before{
  content:"";
  position:fixed;
  inset:0;
  pointer-events:none;
  z-index:-1;
  background:
    radial-gradient(1100px 720px at 25% -10%, rgba(122,240,255,.10), transparent 60%),
    radial-gradient(900px 600px at 85% 0%, rgba(122,240,255,.06), transparent 55%),
    linear-gradient(180deg, #06080D 0%, #070A0F 40%, #070A0F 100%);
  /* niente animazioni, niente stacchi */
}

a{color:inherit; text-decoration:none}
.container{max-width:1040px; margin:0 auto; padding:18px}

/* Topbar stabile: niente gradient, niente “stacchi” */
.topbar{
  position:sticky; top:0; z-index:20;
  padding:14px 14px 10px;
  border-bottom:1px solid var(--line);
  background: rgba(7,10,15,.72);
  backdrop-filter: blur(12px);
}

.brand .title{font-size:20px; font-weight:950; letter-spacing:.2px}
.brand .subtitle{font-size:12.5px; color:var(--muted); margin-top:6px}

/* Controls */
.controls{
  display:flex; gap:10px; align-items:center;
  margin-top:12px;
}
.search{
  flex:1;
  display:flex; gap:10px; align-items:center;
  padding:12px 14px;
  border-radius:999px;
  border:1px solid var(--line);
  background: rgba(0,0,0,.18);
}
.search input{
  width:100%;
  border:none; outline:none; background:transparent;
  color:var(--text);
  font-size:14px;
}
.search span{opacity:.8}

.btn{
  border:none; cursor:pointer;
  border-radius:999px;
  padding:11px 14px;
  font-weight:900;
  color: rgba(0,0,0,.92);
  background: var(--accent);
  box-shadow: 0 10px 24px rgba(122,240,255,.12);
  transition: transform .12s ease, filter .12s ease;
}
.btn:active{transform: scale(.98)}
.btn.secondary{
  color:var(--text);
  background: rgba(255,255,255,.06);
  border:1px solid var(--line);
  box-shadow:none;
}
.btn.secondary:hover{filter: brightness(1.08)}

/* Category nav */
.catnav{
  display:flex; gap:8px; overflow:auto;
  padding-top:10px; margin-top:8px;
  scrollbar-width:none;
}
.catnav::-webkit-scrollbar{display:none}
.cat{
  white-space:nowrap;
  padding:9px 12px;
  border-radius:999px;
  border:1px solid var(--line);
  background: rgba(255,255,255,.04);
  color:var(--muted);
  font-size:13px;
  cursor:pointer;
  transition: transform .12s ease, background .12s ease, color .12s ease, border-color .12s ease;
}
.cat:hover{transform: translateY(-1px); background: rgba(255,255,255,.06)}
.cat.active{
  color: var(--text);
  border-color: rgba(122,240,255,.35);
  background: rgba(122,240,255,.08);
}

/* Filters panel */
.filters{
  border:1px solid var(--line);
  border-radius: var(--radius2);
  padding:14px;
  margin:14px 0;
  background: rgba(255,255,255,.05);
  box-shadow: var(--shadow2);
}
.filtersRow{display:flex; gap:12px; align-items:center; flex-wrap:wrap; margin-top:10px}
.filtersRow:first-child{margin-top:0}
.filtersTitle{font-weight:950; letter-spacing:.2px}
.chips{display:flex; gap:8px; flex-wrap:wrap}
.chip{
  padding:8px 10px;
  border-radius:999px;
  border:1px solid var(--line);
  background: rgba(0,0,0,.18);
  color:var(--muted);
  font-size:12px;
  cursor:pointer;
  transition: transform .12s ease, background .12s ease, color .12s ease, border-color .12s ease;
}
.chip:hover{transform: translateY(-1px)}
.chip.on{
  color: var(--text);
  border-color: rgba(122,240,255,.35);
  background: rgba(122,240,255,.10);
}
.toggle{display:flex; gap:10px; align-items:center; color:var(--muted)}
.toggle input{transform:scale(1.1)}
.hint{margin-top:10px; color:var(--muted2); font-size:12px}

/* Sections */
.section{margin:18px 0 28px; scroll-margin-top: var(--scrollPad, 140px);}
.section h2{
  margin:0 0 10px;
  font-size:15px;
  font-weight:950;
  letter-spacing:.25px;
  color: rgba(255,255,255,.90);
}
.section h2::after{
  content:"";
  display:block;
  height:1px;
  margin-top:10px;
  background: linear-gradient(90deg, rgba(122,240,255,.28), transparent);
}

/* Grid */
.grid{
  display:grid;
  grid-template-columns:repeat(1,minmax(0,1fr));
  gap:12px;
}
@media (min-width:760px){
  .grid{grid-template-columns:repeat(2,minmax(0,1fr))}
}

/* Item cards: pulite, lounge */
.item{
  border:1px solid var(--line);
  border-radius: var(--radius2);
  padding:14px;
  background: rgba(255,255,255,.05);
  box-shadow: var(--shadow2);
  transition: transform .12s ease, border-color .12s ease, background .12s ease;
}
.item:hover{
  transform: translateY(-2px);
  border-color: rgba(122,240,255,.22);
  background: rgba(255,255,255,.06);
}
.item .info{min-width:0}
.item .nameRow{display:flex; align-items:flex-start; justify-content:space-between; gap:12px}
.item .name{
  font-weight:950;
  font-size:14.5px;
  letter-spacing:.1px;
}
.item .price{
  font-weight:950;
  white-space:nowrap;
  padding:6px 10px;
  border-radius:999px;
  border:1px solid rgba(122,240,255,.28);
  background: var(--accentSoft);
  color: rgba(255,255,255,.92);
}
.item .desc{
  margin-top:8px;
  color:var(--muted);
  font-size:13px;
  line-height:1.35;
}

/* Badges */
.badges{display:flex; gap:6px; flex-wrap:wrap; margin-top:10px}
.badge{
  font-size:11px;
  padding:6px 9px;
  border-radius:999px;
  border:1px solid var(--line);
  background: rgba(0,0,0,.18);
  color:var(--muted);
}
.badge.ok{border-color: rgba(92,255,178,.25); background: var(--ok); color: rgba(255,255,255,.86)}
.badge.warn{border-color: rgba(255,211,110,.25); background: var(--warn); color: rgba(255,255,255,.86)}
.badge.danger{border-color: rgba(255,90,122,.25); background: var(--danger); color: rgba(255,255,255,.86)}

/* Actions/cart */
.actions{display:flex; gap:8px; margin-top:12px; flex-wrap:wrap; align-items:center}
.smallbtn{
  background: rgba(255,255,255,.06);
  border:1px solid var(--line);
  color: var(--text);
  padding:9px 11px;
  border-radius:999px;
  cursor:pointer;
  font-weight:900;
  font-size:12px;
  user-select:none;
  transition: transform .12s ease, background .12s ease;
}
.smallbtn:hover{transform: translateY(-1px); background: rgba(255,255,255,.08)}
.smallbtn:active{transform: scale(.98)}
.smallbtn.add{
  border-color: rgba(122,240,255,.28);
  background: rgba(122,240,255,.10);
}
.qty{
  display:inline-flex; align-items:center; gap:10px;
  padding:7px 10px;
  border-radius:999px;
  border:1px solid var(--line);
  background: rgba(0,0,0,.18);
}
.qty b{min-width:18px; text-align:center}

/* Footer stabile */
.footer{
  position:sticky; bottom:0; z-index:20;
  border-top:1px solid var(--line);
  background: rgba(7,10,15,.72);
  backdrop-filter: blur(12px);
  padding:12px 14px;
}
.footerInfo{color:var(--muted); font-size:12px}
.footerActions{margin-top:10px; display:flex; gap:10px; justify-content:flex-end; flex-wrap:wrap}

/* Toast */
.toast{
  position:fixed; left:50%; bottom:92px;
  transform:translateX(-50%);
  padding:10px 12px;
  border-radius:999px;
  border:1px solid var(--line);
  background: rgba(0,0,0,.55);
  backdrop-filter: blur(10px);
  color: var(--text);
  font-size:13px;
  opacity:0;
  pointer-events:none;
  transition:opacity .18s ease;
  max-width:min(92vw, 780px);
  white-space:nowrap;
  overflow:hidden;
  text-overflow:ellipsis;
  box-shadow: var(--shadow2);
}
.toast.show{opacity:1}

/* Modal / bottom sheet ("Dillo al cameriere") */
.modalBackdrop{
  position:fixed;
  inset:0;
  background: rgba(0,0,0,.55);
  backdrop-filter: blur(4px);
  z-index:60;
}

.modal{
  position:fixed;
  left:50%;
  bottom:14px;
  transform: translateX(-50%);
  width: min(94vw, 720px);
  max-height: min(78vh, 640px);
  overflow:auto;
  border:1px solid var(--line);
  border-radius: var(--radius2);
  background: rgba(7,10,15,.92);
  box-shadow: var(--shadow);
  z-index:61;
  padding:14px;
}

.modalHeader{
  display:flex;
  align-items:flex-start;
  justify-content:space-between;
  gap:12px;
}
.modalTitle{font-weight:950; letter-spacing:.2px; font-size:15px}
.modalSub{margin-top:6px; color:var(--muted); font-size:12.5px}

.modalList{margin-top:12px; display:flex; flex-direction:column; gap:10px}
.modalLine{
  display:flex;
  justify-content:space-between;
  gap:12px;
  padding:10px 12px;
  border-radius:14px;
  border:1px solid var(--line);
  background: rgba(255,255,255,.04);
}
.modalLine .left{min-width:0}
.modalLine .name{font-weight:900; font-size:13.5px; overflow:hidden; text-overflow:ellipsis; white-space:nowrap}
.modalLine .meta{margin-top:4px; color:var(--muted); font-size:12px}
.modalLine .right{white-space:nowrap; font-weight:950; color: rgba(255,255,255,.90)}

.modalTotal{
  margin-top:12px;
  padding:10px 12px;
  border-radius:14px;
  border:1px solid rgba(122,240,255,.22);
  background: rgba(122,240,255,.08);
  font-weight:950;
}

.modalActions{
  margin-top:12px;
  display:flex;
  gap:10px;
  justify-content:flex-end;
  flex-wrap:wrap;
}
