/* =========================================================
   Pizzería Margarita – Menu CSS (refactored)
   - Tokenized colors & sizes
   - Accessible hover/focus
   - Responsive type with clamp()
   ========================================================= */

:root {
  color-scheme: light dark;

  /* —— Design tokens —— */
  --brand:        #F59E0B;          /* naranja marca */
  --brand-weak:   rgba(245, 158, 11, .85);

  --panel-dk:     #1a1a1a;          /* gris oscuro panel */
  --panel-lt:     #faf7f2;          /* claro (si usás light) */

  --ink-dk:       #141414;
  --ink-lt:       #e9e9e9;

  --frame-red:    #8b1d1d;
  --frame-yel:    #F59E0B;  

  --radius-lg:    28px;
  --gap-sm:       .5rem;
  --gap-md:       .75rem;
  --gap-lg:       1rem;
  --shadow-deep:  0 24px 60px rgba(0,0,0,.55);
  --shadow-card:  0 6px 16px rgba(0,0,0,.20);
}

/* Tailwind dark-mode toggles the 'dark' class on <html> */
html.dark {
  --panel-bg: var(--panel-dk);
  --ink:      var(--ink-dk);
}
html:not(.dark) {
  --panel-bg: var(--panel-lt);
  --ink:      var(--ink-lt);
}

/* ====== Poster-like “rough” frames ====== */
/* Úsalo con .rough-border[data-color="yellow" | "red"] */
.rough-border {
  box-shadow: inset 0 0 0 14px var(--frame-yel), var(--shadow-deep);
}
.rough-border[data-color="red"] {
  box-shadow: inset 0 0 0 14px var(--frame-red), var(--shadow-deep);
}

/* Back-compat con tus clases anteriores */
.rough-border-yellow { box-shadow: inset 0 0 0 14px var(--frame-yel), var(--shadow-deep); }
.rough-border-red    { box-shadow: inset 0 0 0 14px var(--frame-red), var(--shadow-deep); }

/* ====== Section heading & divider ====== */
.menu-section-title {
  font-family: Oswald, ui-sans-serif, system-ui;
  text-transform: uppercase;
  letter-spacing: .06em;
  display: flex;
  align-items: center;
  gap: var(--gap-sm);
  font-weight: 700;
  font-size: clamp(1rem, .9rem + .5vw, 1.1rem);
  color: var(--ink);
}
.menu-section-title::after {
  content: "";
  flex: 1;
  height: 1px;
  background: linear-gradient(to right, rgba(255,255,255,.14), transparent);
}

/* ====== Menu item row ====== */
.menu-item {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: var(--gap-sm) var(--gap-lg);
  align-items: start;
  padding: .75rem .9rem;
  border-radius: 16px;
  
  border: 1px solid rgba(255,255,255,.08);
  box-shadow: var(--shadow-card);
  transition: transform .15s ease, box-shadow .15s ease, background-color .2s ease;
  will-change: transform;
}
.menu-item:hover {
  transform: translateY(-1px);
  box-shadow: 0 12px 28px rgba(0,0,0,.28);
}
.menu-item:focus-within {
  outline: 0;
  box-shadow: 0 0 0 2px color-mix(in oklab, var(--brand), white 30%);
}

.menu-item .name {
  font-weight: 700;
  line-height: 1.1;
  color: var(--ink);
}
.menu-item .desc {
  grid-column: 1 / -1;
  font-size: .92rem;
  line-height: 1.35;
  opacity: .78;
}
.menu-item .price {
  color: var(--brand);
  font-weight: 800;
  white-space: nowrap;
  margin-left: .25rem;
}

/* ====== Scrollbar (for scrollable panel) ====== */
.scroll-thin { scrollbar-width: thin; scrollbar-color: rgba(255,255,255,.22) transparent; }
.scroll-thin::-webkit-scrollbar { width: 10px; }
.scroll-thin::-webkit-scrollbar-track { background: transparent; }
.scroll-thin::-webkit-scrollbar-thumb {
  background: rgba(255,255,255,.18);
  border-radius: 999px;
  border: 2px solid transparent;
  background-clip: padding-box;
}

/* ====== Reduced motion ====== */
@media (prefers-reduced-motion: reduce) {
  .menu-item,
  .menu-item:hover { transition: none; transform: none; }
}

/* ====== Print (opcional, para exportar) ====== */
@media print {
  :root { color-scheme: light; }
  body { background: #fff !important; color: #111 !important; }
  .rough-border, .rough-border-yellow, .rough-border-red { box-shadow: none !important; }
  .menu-item { break-inside: avoid; page-break-inside: avoid; }
}
