/* =====================================================
   متجر إلكتروني احترافي - CSS الرئيسي
   ===================================================== */

:root {
  --primary: #1a1a1a;
  --primary-light: #2a2a2a;
  --secondary: #d4af37;
  --secondary-light: #e8c65c;
  --bg: #ffffff;
  --bg-soft: #f8f8f8;
  --bg-card: #ffffff;
  --text: #1a1a1a;
  --text-soft: #6b6b6b;
  --text-light: #9b9b9b;
  --border: #e5e5e5;
  --border-soft: #f0f0f0;
  --success: #10b981;
  --danger: #ef4444;
  --warning: #f59e0b;
  --info: #3b82f6;
  --shadow-sm: 0 1px 3px rgba(0,0,0,0.04);
  --shadow: 0 4px 16px rgba(0,0,0,0.06);
  --shadow-lg: 0 8px 32px rgba(0,0,0,0.08);
  --shadow-xl: 0 16px 48px rgba(0,0,0,0.12);
  --radius-sm: 8px;
  --radius: 12px;
  --radius-lg: 16px;
  --radius-xl: 24px;
  --header-h: 64px;
  --bottombar-h: 64px;
  --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  --font: 'Cairo', -apple-system, BlinkMacSystemFont, sans-serif;
}

[data-theme="dark"] {
  --primary: #f5f5f5;
  --primary-light: #e0e0e0;
  --bg: #0a0a0a;
  --bg-soft: #141414;
  --bg-card: #1a1a1a;
  --text: #f5f5f5;
  --text-soft: #b5b5b5;
  --text-light: #8a8a8a;
  --border: #2a2a2a;
  --border-soft: #1f1f1f;
}

* { margin: 0; padding: 0; box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html { scroll-behavior: smooth; overflow-x: hidden; }
body {
  font-family: var(--font);
  font-size: 15px;
  line-height: 1.6;
  color: var(--text);
  background: var(--bg);
  direction: rtl;
  overflow-x: hidden;
  min-height: 100vh;
  transition: background 0.3s, color 0.3s;
}
img { max-width: 100%; height: auto; display: block; }
a { color: inherit; text-decoration: none; transition: var(--transition); }
button { font-family: inherit; cursor: pointer; border: none; background: none; color: inherit; }
input, textarea, select { font-family: inherit; font-size: inherit; }

.container { width: 100%; max-width: 1280px; margin: 0 auto; padding: 0 16px; }

/* ============== الهيدر ============== */
.site-header {
  position: sticky; top: 0; z-index: 100;
  border-bottom: 1px solid var(--border-soft);
  height: var(--header-h);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  background: rgba(255,255,255,0.92);
}
[data-theme="dark"] .site-header { background: rgba(10,10,10,0.92); }

.header-inner { display: flex; align-items: center; justify-content: space-between; gap: 16px; height: 100%; }
.brand { display: flex; align-items: center; gap: 10px; font-weight: 800; font-size: 20px; color: var(--text); letter-spacing: -0.5px; }
.brand img { height: 38px; width: auto; }
.brand-icon {
  width: 36px; height: 36px;
  background: linear-gradient(135deg, var(--primary), var(--primary-light));
  color: var(--bg);
  display: flex; align-items: center; justify-content: center;
  border-radius: var(--radius-sm);
}
.brand-icon .material-symbols-rounded { font-size: 20px; }

.nav-main { display: flex; align-items: center; gap: 24px; }
.nav-main a { color: var(--text-soft); font-weight: 500; font-size: 14px; position: relative; padding: 8px 0; }
.nav-main a:hover, .nav-main a.active { color: var(--text); }
.nav-main a.active::after { content: ''; position: absolute; bottom: 0; right: 0; left: 0; height: 2px; background: var(--secondary); border-radius: 2px; }

.header-actions { display: flex; align-items: center; gap: 4px; }

.icon-btn {
  width: 40px; height: 40px;
  display: flex; align-items: center; justify-content: center;
  border-radius: var(--radius-sm);
  color: var(--text);
  position: relative;
  transition: var(--transition);
}
.icon-btn:hover { background: var(--bg-soft); }
.icon-btn .badge {
  position: absolute; top: 2px; left: 2px;
  background: var(--danger); color: #fff;
  font-size: 10px; font-weight: 700;
  min-width: 18px; height: 18px;
  border-radius: 9px;
  display: flex; align-items: center; justify-content: center;
  padding: 0 5px;
  border: 2px solid var(--bg);
}

.menu-toggle { display: none; }

/* ============== المنيو الجانبي ============== */
.side-menu {
  position: fixed; top: 0; right: -320px;
  width: 300px; max-width: 85vw; height: 100vh;
  background: var(--bg); z-index: 200;
  transition: right 0.35s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: var(--shadow-xl);
  display: flex; flex-direction: column;
}
.side-menu.open { right: 0; }
.side-menu-header { display: flex; align-items: center; justify-content: space-between; padding: 20px; border-bottom: 1px solid var(--border-soft); }
.side-menu-body { flex: 1; overflow-y: auto; padding: 12px 0; }
.side-menu-body a {
  display: flex; align-items: center; gap: 12px;
  padding: 14px 20px;
  color: var(--text); font-weight: 500;
  border-right: 3px solid transparent;
  transition: var(--transition);
}
.side-menu-body a:hover, .side-menu-body a.active { background: var(--bg-soft); border-right-color: var(--secondary); }
.side-menu-body a .material-symbols-rounded { font-size: 20px; color: var(--text-soft); }

.menu-overlay {
  position: fixed; inset: 0;
  background: rgba(0,0,0,0.5); z-index: 199;
  opacity: 0; visibility: hidden;
  transition: opacity 0.3s ease;
  backdrop-filter: blur(4px);
}
.menu-overlay.open { opacity: 1; visibility: visible; }

/* ============== البحث ============== */
.search-bar { position: relative; flex: 1; max-width: 360px; }
.search-bar input {
  width: 100%; height: 42px;
  padding: 0 42px 0 16px;
  background: var(--bg-soft);
  border: 1px solid transparent;
  border-radius: var(--radius);
  color: var(--text); font-size: 14px;
  transition: var(--transition);
}
.search-bar input:focus { outline: none; background: var(--bg); border-color: var(--border); box-shadow: var(--shadow-sm); }
.search-bar .search-icon { position: absolute; top: 50%; right: 14px; transform: translateY(-50%); color: var(--text-light); pointer-events: none; }

/* ============== Hero ============== */
.hero {
  position: relative;
  margin: 24px 0;
  border-radius: var(--radius-xl);
  overflow: hidden;
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-light) 100%);
  color: #fff;
  min-height: 360px;
  display: flex; align-items: center;
}
.hero::before { content: ''; position: absolute; inset: 0; background: radial-gradient(circle at 20% 50%, rgba(212,175,55,0.15) 0%, transparent 50%); }
.hero-content { position: relative; padding: 60px 48px; max-width: 600px; z-index: 2; }
.hero h1 { font-size: clamp(28px, 5vw, 44px); font-weight: 800; margin-bottom: 16px; line-height: 1.2; letter-spacing: -1px; }
.hero p { font-size: clamp(15px, 2vw, 17px); opacity: 0.85; margin-bottom: 28px; max-width: 480px; }
.hero .badge-new {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 6px 14px;
  background: rgba(212,175,55,0.2); color: var(--secondary-light);
  border-radius: 100px;
  font-size: 13px; font-weight: 600;
  margin-bottom: 16px;
  border: 1px solid rgba(212,175,55,0.3);
}

