:root {
  --primary-color: #6366F1;
  --primary-dark: #4F46E5;
  --text-color: #1F2937;
  --bg-color: #F8FAFC;
  --card-bg: rgba(255, 255, 255, 0.95);
  --header-bg: #6366F1;
  --header-text: #FFFFFF;
  --shadow-color: rgba(99, 102, 241, 0.15);
  --border-color: rgba(99, 102, 241, 0.1);
  --card-shadow: 0 8px 30px rgba(99, 102, 241, 0.08);
  --font-primary: 'Vazirmatn', 'Inter', sans-serif;
  --font-secondary: 'Inter', 'Vazirmatn', sans-serif;
  --admin-color: #8B5CF6;
  --success-color: #10B981;
  --error-color: #EF4444;
  --accent-color: #06B6D4;
  --warning-color: #F59E0B;
}

.dark-mode {
  --primary-color: #818CF8;
  --primary-dark: #6366F1;
  --text-color: #F3F4F6;
  --bg-color: #111827;
  --card-bg: #1F2937;
  --header-bg: #1F2937;
  --header-text: #818CF8;
  --shadow-color: rgba(129, 140, 248, 0.2);
  --border-color: #374151;
  --card-shadow: 0 8px 30px rgba(129, 140, 248, 0.15);
  --admin-color: #A78BFA;
  --success-color: #34D399;
  --error-color: #F87171;
  --accent-color: #22D3EE;
  --warning-color: #FBBF24;
}

* {
  font-family: var(--font-primary);
  box-sizing: border-box;
}

body {
  margin: 0;
  background-color: var(--bg-color);
  color: var(--text-color);
  direction: rtl;
  transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
  font-weight: 400;
  line-height: 1.6;
  overflow-x: hidden;
}

