:root {
  --primary: #1a1a2e;
  --primary-light: #16213e;
  --secondary: #e94560;
  --accent: #0f3460;
  --gold: #f5c518;
  --success: #2ecc71;
  --warning: #f39c12;
  --danger: #e74c3c;
  --dark: #0d0d0d;
  --card: #1e1e36;
  --card-hover: #252545;
  --text: #e0e0e0;
  --text-muted: #999;
  --text-dark: #333;
  --border: rgba(255,255,255,0.08);
  --shadow: 0 8px 32px rgba(0,0,0,0.3);
  --shadow-sm: 0 4px 16px rgba(0,0,0,0.2);
  --radius: 12px;
  --radius-sm: 8px;
  --radius-lg: 20px;
  --transition: 0.3s cubic-bezier(0.4,0,0.2,1);
  --font-ar: 'Cairo', sans-serif;
  --font-en: 'Inter', sans-serif;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: var(--font-en);
  background: var(--primary);
  color: var(--text);
  line-height: 1.6;
  overflow-x: hidden;
  -webkit-tap-highlight-color: transparent;
}
[dir="rtl"] body { font-family: var(--font-ar); }

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

.container { max-width: 1280px; margin: 0 auto; padding: 0 20px; }

/* Preloader */
.preloader {
  position: fixed; inset: 0; z-index: 99999;
  background: var(--primary);
  display: flex; align-items: center; justify-content: center;
  transition: opacity 0.5s, visibility 0.5s;
}
.preloader.hidden { opacity: 0; visibility: hidden; }
.preloader-content { text-align: center; }
.preloader-logo {
  font-size: 2rem; font-weight: 800;
  background: linear-gradient(135deg, var(--secondary), #ff6b6b);
  -webkit-background-clip: text; -webkit-text-fill-color: transparent;
}
.preloader-logo span { color: var(--gold); -webkit-text-fill-color: var(--gold); }
.preloader-bar { width: 200px; height: 3px; background: var(--border); border-radius: 3px; margin: 20px auto 0; overflow: hidden; }
.preloader-fill { height: 100%; width: 0; background: linear-gradient(90deg, var(--secondary), var(--gold)); border-radius: 3px; animation: loadBar 1.5s ease forwards; }
@keyframes loadBar { to { width: 100%; } }

/* Header Top Bar */
.header-top {
  background: var(--dark);
  padding: 6px 0;
  font-size: 0.75rem;
}
.header-promo {
  display: flex; justify-content: center; gap: 30px;
  color: var(--text-muted);
}

/* Header Main */
.header-main {
  background: var(--primary-light);
  padding: 12px 0;
  position: sticky; top: 0; z-index: 100;
  transition: var(--transition);
}
.header-main.scrolled { box-shadow: var(--shadow); }
.header-main .container { display: flex; align-items: center; gap: 20px; }

.logo { flex-shrink: 0; }
.logo-text {
  font-size: 1.5rem; font-weight: 800;
  background: linear-gradient(135deg, var(--secondary), #ff6b6b);
  -webkit-background-clip: text; -webkit-text-fill-color: transparent;
}
.logo-text span { color: var(--gold); -webkit-text-fill-color: var(--gold); }

/* Search */
.search-bar {
  flex: 1; max-width: 500px; position: relative;
  display: flex; align-items: center;
}
.search-bar input {
  width: 100%; padding: 10px 16px;
  background: var(--card); border: 1px solid var(--border);
  border-radius: var(--radius); color: var(--text); font-size: 0.9rem;
  transition: var(--transition);
}
.search-bar input:focus { border-color: var(--secondary); }
.search-bar .search-btn {
  position: absolute; right: 8px; top: 50%; transform: translateY(-50%);
  padding: 6px 12px; border-radius: var(--radius-sm);
  background: var(--secondary); color: #fff; font-size: 0.85rem;
}
.search-results {
  position: absolute; top: 100%; left: 0; right: 0;
  background: var(--card); border: 1px solid var(--border);
  border-radius: var(--radius-sm); margin-top: 4px;
  max-height: 400px; overflow-y: auto; display: none; z-index: 200;
}
.search-results.show { display: block; }
.search-result-item {
  display: flex; align-items: center; gap: 12px;
  padding: 10px 16px; border-bottom: 1px solid var(--border);
  cursor: pointer; transition: var(--transition);
}
.search-result-item:hover { background: var(--card-hover); }
.search-result-item img { width: 40px; height: 40px; object-fit: cover; border-radius: 4px; background: #fff; }
.search-result-info h4 { font-size: 0.85rem; font-weight: 500; }
.search-result-info p { font-size: 0.8rem; color: var(--secondary); font-weight: 600; }

.header-actions { display: flex; align-items: center; gap: 12px; }
.header-action {
  padding: 8px; border-radius: 50%;
  transition: var(--transition); font-size: 1.1rem;
  position: relative;
}
.header-action:hover { background: var(--card); }
.badge {
  position: absolute; top: -2px; right: -2px;
  min-width: 18px; height: 18px; border-radius: 9px;
  background: var(--secondary); color: #fff;
  font-size: 0.65rem; font-weight: 700;
  display: flex; align-items: center; justify-content: center;
  padding: 0 4px;
}
.search-toggle { display: none; }

/* Header Nav */
.header-nav {
  background: var(--primary);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}
.nav-links { display: flex; list-style: none; gap: 0; }
.nav-links > li { position: relative; }
.nav-links > li > a {
  display: block; padding: 10px 20px;
  font-size: 0.85rem; font-weight: 500;
  transition: var(--transition);
  white-space: nowrap;
}
.nav-links > li > a:hover, .nav-links > li > a.active { color: var(--secondary); }
.nav-dropdown { position: relative; cursor: pointer; }

/* Mega Menu */
.mega-menu {
  position: absolute; top: 100%; left: 0;
  background: var(--card); border-radius: var(--radius-sm);
  border: 1px solid var(--border); box-shadow: var(--shadow);
  padding: 20px; min-width: 600px;
  display: none; z-index: 300;
}
.mega-menu.show { display: block; }
.mega-menu-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.mega-menu-item {
  display: flex; align-items: center; gap: 10px;
  padding: 8px 12px; border-radius: var(--radius-sm);
  transition: var(--transition);
}
.mega-menu-item:hover { background: var(--card-hover); }
.mega-menu-item .icon { font-size: 1.5rem; }
.mega-menu-item .info h4 { font-size: 0.85rem; font-weight: 500; }
.mega-menu-item .info p { font-size: 0.75rem; color: var(--text-muted); }

/* Bottom Nav */
.bottom-nav {
  display: none;
  position: fixed; bottom: 0; left: 0; right: 0;
  background: var(--primary-light); border-top: 1px solid var(--border);
  z-index: 999; padding: 4px 0 env(safe-area-inset-bottom, 4px) 0;
  justify-content: space-around;
}
.bottom-nav-item {
  display: flex; flex-direction: column; align-items: center;
  gap: 2px; padding: 6px 12px; font-size: 1.2rem;
  transition: var(--transition); position: relative;
  background: none; border: none; color: var(--text-muted); 
  font-family: inherit;
}
.bottom-nav-item span { font-size: 0.6rem; }
.bottom-nav-item.active { color: var(--secondary); }
.bottom-nav-item .cart-badge {
  position: absolute; top: 0; right: 4px;
}

/* Hero Slider */
.hero-slider {
  position: relative; overflow: hidden; height: 70vh; min-height: 400px; max-height: 600px;
}
.hero-slides { position: relative; width: 100%; height: 100%; }
.hero-slide {
  position: absolute; inset: 0; background-size: cover; background-position: center;
  opacity: 0; transition: opacity 0.8s ease; display: flex; align-items: center; justify-content: center;
}
.hero-slide.active { opacity: 1; }
.hero-overlay {
  position: absolute; inset: 0;
  background: linear-gradient(135deg, rgba(13,13,13,0.8) 0%, rgba(13,13,13,0.3) 100%);
}
.hero-content-center {
  position: relative; z-index: 2; text-align: center; max-width: 700px; padding: 0 20px;
}
.hero-content-center .hero-badge {
  display: inline-block; padding: 6px 20px;
  background: rgba(233,69,96,0.2); color: var(--secondary);
  border-radius: 20px; font-size: 0.85rem; font-weight: 600; margin-bottom: 16px;
  backdrop-filter: blur(4px);
}
.hero-content-center h1 {
  font-size: clamp(2rem, 5vw, 3.2rem); font-weight: 800;
  line-height: 1.15; margin-bottom: 12px; color: #fff;
}
.hero-content-center h1 span {
  background: linear-gradient(135deg, var(--secondary), var(--gold));
  -webkit-background-clip: text; -webkit-text-fill-color: transparent;
}
.hero-content-center p {
  font-size: 1.05rem; color: rgba(255,255,255,0.75);
  margin-bottom: 24px; line-height: 1.7;
}
.hero-actions { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; }
.hero-arrow {
  position: absolute; top: 50%; transform: translateY(-50%);
  width: 44px; height: 44px; border: none; border-radius: 50%;
  background: rgba(0,0,0,0.35); color: #fff; font-size: 1.4rem;
  cursor: pointer; z-index: 5; transition: all 0.3s;
  display: flex; align-items: center; justify-content: center;
  backdrop-filter: blur(4px);
}
.hero-arrow:hover { background: var(--secondary); }
.hero-arrow-prev { left: 16px; }
.hero-arrow-next { right: 16px; }
.hero-dots {
  position: absolute; bottom: 24px; left: 50%; transform: translateX(-50%);
  display: flex; gap: 8px; z-index: 5;
}
.hero-dot {
  width: 10px; height: 10px; border-radius: 50%; background: rgba(255,255,255,0.35);
  cursor: pointer; transition: all 0.3s;
}
.hero-dot.active { background: var(--secondary); width: 28px; border-radius: 5px; }

/* Trust Bar */
.trust-bar { padding: 20px 0; background: var(--primary-light); border-bottom: 1px solid var(--border); }
.trust-bar-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; }
.trust-bar .trust-item {
  display: flex; align-items: center; justify-content: center; gap: 8px;
}
.trust-bar .trust-icon { font-size: 1.4rem; }
.trust-bar .trust-item span:last-child { font-size: 0.8rem; color: var(--text-muted); }

/* Info Strip */
.info-strip {
  display: flex; align-items: center; justify-content: center; gap: 0;
  background: var(--card); border-radius: var(--radius); padding: 20px 16px;
  border: 1px solid var(--border);
}
.info-item { display: flex; align-items: center; gap: 12px; padding: 0 20px; }
.info-icon { font-size: 1.5rem; }
.info-item strong { display: block; font-size: 0.95rem; }
.info-item small { color: var(--text-muted); font-size: 0.75rem; }
.info-divider { width: 1px; height: 40px; background: var(--border); }

/* Sections */
.section { padding: 60px 0; }
.section-alt { background: var(--primary-light); }
.section-title {
  text-align: center; margin-bottom: 40px;
}
.section-title h2 {
  font-size: clamp(1.5rem, 3vw, 2rem); font-weight: 700;
  margin-bottom: 8px;
}
.section-title h2 span { color: var(--secondary); }
.section-title p { color: var(--text-muted); font-size: 0.95rem; }

/* Category Cards */
.cat-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
  gap: 16px;
}
.cat-card {
  display: flex; flex-direction: column; align-items: center;
  gap: 8px; padding: 20px 12px;
  background: var(--card); border-radius: var(--radius);
  border: 1px solid var(--border); cursor: pointer;
  transition: var(--transition); text-align: center;
}
.cat-card:hover { background: var(--card-hover); transform: translateY(-4px); box-shadow: var(--shadow-sm); }
.cat-card .icon { font-size: 2rem; }
.cat-card h4 { font-size: 0.85rem; font-weight: 500; }
.cat-card p { font-size: 0.7rem; color: var(--text-muted); }

/* Carousel Box */
.carousel-box {
  position: relative; overflow: hidden; border-radius: var(--radius);
  background: var(--card); border: 1px solid var(--border);
  min-height: 240px;
}
.carousel-track { display: flex; transition: transform 0.5s ease; }
.carousel-slide {
  min-width: 100%; display: flex; align-items: center; gap: 24px;
  padding: 40px; box-sizing: border-box;
}
.carousel-icon { font-size: 3.5rem; min-width: 70px; text-align: center; }
.carousel-slide-body { flex: 1; }
.carousel-slide-body h3 { font-size: 1.2rem; font-weight: 700; margin-bottom: 8px; }
.carousel-slide-body p { color: var(--text-muted); font-size: 0.85rem; margin-bottom: 12px; }
.carousel-footer { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; }
.carousel-price { font-size: 1.15rem; font-weight: 700; color: var(--gold); }
.carousel-arrow {
  position: absolute; top: 50%; transform: translateY(-50%);
  width: 38px; height: 38px; border: none; border-radius: 50%;
  background: rgba(0,0,0,0.45); color: #fff; font-size: 1.2rem;
  cursor: pointer; z-index: 2; transition: all 0.3s;
  display: flex; align-items: center; justify-content: center;
}
.carousel-arrow:hover { background: var(--secondary); }
.carousel-arrow-prev { left: 10px; }
.carousel-arrow-next { right: 10px; }

/* Menu Category Sections */
.menu-category-section {
  margin-bottom: 40px;
  padding: 24px;
  background: var(--card);
  border-radius: var(--radius);
  border: 1px solid var(--border);
}
.menu-category-section .product-grid {
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 12px;
}
.menu-category-header {
  display: flex; align-items: center; gap: 12px;
  margin-bottom: 20px; padding-bottom: 12px;
  border-bottom: 2px solid var(--secondary);
}
.menu-cat-icon { font-size: 1.8rem; }
.menu-category-header h3 {
  font-size: 1.2rem; font-weight: 700; color: var(--text);
  flex: 1;
}
.menu-cat-count {
  font-size: 0.75rem; color: var(--text-muted);
  background: var(--primary-light); padding: 4px 12px;
  border-radius: 20px;
}

/* Menu Item Card */
.menu-item .card-body { padding: 16px; }
.menu-item h3 { font-size: 1rem; font-weight: 600; margin-bottom: 6px; }
.menu-item .card-desc {
  font-size: 0.8rem; color: var(--text-muted);
  margin-bottom: 10px; line-height: 1.4;
}
.menu-item .card-price { margin-bottom: 12px; }
.menu-item .card-price .current {
  font-size: 1.1rem; font-weight: 700; color: var(--accent);
}
.menu-item .card-actions { display: flex; gap: 8px; }
.menu-item .btn-sm { padding: 8px 14px; font-size: 0.78rem; }
.menu-item .menu-detail-btn { background: transparent; color: var(--text-muted); border-color: var(--border); }

/* Product Cards */
.product-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 20px;
}
.product-card {
  background: var(--card); border-radius: var(--radius);
  border: 1px solid var(--border); overflow: hidden;
  transition: var(--transition); position: relative;
}
.product-card:hover { background: var(--card-hover); transform: translateY(-4px); box-shadow: var(--shadow); }

