/* =============================================
   TANTO — Meniu (template card-style din SS client)
   ============================================= */

:root {
  --paper: #ede0c5;
  --paper-soft: #e5d5b4;
  --paper-deep: #d9c192;
  --paper-hi: #f3e9d1;
  --ink: #2d1e10;
  --ink-soft: #4e3620;
  --sepia: #7a5a38;
  --muted: #8a6f50;
  --rule: rgba(45, 30, 16, 0.28);
  --rule-soft: rgba(45, 30, 16, 0.14);
  --stage-bg: #1f150c;
  --stage-bg-2: #14100a;

  --font-display: "Fraunces", "Playfair Display", Georgia, serif;
  --font-body: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --ease: cubic-bezier(0.33, 1, 0.68, 1);
}

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

.menu-body {
  font-family: var(--font-body);
  color: var(--ink);
  background:
    radial-gradient(ellipse at top, #3a2817 0%, var(--stage-bg-2) 70%),
    var(--stage-bg-2);
  min-height: 100vh;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* ---------- TOP BAR ---------- */
.menu-topbar {
  position: sticky;
  top: 0;
  z-index: 10;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  padding: 18px clamp(20px, 5vw, 40px);
  background: rgba(31, 21, 12, 0.88);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid rgba(201, 166, 74, 0.25);
}
.menu-topbar__back {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--paper);
  font-size: 12px;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  font-weight: 500;
  text-decoration: none;
  transition: color 0.25s;
}
.menu-topbar__back:hover { color: #c9a64a; }
.menu-topbar__center { text-align: center; }
.menu-topbar__eyebrow {
  display: block;
  font-size: 9.5px;
  letter-spacing: 0.4em;
  text-transform: uppercase;
  color: rgba(237, 224, 197, 0.55);
  margin-bottom: 2px;
}
.menu-topbar__title {
  font-family: var(--font-display);
  font-size: 22px;
  color: var(--paper);
  line-height: 1;
}
.menu-topbar__title em {
  font-style: italic;
  color: #c9a64a;
  font-weight: 400;
}

/* ---------- FLIPBOOK STAGE ---------- */
.flipbook-stage {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: calc(100vh - 80px);
  padding: 24px clamp(10px, 3vw, 40px) 100px;
  perspective: 2000px;
}
.flipbook { max-height: calc(100vh - 160px); }
.flipbook {
  position: relative;
  box-shadow: 0 60px 120px -40px rgba(0, 0, 0, 0.75);
}

/* ---------- PAGE BASE (uses client template as background) ---------- */
.page {
  position: relative;
  width: 100%;
  height: 100%;
  color: var(--ink);
  overflow: hidden;
  background-color: #f3ebdb;
  background-image: url('../assets/menuTemplate.png');
  background-size: 100% 100%;
  background-repeat: no-repeat;
  background-position: center;
}
.page__inner {
  position: relative;
  width: 100%;
  height: 100%;
  /* padding leaves room for template corner illustrations */
  padding:
    clamp(60px, 11vw, 130px)
    clamp(26px, 5vw, 48px)
    clamp(50px, 9vw, 110px);
  display: flex;
  flex-direction: column;
  z-index: 1;
  /* fallback scroll inside page if content exceeds — se vede totul si pe mobil */
  overflow-y: auto;
  overflow-x: hidden;
  scrollbar-width: thin;
  scrollbar-color: rgba(45, 30, 16, 0.3) transparent;
  -webkit-overflow-scrolling: touch;
}
.page__inner::-webkit-scrollbar { width: 4px; }
.page__inner::-webkit-scrollbar-track { background: transparent; }
.page__inner::-webkit-scrollbar-thumb {
  background: rgba(45, 30, 16, 0.25);
  border-radius: 2px;
}

/* Spine shadow */
.page:nth-child(odd)::after {
  content: "";
  position: absolute;
  left: 0; top: 0; bottom: 0;
  width: 20px;
  background: linear-gradient(90deg, rgba(45, 30, 16, 0.22) 0%, transparent 100%);
  pointer-events: none;
  z-index: 2;
}
.page:nth-child(even)::after {
  content: "";
  position: absolute;
  right: 0; top: 0; bottom: 0;
  width: 20px;
  background: linear-gradient(270deg, rgba(45, 30, 16, 0.22) 0%, transparent 100%);
  pointer-events: none;
  z-index: 2;
}

/* ---------- MASTHEAD (TANTO + category + ornament) ---------- */
.page__masthead {
  text-align: center;
  margin: 0 auto clamp(10px, 1.8vw, 18px);
  max-width: 88%;
  position: relative;
  z-index: 2;
  flex-shrink: 0;
}
.page__mark {
  font-size: 16px;
  line-height: 1;
  margin-bottom: 4px;
  filter: saturate(0.85);
}
.page__tanto {
  font-family: var(--font-display);
  font-size: clamp(28px, 4.2vw, 48px);
  font-weight: 500;
  letter-spacing: 0.06em;
  color: var(--ink);
  line-height: 0.95;
  margin: 0 0 3px;
}
.page__rule {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  margin: 6px auto 8px;
  color: var(--sepia);
}
.page__rule::before,
.page__rule::after {
  content: "";
  display: block;
  width: clamp(36px, 7vw, 64px);
  height: 1px;
  background: var(--rule);
}
.page__rule-dot {
  width: 5px;
  height: 5px;
  background: currentColor;
  border-radius: 50%;
  transform: rotate(45deg);
  display: block;
}
.page__section {
  font-family: var(--font-display);
  font-size: clamp(11.5px, 1.4vw, 14px);
  letter-spacing: 0.38em;
  text-transform: uppercase;
  color: var(--sepia);
  font-weight: 500;
}
.page__kicker {
  display: none; /* hidden in new template — clean look per SS */
}

/* ---------- CATEGORY HEADERS (inside page) ---------- */
.cat-head {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  margin: clamp(14px, 2vw, 22px) 0 clamp(8px, 1.2vw, 14px);
  position: relative;
  z-index: 2;
}
.cat-head__icon {
  font-size: 15px;
  line-height: 1;
  filter: saturate(0.9);
}
.cat-head__title {
  font-family: var(--font-display);
  font-size: clamp(13px, 1.5vw, 15.5px);
  letter-spacing: 0.28em;
  text-transform: uppercase;
  font-weight: 600;
  color: var(--ink);
}

/* ---------- ITEMS (food with full details) ---------- */
.items {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: clamp(8px, 1.3vw, 14px);
  position: relative;
  z-index: 2;
}
.items--compact { gap: clamp(6px, 1vw, 10px); }

.item { padding-bottom: clamp(6px, 1vw, 10px); }
.item:not(:last-child) { border-bottom: 1px dotted rgba(45, 30, 16, 0.16); }
.item--slim { padding-bottom: 2px; }

.item__head {
  display: flex;
  align-items: baseline;
  gap: 10px;
  margin-bottom: 4px;
}
.item__name {
  font-family: var(--font-display);
  font-size: clamp(14.5px, 1.7vw, 17px);
  font-weight: 500;
  color: var(--ink);
  flex-shrink: 0;
  letter-spacing: 0.005em;
}
.item__leader {
  flex: 1;
  height: 1px;
  background-image: linear-gradient(to right, rgba(45, 30, 16, 0.42) 35%, transparent 35%);
  background-size: 5px 1px;
  background-repeat: repeat-x;
  background-position: bottom;
  transform: translateY(-3px);
}
.item__price {
  font-family: var(--font-display);
  font-size: clamp(14.5px, 1.7vw, 17px);
  font-weight: 500;
  color: var(--ink);
  flex-shrink: 0;
  font-variant-numeric: tabular-nums;
}
.item__price em {
  font-style: italic;
  font-size: 0.72em;
  font-weight: 400;
  color: var(--muted);
  margin-left: 3px;
}
.item__meta {
  display: flex;
  gap: 10px;
  font-size: 10px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--muted);
  font-weight: 500;
  margin-bottom: 5px;
}
.item__weight { border-right: 1px solid var(--rule-soft); padding-right: 10px; }
.item__ing {
  font-size: clamp(11px, 1.15vw, 12.5px);
  line-height: 1.5;
  color: var(--ink-soft);
  font-style: italic;
  font-family: var(--font-display);
  font-weight: 400;
  max-width: 95%;
}

/* ---------- SIMPLE LIST (drinks, dotted leaders) ---------- */
.list {
  list-style: none;
  display: flex;
  flex-direction: column;
  position: relative;
  z-index: 2;
}
.list li {
  display: flex;
  align-items: baseline;
  gap: 8px;
  padding: clamp(5px, 0.8vw, 7px) 0;
  font-size: clamp(13px, 1.35vw, 14.5px);
  color: var(--ink);
}
.list li:not(:last-child) { border-bottom: 1px dotted rgba(45, 30, 16, 0.1); }
.list--dense li { padding: clamp(3.5px, 0.6vw, 5px) 0; font-size: clamp(12px, 1.25vw, 13.5px); }
.list li > span:first-child {
  flex-shrink: 0;
  color: var(--ink);
  font-weight: 400;
  font-family: var(--font-display);
}
.list .dots {
  flex: 1;
  height: 1px;
  background-image: linear-gradient(to right, rgba(45, 30, 16, 0.4) 35%, transparent 35%);
  background-size: 5px 1px;
  background-repeat: repeat-x;
  background-position: bottom;
  transform: translateY(-4px);
}
.list .price {
  font-family: var(--font-display);
  font-weight: 500;
  color: var(--ink);
  flex-shrink: 0;
  font-variant-numeric: tabular-nums;
}
.list .price em {
  font-style: italic;
  font-size: 0.78em;
  font-weight: 400;
  color: var(--muted);
  margin-left: 2px;
}
.list__premium {
  color: var(--sepia) !important;
}
.list__premium > span:first-child {
  color: var(--sepia) !important;
  font-style: italic;
}
.list__premium > span:first-child::before { content: "❦ "; }

/* ---------- ALLERGENS ---------- */
.allergens {
  list-style: none;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px 22px;
  position: relative;
  z-index: 2;
  margin: clamp(8px, 1.5vw, 14px) 0 clamp(14px, 2vw, 20px);
}
.allergens li {
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 5px 0;
  font-size: clamp(12px, 1.25vw, 13.5px);
  color: var(--ink-soft);
  border-bottom: 1px dotted rgba(45, 30, 16, 0.08);
  font-family: var(--font-display);
}
.allergens__num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  border: 1px solid var(--sepia);
  border-radius: 50%;
  font-family: var(--font-display);
  font-style: italic;
  font-weight: 500;
  font-size: 12px;
  color: var(--sepia);
  flex-shrink: 0;
}
.allergens__note {
  font-size: 11px;
  color: var(--muted);
  text-align: center;
  line-height: 1.5;
  font-family: var(--font-display);
  font-style: italic;
  margin-top: auto;
}

