*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --accent: #C84B2F;
  --cover: #1a1f2e;
  --dark: #1a1f2e;
  --gray: #9a9693;
  --border: #ebe8e2;
  --bg: #f0ede8;
  --white: #ffffff;
  --card-shadow: 0 2px 8px rgba(0,0,0,0.06);
  --card-shadow-hover: 0 4px 16px rgba(0,0,0,0.1);
}

body {
  font-family: var(--font);
  background: #f0ede8;
}

.page {
  background: #f0ede8;
  min-height: 100vh;
  max-width: 480px;
  margin: 0 auto;
}

@media (min-width: 768px) {
  .page {
    max-width: 720px;
  }
  .items-list {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
  }
  .rest-cover {
    height: 240px;
  }
  .rest-logo-wrap {
    width: 110px;
    height: 110px;
  }
}

@media (min-width: 1024px) {
  .page {
    max-width: 900px;
  }
  .items-list {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

/* ── HEADER ──────────────────────────────────────────────────────────────── */
.rest-cover {
  width: 100%;
  height: 230px;
  background: var(--cover);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
  position: relative;
  overflow: hidden;
  gap: 12px;
}

.rest-logo-wrap {
  width: 150px;
  height: 150px;
  border-radius: 20px;
  background: white;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 24px rgba(0,0,0,0.3);
  flex-shrink: 0;
  position: relative;
  z-index: 1;
}

.rest-cover-pattern {
  position: absolute;
  inset: 0;
  opacity: 0.07;
}

.rest-logo-img { width: 100%; height: 100%; object-fit: contain; }
.rest-logo-initials { font-weight: 800; font-size: 24px; color: var(--accent); }

.rest-header-info {
  text-align: center;
  position: relative;
  z-index: 1;
  margin-left: 0;
}

.rest-name {
  font-size: 20px;
  font-weight: 800;
  color: white;
  letter-spacing: -0.4px;
  line-height: 1.2;
}

.rest-type {
  font-size: 12px;
  color: rgba(255,255,255,0.6);
  margin-top: 3px;
}

.rest-meta-bar {
  background: var(--white);
  padding: 0.75rem 1.25rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--border);
}
.rest-meta {
  font-size: 12px;
  color: var(--gray);
  line-height: 1.5;
}
.rest-status {
  font-size: 11px;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: 20px;
  white-space: nowrap;
}
.rest-status.open { background: #dcf5e0; color: #1a7a32; }
.rest-status.closed { background: #f0ede8; color: var(--gray); }

/* ── CATEGORIE ───────────────────────────────────────────────────────────── */
.cats-nav {
  background: var(--white);
  display: flex;
  gap: 8px;
  padding: 0.85rem 1.25rem;
  overflow-x: auto;
  scrollbar-width: none;
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 100;
  border-radius: 0 0 10px 10px;
}
.cats-nav::-webkit-scrollbar { display: none; }

.cat-btn {
  white-space: nowrap;
  padding: 8px 16px;
  border-radius: 30px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  border: 2px solid var(--border);
  color: var(--gray);
  background: var(--white);
  font-family: inherit;
  transition: all 0.15s;
}
.cat-btn.active {
  background: var(--dark);
  color: white;
  border-color: var(--dark);
}
.cat-btn:hover:not(.active) {
  border-color: var(--dark);
  color: var(--dark);
}

/* ── PIATTI ──────────────────────────────────────────────────────────────── */
.menu-body { padding: 1rem 1rem 120px; }

.cat-section { margin-bottom: 0.5rem; }

.cat-title {
  font-size: 20px;
  font-weight: 800;
  color: var(--dark);
  padding: 0.75rem 0 0.85rem;
  letter-spacing: -0.5px;
}

.items-list { display: flex; flex-direction: column; gap: 10px; }

.menu-item {
  background: var(--white);
  border-radius: 16px;
  padding: 1rem 1.1rem;
  display: flex;
  align-items: center;
  gap: 12px;
  box-shadow: var(--card-shadow);
  border: 1px solid rgba(0,0,0,0.04);
  transition: box-shadow 0.15s, transform 0.12s;
}
.menu-item.clickable { cursor: pointer; }
.menu-item.clickable:hover {
  box-shadow: var(--card-shadow-hover);
  transform: translateY(-1px);
}
.menu-item.clickable:active {
  transform: translateY(0);
  box-shadow: var(--card-shadow);
}

.item-icon {
  width: 54px;
  height: 54px;
  border-radius: 12px;
  background: var(--bg);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 26px;
  flex-shrink: 0;
}

.item-body { flex: 1; min-width: 0; }

.item-name {
  font-size: 14px;
  font-weight: 700;
  color: var(--dark);
  line-height: 1.3;
  margin-bottom: 3px;
}
.item-desc {
  font-size: 12px;
  color: var(--gray);
  line-height: 1.45;
  margin-bottom: 6px;
}
.item-allergens {
  display: flex;
  gap: 4px;
  flex-wrap: wrap;
  margin-bottom: 8px;
}
.allergen-chip {
  background: var(--bg);
  color: var(--gray);
  font-size: 10px;
  font-weight: 500;
  padding: 2px 7px;
  border-radius: 6px;
}
.item-footer {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 0.5rem;
}
.item-price {
  font-size: 16px;
  font-weight: 800;
  color: var(--accent);
  letter-spacing: -0.3px;
}
.item-footer .item-price {
  flex: 1;
}
.item-add-btn {
  width: 30px;
  height: 30px;
  border-radius: 10px;
  background: var(--dark);
  border: none;
  color: white;
  font-size: 22px;
  line-height: 1;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 300;
  flex-shrink: 0;
  transition: background 0.15s, transform 0.1s;
}
.item-add-btn:hover { background: var(--accent); }
.item-add-btn:active { transform: scale(0.92); }

.item-img {
  width: 72px;
  height: 72px;
  border-radius: 12px;
  overflow: hidden;
  flex-shrink: 0;
}
.item-img img { width: 100%; height: 100%; object-fit: cover; }

/* ── CART BAR ────────────────────────────────────────────────────────────── */
.cart-bar {
  position: fixed;
  bottom: 1.25rem;
  left: 50%;
  transform: translateX(-50%);
  width: calc(100% - 2rem);
  max-width: 440px;
  background: var(--dark);
  border-radius: 18px;
  padding: 1rem 1.25rem;
  display: flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
  z-index: 200;
  box-shadow: 0 8px 32px rgba(0,0,0,0.25);
}
.cart-count {
  background: var(--accent);
  color: white;
  width: 26px;
  height: 26px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  font-weight: 700;
  flex-shrink: 0;
}
.cart-label { color: white; font-size: 14px; font-weight: 600; flex: 1; }
.cart-total { font-weight: 800; color: white; font-size: 15px; }

/* ── CART MODAL ──────────────────────────────────────────────────────────── */
.cart-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.45);
  display: flex;
  align-items: flex-end;
  z-index: 300;
}
.cart-modal {
  background: var(--white);
  border-radius: 24px 24px 0 0;
  width: 100%;
  padding: 1.5rem;
  max-height: 85vh;
  overflow-y: auto;
}
.cart-modal-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1.25rem;
}
.cart-modal-title {
  font-weight: 800;
  font-size: 18px;
  letter-spacing: -0.3px;
}
.btn-close {
  background: var(--bg);
  border: none;
  color: var(--dark);
  font-size: 13px;
  font-weight: 600;
  padding: 7px 12px;
  border-radius: 10px;
  cursor: pointer;
  font-family: inherit;
}
.cart-item-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.75rem 0;
  border-bottom: 1px solid var(--border);
}
.cart-item-name { font-size: 14px; font-weight: 600; }
.cart-item-price { font-size: 12px; color: var(--gray); margin-top: 2px; }
.cart-item-qty { display: flex; align-items: center; gap: 10px; }
.qty-btn {
  width: 28px;
  height: 28px;
  border-radius: 8px;
  border: 2px solid var(--border);
  background: var(--white);
  cursor: pointer;
  font-size: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--dark);
  font-weight: 600;
}
.qty-btn.plus { background: var(--dark); border-color: var(--dark); color: white; }

