@import url('https://fonts.googleapis.com/css2?family=Cormorant+Garamond:wght@400;600;700&family=Outfit:wght@300;400;500;600;700&display=swap');

:root {
  --bg: #0c1210;
  --panel: #15231e;
  --panel-2: #1a2e27;
  --gold: #c9a227;
  --gold-soft: #d4b85a;
  --text: #f5f0e6;
  --muted: #a8b0a8;
  --border: #2a3d35;
  --accent: #c9a227;
  --danger: #c44536;
}

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

html, body {
  background: var(--bg);
  color: var(--text);
  font-family: 'Outfit', sans-serif;
  min-height: 100%;
  -webkit-tap-highlight-color: transparent;
}

body {
  background:
    radial-gradient(ellipse at 20% 0%, rgba(201,162,39,.12), transparent 50%),
    radial-gradient(ellipse at 80% 100%, rgba(21,35,30,.9), transparent 45%),
    linear-gradient(180deg, #0a100e 0%, #0c1210 40%, #0e1613 100%);
  background-attachment: fixed;
}

.menu-app {
  max-width: 768px;
  width: 100%;
  margin: 0 auto;
  padding: 0 12px 40px;
  min-height: 100vh;
}

.header {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 28px 16px 18px;
  margin: 12px 0 14px;
  min-height: 140px;
  background:
    linear-gradient(135deg, rgba(21,35,30,.95), rgba(12,18,16,.9)),
    repeating-linear-gradient(45deg, transparent, transparent 8px, rgba(201,162,39,.03) 8px, rgba(201,162,39,.03) 16px);
  border: 1px solid var(--border);
  overflow: hidden;
}

.header::before,
.header::after {
  content: '';
  position: absolute;
  pointer-events: none;
}

.header::before {
  inset: 8px;
  border: 1px solid rgba(201,162,39,.35);
}

.header::after {
  inset: 0;
  background: linear-gradient(180deg, rgba(0,0,0,.15), transparent 40%, rgba(0,0,0,.25));
}

.logo {
  position: relative;
  z-index: 1;
  display: block;
  width: 100%;
  max-width: 280px;
}

.logo img {
  width: 100%;
  height: 90px;
  object-fit: contain;
  filter: drop-shadow(0 8px 24px rgba(0,0,0,.6));
  animation: logoIn .8s ease both;
}

@keyframes logoIn {
  from { opacity: 0; transform: translateY(-8px) scale(.96); }
  to { opacity: 1; transform: none; }
}

.notice {
  position: relative;
  z-index: 1;
  text-align: center;
  color: rgba(245,240,230,.75);
  font-size: 10px;
  line-height: 1.45;
  margin-top: 12px;
  max-width: 420px;
  letter-spacing: .2px;
}

.menu-container {
  display: flex;
  overflow: hidden;
  width: 100%;
  position: relative;
}

.back-btn {
  position: absolute;
  z-index: 5;
  left: 8px;
  top: 12px;
  display: none;
  align-items: center;
  gap: 6px;
  cursor: pointer;
  color: var(--text);
  font-size: 12px;
  font-weight: 500;
  letter-spacing: .5px;
  text-transform: uppercase;
  padding: 6px 10px;
  background: rgba(0,0,0,.35);
  border: 1px solid var(--border);
  transition: color .2s, border-color .2s;
}

.back-btn.visible { display: flex; }
.back-btn:hover { color: var(--gold); border-color: var(--gold); }
.back-btn img { width: 16px; height: 16px; }

.cat-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
  width: 100%;
  min-width: 100%;
  padding-bottom: 40px;
  transform: translateX(0);
  transition: transform .32s ease;
  max-height: calc(100vh - 180px);
  overflow-y: auto;
  scrollbar-width: thin;
  scrollbar-color: var(--gold) transparent;
}

.cat-grid.away { transform: translateX(-110%); }

.cat-card {
  position: relative;
  min-height: 130px;
  cursor: pointer;
  background:
    linear-gradient(160deg, var(--panel-2), var(--panel)),
    repeating-linear-gradient(90deg, transparent, transparent 12px, rgba(201,162,39,.04) 12px, rgba(201,162,39,.04) 13px);
  border: 1px solid var(--border);
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform .25s ease, border-color .25s, box-shadow .25s;
  animation: cardIn .5s ease both;
}

.cat-card:nth-child(1) { animation-delay: .02s; }
.cat-card:nth-child(2) { animation-delay: .06s; grid-row: span 2; min-height: 270px; }
.cat-card:nth-child(3) { animation-delay: .1s; }
.cat-card:nth-child(4) { animation-delay: .14s; }
.cat-card:nth-child(5) { animation-delay: .18s; grid-row: span 2; min-height: 270px; }
.cat-card:nth-child(n+6) { animation-delay: .22s; }
.cat-card:last-child:nth-child(odd) { grid-column: 1 / -1; min-height: 110px; }

@keyframes cardIn {
  from { opacity: 0; transform: translateY(12px); }
  to { opacity: 1; transform: none; }
}

