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

:root {
  /* Sophisticated Mature Color Palette - Deep Terracotta, Forest Green, Warm Neutrals */
  --primary: #8B4513;          /* Rich Saddle Brown */
  --primary-dark: #5D2E0F;     /* Deep Chocolate */
  --primary-light: #B8733D;    /* Warm Terracotta */
  --secondary: #2D5016;        /* Deep Forest Green */
  --secondary-light: #5A7C3E;  /* Sage Green */
  --accent: #C17B3A;           /* Burnt Orange */
  --accent-light: #E8A75C;     /* Golden Amber */
  --dark: #2C2416;             /* Rich Espresso */
  --text: #3A3128;             /* Deep Walnut */
  --text-light: #6B5D52;       /* Warm Gray */
  --bg: #FDFBF7;               /* Warm White */
  --bg-light: #F5F1E8;         /* Soft Cream */
  --bg-accent: #FFF5E6;        /* Warm Beige */
  --border: #D4C4B0;           /* Soft Taupe */
  --border-light: #E8DFD0;     /* Light Sand */
  --success: #5A7C3E;          /* Natural Green */
  --warning: #C17B3A;          /* Warm Orange */
  --error: #A0503D;            /* Earthy Red */
  --shadow-sm: 0 1px 3px 0 rgba(44, 36, 22, 0.08);
  --shadow: 0 4px 12px -2px rgba(44, 36, 22, 0.12), 0 2px 6px -1px rgba(44, 36, 22, 0.08);
  --shadow-lg: 0 20px 30px -8px rgba(44, 36, 22, 0.15), 0 10px 15px -5px rgba(44, 36, 22, 0.10);
  --shadow-xl: 0 25px 50px -12px rgba(44, 36, 22, 0.25);
  --radius: 12px;
  --radius-lg: 20px;
  --radius-xl: 24px;
  --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  --transition-slow: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
  
  /* Gradient backgrounds */
  --gradient-primary: linear-gradient(135deg, #8B4513 0%, #B8733D 100%);
  --gradient-secondary: linear-gradient(135deg, #2D5016 0%, #5A7C3E 100%);
  --gradient-warm: linear-gradient(135deg, #FFF5E6 0%, #F5F1E8 100%);
  --gradient-accent: linear-gradient(135deg, #C17B3A 0%, #E8A75C 100%);
}

html {
  overflow-y: scroll;
  width: 100vw;
  overflow-x: hidden;
}

body {
  font-family: 'Poppins', -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Helvetica', 'Arial', sans-serif;
  background: var(--bg-light);
  min-height: 100vh;
  color: var(--text);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-y: scroll;
  width: 100%;
  margin: 0;
  padding: 0;
}

.app {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  width: 100%;
  padding-top: 80px; /* Account for fixed navigation */
}

#root {
  min-height: 100vh;
  width: 100%;
}

/* ===================== NAVBAR ===================== */
.navbar {
  background: var(--bg);
  color: var(--text);
  padding: 1.25rem 2rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: var(--shadow);
  border-bottom: 1px solid var(--border);
  backdrop-filter: blur(10px);
  background: rgba(255, 255, 255, 0.95);
  min-height: 80px;
}

.navbar h1 {
  font-size: 1.75rem;
  font-weight: 800;
  letter-spacing: -0.5px;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.navbar-buttons {
  display: flex;
  gap: 0.75rem;
  align-items: center;
}

/* ===================== BUTTONS ===================== */
.btn {
  padding: 0.75rem 1.5rem;
  border: none;
  border-radius: var(--radius);
  cursor: pointer;
  font-size: 1rem;
  font-weight: 600;
  transition: var(--transition);
  letter-spacing: 0.3px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  font-family: inherit;
}

.btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.btn-primary {
  background: var(--gradient-primary);
  color: white;
  box-shadow: var(--shadow);
}

.btn-primary:hover:not(:disabled) {
  transform: translateY(-2px);
  box-shadow: var(--shadow-lg);
  filter: brightness(1.1);
}

.btn-primary:active {
  transform: translateY(0);
}

.btn-secondary {
  background: white;
  color: var(--primary);
  border: 2px solid var(--primary);
}

.btn-secondary:hover:not(:disabled) {
  background: var(--bg-accent);
  transform: translateY(-2px);
  border-color: var(--primary-dark);
}

/* ===================== CONTAINER ===================== */
.container {
  max-width: 1280px;
  margin: 0 auto;
  padding: 2rem 1.5rem;
  padding-top: 2rem; /* Additional top padding for content spacing */
  flex: 1;
  width: 100%;
  box-sizing: border-box;
}

/* ===================== HERO SECTION ===================== */
.hero {
  text-align: center;
  margin-bottom: 3rem;
  background: var(--gradient-primary);
  padding: 4rem 2rem;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  position: relative;
  overflow: hidden;
  min-height: 300px;
  border: 2px solid var(--primary-light);
}

.hero::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: url('data:image/svg+xml,<svg width="20" height="20" xmlns="http://www.w3.org/2000/svg"><circle cx="2" cy="2" r="1" fill="rgba(255,255,255,0.1)"/></svg>');
  opacity: 0.5;
}

.hero h2 {
  font-size: 3rem;
  margin-bottom: 1rem;
  font-weight: 800;
  letter-spacing: -1px;
  color: white;
  position: relative;
  z-index: 1;
}

.hero p {
  font-size: 1.25rem;
  color: rgba(255, 255, 255, 0.95);
  font-weight: 500;
  position: relative;
  z-index: 1;
  max-width: 600px;
  margin: 0 auto;
}

/* ===================== MENU GRID ===================== */
.menu-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 2rem;
  margin-bottom: 3rem;
}

/* ===================== MENU CARD ===================== */
.menu-card {
  background: var(--bg);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  transition: var(--transition);
  cursor: pointer;
  border: 1px solid var(--border);
  display: flex;
  flex-direction: column;
}

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

.menu-card-image {
  width: 100%;
  height: 200px;
  min-height: 200px;
  object-fit: cover;
  background: linear-gradient(135deg, var(--bg-light) 0%, #E5E7EB 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 4rem;
}

.menu-card-content {
  padding: 1.5rem;
  flex: 1;
  display: flex;
  flex-direction: column;
}

.menu-card-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 0.75rem;
}

.menu-card-name {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--dark);
  line-height: 1.3;
}

.menu-card-price {
  font-size: 1.5rem;
  font-weight: 800;
  color: var(--text);
  white-space: nowrap;
}

.menu-card-description {
  font-size: 0.9rem;
  color: var(--text-light);
  margin-bottom: 1rem;
  flex: 1;
  line-height: 1.5;
}

.menu-card-button {
  width: 100%;
  padding: 0.875rem;
  border-radius: var(--radius);
  margin-top: auto;
}

/* ===================== CART SIDEBAR ===================== */
.cart-sidebar {
  position: fixed;
  right: -400px;
  top: 0;
  bottom: 0;
  width: 400px;
  max-width: 100vw;
  background: var(--bg);
  box-shadow: var(--shadow-lg);
  transition: var(--transition);
  z-index: 200;
  display: flex;
  flex-direction: column;
  padding-bottom: 0;
}

.cart-sidebar.open {
  right: 0;
}

.cart-header {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--dark);
}

