:root {
  --bg-cream: #FAF6F0;
  --primary-dark: #1C1C1A;
  --accent-gold: #C8963E;
  --accent-gold-hover: #B08132;
  --accent-green: #3D6B4F;
  --card-surface: #FFFFFF;
  --text-muted: #7A7065;

  --font-display: 'Playfair Display', Georgia, serif;
  --font-body: 'DM Sans', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-mono: 'DM Mono', monospace;

  --shadow-warm: 0 12px 32px rgba(28, 28, 26, 0.04), 0 2px 8px rgba(28, 28, 26, 0.02);
  --shadow-hover: 0 24px 48px rgba(28, 28, 26, 0.09), 0 4px 16px rgba(28, 28, 26, 0.03);
  --transition-smooth: all 0.45s cubic-bezier(0.16, 1, 0.3, 1);
  --transition-fast: all 0.2s ease;

  --sidebar-width: 100px;
  --tabbar-height: 80px;
}

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

html {
  /* ✅ FIX: Remove scroll-behavior: smooth here — we handle it in JS
         Having both causes the "teleport" / jump-to-top bug */
  background-color: var(--bg-cream);
  color: var(--primary-dark);
  font-family: var(--font-body);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  overflow-x: hidden;
  line-height: 1.6;
}

a {
  color: inherit;
  text-decoration: none;
  transition: var(--transition-fast);
}

.container {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
}

/* ─── HERO ──────────────────────────────────────────────────────────────── */
.hero {
  position: relative;
  /* ✅ FIX: Use 100dvh (dynamic viewport height) so the hero is exactly
         the visible screen on mobile too — no menu peeking below */
  height: 100dvh;
  min-height: 600px;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  background-image: linear-gradient(rgba(28, 28, 26, 0.65),
      rgba(28, 28, 26, 0.75)), url('assets/hero.jpg');
  background-size: cover;
  background-position: center;
  background-attachment: scroll;
  color: #FFFFFF;
  overflow: hidden;
}

@media (min-width: 1024px) {
  .hero {
    background-attachment: fixed;
  }
}

.hero-content {
  position: relative;
  z-index: 2;
  max-width: 800px;
  padding: 0 20px;
  opacity: 0;
  transform: translateY(30px);
  animation: heroFadeIn 1.2s cubic-bezier(0.16, 1, 0.3, 1) forwards;
  animation-delay: 0.2s;
}

.hero-pretitle {
  font-family: var(--font-body);
  font-size: 0.85rem;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: var(--accent-gold);
  margin-bottom: 16px;
  font-weight: 600;
}

.hero-title {
  font-family: var(--font-display);
  font-size: clamp(3rem, 7vw, 5.5rem);
  font-weight: 400;
  line-height: 1.1;
  margin-bottom: 16px;
  letter-spacing: -0.02em;
}

.hero-divider {
  border: none;
  height: 1px;
  background: linear-gradient(to right, transparent, var(--accent-gold), transparent);
  width: 160px;
  margin: 16px auto;
}

.hero-tagline {
  font-family: var(--font-body);
  font-size: clamp(1.1rem, 2.5vw, 1.5rem);
  font-style: italic;
  font-weight: 400;
  color: rgba(255, 255, 255, 0.9);
  letter-spacing: 0.02em;
}

.hero-subtitle {
  font-family: var(--font-body);
  font-size: 0.95rem;
  color: rgba(255, 255, 255, 0.7);
  letter-spacing: 0.05em;
  max-width: 500px;
  margin: 20px auto 0 auto;
}

.scroll-indicator {
  position: absolute;
  bottom: 40px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 2;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  color: rgba(255, 255, 255, 0.7);
  transition: var(--transition-fast);
}

.scroll-indicator:hover {
  color: var(--accent-gold);
}

.scroll-indicator span {
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.2em;
  font-weight: 600;
}

.scroll-indicator svg {
  width: 20px;
  height: 20px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
  animation: bounce 2s infinite;
}