.product-card .badge-ribbon {
  position: absolute; top: 10px; left: 10px;
  padding: 3px 10px; border-radius: 4px;
  font-size: 0.7rem; font-weight: 700; z-index: 2;
  color: #fff;
}
.badge-ribbon.offer { background: var(--danger); }
.badge-ribbon.new { background: var(--success); }
.badge-ribbon.best { background: var(--gold); color: var(--dark); }
.badge-ribbon.featured { background: var(--secondary); }

.product-card .wishlist-icon {
  position: absolute; top: 10px; right: 10px;
  width: 32px; height: 32px; border-radius: 50%;
  background: rgba(0,0,0,0.5); display: flex;
  align-items: center; justify-content: center;
  font-size: 0.9rem; cursor: pointer; z-index: 2;
  transition: var(--transition); backdrop-filter: blur(4px);
}
.product-card .wishlist-icon.active { background: var(--secondary); }

.product-card .card-body { padding: 16px; }
.product-card .card-body h3 {
  font-size: 0.9rem; font-weight: 500;
  margin-bottom: 8px; display: -webkit-box;
  -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.product-card .card-rating {
  display: flex; align-items: center; gap: 4px;
  margin-bottom: 8px; font-size: 0.75rem;
}
.product-card .card-rating .stars { color: var(--gold); }
.product-card .card-rating .count { color: var(--text-muted); }
.product-card .card-price { display: flex; align-items: center; gap: 8px; margin-bottom: 8px; }
.product-card .card-price .current { font-size: 1.1rem; font-weight: 700; color: var(--secondary); }
.product-card .card-price .old { font-size: 0.8rem; color: var(--text-muted); text-decoration: line-through; }
.product-card .card-price .save {
  font-size: 0.7rem; padding: 2px 8px; border-radius: 4px;
  background: rgba(46,204,113,0.15); color: var(--success); font-weight: 600;
}
.product-card .card-stock {
  margin-bottom: 12px; font-size: 0.75rem;
}
.product-card .card-stock.in-stock { color: var(--success); }
.product-card .card-stock.low-stock { color: var(--warning); }
.product-card .card-stock.out-of-stock { color: var(--danger); }
.product-card .card-actions { display: flex; gap: 8px; }
.product-card .card-actions .btn { flex: 1; justify-content: center; font-size: 0.8rem; padding: 10px; }

/* Quick View */
.quick-view-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 30px; }
.quick-view-gallery { background: #fff; border-radius: var(--radius); padding: 20px; display: flex; align-items: center; justify-content: center; min-height: 300px; }
.quick-view-gallery img { max-height: 300px; object-fit: contain; }
.quick-view-info h2 { font-size: 1.3rem; margin-bottom: 12px; }
.qv-price { font-size: 1.5rem; font-weight: 700; color: var(--secondary); margin-bottom: 16px; }
.qv-old { font-size: 1rem; color: var(--text-muted); text-decoration: line-through; }
.qv-desc { color: var(--text-muted); line-height: 1.8; margin-bottom: 16px; font-size: 0.9rem; }

/* Product Detail Page */
.product-detail { padding: 30px 0 60px; }
.breadcrumbs {
  display: flex; gap: 8px; margin-bottom: 20px;
  font-size: 0.8rem; color: var(--text-muted);
}
.breadcrumbs a:hover { color: var(--secondary); }
.breadcrumbs .sep { color: var(--text-muted); }

.detail-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 40px; }
.detail-gallery { position: relative; }
.detail-main-image {
  background: #fff; border-radius: var(--radius); padding: 30px;
  display: flex; align-items: center; justify-content: center;
  min-height: 400px; margin-bottom: 12px;
}
.detail-main-image img { max-height: 350px; object-fit: contain; }
.detail-thumbs { display: flex; gap: 8px; overflow-x: auto; }
.detail-thumb {
  width: 70px; height: 70px; border-radius: var(--radius-sm);
  background: #fff; padding: 8px; cursor: pointer;
  border: 2px solid transparent; transition: var(--transition);
  flex-shrink: 0;
}
.detail-thumb.active { border-color: var(--secondary); }
.detail-thumb img { width: 100%; height: 100%; object-fit: contain; }

