:root{
  --bg:#07070a;
  --card:#0f1016;
  --text:#f6f7fb;
  --muted:#b9bfd0;
  --line:#23283a;
  --accent:#ffb703;   /* oro */
}

*{ box-sizing:border-box; }

html,body{
  margin:0;
  padding:0;
  background:var(--bg);
  color:var(--text);
  font-family: system-ui, -apple-system, Segoe UI, Roboto, Arial;
}

a{ color:inherit; }

.container{ max-width: 980px; margin: 0 auto; padding: 16px; }
.muted{ color: var(--muted); }

.card{
  background: var(--card);
  border:1px solid var(--line);
  border-radius: 18px;
  padding: 18px;
  box-shadow: 0 10px 30px rgba(0,0,0,.25);
}

.section-title{ margin: 0 0 8px; font-size: 18px; color: var(--accent); }
.footer{ padding: 18px 0; text-align:center; }

/* ------------------------------
   Buttons / Inputs
------------------------------ */
.btn{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  padding: 10px 14px;
  border-radius: 12px;
  background: transparent;
  border:1px solid var(--line);
  color: var(--text);
  text-decoration:none;
  cursor:pointer;
}

.btn--primary{
  background: var(--accent);
  border-color: transparent;
  color:#1a1b1f;
  font-weight: 900;
}

.input, .select{
  width: min(340px, 100%);
  padding: 10px 12px;
  border-radius: 12px;
  border:1px solid var(--line);
  background: #0f1117;
  color: var(--text);
}

/* ------------------------------
   Header / Topbar
------------------------------ */
.topbar{
  position: sticky;
  top:0;
  z-index: 10;
  background: rgba(11,12,16,.85);
  backdrop-filter: blur(10px);
  border-bottom:1px solid var(--line);
}

/* left hamburger, center logo, right language */
.topbar__inner{
  display: grid;
  grid-template-columns: 44px 1fr 92px;
  align-items: center;
  gap: 10px;
  padding: 12px 16px;
}

.hamburger{
  width:44px;
  height:44px;
  display:grid;
  place-items:center;
  border-radius:12px;
  border:1px solid var(--line);
  background: rgba(255,255,255,0.02);
  cursor:pointer;
}

.hamburger span{
  display:block;
  width:18px;
  height:2px;
  background: var(--text);
  margin:2px 0;
  border-radius:2px;
}

/* compact version */
.hamburger.compact{
  width: 38px;
  height: 38px;
  border-radius: 10px;
}

.hamburger.compact span{
  width: 18px;
  height: 2px;
  border-radius: 2px;
}

.brand{
  display:flex;
  gap:10px;
  align-items:center;
  text-decoration:none;
}

.brand--center{
  justify-self: center;
  text-decoration: none;
}

.brand__logoImg{
  height: 60px;
  width: auto;
  display: block;
  object-fit: contain;
}

@media (max-width: 520px){
  .brand__logoImg{ height: 50px; }
}

.langSelect{
  justify-self: end;
  width: 92px;
  height: 38px;
  border-radius: 10px;
}

/* ------------------------------
   Home layout bits
------------------------------ */
.hero{ display:grid; gap:12px; }
.hero h1{ margin:0 0 6px; font-size: 34px; }
.hero p{ margin:0; }
.hero__actions{ display:flex; gap:10px; flex-wrap:wrap; margin-top: 14px; }

.grid{
  margin-top: 16px;
  display:grid;
  grid-template-columns: 1fr;
  gap: 12px;
}

@media (min-width: 860px){
  .grid{ grid-template-columns: 1.2fr .8fr; }
}

.badge{
  display:inline-flex;
  gap:8px;
  align-items:center;
  padding: 6px 10px;
  border-radius:999px;
  border:1px solid var(--line);
  font-size: 12px;
  color: var(--muted);
}

/* ------------------------------
   Menu toolbar + Tabs
------------------------------ */
.menu-toolbar{
  display:flex;
  gap:10px;
  flex-wrap:wrap;
  align-items:center;
  justify-content:space-between;

  position: sticky;
  top: 64px; /* sotto la topbar */
  z-index: 5;
  padding: 10px;
  border-radius: 14px;
  background: rgba(15,16,22,.85);
  backdrop-filter: blur(10px);
  border: 1px solid var(--line);
}

.menu-toolbar__left{
  display:flex;
  gap:10px;
  flex-wrap:wrap;
  align-items:center;
}

.section-tabs{
  display: flex;
  gap: 10px;
  padding: 10px 14px 0;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}

.section-tabs::-webkit-scrollbar{ display:none; }

.section-tabs .tab{
  flex: 0 0 auto;
  border: 1px solid rgba(255,255,255,.10);
  background: rgba(255,255,255,.04);
  color: rgba(255,255,255,.86);
  padding: 10px 14px;
  border-radius: 999px;
  font-weight: 600;
  letter-spacing: .2px;
  transition: transform .12s ease, background .12s ease, border-color .12s ease;
}

.section-tabs .tab:active{ transform: scale(.98); }

.section-tabs .tab.is-active{
  background: rgba(255, 200, 0, .16);
  border-color: rgba(255, 200, 0, .30);
  color: rgba(255, 230, 140, 1);
}

/* ------------------------------
   Menu sections + items
------------------------------ */
.menu-section{
  margin-top: 16px;
  padding: 14px;
  border-radius: 18px;
  border: 1px solid var(--line);
  background: rgba(255,255,255,0.02);
}

.menu-section h2{
  margin: 18px 0 10px;
  font-size: 18px;
  color: var(--accent);
}

.menu-item{
  display:flex;
  gap:12px;
  align-items:flex-start;
  border-top: 1px solid rgba(255,255,255,0.06);
  padding: 14px 0;
}

