/* ============================================================
   OASI STREET FOOD — Digital Menu
   Design System
   Brand: #F56057 red · Bebas Neue display · Mohave body
   ============================================================ */

/* ── Reset & Base ───────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --red:        #F56057;
  --red-dark:   #D94A41;
  --red-dim:    rgba(245, 96, 87, 0.18);
  --red-glow:   rgba(245, 96, 87, 0.35);
  --red-glow-sm:rgba(245, 96, 87, 0.15);

  --bg:         #0C0C0C;
  --bg-card:    #181818;
  --bg-card-2:  #1F1F1F;
  --bg-overlay: #0F0F0F;
  --bg-popup:   #141414;

  --white:      #FFFFFF;
  --text-1:     #FFFFFF;
  --text-2:     rgba(255,255,255,0.65);
  --text-3:     rgba(255,255,255,0.35);
  --border:     rgba(255,255,255,0.07);
  --border-red: rgba(245,96,87,0.3);

  --font-d:     'Bebas Neue', sans-serif;
  --font-b:     'Mohave', sans-serif;

  --r-sm:  8px;
  --r-md:  14px;
  --r-lg:  20px;
  --r-xl:  28px;

  --ease:  cubic-bezier(0.4, 0, 0.2, 1);
  --ease-out: cubic-bezier(0, 0, 0.2, 1);
  --ease-spring: cubic-bezier(0.34, 1.56, 0.64, 1);

  --header-h: 64px;
  --max-w: 1200px;
}

html {
  font-size: 16px;
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: var(--font-b);
  background-color: var(--bg);
  color: var(--text-1);
  height: 100dvh;
  overflow: hidden;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* ── Desktop layout: tutto nel viewport, zero scroll ── */
.page-layout {
  display: flex;
  flex-direction: column;
  height: calc(100dvh - var(--header-h));
  margin-top: var(--header-h);
  overflow: hidden;
}

/* Hero nascosta su desktop */
.hero { display: none; }

/* page-scroll prende tutto lo spazio rimanente */
.page-scroll {
  flex: 1;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  min-height: 0;
}

/* Footer nascosto su desktop */
.allergen-footer { display: none; }

/* Noise grain overlay on body */
body::after {
  content: '';
  position: fixed;
  inset: 0;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='1'/%3E%3C/svg%3E");
  background-size: 200px 200px;
  opacity: 0.028;
  pointer-events: none;
  z-index: 9999;
  mix-blend-mode: overlay;
}

.svg-filters { position: absolute; width: 0; height: 0; pointer-events: none; }

a { color: var(--red); text-decoration: none; }
a:hover { text-decoration: underline; }

button { cursor: pointer; border: none; background: none; font-family: var(--font-b); }
img { display: block; max-width: 100%; }

/* ── Header ─────────────────────────────────────────────────── */
.site-header {
  position: fixed;
  top: 0; left: 0; right: 0;
  height: var(--header-h);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 20px;
  z-index: 500;
  background: linear-gradient(to bottom, rgba(12,12,12,0.97) 0%, rgba(12,12,12,0.85) 100%);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border);
}

/* Back button in header */
.header-back {
  width: 38px; height: 38px;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  color: var(--text-1);
  background: var(--bg-card);
  border: 1px solid var(--border);
  flex-shrink: 0;
  transition: background 0.2s, color 0.2s, border-color 0.2s, transform 0.2s var(--ease-spring);
  animation: fadeInScale 0.35s var(--ease-spring) both;
}
.header-back:hover {
  background: var(--red);
  color: var(--white);
  border-color: var(--red);
  transform: scale(1.08);
}
.header-back:active { transform: scale(0.94); }

@keyframes fadeInScale {
  from { opacity: 0; transform: scale(0.7); }
  to   { opacity: 1; transform: scale(1); }
}

/* Logo header */
.header-logo-img {
  height: 40px;
  width: auto;
  display: block;
}

/* Language switcher */
.lang-switcher {
  display: flex;
  align-items: center;
  gap: 6px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 100px;
  padding: 4px 10px;
}
.lang-btn {
  font-family: var(--font-b);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.08em;
  color: var(--text-3);
  padding: 2px 4px;
  border-radius: 100px;
  transition: color 0.25s var(--ease);
}
.lang-btn.active {
  color: var(--red);
}
.lang-btn:hover:not(.active) { color: var(--text-2); }
.lang-divider {
  color: var(--text-3);
  font-size: 12px;
  user-select: none;
}

/* ── Hero ────────────────────────────────────────────────────── */
.hero {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: calc(var(--header-h) + 28px) 24px 28px;
  text-align: center;
  overflow: hidden;
  min-height: 36vh;
}