.cat-card::before {
  content: '';
  position: absolute;
  inset: 6px;
  border: 1px solid rgba(201,162,39,.25);
  pointer-events: none;
  transition: border-color .25s;
}

.cat-card:hover,
.cat-card:active {
  transform: translateY(-2px);
  border-color: var(--gold);
  box-shadow: 0 10px 30px rgba(0,0,0,.35);
}

.cat-card:hover::before { border-color: rgba(201,162,39,.55); }

.cat-card span {
  position: relative;
  z-index: 1;
  text-align: center;
  padding: 12px;
  font-family: 'Cormorant Garamond', serif;
  font-weight: 700;
  font-size: clamp(15px, 3.8vw, 20px);
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: var(--gold-soft);
  text-shadow: 0 2px 18px rgba(0,0,0,.8);
  line-height: 1.25;
}

.panel {
  width: 100%;
  min-width: 100%;
  transform: translateX(0);
  transition: transform .32s ease;
  max-height: calc(100vh - 180px);
  overflow-y: auto;
  padding: 0 4px 80px;
  scrollbar-width: thin;
  scrollbar-color: var(--gold) transparent;
}

.panel.away { transform: translateX(-110%); }
.panel.hidden { display: none; }

.list-title {
  position: sticky;
  top: 0;
  z-index: 3;
  text-align: center;
  font-family: 'Cormorant Garamond', serif;
  font-weight: 700;
  font-size: clamp(16px, 4vw, 22px);
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: var(--text);
  background: rgba(0,0,0,.92);
  border: 1px solid var(--border);
  border-top: none;
  padding: 14px 12px;
  margin-bottom: 12px;
  backdrop-filter: blur(8px);
}

.dish {
  border: 1px solid var(--border);
  background: linear-gradient(180deg, rgba(26,46,39,.55), rgba(12,18,16,.4));
  margin-bottom: 10px;
  padding: 14px 16px;
  transition: border-color .2s, background .2s;
  animation: dishIn .35s ease both;
}

@keyframes dishIn {
  from { opacity: 0; transform: translateX(8px); }
  to { opacity: 1; transform: none; }
}

.dish:hover { border-color: rgba(201,162,39,.4); }

.dish h3 {
  font-family: 'Cormorant Garamond', serif;
  font-weight: 600;
  font-size: clamp(16px, 3.5vw, 22px);
  letter-spacing: .5px;
  text-transform: uppercase;
  color: var(--text);
  margin-bottom: 4px;
  line-height: 1.2;
}

.dish p {
  font-size: 12px;
  color: var(--muted);
  font-weight: 300;
  line-height: 1.45;
  margin-bottom: 8px;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.dish p:empty { display: none; }

.prices {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 8px 16px;
  align-items: baseline;
}

.prices li {
  font-size: 13px;
  color: var(--muted);
}

.prices .amount {
  color: var(--gold);
  font-weight: 600;
  font-size: 14px;
  letter-spacing: .3px;
}

.sub-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 8px;
  margin-bottom: 10px;
}

.sub-card {
  position: relative;
  min-height: 100px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(160deg, var(--panel-2), var(--panel));
  border: 1px solid var(--border);
  padding: 12px;
  transition: border-color .2s, transform .2s;
}

.sub-card::before {
  content: '';
  position: absolute;
  inset: 5px;
  border: 1px solid rgba(201,162,39,.2);
  pointer-events: none;
}

.sub-card:hover { border-color: var(--gold); transform: translateY(-1px); }

.sub-card span {
  text-align: center;
  font-family: 'Cormorant Garamond', serif;
  font-weight: 700;
  font-size: 14px;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: var(--gold-soft);
  line-height: 1.3;
}

.loading {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 40vh;
  color: var(--gold);
  font-family: 'Cormorant Garamond', serif;
  letter-spacing: 2px;
  text-transform: uppercase;
}

@media (max-width: 480px) {
  .logo img { height: 64px; }
  .header { min-height: 110px; padding: 18px 12px 14px; margin-top: 8px; }
  .cat-card { min-height: 110px; }
  .cat-card:nth-child(2),
  .cat-card:nth-child(5) { min-height: 230px; }
  .cat-grid, .panel { max-height: calc(100vh - 140px); }
}

/* --- Photos --- */
.cat-card.has-img,
.sub-card.has-img {
  background-size: cover !important;
  background-position: center !important;
}

.cat-card.has-img span,
.sub-card.has-img span {
  text-shadow: 0 2px 20px rgba(0,0,0,.95), 0 0 8px rgba(0,0,0,.8);
}

.dish {
  display: flex;
  align-items: stretch;
  gap: 0;
  padding: 0;
  min-height: 110px;
  overflow: hidden;
}

.dish.has-img .dish-img {
  width: 120px;
  min-width: 120px;
  height: auto;
  min-height: 110px;
  object-fit: cover;
  display: block;
  background: #111;
}

.dish-body {
  flex: 1;
  padding: 12px 14px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-width: 0;
}

.dish:not(.has-img) .dish-body {
  padding: 14px 16px;
}

@media (max-width: 480px) {
  .dish.has-img .dish-img {
    width: 100px;
    min-width: 100px;
  }
}
