/* ============================================================
   RAAD ALGEN - Main Stylesheet
   ============================================================ */

/* CSS Variables */
:root {
  --primary:        #1a5276;
  --primary-dark:   #154360;
  --primary-light:  #2e86c1;
  --accent:         #27ae60;
  --accent-dark:    #1e8449;
  --danger:         #e74c3c;
  --warning:        #f39c12;
  --info:           #3498db;
  --white:          #ffffff;
  --black:          #000000;
  --gray-100:       #f8f9fa;
  --gray-200:       #e9ecef;
  --gray-300:       #dee2e6;
  --gray-400:       #ced4da;
  --gray-500:       #adb5bd;
  --gray-600:       #6c757d;
  --gray-700:       #495057;
  --gray-800:       #343a40;
  --gray-900:       #212529;
  --text:           #2c3e50;
  --text-muted:     #6c757d;
  --border:         #dee2e6;
  --shadow:         0 2px 15px rgba(0,0,0,0.1);
  --shadow-lg:      0 10px 40px rgba(0,0,0,0.15);
  --radius:         8px;
  --radius-lg:      16px;
  --transition:     all 0.3s ease;
  --font-primary:   'Inter', 'Segoe UI', sans-serif;
  --font-arabic:    'Cairo', 'Tajawal', sans-serif;
  --header-height:  80px;
}

/* Reset */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; font-size: 16px; }
body {
  font-family: var(--font-primary);
  color: var(--text);
  background: var(--white);
  line-height: 1.6;
  overflow-x: hidden;
}
body[dir="rtl"] { font-family: var(--font-arabic); }
img { max-width: 100%; height: auto; display: block; }
a { color: var(--primary); text-decoration: none; transition: var(--transition); }
a:hover { color: var(--primary-dark); }
ul { list-style: none; }
button { cursor: pointer; font-family: inherit; }

/* ============================================================
   LAYOUT
   ============================================================ */
.container { max-width: 1280px; margin: 0 auto; padding: 0 20px; }
.container-sm { max-width: 960px; margin: 0 auto; padding: 0 20px; }
.section { padding: 80px 0; }
.section-sm { padding: 50px 0; }
.grid { display: grid; gap: 30px; }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }
.flex { display: flex; }
.flex-center { display: flex; align-items: center; justify-content: center; }
.flex-between { display: flex; align-items: center; justify-content: space-between; }

/* ============================================================
   TYPOGRAPHY
   ============================================================ */
h1, h2, h3, h4, h5, h6 { font-weight: 700; line-height: 1.2; color: var(--gray-900); }
h1 { font-size: clamp(2rem, 5vw, 3.5rem); }
h2 { font-size: clamp(1.6rem, 3vw, 2.5rem); }
h3 { font-size: clamp(1.2rem, 2vw, 1.8rem); }
h4 { font-size: 1.3rem; }
p { margin-bottom: 1rem; }
.text-center { text-align: center; }
.text-primary { color: var(--primary); }
.text-accent { color: var(--accent); }
.text-muted { color: var(--text-muted); }

.section-title {
  text-align: center;
  margin-bottom: 50px;
}
.section-title h2 { margin-bottom: 15px; }
.section-title p { color: var(--text-muted); max-width: 600px; margin: 0 auto; }
.section-title .divider {
  width: 60px; height: 4px;
  background: linear-gradient(90deg, var(--primary), var(--accent));
  margin: 15px auto;
  border-radius: 2px;
}

/* ============================================================
   HEADER
   ============================================================ */
.header {
  position: sticky; top: 0; z-index: 1000;
  background: var(--white);
  box-shadow: 0 2px 20px rgba(0,0,0,0.08);
  height: var(--header-height);
}
.header-inner {
  display: flex; align-items: center;
  justify-content: space-between;
  height: var(--header-height);
}
.logo {
  display: flex; align-items: center; gap: 12px;
  font-size: 1.5rem; font-weight: 800;
  color: var(--primary); text-decoration: none;
}
.logo img { height: 50px; width: auto; }
.logo-text span { color: var(--accent); }

.nav { display: flex; align-items: center; gap: 5px; }
.nav-item { position: relative; }
.nav-link {
  display: block; padding: 8px 14px;
  color: var(--gray-700); font-weight: 500;
  border-radius: var(--radius);
  transition: var(--transition);
  white-space: nowrap;
}
.nav-link:hover, .nav-link.active {
  color: var(--primary);
  background: rgba(26,82,118,0.06);
}

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

