/* ============================================
   AFGHAN EATS - Complete Website Styles
   ============================================ */

:root {
  --primary: #FF6B35;
  --primary-dark: #e55a2b;
  --secondary: #004E89;
  --success: #22C55E;
  --warning: #F59E0B;
  --danger: #EF4444;
  --background: #ffffff;
  --surface: #f5f5f5;
  --text-primary: #1f2937;
  --text-secondary: #6b7280;
  --border: #e5e7eb;
  --shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
  --shadow-lg: 0 10px 25px rgba(0, 0, 0, 0.15);
}

body.dark-mode {
  --background: #1a1a1a;
  --surface: #2d2d2d;
  --text-primary: #f5f5f5;
  --text-secondary: #b0b0b0;
  --border: #404040;
}

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

html {
  scroll-behavior: smooth;
}

body {
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  background-color: var(--background);
  color: var(--text-primary);
  transition: background-color 0.3s, color 0.3s;
  line-height: 1.6;
}

/* ============================================
   NAVIGATION BAR
   ============================================ */

.navbar {
  background-color: var(--background);
  box-shadow: var(--shadow);
  position: sticky;
  top: 0;
  z-index: 1000;
  border-bottom: 1px solid var(--border);
}

.navbar-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 1rem 2rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.navbar-logo {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 1.5rem;
  font-weight: bold;
  color: var(--primary);
  text-decoration: none;
  cursor: pointer;
}

.logo-img {
  height: 40px;
  width: 40px;
  object-fit: contain;
}

.nav-menu {
  display: flex;
  list-style: none;
  gap: 2rem;
  align-items: center;
}

.nav-link {
  color: var(--text-primary);
  text-decoration: none;
  font-weight: 500;
  transition: color 0.3s;
  cursor: pointer;
}

.nav-link:hover {
  color: var(--primary);
}

.nav-signin {
  background-color: var(--primary);
  color: white !important;
  padding: 0.5rem 1.5rem;
  border-radius: 6px;
  transition: background-color 0.3s;
}

.nav-signin:hover {
  background-color: var(--primary-dark);
  color: white !important;
}

.hamburger {
  display: none;
  flex-direction: column;
  cursor: pointer;
}

.hamburger span {
  width: 25px;
  height: 3px;
  background-color: var(--text-primary);
  margin: 5px 0;
  transition: 0.3s;
}

.language-switcher {
  display: flex;
  gap: 0.5rem;
  align-items: center;
}

.lang-btn {
  padding: 0.5rem 1rem;
  border: 1px solid var(--border);
  background-color: var(--surface);
  color: var(--text-primary);
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.3s;
  font-weight: 500;
}

.lang-btn.active {
  background-color: var(--primary);
  color: white;
  border-color: var(--primary);
}

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

/* ============================================
   BUTTONS & FORMS
   ============================================ */

.btn {
  padding: 0.75rem 1.5rem;
  border: none;
  border-radius: 6px;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s;
  text-decoration: none;
  display: inline-block;
  text-align: center;
}

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

.btn-primary:hover {
  background-color: var(--primary-dark);
  transform: translateY(-2px);
  box-shadow: var(--shadow-lg);
}

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

.btn-secondary:hover {
  background-color: var(--primary);
  color: white;
}

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

.btn-success {
  background-color: var(--success);
  color: white;
}

.btn-success:hover {
  background-color: #16a34a;
}

.btn-danger {
  background-color: var(--danger);
  color: white;
}

.btn-danger:hover {
  background-color: #dc2626;
}

.btn-warning {
  background-color: var(--warning);
  color: white;
}

.btn-warning:hover {
  background-color: #d97706;
}

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

.form-group {
  margin-bottom: 1.5rem;
}

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

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

.form-group input:focus,
.form-group select:focus,
.form-group textarea: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;
}

/* ============================================
   CONTAINERS & SECTIONS
   ============================================ */

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 2rem;
}

.section {
  padding: 4rem 2rem;
}

.section-title {
  font-size: 2.5rem;
  font-weight: bold;
  margin-bottom: 2rem;
  text-align: center;
  color: var(--text-primary);
}

.section-subtitle {
  font-size: 1.1rem;
  color: var(--text-secondary);
  text-align: center;
  margin-bottom: 3rem;
}

/* ============================================
   CARDS & GRIDS
   ============================================ */

.card {
  background-color: var(--surface);
  border-radius: 12px;
  padding: 1.5rem;
  box-shadow: var(--shadow);
  transition: all 0.3s;
  border: 1px solid var(--border);
}

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

.card-header {
  font-size: 1.25rem;
  font-weight: bold;
  margin-bottom: 1rem;
  color: var(--text-primary);
}

.card-body {
  color: var(--text-secondary);
  margin-bottom: 1rem;
}

