/* ============================================================
   متجر إلكتروني متكامل - الأنماط الرئيسية
   E-Commerce Storefront Styles
   ============================================================
   - تصميم احترافي قريب من أمازون
   - يدعم RTL والعربية
   - متجاوب 100% (موبايل/تابلت/كمبيوتر)
   - الوضع الليلي للوحة التحكم فقط (admin.css)
   ============================================================ */

/* === متغيرات الألوان === */
:root {
  --primary: #ff9900;
  --primary-dark: #e88a00;
  --primary-light: #fff3e0;
  --secondary: #232f3e;
  --secondary-light: #37475a;
  --accent: #007185;
  --danger: #e74c3c;
  --success: #27ae60;
  --warning: #f39c12;
  --bg: #f7f7f7;
  --bg-card: #ffffff;
  --bg-hover: #f5f5f5;
  --text: #1a1a1a;
  --text-light: #666666;
  --text-lighter: #999999;
  --border: #e0e0e0;
  --shadow: 0 2px 8px rgba(0,0,0,0.08);
  --shadow-lg: 0 4px 16px rgba(0,0,0,0.12);
  --radius: 8px;
  --radius-lg: 12px;
  --transition: all 0.2s ease;
}

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

html { scroll-behavior: smooth; }

body {
  font-family: 'Cairo', 'Tajawal', 'Segoe UI', Tahoma, sans-serif;
  background: var(--bg);
  color: var(--text);
  direction: rtl;
  line-height: 1.6;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

img { max-width: 100%; height: auto; display: block; }
a { color: inherit; text-decoration: none; transition: var(--transition); }
button { font-family: inherit; cursor: pointer; transition: var(--transition); border: none; background: none; }
input, textarea, select { font-family: inherit; }

/* === Header === */
.site-header {
  background: var(--secondary);
  color: #fff;
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: 0 2px 8px rgba(0,0,0,0.15);
}

.header-top {
  background: var(--secondary-light);
  padding: 6px 0;
  font-size: 12px;
  color: #ccc;
}

.header-top .container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
}

.header-top a { color: var(--primary); }
.header-top a:hover { text-decoration: underline; }

.header-main {
  padding: 12px 0;
}

.header-main .container {
  display: flex;
  align-items: center;
  gap: 20px;
}

.logo {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 24px;
  font-weight: 800;
  color: #fff;
  flex-shrink: 0;
}

.logo img { height: 40px; width: auto; }
.logo .logo-icon {
  font-size: 28px;
  color: var(--primary);
}

.search-bar {
  flex: 1;
  max-width: 700px;
  display: flex;
  background: #fff;
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.search-bar input {
  flex: 1;
  padding: 12px 16px;
  border: none;
  outline: none;
  font-size: 14px;
  color: var(--text);
}

.search-bar select {
  padding: 12px 12px;
  border: none;
  border-right: 1px solid var(--border);
  background: var(--bg-hover);
  outline: none;
  font-size: 13px;
  color: var(--text-light);
  cursor: pointer;
}

.search-bar button {
  padding: 0 20px;
  background: var(--primary);
  color: #fff;
  font-weight: 600;
  font-size: 14px;
  display: flex;
  align-items: center;
  gap: 6px;
}

.search-bar button:hover { background: var(--primary-dark); }

.header-actions {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-shrink: 0;
}

.action-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  padding: 8px 12px;
  border-radius: var(--radius);
  color: #fff;
  position: relative;
  font-size: 11px;
  cursor: pointer;
}

.action-btn:hover { background: rgba(255,255,255,0.1); }
.action-btn svg, .action-btn .icon { font-size: 22px; }

.action-btn .badge {
  position: absolute;
  top: 0;
  left: 0;
  background: var(--danger);
  color: #fff;
  border-radius: 50%;
  min-width: 18px;
  height: 18px;
  display: none;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  font-weight: 700;
  padding: 0 4px;
}

.action-btn .badge:not(:empty) { display: flex; }

/* === Categories Bar === */
.categories-bar {
  background: #fff;
  border-bottom: 1px solid var(--border);
  padding: 0;
}

.categories-bar .container {
  display: flex;
  align-items: center;
  gap: 4px;
  overflow-x: auto;
  scrollbar-width: none;
}

