/* ===== RESET & BASE ===== */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --bg: #0f0e0c;
  --bg2: #1a1814;
  --surface: #252220;
  --surface2: #2e2b28;
  --gold: #c9a96e;
  --gold-light: #e8c98a;
  --gold-dim: rgba(201,169,110,0.15);
  --text: #f0ece4;
  --text-dim: #9a9088;
  --text-muted: #5a5450;
  --accent: #8b4513;
  --green: #4caf74;
  --red: #e05252;
  --radius: 14px;
  --shadow: 0 4px 24px rgba(0,0,0,0.4);
}

html { -webkit-tap-highlight-color: transparent; scroll-behavior: smooth; }

body {
  background: var(--bg);
  color: var(--text);
  font-family: 'Inter', sans-serif;
  min-height: 100vh;
  overscroll-behavior: none;
}

/* ===== HEADER ===== */
.header {
  background: linear-gradient(160deg, #1c1510 0%, #0f0e0c 100%);
  padding: 48px 20px 36px;
  text-align: center;
  border-bottom: 1px solid rgba(201,169,110,0.12);
  position: relative;
  overflow: hidden;
}

/* Ambient glow — only opacity+transform so GPU handles it */
.header::before {
  content: '';
  position: absolute;
  top: -80px; left: 50%;
  width: 400px; height: 400px;
  background: radial-gradient(circle, rgba(201,169,110,0.1) 0%, transparent 65%);
  pointer-events: none;
  will-change: opacity, transform;
  animation: headerGlow 4s ease-in-out infinite alternate;
}

@keyframes headerGlow {
  from { opacity: 0.6; transform: translateX(-50%) scale(0.95); }
  to   { opacity: 1;   transform: translateX(-50%) scale(1.05); }
}

.header-content {
  position: relative;
  z-index: 1;
  will-change: opacity, transform;
  animation: fadeUp 0.7s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

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

.logo {
  font-family: 'Playfair Display', serif;
  font-size: 2.4rem;
  font-weight: 700;
  color: var(--gold);
  letter-spacing: 1px;
  /* Static text-shadow — no animation to avoid repaint every frame */
  text-shadow: 0 0 40px rgba(201,169,110,0.35), 0 0 80px rgba(201,169,110,0.1);
}

/* Glow pulse via a pseudo-element (opacity only = GPU) */
.logo-wrap {
  position: relative;
  display: inline-block;
}

.logo-wrap::after {
  content: attr(data-text);
  position: absolute;
  inset: 0;
  color: transparent;
  text-shadow: 0 0 60px rgba(201,169,110,0.5);
  pointer-events: none;
  will-change: opacity;
  animation: glowPulse 3s ease-in-out infinite alternate;
}

@keyframes glowPulse {
  from { opacity: 0.4; }
  to   { opacity: 1; }
}

.tagline {
  color: var(--text-muted);
  font-size: 0.78rem;
  /* Fixed letter-spacing — animating letter-spacing triggers layout */
  letter-spacing: 4px;
  text-transform: uppercase;
  margin-top: 8px;
  will-change: opacity, transform;
  animation: fadeUp 0.7s ease 0.3s both;
}

/* Decorative divider */
.header-divider {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  margin-top: 20px;
  will-change: opacity, transform;
  animation: fadeUp 0.7s ease 0.5s both;
}

.header-divider::before,
.header-divider::after {
  content: '';
  width: 60px;
  height: 1px;
  background: linear-gradient(to right, transparent, rgba(201,169,110,0.4));
}

.header-divider::after {
  background: linear-gradient(to left, transparent, rgba(201,169,110,0.4));
}

.header-diamond {
  width: 5px; height: 5px;
  background: var(--gold);
  transform: rotate(45deg);
  opacity: 0.6;
}

/* ===== CATEGORY NAV ===== */
.category-nav {
  display: flex;
  gap: 8px;
  padding: 14px 16px 12px;
  overflow-x: auto;
  scrollbar-width: none;
  -ms-overflow-style: none;
  position: sticky;
  top: 0;
  z-index: 10;
  background: rgba(15,14,12,0.95);
  border-bottom: 1px solid rgba(255,255,255,0.04);
  will-change: opacity, transform;
  animation: fadeUp 0.6s cubic-bezier(0.16, 1, 0.3, 1) 0.15s both;
}

.category-nav::-webkit-scrollbar { display: none; }

.cat-btn {
  flex-shrink: 0;
  background: var(--surface);
  color: var(--text-dim);
  border: 1px solid rgba(255,255,255,0.06);
  border-radius: 50px;
  padding: 8px 18px;
  font-size: 0.83rem;
  font-weight: 500;
  cursor: pointer;
  /* Only transition GPU-friendly props */
  transition:
    background 0.2s ease,
    color 0.2s ease,
    border-color 0.2s ease,
    transform 0.15s ease,
    box-shadow 0.2s ease,
    opacity 0.2s ease;
  letter-spacing: 0.3px;
}

.cat-btn:hover {
  background: var(--surface2);
  color: var(--text);
  border-color: rgba(201,169,110,0.2);
}

.cat-btn:active { transform: scale(0.94); }

.cat-btn.active {
  background: var(--gold);
  color: #1a1408;
  border-color: var(--gold);
  font-weight: 600;
  box-shadow: 0 0 18px rgba(201,169,110,0.28), 0 2px 8px rgba(0,0,0,0.3);
}

/* ===== MENU CONTAINER ===== */
.menu-container {
  padding: 20px 16px 40px;
  min-height: 60vh;
}

/* ===== SECTION HEADER ===== */
.section-header {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 28px 0 16px;
  will-change: opacity, transform;
  animation: fadeUp 0.45s ease forwards;
}

.section-header:first-child { margin-top: 4px; }

.section-title {
  font-family: 'Playfair Display', serif;
  font-size: 1.05rem;
  color: var(--gold);
  font-weight: 600;
  white-space: nowrap;
  letter-spacing: 0.5px;
}

.section-line {
  flex: 1;
  height: 1px;
  background: linear-gradient(to right, rgba(201,169,110,0.25), transparent);
}

/* ===== MENU GRID ===== */
.menu-grid { display: flex; flex-direction: column; gap: 0; }

/* ===== MENU CARD ===== */
.menu-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 0;
  border-bottom: 1px solid rgba(255,255,255,0.04);
  gap: 14px;
  cursor: default;
  position: relative;
  transition: transform 0.2s ease;
  will-change: opacity, transform;
  animation: cardReveal 0.45s cubic-bezier(0.16, 1, 0.3, 1) both;
}

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

/* Left accent bar via transform (no layout cost) */
.menu-card::before {
  content: '';
  position: absolute;
  left: -16px;
  top: 50%;
  width: 2px;
  height: 50%;
  background: var(--gold);
  border-radius: 0 2px 2px 0;
  opacity: 0;
  will-change: opacity, transform;
  transform: translateY(-50%) scaleY(0);
  transition: opacity 0.2s ease, transform 0.2s ease;
}

.menu-card:hover::before {
  opacity: 0.6;
  transform: translateY(-50%) scaleY(1);
}

.menu-card:hover {
  transform: translateX(4px);
}

.menu-card.unavailable { animation: cardRevealDim 0.45s cubic-bezier(0.16, 1, 0.3, 1) both; }

@keyframes cardRevealDim {
  from { opacity: 0; transform: translateY(14px); }
  to   { opacity: 0.35; transform: translateY(0); }
}
.menu-card.unavailable:hover { transform: none; }
.menu-card.unavailable:hover::before { opacity: 0; transform: translateY(-50%) scaleY(0); }

.card-info { flex: 1; min-width: 0; }

.card-name {
  font-size: 0.93rem;
  font-weight: 500;
  color: var(--text);
  margin-bottom: 3px;
  line-height: 1.35;
  transition: color 0.2s ease;
}

.menu-card:hover .card-name { color: var(--gold-light); }

.card-desc {
  font-size: 0.76rem;
  color: var(--text-muted);
  line-height: 1.5;
  margin-bottom: 6px;
}

.card-price {
  display: inline-flex;
  align-items: center;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--gold-light);
  margin-top: 2px;
  transition: color 0.2s ease;
}