.detail-info { }
.detail-info h1 { font-size: 1.5rem; margin-bottom: 12px; }
.detail-rating { display: flex; align-items: center; gap: 8px; margin-bottom: 16px; }
.detail-rating .stars { color: var(--gold); font-size: 1.1rem; }
.detail-pricing { margin-bottom: 20px; }
.detail-pricing .price { font-size: 2rem; font-weight: 800; color: var(--secondary); }
.detail-pricing .old-price { font-size: 1.2rem; color: var(--text-muted); text-decoration: line-through; margin-left: 12px; }
.detail-pricing .save-badge {
  display: inline-block; padding: 4px 12px; border-radius: 6px;
  background: rgba(46,204,113,0.15); color: var(--success);
  font-size: 0.85rem; font-weight: 600; margin-left: 12px;
}
.detail-stock {
  display: inline-block; padding: 6px 16px; border-radius: 6px;
  font-size: 0.85rem; font-weight: 600; margin-bottom: 20px;
}
.detail-stock.in-stock { background: rgba(46,204,113,0.1); color: var(--success); }
.detail-stock.out-of-stock { background: rgba(231,76,60,0.1); color: var(--danger); }

.detail-desc { color: var(--text-muted); line-height: 1.8; margin-bottom: 20px; }

.detail-specs { margin-bottom: 24px; }
.detail-specs h3 { margin-bottom: 12px; font-size: 1rem; }
.specs-table { width: 100%; font-size: 0.85rem; }
.specs-table td { padding: 8px 12px; border-bottom: 1px solid var(--border); }
.specs-table td:first-child { color: var(--text-muted); font-weight: 500; width: 120px; }
.specs-table td:last-child { color: var(--text); }

