:root {
  /* Colors - Premium Dark Theme */
  --bg-dark: #0a0a0a;
  --bg-card: #141414;
  --bg-input: #1f1f1f;
  --accent-gold: #c5a059;
  --accent-red: #e63946;
  --text-main: #ffffff;
  --text-muted: #a0a0a0;
  --border: #2a2a2a;
  --shadow: 0 8px 32px rgba(0, 0, 0, 0.5);
  
  /* Spacing */
  --space-xs: 4px;
  --space-sm: 8px;
  --space-md: 16px;
  --space-lg: 24px;
  --space-xl: 48px;
  --space-2xl: 64px;
  
  /* Radius */
  --radius-sm: 4px;
  --radius-md: 12px;
  --radius-lg: 20px;
  --radius-full: 999px;
}

* {
  box-sizing: border-box;
  -webkit-tap-highlight-color: transparent;
}

body {
  margin: 0;
  padding: 0;
  font-family: 'Outfit', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  background-color: var(--bg-dark);
  color: var(--text-main);
  line-height: 1.5;
  overflow-x: hidden;
}

h1, h2, h3, h4 {
  font-family: 'Playfair Display', serif;
  margin: 0;
  font-weight: 700;
  letter-spacing: 0.02em;
}

a {
  text-decoration: none;
  color: inherit;
}

.container {
  width: 100%;
  max-width: 600px; /* Mobile first, centered on desktop */
  margin: 0 auto;
  padding: 0 var(--space-md);
}

/* Typography Helpers */
.text-gold { color: var(--accent-gold); }
.text-red { color: var(--accent-red); }
.text-sm { font-size: 0.875rem; }
.text-center { text-align: center; }

/* Components */

/* Navbar */
.nav-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(10, 10, 10, 0.8);
  backdrop-filter: blur(12px);
  padding: var(--space-md) 0;
  border-bottom: 1px solid var(--border);
}

.nav-content {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.logo {
  font-size: 1.5rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 2px;
}

.logo span {
  color: var(--accent-gold);
}

/* Hero Section */
.hero {
  padding: var(--space-xl) 0;
  text-align: center;
}

.hero h1 {
  font-size: 2.5rem;
  margin-bottom: var(--space-xs);
}

.hero p {
  color: var(--text-muted);
  font-size: 1.1rem;
}

/* Mode Toggle (Dine-in / Takeaway) */
.toggle-container {
  display: flex;
  background: var(--bg-card);
  padding: 4px;
  border-radius: var(--radius-full);
  margin: var(--space-lg) auto;
  width: fit-content;
  border: 1px solid var(--border);
}

.toggle-btn {
  padding: 8px 24px;
  border-radius: var(--radius-full);
  border: none;
  background: transparent;
  color: var(--text-muted);
  cursor: pointer;
  font-weight: 600;
  transition: all 0.3s ease;
}

.toggle-btn.active {
  background: var(--accent-gold);
  color: black;
}

/* Category Slider */
.categories-nav {
  display: flex;
  overflow-x: auto;
  gap: var(--space-md);
  padding: var(--space-md) 0;
  scrollbar-width: none;
}

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

.cat-chip {
  white-space: nowrap;
  padding: 8px 20px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-full);
  font-size: 0.9rem;
  font-weight: 500;
  transition: all 0.2s;
}

.cat-chip.active {
  background: var(--accent-red);
  border-color: var(--accent-red);
  color: white;
}

/* Menu Grid */
.menu-section {
  margin-top: var(--space-lg);
}

.section-title {
  margin-bottom: var(--space-md);
  padding-bottom: var(--space-xs);
  border-bottom: 2px solid var(--accent-gold);
  display: inline-block;
}

.dish-card {
  background: var(--bg-card);
  border-radius: var(--radius-lg);
  overflow: hidden;
  margin-bottom: var(--space-lg);
  border: 1px solid var(--border);
  display: flex;
  transition: transform 0.2s;
}

.dish-card:active {
  transform: scale(0.98);
}

.dish-card.admin-item {
  background: #111;
  padding: var(--space-md);
  align-items: center;
}

.dish-card.order-card {
  background: #111;
  flex-direction: column;
  padding: var(--space-md);
}

.order-items-box {
  padding: var(--space-md);
  background: #1a1a1a;
  border-radius: var(--radius-md);
  margin-bottom: var(--space-md);
}

.dish-img {
  width: 120px;
  min-width: 120px;
  height: 120px;
  background: #222;
  position: relative;
}

.dish-info {
  padding: var(--space-md);
  flex-grow: 1;
  display: flex;
  flex-direction: column;
}

.dish-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
}

.dish-name {
  font-size: 1.1rem;
  font-weight: 600;
  margin-bottom: 4px;
}