.cart-total-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1rem 0 0.75rem;
}
.cart-total-row span:first-child { font-size: 14px; color: var(--gray); }
.cart-total-row span:last-child { font-weight: 800; font-size: 18px; letter-spacing: -0.3px; }

.cart-table-row {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 1rem;
  background: var(--bg);
  border-radius: 12px;
  padding: 0.75rem 1rem;
}
.cart-table-row label { font-size: 13px; color: var(--gray); white-space: nowrap; font-weight: 500; }
.cart-table-row input {
  flex: 1;
  border: none;
  background: transparent;
  font-size: 14px;
  font-family: inherit;
  outline: none;
  font-weight: 600;
  color: var(--dark);
}

.btn-primary {
  background: var(--accent);
  color: white;
  border: none;
  padding: 15px 20px;
  border-radius: 14px;
  font-size: 15px;
  font-weight: 700;
  cursor: pointer;
  font-family: inherit;
  width: 100%;
  transition: opacity 0.15s;
  letter-spacing: -0.2px;
}
.btn-primary:hover { opacity: 0.88; }

.btn-outline {
  background: var(--bg);
  border: none;
  color: var(--dark);
  padding: 13px 20px;
  border-radius: 14px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  font-family: inherit;
  width: 100%;
  text-align: center;
  display: block;
}