/* ============== Buttons ============== */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  gap: 8px;
  padding: 12px 24px;
  border-radius: var(--radius);
  font-size: 14px; font-weight: 600;
  transition: var(--transition);
  cursor: pointer; border: 1px solid transparent;
  text-align: center; white-space: nowrap;
  min-height: 44px;
}
.btn-primary { background: var(--primary); color: var(--bg); }
.btn-primary:hover { background: var(--primary-light); transform: translateY(-2px); box-shadow: var(--shadow-lg); }
.btn-secondary { background: var(--secondary); color: #1a1a1a; }
.btn-secondary:hover { background: var(--secondary-light); transform: translateY(-2px); }
.btn-outline { background: transparent; border-color: var(--border); color: var(--text); }
.btn-outline:hover { background: var(--bg-soft); border-color: var(--text); }
.btn-whatsapp { background: #25D366; color: #fff; }
.btn-whatsapp:hover { background: #1eb955; transform: translateY(-2px); }
.btn-danger { background: var(--danger); color: #fff; }
.btn-danger:hover { background: #dc2626; }
.btn-lg { padding: 14px 32px; font-size: 15px; min-height: 52px; }
.btn-sm { padding: 8px 16px; font-size: 13px; min-height: 36px; }
.btn-block { width: 100%; }
.btn:disabled { opacity: 0.6; cursor: not-allowed; }

/* ============== Sections ============== */
.section { padding: 48px 0; }
.section-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 28px; gap: 16px; flex-wrap: wrap; }
.section-title { font-size: clamp(20px, 3vw, 28px); font-weight: 800; letter-spacing: -0.5px; }
.section-title small { display: block; font-size: 13px; font-weight: 500; color: var(--text-soft); margin-top: 4px; }
.section-link { color: var(--secondary); font-weight: 600; font-size: 14px; display: inline-flex; align-items: center; gap: 4px; }
.section-link:hover { color: var(--secondary-light); gap: 8px; }

/* ============== Products Grid ============== */
.products-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 20px; }
.product-card {
  background: var(--bg-card);
  border-radius: var(--radius-lg);
  overflow: hidden;
  transition: var(--transition);
  border: 1px solid var(--border-soft);
  position: relative;
}
.product-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); border-color: var(--border); }

.product-img { position: relative; aspect-ratio: 1; overflow: hidden; background: var(--bg-soft); display: block; }
.product-img img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.5s ease; }
.product-card:hover .product-img img { transform: scale(1.05); }
.product-img-placeholder {
  position: absolute; inset: 0;
  display: flex; align-items: center; justify-content: center;
  background: linear-gradient(135deg, var(--bg-soft), var(--border-soft));
  color: var(--text-light); font-size: 40px;
}