.categories-bar .container::-webkit-scrollbar { display: none; }

.cat-link {
  padding: 14px 16px;
  font-size: 14px;
  font-weight: 600;
  color: var(--text);
  white-space: nowrap;
  border-bottom: 3px solid transparent;
  cursor: pointer;
}

.cat-link:hover, .cat-link.active {
  color: var(--primary);
  border-bottom-color: var(--primary);
}

.cat-link .cat-icon { margin-left: 4px; }

/* === Main Content === */
.main-content {
  flex: 1;
  padding: 24px 0;
}

.container {
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 16px;
}

/* === Slider === */
.slider {
  position: relative;
  margin-bottom: 32px;
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow);
}

.slides {
  position: relative;
  height: 400px;
}

.slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  transition: opacity 0.6s ease;
  display: flex;
  align-items: center;
}

.slide.active { opacity: 1; }

.slide img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.slide-overlay {
  position: relative;
  z-index: 2;
  padding: 40px 60px;
  background: linear-gradient(90deg, rgba(0,0,0,0.7) 0%, rgba(0,0,0,0.3) 60%, transparent 100%);
  width: 60%;
  height: 100%;
  display: flex;
  flex-direction: column;
  justify-content: center;
  color: #fff;
}

.slide-title {
  font-size: 32px;
  font-weight: 800;
  margin-bottom: 12px;
  line-height: 1.3;
}

.slide-subtitle {
  font-size: 18px;
  margin-bottom: 24px;
  opacity: 0.95;
}

.slide-btn {
  display: inline-block;
  background: var(--primary);
  color: #fff;
  padding: 12px 32px;
  border-radius: var(--radius);
  font-weight: 700;
  font-size: 15px;
  width: fit-content;
}

.slide-btn:hover { background: var(--primary-dark); transform: translateY(-2px); }

.slider-dots {
  position: absolute;
  bottom: 16px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 8px;
  z-index: 10;
}

.dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: rgba(255,255,255,0.5);
  cursor: pointer;
  transition: var(--transition);
}

.dot.active { background: #fff; transform: scale(1.2); }

.slider-arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(255,255,255,0.7);
  width: 44px;
  height: 44px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
  cursor: pointer;
  z-index: 10;
  color: var(--secondary);
}

.slider-arrow:hover { background: #fff; }
.slider-arrow.prev { right: 16px; }
.slider-arrow.next { left: 16px; }

/* === Section Title === */
.section-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 20px;
}

.section-title h2 {
  font-size: 24px;
  font-weight: 700;
  color: var(--text);
  position: relative;
  padding-right: 14px;
}

.section-title h2::before {
  content: '';
  position: absolute;
  right: 0;
  top: 50%;
  transform: translateY(-50%);
  width: 4px;
  height: 24px;
  background: var(--primary);
  border-radius: 2px;
}

.section-title .view-all {
  color: var(--accent);
  font-size: 14px;
  font-weight: 600;
}

.section-title .view-all:hover { text-decoration: underline; }

/* === Products Grid === */
.products-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 16px;
  margin-bottom: 32px;
}

.product-card {
  background: var(--bg-card);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
  transition: var(--transition);
  cursor: pointer;
  position: relative;
  display: flex;
  flex-direction: column;
}

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

.product-image {
  position: relative;
  width: 100%;
  aspect-ratio: 1;
  overflow: hidden;
  background: var(--bg-hover);
}

.product-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: opacity 0.3s ease;
}

.product-image img.alt-image {
  position: absolute;
  inset: 0;
  opacity: 0;
}

.product-card:hover .product-image img.main-image { opacity: 0; }
.product-card:hover .product-image img.alt-image { opacity: 1; }

.discount-badge {
  position: absolute;
  top: 8px;
  right: 8px;
  background: var(--danger);
  color: #fff;
  padding: 4px 10px;
  border-radius: 4px;
  font-size: 12px;
  font-weight: 700;
  z-index: 2;
}

.wishlist-btn {
  position: absolute;
  top: 8px;
  left: 8px;
  background: rgba(255,255,255,0.9);
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  color: var(--text-light);
  cursor: pointer;
  z-index: 2;
  transition: var(--transition);
}