.hero-bg-orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(80px);
  pointer-events: none;
}
.orb-1 {
  width: 420px; height: 420px;
  background: radial-gradient(circle, rgba(245,96,87,0.18) 0%, transparent 70%);
  top: -80px; left: 50%;
  margin-left: -210px;
  animation: orbFloat1 8s ease-in-out infinite alternate;
}
.orb-2 {
  width: 280px; height: 280px;
  background: radial-gradient(circle, rgba(245,96,87,0.08) 0%, transparent 70%);
  bottom: 0; right: 10%;
  animation: orbFloat2 11s ease-in-out infinite alternate-reverse;
}
@keyframes orbFloat1 {
  from { transform: translateY(0); }
  to   { transform: translateY(-20px); }
}
@keyframes orbFloat2 {
  from { transform: translateY(0); }
  to   { transform: translateY(-15px); }
}

.hero-grain {
  position: absolute;
  inset: 0;
  background: url("data:image/svg+xml,%3Csvg viewBox='0 0 512 512' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='g'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.75' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23g)' opacity='1'/%3E%3C/svg%3E") center / 300px;
  opacity: 0.04;
  pointer-events: none;
}

.hero-content {
  position: relative;
  z-index: 1;
}

.hero-eyebrow {
  font-family: var(--font-b);
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0.3em;
  color: var(--red);
  text-transform: uppercase;
  margin-bottom: 16px;
  opacity: 0;
  animation: fadeSlideUp 0.8s var(--ease-out) 0.2s forwards;
}

.hero-logo {
  height: clamp(90px, 16vw, 160px);
  width: auto;
  display: block;
  margin: 0 auto 24px;
  opacity: 0;
  animation: fadeSlideUp 0.8s var(--ease-out) 0.35s forwards;
}

.hero-tagline {
  font-family: var(--font-b);
  font-size: 15px;
  font-weight: 300;
  color: var(--text-2);
  letter-spacing: 0.06em;
  margin-bottom: 28px;
  opacity: 0;
  animation: fadeSlideUp 0.8s var(--ease-out) 0.65s forwards;
}

.hero-divider {
  display: flex;
  align-items: center;
  gap: 14px;
  justify-content: center;
  opacity: 0;
  animation: fadeSlideUp 0.8s var(--ease-out) 0.8s forwards;
}
.hero-divider-line {
  display: block;
  width: 60px;
  height: 1px;
  background: linear-gradient(to right, transparent, var(--red));
}
.hero-divider-line:last-child {
  background: linear-gradient(to left, transparent, var(--red));
}
.hero-divider-icon {
  color: var(--red);
  font-size: 12px;
}

@keyframes fadeSlideUp {
  from { opacity: 0; transform: translateY(20px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ── Categories Grid ─────────────────────────────────────────── */
.categories-section {
  flex: 1;
  display: flex;
  align-items: stretch;
  padding: 24px 28px 20px;
  min-height: 0;
}

.categories-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  grid-template-rows: repeat(4, 1fr);
  gap: 12px;
  flex: 1;
  max-width: var(--max-w);
  margin: 0 auto;
  width: 100%;
}

/* ── Category card ── */
.category-card {
  container-type: size;
  position: relative;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  cursor: pointer;
  overflow: hidden;
  display: flex;
  transition: transform 0.35s var(--ease-spring), border-color 0.3s var(--ease), box-shadow 0.35s var(--ease);
  -webkit-tap-highlight-color: transparent;
  user-select: none;
  /* entrance animation */
  opacity: 0;
  animation: cardEntrance 0.55s var(--ease-out) both;
}
@keyframes cardEntrance {
  to { opacity: 1; transform: translateY(0); }
}

/* Card glow bg */
.category-card::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse at 50% 120%, var(--red-dim) 0%, transparent 65%);
  opacity: 0;
  transition: opacity 0.4s var(--ease);
  border-radius: inherit;
  pointer-events: none;
}
/* Card bottom red bar */
.category-card::after {
  content: '';
  position: absolute;
  bottom: 0; left: 0; right: 0;
  height: 3px;
  background: var(--red);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.4s var(--ease-spring);
  border-radius: 0 0 var(--r-lg) var(--r-lg);
  pointer-events: none;
}
.category-card:hover {
  transform: translateY(-6px) scale(1.01);
  border-color: var(--border-red);
  box-shadow: 0 8px 40px rgba(245, 96, 87, 0.22), 0 2px 12px rgba(0,0,0,0.6);
}
.category-card:hover::after  { transform: scaleX(1); }
.category-card:hover::before { opacity: 1; }
.category-card:active        { transform: translateY(-2px) scale(0.99); }

/* ── Card body ── */
.card-body {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  text-align: center;
  padding: 12px;
  flex: 1;
  min-width: 0;
  position: relative;
  z-index: 1;
}

/* ── Immagine / icona ── */
.cat-image {
  width: 72px; height: 72px;
  display: block;
  flex-shrink: 0;
  transition: transform 0.35s var(--ease-spring), filter 0.3s var(--ease);
  filter: drop-shadow(0 0 0px transparent);
}
.cat-icon {
  font-size: 38px;
  line-height: 1;
  display: block;
  flex-shrink: 0;
  transition: transform 0.35s var(--ease-spring);
}
.category-card:hover .cat-image {
  transform: scale(1.1) translateY(-3px);
  filter: drop-shadow(0 4px 14px rgba(245, 96, 87, 0.4));
}
.category-card:hover .cat-icon {
  transform: scale(1.12) translateY(-3px);
  filter: drop-shadow(0 4px 12px rgba(245, 96, 87, 0.35));
}