@keyframes heroFadeIn {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes bounce {

  0%,
  20%,
  50%,
  80%,
  100% {
    transform: translateY(0);
  }

  40% {
    transform: translateY(-6px);
  }

  60% {
    transform: translateY(-3px);
  }
}

/* ─── MENU LAYOUT ───────────────────────────────────────────────────────── */
.menu-layout-container {
  display: flex;
  position: relative;
  /* ✅ FIX: was margin-top: 40px — kept but won't affect hero visibility
         since hero is now 100dvh */
  margin-top: 40px;
}

.menu-section {
  width: 100%;
  padding-bottom: 80px;
}

/* Mobile: fixed bottom tab bar */
@media (max-width: 1023px) {
  .nav-wrapper {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    height: var(--tabbar-height);
    background-color: rgba(250, 246, 240, 0.95);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border-top: 1px solid rgba(28, 28, 26, 0.08);
    z-index: 100;
    display: flex;
    justify-content: center;
    transform: translateY(100%);
    transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1);
  }

  .nav-wrapper.visible {
    transform: translateY(0);
  }

  .category-nav {
    display: flex;
    align-items: center;
    justify-content: space-around;
    width: 100%;
    max-width: 600px;
    height: 100%;
    padding: 0 8px;
  }

  /* Add bottom padding so last cards aren't hidden behind tab bar */
  .menu-section {
    padding-bottom: calc(var(--tabbar-height) + 40px);
  }
}

/* Desktop: sticky sidebar */
@media (min-width: 1024px) {
  .nav-wrapper {
    position: sticky;
    top: 40px;
    width: var(--sidebar-width);
    height: calc(100vh - 80px);
    flex-shrink: 0;
    border-right: 1px solid rgba(28, 28, 26, 0.08);
    display: flex;
    align-items: center;
    justify-content: center;
  }

  .menu-section {
    flex-grow: 1;
    padding-left: 60px;
  }

  .category-nav {
    display: flex;
    flex-direction: column;
    gap: 32px;
  }
}

/* Category Buttons */
.category-tab {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  font-family: var(--font-body);
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--text-muted);
  background: none;
  border: none;
  cursor: pointer;
  transition: var(--transition-smooth);
  position: relative;
}

.category-tab svg {
  width: 24px;
  height: 24px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.5;
  stroke-linecap: round;
  stroke-linejoin: round;
  transition: var(--transition-smooth);
}

@media (min-width: 1024px) {
  .category-tab svg {
    width: 28px;
    height: 28px;
  }

  .category-tab {
    gap: 10px;
    font-size: 0.8rem;
  }
}

.category-tab:hover {
  color: var(--primary-dark);
}

.category-tab:hover svg {
  transform: translateY(-2px);
}

.category-tab.active {
  color: var(--accent-gold);
}

.category-tab.active svg {
  stroke-width: 2;
}

/* ─── MENU GROUPS & CARDS ───────────────────────────────────────────────── */
.menu-group {
  margin-bottom: 80px;
}

.section-divider {
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 48px;
  gap: 24px;
}

.section-line {
  flex-grow: 1;
  height: 1px;
  background: linear-gradient(to right, transparent, rgba(200, 150, 62, 0.3), transparent);
}

.section-title {
  font-family: var(--font-display);
  font-size: 2rem;
  font-weight: 400;
  letter-spacing: 0.05em;
  color: var(--primary-dark);
  text-transform: capitalize;
}

.menu-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
}

@media (min-width: 768px) {
  .menu-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 32px;
  }
}

@media (min-width: 1200px) {
  .menu-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

/* Menu Card */
.menu-card {
  background-color: var(--card-surface);
  border-radius: 12px;
  overflow: hidden;
  box-shadow: var(--shadow-warm);
  display: flex;
  flex-direction: column;
  height: 100%;
  position: relative;
  transition: var(--transition-smooth);
  opacity: 0;
  transform: translateY(30px);
}

.menu-card.animate-in {
  opacity: 1;
  transform: translateY(0);
}

.menu-card:hover {
  transform: translateY(-8px);
  box-shadow: var(--shadow-hover);
}

.card-image-container {
  position: relative;
  width: 100%;
  height: 140px;
  overflow: hidden;
  background-color: #ECE7DF;
}

@media (min-width: 768px) {
  .card-image-container {
    height: 240px;
  }
}

.card-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}