.wishlist-btn:hover { background: #fff; color: var(--danger); transform: scale(1.1); }
.wishlist-btn.active { color: var(--danger); }

.product-info {
  padding: 12px;
  display: flex;
  flex-direction: column;
  flex: 1;
}

.product-name {
  font-size: 14px;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 6px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  line-height: 1.4;
  min-height: 39px;
}

.product-rating {
  display: flex;
  align-items: center;
  gap: 4px;
  margin-bottom: 8px;
  font-size: 12px;
  color: var(--text-light);
}

.stars { color: var(--warning); font-size: 14px; }

.product-price {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 12px;
  flex-wrap: wrap;
}

.price-current {
  font-size: 18px;
  font-weight: 800;
  color: var(--secondary);
}

.price-original {
  font-size: 13px;
  color: var(--text-lighter);
  text-decoration: line-through;
}

.product-actions {
  display: flex;
  gap: 6px;
  margin-top: auto;
}

.btn-cart {
  flex: 1;
  background: var(--primary);
  color: #fff;
  padding: 8px 12px;
  border-radius: var(--radius);
  font-size: 13px;
  font-weight: 600;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
}

.btn-cart:hover { background: var(--primary-dark); }

.btn-buy-now {
  background: var(--secondary);
  color: #fff;
  padding: 8px 12px;
  border-radius: var(--radius);
  font-size: 13px;
  font-weight: 600;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
}

.btn-buy-now:hover { background: var(--secondary-light); }

.stock-out {
  background: #ccc !important;
  cursor: not-allowed;
}

/* === Categories Grid === */
.categories-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: 16px;
  margin-bottom: 32px;
}

.category-card {
  background: var(--bg-card);
  border-radius: var(--radius);
  padding: 24px 16px;
  text-align: center;
  cursor: pointer;
  transition: var(--transition);
  box-shadow: var(--shadow);
}

.category-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
  border: 1px solid var(--primary);
}

.category-card .cat-icon {
  font-size: 48px;
  margin-bottom: 12px;
}

.category-card .cat-name {
  font-size: 15px;
  font-weight: 600;
  color: var(--text);
}

/* === Loading & Empty States === */
.loading {
  text-align: center;
  padding: 60px 20px;
  color: var(--text-light);
}

.spinner {
  width: 40px;
  height: 40px;
  border: 3px solid var(--border);
  border-top-color: var(--primary);
  border-radius: 50%;
  margin: 0 auto 16px;
  animation: spin 0.8s linear infinite;
}

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

.empty-state {
  text-align: center;
  padding: 60px 20px;
  color: var(--text-light);
}

.empty-state .icon {
  font-size: 60px;
  margin-bottom: 16px;
  opacity: 0.5;
}

.empty-state h3 {
  font-size: 20px;
  color: var(--text);
  margin-bottom: 8px;
}

/* === Pagination === */
.pagination {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 8px;
  margin: 32px 0;
}

.page-btn {
  padding: 8px 14px;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  font-size: 14px;
  cursor: pointer;
  color: var(--text);
  min-width: 40px;
  text-align: center;
}

.page-btn:hover:not(:disabled) { background: var(--bg-hover); border-color: var(--primary); }
.page-btn.active { background: var(--primary); color: #fff; border-color: var(--primary); }
.page-btn:disabled { opacity: 0.5; cursor: not-allowed; }

/* === Product Detail Page === */
.product-detail {
  background: #fff;
  border-radius: var(--radius-lg);
  padding: 24px;
  box-shadow: var(--shadow);
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 32px;
  margin-bottom: 32px;
}

.product-gallery {
  position: sticky;
  top: 100px;
  align-self: start;
}

.main-image {
  width: 100%;
  aspect-ratio: 1;
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--bg-hover);
  margin-bottom: 12px;
}

.main-image img { width: 100%; height: 100%; object-fit: cover; }

