@import url('https://fonts.googleapis.com/css2?family=Great+Vibes&family=Outfit:wght@300;400;500;600;700&family=Playfair+Display:ital,wght@0,400;0,600;0,700;1,400&display=swap');

/* ==========================================
   Design System & Variables - LIGHT THEME
   ========================================== */
:root {
  --bg-primary: #ffffff;
  --bg-secondary: #f9f9fb;
  --bg-card: #ffffff;
  --bg-overlay: rgba(255, 255, 255, 0.9);
  
  --color-red: #9B1C1C;
  --color-red-light: #B22222;
  --color-gold: #9B1C1C; /* Styled to use red highlights */
  --color-gold-dark: #9B1C1C;
  
  --text-primary: #111111;
  --text-secondary: #444444;
  --text-muted: #7e7e86;
  
  --border-color: #e5e5e7;
  --border-gold: rgba(155, 28, 28, 0.15);
  
  --font-serif: 'Playfair Display', serif;
  --font-sans: 'Outfit', sans-serif;
  --font-cursive: 'Great Vibes', cursive;
  
  --transition-smooth: all 0.5s cubic-bezier(0.16, 1, 0.3, 1);
  --transition-fast: all 0.25s ease;
  
  --container-width: 600px; /* Designed primarily for premium mobile/tablet QR experience */
}

/* ==========================================
   Base Styles
   ========================================== */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  -webkit-tap-highlight-color: transparent;
}

body {
  background-color: #f4f4f6; /* Subtle page backdrop for desktop framing */
  color: var(--text-primary);
  font-family: var(--font-sans);
  overflow-x: hidden;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* Smooth Scroll */
html {
  scroll-behavior: smooth;
  scrollbar-width: none; /* Firefox */
}

html::-webkit-scrollbar {
  display: none; /* Safari and Chrome */
}

/* Custom Scrollbar for elements */
.custom-scroll::-webkit-scrollbar {
  height: 3px;
  width: 3px;
}
.custom-scroll::-webkit-scrollbar-track {
  background: var(--bg-primary);
}
.custom-scroll::-webkit-scrollbar-thumb {
  background: var(--color-red);
  border-radius: 3px;
}

/* App Wrapper */
.app-container {
  max-width: var(--container-width);
  margin: 0 auto;
  min-height: 100vh;
  position: relative;
  background-color: var(--bg-primary);
  box-shadow: 0 0 40px rgba(0, 0, 0, 0.05);
  border-left: 1px solid var(--border-color);
  border-right: 1px solid var(--border-color);
  padding-bottom: 60px;
}

/* ==========================================
   Splash Screen
   ========================================== */
.splash-screen {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  z-index: 1000;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: space-between;
  padding: 8vh 24px 10vh 24px;
  overflow: hidden;
  background-color: #ffffff;
  transition: transform 0.8s cubic-bezier(0.85, 0, 0.15, 1), opacity 0.8s ease;
}

.splash-screen.hidden {
  transform: translateY(-100%);
  opacity: 0;
  pointer-events: none;
}

/* Splash Video & Overlay */
.splash-bg {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.8;
  filter: contrast(100%);
}

.splash-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(to bottom, 
    rgba(255, 255, 255, 0.45) 0%, 
    rgba(255, 255, 255, 0.15) 50%, 
    rgba(255, 255, 255, 0.8) 100%
  );
  z-index: 2;
}

/* Splash Content */
.splash-header {
  position: relative;
  z-index: 3;
  display: flex;
  flex-direction: column;
  align-items: center;
  margin-top: 4vh;
}

.splash-logo {
  width: 280px;
  height: auto;
  filter: drop-shadow(0 4px 12px rgba(155, 28, 28, 0.15));
  animation: logo-glow 3s infinite alternate ease-in-out;
}

.splash-since {
  font-family: var(--font-cursive);
  font-size: 2.5rem;
  color: #ffffff;
  margin-top: -5px;
  letter-spacing: 1px;
  opacity: 0.95;
  text-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

.splash-footer {
  position: relative;
  z-index: 3;
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 24px;
}

/* Premium Button styling */
.btn-premium {
  position: relative;
  background: transparent;
  color: var(--text-primary);
  font-family: var(--font-sans);
  font-size: 0.95rem;
  font-weight: 600;
  letter-spacing: 3px;
  text-transform: uppercase;
  padding: 16px 40px;
  border: 1px solid var(--color-red);
  cursor: pointer;
  overflow: hidden;
  transition: var(--transition-smooth);
  backdrop-filter: blur(5px);
}

.btn-premium::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(
    90deg,
    transparent,
    rgba(155, 28, 28, 0.15),
    transparent
  );
  transition: 0.6s;
}

.btn-premium:hover::before {
  left: 100%;
}