.menu-card:hover .card-image {
  transform: scale(1.06);
}

.card-badge {
  position: absolute;
  top: 8px;
  left: 8px;
  background-color: var(--accent-green);
  color: #FFFFFF;
  font-size: 0.55rem;
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  padding: 4px 8px;
  border-radius: 40px;
  z-index: 10;
  box-shadow: 0 4px 10px rgba(61, 107, 79, 0.2);
}

@media (min-width: 768px) {
  .card-badge {
    top: 16px;
    left: 16px;
    font-size: 0.7rem;
    padding: 6px 14px;
  }
}

.card-details {
  padding: 12px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  flex-grow: 1;
}

@media (min-width: 768px) {
  .card-details {
    padding: 24px;
  }
}

.card-text-block {
  margin-bottom: 16px;
}

.dish-title {
  font-family: var(--font-display);
  font-size: 1rem;
  font-weight: 700;
  color: var(--primary-dark);
  line-height: 1.2;
  margin-bottom: 4px;
}

@media (min-width: 768px) {
  .dish-title {
    font-size: 1.25rem;
    line-height: 1.3;
    margin-bottom: 8px;
  }
}

.dish-description {
  font-size: 0.75rem;
  color: var(--text-muted);
  line-height: 1.4;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  text-overflow: ellipsis;
}

@media (min-width: 768px) {
  .dish-description {
    font-size: 0.9rem;
    line-height: 1.5;
  }
}

.card-footer-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.dish-price {
  font-family: var(--font-mono);
  font-size: 0.95rem;
  font-weight: 500;
  color: var(--accent-gold);
  white-space: nowrap;
}

@media (min-width: 768px) {
  .dish-price {
    font-size: 1.15rem;
  }
}

/* ─── ABOUT STRIP ───────────────────────────────────────────────────────── */
.about-strip {
  background-color: var(--primary-dark);
  color: #FFFFFF;
  padding: 80px 0;
  position: relative;
  z-index: 2;
}

.about-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 48px;
  text-align: center;
}

@media (min-width: 768px) {
  .about-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

.about-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  max-width: 320px;
  margin: 0 auto;
  opacity: 0;
  transform: translateY(20px);
  transition: var(--transition-smooth);
}

.about-item.animate-in {
  opacity: 1;
  transform: translateY(0);
}

.about-icon-container {
  width: 72px;
  height: 72px;
  border-radius: 50%;
  background-color: rgba(200, 150, 62, 0.15);
  border: 1px solid rgba(200, 150, 62, 0.3);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 24px;
  color: var(--accent-gold);
  transition: var(--transition-smooth);
}

.about-item:hover .about-icon-container {
  background-color: var(--accent-gold);
  color: var(--primary-dark);
  transform: scale(1.05);
}