/* Language Switcher */
.lang-switcher { position: relative; }
.lang-btn {
  display: flex; align-items: center; gap: 6px;
  padding: 7px 12px; border-radius: var(--radius);
  border: 1px solid var(--border);
  background: none; font-size: 0.85rem;
  color: var(--gray-700); cursor: pointer;
  transition: var(--transition);
}
.lang-btn:hover { border-color: var(--primary); color: var(--primary); }
.lang-dropdown {
  position: absolute; top: calc(100% + 5px);
  right: 0; min-width: 160px;
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  opacity: 0; visibility: hidden;
  transform: translateY(-5px);
  transition: var(--transition);
  z-index: 100;
}
[dir="rtl"] .lang-dropdown { right: auto; left: 0; }
.lang-dropdown.open { opacity: 1; visibility: visible; transform: translateY(0); }
.lang-option {
  display: flex; align-items: center; gap: 10px;
  padding: 10px 15px; color: var(--gray-700);
  transition: var(--transition);
}
.lang-option:hover, .lang-option.active {
  background: var(--gray-100); color: var(--primary);
}

/* Cart Icon */
.cart-icon {
  position: relative; display: flex;
  align-items: center; padding: 8px;
  color: var(--gray-700); border-radius: var(--radius);
  transition: var(--transition);
}
.cart-icon:hover { color: var(--primary); background: var(--gray-100); }
.cart-count {
  position: absolute; top: 0; right: 0;
  background: var(--accent); color: white;
  font-size: 0.65rem; font-weight: 700;
  min-width: 18px; height: 18px;
  border-radius: 50%; display: flex;
  align-items: center; justify-content: center;
  transform: translate(4px, -4px);
}

/* Mobile Menu */
.hamburger {
  display: none; flex-direction: column;
  gap: 5px; padding: 8px; cursor: pointer;
  background: none; border: none;
}
.hamburger span {
  display: block; width: 24px; height: 2px;
  background: var(--gray-700); border-radius: 2px;
  transition: var(--transition);
}

/* ============================================================
   HERO SECTION
   ============================================================ */
.hero {
  min-height: calc(100vh - var(--header-height));
  display: flex; align-items: center;
  background: linear-gradient(135deg, var(--primary-dark) 0%, var(--primary) 50%, var(--primary-light) 100%);
  position: relative; overflow: hidden;
}
.hero::before {
  content: ''; position: absolute; inset: 0;
  background: url('/assets/images/hero-pattern.svg') center/cover;
  opacity: 0.05;
}
.hero-content { position: relative; z-index: 1; color: white; max-width: 650px; }
.hero-badge {
  display: inline-flex; align-items: center; gap: 8px;
  background: rgba(255,255,255,0.15);
  border: 1px solid rgba(255,255,255,0.3);
  padding: 6px 16px; border-radius: 30px;
  font-size: 0.85rem; margin-bottom: 20px;
  backdrop-filter: blur(10px);
}
.hero h1 { color: white; margin-bottom: 20px; }
.hero p { font-size: 1.15rem; opacity: 0.9; margin-bottom: 35px; }
.hero-actions { display: flex; gap: 15px; flex-wrap: wrap; }

/* ============================================================
   BUTTONS
   ============================================================ */
.btn {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 12px 28px; border-radius: var(--radius);
  font-weight: 600; font-size: 0.95rem;
  border: 2px solid transparent;
  transition: var(--transition); cursor: pointer;
  text-decoration: none; white-space: nowrap;
}
.btn-primary {
  background: var(--primary); color: white;
  border-color: var(--primary);
}
.btn-primary:hover {
  background: var(--primary-dark);
  border-color: var(--primary-dark); color: white;
  transform: translateY(-2px); box-shadow: 0 5px 20px rgba(26,82,118,0.3);
}
.btn-accent {
  background: var(--accent); color: white;
  border-color: var(--accent);
}
.btn-accent:hover {
  background: var(--accent-dark); color: white;
  transform: translateY(-2px); box-shadow: 0 5px 20px rgba(39,174,96,0.3);
}
.btn-outline {
  background: transparent; color: var(--primary);
  border-color: var(--primary);
}
.btn-outline:hover {
  background: var(--primary); color: white;
  transform: translateY(-2px);
}
.btn-white {
  background: white; color: var(--primary);
  border-color: white;
}
.btn-white:hover {
  background: var(--gray-100); color: var(--primary-dark);
}
.btn-outline-white {
  background: transparent; color: white;
  border-color: rgba(255,255,255,0.5);
}
.btn-outline-white:hover {
  background: rgba(255,255,255,0.1);
  border-color: white; color: white;
}
.btn-sm { padding: 8px 18px; font-size: 0.85rem; }
.btn-lg { padding: 15px 35px; font-size: 1.05rem; }
.btn-full { width: 100%; justify-content: center; }
.btn-icon { padding: 10px; }
.btn:disabled { opacity: 0.6; cursor: not-allowed; transform: none !important; }