/* ── Titolo ── */
.cat-name {
  font-family: var(--font-d);
  font-size: 19px;
  letter-spacing: 0.07em;
  color: var(--text-1);
  line-height: 1.1;
}

/* ── Container queries — si adattano alle dimensioni reali della card ── */

/* Card media (>=160px alt) */
@container (min-height: 160px) {
  .cat-image { width: 80px; height: 80px; }
  .cat-icon  { font-size: 44px; }
  .cat-name  { font-size: 21px; }
  .card-body { gap: 14px; }
}

/* Card grande (>=200px alt) */
@container (min-height: 200px) {
  .cat-image { width: 96px; height: 96px; }
  .cat-icon  { font-size: 52px; }
  .cat-name  { font-size: 24px; }
  .card-body { gap: 18px; }
}

/* Card molto grande (>=260px alt) */
@container (min-height: 260px) {
  .cat-image { width: 116px; height: 116px; }
  .cat-icon  { font-size: 62px; }
  .cat-name  { font-size: 28px; }
  .card-body { gap: 22px; }
}

/* Card compatta (<130px alt): layout orizzontale */
@container (max-height: 129px) {
  .card-body {
    flex-direction: row;
    justify-content: flex-start;
    text-align: left;
    gap: 14px;
    padding: 0 18px;
  }
  .cat-image { width: 46px; height: 46px; }
  .cat-icon  { font-size: 30px; }
  .cat-name  { font-size: 16px; }
}

/* ── Allergen Footer ─────────────────────────────────────────── */
.allergen-footer {
  text-align: center;
  padding: 28px 24px 48px;
  border-top: 1px solid var(--border);
  max-width: var(--max-w);
  margin: 0 auto;
}
.allergen-footer-text {
  font-family: var(--font-b);
  font-size: 13px;
  font-weight: 300;
  color: var(--text-3);
  margin-bottom: 8px;
  line-height: 1.6;
}
.allergen-footer-copy {
  font-family: var(--font-b);
  font-size: 12px;
  color: var(--text-3);
}
.allergen-footer-copy a { color: var(--text-3); transition: color 0.2s; }
.allergen-footer-copy a:hover { color: var(--red); text-decoration: none; }

/* ── Category Overlay ─────────────────────────────────────────── */
.category-overlay {
  position: fixed;
  inset: 0;
  z-index: 700;
  display: flex;
  flex-direction: column;
  pointer-events: none;
  visibility: hidden;
}

.category-overlay.is-active {
  pointer-events: all;
  visibility: visible;
}

/* The dark curtain that sweeps in */
.overlay-curtain {
  position: absolute;
  inset: 0;
  background: var(--bg-overlay);
  transform-origin: top;
  clip-path: inset(0 0 100% 0);
  transition: clip-path 0.55s var(--ease-out);
  z-index: 0;
}
.category-overlay.is-active .overlay-curtain {
  clip-path: inset(0 0 0% 0);
}

.overlay-content {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  height: 100%;
  overflow: hidden;
  opacity: 0;
  transition: opacity 0.3s var(--ease) 0.3s;
}
.category-overlay.is-active .overlay-content { opacity: 1; }

.overlay-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 20px;
  height: var(--header-h);
  border-bottom: 1px solid var(--border);
  flex-shrink: 0;
  background: rgba(15,15,15,0.98);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

.overlay-back {
  width: 42px; height: 42px;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  color: var(--text-1);
  background: var(--bg-card);
  border: 1px solid var(--border);
  transition: background 0.2s, color 0.2s, transform 0.2s var(--ease-spring);
  flex-shrink: 0;
}
.overlay-back:hover {
  background: var(--red);
  color: var(--white);
  border-color: var(--red);
  transform: scale(1.08);
}
.overlay-back:active { transform: scale(0.95); }

.overlay-title-wrap {
  display: flex;
  align-items: center;
  gap: 10px;
}
.overlay-category-icon {
  font-size: 24px;
  line-height: 1;
}
.overlay-title {
  font-family: var(--font-d);
  font-size: 28px;
  letter-spacing: 0.08em;
  color: var(--white);
}

.overlay-header-spacer { width: 42px; flex-shrink: 0; }

.overlay-note {
  font-family: var(--font-b);
  font-size: 12px;
  font-weight: 300;
  color: var(--text-3);
  text-align: center;
  padding: 8px 20px 0;
  font-style: italic;
  letter-spacing: 0.03em;
  flex-shrink: 0;
}