.card-footer {
  display: flex;
  gap: 0.5rem;
  margin-top: 1rem;
}

.grid {
  display: grid;
  gap: 2rem;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
}

.grid-2 {
  grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
}

/* ============================================
   RESTAURANT CARD
   ============================================ */

.restaurant-card {
  background-color: var(--surface);
  border-radius: 12px;
  overflow: hidden;
  box-shadow: var(--shadow);
  transition: all 0.3s;
  cursor: pointer;
  border: 1px solid var(--border);
}

.restaurant-card:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-lg);
}

.restaurant-image {
  width: 100%;
  height: 200px;
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 3rem;
}

.restaurant-info {
  padding: 1.5rem;
}

.restaurant-name {
  font-size: 1.25rem;
  font-weight: bold;
  margin-bottom: 0.5rem;
  color: var(--text-primary);
}

.restaurant-cuisine {
  color: var(--text-secondary);
  font-size: 0.9rem;
  margin-bottom: 0.5rem;
}

.restaurant-rating {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 0.5rem;
}

.stars {
  color: var(--warning);
}

.restaurant-meta {
  display: flex;
  justify-content: space-between;
  font-size: 0.9rem;
  color: var(--text-secondary);
  margin-top: 1rem;
  padding-top: 1rem;
  border-top: 1px solid var(--border);
}

/* ============================================
   MENU ITEM CARD
   ============================================ */

.menu-item {
  background-color: var(--surface);
  border-radius: 8px;
  padding: 1rem;
  border: 1px solid var(--border);
  transition: all 0.3s;
}

.menu-item:hover {
  box-shadow: var(--shadow);
}

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

.menu-item-name {
  font-weight: bold;
  color: var(--text-primary);
}

.menu-item-price {
  color: var(--primary);
  font-weight: bold;
  font-size: 1.1rem;
}

.menu-item-description {
  font-size: 0.9rem;
  color: var(--text-secondary);
  margin-bottom: 0.5rem;
}

.menu-item-tags {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
  margin-bottom: 0.5rem;
}

.tag {
  display: inline-block;
  background-color: var(--primary);
  color: white;
  padding: 0.25rem 0.75rem;
  border-radius: 20px;
  font-size: 0.75rem;
  font-weight: 600;
}

.tag-vegetarian {
  background-color: var(--success);
}

.tag-vegan {
  background-color: #8b5cf6;
}

.tag-spicy {
  background-color: var(--danger);
}

.menu-item-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 1rem;
}

.quantity-selector {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 0.25rem;
}

.quantity-btn {
  width: 30px;
  height: 30px;
  border: none;
  background-color: transparent;
  cursor: pointer;
  font-weight: bold;
  color: var(--primary);
  transition: all 0.3s;
}

.quantity-btn:hover {
  background-color: var(--surface);
}

.quantity-input {
  width: 40px;
  text-align: center;
  border: none;
  background-color: transparent;
  color: var(--text-primary);
  font-weight: bold;
}

/* ============================================
   ORDER CARD
   ============================================ */

.order-card {
  background-color: var(--surface);
  border-radius: 8px;
  padding: 1.5rem;
  border-left: 4px solid var(--primary);
  margin-bottom: 1rem;
}

.order-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1rem;
}

.order-id {
  font-weight: bold;
  color: var(--text-primary);
}

.order-status {
  padding: 0.25rem 0.75rem;
  border-radius: 20px;
  font-size: 0.85rem;
  font-weight: 600;
  color: white;
}

.status-pending {
  background-color: var(--warning);
}

.status-confirmed {
  background-color: var(--secondary);
}

.status-preparing {
  background-color: #3b82f6;
}

.status-ready {
  background-color: #06b6d4;
}

.status-on-way {
  background-color: #8b5cf6;
}

.status-delivered {
  background-color: var(--success);
}

.status-cancelled {
  background-color: var(--danger);
}

.order-details {
  color: var(--text-secondary);
  font-size: 0.9rem;
  margin-bottom: 1rem;
}

.order-items {
  background-color: var(--background);
  padding: 1rem;
  border-radius: 6px;
  margin-bottom: 1rem;
}

.order-item {
  display: flex;
  justify-content: space-between;
  padding: 0.5rem 0;
  border-bottom: 1px solid var(--border);
}

.order-item:last-child {
  border-bottom: none;
}

.order-item-name {
  color: var(--text-primary);
}

.order-item-price {
  color: var(--primary);
  font-weight: bold;
}

.order-total {
  display: flex;
  justify-content: space-between;
  font-weight: bold;
  font-size: 1.1rem;
  color: var(--text-primary);
  padding-top: 1rem;
  border-top: 2px solid var(--border);
}