/* ============================================================
   CARDS
   ============================================================ */
.card {
  background: white; border-radius: var(--radius-lg);
  box-shadow: var(--shadow); overflow: hidden;
  transition: var(--transition);
}
.card:hover { box-shadow: var(--shadow-lg); transform: translateY(-3px); }
.card-img { aspect-ratio: 4/3; object-fit: cover; width: 100%; }
.card-body { padding: 20px; }
.card-title { font-size: 1.1rem; font-weight: 700; margin-bottom: 8px; }
.card-text { color: var(--text-muted); font-size: 0.9rem; }

/* Product Card */
.product-card { position: relative; }
.product-card .product-img-wrap {
  aspect-ratio: 1/1; overflow: hidden;
  background: var(--gray-100);
}
.product-card .product-img-wrap img {
  width: 100%; height: 100%; object-fit: cover;
  transition: transform 0.4s ease;
}
.product-card:hover .product-img-wrap img { transform: scale(1.05); }
.product-badge {
  position: absolute; top: 12px; left: 12px;
  background: var(--danger); color: white;
  padding: 3px 10px; border-radius: 20px;
  font-size: 0.75rem; font-weight: 700;
}
[dir="rtl"] .product-badge { left: auto; right: 12px; }
.product-body { padding: 16px; }
.product-name { font-weight: 600; margin-bottom: 8px; font-size: 0.95rem; }
.product-price { display: flex; align-items: center; gap: 10px; }
.price-current { font-size: 1.2rem; font-weight: 700; color: var(--primary); }
.price-old { text-decoration: line-through; color: var(--text-muted); font-size: 0.9rem; }
.product-actions {
  display: flex; gap: 8px; margin-top: 12px;
}

/* ============================================================
   FORMS
   ============================================================ */
.form-group { margin-bottom: 20px; }
.form-label {
  display: block; margin-bottom: 6px;
  font-weight: 500; font-size: 0.9rem;
  color: var(--gray-700);
}
.form-label .req { color: var(--danger); margin-left: 3px; }
.form-control {
  width: 100%; padding: 11px 16px;
  border: 1.5px solid var(--border);
  border-radius: var(--radius); font-size: 0.95rem;
  font-family: inherit; color: var(--text);
  background: white; transition: var(--transition);
  outline: none;
}
.form-control:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(26,82,118,0.1);
}
.form-control.error { border-color: var(--danger); }
textarea.form-control { resize: vertical; min-height: 120px; }
select.form-control { cursor: pointer; }
.form-hint { font-size: 0.8rem; color: var(--text-muted); margin-top: 4px; }
.form-error { font-size: 0.8rem; color: var(--danger); margin-top: 4px; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }

/* ============================================================
   ALERTS & NOTICES
   ============================================================ */