.detail-actions { display: flex; gap: 12px; margin-bottom: 24px; flex-wrap: wrap; }
.detail-actions .btn { flex: 1; justify-content: center; min-width: 160px; padding: 14px 24px; font-size: 1rem; }
.qty-selector { display: flex; align-items: center; gap: 0; border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; }
.qty-selector button { padding: 10px 16px; background: var(--card); font-size: 1.1rem; transition: var(--transition); }
.qty-selector button:hover { background: var(--card-hover); }
.qty-selector input { width: 50px; text-align: center; background: var(--primary); border: none; color: var(--text); padding: 10px 0; font-size: 1rem; }

.detail-trust { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; }
.detail-trust-item { text-align: center; padding: 12px; background: var(--card); border-radius: var(--radius-sm); }
.detail-trust-item .icon { font-size: 1.5rem; margin-bottom: 4px; }
.detail-trust-item span { font-size: 0.75rem; color: var(--text-muted); }

.detail-shipping { margin-top: 20px; padding: 16px; background: var(--card); border-radius: var(--radius); }
.detail-shipping h4 { margin-bottom: 8px; }
.shipping-option { display: flex; align-items: center; gap: 10px; padding: 8px 0; border-bottom: 1px solid var(--border); font-size: 0.85rem; }
.shipping-option:last-child { border-bottom: none; }
.shipping-option .time { color: var(--success); font-weight: 600; }