.about-icon-container svg {
  width: 32px;
  height: 32px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.5;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.about-title {
  font-family: var(--font-display);
  font-size: 1.35rem;
  font-weight: 500;
  margin-bottom: 12px;
  letter-spacing: 0.03em;
}

.about-description {
  font-size: 0.9rem;
  color: rgba(255, 255, 255, 0.65);
  line-height: 1.6;
}

/* ─── FOOTER ────────────────────────────────────────────────────────────── */
.footer {
  background-color: var(--bg-cream);
  padding: 80px 0 24px 0;
  position: relative;
  z-index: 2;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 40px;
  margin-bottom: 60px;
  text-align: center;
}

@media (min-width: 768px) {
  .footer-grid {
    text-align: left;
    grid-template-columns: repeat(2, 1fr);
  }
}

.footer-brand {
  font-family: var(--font-display);
  font-size: 2.25rem;
  color: var(--primary-dark);
  margin-bottom: 16px;
  font-weight: 500;
}

.footer-text {
  color: var(--text-muted);
  margin-bottom: 24px;
  font-size: 0.95rem;
  line-height: 1.6;
  max-width: 400px;
  margin-left: auto;
  margin-right: auto;
}

@media (min-width: 768px) {
  .footer-text {
    margin-left: 0;
  }
}

.contact-details {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  font-size: 0.95rem;
}

@media (min-width: 768px) {
  .contact-details {
    align-items: flex-start;
  }
}

.contact-line {
  display: flex;
  align-items: center;
  gap: 12px;
  color: var(--primary-dark);
}

.contact-line svg {
  width: 18px;
  height: 18px;
  color: var(--accent-gold);
  flex-shrink: 0;
}

.footer-bottom {
  border-top: 1px solid rgba(28, 28, 26, 0.06);
  padding-top: 24px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  align-items: center;
  text-align: center;
  font-size: 0.85rem;
  color: var(--text-muted);
  letter-spacing: 0.02em;
}

@media (min-width: 768px) {
  .footer-bottom {
    flex-direction: row;
    justify-content: space-between;
    text-align: left;
  }
}

.kl7sr-link {
  font-weight: 600;
  color: var(--accent-gold);
  transition: var(--transition-fast);
}

.kl7sr-link:hover {
  color: var(--accent-gold-hover);
  text-decoration: underline;
}

/* ─── ORDER CONTROLS ────────────────────────────────────────────────────── */
.order-controls {
  display: flex;
  align-items: center;
  justify-content: center;
}

.btn-add {
  background: transparent;
  border: 1px solid var(--accent-gold);
  color: var(--accent-gold);
  border-radius: 40px;
  padding: 4px 12px;
  font-family: var(--font-body);
  font-size: 0.75rem;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition-fast);
}

.btn-add:hover {
  background: var(--accent-gold);
  color: var(--primary-dark);
}

.qty-control {
  display: flex;
  align-items: center;
  background: rgba(200, 150, 62, 0.1);
  border: 1px solid var(--accent-gold);
  border-radius: 40px;
  overflow: hidden;
}

.qty-btn {
  background: transparent;
  border: none;
  color: var(--accent-gold);
  width: 28px;
  height: 26px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-weight: bold;
  font-size: 1rem;
  transition: var(--transition-fast);
}

.qty-btn:hover {
  background: rgba(200, 150, 62, 0.2);
}

.qty-num {
  font-family: var(--font-mono);
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--primary-dark);
  min-width: 24px;
  text-align: center;
}

/* ─── FLOATING ORDER BAR ────────────────────────────────────────────────── */
.floating-bar {
  position: fixed !important;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%);
  width: calc(100% - 48px);
  max-width: 480px;
  background-color: var(--primary-dark);
  color: #fff;
  z-index: 200;
  border-radius: 40px;
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.3);
  cursor: pointer;
  transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.2s ease;
  animation: slideUpPill 0.4s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.floating-bar:hover {
  transform: translateX(-50%) translateY(-4px);
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.4);
}

@media (max-width: 1023px) {
  .floating-bar {
    bottom: calc(var(--tabbar-height, 80px) + 24px);
  }
}

@keyframes slideUpPill {
  from {
    opacity: 0;
    transform: translate(-50%, 100px);
  }

  to {
    opacity: 1;
    transform: translate(-50%, 0);
  }
}

.floating-bar-content {
  display: flex;
  justify-content: space-between;
  align-items: center;
  height: 64px;
  padding: 0 12px 0 32px;
  width: 100%;
}

.floating-text {
  font-size: 1.05rem;
  font-weight: 600;
  letter-spacing: 0.02em;
}

.floating-right {
  display: flex;
  align-items: center;
  gap: 16px;
}

.floating-price {
  font-family: var(--font-mono);
  color: var(--accent-gold);
  font-weight: 600;
  font-size: 1.15rem;
}

.floating-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  background-color: var(--accent-gold);
  color: var(--primary-dark);
  border-radius: 50%;
  transition: transform 0.2s ease;
}