.overlay-items {
  flex: 1;
  overflow-y: auto;
  overflow-x: hidden;
  padding: 20px 16px 100px;
  max-width: var(--max-w);
  width: 100%;
  margin: 0 auto;
  /* Custom scrollbar */
  scrollbar-width: thin;
  scrollbar-color: var(--border-red) transparent;
}
.overlay-items::-webkit-scrollbar { width: 4px; }
.overlay-items::-webkit-scrollbar-track { background: transparent; }
.overlay-items::-webkit-scrollbar-thumb { background: var(--border-red); border-radius: 4px; }

/* Items grid inside overlay */
.items-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
}

/* Item card */
.item-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  overflow: hidden;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  transition: transform 0.3s var(--ease-spring), border-color 0.25s, box-shadow 0.3s;
  opacity: 0;
  transform: translateY(20px);
  -webkit-tap-highlight-color: transparent;
  user-select: none;
}
.item-card.is-visible {
  opacity: 1;
  transform: translateY(0);
  transition: opacity 0.4s var(--ease-out), transform 0.4s var(--ease-out),
              border-color 0.25s, box-shadow 0.3s var(--ease), transform 0.3s var(--ease-spring);
}
.item-card:hover {
  border-color: var(--border-red);
  box-shadow: 0 4px 24px rgba(245, 96, 87, 0.18);
  transform: translateY(-4px);
}
.item-card:active { transform: translateY(-1px) scale(0.99); }

/* Item image area */
.item-img-wrap {
  width: 100%;
  aspect-ratio: 4 / 3;
  overflow: hidden;
  position: relative;
  flex-shrink: 0;
  background: var(--bg-card-2);
}
.item-img-wrap img {
  width: 100%; height: 100%;
  object-fit: cover;
  transition: transform 0.5s var(--ease);
}
.item-card:hover .item-img-wrap img { transform: scale(1.06); }