.product-badges { position: absolute; top: 12px; right: 12px; display: flex; flex-direction: column; gap: 6px; z-index: 2; }
.badge { padding: 4px 10px; border-radius: 100px; font-size: 11px; font-weight: 700; letter-spacing: 0.3px; display: inline-block; }
.badge-sale { background: var(--danger); color: #fff; }
.badge-new-product { background: var(--success); color: #fff; }
.badge-hot { background: linear-gradient(135deg, #f59e0b, #ef4444); color: #fff; }
.badge-out { background: var(--text-soft); color: #fff; }

.product-fav {
  position: absolute; top: 12px; left: 12px;
  width: 36px; height: 36px;
  background: rgba(255,255,255,0.95);
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  z-index: 2; transition: var(--transition);
  cursor: pointer; color: var(--text-soft);
  border: none;
}
.product-fav:hover { transform: scale(1.1); }
.product-fav.active { color: var(--danger); }
.product-fav.active .material-symbols-rounded { font-variation-settings: 'FILL' 1; }

.product-info { padding: 14px; }
.product-category { font-size: 11px; color: var(--text-light); text-transform: uppercase; letter-spacing: 0.5px; margin-bottom: 4px; font-weight: 600; }
.product-name {
  font-size: 14px; font-weight: 600;
  margin-bottom: 8px; line-height: 1.4;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical;
  overflow: hidden; min-height: 40px;
  color: var(--text);
}
.product-price { display: flex; align-items: baseline; gap: 8px; flex-wrap: wrap; margin-bottom: 12px; }
.price-current { font-size: 16px; font-weight: 800; color: var(--text); }
.price-old { font-size: 13px; color: var(--text-light); text-decoration: line-through; }
.price-discount { font-size: 11px; font-weight: 700; background: rgba(239,68,68,0.1); color: var(--danger); padding: 2px 8px; border-radius: 4px; }
.product-actions { display: flex; gap: 8px; }
.product-actions .btn { flex: 1; padding: 10px; font-size: 12px; min-height: 38px; }

/* ============== Categories ============== */
.categories-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 16px; }
.category-card {
  background: var(--bg-card);
  border: 1px solid var(--border-soft);
  border-radius: var(--radius-lg);
  padding: 24px 16px;
  text-align: center;
  transition: var(--transition);
  cursor: pointer;
  display: block;
}
.category-card:hover { transform: translateY(-4px); box-shadow: var(--shadow); border-color: var(--secondary); }
.category-card .cat-icon {
  width: 60px; height: 60px;
  margin: 0 auto 12px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--bg-soft), var(--border-soft));
  display: flex; align-items: center; justify-content: center;
  color: var(--text);
}
.category-card .cat-icon .material-symbols-rounded { font-size: 28px; }
.category-card:hover .cat-icon { background: linear-gradient(135deg, var(--secondary), var(--secondary-light)); color: #fff; }
.category-card h3 { font-size: 14px; font-weight: 700; margin: 0; color: var(--text); }
.category-card small { display: block; font-size: 11px; color: var(--text-light); margin-top: 2px; }

/* ============== Reviews ============== */
.reviews-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 20px; }
.review-card {
  background: var(--bg-card);
  border: 1px solid var(--border-soft);
  border-radius: var(--radius-lg);
  padding: 24px;
  position: relative;
}
.review-card::before {
  content: '"';
  position: absolute; top: 16px; left: 20px;
  font-size: 60px; color: var(--secondary);
  opacity: 0.2; font-family: serif; line-height: 1;
}
.review-header { display: flex; align-items: center; gap: 12px; margin-bottom: 12px; }
.review-avatar {
  width: 48px; height: 48px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--secondary), var(--secondary-light));
  color: #fff;
  display: flex; align-items: center; justify-content: center;
  font-weight: 700; font-size: 18px;
}
.review-name { font-weight: 700; font-size: 15px; }
.review-stars { color: #fbbf24; font-size: 13px; display: flex; gap: 2px; }
.review-stars .material-symbols-rounded { font-size: 16px; font-variation-settings: 'FILL' 1; }
.review-text { color: var(--text-soft); font-size: 14px; line-height: 1.7; }

/* ============== Footer ============== */
.site-footer { background: var(--primary); color: rgba(255,255,255,0.85); padding: 60px 0 0; margin-top: 60px; }
[data-theme="dark"] .site-footer { background: #050505; }
.footer-grid { display: grid; grid-template-columns: 1.5fr 1fr 1fr 1fr; gap: 40px; margin-bottom: 40px; }
.footer-col h4 { color: #fff; font-size: 16px; font-weight: 700; margin-bottom: 16px; }
.footer-col p, .footer-col li { font-size: 14px; line-height: 1.9; color: rgba(255,255,255,0.65); }
.footer-col ul { list-style: none; }
.footer-col li a:hover { color: var(--secondary); }
.footer-social { display: flex; gap: 10px; margin-top: 16px; }
.footer-social a {
  width: 40px; height: 40px;
  border-radius: 50%;
  background: rgba(255,255,255,0.08);
  display: flex; align-items: center; justify-content: center;
  color: #fff;
  transition: var(--transition);
}
.footer-social a:hover { background: var(--secondary); color: #1a1a1a; transform: translateY(-3px); }
.footer-bottom { border-top: 1px solid rgba(255,255,255,0.08); padding: 24px 0; text-align: center; font-size: 13px; color: rgba(255,255,255,0.5); }

/* ============== Mobile Bottom Bar ============== */
.mobile-bottombar {
  display: none;
  position: fixed; bottom: 0; left: 0; right: 0;
  background: var(--bg);
  border-top: 1px solid var(--border-soft);
  height: var(--bottombar-h);
  z-index: 90;
  padding: 0 8px;
  box-shadow: 0 -4px 16px rgba(0,0,0,0.05);
}
.mobile-bottombar > div { display: flex; align-items: center; justify-content: space-around; height: 100%; }
.mobile-bottombar a {
  display: flex; flex-direction: column; align-items: center;
  gap: 2px; flex: 1; height: 100%;
  justify-content: center;
  color: var(--text-light);
  font-size: 10px; font-weight: 500;
  position: relative;
  transition: var(--transition);
}
.mobile-bottombar a.active { color: var(--text); }
.mobile-bottombar a.active::before { content: ''; position: absolute; top: 0; width: 28px; height: 3px; background: var(--secondary); border-radius: 0 0 4px 4px; }
.mobile-bottombar a .material-symbols-rounded { font-size: 22px; }
.mobile-bottombar a .badge {
  position: absolute; top: 6px; right: 50%;
  margin-right: -22px;
  background: var(--danger); color: #fff;
  font-size: 9px; font-weight: 700;
  min-width: 16px; height: 16px;
  border-radius: 8px;
  display: flex; align-items: center; justify-content: center;
  padding: 0 4px;
  border: 2px solid var(--bg);
}

/* ============== Floating WhatsApp ============== */
.float-whatsapp {
  position: fixed;
  bottom: 24px; left: 24px;
  width: 56px; height: 56px;
  background: #25D366; color: #fff;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 28px;
  box-shadow: 0 8px 24px rgba(37,211,102,0.4);
  z-index: 80;
  animation: pulse 2.5s infinite;
}
.float-whatsapp:hover { transform: scale(1.1); }
.float-whatsapp .material-symbols-rounded { font-size: 28px; }

@keyframes pulse {
  0%, 100% { box-shadow: 0 8px 24px rgba(37,211,102,0.4), 0 0 0 0 rgba(37,211,102,0.5); }
  50% { box-shadow: 0 8px 24px rgba(37,211,102,0.4), 0 0 0 12px rgba(37,211,102,0); }
}

/* ============== Product Detail ============== */
.product-detail { display: grid; grid-template-columns: 1fr 1fr; gap: 40px; margin: 32px 0; }
.product-gallery { position: sticky; top: calc(var(--header-h) + 20px); }
.gallery-main { border-radius: var(--radius-lg); overflow: hidden; background: var(--bg-soft); aspect-ratio: 1; margin-bottom: 12px; }
.gallery-main img { width: 100%; height: 100%; object-fit: cover; transition: opacity 0.3s; }
.gallery-thumbs { display: grid; grid-template-columns: repeat(auto-fill, minmax(72px, 1fr)); gap: 8px; }
.gallery-thumb { aspect-ratio: 1; border-radius: var(--radius-sm); overflow: hidden; cursor: pointer; border: 2px solid transparent; transition: var(--transition); background: var(--bg-soft); }
.gallery-thumb.active { border-color: var(--secondary); }
.gallery-thumb img { width: 100%; height: 100%; object-fit: cover; }

.product-detail-info h1 { font-size: 28px; font-weight: 800; margin-bottom: 12px; letter-spacing: -0.5px; }
.product-detail-price { display: flex; align-items: baseline; gap: 12px; margin: 20px 0; padding: 16px 0; border-top: 1px solid var(--border-soft); border-bottom: 1px solid var(--border-soft); }
.product-detail-price .price-current { font-size: 28px; }
.product-detail-price .price-old { font-size: 18px; }
.product-meta { display: flex; flex-direction: column; gap: 8px; margin: 16px 0; font-size: 14px; color: var(--text-soft); }
.product-meta div { display: flex; align-items: center; gap: 8px; }

.stock-badge { display: inline-flex; align-items: center; gap: 6px; padding: 6px 12px; border-radius: 100px; font-size: 12px; font-weight: 600; }
.stock-in { background: rgba(16,185,129,0.1); color: var(--success); }
.stock-low { background: rgba(245,158,11,0.1); color: var(--warning); }
.stock-out { background: rgba(239,68,68,0.1); color: var(--danger); }

.qty-selector { display: inline-flex; align-items: center; border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; }
.qty-selector button { width: 44px; height: 44px; font-size: 18px; color: var(--text); background: var(--bg); transition: var(--transition); }
.qty-selector button:hover { background: var(--bg-soft); }
.qty-selector input { width: 60px; height: 44px; text-align: center; border: none; background: transparent; color: var(--text); font-weight: 700; font-size: 16px; }
.qty-selector input::-webkit-outer-spin-button, .qty-selector input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }

.product-actions-detail { display: flex; gap: 12px; margin: 24px 0; flex-wrap: wrap; }
.share-buttons { display: flex; gap: 8px; align-items: center; margin-top: 20px; padding-top: 20px; border-top: 1px solid var(--border-soft); }
.share-buttons span { font-size: 14px; color: var(--text-soft); margin-left: 8px; }
.share-btn { width: 40px; height: 40px; border-radius: 50%; display: flex; align-items: center; justify-content: center; color: #fff; transition: var(--transition); }
.share-btn:hover { transform: translateY(-3px); }
.share-btn.wa { background: #25D366; }
.share-btn.fb { background: #1877F2; }
.share-btn.tg { background: #0088cc; }

.product-description { margin-top: 32px; padding-top: 24px; border-top: 1px solid var(--border-soft); }
.product-description h3 { font-size: 18px; font-weight: 700; margin-bottom: 12px; }
.product-description p { color: var(--text-soft); line-height: 1.9; white-space: pre-line; }

/* ============== Cart ============== */
.cart-layout { display: grid; grid-template-columns: 1fr 380px; gap: 32px; margin: 32px 0; align-items: start; }
.cart-items { background: var(--bg-card); border: 1px solid var(--border-soft); border-radius: var(--radius-lg); padding: 8px; }
.cart-item { display: grid; grid-template-columns: 100px 1fr auto; gap: 16px; padding: 16px; border-bottom: 1px solid var(--border-soft); align-items: center; }
.cart-item:last-child { border-bottom: none; }
.cart-item-img { width: 100px; height: 100px; border-radius: var(--radius); overflow: hidden; background: var(--bg-soft); }
.cart-item-img img { width: 100%; height: 100%; object-fit: cover; }
.cart-item-info h4 { font-size: 15px; font-weight: 600; margin-bottom: 4px; line-height: 1.4; }
.cart-item-info .price { font-size: 14px; color: var(--text-soft); margin-bottom: 8px; }
.cart-item-info .qty-selector { transform: scale(0.85); transform-origin: right; }
.cart-item-actions { display: flex; flex-direction: column; align-items: end; gap: 12px; }
.cart-item-total { font-size: 16px; font-weight: 800; white-space: nowrap; }
.cart-item-remove { width: 36px; height: 36px; border-radius: 50%; background: rgba(239,68,68,0.08); color: var(--danger); display: flex; align-items: center; justify-content: center; transition: var(--transition); border: none; cursor: pointer; }
.cart-item-remove:hover { background: var(--danger); color: #fff; }
.cart-summary { background: var(--bg-card); border: 1px solid var(--border-soft); border-radius: var(--radius-lg); padding: 24px; position: sticky; top: calc(var(--header-h) + 20px); }
.cart-summary h3 { font-size: 18px; font-weight: 800; margin-bottom: 16px; }
.summary-row { display: flex; justify-content: space-between; padding: 10px 0; font-size: 14px; color: var(--text-soft); }
.summary-row.total { border-top: 1px solid var(--border); margin-top: 8px; padding-top: 16px; font-size: 17px; font-weight: 800; color: var(--text); }

.empty-state { text-align: center; padding: 80px 20px; }
.empty-state .material-symbols-rounded { font-size: 80px; color: var(--text-light); margin-bottom: 20px; }
.empty-state h3 { font-size: 22px; font-weight: 700; margin-bottom: 8px; }
.empty-state p { color: var(--text-soft); margin-bottom: 20px; }

/* ============== Forms ============== */
.form-group { margin-bottom: 16px; }
.form-label { display: block; font-size: 13px; font-weight: 600; margin-bottom: 6px; color: var(--text); }
.form-label .req { color: var(--danger); }
.form-control {
  width: 100%; padding: 12px 16px;
  border: 1px solid var(--border); border-radius: var(--radius);
  background: var(--bg); color: var(--text);
  font-size: 14px; transition: var(--transition); font-family: inherit;
}
.form-control:focus { outline: none; border-color: var(--text); box-shadow: 0 0 0 4px rgba(0,0,0,0.04); }
textarea.form-control { resize: vertical; min-height: 100px; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }

/* ============== Toast ============== */
.toast-container { position: fixed; top: 80px; left: 20px; z-index: 9999; display: flex; flex-direction: column; gap: 10px; pointer-events: none; }
.toast {
  background: var(--bg-card); color: var(--text);
  padding: 14px 20px; border-radius: var(--radius);
  box-shadow: var(--shadow-lg);
  display: flex; align-items: center; gap: 10px;
  font-size: 14px; font-weight: 500;
  min-width: 260px; max-width: 360px;
  pointer-events: auto;
  border: 1px solid var(--border-soft);
  animation: slideInLeft 0.3s ease;
  border-right: 4px solid var(--info);
}
.toast.success { border-right-color: var(--success); }
.toast.error { border-right-color: var(--danger); }
.toast.warning { border-right-color: var(--warning); }
.toast .material-symbols-rounded { font-size: 22px; }
.toast.success .material-symbols-rounded { color: var(--success); }
.toast.error .material-symbols-rounded { color: var(--danger); }
.toast.warning .material-symbols-rounded { color: var(--warning); }

@keyframes slideInLeft {
  from { opacity: 0; transform: translateX(-100%); }
  to { opacity: 1; transform: translateX(0); }
}

/* ============== Filters ============== */
.filters-bar { background: var(--bg-card); border: 1px solid var(--border-soft); border-radius: var(--radius-lg); padding: 16px; margin-bottom: 24px; display: flex; gap: 12px; flex-wrap: wrap; align-items: center; }
.filter-chip { padding: 8px 16px; border: 1px solid var(--border); border-radius: 100px; font-size: 13px; font-weight: 500; background: var(--bg); color: var(--text); cursor: pointer; transition: var(--transition); white-space: nowrap; text-decoration: none; display: inline-flex; align-items: center; }
.filter-chip:hover { border-color: var(--text); }
.filter-chip.active { background: var(--primary); color: var(--bg); border-color: var(--primary); }

/* ============== Static Pages ============== */
.page-content { max-width: 800px; margin: 32px auto; background: var(--bg-card); border: 1px solid var(--border-soft); border-radius: var(--radius-lg); padding: 40px; }
.page-content h1 { font-size: 32px; font-weight: 800; margin-bottom: 20px; }
.page-content h2 { font-size: 22px; margin: 24px 0 12px; font-weight: 700; }
.page-content p { color: var(--text-soft); line-height: 1.9; margin-bottom: 12px; }
.page-content ul, .page-content ol { padding-right: 20px; margin: 12px 0; }
.page-content li { color: var(--text-soft); margin-bottom: 6px; }

/* ============== 404 ============== */
.error-404 { min-height: 70vh; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; padding: 40px 20px; }
.error-404 h1 { font-size: clamp(80px, 20vw, 160px); font-weight: 900; background: linear-gradient(135deg, var(--secondary), var(--primary)); -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; line-height: 1; letter-spacing: -4px; }
.error-404 h2 { font-size: 28px; font-weight: 700; margin: 12px 0; }
.error-404 p { color: var(--text-soft); max-width: 400px; margin: 0 auto 24px; }
.error-404 .btns { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; }

/* ============== Pagination ============== */
.pagination { display: flex; justify-content: center; gap: 8px; margin: 32px 0; flex-wrap: wrap; }
.pagination a, .pagination span { padding: 8px 14px; border-radius: var(--radius-sm); border: 1px solid var(--border); color: var(--text); font-weight: 600; font-size: 14px; min-width: 40px; text-align: center; transition: var(--transition); }
.pagination a:hover { background: var(--bg-soft); }
.pagination .active { background: var(--primary); color: var(--bg); border-color: var(--primary); }

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

@media (max-width: 768px) {
  body { padding-bottom: var(--bottombar-h); }
  .nav-main { display: none; }
  .menu-toggle { display: flex; }
  .search-bar { display: none; }

  .hero { min-height: 260px; margin: 16px 0; border-radius: var(--radius-lg); }
  .hero-content { padding: 32px 24px; }

  .section { padding: 32px 0; }
  .section-header { margin-bottom: 20px; }
  .section-title { font-size: 20px; }

  .products-grid { grid-template-columns: repeat(2, 1fr); gap: 12px; }
  .product-info { padding: 10px; }
  .product-name { font-size: 13px; min-height: 36px; }
  .price-current { font-size: 14px; }
  .price-old { font-size: 11px; }
  .product-actions .btn { font-size: 11px; padding: 8px 4px; min-height: 36px; gap: 4px; }
  .product-actions .btn .material-symbols-rounded { font-size: 16px; }

  .categories-grid { grid-template-columns: repeat(3, 1fr); gap: 10px; }
  .category-card { padding: 16px 8px; }
  .category-card .cat-icon { width: 48px; height: 48px; }
  .category-card .cat-icon .material-symbols-rounded { font-size: 22px; }
  .category-card h3 { font-size: 12px; }

  .mobile-bottombar { display: block; }
  .float-whatsapp { bottom: calc(var(--bottombar-h) + 16px); left: 16px; width: 50px; height: 50px; }
  .float-whatsapp .material-symbols-rounded { font-size: 24px; }

  .footer-grid { grid-template-columns: 1fr; gap: 24px; }
  .site-footer { padding-top: 40px; }

  .cart-item { grid-template-columns: 80px 1fr; gap: 12px; padding: 12px; }
  .cart-item-img { width: 80px; height: 80px; }
  .cart-item-actions { grid-column: 2; flex-direction: row; justify-content: space-between; align-items: center; }
  .cart-item-info h4 { font-size: 13px; }

  .page-content { padding: 24px 20px; margin: 16px 0; border-radius: var(--radius); }
  .page-content h1 { font-size: 22px; }

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

  .product-detail-info h1 { font-size: 22px; }
  .product-detail-price .price-current { font-size: 22px; }

  .filters-bar { padding: 12px; gap: 8px; overflow-x: auto; flex-wrap: nowrap; -webkit-overflow-scrolling: touch; }
  .filter-chip { font-size: 12px; padding: 6px 12px; }

  .icon-btn { width: 38px; height: 38px; }
  .toast-container { left: 12px; right: 12px; top: 76px; }
  .toast { min-width: 0; max-width: none; }

  .brand { font-size: 16px; }
  .brand-icon { width: 32px; height: 32px; }
}

@media (max-width: 380px) {
  .products-grid { gap: 8px; }
  .product-info { padding: 8px; }
  .price-current { font-size: 13px; }
}

/* Utilities */
.text-center { text-align: center; }
.text-muted { color: var(--text-soft); }
.mb-0 { margin-bottom: 0; }
.mt-2 { margin-top: 16px; }
.mt-3 { margin-top: 24px; }
.d-flex { display: flex; }
.gap-2 { gap: 12px; }
.align-center { align-items: center; }
.justify-between { justify-content: space-between; }
.hidden { display: none !important; }

/* Scrollbar */
::-webkit-scrollbar { width: 8px; height: 8px; }
::-webkit-scrollbar-track { background: var(--bg-soft); }
::-webkit-scrollbar-thumb { background: var(--border); border-radius: 4px; }
::-webkit-scrollbar-thumb:hover { background: var(--text-light); }

@media (hover: none) {
  .product-card:hover { transform: none; }
  .btn-primary:hover { transform: none; }
}

/* ============== Banner Slider ============== */
.home-banner-section {
  padding: 0 16px;
}

.banner-slider {
  position: relative;
  overflow: hidden;
  width: 100%;
  aspect-ratio: 1800 / 700;
  max-height: 700px;
  min-height: 220px;
  margin: 24px 0;
  border-radius: var(--radius-xl);
  background: var(--bg-soft);
  box-shadow: var(--shadow-lg);
  isolation: isolate;
}

.banner-track {
  display: flex;
  direction: ltr;
  width: 100%;
  height: 100%;
  transition: transform 0.6s cubic-bezier(0.25, 0.46, 0.45, 0.94);
  will-change: transform;
}

.banner-slide {
  min-width: 100%;
  height: 100%;
  position: relative;
  direction: rtl;
  overflow: hidden;
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-light) 100%);
}

.banner-link {
  display: block;
  width: 100%;
  height: 100%;
  color: inherit;
  text-decoration: none;
}

.banner-slide img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transform: scale(1.001);
}

.banner-overlay {
  position: absolute;
  inset: 0;
  background: transparent;
  display: flex;
  align-items: flex-end;
  padding: 34px;
  pointer-events: none;
}

.banner-text {
  width: min(680px, 100%);
  color: #fff;
}

.banner-text h1 {
  font-size: clamp(1.45rem, 4vw, 3rem);
  font-weight: 900;
  line-height: 1.18;
  margin: 0;
  color: #fff;
}

.banner-text p {
  color: rgba(255, 255, 255, 0.9);
  margin: 10px 0 0;
  font-size: clamp(0.9rem, 2vw, 1.12rem);
  line-height: 1.8;
  max-width: 560px;
}

.banner-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-top: 16px;
  padding: 11px 20px;
  border-radius: 999px;
  background: var(--secondary, #d4af37);
  color: #111;
  font-weight: 800;
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.22);
}

.banner-btn .material-symbols-rounded {
  font-size: 19px;
}

.slider-dots {
  position: absolute;
  bottom: 15px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  align-items: center;
  gap: 7px;
  z-index: 5;
}

.slider-dot {
  width: 9px;
  height: 9px;
  padding: 0;
  border: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.62);
  cursor: pointer;
  transition: width 0.25s ease, background 0.25s ease, transform 0.25s ease;
}

.slider-dot.active {
  width: 27px;
  background: var(--secondary, #d4af37);
  transform: scale(1.02);
}

@media (max-width: 768px) {
  .home-banner-section { padding: 0 10px; }

  .banner-slider {
    aspect-ratio: 16 / 8;
    min-height: 190px;
    margin: 16px 0;
    border-radius: var(--radius-lg);
  }

  .banner-overlay {
    padding: 20px;
  }
}

@media (max-width: 480px) {
  .banner-slider {
    aspect-ratio: 16 / 9;
    min-height: 180px;
  }

  .banner-overlay {
    padding: 16px;
  }

  .banner-text p {
    display: none;
  }

  .banner-btn {
    padding: 9px 15px;
    font-size: 13px;
  }
}


/* ============== Final fixes: banner + mobile search + suggestions ============== */
.banner-slider {
  display: block !important;
  overflow: hidden !important;
  position: relative !important;
  width: 100% !important;
  aspect-ratio: 1800 / 700;
  max-height: 620px;
}
.banner-track {
  display: flex !important;
  flex-wrap: nowrap !important;
  align-items: stretch !important;
  height: 100% !important;
  width: 100% !important;
  direction: ltr !important;
}
.banner-slide {
  flex: 0 0 100% !important;
  min-width: 100% !important;
  max-width: 100% !important;
  height: 100% !important;
}
.banner-slide img {
  width: 100% !important;
  height: 100% !important;
  object-fit: cover !important;
}

.search-form { position: relative; }
.search-submit {
  position: absolute;
  top: 50%;
  right: 10px;
  transform: translateY(-50%);
  width: 34px;
  height: 34px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-light);
  z-index: 2;
}
.search-submit:hover { background: var(--bg); color: var(--text); }
.search-submit .material-symbols-rounded { font-size: 20px; }
.search-form input { padding-right: 46px !important; }
.search-form .search-icon { display: none; }

.search-suggestions {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  left: 0;
  background: var(--bg-card);
  border: 1px solid var(--border-soft);
  border-radius: 16px;
  box-shadow: var(--shadow-lg);
  overflow: hidden;
  z-index: 300;
  display: none;
  max-height: 320px;
  overflow-y: auto;
}
.search-suggestions.open { display: block; }
.suggestion-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  color: var(--text);
  border-bottom: 1px solid var(--border-soft);
  cursor: pointer;
}
.suggestion-item:last-child { border-bottom: 0; }
.suggestion-item:hover { background: var(--bg-soft); }
.suggestion-thumb {
  width: 42px;
  height: 42px;
  border-radius: 12px;
  object-fit: cover;
  background: var(--bg-soft);
  flex: 0 0 42px;
}
.suggestion-icon {
  width: 42px;
  height: 42px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bg-soft);
  color: var(--secondary);
  flex: 0 0 42px;
}
.suggestion-title { font-weight: 800; font-size: 13px; line-height: 1.35; }
.suggestion-sub { color: var(--text-soft); font-size: 12px; margin-top: 2px; }
.suggestion-empty { padding: 12px; color: var(--text-soft); font-size: 13px; text-align: center; }
.mobile-search-wrap { display: none; background: var(--bg); border-bottom: 1px solid var(--border-soft); padding: 10px 0; position: sticky; top: var(--header-h); z-index: 90; }
.mobile-search-bar { display: block !important; max-width: 100% !important; width: 100%; }

@media (max-width: 768px) {
  .mobile-search-wrap { display: block; }
  .header-inner > .search-form { display: none !important; }
  .banner-slider {
    aspect-ratio: 16 / 8;
    max-height: 230px;
    min-height: 175px;
    margin: 12px 0 18px;
    border-radius: 18px;
  }
  .banner-overlay { padding: 14px; }
  .banner-text h1 { font-size: clamp(1.05rem, 5vw, 1.6rem); }
  .slider-dots { bottom: 9px; }
}

@media (max-width: 480px) {
  .home-banner-section { padding: 0 6px; }
  .banner-slider { aspect-ratio: 16 / 8.4; max-height: 210px; min-height: 165px; }
}

/* Brand SVG icons */
.brand-svg {
  width: 1.15em;
  height: 1.15em;
  display: inline-block;
  vertical-align: -0.18em;
  fill: currentColor;
  flex: 0 0 auto;
}
.btn .brand-svg,
.icon-btn .brand-svg,
.float-whatsapp .brand-svg,
.footer-social .brand-svg,
.mobile-bottombar .brand-svg,
.share-btn .brand-svg {
  width: 1.25em;
  height: 1.25em;
}
.float-whatsapp .brand-svg {
  width: 1.65em;
  height: 1.65em;
}
.footer-social a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.btn-whatsapp {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.brand-svg-lg {
  width: 42px;
  height: 42px;
  display: inline-block;
  fill: currentColor;
}