.thumbnails {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.thumb {
  width: 70px;
  height: 70px;
  border-radius: var(--radius);
  overflow: hidden;
  cursor: pointer;
  border: 2px solid transparent;
  background: var(--bg-hover);
}

.thumb img { width: 100%; height: 100%; object-fit: cover; }
.thumb.active { border-color: var(--primary); }
.thumb:hover { border-color: var(--primary-dark); }

.product-info-detail h1 {
  font-size: 24px;
  font-weight: 700;
  margin-bottom: 12px;
  color: var(--text);
  line-height: 1.4;
}

.product-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  margin-bottom: 16px;
  font-size: 13px;
  color: var(--text-light);
}

.product-meta span { display: flex; align-items: center; gap: 4px; }

.product-price-detail {
  display: flex;
  align-items: baseline;
  gap: 12px;
  margin: 16px 0;
  padding: 16px;
  background: var(--primary-light);
  border-radius: var(--radius);
}

.price-detail-current {
  font-size: 32px;
  font-weight: 800;
  color: var(--secondary);
}

.price-detail-original {
  font-size: 18px;
  color: var(--text-light);
  text-decoration: line-through;
}

.discount-tag {
  background: var(--danger);
  color: #fff;
  padding: 4px 12px;
  border-radius: 4px;
  font-size: 14px;
  font-weight: 700;
}

.product-description {
  margin: 20px 0;
  padding: 16px 0;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}

.product-description h3 {
  font-size: 16px;
  margin-bottom: 8px;
  color: var(--text);
}

.product-description p {
  color: var(--text-light);
  line-height: 1.8;
  font-size: 14px;
}

.product-attributes {
  margin: 16px 0;
}

.attr-row {
  display: flex;
  gap: 12px;
  padding: 6px 0;
  font-size: 14px;
}

.attr-label {
  color: var(--text-light);
  min-width: 120px;
  font-weight: 600;
}

.attr-value { color: var(--text); }

.qty-selector {
  display: flex;
  align-items: center;
  gap: 0;
  margin: 20px 0;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  width: fit-content;
  overflow: hidden;
}

.qty-btn {
  width: 40px;
  height: 40px;
  background: var(--bg-hover);
  font-size: 18px;
  font-weight: 700;
}

.qty-btn:hover { background: var(--border); }
.qty-input {
  width: 60px;
  height: 40px;
  border: none;
  text-align: center;
  font-size: 16px;
  font-weight: 600;
  outline: none;
}

.action-buttons {
  display: flex;
  gap: 12px;
  margin: 24px 0;
  flex-wrap: wrap;
}

.btn-add-cart-lg {
  flex: 1;
  background: var(--primary);
  color: #fff;
  padding: 14px 24px;
  border-radius: var(--radius);
  font-size: 16px;
  font-weight: 700;
  min-width: 200px;
}

.btn-add-cart-lg:hover { background: var(--primary-dark); }

.btn-buy-now-lg {
  flex: 1;
  background: var(--secondary);
  color: #fff;
  padding: 14px 24px;
  border-radius: var(--radius);
  font-size: 16px;
  font-weight: 700;
  min-width: 200px;
}

.btn-buy-now-lg:hover { background: var(--secondary-light); }

.btn-whatsapp {
  background: #25d366;
  color: #fff;
  padding: 14px 24px;
  border-radius: var(--radius);
  font-size: 16px;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.btn-whatsapp:hover { background: #20ba5a; }

/* === Cart Page === */
.cart-page {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 24px;
  margin-bottom: 32px;
}

.cart-items {
  background: #fff;
  border-radius: var(--radius-lg);
  padding: 20px;
  box-shadow: var(--shadow);
}

.cart-item {
  display: grid;
  grid-template-columns: 80px 1fr auto;
  gap: 16px;
  padding: 16px 0;
  border-bottom: 1px solid var(--border);
  align-items: center;
}

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

.cart-item-image {
  width: 80px;
  height: 80px;
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--bg-hover);
}

.cart-item-image img { width: 100%; height: 100%; object-fit: cover; }

.cart-item-info h4 {
  font-size: 14px;
  font-weight: 600;
  margin-bottom: 4px;
}

.cart-item-info .price {
  color: var(--secondary);
  font-weight: 700;
  font-size: 15px;
  margin-top: 4px;
}

.cart-item-actions {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 8px;
}

.cart-qty {
  display: flex;
  align-items: center;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
}

.cart-qty button {
  width: 30px;
  height: 30px;
  background: var(--bg-hover);
  font-size: 14px;
  font-weight: 700;
}

.cart-qty input {
  width: 40px;
  height: 30px;
  border: none;
  text-align: center;
  outline: none;
  font-weight: 600;
}

.remove-btn {
  color: var(--danger);
  font-size: 13px;
  padding: 4px 8px;
}

.remove-btn:hover { text-decoration: underline; }

.cart-summary {
  background: #fff;
  border-radius: var(--radius-lg);
  padding: 20px;
  box-shadow: var(--shadow);
  height: fit-content;
  position: sticky;
  top: 100px;
}

.cart-summary h3 {
  font-size: 18px;
  margin-bottom: 16px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--border);
}