/* هدر با افکت شیشه‌ای مدرن */
header {
  background: linear-gradient(135deg, var(--header-bg) 0%, rgba(99, 102, 241, 0.95) 100%);
  color: var(--header-text);
  padding: 5px 16px;
  transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
  position: fixed;
  top: 0;
  right: 0;
  left: 0;
  z-index: 1000;
  box-shadow: 0 4px 20px rgba(99, 102, 241, 0.15);
  backdrop-filter: blur(20px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.dark-mode header {
  background: linear-gradient(135deg, var(--header-bg) 0%, rgba(31, 41, 55, 0.95) 100%);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.top-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 15px;
}

.header-right {
  display: flex;
  align-items: center;
  gap: 12px;
}

.logo {
  width: 52px;
  height: 52px;
  border-radius: 12px;
  object-fit: cover;
  border: 2px solid rgba(255, 255, 255, 0.2);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.logo:hover {
  transform: scale(1.05);
  border-color: rgba(255, 255, 255, 0.4);
}

.logo-preview {
  width: 80px;
  height: 80px;
  border-radius: 16px;
  object-fit: cover;
  border: 2px solid var(--border-color);
  display: block;
  margin: 10px auto;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

header h1 {
  font-size: 24px;
  margin: 0;
  font-weight: 700;
  letter-spacing: -0.5px;
  transition: all 0.3s ease;
  background: linear-gradient(135deg, #fff, #e0e7ff);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.dark-mode header h1 {
  background: linear-gradient(135deg, #818CF8, #c7d2fe);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 18px;
}

/* سوییچ تم مدرن */
.theme-toggle {
  position: relative;
  width: 60px;
  height: 30px;
  background: linear-gradient(90deg, #6366F1, #8B5CF6);
  border-radius: 25px;
  cursor: pointer;
  transition: all 0.6s cubic-bezier(0.4, 0, 0.2, 1);
  display: flex;
  align-items: center;
  padding: 0 4px;
  box-shadow: 0 4px 15px rgba(99, 102, 241, 0.3);
  overflow: hidden;
  border: 2px solid rgba(255, 255, 255, 0.1);
}

.theme-toggle::before {
  content: '☀️';
  position: absolute;
  left: 6px;
  font-size: 14px;
  transition: all 0.5s cubic-bezier(0.68, -0.55, 0.265, 1.55);
  z-index: 2;
  filter: drop-shadow(0 2px 2px rgba(0, 0, 0, 0.2));
}

.theme-toggle::after {
  content: '🌙';
  position: absolute;
  right: 6px;
  font-size: 14px;
  transition: all 0.5s cubic-bezier(0.68, -0.55, 0.265, 1.55);
  z-index: 2;
  filter: drop-shadow(0 2px 2px rgba(0, 0, 0, 0.2));
  opacity: 0.3;
  transform: scale(0.8);
}

.dark-mode .theme-toggle {
  background: var(--primary-dark);
  box-shadow: 0 4px 100px rgba(129, 140, 248, 0.4);
}

.dark-mode .theme-toggle::before {
  opacity: 0.3;
  transform: scale(0.8);
}

.dark-mode .theme-toggle::after {
  opacity: 1;
  transform: scale(1);
}

.theme-toggle-handle {
  width: 22px;
  height: 22px;
  background: linear-gradient(135deg, #ffffff, #f0f0f0);
  border-radius: 50%;
  transition: all 0.6s cubic-bezier(0.68, -0.55, 0.265, 1.55);
  box-shadow: 
    0 3px 8px rgba(0, 0, 0, 0.2),
    inset 0 -2px 4px rgba(0, 0, 0, 0.1),
    inset 0 2px 4px rgba(255, 255, 255, 0.8);
  position: relative;
  z-index: 3;
  transform: translateX(0);
  margin-right: 2px;
}

.dark-mode .theme-toggle-handle {
  transform: translateX(-25px);
  background: linear-gradient(135deg, #e0e0e0, #c0c0c0);
  box-shadow: 
    0 3px 8px rgba(0, 0, 0, 0.3),
    inset 0 -2px 4px rgba(0, 0, 0, 0.2),
    inset 0 2px 4px rgba(255, 255, 255, 0.3);
}

.cart-toggle, .admin-toggle {
  cursor: pointer;
  font-size: 22px;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  display: flex;
  align-items: center;
  padding: 8px;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.1);
}

.cart-toggle:hover, .admin-toggle:hover {
  transform: scale(1.1);
  background: rgba(255, 255, 255, 0.2);
}

.admin-toggle {
  color: white;
}

.cart-count {
  position: absolute;
  top: -5px;
  left: -5px;
  background: linear-gradient(135deg, var(--primary-color), var(--accent-color));
  color: white;
  border-radius: 50%;
  width: 20px;
  height: 20px;
  font-size: 12px;
  display: flex !important;
  align-items: center;
  justify-content: center;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  font-weight: 700;
  z-index: 10;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

/* جستجوی مدرن */
.search-box {
  display: flex;
  justify-content: center;
  margin-top: 12px;
  position: relative;
  margin-bottom: 5px;
}

.search-box input {
  width: 80%;
  max-width: 450px;
  padding: 10px 10px 10px 20px;
  border: none;
  border-radius: 25px;
  outline: none;
  font-size: 15px;
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  background: rgba(255, 255, 255, 0.9);
  box-shadow: 0 2px 12px rgba(99, 102, 241, 0.1);
  font-family: var(--font-primary);
  border: 1px solid var(--border-color);
  backdrop-filter: blur(10px);
}

.search-box input:focus {
  box-shadow: 0 4px 20px rgba(99, 102, 241, 0.2);
  transform: scale(1.02);
  border-color: var(--primary-color);
  background: rgba(255, 255, 255, 0.95);
}

.dark-mode .search-box input {
  background: rgba(31, 41, 55, 0.9);
  color: var(--text-color);
  border-color: #4B5563;
}

.dark-mode .search-box input:focus {
  box-shadow: 0 4px 20px rgba(129, 140, 248, 0.2);
  background: rgba(31, 41, 55, 0.95);
}

.search-icon {
  position: absolute;
  left: calc(10% + 15px);
  top: 50%;
  transform: translateY(-50%);
  color: #6B7280;
  font-size: 16px;
  z-index: 2;
  display: none;
}

.dark-mode .search-icon {
  color: #9CA3AF;
}

/* دسته‌بندی‌های مدرن */
.categories {
  display: flex;
  gap: 10px;
  overflow-x: auto;
  padding: 10px;
  background: var(--card-bg);
  position: fixed;
  top: 95px;
  right: 0;
  left: 0;
  z-index: 999;
  border-bottom: 1px solid var(--border-color);
  transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
  padding-top: 40px;
  padding-bottom: 8px;
  backdrop-filter: blur(10px);
}

.categories::-webkit-scrollbar {
  height: 4px;
}

.categories::-webkit-scrollbar-track {
  background: var(--bg-color);
  border-radius: 10px;
}

.categories::-webkit-scrollbar-thumb {
  background: var(--primary-color);
  border-radius: 10px;
}

.categories button {
  flex: 0 0 auto;
  background: var(--card-bg);
  border: 1px solid var(--border-color);
  border-radius: 15px;
  padding: 8px 18px;
  cursor: pointer;
  font-size: 14px;
  white-space: nowrap;
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  font-weight: 600;
  color: var(--text-color);
  position: relative;
  overflow: hidden;
}

.categories button::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(99, 102, 241, 0.1), transparent);
  transition: left 0.5s;
}

.categories button:hover::before {
  left: 100%;
}

.categories button:hover, .categories button.active {
  background: linear-gradient(135deg, var(--primary-color), var(--primary-dark));
  color: #fff;
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(99, 102, 241, 0.25);
  border-color: transparent;
}

.dark-mode .categories button:hover, 
.dark-mode .categories button.active {
  box-shadow: 0 6px 20px rgba(129, 140, 248, 0.3);
}

/* منوی اصلی با کارت‌های مدرن */
.menu {
  display: flex;
  flex-direction: column;
  gap: 15px;
  padding: 15px;
  margin-top: 160px;
  max-width: 500px;
  margin-left: auto;
  margin-right: auto;
}

.card {
  background: var(--card-bg);
  border-radius: 16px;
  padding: 18px;
  display: flex;
  gap: 15px;
  box-shadow: var(--card-shadow);
  border: 1px solid var(--border-color);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  cursor: pointer;
  opacity: 0;
  transform: translateY(30px);
  animation: cardSlideIn 0.6s ease forwards;
  backdrop-filter: blur(10px);
  overflow: hidden;
}

.card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: linear-gradient(90deg, var(--primary-color), var(--accent-color));
  transform: scaleX(0);
  transition: transform 0.3s ease;
}

.card:hover::before {
  transform: scaleX(1);
}

.card:hover {
  transform: translateY(-5px);
  box-shadow: 0 12px 40px rgba(99, 102, 241, 0.15);
  border-color: rgba(99, 102, 241, 0.3);
}

.dark-mode .card:hover {
  box-shadow: 0 12px 40px rgba(129, 140, 248, 0.2);
  border-color: rgba(129, 140, 248, 0.4);
}

@keyframes cardSlideIn {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.card:nth-child(1) { animation-delay: 0.1s; }
.card:nth-child(2) { animation-delay: 0.2s; }
.card:nth-child(3) { animation-delay: 0.3s; }
.card:nth-child(4) { animation-delay: 0.4s; }
.card:nth-child(5) { animation-delay: 0.5s; }

.card-image {
  width: 100px;
  height: 100px;
  border-radius: 12px;
  object-fit: cover;
  flex-shrink: 0;
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  opacity: 0;
  animation: imageFadeIn 0.8s ease 0.3s forwards;
  border: 2px solid var(--border-color);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.card:hover .card-image {
  transform: scale(1.05);
  border-color: var(--primary-color);
}

@keyframes imageFadeIn {
  from {
    opacity: 0;
    transform: scale(0.8);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

.card-content {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.card h3 {
  margin: 0;
  font-size: 18px;
  font-weight: 700;
  color: var(--text-color);
  text-align: right;
  cursor: pointer;
  opacity: 0;
  animation: textSlideIn 0.5s ease 0.4s forwards;
  letter-spacing: -0.3px;
  line-height: 1.4;
}

.card p {
  font-size: 14px;
  color: #6B7280;
  text-align: right;
  line-height: 1.5;
  margin: 0;
  display: -webkit-box;
  -webkit-line-clamp: 1;
  -webkit-box-orient: vertical;
  overflow: hidden;
  text-overflow: ellipsis;
  opacity: 0;
  animation: textSlideIn 0.5s ease 0.5s forwards;
}

.dark-mode .card p {
  color: #9CA3AF;
}

@keyframes textSlideIn {
  from {
    opacity: 0;
    transform: translateX(20px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

.card-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: auto;
  opacity: 0;
  animation: footerFadeIn 0.5s ease 0.6s forwards;
}

@keyframes footerFadeIn {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.price {
  font-size: 18px;
  font-weight: 800;
  background: linear-gradient(135deg, var(--primary-color), var(--accent-color));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  font-family: var(--font-secondary);
}

.add-to-cart-btn {
  background: linear-gradient(135deg, var(--primary-color), var(--primary-dark));
  color: white;
  border: none;
  border-radius: 10px;
  padding: 10px 18px;
  cursor: pointer;
  font-size: 14px;
  font-weight: 600;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  display: flex;
  align-items: center;
  gap: 6px;
  position: relative;
  overflow: hidden;
  font-family: var(--font-primary);
  box-shadow: 0 4px 15px rgba(99, 102, 241, 0.3);
}

.add-to-cart-btn::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.3), transparent);
  transition: left 0.5s;
}

.add-to-cart-btn:hover::before {
  left: 100%;
}

.add-to-cart-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(99, 102, 241, 0.4);
}

.dark-mode .add-to-cart-btn {
  box-shadow: 0 4px 15px rgba(129, 140, 248, 0.3);
}

.dark-mode .add-to-cart-btn:hover {
  box-shadow: 0 6px 20px rgba(129, 140, 248, 0.4);
}

/* مودال محصول */
.product-modal {
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  left: 0;
  background: rgba(0, 0, 0, 0.7);
  display: none;
  justify-content: center;
  align-items: center;
  z-index: 3000;
  padding: 20px;
  backdrop-filter: blur(5px);
}

.product-modal.active {
  display: flex;
  animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

.modal-content {
  background: var(--card-bg);
  border-radius: 20px;
  width: 100%;
  max-width: 400px;
  max-height: 90vh;
  overflow-y: auto;
  position: relative;
  box-shadow: 0 20px 60px rgba(99, 102, 241, 0.2);
  border: 1px solid var(--border-color);
  animation: modalSlideIn 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  backdrop-filter: blur(20px);
}

.dark-mode .modal-content {
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
}

@keyframes modalSlideIn {
  from {
    opacity: 0;
    transform: scale(0.8) translateY(50px);
  }
  to {
    opacity: 1;
    transform: scale(1) translateY(0);
  }
}

.modal-header {
  position: relative;
}

.modal-image {
  width: 100%;
  height: 200px;
  object-fit: cover;
  border-radius: 20px 20px 0 0;
}

.close-modal {
  position: absolute;
  top: 15px;
  left: 15px;
  background: rgba(0, 0, 0, 0.5);
  color: white;
  border: none;
  border-radius: 50%;
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 20px;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  backdrop-filter: blur(10px);
}

.close-modal:hover {
  background: rgba(0, 0, 0, 0.7);
  transform: scale(1.1) rotate(90deg);
}

.modal-body {
  padding: 20px;
}

.modal-title {
  font-size: 24px;
  font-weight: 800;
  margin: 0 0 15px 0;
  color: var(--text-color);
  text-align: right;
  line-height: 1.4;
  letter-spacing: -0.5px;
}

.modal-stats {
  display: flex;
  justify-content: space-between;
  margin-bottom: 20px;
  padding: 15px;
  background: rgba(99, 102, 241, 0.05);
  border-radius: 12px;
  border: 1px solid var(--border-color);
}

.dark-mode .modal-stats {
  background: rgba(129, 140, 248, 0.1);
}

.stat-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  flex: 1;
}

.stat-value {
  font-size: 18px;
  font-weight: 700;
  color: var(--primary-color);
  margin-bottom: 5px;
  font-family: var(--font-secondary);
}

.stat-label {
  font-size: 12px;
  color: #6B7280;
  font-weight: 500;
}

.dark-mode .stat-label {
  color: #9CA3AF;
}

.modal-nutrition {
  margin-bottom: 20px;
  padding: 15px;
  background: rgba(16, 185, 129, 0.05);
  border-radius: 12px;
  border: 1px solid var(--border-color);
}

.dark-mode .modal-nutrition {
  background: rgba(52, 211, 153, 0.1);
}

.nutrition-title {
  font-size: 16px;
  font-weight: 600;
  margin-bottom: 10px;
  color: var(--success-color);
  text-align: right;
}

.nutrition-info {
  font-size: 14px;
  color: #6B7280;
  text-align: right;
  line-height: 1.6;
}

.dark-mode .nutrition-info {
  color: #9CA3AF;
}

.modal-description {
  font-size: 14px;
  color: #6B7280;
  text-align: right;
  line-height: 1.6;
  margin-bottom: 20px;
  padding: 15px;
  background: rgba(99, 102, 241, 0.05);
  border-radius: 12px;
  font-style: normal;
  border: 1px solid var(--border-color);
}

.dark-mode .modal-description {
  color: #9CA3AF;
  background: rgba(129, 140, 248, 0.1);
}

.quantity-controls {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 15px;
  margin: 20px 0;
  padding: 10px;
}

.quantity-btn {
  width: 40px;
  height: 40px;
  border: 2px solid var(--primary-color);
  background: var(--card-bg);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 18px;
  font-weight: bold;
  color: var(--primary-color);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  font-family: var(--font-secondary);
}

.quantity-btn:disabled {
  border-color: #D1D5DB;
  color: #D1D5DB;
  background: #F3F4F6;
  cursor: not-allowed;
  transform: none !important;
}

.quantity-btn:disabled:hover {
  background: #F3F4F6;
  color: #D1D5DB;
  border-color: #D1D5DB;
  transform: none !important;
  box-shadow: none !important;
}

.dark-mode .quantity-btn:disabled {
  border-color: #4B5563;
  color: #4B5563;
  background: #374151;
}

.dark-mode .quantity-btn:disabled:hover {
  background: #374151;
  color: #4B5563;
  border-color: #4B5563;
}

.quantity-btn:hover:not(:disabled) {
  background: var(--primary-color);
  color: white;
  transform: scale(1.1);
  box-shadow: 0 4px 12px rgba(99, 102, 241, 0.3);
}

.quantity-display {
  font-size: 20px;
  font-weight: 700;
  color: var(--text-color);
  min-width: 40px;
  text-align: center;
  transition: all 0.3s ease;
  transform: scale(1);
  font-family: var(--font-secondary);
}

.quantity-display.changing {
  transform: scale(1.2);
  color: var(--primary-color);
}

.modal-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-top: 15px;
  border-top: 1px solid var(--border-color);
}

.modal-price {
  font-size: 24px;
  font-weight: 800;
  background: linear-gradient(135deg, var(--primary-color), var(--accent-color));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  font-family: var(--font-secondary);
}

.modal-add-btn {
  background: linear-gradient(135deg, var(--primary-color), var(--primary-dark));
  color: white;
  border: none;
  border-radius: 10px;
  padding: 12px 24px;
  cursor: pointer;
  font-size: 16px;
  font-weight: 600;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  display: flex;
  align-items: center;
  gap: 8px;
  position: relative;
  overflow: hidden;
  font-family: var(--font-primary);
  box-shadow: 0 4px 15px rgba(99, 102, 241, 0.3);
}

.modal-add-btn::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.3), transparent);
  transition: left 0.5s;
}

.modal-add-btn:hover::before {
  left: 100%;
}

.modal-add-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(99, 102, 241, 0.4);
}

.dark-mode .modal-add-btn {
  box-shadow: 0 4px 15px rgba(129, 140, 248, 0.3);
}

.dark-mode .modal-add-btn:hover {
  box-shadow: 0 6px 20px rgba(129, 140, 248, 0.4);
}

/* سایدبار سبد خرید */
.cart-sidebar {
  position: fixed;
  top: 0;
  left: -400px;
  width: 350px;
  height: 100%;
  background: var(--bg-color);
  box-shadow: -2px 0 20px rgba(0, 0, 0, 0.15);
  z-index: 2000;
  transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
  padding: 20px;
  overflow-y: auto;
  direction: rtl;
  border-left: 1px solid var(--border-color);
  backdrop-filter: blur(20px);
}

.cart-sidebar.active {
  left: 0;
}

.cart-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--border-color);
}

.cart-header h2 {
  font-weight: 700;
  font-size: 22px;
  letter-spacing: -0.5px;
  background: linear-gradient(135deg, var(--primary-color), var(--accent-color));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.close-cart {
  background: none;
  border: none;
  font-size: 20px;
  cursor: pointer;
  color: var(--text-color);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  padding: 8px;
  border-radius: 8px;
}

.close-cart:hover {
  transform: rotate(90deg);
  color: var(--primary-color);
  background: rgba(99, 102, 241, 0.1);
}

.cart-items {
  display: flex;
  flex-direction: column;
  gap: 15px;
  margin-bottom: 20px;
  max-height: 60vh;
  overflow-y: auto;
}

.cart-items::-webkit-scrollbar {
  width: 6px;
}

.cart-items::-webkit-scrollbar-track {
  background: var(--bg-color);
  border-radius: 10px;
}

.cart-items::-webkit-scrollbar-thumb {
  background: var(--primary-color);
  border-radius: 10px;
}

.cart-items::-webkit-scrollbar-thumb:hover {
  background: var(--primary-dark);
}

.cart-item {
  display: flex;
  gap: 10px;
  padding: 12px;
  border-radius: 12px;
  background: var(--card-bg);
  box-shadow: 0 4px 15px rgba(99, 102, 241, 0.1);
  border: 1px solid var(--border-color);
  position: relative;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  animation: cartItemSlideIn 0.4s ease;
  backdrop-filter: blur(10px);
}

.dark-mode .cart-item {
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
}

.cart-item.removing {
  animation: cartItemRemove 0.5s ease forwards;
}

@keyframes cartItemSlideIn {
  from {
    opacity: 0;
    transform: translateX(-20px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

@keyframes cartItemRemove {
  from {
    opacity: 1;
    transform: translateX(0);
  }
  to {
    opacity: 0;
    transform: translateX(100px);
    height: 0;
    padding: 0;
    margin: 0;
    border: none;
  }
}

.cart-item img {
  width: 60px;
  height: 60px;
  border-radius: 10px;
  object-fit: cover;
  transition: all 0.3s ease;
  border: 1px solid var(--border-color);
}

.cart-item-details {
  flex: 1;
}

.cart-item-name {
  font-weight: 700;
  margin-bottom: 5px;
  font-size: 15px;
  color: var(--text-color);
}

.cart-item-price {
  color: var(--primary-color);
  font-size: 14px;
  font-weight: 600;
  font-family: var(--font-secondary);
}

.cart-item-controls {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 5px;
}

.cart-item-remove {
  background: linear-gradient(135deg, var(--error-color), #DC2626);
  color: white;
  border: none;
  border-radius: 6px;
  padding: 6px 12px;
  cursor: pointer;
  font-size: 12px;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  display: flex;
  align-items: center;
  gap: 4px;
  font-family: var(--font-primary);
  font-weight: 600;
}

.cart-item-remove:hover {
  transform: scale(1.05);
  box-shadow: 0 4px 12px rgba(239, 68, 68, 0.3);
}

.cart-total {
  display: flex;
  justify-content: space-between;
  font-weight: 700;
  font-size: 18px;
  padding: 15px 0;
  border-top: 1px solid var(--border-color);
  color: var(--text-color);
}

.cart-actions {
  display: flex;
  gap: 10px;
  margin-bottom: 15px;
}

.clear-cart-btn {
  flex: 1;
  padding: 10px;
  background: linear-gradient(135deg, var(--warning-color), #D97706);
  color: white;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  font-size: 14px;
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  font-family: var(--font-primary);
  font-weight: 600;
}

.clear-cart-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(245, 158, 11, 0.3);
}

.checkout-btn {
  width: 100%;
  padding: 12px;
  background: linear-gradient(135deg, var(--primary-color), var(--primary-dark));
  color: white;
  border: none;
  border-radius: 10px;
  font-size: 16px;
  cursor: pointer;
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  overflow: hidden;
  font-weight: 600;
  font-family: var(--font-primary);
  box-shadow: 0 4px 15px rgba(99, 102, 241, 0.3);
}

.checkout-btn::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.3), transparent);
  transition: left 0.5s;
}

.checkout-btn:hover::before {
  left: 100%;
}

.checkout-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(99, 102, 241, 0.4);
}

.dark-mode .checkout-btn {
  box-shadow: 0 4px 15px rgba(129, 140, 248, 0.3);
}

.dark-mode .checkout-btn:hover {
  box-shadow: 0 6px 20px rgba(129, 140, 248, 0.4);
}

.empty-cart {
  text-align: center;
  padding: 40px 20px;
  color: #6B7280;
}

.empty-cart i {
  font-size: 48px;
  margin-bottom: 15px;
  color: var(--primary-color);
}

.overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.5);
  z-index: 1500;
  display: none;
  transition: all 0.4s ease;
  backdrop-filter: blur(5px);
}

.overlay.active {
  display: block;
  animation: fadeIn 0.4s ease;
}

/* نوتیفیکیشن‌های مدرن */
.toast-container {
  position: fixed;
  bottom: 20px;
  right: 20px;
  z-index: 3000;
  display: flex;
  flex-direction: column-reverse;
  gap: 10px;
  max-width: 300px;
}

.toast {
  background: var(--primary-color);
  color: white;
  padding: 15px 20px;
  border-radius: 12px;
  box-shadow: 0 8px 25px rgba(99, 102, 241, 0.2);
  transform: translateY(100px);
  opacity: 0;
  transition: all 0.5s cubic-bezier(0.68, -0.55, 0.265, 1.55);
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 16px;
  max-width: 300px;
  position: relative;
  font-weight: 500;
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.dark-mode .toast {
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.4);
}

.toast.admin-toast {
  background: var(--admin-color);
}

.toast.success-toast {
  background: var(--success-color);
}

.toast.error-toast {
  background: var(--error-color);
}

.toast.warning-toast {
  background: var(--warning-color);
}

.toast.show {
  transform: translateY(0);
  opacity: 1;
}

.toast i {
  font-size: 18px;
}

/* پنل ادمین */
.admin-panel {
  position: fixed;
  top: 0;
  right: -100%;
  width: 380px;
  height: 100%;
  background: var(--bg-color);
  box-shadow: -2px 0 20px rgba(0, 0, 0, 0.15);
  z-index: 2000;
  transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
  padding: 20px;
  overflow-y: auto;
  direction: rtl;
  border-left: 1px solid var(--border-color);
  backdrop-filter: blur(20px);
}

.admin-panel.active {
  right: 0;
}

.admin-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--border-color);
}