/* ── SUCCESS ─────────────────────────────────────────────────────────────── */
.success-overlay {
  position: fixed;
  inset: 0;
  background: var(--white);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 400;
}
.success-box { text-align: center; padding: 2rem; }
.success-icon {
  width: 68px;
  height: 68px;
  border-radius: 50%;
  background: #dcf5e0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 28px;
  color: #1a7a32;
  margin: 0 auto 1.25rem;
  font-weight: 700;
}
.success-box h2 {
  font-weight: 800;
  font-size: 22px;
  margin-bottom: 0.5rem;
  letter-spacing: -0.4px;
}
.success-box p {
  font-size: 14px;
  color: var(--gray);
  margin-bottom: 1.75rem;
  line-height: 1.6;
}

.item-prices-multi {
  display: flex;
  flex-direction: column;
  gap: 8px;
  width: 100%;
  margin-top: 4px;
}
.price-variant {
  display: flex;
  align-items: center;
  gap: 8px;
  background: var(--bg);
  border-radius: 10px;
  padding: 6px 10px;
}
.price-variant-label {
  font-size: 12px;
  font-weight: 600;
  color: var(--gray);
  flex: 1;
}
.price-variant .item-price {
  font-size: 14px;
}
.price-variant .item-add-btn {
  width: 26px;
  height: 26px;
  border-radius: 8px;
  font-size: 18px;
}

/* ── ORARI ───────────────────────────────────────────────────────────────── */
.rest-hours-block {
  background: var(--white);
  border-bottom: 1px solid var(--border);
}
.rest-hours-toggle {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 0.85rem 1.25rem;
  cursor: pointer;
  user-select: none;
  justify-content: space-between;
}
.rest-hours-today {
  font-size: 13px;
  color: var(--black);
  font-weight: 500;
}
.rest-hours-arrow {
  font-size: 14px;
  color: var(--gray);
  transition: transform 0.2s;
}
.rest-hours-arrow.open { transform: rotate(180deg); }
.rest-hours-list {
  padding: 0 1.25rem 0.85rem;
  flex-direction: column;
  gap: 6px;
}
.rest-hours-row {
  display: flex;
  justify-content: space-between;
  font-size: 13px;
  padding: 4px 0;
  border-bottom: 0.5px solid var(--border);
}
.rest-hours-row:last-child { border-bottom: none; }
.rest-hours-row span:first-child { color: var(--gray); font-weight: 500; }
.rest-hours-row span:last-child { color: var(--dark); font-weight: 600; }

/* ── INDIRIZZO MAPS ──────────────────────────────────────────────────────── */
.rest-maps-link {
  color: rgba(255,255,255,0.85);
  text-decoration: none;
  border-bottom: 1px solid rgba(255,255,255,0.3);
  padding-bottom: 1px;
  transition: color 0.15s;
}
.rest-maps-link:hover { color: white; }