.dish-desc {
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-bottom: var(--space-md);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.dish-footer {
  margin-top: auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.price {
  font-weight: 700;
  font-size: 1.1rem;
  color: var(--accent-gold);
}

.btn-add {
  background: var(--accent-red);
  color: white;
  border: none;
  padding: 6px 16px;
  border-radius: var(--radius-sm);
  font-weight: 600;
  cursor: pointer;
}

.veg-tag {
  width: 12px;
  height: 12px;
  border: 1px solid #4caf50;
  padding: 2px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-right: 8px;
}

.veg-tag::after {
  content: '';
  width: 6px;
  height: 6px;
  background: #4caf50;
  border-radius: 50%;
}

.non-veg-tag {
  width: 12px;
  height: 12px;
  border: 1px solid #e63946;
  padding: 2px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-right: 8px;
}

.non-veg-tag::after {
  content: '';
  width: 0;
  height: 0;
  border-left: 4px solid transparent;
  border-right: 4px solid transparent;
  border-bottom: 6px solid #e63946;
}

/* Sticky Cart */
.cart-sticky {
  position: fixed;
  bottom: var(--space-lg);
  left: 50%;
  transform: translateX(-50%);
  width: calc(100% - 32px);
  max-width: 568px;
  background: var(--accent-red);
  color: white;
  padding: var(--space-md);
  border-radius: var(--radius-md);
  display: flex;
  justify-content: space-between;
  align-items: center;
  box-shadow: 0 10px 40px rgba(230, 57, 70, 0.4);
  z-index: 200;
  animation: slideUp 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

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

.cart-info {
  display: flex;
  gap: var(--space-md);
  align-items: center;
}

/* Modals / Panels */
.overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.8);
  backdrop-filter: blur(4px);
  z-index: 1000;
  display: none; /* Controlled by state */
}

.modal {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: var(--bg-card);
  border-top-left-radius: var(--radius-lg);
  border-top-right-radius: var(--radius-lg);
  padding: var(--space-lg);
  z-index: 1001;
  max-height: 90vh;
  overflow-y: auto;
  border-top: 2px solid var(--accent-gold);
}

.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: var(--space-lg);
}

/* Customization Options */
.option-group {
  margin-bottom: var(--space-lg);
}

.option-label {
  display: block;
  font-weight: 600;
  margin-bottom: var(--space-md);
  font-size: 1rem;
}

.choice-list {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-sm);
}

.choice-item {
  background: var(--bg-input);
  border: 1px solid var(--border);
  padding: 10px;
  text-align: center;
  border-radius: var(--radius-md);
  font-size: 0.85rem;
  cursor: pointer;
}

.choice-item.selected {
  border-color: var(--accent-gold);
  background: rgba(197, 160, 89, 0.1);
  color: var(--accent-gold);
}

.addon-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 0;
  border-bottom: 1px solid var(--border);
}

.quantity-control {
  display: flex;
  align-items: center;
  gap: 16px;
  background: var(--bg-input);
  padding: 8px 16px;
  border-radius: var(--radius-full);
  width: fit-content;
}

.form-group {
  margin-bottom: var(--space-md);
}

.text-underline {
  text-decoration: underline;
}

.flex-column {
  display: flex;
  flex-direction: column;
}

.flex-row {
  display: flex;
}

.gap-md {
  gap: var(--space-md);
}

.justify-between {
  justify-content: space-between;
}

.align-center {
  align-items: center;
}

.align-end {
  align-items: flex-end;
}

.w-full {
  width: 100%;
}

.m-0-auto {
  margin: 0 auto;
}

.p-0 {
  padding: 0;
}

.qty-btn {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  border: none;
  background: var(--accent-gold);
  color: black;
  font-weight: bold;
  cursor: pointer;
}

/* Table Number Input */
.table-input-group {
  margin-top: var(--space-md);
}

.form-input {
  width: 100%;
  background: var(--bg-input);
  border: 1px solid var(--border);
  padding: 12px var(--space-md);
  border-radius: var(--radius-md);
  color: white;
  margin-top: 8px;
}

.form-input:focus {
  outline: none;
  border-color: var(--accent-gold);
}

/* Placeholder for Images */
.placeholder-image {
  width: 100%;
  height: 100%;
  background: linear-gradient(45deg, #1a1a1a, #2a2a2a);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--border);
}

.qr-section {
  background: white;
  padding: var(--space-lg);
  border-radius: var(--radius-lg);
  margin: var(--space-xl) 0;
  color: black;
}

.qr-box {
  width: 180px;
  height: 180px;
  margin: 0 auto var(--space-md);
  background: #eee;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 8px solid white;
  box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

/* Badge */
.badge {
  padding: 2px 8px;
  border-radius: 4px;
  font-size: 0.7rem;
  text-transform: uppercase;
  font-weight: 700;
}

.badge-new { background: var(--accent-red); color: white; }
.badge-popular { background: var(--accent-gold); color: black; }

/* Checkout Table */
.summary-table {
  width: 100%;
  margin: var(--space-md) 0;
}

.summary-row {
  display: flex;
  justify-content: space-between;
  padding: 8px 0;
  color: var(--text-muted);
}

.summary-row.total {
  border-top: 1px solid var(--border);
  padding-top: var(--space-md);
  margin-top: var(--space-md);
  color: white;
  font-weight: 700;
  font-size: 1.2rem;
}