.floating-bar:hover .floating-icon {
  transform: translateX(4px);
}

/* ─── ORDER MODAL ───────────────────────────────────────────────────────── */
.order-modal-scrim {
  position: fixed;
  inset: 0;
  background-color: rgba(28, 28, 26, 0.8);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
}

.order-modal {
  background-color: var(--bg-cream);
  border-radius: 16px;
  width: 100%;
  max-width: 480px;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
  position: relative;
}

.modal-panel {
  padding: 32px 24px;
  animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(10px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.modal-title {
  font-family: var(--font-display);
  font-size: 1.8rem;
  font-weight: 500;
  color: var(--primary-dark);
  text-align: center;
  margin-bottom: 24px;
}

.modal-items {
  display: flex;
  flex-direction: column;
  gap: 16px;
  margin-bottom: 24px;
}

.modal-item-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.modal-item-info {
  display: flex;
  flex-direction: column;
}

.modal-item-name {
  font-weight: 600;
  color: var(--primary-dark);
  font-size: 1rem;
}

.modal-item-calc {
  font-size: 0.8rem;
  color: var(--text-muted);
}

.modal-item-right {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 4px;
}

.modal-item-total {
  font-family: var(--font-mono);
  font-weight: 600;
  color: var(--accent-gold);
}

.modal-qty-mini {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.8rem;
  background: rgba(200, 150, 62, 0.1);
  border-radius: 20px;
  padding: 2px 8px;
}

.modal-qty-mini button {
  background: none;
  border: none;
  color: var(--accent-gold);
  font-weight: bold;
  cursor: pointer;
  padding: 2px 4px;
}

.modal-divider {
  border: none;
  height: 1px;
  background: rgba(28, 28, 26, 0.1);
  margin: 20px 0;
}

.modal-total-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 32px;
  font-weight: 600;
  font-size: 1.1rem;
  color: var(--primary-dark);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.modal-total-price {
  font-family: var(--font-mono);
  color: var(--accent-gold);
  font-size: 1.3rem;
}

.modal-actions {
  display: flex;
  gap: 12px;
}

.modal-actions button {
  flex: 1;
  padding: 12px;
  border-radius: 8px;
  font-family: var(--font-body);
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition-fast);
}

.btn-primary {
  background-color: var(--accent-gold);
  color: var(--primary-dark);
  border: 1px solid var(--accent-gold);
}

.btn-primary:hover {
  background-color: var(--accent-gold-hover);
}

.btn-secondary {
  background-color: transparent;
  color: var(--primary-dark);
  border: 1px solid rgba(28, 28, 26, 0.2);
}

.btn-secondary:hover {
  border-color: var(--primary-dark);
}

/* ─── QR SCREEN ─────────────────────────────────────────────────────────── */
.modal-subtitle {
  text-align: center;
  font-size: 0.9rem;
  color: var(--text-muted);
  margin-bottom: 24px;
  margin-top: -16px;
}

.qr-container {
  display: flex;
  justify-content: center;
  margin-bottom: 24px;
}

.qr-container>div {
  background: white;
  padding: 16px;
  border-radius: 12px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
}

.qr-summary-text-container {
  background-color: rgba(255, 255, 255, 0.6);
  border: 1px solid rgba(28, 28, 26, 0.05);
  border-radius: 8px;
  padding: 16px;
  margin-bottom: 24px;
  max-height: 160px;
  overflow-y: auto;
}

.qr-summary-text {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--primary-dark);
  line-height: 1.4;
  white-space: pre-wrap;
}

.modal-actions-centered {
  display: flex;
  justify-content: center;
  gap: 16px;
}

.btn-text {
  background: none;
  border: none;
  color: var(--text-muted);
  font-family: var(--font-body);
  font-size: 0.9rem;
  font-weight: 500;
  cursor: pointer;
  padding: 8px 16px;
  transition: var(--transition-fast);
}

.btn-text:hover {
  color: var(--primary-dark);
  text-decoration: underline;
}