/* ── SOCIAL E CONTATTI ───────────────────────────────────────────────────── */
.rest-contacts {
  display: flex;
  gap: 10px;
  padding: 0.85rem 1.25rem;
  background: var(--white);
  border-bottom: 1px solid var(--border);
  flex-wrap: wrap;
  justify-content: center;
}
.contact-btn {
  width: 42px;
  height: 42px;
  border-radius: 12px;
  background: var(--bg);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--dark);
  text-decoration: none;
  transition: background 0.15s, color 0.15s;
  border: 1px solid var(--border);
}
.contact-btn:hover { background: var(--dark); color: white; }
.contact-btn-whatsapp:hover { background: #25D366; border-color: #25D366; color: white; }
.contact-btn-instagram:hover { background: #E1306C; border-color: #E1306C; color: white; }
.contact-btn-facebook:hover { background: #1877F2; border-color: #1877F2; color: white; }

/* ── IMMAGINE SINISTRA ───────────────────────────────────────────────────── */
.item-img {
  width: 80px;
  height: 80px;
  border-radius: 12px;
  overflow: hidden;
  flex-shrink: 0;
  order: -1;
  cursor: zoom-in;
}
.item-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.2s;
}
.item-img:hover img { transform: scale(1.05); }

/* ── LIGHTBOX ────────────────────────────────────────────────────────────── */
.lightbox {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.85);
  z-index: 1000;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
}
.lightbox.open { display: flex; }
.lightbox-content {
  position: relative;
  max-width: 440px;
  width: 100%;
  border-radius: 20px;
  overflow: hidden;
  background: white;
}
.lightbox-content img {
  width: 100%;
  max-height: 70vh;
  object-fit: cover;
  display: block;
}
.lightbox-caption {
  padding: 0.85rem 1rem;
  font-size: 14px;
  font-weight: 700;
  color: var(--dark);
  text-align: center;
}
.lightbox-close {
  position: absolute;
  top: 10px;
  right: 10px;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: rgba(0,0,0,0.5);
  border: none;
  color: white;
  font-size: 14px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 10;
}

/* ── LIKE BUTTON ─────────────────────────────────────────────────────── */
.like-btn {
  display: flex;
  align-items: center;
  gap: 4px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px 6px;
  border-radius: 100px;
  color: #ccc;
  transition: color 0.2s, transform 0.15s;
  margin-left: auto;
}

.like-btn:active { transform: scale(1.3); }

.like-btn.liked { color: #e74c3c; }

.like-icon {
  width: 18px;
  height: 18px;
  transition: fill 0.2s;
}

.like-btn.liked .like-icon { fill: currentColor; }

.like-count {
  font-size: 12px;
  font-weight: 600;
  min-width: 14px;
}

/* ── PIATTO DEL MOMENTO ──────────────────────────────────────────────── */
.featured-banner {
  margin: 0.75rem 1rem;
  padding: 0.85rem 1rem;
  background: linear-gradient(135deg, #2C2C2A 0%, #3d3d3a 100%);
  border-radius: 14px;
  display: flex;
  align-items: center;
  gap: 10px;
  position: relative;
  overflow: hidden;
  box-shadow: 0 4px 16px rgba(44,44,42,0.15);
  animation: featuredSlideIn 0.5s ease both;
}

.featured-img {
  width: 64px;
  height: 64px;
  border-radius: 10px;
  overflow: hidden;
  flex-shrink: 0;
  position: relative;
  z-index: 1;
  cursor: zoom-in;
}

.featured-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.featured-desc {
  font-size: 11px;
  color: rgba(240,237,232,0.55);
  line-height: 1.4;
  margin-top: 1px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

@keyframes featuredSlideIn {
  from { opacity: 0; transform: translateY(-10px); }
  to { opacity: 1; transform: translateY(0); }
}

.featured-pulse {
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, transparent, rgba(200,75,47,0.12), transparent);
  animation: featuredPulse 2.5s ease infinite;
}

@keyframes featuredPulse {
  0%, 100% { transform: translateX(-100%); }
  50% { transform: translateX(100%); }
}

.featured-content {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 2px;
  position: relative;
  z-index: 1;
}

.featured-label {
  font-size: 10px;
  font-weight: 700;
  color: #C84B2F;
  text-transform: uppercase;
  letter-spacing: 1px;
}

.featured-name {
  font-size: 15px;
  font-weight: 700;
  color: #f0ede8;
  line-height: 1.2;
}

.featured-price {
  font-size: 13px;
  font-weight: 600;
  color: rgba(240,237,232,0.6);
}

.featured-btn {
  background: #C84B2F;
  color: white;
  border: none;
  border-radius: 10px;
  padding: 8px 14px;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  flex-shrink: 0;
  position: relative;
  z-index: 1;
  transition: background 0.2s, transform 0.15s;
  font-family: var(--font);
}

.featured-btn:active { transform: scale(0.96); }
.featured-btn:hover { background: #b03d22; }

.item-orders-today {
  font-size: 11px;
  font-weight: 600;
  color: #C84B2F;
  margin-top: 4px;
}