.btn-premium:hover {
  background-color: var(--color-red);
  border-color: var(--color-red);
  color: #ffffff;
  box-shadow: 0 10px 20px rgba(155, 28, 28, 0.2);
  transform: translateY(-2px);
}

.btn-premium:active {
  transform: translateY(1px);
}

/* ==========================================
   Header (Sticky)
   ========================================== */
.main-header {
  position: sticky;
  top: 0;
  background-color: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border-color);
  z-index: 100;
  padding: 16px 20px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.header-logo {
  height: 52px;
  width: auto;
  filter: drop-shadow(0 2px 4px rgba(155, 28, 28, 0.08));
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 16px;
}

.header-icon-btn {
  background: transparent;
  border: none;
  color: var(--text-primary);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: 1px solid var(--border-color);
  transition: var(--transition-fast);
}

.header-icon-btn:hover {
  border-color: var(--color-red);
  color: var(--color-red);
}

/* ==========================================
   Category Selector
   ========================================== */
.category-nav-wrapper {
  position: sticky;
  top: 85px; /* Just below header */
  background-color: var(--bg-primary);
  z-index: 99;
  border-bottom: 1px solid var(--border-color);
}

.category-nav {
  display: flex;
  overflow-x: auto;
  scroll-behavior: smooth;
  scroll-snap-type: x mandatory;
  padding: 0 16px;
  gap: 8px;
  height: 52px;
  align-items: center;
  scrollbar-width: none; /* Firefox */
}

.category-nav::-webkit-scrollbar {
  display: none; /* Chrome/Safari */
}

.category-btn {
  white-space: nowrap;
  scroll-snap-align: start;
  background: transparent;
  border: none;
  color: var(--text-secondary);
  font-family: var(--font-sans);
  font-size: 0.85rem;
  font-weight: 500;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  padding: 10px 16px;
  cursor: pointer;
  position: relative;
  transition: var(--transition-fast);
}

.category-btn.active {
  color: var(--color-red);
  font-weight: 600;
}

.category-btn::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%) scaleX(0);
  width: 40%;
  height: 2px;
  background-color: var(--color-red);
  transition: var(--transition-fast);
}

.category-btn.active::after {
  transform: translateX(-50%) scaleX(1);
}

/* ==========================================
   Hero Section
   ========================================== */
.menu-hero {
  padding: 40px 24px 20px 24px;
  text-align: center;
  position: relative;
}

.menu-hero-title {
  font-family: var(--font-serif);
  font-size: 2rem;
  font-weight: 400;
  letter-spacing: 1px;
  margin-bottom: 6px;
}

.menu-hero-title span {
  color: var(--color-red);
}

.menu-hero-divider {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  margin: 16px auto 0 auto;
  width: 60px;
}

.menu-hero-divider::before,
.menu-hero-divider::after {
  content: '';
  height: 1px;
  flex: 1;
  background-color: var(--border-gold);
}

.menu-hero-divider .dot {
  width: 4px;
  height: 4px;
  background-color: var(--color-red);
  border-radius: 50%;
}

/* ==========================================
   Search Bar
   ========================================== */
.search-wrapper {
  padding: 24px 24px 0 24px;
  margin-bottom: 24px;
}

.search-container {
  display: flex;
  align-items: center;
  background-color: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: 0;
  padding: 10px 16px;
  transition: var(--transition-fast);
}

.search-container:focus-within {
  border-color: var(--color-red);
  background-color: #ffffff;
}

.search-icon {
  color: var(--text-muted);
  margin-right: 12px;
}

.search-input {
  background: transparent;
  border: none;
  color: var(--text-primary);
  font-family: var(--font-sans);
  font-size: 0.9rem;
  width: 100%;
  outline: none;
}

.search-input::placeholder {
  color: var(--text-muted);
}

/* ==========================================
   Menu Sections
   ========================================== */
.menu-section {
  padding: 24px 24px;
  scroll-margin-top: 145px; /* Offset sticky headers */
}

.section-header {
  margin-bottom: 30px;
  position: relative;
}

.section-title {
  font-family: var(--font-serif);
  font-size: 1.6rem;
  font-weight: 400;
  letter-spacing: 1px;
  color: var(--text-primary);
  display: flex;
  align-items: center;
  gap: 16px;
}

.section-title::after {
  content: '';
  height: 1px;
  flex-grow: 1;
  background: linear-gradient(90deg, var(--border-gold), transparent);
}

/* ==========================================
   Menu Item Cards
   ========================================== */
.menu-grid {
  display: flex;
  flex-direction: column;
  gap: 28px;
}

.menu-item {
  display: flex;
  flex-direction: column;
  background-color: var(--bg-card);
  border: 1px solid var(--border-color);
  overflow: hidden;
  cursor: pointer;
  transition: var(--transition-smooth);
}