.menu-card:hover .card-price { color: var(--gold); }

.card-unavailable-tag {
  font-size: 0.68rem;
  color: var(--red);
  font-weight: 500;
  margin-top: 4px;
  letter-spacing: 0.5px;
  text-transform: uppercase;
}

.card-thumb {
  width: 74px;
  height: 74px;
  object-fit: cover;
  border-radius: 10px;
  flex-shrink: 0;
  display: block;
  will-change: transform;
  transition:
    transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1),
    box-shadow 0.3s ease;
  box-shadow: 0 4px 12px rgba(0,0,0,0.4);
}

.menu-card:hover .card-thumb {
  transform: scale(1.06) rotate(1deg);
  box-shadow: 0 8px 24px rgba(0,0,0,0.5), 0 0 0 1px rgba(201,169,110,0.15);
}

/* ===== LOADING ===== */
.loading {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 80px 20px;
  gap: 20px;
  color: var(--text-dim);
  font-size: 0.85rem;
  letter-spacing: 0.5px;
}

.spinner {
  position: relative;
  width: 44px; height: 44px;
}

.spinner::before,
.spinner::after {
  content: '';
  position: absolute;
  border-radius: 50%;
  will-change: transform;
}

.spinner::before {
  inset: 0;
  border: 2px solid rgba(201,169,110,0.1);
  border-top-color: var(--gold);
  animation: spin 0.9s linear infinite;
}