/* Placeholder when no image */
.img-placeholder {
  width: 100%; height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  background: linear-gradient(135deg, #181818 0%, #1f1f1f 50%, #181818 100%);
}
.img-placeholder-icon {
  font-size: 32px;
  opacity: 0.4;
  line-height: 1;
}
.img-placeholder-text {
  font-family: var(--font-b);
  font-size: 10px;
  font-weight: 300;
  color: var(--text-3);
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.img-placeholder-bar {
  width: 32px; height: 2px;
  background: var(--red);
  opacity: 0.4;
  border-radius: 2px;
}

/* Item card body */
.item-card-body {
  padding: 12px 14px 14px;
  display: flex;
  flex-direction: column;
  flex: 1;
  gap: 6px;
}
.item-card-name {
  font-family: var(--font-d);
  font-size: 16px;
  letter-spacing: 0.05em;
  color: var(--text-1);
  line-height: 1.15;
}
.item-card-desc {
  font-family: var(--font-b);
  font-size: 11.5px;
  font-weight: 300;
  color: var(--text-2);
  line-height: 1.45;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.item-card-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: auto;
  padding-top: 8px;
  border-top: 1px solid var(--border);
}
.item-card-price {
  font-family: var(--font-d);
  font-size: 18px;
  letter-spacing: 0.03em;
  color: var(--red);
}
.item-card-price-label {
  font-family: var(--font-b);
  font-size: 10px;
  font-weight: 400;
  color: var(--text-3);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  margin-right: 2px;
}
.item-card-arrow {
  width: 26px; height: 26px;
  border-radius: 50%;
  background: var(--red-dim);
  display: flex; align-items: center; justify-content: center;
  color: var(--red);
  font-size: 13px;
  transition: background 0.2s, transform 0.2s var(--ease-spring);
}
.item-card:hover .item-card-arrow {
  background: var(--red);
  color: var(--white);
  transform: scale(1.1);
}

/* ── Popup ───────────────────────────────────────────────────── */
.popup-backdrop {
  position: fixed;
  inset: 0;
  z-index: 900;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  background: rgba(0,0,0,0);
  backdrop-filter: blur(0px);
  -webkit-backdrop-filter: blur(0px);
  pointer-events: none;
  transition: background 0.35s var(--ease), backdrop-filter 0.35s var(--ease);
}
.popup-backdrop.is-active {
  background: rgba(0,0,0,0.75);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  pointer-events: all;
}

.item-popup {
  position: relative;
  width: 100%;
  max-width: 560px;
  min-height: 72dvh;
  max-height: 92dvh;
  background: var(--bg-popup);
  border-radius: var(--r-xl) var(--r-xl) 0 0;
  border: 1px solid var(--border);
  border-bottom: none;
  overflow-y: auto;
  overflow-x: hidden;
  scrollbar-width: none;
  transform: translateY(100%);
  transition: transform 0.45s var(--ease-spring);
  display: flex;
  flex-direction: column;
}
.item-popup::-webkit-scrollbar { display: none; }
.popup-backdrop.is-active .item-popup {
  transform: translateY(0);
}

/* Popup drag handle */
.item-popup::before {
  content: '';
  display: block;
  width: 40px; height: 4px;
  background: var(--border);
  border-radius: 4px;
  margin: 12px auto 0;
  flex-shrink: 0;
}

.popup-close {
  position: absolute;
  top: 16px; right: 16px;
  width: 36px; height: 36px;
  border-radius: 50%;
  background: var(--bg-card);
  border: 1px solid var(--border);
  display: flex; align-items: center; justify-content: center;
  color: var(--text-2);
  z-index: 10;
  transition: background 0.2s, color 0.2s, transform 0.2s var(--ease-spring);
}
.popup-close:hover {
  background: var(--red);
  color: var(--white);
  border-color: var(--red);
  transform: scale(1.1);
}

.popup-image-wrap {
  width: 100%;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  flex-shrink: 0;
  position: relative;
}
.popup-image-wrap img {
  width: 100%; height: 100%;
  object-fit: cover;
}
.popup-image-wrap .img-placeholder {
  height: 100%;
}
.popup-image-wrap .img-placeholder-icon { font-size: 48px; opacity: 0.25; }

.popup-body {
  padding: 24px 24px 40px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.popup-top {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 16px;
}

.popup-name {
  font-family: var(--font-d);
  font-size: 30px;
  letter-spacing: 0.05em;
  color: var(--white);
  line-height: 1.05;
  flex: 1;
}

.popup-price-wrap {
  flex-shrink: 0;
  text-align: right;
}
.popup-price-single {
  font-family: var(--font-d);
  font-size: 32px;
  letter-spacing: 0.02em;
  color: var(--red);
  line-height: 1;
}

/* Size table for S/M/L or Bounce/Combo */
.popup-size-table {
  display: flex;
  flex-direction: column;
  gap: 5px;
}
.popup-size-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 6px 10px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--r-sm);
}
.popup-size-label {
  font-family: var(--font-b);
  font-size: 12px;
  font-weight: 500;
  color: var(--text-2);
  letter-spacing: 0.06em;
  text-transform: uppercase;
}
.popup-size-price {
  font-family: var(--font-d);
  font-size: 18px;
  color: var(--red);
  letter-spacing: 0.02em;
}

.popup-description {
  font-family: var(--font-b);
  font-size: 15px;
  font-weight: 300;
  color: var(--text-2);
  line-height: 1.65;
}

.popup-allergens-wrap {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.popup-allergens-title {
  font-family: var(--font-b);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--text-3);
}
.popup-allergens {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

/* Allergen badge */
.allergen-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 4px 10px 4px 7px;
  border-radius: 100px;
  font-family: var(--font-b);
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.03em;
  border: 1px solid;
}
.allergen-badge .badge-icon { font-size: 13px; line-height: 1; }

/* Per-allergen colors */
.badge-gluten    { background: rgba(245, 166, 35, 0.12); border-color: rgba(245,166,35,0.3); color: #F5A623; }
.badge-eggs      { background: rgba(247, 220, 111, 0.1); border-color: rgba(247,220,111,0.3); color: #e8c84a; }
.badge-dairy     { background: rgba(200, 200, 210, 0.1); border-color: rgba(200,200,210,0.3); color: #C8C8D2; }
.badge-fish      { background: rgba(93, 173, 226, 0.1);  border-color: rgba(93,173,226,0.3);  color: #5DADE2; }
.badge-nuts      { background: rgba(147, 81, 22, 0.2);   border-color: rgba(147,81,22,0.4);   color: #C8834A; }
.badge-peanuts   { background: rgba(200, 169, 110, 0.12);border-color: rgba(200,169,110,0.3); color: #C8A96E; }
.badge-soy       { background: rgba(130, 224, 170, 0.1); border-color: rgba(130,224,170,0.25);color: #82E0AA; }
.badge-celery    { background: rgba(39, 174, 96, 0.1);   border-color: rgba(39,174,96,0.3);   color: #52BE80; }
.badge-mustard   { background: rgba(244, 208, 63, 0.1);  border-color: rgba(244,208,63,0.3);  color: #D4AC0D; }
.badge-sesame    { background: rgba(213, 216, 220, 0.1); border-color: rgba(213,216,220,0.25);color: #AAB0B8; }
.badge-sulphites { background: rgba(142, 68, 173, 0.12); border-color: rgba(142,68,173,0.3);  color: #A569BD; }
.badge-lupin     { background: rgba(243, 156, 18, 0.1);  border-color: rgba(243,156,18,0.3);  color: #E59866; }
.badge-molluscs  { background: rgba(26, 188, 156, 0.1);  border-color: rgba(26,188,156,0.3);  color: #1ABC9C; }
.badge-crustaceans{background: rgba(231, 76, 60, 0.1);   border-color: rgba(231,76,60,0.3);   color: #E74C3C; }

.popup-disclaimer {
  font-family: var(--font-b);
  font-size: 12px;
  font-weight: 300;
  color: var(--text-3);
  font-style: italic;
  line-height: 1.5;
  padding-top: 4px;
  border-top: 1px solid var(--border);
}

/* ── Overlay items grid — desktop ────────────────────────────── */
/* ── Large desktop (1440p+) ──────────────────────────────────── */
@media (min-width: 1281px) {
  :root {
    --header-h: 80px;
  }

  /* Header logo */
  .header-logo-img {
    height: 56px;
  }

  /* Intro — logo, buttons, spacing */
  .intro-logo {
    width: clamp(340px, 28vw, 460px);
  }
  .intro-content {
    gap: 52px;
  }
  .intro-rule-line {
    width: 100px;
  }
  .intro-rule-icon {
    font-size: 15px;
  }
  .intro-sections {
    gap: 20px;
  }
  .intro-section-btn {
    width: 320px;
    height: 70px;
    font-size: 16px;
    letter-spacing: 0.2em;
  }

  /* Categories — fill viewport, no max-width cap */
  .categories-section {
    padding: 36px 60px 32px;
  }
  .categories-grid {
    max-width: none;
    gap: 24px;
  }
}

@media (max-width: 1024px) {
  .items-grid { grid-template-columns: repeat(2, 1fr); }

  /* Categories grid — tablet */
  .page-scroll {
    overflow-y: auto;
    scrollbar-width: none;
  }
  .page-scroll::-webkit-scrollbar { display: none; }

  .categories-section {
    align-items: flex-start;
    padding-bottom: 32px;
  }

  .categories-grid {
    flex: none;
    width: 100%;
    grid-template-columns: repeat(3, 1fr);
    grid-template-rows: unset;
    grid-auto-rows: minmax(130px, 1fr);
  }

}

/* ── Mobile / Desktop switch ─────────────────────────────────── */
:root { --mobile-tabs-h: 64px; --mobile-note-h: 0px; }

/* Desktop: hide mobile layout */
.mobile-layout { display: none; }

/* Mobile: hide desktop layout, show mobile */
@media (max-width: 768px) {
  :root { --header-h: 58px; }

  /* Swap layouts */
  .mobile-layout  { display: flex; }
  #desktopLayout  { display: none; }

  /* ── Mobile layout ── */
  .mobile-layout {
    flex-direction: column;
    height: 100dvh;
    padding-top: var(--header-h);
    overflow: hidden;
  }

  /* Category tabs navbar */
  .mobile-tabs-nav {
    flex-shrink: 0;
    height: var(--mobile-tabs-h);
    overflow-x: auto;
    overflow-y: hidden;
    scrollbar-width: none;
    background: rgba(12,12,12,0.97);
    border-top: 1px solid var(--border);
    display: flex;
    align-items: center;
    -webkit-overflow-scrolling: touch;
  }
  .mobile-tabs-nav::-webkit-scrollbar { display: none; }

  .mobile-tabs {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 0 14px;
    flex-shrink: 0;
    min-width: 100%;
  }

  .mobile-tab {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 7px 14px;
    border-radius: 100px;
    border: 1px solid var(--border);
    background: var(--bg-card);
    color: var(--text-2);
    font-family: var(--font-b);
    font-size: 13px;
    font-weight: 500;
    letter-spacing: 0.03em;
    white-space: nowrap;
    flex-shrink: 0;
    transition: background 0.22s var(--ease), color 0.22s var(--ease),
                border-color 0.22s var(--ease), transform 0.2s var(--ease-spring);
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
  }
  .mobile-tab .tab-icon { font-size: 15px; line-height: 1; }
  .mobile-tab .tab-image {
    width: 26px;
    height: 26px;
    display: block;
    flex-shrink: 0;
    transition: filter 0.2s var(--ease);
    filter: brightness(0.6);
  }
  .mobile-tab.is-active .tab-image {
    filter: brightness(0) invert(1);
  }
  .mobile-tab.is-active {
    background: var(--red);
    color: var(--white);
    border-color: var(--red);
    box-shadow: 0 0 14px rgba(245,96,87,0.4);
  }
  .mobile-tab:active:not(.is-active) { transform: scale(0.95); }

  /* Category note below tabs */
  .mobile-cat-note {
    font-family: var(--font-b);
    font-size: 11.5px;
    font-weight: 300;
    color: var(--text-3);
    font-style: italic;
    text-align: center;
    padding: 5px 16px 0;
    min-height: 0;
    overflow: hidden;
    transition: max-height 0.3s var(--ease), padding 0.3s var(--ease);
    max-height: 0;
  }
  .mobile-cat-note.has-note {
    max-height: 32px;
    padding: 5px 16px 2px;
  }

  /* Scrollable content area */
  .mobile-content {
    flex: 1;
    overflow-y: auto;
    overflow-x: hidden;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: thin;
    scrollbar-color: var(--border-red) transparent;
  }
  .mobile-content::-webkit-scrollbar { width: 3px; }
  .mobile-content::-webkit-scrollbar-thumb { background: var(--border-red); border-radius: 3px; }

  /* Items grid inside mobile content */
  .mobile-content .items-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    padding: 14px 12px 0;
  }

  .mobile-footer { padding: 20px 16px 36px; margin-top: 8px; }

  /* Ripristina cat-count su mobile */
  .cat-count { display: block; }

  /* Item card tweaks on mobile */
  .item-card-name { font-size: 14px; }
  .item-card-desc { font-size: 11px; }
  .item-card-price { font-size: 15px; }

  /* Su mobile il footer è visibile (nella mobile-content) */
  .allergen-footer { display: block; }

  /* Popup full width on mobile */
  .item-popup { max-width: 100%; min-height: 80dvh; border-radius: var(--r-lg) var(--r-lg) 0 0; }
  .popup-body { padding: 20px 20px 36px; }
  .popup-name { font-size: 24px; }
  .popup-price-single { font-size: 28px; }
}

/* Very small screens */
@media (max-width: 380px) {
  .mobile-tab { font-size: 12px; padding: 6px 11px; }
  .mobile-content .items-grid { gap: 8px; padding: 10px 10px 0; }
}

/* ── Utility ─────────────────────────────────────────────────── */
.visually-hidden {
  position: absolute;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0,0,0,0);
  white-space: nowrap; border: 0;
}

/* body è già overflow:hidden globalmente — nessun lock aggiuntivo necessario */

/* Focus styles */
:focus-visible {
  outline: 2px solid var(--red);
  outline-offset: 3px;
  border-radius: var(--r-sm);
}

/* ── Intro Screen ─────────────────────────────────────────────── */
.intro-screen {
  position: fixed;
  inset: 0;
  z-index: 9998;
  background: var(--bg);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}
.intro-screen.is-leaving {
  animation: introExit 0.7s cubic-bezier(0.7, 0, 0.84, 0) forwards;
  pointer-events: none;
}
.intro-screen.is-gone { display: none; }

@keyframes introExit {
  0%   { transform: translateY(0); }
  100% { transform: translateY(-105%); }
}

/* Background glow orb */
.intro-orb {
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse 75% 60% at 50% 52%, rgba(245,96,87,0.11) 0%, transparent 70%);
  pointer-events: none;
  animation: introOrbPulse 2.8s ease-in-out 0.9s infinite alternate;
}
@keyframes introOrbPulse {
  from { opacity: 0.7; transform: scale(1); }
  to   { opacity: 1; transform: scale(1.1); }
}

/* Red flash at stamp impact */
.intro-screen::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse 80% 55% at 50% 50%, rgba(245,96,87,0.14) 0%, transparent 65%);
  opacity: 0;
  pointer-events: none;
  animation: impactFlash 0.55s ease-out 0.74s both;
}
@keyframes impactFlash {
  0%   { opacity: 0; }
  30%  { opacity: 1; }
  100% { opacity: 0; }
}

/* Content stack */
.intro-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 30px;
  position: relative;
  z-index: 1;
}

/* Logo wrap — relative container for shockwaves */
.intro-logo-wrap {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Logo — stamp animation */
.intro-logo {
  width: clamp(200px, 42vw, 300px);
  height: auto;
  display: block;
  position: relative;
  z-index: 1;
  animation: stampIn 1s cubic-bezier(0.22, 1, 0.36, 1) 0.15s both;
  transform-origin: center bottom;
}
@keyframes stampIn {
  0%   { transform: scale(2.5) translateY(-8px); opacity: 0; filter: blur(22px) brightness(2.5); }
  42%  { opacity: 1; filter: blur(0) brightness(1.2); }
  60%  { transform: scale(0.9) translateY(3px); filter: brightness(1); }
  76%  { transform: scale(1.06) translateY(-1px); }
  88%  { transform: scale(0.97); }
  100% { transform: scale(1) translateY(0); }
}

/* Shockwave rings */
.intro-shockwave {
  position: absolute;
  top: 50%; left: 50%;
  width: 220px; height: 220px;
  margin-top: -110px; margin-left: -110px;
  border-radius: 50%;
  border: 2.5px solid var(--red);
  pointer-events: none;
  opacity: 0;
  animation: shockwaveExpand 1s cubic-bezier(0, 0.4, 0.4, 1) 0.69s both;
}
.intro-shockwave--2 {
  width: 180px; height: 180px;
  margin-top: -90px; margin-left: -90px;
  border-color: rgba(245,96,87,0.5);
  animation-delay: 0.84s;
}
@keyframes shockwaveExpand {
  0%   { transform: scale(0.3); opacity: 1; }
  100% { transform: scale(3.2); opacity: 0; }
}

/* Divider */
.intro-claim {
  font-family: var(--font-b);
  font-size: 13px;
  font-weight: 400;
  font-style: italic;
  color: var(--text-3);
  text-align: center;
  line-height: 1.6;
  letter-spacing: 0.03em;
  max-width: 300px;
  opacity: 0;
  animation: introFadeUp 0.55s var(--ease-out) 0.95s both;
}

.intro-rule-wrap {
  display: flex;
  align-items: center;
  gap: 14px;
  opacity: 0;
  animation: introFadeUp 0.55s var(--ease-out) 1.05s both;
}
.intro-rule-line {
  display: block;
  width: 54px; height: 1px;
  background: linear-gradient(to right, transparent, rgba(245,96,87,0.65));
}
.intro-rule-line--rev {
  background: linear-gradient(to left, transparent, rgba(245,96,87,0.65));
}
.intro-rule-icon {
  color: var(--red);
  font-size: 11px;
}

/* CTA button */
.intro-cta {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 15px 36px;
  background: var(--red);
  color: #fff;
  font-family: var(--font-b);
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  border-radius: 100px;
  cursor: pointer;
  opacity: 0;
  animation: ctaBounceIn 0.7s cubic-bezier(0.34, 1.56, 0.64, 1) 1.28s both;
  transition: transform 0.25s var(--ease-spring), box-shadow 0.25s var(--ease), background 0.2s;
  box-shadow: 0 4px 24px rgba(245,96,87,0.3);
}
.intro-cta:hover {
  transform: scale(1.06) translateY(-2px);
  box-shadow: 0 10px 38px rgba(245,96,87,0.5);
  background: var(--red-dark);
}
.intro-cta:active { transform: scale(0.97); }

@keyframes ctaBounceIn {
  0%   { transform: translateY(30px) scale(0.82); opacity: 0; }
  100% { transform: translateY(0) scale(1); opacity: 1; }
}
@keyframes introFadeUp {
  from { transform: translateY(14px); opacity: 0; }
  to   { transform: translateY(0); opacity: 1; }
}

/* ── Intro Section Buttons ─────────────────────────────────────── */
.intro-sections {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  opacity: 0;
  animation: ctaBounceIn 0.7s cubic-bezier(0.34, 1.56, 0.64, 1) 1.28s both;
}

.intro-section-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 220px;
  height: 52px;
  background: transparent;
  color: rgba(255,255,255,0.7);
  border: 1.5px solid rgba(245,96,87,0.4);
  font-family: var(--font-b);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  border-radius: 100px;
  cursor: pointer;
  transition: transform 0.25s var(--ease-spring), box-shadow 0.25s var(--ease), background 0.2s, color 0.2s, border-color 0.2s;
}
.intro-section-btn:hover {
  background: rgba(245,96,87,0.1);
  border-color: rgba(245,96,87,0.7);
  color: #fff;
  transform: scale(1.04) translateY(-1px);
}
.intro-section-btn:active { transform: scale(0.97); }

/* ── Time Gate Popup ─────────────────────────────────────────── */
.time-gate-backdrop {
  position: fixed;
  inset: 0;
  z-index: 10000;
  background: rgba(0,0,0,0.78);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
}
.time-gate-backdrop.is-visible {
  opacity: 1;
  pointer-events: all;
}
.time-gate-popup {
  background: var(--bg-card);
  border: 1px solid var(--border-red);
  border-radius: var(--r-xl);
  padding: 44px 40px;
  max-width: 380px;
  width: 90%;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 18px;
  box-shadow: 0 32px 80px rgba(0,0,0,0.75), 0 0 0 1px rgba(245,96,87,0.12);
}
.time-gate-icon {
  font-size: 52px;
  line-height: 1;
}
.time-gate-title {
  font-family: var(--font-d);
  font-size: 36px;
  letter-spacing: 0.08em;
  color: var(--text-1);
}
.time-gate-msg {
  font-family: var(--font-b);
  font-size: 15px;
  font-weight: 400;
  color: var(--text-2);
  line-height: 1.65;
}
.time-gate-secret {
  /* looks identical to surrounding text — no link indicators */
  cursor: default;
  user-select: none;
  -webkit-user-select: none;
  -webkit-tap-highlight-color: transparent;
}
.time-gate-btn {
  margin-top: 6px;
  padding: 13px 44px;
  background: var(--red);
  color: #fff;
  font-family: var(--font-b);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  border-radius: 100px;
  cursor: pointer;
  transition: background 0.2s, transform 0.2s var(--ease-spring);
  box-shadow: 0 4px 20px rgba(245,96,87,0.28);
}
.time-gate-btn:hover  { background: var(--red-dark); transform: scale(1.04); }
.time-gate-btn:active { transform: scale(0.97); }

/* ── Coming Soon View ──────────────────────────────────────────── */
.coming-soon-view {
  display: none;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 16px;
  height: 100%;
  padding: 60px 24px;
  text-align: center;
}
.coming-soon-view[aria-hidden="false"] { display: flex; }

.coming-soon-icon {
  font-size: 28px;
  color: var(--red);
  opacity: 0.6;
}
.coming-soon-title {
  font-family: var(--font-d);
  font-size: clamp(32px, 6vw, 52px);
  color: var(--text-1);
  letter-spacing: 0.05em;
}
.coming-soon-sub {
  font-family: var(--font-b);
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--red);
  opacity: 0.75;
}

.coming-soon-view--mobile {
  min-height: 40vh;
  padding: 48px 24px;
}