.admin-header h2 {
  font-weight: 700;
  font-size: 22px;
  letter-spacing: -0.5px;
  background: linear-gradient(135deg, var(--admin-color), var(--primary-color));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.close-admin {
  background: none;
  border: none;
  font-size: 20px;
  cursor: pointer;
  color: var(--text-color);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  padding: 8px;
  border-radius: 8px;
}

.close-admin:hover {
  transform: rotate(90deg);
  color: var(--admin-color);
  background: rgba(139, 92, 246, 0.1);
}

.login-section {
  padding: 20px;
  text-align: center;
}

.login-icon {
  font-size: 60px;
  color: var(--admin-color);
  margin-bottom: 20px;
}

.login-title {
  font-size: 24px;
  font-weight: 700;
  margin-bottom: 10px;
  background: linear-gradient(135deg, var(--admin-color), var(--primary-color));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.login-subtitle {
  font-size: 14px;
  color: #6B7280;
  margin-bottom: 30px;
  line-height: 1.6;
}

.dark-mode .login-subtitle {
  color: #9CA3AF;
}

.login-form {
  display: flex;
  flex-direction: column;
  gap: 15px;
  margin-bottom: 20px;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.form-group label {
  font-weight: 600;
  font-size: 14px;
  text-align: right;
  color: var(--text-color);
}

.form-group input, .form-group select, .form-group textarea {
  padding: 12px 15px;
  border: 1px solid var(--border-color);
  border-radius: 8px;
  background: var(--card-bg);
  color: var(--text-color);
  font-family: var(--font-primary);
  font-size: 14px;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  backdrop-filter: blur(10px);
  cursor: pointer;
}

.form-group input:focus, .form-group select:focus, .form-group textarea:focus {
  outline: none;
  border-color: var(--admin-color);
  box-shadow: 0 0 0 3px rgba(139, 92, 246, 0.1);
  transform: scale(1.02);
}

.form-group textarea {
  min-height: 80px;
  resize: vertical;
}

.file-input-container {
  position: relative;
  display: flex;
  align-items: center;
}

.file-input {
  position: absolute;
  opacity: 0;
  width: 100%;
  height: 100%;
  cursor: pointer;
}

.file-input-label {
  flex: 1;
  padding: 12px 15px;
  border: 1px solid var(--border-color);
  border-radius: 8px;
  background: var(--card-bg);
  color: var(--text-color);
  text-align: center;
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  font-weight: 500;
}

.file-input-label:hover {
  border-color: var(--admin-color);
  background: rgba(139, 92, 246, 0.1);
  transform: scale(1.02);
}

.login-btn {
  width: 100%;
  padding: 12px;
  background: linear-gradient(135deg, var(--admin-color), var(--primary-color));
  color: white;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  font-size: 16px;
  font-weight: 600;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-family: var(--font-primary);
  margin-top: 10px;
  box-shadow: 0 4px 15px rgba(139, 92, 246, 0.3);
}

.login-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(139, 92, 246, 0.4);
}

.login-btn:disabled {
  background: #6B7280;
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}

.error-message {
  color: var(--error-color);
  font-size: 14px;
  margin-top: 5px;
  text-align: right;
  display: none;
  font-weight: 500;
}

.error-message.show {
  display: block;
  animation: shake 0.5s ease;
}

@keyframes shake {
  0%, 100% { transform: translateX(0); }
  20%, 60% { transform: translateX(-5px); }
  40%, 80% { transform: translateX(5px); }
}

.admin-content {
  display: none;
}

.admin-content.active {
  display: block;
}

.admin-section {
  margin-bottom: 25px;
  padding: 15px;
  background: var(--card-bg);
  border-radius: 12px;
  box-shadow: 0 4px 20px rgba(99, 102, 241, 0.08);
  border: 1px solid var(--border-color);
  backdrop-filter: blur(10px);
}

.dark-mode .admin-section {
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
}

.admin-section h3 {
  margin-top: 0;
  margin-bottom: 15px;
  font-size: 18px;
  color: var(--admin-color);
  border-bottom: 1px solid var(--border-color);
  padding-bottom: 8px;
  font-weight: 700;
}

.admin-form {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.admin-actions {
  display: flex;
  gap: 10px;
  margin-top: 15px;
}

.admin-btn {
  flex: 1;
  padding: 10px 15px;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  font-size: 14px;
  font-weight: 600;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  font-family: var(--font-primary);
  position: relative;
  overflow: hidden;
}

.admin-btn::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
  transition: left 0.5s;
}

.admin-btn:hover::before {
  left: 100%;
}

.add-btn {
  background: linear-gradient(135deg, var(--admin-color), var(--primary-color));
  color: white;
}

.add-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(139, 92, 246, 0.3);
}

.update-btn {
  background: linear-gradient(135deg, var(--success-color), #059669);
  color: white;
}

.update-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(16, 185, 129, 0.3);
}

.delete-btn {
  background: linear-gradient(135deg, var(--error-color), #DC2626);
  color: white;
}

.delete-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(239, 68, 68, 0.3);
}

.edit-btn {
  background: linear-gradient(135deg, var(--warning-color), #D97706);
  color: white;
}

.edit-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(245, 158, 11, 0.3);
}

.logout-btn {
  background: linear-gradient(135deg, #6B7280, #4B5563);
  color: white;
  width: 100%;
  margin-top: 20px;
  margin-bottom: 5px;
}

.logout-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(107, 114, 128, 0.3);
}

.product-list {
  max-height: 300px;
  overflow-y: auto;
  border: 1px solid var(--border-color);
  border-radius: 8px;
  padding: 10px;
  background: var(--bg-color);
}

.product-list::-webkit-scrollbar {
  width: 6px;
}

.product-list::-webkit-scrollbar-track {
  background: var(--card-bg);
  border-radius: 10px;
}

.product-list::-webkit-scrollbar-thumb {
  background: var(--primary-color);
  border-radius: 10px;
}

.product-list::-webkit-scrollbar-thumb:hover {
  background: var(--primary-dark);
}

.product-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px;
  border-bottom: 1px solid var(--border-color);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  border-radius: 6px;
  margin-bottom: 5px;
}