/* Reviews */
.reviews-section { margin-top: 40px; }
.reviews-section h3 { margin-bottom: 20px; }
.review-card {
  padding: 16px; background: var(--card); border-radius: var(--radius);
  margin-bottom: 12px;
}
.review-card .review-header { display: flex; align-items: center; gap: 10px; margin-bottom: 8px; }
.review-card .review-avatar {
  width: 36px; height: 36px; border-radius: 50%;
  background: var(--secondary); display: flex;
  align-items: center; justify-content: center;
  font-weight: 700; font-size: 0.8rem;
}
.review-card .review-name { font-weight: 600; font-size: 0.9rem; }
.review-card .review-date { font-size: 0.75rem; color: var(--text-muted); }
.review-card .review-stars { color: var(--gold); font-size: 0.85rem; }
.review-card p { color: var(--text-muted); font-size: 0.85rem; }
.review-card .verified-badge {
  display: inline-block; padding: 2px 8px; border-radius: 4px;
  background: rgba(46,204,113,0.1); color: var(--success);
  font-size: 0.7rem; font-weight: 600;
}

/* Cart Sidebar */
.cart-overlay {
  position: fixed; inset: 0; background: rgba(0,0,0,0.6);
  z-index: 999; display: none; backdrop-filter: blur(4px);
}
.cart-overlay.show { display: block; }
.cart-sidebar {
  position: fixed; top: 0; right: -400px; bottom: 0;
  width: 400px; max-width: 100%; background: var(--primary-light);
  z-index: 1000; transition: var(--transition);
  display: flex; flex-direction: column;
  border-left: 1px solid var(--border);
}
[dir="rtl"] .cart-sidebar { right: auto; left: -400px; border-left: none; border-right: 1px solid var(--border); }
.cart-sidebar.open { right: 0; }
[dir="rtl"] .cart-sidebar.open { left: 0; }
.cart-header {
  display: flex; justify-content: space-between; align-items: center;
  padding: 20px; border-bottom: 1px solid var(--border);
}
.cart-header h3 { font-size: 1.1rem; }
.cart-close { font-size: 1.5rem; padding: 4px 8px; color: var(--text-muted); }
.cart-items { flex: 1; overflow-y: auto; padding: 16px; }
.cart-empty { text-align: center; color: var(--text-muted); padding: 40px 0; }
.cart-item {
  display: flex; gap: 12px; padding: 12px;
  background: var(--card); border-radius: var(--radius-sm);
  margin-bottom: 10px;
}
.cart-item-img { width: 60px; height: 60px; border-radius: 6px; background: #fff; display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.cart-item-img img { max-width: 80%; max-height: 80%; object-fit: contain; }
.cart-item-info { flex: 1; }
.cart-item-info h4 { font-size: 0.85rem; font-weight: 500; margin-bottom: 4px; }
.cart-item-info .item-price { font-size: 0.9rem; color: var(--secondary); font-weight: 600; }
.cart-item-qty { display: flex; align-items: center; gap: 8px; margin-top: 4px; }
.cart-item-qty button {
  width: 24px; height: 24px; border-radius: 4px;
  background: var(--primary); display: flex;
  align-items: center; justify-content: center;
  font-size: 0.9rem; transition: var(--transition);
}
.cart-item-qty button:hover { background: var(--secondary); color: #fff; }
.cart-item-qty span { font-size: 0.85rem; min-width: 20px; text-align: center; }
.cart-item-remove { color: var(--danger); font-size: 1.1rem; cursor: pointer; padding: 4px; }
.cart-footer {
  padding: 20px; border-top: 1px solid var(--border);
}
.cart-total { display: flex; justify-content: space-between; font-size: 1.1rem; font-weight: 600; margin-bottom: 12px; }
.cart-total-amount { color: var(--secondary); }

/* Checkout Modal */
.modal-overlay {
  position: fixed; inset: 0; background: rgba(0,0,0,0.7);
  z-index: 1001; display: none; backdrop-filter: blur(8px);
}
.modal-overlay.show { display: block; }
.modal {
  position: fixed; top: 50%; left: 50%; transform: translate(-50%,-50%);
  background: var(--primary-light); border-radius: var(--radius-lg);
  z-index: 1002; width: 500px; max-width: 95vw; max-height: 90vh;
  overflow-y: auto; display: none; padding: 30px;
}
.modal.show { display: block; }
.modal-close {
  position: absolute; top: 16px; right: 16px;
  font-size: 1.5rem; color: var(--text-muted);
}
.modal h2 { font-size: 1.3rem; margin-bottom: 20px; }

/* Checkout Form */
.checkout-progress {
  display: flex; justify-content: center; gap: 0;
  margin-bottom: 30px;
}
.progress-step {
  display: flex; align-items: center; gap: 8px;
  padding: 8px 20px; font-size: 0.85rem;
  color: var(--text-muted);
}
.progress-step.active { color: var(--secondary); }
.progress-step.done { color: var(--success); }
.progress-step .num {
  width: 28px; height: 28px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  border: 2px solid var(--text-muted); font-weight: 700; font-size: 0.8rem;
}
.progress-step.active .num { border-color: var(--secondary); background: var(--secondary); color: #fff; }
.progress-step.done .num { border-color: var(--success); background: var(--success); color: #fff; }

.form-group { margin-bottom: 16px; }
.form-group label { display: block; font-size: 0.85rem; font-weight: 500; margin-bottom: 6px; color: var(--text-muted); }
.form-group input, .form-group textarea, .form-group select {
  width: 100%; padding: 12px 16px;
  background: var(--card); border: 1px solid var(--border);
  border-radius: var(--radius-sm); color: var(--text);
  font-size: 0.9rem;
}
.form-group input:focus, .form-group textarea:focus { border-color: var(--secondary); }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.form-group textarea { resize: vertical; min-height: 80px; }

.payment-options { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-bottom: 20px; }
.payment-option {
  padding: 16px; background: var(--card); border-radius: var(--radius-sm);
  border: 2px solid var(--border); cursor: pointer; text-align: center;
  transition: var(--transition);
}
.payment-option:hover, .payment-option.selected { border-color: var(--secondary); }
.payment-option .icon { font-size: 1.5rem; margin-bottom: 4px; }
.payment-option span { font-size: 0.85rem; display: block; font-weight: 500; }

.order-summary-box {
  background: var(--card); border-radius: var(--radius);
  padding: 16px; margin-bottom: 20px;
}
.summary-item { display: flex; justify-content: space-between; padding: 8px 0; font-size: 0.85rem; }
.summary-item .label { color: var(--text-muted); }
.summary-total { display: flex; justify-content: space-between; padding-top: 12px; border-top: 1px solid var(--border); font-size: 1.1rem; font-weight: 700; }
.summary-total .amount { color: var(--secondary); }

/* Trust Section */
/* Reviews on Home */
.reviews-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 16px;
}
.review-card.large { padding: 24px; }
.review-card.large .review-text { font-size: 0.95rem; font-style: italic; color: var(--text); margin-bottom: 12px; line-height: 1.8; }

/* Features */
.features-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  gap: 20px;
}
.feature-card {
  padding: 30px 24px; background: var(--card);
  border-radius: var(--radius); border: 1px solid var(--border);
  text-align: center; transition: var(--transition);
}
.feature-card:hover { background: var(--card-hover); transform: translateY(-4px); }
.feature-card .icon { font-size: 2.5rem; margin-bottom: 16px; }
.feature-card h3 { margin-bottom: 8px; font-size: 1rem; }
.feature-card p { color: var(--text-muted); font-size: 0.85rem; }

/* CTA Section */
.cta-section {
  padding: 50px 0; text-align: center;
  background: linear-gradient(135deg, var(--secondary), #d63850);
}
.cta-section h2 { font-size: 1.5rem; margin-bottom: 8px; color: #fff; }
.cta-section p { margin-bottom: 20px; opacity: 0.9; color: rgba(255,255,255,0.85); }
.cta-buttons { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; }
.cta-buttons .btn-outline { border-color: rgba(255,255,255,0.3); color: #fff; }
.cta-buttons .btn-outline:hover { border-color: #fff; color: #fff; }

/* Footer */
.footer {
  background: var(--dark); padding: 40px 0 100px;
  border-top: 1px solid var(--border);
}
.footer-grid { display: grid; grid-template-columns: 2fr 1fr 1fr 1fr; gap: 30px; }
.footer-brand p { color: var(--text-muted); font-size: 0.85rem; margin: 12px 0; }
.social-links { display: flex; gap: 8px; }
.social-links a {
  width: 36px; height: 36px; border-radius: 50%;
  background: var(--card); display: flex;
  align-items: center; justify-content: center;
  transition: var(--transition); font-size: 1rem;
}
.social-links a:hover { background: var(--secondary); }
.footer-col h4 { font-size: 0.9rem; margin-bottom: 16px; }
.footer-col a, .footer-col p {
  display: block; color: var(--text-muted);
  font-size: 0.8rem; margin-bottom: 8px;
  transition: var(--transition);
}
.footer-col a:hover { color: var(--secondary); }
.footer-bottom {
  text-align: center; padding-top: 30px;
  margin-top: 30px; border-top: 1px solid var(--border);
  color: var(--text-muted); font-size: 0.8rem;
}

/* AI Chat */
.ai-fab {
  position: fixed; bottom: 80px; right: 20px;
  width: 56px; height: 56px; border-radius: 50%;
  background: var(--secondary); color: #fff;
  font-size: 1.5rem; box-shadow: var(--shadow);
  z-index: 998; transition: var(--transition);
  display: flex; align-items: center; justify-content: center;
}
.ai-fab:hover { transform: scale(1.1); }
.ai-chat {
  position: fixed; bottom: 140px; right: 20px;
  width: 350px; max-width: calc(100vw - 40px);
  background: var(--primary-light); border-radius: var(--radius-lg);
  border: 1px solid var(--border); box-shadow: var(--shadow);
  z-index: 998; overflow: hidden;
}
.ai-chat-header {
  padding: 16px; background: var(--secondary);
  display: flex; justify-content: space-between; font-weight: 600;
}
.ai-chat-messages {
  height: 300px; overflow-y: auto; padding: 16px;
}
.ai-message {
  padding: 10px 14px; border-radius: var(--radius);
  margin-bottom: 8px; font-size: 0.85rem;
  max-width: 85%;
}
.ai-bot {
  background: var(--card); margin-right: auto;
}
.ai-user {
  background: var(--secondary); color: #fff;
  margin-left: auto;
}
.ai-chat-input {
  display: flex; padding: 12px; border-top: 1px solid var(--border);
  gap: 8px;
}
.ai-chat-input input {
  flex: 1; padding: 10px 14px; background: var(--card);
  border: 1px solid var(--border); border-radius: var(--radius-sm);
  color: var(--text);
}
.ai-chat-input button {
  width: 40px; height: 40px; border-radius: 50%;
  background: var(--secondary); color: #fff;
  display: flex; align-items: center; justify-content: center;
}

/* Toast */
.toast {
  position: fixed; bottom: 120px; left: 50%; transform: translateX(-50%);
  padding: 12px 24px; background: var(--success); color: #fff;
  border-radius: var(--radius); font-size: 0.85rem; font-weight: 600;
  z-index: 9999; opacity: 0; transition: var(--transition);
  pointer-events: none;
}
.toast.show { opacity: 1; }
.toast.error { background: var(--danger); }

/* Scroll Top */
.scroll-top {
  position: fixed; bottom: 80px; right: 84px;
  width: 40px; height: 40px; border-radius: 50%;
  background: var(--card); color: var(--text-muted);
  font-size: 1.2rem; box-shadow: var(--shadow-sm);
  z-index: 99; display: none; transition: var(--transition);
}
.scroll-top.show { display: flex; align-items: center; justify-content: center; }
.scroll-top:hover { background: var(--secondary); color: #fff; }

/* Loader */
.loader { display: flex; justify-content: center; padding: 60px 0; }
.spinner {
  width: 40px; height: 40px; border: 3px solid var(--border);
  border-top-color: var(--secondary); border-radius: 50%;
  animation: spin 0.8s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* Product Page within main */
.product-page { padding: 30px 0 60px; }
.category-page { padding: 30px 0 60px; }

/* Category Filters */
.category-layout { display: grid; grid-template-columns: 240px 1fr; gap: 30px; }
.filter-sidebar { }
.filter-sidebar h3 { margin-bottom: 16px; font-size: 1rem; }
.filter-group { margin-bottom: 20px; }
.filter-group h4 { font-size: 0.85rem; color: var(--text-muted); margin-bottom: 8px; }
.filter-group label { display: block; padding: 6px 0; font-size: 0.85rem; cursor: pointer; transition: var(--transition); }
.filter-group label:hover, .filter-group label.active { color: var(--secondary); }
.filter-group input[type="checkbox"] { margin-right: 8px; }
.price-range { display: flex; gap: 8px; align-items: center; }
.price-range input { width: 80px; padding: 6px 8px; background: var(--card); border: 1px solid var(--border); border-radius: 4px; color: var(--text); font-size: 0.8rem; }
.price-range button { padding: 6px 12px; background: var(--secondary); color: #fff; border-radius: 4px; font-size: 0.8rem; }

.sort-bar {
  display: flex; justify-content: space-between; align-items: center;
  margin-bottom: 20px; padding-bottom: 16px; border-bottom: 1px solid var(--border);
}
.sort-bar .result-count { font-size: 0.85rem; color: var(--text-muted); }
.sort-bar select { padding: 8px 12px; background: var(--card); border: 1px solid var(--border); border-radius: var(--radius-sm); color: var(--text); font-size: 0.85rem; }

/* Empty State */
.empty-state { text-align: center; padding: 60px 0; }
.empty-state .icon { font-size: 4rem; margin-bottom: 16px; }
.empty-state h3 { margin-bottom: 8px; }

/* Pagination */
.pagination { display: flex; justify-content: center; gap: 8px; margin-top: 30px; }
.pagination button {
  padding: 8px 16px; background: var(--card); border-radius: var(--radius-sm);
  font-size: 0.85rem; transition: var(--transition);
}
.pagination button:hover, .pagination button.active { background: var(--secondary); color: #fff; }
.pagination button:disabled { opacity: 0.4; cursor: default; }

/* Responsive */
@media (max-width: 1024px) {
  .hero-slider { height: 60vh; min-height: 380px; }
  .hero-text { padding: 40px 0; }
  .hero-trust { grid-template-columns: repeat(2, 1fr); }
  .detail-grid { grid-template-columns: 1fr; }
  .category-layout { grid-template-columns: 1fr; }
  .filter-sidebar { display: none; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .product-grid { grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); }
}

@media (max-width: 768px) {
  .header-main .container { gap: 10px; }
  .search-bar { display: none; }
  .search-bar.mobile-show { display: flex; position: absolute; top: 100%; left: 0; right: 0; padding: 12px; background: var(--primary-light); z-index: 200; max-width: none; }
  .search-toggle { display: block; }
  .header-nav { display: none; }
  .header-nav.mobile-show { display: block; position: absolute; top: 100%; left: 0; right: 0; background: var(--primary-light); z-index: 200; border: none; }
  .header-nav.mobile-show .nav-links { flex-direction: column; }
  .header-nav.mobile-show .mega-menu { position: static; min-width: auto; box-shadow: none; }
  .mobile-menu-btn { display: block; }
  .bottom-nav { display: flex; }
  .hero-slider { height: 50vh; min-height: 300px; }
  .hero-content-center { padding: 0 16px; }
  .hero-arrow { width: 36px; height: 36px; font-size: 1.1rem; }
  .hero-arrow-prev { left: 8px; }
  .hero-arrow-next { right: 8px; }
  .trust-bar-grid { grid-template-columns: repeat(2, 1fr); }
  .info-strip { flex-direction: column; gap: 12px; padding: 16px; }
  .info-divider { display: none; }
  .info-item { padding: 0; }
  .cat-grid { grid-template-columns: repeat(auto-fill, minmax(100px, 1fr)); gap: 10px; }
  .product-grid { grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 12px; }
  .menu-category-section { padding: 16px; margin-bottom: 24px; }
  .menu-category-section .product-grid { grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 10px; }
  .menu-category-header h3 { font-size: 1rem; }
  .menu-item .card-body { padding: 12px; }
  .menu-item .card-actions { flex-direction: column; }
  .product-card .card-icon { font-size: 2.2rem; padding: 16px 0 4px; }
  .detail-pricing .price { font-size: 1.5rem; }
  .detail-actions { flex-direction: column; }
  .detail-actions .btn { min-width: auto; }
  .detail-trust { grid-template-columns: repeat(2, 1fr); }
  .reviews-grid { grid-template-columns: 1fr; }
  .features-grid { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr; }
  .form-row { grid-template-columns: 1fr; }
  .quick-view-grid { grid-template-columns: 1fr; }
  .modal { padding: 20px; }
  .carousel-slide { flex-direction: column; text-align: center; padding: 32px 20px; gap: 12px; }
  .carousel-footer { justify-content: center; }
}
@media (max-width: 480px) {
  .product-grid { grid-template-columns: repeat(2, 1fr); gap: 8px; }
  .menu-category-section .product-grid { grid-template-columns: repeat(2, 1fr); gap: 8px; }
  .menu-category-section { padding: 12px; margin-bottom: 16px; }
  .menu-category-header { flex-wrap: wrap; gap: 6px; }
  .menu-cat-icon { font-size: 1.3rem; }
  .menu-category-header h3 { font-size: 0.85rem; }
  .menu-cat-count { font-size: 0.65rem; padding: 2px 8px; }
  .menu-item h3 { font-size: 0.85rem; }
  .menu-item .card-desc { font-size: 0.7rem; }
  .menu-item .card-price .current { font-size: 0.95rem; }
  .menu-item .btn-sm { padding: 6px 10px; font-size: 0.7rem; }
  .product-card .card-icon { font-size: 1.8rem; padding: 12px 0 4px; }
  .cat-grid { grid-template-columns: repeat(auto-fill, minmax(90px, 1fr)); }
  .cat-card { padding: 12px 8px; }
  .cat-card .icon { font-size: 1.5rem; }
  .cat-card h4 { font-size: 0.75rem; }
  .hero-slider { height: 40vh; min-height: 260px; }
  .hero-dots { bottom: 14px; }
  .hero-dot { width: 8px; height: 8px; }
  .hero-dot.active { width: 20px; }
  .carousel-slide { padding: 24px 16px; }
  .carousel-icon { font-size: 2.5rem; min-width: 50px; }
  .carousel-arrow { width: 32px; height: 32px; font-size: 1rem; }
}