.cart-items {
  flex: 1;
  overflow-y: auto;
  padding: 1.5rem;
}

.cart-items > div {
  margin-bottom: 1.5rem;
  padding-bottom: 1.5rem;
}

.cart-total {
  padding: 1.5rem;
  font-size: 1.5rem;
  font-weight: 800;
  color: var(--text);
  border-top: 2px solid var(--border);
  background: var(--bg-accent);
}

/* ===================== MODAL ===================== */
.modal {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(4px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 300;
  padding: 1rem;
  animation: fadeIn 0.2s ease-out;
}

@keyframes fadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

.modal-content {
  background: var(--bg);
  border-radius: var(--radius-lg);
  max-width: 500px;
  width: 100%;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: var(--shadow-lg);
  animation: slideUp 0.3s ease-out;
}

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

.modal-header {
  padding: 1.5rem;
  border-bottom: 1px solid var(--border);
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--dark);
}

/* ===================== FORMS ===================== */
.form-group {
  margin-bottom: 1.5rem;
}

.form-group label {
  display: block;
  margin-bottom: 0.5rem;
  font-weight: 600;
  color: var(--dark);
  font-size: 0.9rem;
}

.form-group input,
.form-group textarea,
.form-group select {
  width: 100%;
  padding: 0.875rem;
  border: 2px solid var(--border);
  border-radius: var(--radius);
  font-size: 1rem;
  font-family: inherit;
  transition: var(--transition);
  background: var(--bg);
  color: var(--text);
}