.alert {
  display: flex; align-items: flex-start; gap: 12px;
  padding: 14px 18px; border-radius: var(--radius);
  margin-bottom: 20px; border: 1px solid transparent;
}
.alert-success { background: #d4edda; border-color: #c3e6cb; color: #155724; }
.alert-danger  { background: #f8d7da; border-color: #f5c6cb; color: #721c24; }
.alert-warning { background: #fff3cd; border-color: #ffeeba; color: #856404; }
.alert-info    { background: #d1ecf1; border-color: #bee5eb; color: #0c5460; }

/* ============================================================
   COOKIE CONSENT (GDPR)
   ============================================================ */
#cookie-banner {
  position: fixed; bottom: 0; left: 0; right: 0;
  z-index: 9999; padding: 20px;
  background: rgba(0,0,0,0.92);
  backdrop-filter: blur(10px);
  color: white; transform: translateY(100%);
  transition: transform 0.4s ease;
}
#cookie-banner.show { transform: translateY(0); }
.cookie-inner {
  max-width: 1280px; margin: 0 auto;
  display: flex; align-items: center;
  justify-content: space-between; gap: 20px;
  flex-wrap: wrap;
}
.cookie-text { flex: 1; font-size: 0.9rem; line-height: 1.6; }
.cookie-text a { color: var(--accent); }
.cookie-actions { display: flex; gap: 10px; flex-wrap: wrap; }
.cookie-modal-overlay {
  position: fixed; inset: 0; z-index: 10000;
  background: rgba(0,0,0,0.7); display: none;
  align-items: center; justify-content: center;
}
.cookie-modal-overlay.show { display: flex; }
.cookie-modal {
  background: white; border-radius: var(--radius-lg);
  max-width: 600px; width: 90%; max-height: 80vh;
  overflow-y: auto; padding: 30px;
  color: var(--text);
}
.cookie-modal h3 { margin-bottom: 20px; }
.cookie-category {
  display: flex; align-items: flex-start;
  justify-content: space-between; gap: 20px;
  padding: 15px 0; border-bottom: 1px solid var(--border);
}
.cookie-category:last-child { border-bottom: none; }
.toggle {
  position: relative; width: 44px; height: 24px;
  flex-shrink: 0;
}
.toggle input { opacity: 0; width: 0; height: 0; }
.toggle-slider {
  position: absolute; inset: 0; cursor: pointer;
  background: var(--gray-300); border-radius: 24px;
  transition: var(--transition);
}
.toggle-slider::before {
  content: ''; position: absolute;
  width: 18px; height: 18px; left: 3px; bottom: 3px;
  background: white; border-radius: 50%;
  transition: var(--transition);
}
.toggle input:checked + .toggle-slider { background: var(--accent); }
.toggle input:checked + .toggle-slider::before { transform: translateX(20px); }
.toggle input:disabled + .toggle-slider { opacity: 0.6; cursor: default; }

/* ============================================================
   FOOTER
   ============================================================ */
.footer {
  background: var(--gray-900); color: #ccc;
  padding: 60px 0 0;
}
.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 40px; margin-bottom: 40px;
}
.footer-logo {
  color: white; font-size: 1.4rem;
  font-weight: 800; margin-bottom: 15px;
  display: block;
}
.footer-about { font-size: 0.9rem; line-height: 1.7; }
.footer-social { display: flex; gap: 10px; margin-top: 20px; }
.social-link {
  width: 36px; height: 36px;
  background: rgba(255,255,255,0.1);
  border-radius: 50%; display: flex;
  align-items: center; justify-content: center;
  color: #ccc; transition: var(--transition);
}
.social-link:hover {
  background: var(--primary); color: white;
}
.footer-heading {
  color: white; font-size: 1rem;
  font-weight: 600; margin-bottom: 20px;
  position: relative; padding-bottom: 10px;
}
.footer-heading::after {
  content: ''; position: absolute;
  bottom: 0; left: 0; width: 30px;
  height: 2px; background: var(--accent);
}
[dir="rtl"] .footer-heading::after { left: auto; right: 0; }
.footer-links li { margin-bottom: 8px; }
.footer-links a {
  color: #aaa; font-size: 0.9rem;
  transition: var(--transition);
}
.footer-links a:hover { color: white; padding-left: 5px; }
[dir="rtl"] .footer-links a:hover { padding-left: 0; padding-right: 5px; }
.footer-bottom {
  border-top: 1px solid rgba(255,255,255,0.1);
  padding: 20px 0; display: flex;
  align-items: center; justify-content: space-between;
  flex-wrap: wrap; gap: 10px;
  font-size: 0.85rem;
}
.footer-bottom-links { display: flex; gap: 20px; }
.footer-bottom-links a { color: #aaa; }
.footer-bottom-links a:hover { color: white; }

/* ============================================================
   PAGE BUILDER BLOCKS
   ============================================================ */
.block-hero-banner { position: relative; overflow: hidden; }
.block-text { max-width: 800px; }
.block-text-image { display: grid; grid-template-columns: 1fr 1fr; gap: 50px; align-items: center; }
.block-cta {
  text-align: center; padding: 60px;
  background: linear-gradient(135deg, var(--primary), var(--primary-light));
  border-radius: var(--radius-lg); color: white;
}
.block-stats { display: grid; grid-template-columns: repeat(4,1fr); gap: 20px; text-align: center; }
.stat-number { font-size: 3rem; font-weight: 800; color: var(--primary); }
.stat-label { color: var(--text-muted); }
.block-team { display: grid; grid-template-columns: repeat(3,1fr); gap: 25px; }
.team-card { text-align: center; }
.team-avatar {
  width: 100px; height: 100px; border-radius: 50%;
  margin: 0 auto 15px; object-fit: cover;
  border: 3px solid var(--primary);
}

/* ============================================================
   STORE & CART
   ============================================================ */
.products-grid { display: grid; grid-template-columns: repeat(4,1fr); gap: 20px; }
.store-layout { display: grid; grid-template-columns: 280px 1fr; gap: 30px; }
.filters-sidebar { position: sticky; top: 100px; }
.filter-group { margin-bottom: 25px; }
.filter-title { font-weight: 600; margin-bottom: 12px; padding-bottom: 8px; border-bottom: 1px solid var(--border); }
.filter-option { display: flex; align-items: center; gap: 8px; margin-bottom: 8px; cursor: pointer; }
.price-range { width: 100%; }

.cart-table { width: 100%; border-collapse: collapse; }
.cart-table th { background: var(--gray-100); padding: 12px 15px; font-weight: 600; font-size: 0.85rem; text-transform: uppercase; letter-spacing: 0.5px; }
.cart-table td { padding: 15px; border-bottom: 1px solid var(--border); vertical-align: middle; }
.cart-product { display: flex; align-items: center; gap: 15px; }
.cart-product img { width: 70px; height: 70px; object-fit: cover; border-radius: var(--radius); }
.qty-control { display: flex; align-items: center; gap: 0; border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; }
.qty-btn {
  width: 34px; height: 34px; background: var(--gray-100);
  border: none; font-size: 1.1rem; cursor: pointer;
  transition: var(--transition); display: flex;
  align-items: center; justify-content: center;
}
.qty-btn:hover { background: var(--primary); color: white; }
.qty-input {
  width: 50px; height: 34px; border: none;
  text-align: center; font-weight: 600;
  outline: none; background: none;
}

/* Checkout Steps */
.checkout-steps { display: flex; justify-content: center; gap: 0; margin-bottom: 40px; }
.checkout-step {
  display: flex; align-items: center; gap: 10px;
  flex: 1; max-width: 200px;
  position: relative;
}
.checkout-step:not(:last-child)::after {
  content: ''; position: absolute;
  right: -20px; top: 50%; width: 40px; height: 2px;
  background: var(--border); transform: translateY(-50%);
}
.step-num {
  width: 36px; height: 36px; border-radius: 50%;
  border: 2px solid var(--border); display: flex;
  align-items: center; justify-content: center;
  font-weight: 700; background: white; flex-shrink: 0;
}
.checkout-step.active .step-num { background: var(--primary); border-color: var(--primary); color: white; }
.checkout-step.done .step-num { background: var(--accent); border-color: var(--accent); color: white; }

/* Order Summary Box */
.order-box {
  background: var(--gray-100); border-radius: var(--radius-lg);
  padding: 25px; position: sticky; top: 100px;
}
.order-box-title { font-size: 1.1rem; font-weight: 700; margin-bottom: 20px; padding-bottom: 15px; border-bottom: 1px solid var(--border); }
.order-row { display: flex; justify-content: space-between; margin-bottom: 10px; }
.order-row.total { font-weight: 700; font-size: 1.1rem; border-top: 2px solid var(--border); padding-top: 10px; margin-top: 10px; }

/* ============================================================
   TRACKING
   ============================================================ */
.tracking-timeline { position: relative; padding-left: 30px; }
[dir="rtl"] .tracking-timeline { padding-left: 0; padding-right: 30px; }
.tracking-timeline::before {
  content: ''; position: absolute; left: 10px; top: 0; bottom: 0;
  width: 2px; background: var(--border);
}
[dir="rtl"] .tracking-timeline::before { left: auto; right: 10px; }
.tracking-event { position: relative; margin-bottom: 25px; }
.tracking-dot {
  position: absolute; left: -24px; top: 3px;
  width: 16px; height: 16px; border-radius: 50%;
  background: var(--border); border: 2px solid white;
  box-shadow: 0 0 0 2px var(--border);
}
[dir="rtl"] .tracking-dot { left: auto; right: -24px; }
.tracking-dot.active {
  background: var(--accent);
  box-shadow: 0 0 0 2px var(--accent);
}
.tracking-time { font-size: 0.8rem; color: var(--text-muted); }
.tracking-title { font-weight: 600; }
.tracking-desc { font-size: 0.9rem; color: var(--text-muted); }

/* ============================================================
   ACCOUNT
   ============================================================ */
.account-layout { display: grid; grid-template-columns: 260px 1fr; gap: 30px; }
.account-sidebar {
  background: white; border-radius: var(--radius-lg);
  box-shadow: var(--shadow); padding: 20px;
  position: sticky; top: 100px;
  height: fit-content;
}
.account-nav-link {
  display: flex; align-items: center; gap: 10px;
  padding: 10px 15px; border-radius: var(--radius);
  color: var(--gray-700); transition: var(--transition);
}
.account-nav-link:hover, .account-nav-link.active {
  background: var(--primary); color: white;
}

/* ============================================================
   ADMIN (loaded separately)
   ============================================================ */
/* Admin styles are in admin/assets/css/admin.css */

/* ============================================================
   UTILITIES
   ============================================================ */
.mt-1 { margin-top: 5px; }   .mt-2 { margin-top: 10px; }
.mt-3 { margin-top: 15px; }  .mt-4 { margin-top: 20px; }
.mt-5 { margin-top: 30px; }  .mb-1 { margin-bottom: 5px; }
.mb-2 { margin-bottom: 10px; } .mb-3 { margin-bottom: 15px; }
.mb-4 { margin-bottom: 20px; } .mb-5 { margin-bottom: 30px; }
.p-3 { padding: 15px; } .p-4 { padding: 20px; } .p-5 { padding: 30px; }
.hidden { display: none !important; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0,0,0,0); }
.rounded { border-radius: var(--radius); }
.rounded-lg { border-radius: var(--radius-lg); }
.shadow { box-shadow: var(--shadow); }
.bg-primary { background: var(--primary); color: white; }
.bg-accent { background: var(--accent); color: white; }
.bg-light { background: var(--gray-100); }
.badge { display: inline-block; padding: 3px 10px; border-radius: 20px; font-size: 0.75rem; font-weight: 700; }
.badge-success { background: #d4edda; color: #155724; }
.badge-warning { background: #fff3cd; color: #856404; }
.badge-danger  { background: #f8d7da; color: #721c24; }
.badge-info    { background: #d1ecf1; color: #0c5460; }
.badge-primary { background: rgba(26,82,118,0.1); color: var(--primary); }

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 1200px) {
  .grid-4, .products-grid { grid-template-columns: repeat(3,1fr); }
  .footer-grid { grid-template-columns: 1.5fr 1fr 1fr; }
  .footer-grid > div:first-child { grid-column: 1/-1; }
}
@media (max-width: 992px) {
  .grid-3 { grid-template-columns: repeat(2,1fr); }
  .grid-4, .products-grid { grid-template-columns: repeat(2,1fr); }
  .store-layout { grid-template-columns: 1fr; }
  .filters-sidebar { position: static; }
  .block-text-image { grid-template-columns: 1fr; }
  .block-stats { grid-template-columns: repeat(2,1fr); }
  .checkout-layout { grid-template-columns: 1fr; }
  .account-layout { grid-template-columns: 1fr; }
  .hamburger { display: flex; }
  .nav { display: none; position: fixed; inset: 0; top: var(--header-height); background: white; flex-direction: column; align-items: flex-start; padding: 20px; overflow-y: auto; z-index: 999; }
  .nav.open { display: flex; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 576px) {
  .grid-2, .grid-3, .grid-4, .products-grid { grid-template-columns: 1fr; }
  .form-row { grid-template-columns: 1fr; }
  .hero-actions { flex-direction: column; }
  .footer-grid { grid-template-columns: 1fr; }
  .footer-bottom { flex-direction: column; text-align: center; }
  .checkout-steps { gap: 5px; }
  .section { padding: 50px 0; }
}

/* Loading Spinner */
.spinner {
  width: 40px; height: 40px;
  border: 3px solid var(--border);
  border-top-color: var(--primary);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* Page Loader */
#page-loader {
  position: fixed; inset: 0; z-index: 99999;
  background: white; display: flex;
  align-items: center; justify-content: center;
  transition: opacity 0.5s ease;
}
#page-loader.hide { opacity: 0; pointer-events: none; }