.menu-item:first-of-type{ border-top: none; }

.menu-item__img{
  width: 76px;
  height: 76px;
  border-radius: 16px;
  object-fit: cover;
  border:1px solid var(--line);
  background:#0f1117;
  flex: 0 0 auto;
}

.menu-item__main{
  flex: 1;
  min-width: 0; /* evita titolo invisibile su flex */
}

/* riga alta: titolo sinistra, prezzo destra */
.menu-item__head{
  display:flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
}

.menu-item__title{
  font-weight: 900;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.price{
  font-weight: 900;
  font-size: 16px;
  letter-spacing:.2px;
  white-space: nowrap;
  flex: 0 0 auto;
}

.menu-item__desc{
  font-size: 14px;
  margin-top: 3px;
}

/* Tags */
.tag{
  display:inline-flex;
  align-items:center;
  gap:6px;
  font-size: 12px;
  color: var(--muted);
  padding: 4px 8px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(255,255,255,0.02);
}

/* Featured section */
.featured{
  border: 1px solid rgba(255,183,3,.35);
  background: rgba(255,183,3,.06);
}

.featured h2{ margin-top: 0; }

/* ------------------------------
   Allergens tooltip
------------------------------ */
.allergen-row{
  display:flex;
  flex-wrap:wrap;
  gap:6px;
  margin-top:8px;
}

.allergen{
  display:inline-flex;
  align-items:center;
  gap:6px;
  font-size:12px;
  color: var(--muted);
  padding: 4px 8px;
  border: 1px solid rgba(255,255,255,0.10);
  border-radius: 999px;
  background: rgba(255,255,255,0.02);
  position: relative;
  cursor: help;
}

.allergen::after{
  content: attr(data-tip);
  position: absolute;
  left: 0;
  bottom: calc(100% + 10px);
  white-space: nowrap;
  padding: 8px 10px;
  border-radius: 10px;
  background: rgba(15, 18, 24, 0.95);
  border: 1px solid rgba(255,255,255,0.12);
  color: #fff;
  font-size: 12px;
  opacity: 0;
  transform: translateY(6px);
  pointer-events: none;
  transition: 0.15s ease;
  z-index: 50;
}

.allergen:hover::after{
  opacity: 1;
  transform: translateY(0);
}

/* ------------------------------
   Drawer (menu laterale)
------------------------------ */
.drawer-backdrop{
  position:fixed;
  inset:0;
  background: rgba(0,0,0,.55);
  opacity:0;
  pointer-events:none;
  transition: opacity .2s ease;
  z-index: 50;
}

.drawer-backdrop.open{
  opacity:1;
  pointer-events:auto;
}

.drawer{
  position:fixed;
  top:0;
  left:0;
  width: 280px;
  height: 100vh;
  background: var(--card);
  border-right: 1px solid var(--line);
  transform: translateX(-100%);
  transition: transform .22s ease;
  z-index: 60;
  padding: 16px;
}

.drawer.open{ transform: translateX(0); }

.drawer-title{
  font-weight: 900;
  margin: 6px 0 12px;
}

.drawer-nav{
  display:flex;
  flex-direction:column;
  gap: 6px;
  margin-top: 10px;
}

.drawer-link{
  display:block;
  padding: 10px 12px;
  border-radius: 12px;
  text-decoration:none;
  font-weight: 900;
}

.drawer-sublink{
  padding: 8px 12px 8px 26px;
}

.drawer a:hover{ border-color: var(--line); }

.drawer-group{
  margin-top: 6px;
  padding-top: 6px;
  border-top: 1px solid var(--line);
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.drawer-group-title{
  display: block;
  font-weight: 900;
  padding: 10px 12px;
  margin: 0;
  letter-spacing: .2px;
  text-decoration: none;
}

.drawer-social{
  margin-top: 14px;
  padding-top: 12px;
  border-top: 1px solid var(--line);
  display:flex;
  gap: 10px;
  flex-wrap: wrap;
}

.drawer-social .social{
  display:inline-block;
  padding: 8px 10px;
  border-radius: 999px;
  border: 1px solid var(--line);
  text-decoration:none;
  font-size: 13px;
}

/* ------------------------------
   Bottom bar (mobile) + hide/show
------------------------------ */
.bottom-bar{
  position: fixed;
  left: 12px;
  right: 12px;
  bottom: 12px;
  z-index: 80;
  display: flex;
  gap: 10px;
  padding: 10px;
  border-radius: 18px;
  border: 1px solid var(--line);
  background: rgba(15,16,22,.88);
  backdrop-filter: blur(10px);
  transition: transform .22s ease, opacity .22s ease;
  will-change: transform;
  padding-bottom: env(safe-area-inset-bottom);
}

.bottom-bar a{
  flex: 1;
  text-decoration: none;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 10px;
  border-radius: 14px;
  border: 1px solid rgba(255,255,255,0.08);
  background: rgba(255,255,255,0.02);
  color: var(--text);
  font-weight: 800;
}

.bottom-bar a.primary{
  border-color: rgba(255,183,3,.35);
  background: rgba(255,183,3,.10);
}

.bottom-bar.is-hidden{
  transform: translateY(110%);
  opacity: 0;
  pointer-events: none;
}

.bottom-bar.is-visible{
  transform: translateY(0);
  opacity: 1;
}

@media (max-width: 820px){
  body{ padding-bottom: 88px; }
}
.drawer-group-title{
  display: block;
  cursor: pointer;
}
.drawer-social .social{
  display: flex;
  align-items: center;
  gap: 10px;
}

.drawer-social .social svg{
  width: 18px;
  height: 18px;
  fill: currentColor;
  opacity: .9;
}
/* Togli sottolineatura dai sottomenu */
.drawer-sublink{
  text-decoration: none !important;
}