.summary-row {
  display: flex;
  justify-content: space-between;
  padding: 8px 0;
  font-size: 14px;
}

.summary-row.total {
  font-size: 20px;
  font-weight: 800;
  border-top: 2px solid var(--border);
  margin-top: 8px;
  padding-top: 12px;
  color: var(--secondary);
}

.coupon-input {
  display: flex;
  gap: 8px;
  margin: 16px 0;
}

.coupon-input input {
  flex: 1;
  padding: 10px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  font-size: 13px;
  outline: none;
}

.coupon-input button {
  padding: 10px 16px;
  background: var(--secondary);
  color: #fff;
  border-radius: var(--radius);
  font-size: 13px;
  font-weight: 600;
}

.checkout-btn {
  width: 100%;
  background: var(--primary);
  color: #fff;
  padding: 14px;
  border-radius: var(--radius);
  font-size: 16px;
  font-weight: 700;
  margin-top: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.checkout-btn:hover { background: var(--primary-dark); }

.whatsapp-checkout-btn {
  width: 100%;
  background: #25d366;
  color: #fff;
  padding: 14px;
  border-radius: var(--radius);
  font-size: 16px;
  font-weight: 700;
  margin-top: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.whatsapp-checkout-btn:hover { background: #20ba5a; }

/* === Filters Sidebar === */
.filters-sidebar {
  background: #fff;
  border-radius: var(--radius);
  padding: 16px;
  box-shadow: var(--shadow);
  margin-bottom: 16px;
}

.filters-sidebar h4 {
  font-size: 14px;
  margin-bottom: 12px;
  font-weight: 700;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--border);
}

.filter-group { margin-bottom: 16px; }
.filter-group label {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  padding: 4px 0;
  cursor: pointer;
}

.price-range input[type="range"] {
  width: 100%;
  margin: 8px 0;
}

.sort-select {
  padding: 8px 12px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  font-size: 13px;
  background: #fff;
  cursor: pointer;
  outline: none;
}

/* === Breadcrumb === */
.breadcrumb {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px 0;
  font-size: 13px;
  color: var(--text-light);
}

.breadcrumb a:hover { color: var(--primary); }
.breadcrumb .separator { color: var(--text-lighter); }
.breadcrumb .current { color: var(--text); font-weight: 600; }

/* === Footer === */
.site-footer {
  background: var(--secondary);
  color: #ddd;
  padding: 40px 0 0;
  margin-top: 40px;
}

.footer-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 32px;
  padding-bottom: 32px;
  border-bottom: 1px solid var(--secondary-light);
}

.footer-col h4 {
  color: #fff;
  font-size: 16px;
  margin-bottom: 16px;
  font-weight: 700;
}

.footer-col ul { list-style: none; }
.footer-col ul li { padding: 6px 0; font-size: 14px; }
.footer-col ul li a:hover { color: var(--primary); }
.footer-col p { font-size: 14px; line-height: 1.8; }

.social-links {
  display: flex;
  gap: 12px;
  margin-top: 12px;
}

.social-links a {
  width: 36px;
  height: 36px;
  background: var(--secondary-light);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  color: #fff;
}

.social-links a:hover { background: var(--primary); }

.footer-bottom {
  text-align: center;
  padding: 16px 0;
  font-size: 13px;
  color: #999;
}

/* === Toast Notifications === */
#toast-container {
  position: fixed;
  top: 80px;
  left: 16px;
  z-index: 9999;
  display: flex;
  flex-direction: column;
  gap: 8px;
  max-width: 320px;
}

