/* =========================================
   CORTINA — Premium QR Menu App Styles
   (Uber Eats, Apple, Toast POS Inspired)
   ========================================= */
:root {
  --bg-main:      #F5EBD9; /* Creamy background from logo */
  --bg-card:      #FFFFFF;
  --bg-nav:       #FFFFFF;
  
  --border-light: #E8D8C8;
  --border-dark:  #D4BFA5;
  
  --text-main:    #681023; /* Dark Maroon from logo text */
  --text-body:    #4A2A2A; /* Darker brown/maroon */
  --text-muted:   #8A6B6B;
  
  --accent:       #681023;
  --accent-light: #EBE0D0;
  --accent-fg:    #FFFFFF;
  --price-color:  #681023;
  
  --font-body:    'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  
  --radius-sm:    8px;
  --radius-md:    12px;
  --radius-lg:    16px;
  
  --shadow-card:  0 2px 8px rgba(0,0,0,0.04);
  --shadow-nav:   0 2px 10px rgba(0,0,0,0.06);
}

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

html { scroll-behavior: smooth; }

body {
  background: var(--bg-main);
  color: var(--text-body);
  font-family: var(--font-body);
  font-size: 15px;
  line-height: 1.5;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* ---- HEADER (Restaurant Info) ---- */
.site-header {
  background: var(--bg-card);
  padding-bottom: 16px;
}
.header-inner {
  max-width: 600px; /* Mobile focused max-width */
  margin: 0 auto;
  padding: 32px 20px 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}
.logo-block {
  margin-bottom: 12px;
}
.site-logo {
  max-width: 180px;
  height: auto;
  display: block;
  margin: 0 auto;
}
.tagline {
  font-size: 0.95rem;
  color: var(--text-muted);
  margin-top: 12px;
  max-width: 280px;
}

/* ---- CATEGORY NAV (Sticky Pills) ---- */
.category-nav {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--border-light);
  box-shadow: var(--shadow-nav);
  padding: 12px 0;
}
.nav-inner {
  max-width: 600px;
  margin: 0 auto;
  padding: 0 16px;
}
.nav-scroll {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  scrollbar-width: none; /* Firefox */
  padding-bottom: 2px;
}
.nav-scroll::-webkit-scrollbar { display: none; } /* Chrome/Safari */
.nav-btn {
  flex-shrink: 0;
  background: var(--accent-light);
  border: none;
  color: var(--text-main);
  font-family: inherit;
  font-size: 0.9rem;
  font-weight: 600;
  padding: 10px 18px;
  border-radius: 99px;
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.25s ease;
}
.nav-btn:hover {
  background: var(--border-dark);
}
.nav-btn.active {
  background: var(--accent);
  color: var(--accent-fg);
}

/* ---- MAIN MENU AREA ---- */
.menu-main {
  max-width: 600px;
  margin: 0 auto;
  padding: 24px 16px 80px;
}