.spinner::after {
  inset: 6px;
  border: 2px solid rgba(201,169,110,0.05);
  border-bottom-color: rgba(201,169,110,0.4);
  animation: spin 1.4s linear infinite reverse;
}

@keyframes spin { to { transform: rotate(360deg); } }

/* ===== EMPTY STATE ===== */
.empty-state {
  text-align: center;
  padding: 80px 20px;
  color: var(--text-muted);
  font-size: 0.9rem;
  letter-spacing: 0.5px;
  animation: fadeUp 0.4s ease forwards;
}

/* ===== FOOTER ===== */
.footer {
  text-align: center;
  padding: 30px 20px;
  color: var(--text-muted);
  font-size: 0.8rem;
  border-top: 1px solid rgba(255,255,255,0.04);
  margin-top: 10px;
  letter-spacing: 0.5px;
}

/* ===== SCROLL-TO-TOP ===== */
.scroll-top {
  position: fixed;
  bottom: 24px;
  right: 20px;
  width: 40px; height: 40px;
  background: var(--surface2);
  border: 1px solid rgba(201,169,110,0.2);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  opacity: 0;
  transform: translateY(12px);
  will-change: opacity, transform;
  transition: opacity 0.3s ease, transform 0.3s ease, background 0.2s ease;
  pointer-events: none;
  color: var(--gold);
  font-size: 14px;
  z-index: 100;
  box-shadow: 0 4px 16px rgba(0,0,0,0.4);
}

.scroll-top.visible {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}

.scroll-top:hover {
  background: var(--gold);
  color: #1a1408;
}

/* ===== SOCIAL FOOTER ===== */
.social-footer {
  text-align: center;
  padding: 32px 20px 48px;
  max-width: 560px;
  margin: 0 auto;
}

.social-divider {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  margin-bottom: 20px;
}

.social-divider-line {
  width: 60px;
  height: 1px;
  background: linear-gradient(to right, transparent, rgba(201,169,110,0.3));
}

.social-divider .social-divider-line:last-child {
  background: linear-gradient(to left, transparent, rgba(201,169,110,0.3));
}

.social-label {
  font-size: 0.72rem;
  color: var(--text-muted);
  letter-spacing: 2px;
  text-transform: uppercase;
  margin-bottom: 20px;
}

.social-links {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
}

.social-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  background: var(--surface);
  border: 1px solid rgba(201,169,110,0.15);
  border-radius: 50%;
  color: var(--text-dim);
  text-decoration: none;
  transition:
    background 0.2s ease,
    color 0.2s ease,
    border-color 0.2s ease,
    transform 0.15s ease,
    box-shadow 0.2s ease;
}

.social-btn:hover {
  background: var(--surface2);
  color: var(--gold-light);
  border-color: rgba(201,169,110,0.4);
  transform: translateY(-3px);
  box-shadow: 0 8px 20px rgba(0,0,0,0.35), 0 0 0 1px rgba(201,169,110,0.12);
}

.social-btn:active { transform: translateY(0) scale(0.92); }

.social-btn:focus-visible {
  outline: 2px solid var(--gold);
  outline-offset: 3px;
}