.toast {
  background: #fff;
  border-right: 4px solid var(--primary);
  padding: 12px 16px;
  border-radius: var(--radius);
  box-shadow: var(--shadow-lg);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  font-size: 14px;
  opacity: 0;
  transform: translateX(-100%);
  transition: var(--transition);
}

.toast.show { opacity: 1; transform: translateX(0); }
.toast-success { border-right-color: var(--success); }
.toast-error { border-right-color: var(--danger); }
.toast-info { border-right-color: var(--accent); }

.toast-close {
  font-size: 20px;
  color: var(--text-light);
  width: 24px;
  height: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* === Modal === */
.modal {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.5);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  padding: 16px;
}

.modal.active { display: flex; }

.modal-content {
  background: #fff;
  border-radius: var(--radius-lg);
  padding: 24px;
  max-width: 500px;
  width: 100%;
  max-height: 90vh;
  overflow-y: auto;
  position: relative;
}

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

.modal-header h3 { font-size: 20px; font-weight: 700; }

.modal-close {
  font-size: 28px;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-light);
}

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

/* === Forms === */
.form-group { margin-bottom: 16px; }

.form-group label {
  display: block;
  margin-bottom: 6px;
  font-size: 14px;
  font-weight: 600;
  color: var(--text);
}

.form-group input,
.form-group textarea,
.form-group select {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  font-size: 14px;
  outline: none;
  transition: var(--transition);
  background: #fff;
  color: var(--text);
}

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

.form-group input.error { border-color: var(--danger); }

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.btn-primary {
  background: var(--primary);
  color: #fff;
  padding: 12px 24px;
  border-radius: var(--radius);
  font-weight: 600;
  font-size: 14px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.btn-primary:hover { background: var(--primary-dark); }

.btn-secondary {
  background: var(--secondary);
  color: #fff;
  padding: 12px 24px;
  border-radius: var(--radius);
  font-weight: 600;
  font-size: 14px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.btn-secondary:hover { background: var(--secondary-light); }

.btn-danger {
  background: var(--danger);
  color: #fff;
  padding: 12px 24px;
  border-radius: var(--radius);
  font-weight: 600;
  font-size: 14px;
}

.btn-danger:hover { background: #c0392b; }

/* === Responsive === */
@media (max-width: 992px) {
  .product-detail { grid-template-columns: 1fr; }
  .product-gallery { position: static; }
  .cart-page { grid-template-columns: 1fr; }
  .cart-summary { position: static; }
}

@media (max-width: 768px) {
  .header-main .container {
    flex-wrap: wrap;
    gap: 12px;
  }

  .search-bar {
    order: 3;
    width: 100%;
    flex-basis: 100%;
  }

  .search-bar select { display: none; }

  .slide-overlay {
    width: 100%;
    padding: 24px;
    background: linear-gradient(180deg, rgba(0,0,0,0.7) 0%, rgba(0,0,0,0.4) 100%);
  }

  .slide-title { font-size: 22px; }
  .slide-subtitle { font-size: 14px; }
  .slides { height: 280px; }

  .products-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
  }

  .product-info { padding: 8px; }
  .product-name { font-size: 13px; min-height: 36px; }
  .price-current { font-size: 15px; }

  .categories-grid { grid-template-columns: repeat(3, 1fr); gap: 10px; }
  .category-card { padding: 16px 8px; }
  .category-card .cat-icon { font-size: 32px; }

  .header-actions .action-btn span:not(.icon):not(.badge) { display: none; }
  .header-actions .action-btn { padding: 8px; }

  .cart-item { grid-template-columns: 60px 1fr; }
  .cart-item-image { width: 60px; height: 60px; }
  .cart-item-actions { grid-column: 1 / -1; flex-direction: row; justify-content: space-between; }

  .modal-content { padding: 16px; }

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

  .slider-arrow { width: 36px; height: 36px; font-size: 18px; }
}

@media (max-width: 480px) {
  .container { padding: 0 10px; }
  .logo { font-size: 18px; }
  .logo .logo-icon { font-size: 22px; }
  .products-grid { grid-template-columns: 1fr; }
  .action-buttons { flex-direction: column; }
  .btn-add-cart-lg, .btn-buy-now-lg { min-width: auto; }
}