.menu-item:hover {
  transform: translateY(-4px);
  border-color: var(--color-red);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.05);
}

.menu-item-image-wrapper {
  position: relative;
  width: 100%;
  padding-top: 60%; /* 5:3 Aspect Ratio */
  overflow: hidden;
  background-color: #f4f4f6;
}

.menu-item-image {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 1.2s cubic-bezier(0.16, 1, 0.3, 1);
}

.menu-item:hover .menu-item-image {
  transform: scale(1.05);
}

.menu-item-badge {
  position: absolute;
  top: 16px;
  left: 16px;
  background-color: var(--color-red);
  color: #fff;
  font-size: 0.65rem;
  font-weight: 600;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  padding: 6px 12px;
  z-index: 1;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
}

.menu-item-content {
  padding: 20px 24px;
}

.menu-item-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 16px;
  margin-bottom: 8px;
}

.menu-item-title {
  font-family: var(--font-serif);
  font-size: 1.15rem;
  font-weight: 600;
  letter-spacing: 0.5px;
}

.menu-item-price {
  font-family: var(--font-sans);
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--color-red);
  white-space: nowrap;
}

.menu-item-description {
  font-size: 0.85rem;
  color: var(--text-secondary);
  line-height: 1.5;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* Compact layout for items without images */
.menu-item.no-image {
  flex-direction: row;
  align-items: center;
  padding: 8px 0;
  background-color: transparent;
  border: none;
  border-bottom: 1px solid var(--border-color);
}

.menu-item.no-image:hover {
  transform: translateX(4px);
  border-color: var(--color-red);
  box-shadow: none;
}

.menu-item.no-image .menu-item-content {
  padding: 12px 0;
  width: 100%;
}

.menu-item.no-image .menu-item-description {
  margin-right: 60px;
}

.menu-item.no-image:hover .menu-item-title {
  color: var(--color-red);
}

/* ==========================================
   Interactive Detail Modal
   ========================================== */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  z-index: 1100;
  background-color: rgba(0, 0, 0, 0.4);
  backdrop-filter: blur(10px);
  display: flex;
  justify-content: center;
  align-items: flex-end; /* Slides from bottom on mobile */
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.5s cubic-bezier(0.16, 1, 0.3, 1);
}

.modal-overlay.active {
  opacity: 1;
  pointer-events: auto;
}

.modal-container {
  width: 100%;
  max-width: var(--container-width);
  background-color: var(--bg-primary);
  border-top: 1px solid var(--border-color);
  border-left: 1px solid var(--border-color);
  border-right: 1px solid var(--border-color);
  height: 90vh;
  display: flex;
  flex-direction: column;
  transform: translateY(100%);
  transition: transform 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}

.modal-overlay.active .modal-container {
  transform: translateY(0);
}

/* Scrollable Modal Content */
.modal-body {
  flex-grow: 1;
  overflow-y: auto;
  padding-bottom: 40px;
}

.modal-header-nav {
  position: absolute;
  top: 20px;
  right: 20px;
  z-index: 10;
}

.btn-close-modal {
  background: rgba(255, 255, 255, 0.85);
  border: 1px solid var(--border-color);
  color: var(--text-primary);
  width: 40px;
  height: 40px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  backdrop-filter: blur(10px);
  transition: var(--transition-fast);
}

.btn-close-modal:hover {
  background: var(--color-red);
  border-color: var(--color-red);
  color: #ffffff;
}

.modal-image-wrapper {
  position: relative;
  width: 100%;
  padding-top: 70%;
  background-color: #f4f4f6;
}