.product-item:last-child {
  border-bottom: none;
}

.product-item:hover {
  background: rgba(99, 102, 241, 0.1);
  transform: translateX(-5px);
}

.product-info {
  flex: 1;
}

.product-name {
  font-weight: 600;
  margin-bottom: 5px;
  color: var(--text-color);
}

.product-category {
  font-size: 12px;
  color: #6B7280;
  font-weight: 500;
}

.dark-mode .product-category {
  color: #9CA3AF;
}

.product-actions {
  display: flex;
  gap: 5px;
}

.product-action-btn {
  background: none;
  border: none;
  cursor: pointer;
  font-size: 14px;
  padding: 6px;
  border-radius: 4px;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.edit-action {
  color: var(--admin-color);
}

.edit-action:hover {
  background: rgba(139, 92, 246, 0.1);
  transform: scale(1.1);
}

.delete-action {
  color: var(--error-color);
}

.delete-action:hover {
  background: rgba(239, 68, 68, 0.1);
  transform: scale(1.1);
}

/* استایل برای محصولات دارای تخفیف در پنل مدیریت */
.product-item.discounted-product {
    background: linear-gradient(135deg, #fff3e0 0%, #ffe0b2 100%);
    border: 2px solid #ff9800;
    border-right: 6px solid #ff9800;
}

.product-item.discounted-product:hover {
    background: linear-gradient(135deg, #ffe0b2 0%, #ffcc80 100%);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(255, 152, 0, 0.3);
}

/* استایل برای محصولات عادی */
.product-item {
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    border: 2px solid #dee2e6;
    border-right: 6px solid #6c757d;
    transition: all 0.3s ease;
}

.product-item:hover {
    background: linear-gradient(135deg, #e9ecef 0%, #dee2e6 100%);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

/* استایل بدج تخفیف در لیست محصولات */
.product-discount-badge {
    background: linear-gradient(135deg, #ff4444 0%, #cc0000 100%);
    color: white;
    padding: 4px 8px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: bold;
    margin-top: 5px;
    display: inline-block;
    box-shadow: 0 2px 4px rgba(255, 68, 68, 0.3);
}

/* استایل برای حالت تاریک */
.dark-mode .product-item.discounted-product {
    background: linear-gradient(135deg, #332211 0%, #553311 100%);
    border: 2px solid #ff9800;
    border-right: 6px solid #ff9800;
}

.dark-mode .product-item {
    background: linear-gradient(135deg, #2d3748 0%, #4a5568 100%);
    border: 2px solid #4a5568;
    border-right: 6px solid #718096;
}

.dark-mode .product-discount-badge {
    background: linear-gradient(135deg, #ff6b6b 0%, #ee5a24 100%);
}

.discount-badge {
    position: absolute;
    top: 10px;
    left: 10px;
    background: linear-gradient(135deg, #ff4444, #ff6b6b);
    color: white;
    padding: 5px 10px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: bold;
    z-index: 2;
    box-shadow: 0 2px 8px rgba(255, 77, 77, 0.3);
}

.card {
    position: relative;
}

.price-container {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.original-price {
    text-decoration: line-through;
    color: #999;
    font-size: 16px;
}

.discounted-price {
    color: #ff4444;
    font-weight: bold;
    font-size: 24px;
}

/* در حالت تاریک */
.dark-mode .original-price {
    color: #888;
}

.dark-mode .discounted-price {
    color: #ff6b6b;
}

/* رسپانسیو برای دسکتاپ */
@media (min-width: 1025px) {
  .menu {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(480px, 1fr));
    gap: 25px;
    padding: 30px;
    margin-top: 160px;
    max-width: 1200px;
    margin-left: auto;
    margin-right: auto;
  }
  
  .card {
    background: var(--card-bg);
    border-radius: 20px;
    padding: 25px;
    display: flex;
    gap: 25px;
    box-shadow: var(--card-shadow);
    border: 1px solid var(--border-color);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    cursor: pointer;
    opacity: 0;
    transform: translateY(30px);
    animation: cardSlideInDesktop 0.6s ease forwards;
    min-height: 200px;
    backdrop-filter: blur(10px);
  }

  .card:hover {
    transform: translateY(-8px) scale(1.02);
    box-shadow: 0 20px 50px rgba(99, 102, 241, 0.2);
  }

  .dark-mode .card:hover {
    box-shadow: 0 20px 50px rgba(129, 140, 248, 0.25);
  }

  @keyframes cardSlideInDesktop {
    from {
      opacity: 0;
      transform: translateY(40px) scale(0.95);
    }
    to {
      opacity: 1;
      transform: translateY(0) scale(1);
    }
  }

  .card-image {
    width: 160px;
    height: 160px;
    border-radius: 16px;
    object-fit: cover;
    flex-shrink: 0;
    cursor: pointer;
    transition: all 0.4s ease;
    opacity: 0;
    animation: imageFadeInDesktop 0.8s ease 0.3s forwards;
    border: 3px solid transparent;
  }

  .card:hover .card-image {
    transform: scale(1.05);
    border-color: var(--primary-color);
  }

  @keyframes imageFadeInDesktop {
    from {
      opacity: 0;
      transform: scale(0.8) rotate(-5deg);
    }
    to {
      opacity: 1;
      transform: scale(1) rotate(0);
    }
  }

  .card-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    gap: 15px;
  }

  .card h3 {
    margin: 0;
    font-size: 22px;
    font-weight: 800;
    color: var(--text-color);
    text-align: right;
    cursor: pointer;
    opacity: 0;
    animation: textSlideInDesktop 0.5s ease 0.4s forwards;
    line-height: 1.3;
    letter-spacing: -0.5px;
  }

  .card p {
    font-size: 16px;
    color: #6B7280;
    text-align: right;
    line-height: 1.6;
    margin: 0;
    display: -webkit-box;
    -webkit-line-clamp: 1;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
    opacity: 0;
    animation: textSlideInDesktop 0.5s ease 0.5s forwards;
  }

  @keyframes textSlideInDesktop {
    from {
      opacity: 0;
      transform: translateX(30px);
    }
    to {
      opacity: 1;
      transform: translateX(0);
    }
  }

  .card-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: auto;
    opacity: 0;
    animation: footerFadeInDesktop 0.5s ease 0.6s forwards;
  }

  @keyframes footerFadeInDesktop {
    from {
      opacity: 0;
      transform: translateY(20px) scale(0.9);
    }
    to {
      opacity: 1;
      transform: translateY(0) scale(1);
    }
  }

  .price {
    font-size: 22px;
  }

  .add-to-cart-btn {
    background: linear-gradient(135deg, var(--primary-color), var(--primary-dark));
    color: white;
    border: none;
    border-radius: 12px;
    padding: 14px 28px;
    cursor: pointer;
    font-size: 16px;
    font-weight: 600;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    align-items: center;
    gap: 8px;
    position: relative;
    overflow: hidden;
    box-shadow: 0 6px 20px rgba(99, 102, 241, 0.3);
    font-family: var(--font-primary);
  }

  .add-to-cart-btn:hover {
    transform: translateY(-3px) scale(1.05);
    box-shadow: 0 10px 30px rgba(99, 102, 241, 0.5);
  }

  .card::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    border-radius: 20px;
    background: linear-gradient(135deg, transparent, transparent);
    opacity: 0;
    transition: opacity 0.4s ease;
    z-index: -1;
  }

  .card:hover::after {
    opacity: 1;
    background: linear-gradient(135deg, 
      rgba(99, 102, 241, 0.1), 
      rgba(6, 182, 212, 0.05));
  }

  .dark-mode .card:hover::after {
    background: linear-gradient(135deg, 
      rgba(129, 140, 248, 0.2), 
      rgba(34, 211, 238, 0.1));
  }

  .search-icon {
    display: none;
  }
}

@media (min-width: 1200px) {
  .menu {
    grid-template-columns: repeat(auto-fit, minmax(500px, 1fr));
    gap: 30px;
    padding: 40px;
    max-width: 1400px;
  }
  
  .card {
    padding: 30px;
    gap: 30px;
    border-radius: 24px;
  }
  
  .card-image {
    width: 180px;
    height: 180px;
  }
  
  .card h3 {
    font-size: 24px;
  }
  
  .card p {
    font-size: 17px;
    -webkit-line-clamp: 1;
  }
  
  .price {
    font-size: 24px;
  }
  
  .add-to-cart-btn {
    padding: 16px 32px;
    font-size: 17px;
  }
}

/* رسپانسیو برای تبلت و موبایل */
@media (max-width: 1024px) {
  .menu {
    display: flex;
    flex-direction: column;
    gap: 15px;
    padding: 15px;
    margin-top: 175px;
    max-width: 500px;
    margin-left: auto;
    margin-right: auto;
  }
  
  .cart-sidebar, .admin-panel {
    width: 300px;
  }
  
  .card {
    padding: 15px;
    gap: 15px;
  }
  
  .card-image {
    width: 100px;
    height: 100px;
  }
  
  .search-icon {
    display: block;
    left: calc(30% + 40px);
  }
  
  .search-box input {
    padding-left: 40px;
  }

  .toast-container {
    right: 10px;
    left: 10px;
    max-width: none;
  }
  
  .modal-content {
    max-width: 95%;
    margin: 10px;
  }
  
  .modal-body {
    padding: 15px;
  }
  
  .modal-title {
    font-size: 20px;
  }
  
  .modal-stats {
    flex-direction: row;
    justify-content: space-around;
    gap: 10px;
    padding: 12px;
  }
  
  .stat-item {
    flex: 1;
  }
  
  .stat-value {
    font-size: 16px;
  }
  
  .modal-nutrition,
  .modal-description {
    padding: 12px;
  }
  
  .quantity-controls {
    margin: 15px 0;
    gap: 12px;
  }
  
  .quantity-btn {
    width: 35px;
    height: 35px;
    font-size: 16px;
  }
  
  .quantity-display {
    font-size: 18px;
  }
  
  .modal-footer {
    flex-direction: column;
    gap: 15px;
  }
  
  .modal-price {
    font-size: 20px;
    text-align: center;
  }
  
  .modal-add-btn {
    width: 100%;
  }
  .original-price {
    text-decoration: line-through;
    color: #999;
    font-size: 12px;
  }

  .discounted-price {
    color: #ff4444;
    font-weight: bold;
    font-size: 18px;
  }
}

@media (max-width: 768px) {
  .admin-panel {
    width: 90%;
  }
  
  .admin-section {
    padding: 12px;
  }
  
  .admin-actions {
    flex-direction: column;
  }
  
  .admin-btn {
    width: 100%;
  }
  
  .product-list {
    max-height: 200px;
  }
  .original-price {
    text-decoration: line-through;
    color: #999;
    font-size: 12px;
  }

  .discounted-price {
    color: #ff4444;
    font-weight: bold;
    font-size: 18px;
  }
}

@media (max-width: 480px) {
  .cart-sidebar, .admin-panel {
    width: 85%;
  }
  
  header h1 {
    font-size: 20px;
  }
  
  .search-box input {
    width: 90%;
  }

  .search-icon {
    display: block;
    left: calc(5% + 15px);
  }
  
  .card {
    padding: 10px;
    gap: 10px;
  }
  
  .card h3 {
    font-size: 16px;
  }
  
  .card p {
    font-size: 13px;
  }
  
  .price {
    font-size: 16px;
  }
  
  .add-to-cart-btn {
    padding: 6px 12px;
    font-size: 13px;
  }
  
  .modal-body {
    padding: 12px;
  }
  
  .modal-title {
    font-size: 18px;
  }
  
  .modal-stats,
  .modal-nutrition,
  .modal-description {
    padding: 10px;
  }
  
  .quantity-controls {
    margin: 12px 0;
    gap: 10px;
  }
  
  .quantity-btn {
    width: 32px;
    height: 32px;
    font-size: 14px;
  }
  
  .quantity-display {
    font-size: 16px;
  }
  
  .admin-panel {
    padding: 15px;
  }
  
  .admin-section {
    padding: 10px;
  }
  
  .form-group input, .form-group select, .form-group textarea {
    padding: 10px 12px;
  }
  
  .admin-btn {
    padding: 8px 12px;
  }
  .original-price {
    text-decoration: line-through;
    color: #999;
    font-size: 12px;
}

.discounted-price {
    color: #ff4444;
    font-weight: bold;
    font-size: 18px;
}
}