/* ===== RESPONSIVE ===== */
@media (min-width: 500px) {
  .header { padding: 56px 30px 42px; }
  .logo { font-size: 2.8rem; }
  .menu-container { padding: 24px 24px 60px; max-width: 560px; margin: 0 auto; }
  .category-nav { padding: 14px 24px 12px; }
  .menu-card::before { left: -24px; }
}

/* ===== STORE LOGO ===== */
.store-logo {
  width: 200px;
  height: auto;
  display: block;
  margin: 0 auto;
  will-change: opacity, transform;
  animation: fadeUp 0.7s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

/* ===== VIEW CONTAINERS ===== */
.view-container {
  max-width: 560px;
  margin: 0 auto;
}

/* ===== CATEGORIES GRID ===== */
.categories-grid {
  display: flex;
  flex-direction: column;
  padding: 16px;
  gap: 10px;
}

.category-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: var(--surface);
  border: 1px solid rgba(255,255,255,0.06);
  border-radius: var(--radius);
  padding: 14px 16px;
  cursor: pointer;
  transition:
    background 0.2s ease,
    border-color 0.2s ease,
    transform 0.15s ease;
  will-change: opacity, transform;
  animation: cardReveal 0.45s cubic-bezier(0.16, 1, 0.3, 1) both;
}

.category-card:hover {
  background: var(--surface2);
  border-color: rgba(201,169,110,0.25);
  transform: translateX(4px);
}

.category-card:active { transform: scale(0.97); }

.category-card-info {
  flex: 1;
  min-width: 0;
  padding-right: 14px;
}

.category-card-name {
  font-family: 'Playfair Display', serif;
  font-size: 1.05rem;
  font-weight: 600;
  color: var(--text);
  letter-spacing: 0.3px;
  margin-bottom: 4px;
  transition: color 0.2s ease;
}

.category-card:hover .category-card-name { color: var(--gold-light); }

.category-card-count {
  font-size: 0.73rem;
  color: var(--text-muted);
  letter-spacing: 0.5px;
}

.category-card-img {
  width: 80px;
  height: 80px;
  object-fit: cover;
  border-radius: 10px;
  flex-shrink: 0;
  box-shadow: 0 4px 12px rgba(0,0,0,0.4);
  transition:
    transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1),
    box-shadow 0.3s ease;
}

.category-card:hover .category-card-img {
  transform: scale(1.06) rotate(1deg);
  box-shadow: 0 8px 24px rgba(0,0,0,0.5), 0 0 0 1px rgba(201,169,110,0.15);
}

.category-card-img-placeholder {
  width: 80px;
  height: 80px;
  border-radius: 10px;
  flex-shrink: 0;
  background: var(--surface2);
  border: 1px solid rgba(201,169,110,0.12);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.8rem;
}

/* ===== PRODUCTS VIEW ===== */
.products-nav {
  padding: 14px 16px 0;
}

.back-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: none;
  border: none;
  color: var(--gold);
  font-size: 0.85rem;
  font-weight: 500;
  cursor: pointer;
  padding: 6px 0;
  letter-spacing: 0.3px;
  font-family: 'Inter', sans-serif;
  transition: opacity 0.2s ease, transform 0.15s ease;
}

.back-btn:hover { opacity: 0.75; transform: translateX(-3px); }
.back-btn:active { opacity: 0.5; }
.back-btn:focus-visible {
  outline: 2px solid var(--gold);
  outline-offset: 4px;
  border-radius: 4px;
}

.products-cat-banner {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px 8px;
  margin-bottom: 4px;
  border-bottom: 1px solid rgba(255,255,255,0.04);
}

.products-cat-title {
  font-family: 'Playfair Display', serif;
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--gold);
  white-space: nowrap;
  letter-spacing: 0.5px;
}

.products-cat-line {
  flex: 1;
  height: 1px;
  background: linear-gradient(to right, rgba(201,169,110,0.25), transparent);
}

.products-grid {
  padding: 0 16px 40px;
}

@media (min-width: 500px) {
  .store-logo { width: 220px; }
  .categories-grid { padding: 20px 24px; }
  .products-nav { padding: 16px 24px 0; }
  .products-cat-banner { padding: 14px 24px 10px; }
  .products-grid { padding: 0 24px 60px; }
  .menu-card::before { left: -24px; }
}