/* ---------- PAGE DIVIDER (between sub-sections) ---------- */
.page__divider {
  display: flex;
  justify-content: center;
  color: var(--sepia);
  opacity: 0.75;
  margin: clamp(14px, 2.2vw, 22px) 0 clamp(6px, 1vw, 10px);
}
.page__divider svg {
  width: clamp(100px, 18vw, 160px);
  height: auto;
}

/* ---------- PAGE FOOTER ---------- */
.page__footer {
  position: relative;
  z-index: 2;
  margin-top: auto;
  padding-top: 12px;
  text-align: center;
}
.page__num {
  display: inline-block;
  font-family: var(--font-display);
  font-style: italic;
  font-size: 12px;
  color: var(--muted);
  letter-spacing: 0.18em;
}
.page__num::before { content: "· "; }
.page__num::after { content: " ·"; }

/* ---------- COVER (hard covers) ---------- */
.page--hard {
  background:
    radial-gradient(circle at 30% 20%, rgba(201, 166, 74, 0.12) 0%, transparent 55%),
    radial-gradient(circle at 70% 85%, rgba(201, 166, 74, 0.1) 0%, transparent 55%),
    linear-gradient(145deg, #1f1409 0%, #2e1d0e 50%, #1a1007 100%);
  color: var(--paper);
}
.page--hard .page__inner {
  padding: clamp(30px, 5vw, 58px);
  justify-content: center;
  align-items: center;
}
.cover__frame {
  border: 1px solid rgba(201, 166, 74, 0.4);
  padding: clamp(30px, 5vw, 56px) clamp(20px, 4vw, 40px);
  width: 100%;
  text-align: center;
  position: relative;
}
.cover__frame::before,
.cover__frame::after {
  content: "";
  position: absolute;
  width: 14px;
  height: 14px;
  border: 1px solid rgba(201, 166, 74, 0.6);
}
.cover__frame::before { top: -8px; left: -8px; border-right: none; border-bottom: none; }
.cover__frame::after { bottom: -8px; right: -8px; border-left: none; border-top: none; }
.cover__mark {
  font-family: var(--font-display);
  font-style: italic;
  font-size: 12px;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: #c9a64a;
  margin-bottom: clamp(24px, 4vw, 42px);
}
.cover__word {
  font-family: var(--font-display);
  font-size: clamp(56px, 10vw, 110px);
  font-weight: 600;
  line-height: 0.9;
  letter-spacing: -0.005em;
  margin-bottom: 16px;
  color: var(--paper);
  text-shadow: 0 4px 30px rgba(201, 166, 74, 0.3);
}
.cover__rule {
  width: 60px;
  height: 1px;
  background: #c9a64a;
  margin: 0 auto clamp(18px, 3vw, 28px);
}
.cover__tag {
  font-family: var(--font-display);
  font-style: italic;
  font-size: clamp(16px, 2vw, 22px);
  color: #c9a64a;
  margin-bottom: 8px;
  font-weight: 400;
}
.cover__sub {
  font-size: 10.5px;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: rgba(237, 224, 197, 0.7);
  margin-bottom: clamp(28px, 4vw, 48px);
}
.cover__ornament {
  display: flex;
  justify-content: center;
  color: #c9a64a;
  margin-bottom: clamp(16px, 2.5vw, 24px);
}
.cover__ornament svg { width: clamp(80px, 12vw, 130px); height: auto; opacity: 0.85; }
.cover__whisper {
  font-family: var(--font-display);
  font-style: italic;
  font-size: clamp(11px, 1.3vw, 14px);
  color: rgba(237, 224, 197, 0.6);
  letter-spacing: 0.18em;
  text-transform: lowercase;
}
.cover__frame--back .cover__whisper {
  font-size: clamp(16px, 2vw, 22px);
  margin-bottom: 22px;
  text-transform: none;
  letter-spacing: 0.05em;
  color: #c9a64a;
}
.cover__frame--back .cover__tag {
  font-size: clamp(24px, 3.5vw, 38px);
  font-style: normal;
  color: var(--paper);
  margin-bottom: 6px;
}
.cover__frame--back .cover__mark { margin-bottom: 0; margin-top: 10px; color: #c9a64a; }

/* ---------- CONTROLS ---------- */
.flipbook-controls {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 20;
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 10px 16px;
  background: rgba(31, 21, 12, 0.88);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border: 1px solid rgba(201, 166, 74, 0.3);
  border-radius: 999px;
  box-shadow: 0 12px 30px -10px rgba(0, 0, 0, 0.55);
}
.fc-btn {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: transparent;
  border: 1px solid rgba(201, 166, 74, 0.45);
  color: var(--paper);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: all 0.25s var(--ease);
}
.fc-btn:hover:not(:disabled) {
  background: #c9a64a;
  color: #1a1007;
  border-color: #c9a64a;
  transform: scale(1.05);
}
.fc-btn:disabled { opacity: 0.35; cursor: not-allowed; }
.fc-btn svg { width: 20px; height: 20px; }
.fc-indicator {
  font-family: var(--font-display);
  font-style: italic;
  font-size: 13px;
  color: var(--paper);
  letter-spacing: 0.12em;
  min-width: 56px;
  text-align: center;
  font-variant-numeric: tabular-nums;
}

/* ---------- RESPONSIVE ---------- */
@media (max-width: 860px) {
  .menu-topbar { padding: 14px 18px; }
  .menu-topbar__title { font-size: 18px; }
  .menu-topbar__eyebrow { font-size: 8.5px; }
  .flipbook-stage { padding: 20px 12px 100px; }
  .page__inner { padding: 70px 22px 55px; }
  .cover__word { font-size: clamp(48px, 14vw, 80px); }
  .page__tanto { font-size: clamp(26px, 6vw, 40px); }
  .item__name, .item__price { font-size: 15px; }
  .item__ing { font-size: 11.5px; }
  .list li { font-size: 13px; }
  .list--dense li { font-size: 12px; }
}
@media (max-width: 520px) {
  .menu-topbar { grid-template-columns: 1fr; text-align: center; }
  .menu-topbar__back { justify-content: flex-start; position: absolute; top: 16px; left: 16px; }
  .menu-topbar__side { display: none; }
  .flipbook-stage { padding: 14px 6px 100px; }
  .allergens { grid-template-columns: 1fr; }
  .fc-indicator { font-size: 12px; min-width: 48px; }
  .fc-btn { width: 34px; height: 34px; }
  .page__tanto { font-size: 24px; }
  .page__inner { padding: 52px 16px 44px; }
  .page__footer { display: none; }
  .page__masthead { margin-bottom: 10px; }
  .items { gap: 7px; }
  .items--compact { gap: 5px; }
  .item__ing { font-size: 11px; line-height: 1.4; }
}

/* ============================================================
   PRODUSE CU POZE — indicator + lightbox
   ============================================================ */
.item--photos {
  cursor: pointer;
  border-radius: 6px;
  transition: background 0.25s ease, box-shadow 0.25s ease;
  outline: none;
}
.item--photos:hover,
.item--photos:focus-visible {
  background: rgba(198, 93, 60, 0.07);
  box-shadow: 0 0 0 6px rgba(198, 93, 60, 0.07);
}
.item--photos .item__name {
  display: inline-flex;
  align-items: center;
  gap: 7px;
}
.item__cam {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.45em;
  height: 1.45em;
  color: #c65d3c;
  transform: translateY(0.5px);
  animation: cam-pulse 2.4s ease-in-out infinite;
}
.item__cam svg { width: 100%; height: 100%; }
.item--photos:hover .item__cam,
.item--photos:focus-visible .item__cam { animation: none; }
@keyframes cam-pulse {
  0%, 100% { transform: translateY(0.5px) scale(1); opacity: 0.7; }
  50%      { transform: translateY(0.5px) scale(1.15); opacity: 1; }
}

/* ---------- LIGHTBOX ---------- */
.lightbox {
  position: fixed;
  inset: 0;
  z-index: 200;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: clamp(16px, 4vw, 56px);
  background: rgba(12, 8, 4, 0.93);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  animation: lb-fade 0.25s ease;
}
.lightbox[hidden] { display: none; }
@keyframes lb-fade { from { opacity: 0; } to { opacity: 1; } }
.lightbox__stage {
  position: relative;
  margin: 0;
  max-width: min(92vw, 1100px);
  max-height: 86vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
}
.lightbox__stage img {
  max-width: 100%;
  max-height: 76vh;
  object-fit: contain;
  border-radius: 6px;
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.6);
  background: var(--stage-bg);
}
.lightbox__caption {
  display: flex;
  align-items: baseline;
  gap: 14px;
  font-family: var(--font-display);
  font-size: 18px;
  color: var(--paper-hi);
}
.lightbox__counter {
  font-family: var(--font-body);
  font-size: 12px;
  letter-spacing: 0.18em;
  color: rgba(243, 233, 209, 0.6);
}
.lightbox__close,
.lightbox__nav {
  position: absolute;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(243, 233, 209, 0.3);
  background: rgba(31, 21, 12, 0.72);
  color: var(--paper-hi);
  cursor: pointer;
  border-radius: 50%;
  transition: background 0.2s ease, transform 0.2s ease, border-color 0.2s ease;
}
.lightbox__close:hover,
.lightbox__nav:hover {
  background: #c65d3c;
  border-color: #c65d3c;
  transform: scale(1.06);
}
.lightbox__close {
  top: clamp(14px, 3vw, 28px);
  right: clamp(14px, 3vw, 28px);
  width: 46px;
  height: 46px;
}
.lightbox__close svg { width: 22px; height: 22px; }
.lightbox__nav {
  top: 50%;
  transform: translateY(-50%);
  width: 52px;
  height: 52px;
}
.lightbox__nav:hover { transform: translateY(-50%) scale(1.06); }
.lightbox__nav svg { width: 24px; height: 24px; }
.lightbox__nav--prev { left: clamp(10px, 3vw, 36px); }
.lightbox__nav--next { right: clamp(10px, 3vw, 36px); }
.lightbox__nav[hidden] { display: none; }
@media (max-width: 600px) {
  .lightbox__nav { width: 44px; height: 44px; }
  .lightbox__nav--prev { left: 8px; }
  .lightbox__nav--next { right: 8px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}