.order-actions {
  display: flex;
  gap: 0.5rem;
  margin-top: 1rem;
}

/* ============================================
   MODAL & DIALOG
   ============================================ */

.modal {
  display: none;
  position: fixed;
  z-index: 2000;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.5);
  animation: fadeIn 0.3s;
}

.modal.active {
  display: flex;
  align-items: center;
  justify-content: center;
}

.modal-content {
  background-color: var(--background);
  padding: 2rem;
  border-radius: 12px;
  max-width: 500px;
  width: 90%;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: var(--shadow-lg);
  animation: slideUp 0.3s;
}

.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1.5rem;
  border-bottom: 1px solid var(--border);
  padding-bottom: 1rem;
}

.modal-title {
  font-size: 1.5rem;
  font-weight: bold;
  color: var(--text-primary);
}

.modal-close {
  background: none;
  border: none;
  font-size: 1.5rem;
  cursor: pointer;
  color: var(--text-secondary);
  transition: color 0.3s;
}

.modal-close:hover {
  color: var(--text-primary);
}

.modal-body {
  margin-bottom: 1.5rem;
}

.modal-footer {
  display: flex;
  gap: 1rem;
  justify-content: flex-end;
}

/* ============================================
   ALERTS & MESSAGES
   ============================================ */

.alert {
  padding: 1rem;
  border-radius: 6px;
  margin-bottom: 1rem;
  border-left: 4px solid;
}

.alert-success {
  background-color: #dcfce7;
  color: #166534;
  border-color: var(--success);
}

.alert-error {
  background-color: #fee2e2;
  color: #991b1b;
  border-color: var(--danger);
}

.alert-warning {
  background-color: #fef3c7;
  color: #92400e;
  border-color: var(--warning);
}

.alert-info {
  background-color: #dbeafe;
  color: #1e40af;
  border-color: var(--secondary);
}

/* ============================================
   LOADING & STATES
   ============================================ */

.loading {
  display: inline-block;
  width: 20px;
  height: 20px;
  border: 3px solid var(--border);
  border-radius: 50%;
  border-top-color: var(--primary);
  animation: spin 1s linear infinite;
}

.empty-state {
  text-align: center;
  padding: 3rem 1rem;
  color: var(--text-secondary);
}

.empty-state-icon {
  font-size: 3rem;
  margin-bottom: 1rem;
}

.empty-state-title {
  font-size: 1.25rem;
  font-weight: bold;
  margin-bottom: 0.5rem;
  color: var(--text-primary);
}

/* ============================================
   ANIMATIONS
   ============================================ */

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

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

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

/* ============================================
   RESPONSIVE DESIGN
   ============================================ */

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

  .nav-menu {
    display: none;
    position: absolute;
    top: 60px;
    left: 0;
    right: 0;
    flex-direction: column;
    background-color: var(--background);
    padding: 1rem;
    gap: 1rem;
    box-shadow: var(--shadow);
  }

  .nav-menu.active {
    display: flex;
  }

  .hamburger {
    display: flex;
  }

  .section {
    padding: 2rem 1rem;
  }

  .section-title {
    font-size: 1.75rem;
  }

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

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

  .modal-content {
    width: 95%;
    padding: 1.5rem;
  }

  .container {
    padding: 1rem;
  }
}

@media (max-width: 480px) {
  .navbar-logo {
    font-size: 1.25rem;
  }

  .section-title {
    font-size: 1.5rem;
  }

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

  .modal-content {
    width: 100%;
    max-height: 100vh;
    border-radius: 0;
  }

  .order-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.5rem;
  }
}

/* ============================================
   UTILITY CLASSES
   ============================================ */

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

.text-right {
  text-align: right;
}

.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;
}

.flex {
  display: flex;
}

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

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

.gap-1 {
  gap: 0.5rem;
}

.gap-2 {
  gap: 1rem;
}

.gap-3 {
  gap: 1.5rem;
}

.hidden {
  display: none;
}

.visible {
  display: block;
}

.opacity-50 {
  opacity: 0.5;
}

.opacity-75 {
  opacity: 0.75;
}

.rounded {
  border-radius: 6px;
}

.rounded-lg {
  border-radius: 12px;
}

.rounded-full {
  border-radius: 9999px;
}

.shadow {
  box-shadow: var(--shadow);
}

.shadow-lg {
  box-shadow: var(--shadow-lg);
}

.border {
  border: 1px solid var(--border);
}

.border-top {
  border-top: 1px solid var(--border);
}

.border-bottom {
  border-bottom: 1px solid var(--border);
}

.w-full {
  width: 100%;
}

.h-full {
  height: 100%;
}

.max-w-md {
  max-width: 28rem;
}

.max-w-lg {
  max-width: 32rem;
}

.max-w-xl {
  max-width: 36rem;
}