/* Loading State */
.loading-state {
  text-align: center;
  padding: 80px 20px;
  color: var(--text-muted);
}
.spinner {
  width: 28px; height: 28px;
  border: 3px solid var(--border-light);
  border-top-color: var(--text-main);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
  margin: 0 auto 16px;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ---- CATEGORY SECTION ---- */
.category-section {
  margin-bottom: 48px;
  scroll-margin-top: 80px;
}
.category-header {
  margin-bottom: 20px;
  padding-bottom: 8px;
}
.cat-icon { display: none; } /* Cleaned up icons for minimal look */
.cat-title {
  font-size: 1.6rem;
  font-weight: 700;
  letter-spacing: -0.03em;
  color: var(--text-main);
}
.cat-desc {
  font-size: 0.9rem;
  color: var(--text-muted);
  margin-top: 4px;
}

/* ---- ITEMS (Uber Eats Row Style) ---- */
.items-list, .items-cards, .items-grid-3 {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

/* Unified Item Card Structure */
.menu-item-row, .menu-card, .mini-card {
  background: var(--bg-card);
  border-radius: var(--radius-md);
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  box-shadow: var(--shadow-card);
  border: 1px solid var(--border-light);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}
.menu-item-row:active, .menu-card:active, .mini-card:active {
  transform: scale(0.98);
}
.menu-item-row:hover, .menu-card:hover, .mini-card:hover {
  box-shadow: 0 4px 16px rgba(0,0,0,0.06);
}

/* Text Container inside cards */
.card-top, .mini-card { display: flex; flex-direction: column; gap: 4px; }
.item-dots { display: none; }

.item-name, .card-name {
  font-size: 1.05rem;
  font-weight: 600;
  color: var(--text-main);
  line-height: 1.3;
  letter-spacing: -0.01em;
}

.item-sub, .card-desc {
  font-size: 0.85rem;
  color: var(--text-muted);
  line-height: 1.4;
  margin-top: 2px;
  display: -webkit-box;
  -webkit-line-clamp: 2; /* Limit to 2 lines */
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.item-price, .card-price {
  font-size: 0.95rem;
  font-weight: 500;
  color: var(--price-color);
  margin-top: 6px;
  display: inline-block;
}

/* Notes & Extras */
.cat-note, .extras-box {
  margin-top: 16px;
  background: var(--accent-light);
  border-radius: var(--radius-sm);
  padding: 12px 16px;
  font-size: 0.85rem;
  color: var(--text-muted);
}
.extras-box strong { color: var(--text-main); }

/* Override Dark Section to look native */
.category-section.dark-section {
  background: transparent;
  box-shadow: none;
  border-radius: 0;
  padding: 0;
}
.category-section.dark-section .category-header {
  background: transparent;
  margin: 0 0 20px 0;
  padding: 0;
  border-radius: 0;
}
.category-section.dark-section .cat-title { color: var(--text-main); }
.category-section.dark-section .menu-card {
  background: var(--bg-card);
  border: 1px solid var(--border-light);
}
.category-section.dark-section .card-name { color: var(--text-main); }
.category-section.dark-section .card-desc { color: var(--text-muted); }
.category-section.dark-section .card-price { color: var(--price-color); background: none; }

/* ---- FOOTER ---- */
.site-footer {
  text-align: center;
  padding: 40px 20px 60px;
  background: var(--bg-main);
  color: var(--text-muted);
}
.footer-divider { display: none; }
.footer-quote {
  font-size: 0.9rem;
  margin-bottom: 8px;
  font-weight: 500;
}
.footer-copy {
  font-size: 0.75rem;
}

/* ---- DESKTOP OPTIMIZATIONS ---- */
/* Although mobile-first, make it look like a nice app wrapper on desktop */
@media (min-width: 601px) {
  body {
    background: #EFEFEF; /* Darker outside */
  }
  .site-header {
    background: var(--bg-card);
    border-radius: 24px 24px 0 0;
    max-width: 600px;
    margin: 40px auto 0;
    box-shadow: 0 10px 40px rgba(0,0,0,0.05);
  }
  .category-nav {
    max-width: 600px;
    margin: 0 auto;
    border-left: 1px solid var(--border-light);
    border-right: 1px solid var(--border-light);
  }
  .menu-main {
    background: var(--bg-main);
    border-left: 1px solid var(--border-light);
    border-right: 1px solid var(--border-light);
    min-height: 80vh;
  }
  .site-footer {
    max-width: 600px;
    margin: 0 auto 40px;
    border-radius: 0 0 24px 24px;
    border-left: 1px solid var(--border-light);
    border-right: 1px solid var(--border-light);
    border-bottom: 1px solid var(--border-light);
    box-shadow: 0 20px 40px rgba(0,0,0,0.05);
  }
  /* Grid layouts for cards on desktop app wrapper */
  .items-list, .items-cards, .items-grid-3 {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
  }
}
@media (max-width: 600px) {
  .items-list, .items-cards, .items-grid-3 {
    grid-template-columns: 1fr;
  }
}