.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(255, 107, 53, 0.1);
}

.form-group textarea {
  resize: vertical;
  min-height: 100px;
}

/* ===================== LOADER ===================== */
.loader {
  width: 48px;
  height: 48px;
  border: 4px solid var(--border);
  border-radius: 50%;
  border-top-color: var(--primary);
  animation: spin 1s linear infinite;
  margin: 2rem auto;
}

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

/* ===================== ORDER STATUS ===================== */
.order-status {
  background: var(--bg);
  border-radius: var(--radius-lg);
  padding: 2rem;
  box-shadow: var(--shadow);
  max-width: 600px;
  margin: 2rem auto;
}

.order-status h2 {
  font-size: 2rem;
  font-weight: 800;
  color: var(--text);
  margin-bottom: 1rem;
}

.order-status .status-badge {
  display: inline-block;
  padding: 0.5rem 1rem;
  border-radius: 999px;
  font-weight: 600;
  font-size: 0.9rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.order-status .status-badge.pending {
  background: #FEF3C7;
  color: #92400E;
}

.order-status .status-badge.confirmed {
  background: #DBEAFE;
  color: #1E40AF;
}

.order-status .status-badge.ready {
  background: #D1FAE5;
  color: #065F46;
}

/* ===================== RESPONSIVE ===================== */
@media (max-width: 768px) {
  .navbar {
    padding: 1rem 1.5rem;
  }

  .navbar h1 {
    font-size: 1.5rem;
  }

  .hero {
    padding: 3rem 1.5rem;
  }

  .hero h2 {
    font-size: 2rem;
  }

  .hero p {
    font-size: 1rem;
  }

  .menu-grid {
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 1.5rem;
  }

  .cart-sidebar {
    width: 100vw;
    right: -100vw;
  }

  .btn {
    padding: 0.625rem 1.25rem;
    font-size: 0.9rem;
  }
}

@media (max-width: 480px) {
  .container {
    padding: 1rem;
  }

  .menu-grid {
    grid-template-columns: 1fr;
  }

  .navbar-buttons {
    gap: 0.5rem;
  }

  .btn {
    padding: 0.5rem 1rem;
    font-size: 0.85rem;
  }
}

/* ===================== UTILITIES ===================== */
.text-center {
  text-align: center;
}

.mt-1 { margin-top: 0.5rem; }
.mt-2 { margin-top: 1rem; }
.mt-3 { margin-top: 1.5rem; }
.mt-4 { margin-top: 2rem; }

.mb-1 { margin-bottom: 0.5rem; }
.mb-2 { margin-bottom: 1rem; }
.mb-3 { margin-bottom: 1.5rem; }
.mb-4 { margin-bottom: 2rem; }

.p-1 { padding: 0.5rem; }
.p-2 { padding: 1rem; }
.p-3 { padding: 1.5rem; }
.p-4 { padding: 2rem; }