.modal-image {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.modal-content {
  padding: 32px 24px;
}

.modal-badge {
  display: inline-block;
  background-color: var(--color-red);
  color: #fff;
  font-size: 0.65rem;
  font-weight: 600;
  letter-spacing: 2px;
  text-transform: uppercase;
  padding: 6px 12px;
  margin-bottom: 16px;
}

.modal-title-row {
  margin-bottom: 16px;
}

.modal-title {
  font-family: var(--font-serif);
  font-size: 1.8rem;
  font-weight: 400;
  letter-spacing: 0.5px;
  line-height: 1.2;
}

.modal-price-footer {
  padding: 18px 24px;
  border-top: 1px solid var(--border-color);
  background: rgba(255, 255, 255, 0.96);
  backdrop-filter: blur(10px);
  text-align: center;
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 10;
}

.modal-price {
  font-family: var(--font-sans);
  font-size: 1.8rem;
  font-weight: 700;
  color: var(--color-red);
}

.modal-description {
  font-size: 0.95rem;
  color: var(--text-secondary);
  line-height: 1.6;
  margin-bottom: 32px;
}

.modal-details-section {
  display: flex;
  flex-direction: column;
  gap: 24px;
  border-top: 1px solid var(--border-color);
  padding-top: 24px;
}

.detail-block-title {
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: var(--color-red);
  margin-bottom: 6px;
}

.detail-block-text {
  font-size: 0.85rem;
  color: var(--text-secondary);
  line-height: 1.5;
}

/* ==========================================
   Footer
   ========================================== */
.main-footer {
  padding: 60px 24px 40px 24px;
  text-align: center;
  border-top: 1px solid var(--border-color);
  background-color: var(--bg-secondary);
}

.footer-logo {
  height: 50px;
  margin-bottom: 12px;
}

.footer-since {
  font-family: var(--font-cursive);
  font-size: 1.8rem;
  color: var(--color-red);
  margin-top: -12px;
  margin-bottom: 24px;
}

.footer-text {
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-bottom: 8px;
}

.footer-contact {
  font-size: 0.85rem;
  color: var(--text-secondary);
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 30px;
}

.footer-contact a {
  color: var(--color-red);
  text-decoration: none;
  font-weight: 500;
  transition: var(--transition-fast);
}

.footer-contact a:hover {
  color: var(--text-primary);
}

.footer-socials {
  display: flex;
  justify-content: center;
  gap: 16px;
}

.social-link {
  color: var(--text-secondary);
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: 1px solid var(--border-color);
  display: flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  transition: var(--transition-fast);
}

.social-link:hover {
  border-color: var(--color-red);
  color: var(--color-red);
  transform: translateY(-2px);
}

/* ==========================================
   Animations & Keyframes
   ========================================== */
@keyframes logo-glow {
  0% {
    filter: drop-shadow(0 4px 12px rgba(155, 28, 28, 0.15));
  }
  100% {
    filter: drop-shadow(0 4px 20px rgba(155, 28, 28, 0.35));
  }
}

/* Modern Scroll-driven Entrance Reveal Animations */
@media (prefers-reduced-motion: no-preference) {
  @supports ((animation-timeline: view()) and (animation-range: entry)) {
    @keyframes reveal-entry {
      from {
        opacity: 0;
        transform: translateY(40px);
      }
      to {
        opacity: 1;
        transform: translateY(0);
      }
    }
    
    .menu-item {
      animation: reveal-entry linear both;
      animation-timeline: view();
      animation-range: entry 10% entry 35%;
    }
  }
}

/* Custom Scroll-observer classes for JS fallback */
.reveal-on-scroll {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.8s cubic-bezier(0.16, 1, 0.3, 1), transform 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}

.reveal-on-scroll.revealed {
  opacity: 1;
  transform: translateY(0);
}

/* ==========================================
   Advanced Food Attributes (Weight, Pork, Nutrition)
   ========================================== */
.modal-weight {
  display: inline-block;
  background-color: var(--bg-secondary);
  border: 1px solid var(--border-color);
  color: var(--text-secondary);
  font-size: 0.72rem;
  font-weight: 600;
  border-radius: 20px;
  padding: 5px 12px;
  letter-spacing: 0.5px;
  text-transform: uppercase;
}

.safety-banner {
  background: linear-gradient(135deg, #fff5f5 0%, #fed7d7 100%);
  color: #c53030;
  border: 1px solid #feb2b2;
  padding: 10px 14px;
  display: flex;
  align-items: center;
  font-size: 0.8rem;
  font-weight: 600;
  margin: 14px 0 20px 0;
  border-radius: 4px;
}

.nutrition-accordion {
  border: 1px solid var(--border-color);
  background-color: var(--bg-secondary);
  margin-top: 20px;
  border-radius: 4px;
  overflow: hidden;
  transition: all 0.3s ease;
}

.nutrition-accordion-trigger {
  width: 100%;
  padding: 14px 16px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: none;
  border: none;
  color: var(--text-primary);
  font-family: var(--font-sans);
  font-size: 0.85rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  cursor: pointer;
  outline: none;
}

.accordion-chevron {
  transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  color: var(--text-secondary);
}

.nutrition-accordion.active .accordion-chevron {
  transform: rotate(180deg);
}

.nutrition-accordion-content {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.3s cubic-bezier(0.4, 0, 0.2, 1), padding 0.3s ease;
  padding: 0 16px;
}

.nutrition-accordion.active .nutrition-accordion-content {
  max-height: 200px;
  padding: 0 16px 16px 16px;
}

.modal-nutrition-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
}

.nutrition-item {
  background-color: var(--bg-primary);
  border: 1px solid var(--border-color);
  padding: 12px 4px;
  text-align: center;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.nutrition-val {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--color-red);
}

.nutrition-lbl {
  font-size: 0.6rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}
