/*
Theme Name: JazairShop
Theme URI: https://jazairshop.dz
Author: JazairShop Team
Author URI: https://jazairshop.dz
Description: ثيم تجارة إلكترونية جزائري متكامل مع دعم الدفع عند الاستلام، الولايات الجزائرية، واتساب، وجميع الميزات المحلية
Version: 1.0.0
Requires at least: 6.0
Tested up to: 6.7
Requires PHP: 8.0
WooCommerce: true
License: GPL v2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: jazairshop
Tags: rtl-language, arabic, e-commerce, woocommerce, algeria, cod, one-click-checkout
*/

/* ============================================================
   CSS VARIABLES
   ============================================================ */
:root {
  --primary:       #1a6b3a;
  --primary-dark:  #0f4a27;
  --primary-light: #e8f5e9;
  --accent:        #ff6b2b;
  --accent-dark:   #e05520;
  --accent-light:  #fff3ee;
  --text:          #1a1a2e;
  --text-muted:    #6b7280;
  --text-light:    #9ca3af;
  --surface:       #f8fafb;
  --surface-2:     #f1f5f9;
  --border:        #e2e8f0;
  --white:         #ffffff;
  --shadow-sm:     0 1px 3px rgba(0,0,0,.08);
  --shadow-md:     0 4px 16px rgba(0,0,0,.1);
  --shadow-lg:     0 8px 32px rgba(0,0,0,.12);
  --radius-sm:     6px;
  --radius-md:     12px;
  --radius-lg:     20px;
  --radius-xl:     32px;
  --font-arabic:   'Cairo', sans-serif;
  --font-numbers:  'Poppins', sans-serif;
  --transition:    .2s cubic-bezier(.4,0,.2,1);
}

/* ============================================================
   RESET & BASE
   ============================================================ */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html {
  direction: rtl;
  font-size: 16px;
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-arabic);
  color: var(--text);
  background: var(--white);
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
}

a { color: var(--primary); text-decoration: none; transition: color var(--transition); }
a:hover { color: var(--primary-dark); }
img { max-width: 100%; height: auto; display: block; }
button, input, select, textarea { font-family: var(--font-arabic); }

/* ============================================================
   TYPOGRAPHY
   ============================================================ */
h1, h2, h3, h4, h5, h6 {
  font-weight: 700;
  line-height: 1.3;
  color: var(--text);
}
h1 { font-size: clamp(1.75rem, 4vw, 2.5rem); }
h2 { font-size: clamp(1.4rem, 3vw, 2rem); }
h3 { font-size: clamp(1.15rem, 2.5vw, 1.5rem); }

p { margin-bottom: 1rem; }

.price, .amount {
  font-family: var(--font-numbers);
  font-weight: 600;
}

/* ============================================================
   LAYOUT
   ============================================================ */
.container {
  width: 100%;
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 1.25rem;
}

.container-sm { max-width: 900px; }
.container-xs { max-width: 640px; }

.grid-2 { display: grid; grid-template-columns: repeat(2, 1fr); gap: 1.5rem; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.5rem; }
.grid-4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1.25rem; }

@media (max-width: 1024px) { .grid-4 { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 768px)  { .grid-3, .grid-2 { grid-template-columns: 1fr; } }
@media (max-width: 640px)  { .grid-4 { grid-template-columns: repeat(2, 1fr); } }

/* ============================================================
   BUTTONS
   ============================================================ */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .5rem;
  padding: .75rem 1.75rem;
  border-radius: var(--radius-md);
  font-family: var(--font-arabic);
  font-size: .95rem;
  font-weight: 600;
  cursor: pointer;
  border: 2px solid transparent;
  transition: all var(--transition);
  text-decoration: none;
  white-space: nowrap;
}

.btn-primary {
  background: var(--primary);
  color: var(--white);
  border-color: var(--primary);
}
.btn-primary:hover { background: var(--primary-dark); border-color: var(--primary-dark); color: var(--white); transform: translateY(-1px); box-shadow: var(--shadow-md); }

.btn-accent {
  background: var(--accent);
  color: var(--white);
  border-color: var(--accent);
}
.btn-accent:hover { background: var(--accent-dark); border-color: var(--accent-dark); color: var(--white); transform: translateY(-1px); box-shadow: 0 6px 20px rgba(255,107,43,.35); }

.btn-outline {
  background: transparent;
  color: var(--primary);
  border-color: var(--primary);
}
.btn-outline:hover { background: var(--primary); color: var(--white); transform: translateY(-1px); }

.btn-whatsapp {
  background: #25d366;
  color: var(--white);
  border-color: #25d366;
}
.btn-whatsapp:hover { background: #1ebe5d; transform: translateY(-1px); box-shadow: 0 6px 20px rgba(37,211,102,.35); }

.btn-lg { padding: 1rem 2.25rem; font-size: 1.05rem; }
.btn-sm { padding: .5rem 1.25rem; font-size: .85rem; }
.btn-block { width: 100%; }

.btn-cod {
  background: linear-gradient(135deg, var(--accent) 0%, #ff4500 100%);
  color: var(--white);
  font-size: 1.1rem;
  padding: 1.1rem 2rem;
  border-radius: var(--radius-md);
  border: none;
  box-shadow: 0 6px 24px rgba(255,107,43,.4);
  animation: pulseBtn 2.5s ease-in-out infinite;
  position: relative;
  overflow: hidden;
}
.btn-cod::before {
  content: '';
  position: absolute;
  top: 50%; left: -60%;
  width: 40%; height: 200%;
  background: rgba(255,255,255,.15);
  transform: translateY(-50%) skewX(-20deg);
  animation: shineBtn 3s ease-in-out infinite;
}
.btn-cod:hover { transform: translateY(-2px); box-shadow: 0 8px 28px rgba(255,107,43,.5); color: var(--white); }

@keyframes pulseBtn {
  0%, 100% { box-shadow: 0 6px 24px rgba(255,107,43,.4); }
  50% { box-shadow: 0 8px 32px rgba(255,107,43,.6); }
}
@keyframes shineBtn {
  0% { left: -60%; }
  60%, 100% { left: 120%; }
}

/* ============================================================
   FORM ELEMENTS
   ============================================================ */
.form-group { margin-bottom: 1.25rem; }
.form-label {
  display: block;
  font-size: .9rem;
  font-weight: 600;
  color: var(--text);
  margin-bottom: .4rem;
}
.form-label .required { color: #ef4444; margin-right: .2rem; }

.form-control {
  width: 100%;
  padding: .75rem 1rem;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  font-family: var(--font-arabic);
  font-size: .95rem;
  color: var(--text);
  background: var(--white);
  transition: all var(--transition);
  outline: none;
  direction: rtl;
}
.form-control:focus { border-color: var(--primary); box-shadow: 0 0 0 3px rgba(26,107,58,.12); }
.form-control::placeholder { color: var(--text-light); }
.form-control.error { border-color: #ef4444; box-shadow: 0 0 0 3px rgba(239,68,68,.1); }
.form-control.success { border-color: #22c55e; }

select.form-control { appearance: none; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24'%3E%3Cpath fill='%236b7280' d='M7 10l5 5 5-5z'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: left .75rem center; }

/* ============================================================
   SITE HEADER
   ============================================================ */
.site-header {
  background: var(--white);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 1000;
  box-shadow: var(--shadow-sm);
}

.header-top {
  background: var(--primary);
  color: rgba(255,255,255,.9);
  font-size: .82rem;
  padding: .4rem 0;
  text-align: center;
}

.header-main {
  padding: .85rem 0;
  display: flex;
  align-items: center;
  gap: 1.5rem;
}

.site-logo img { height: 52px; width: auto; }
.site-logo-text {
  font-size: 1.5rem;
  font-weight: 800;
  color: var(--primary);
  display: flex;
  align-items: center;
  gap: .4rem;
}
.site-logo-text span { color: var(--accent); }

.header-search {
  flex: 1;
  max-width: 480px;
  position: relative;
}
.header-search input {
  width: 100%;
  padding: .65rem 1rem .65rem 3rem;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-xl);
  font-family: var(--font-arabic);
  font-size: .9rem;
  outline: none;
  transition: all var(--transition);
  direction: rtl;
}
.header-search input:focus { border-color: var(--primary); box-shadow: 0 0 0 3px rgba(26,107,58,.1); }
.header-search-btn {
  position: absolute;
  left: .75rem;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  cursor: pointer;
  color: var(--text-muted);
  padding: 0;
  display: flex;
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-right: auto;
}

.header-icon-btn {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: .15rem;
  color: var(--text);
  font-size: .72rem;
  cursor: pointer;
  background: none;
  border: none;
  padding: .3rem .5rem;
  border-radius: var(--radius-sm);
  transition: all var(--transition);
}
.header-icon-btn:hover { color: var(--primary); background: var(--primary-light); }
.header-icon-btn svg { width: 22px; height: 22px; }
.header-icon-btn .badge {
  position: absolute;
  top: -2px;
  left: -2px;
  background: var(--accent);
  color: var(--white);
  font-size: .65rem;
  font-weight: 700;
  width: 18px; height: 18px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-numbers);
}

/* ============================================================
   NAV
   ============================================================ */
.site-nav {
  background: var(--white);
  border-top: 1px solid var(--border);
}

.nav-list {
  display: flex;
  align-items: center;
  gap: 0;
  list-style: none;
  padding: 0;
  margin: 0;
  overflow-x: auto;
}

.nav-list li a {
  display: block;
  padding: .7rem 1.15rem;
  color: var(--text);
  font-size: .9rem;
  font-weight: 500;
  white-space: nowrap;
  transition: all var(--transition);
  border-bottom: 2px solid transparent;
}
.nav-list li a:hover,
.nav-list li.current-menu-item a { color: var(--primary); border-bottom-color: var(--primary); }

/* ============================================================
   HERO BANNER
   ============================================================ */
.hero {
  background: linear-gradient(135deg, var(--primary-dark) 0%, var(--primary) 60%, #2d9c5f 100%);
  color: var(--white);
  padding: 4rem 0;
  position: relative;
  overflow: hidden;
}
.hero::before {
  content: '';
  position: absolute;
  top: -40%; right: -10%;
  width: 60%; height: 200%;
  background: rgba(255,255,255,.03);
  border-radius: 50%;
}

.hero-content { position: relative; z-index: 1; }
.hero h1 { color: var(--white); font-size: clamp(2rem, 5vw, 3rem); margin-bottom: 1rem; }
.hero p { font-size: 1.1rem; opacity: .9; max-width: 520px; margin-bottom: 2rem; }
.hero-badge {
  display: inline-block;
  background: var(--accent);
  color: var(--white);
  font-size: .8rem;
  font-weight: 700;
  padding: .3rem .9rem;
  border-radius: var(--radius-xl);
  margin-bottom: 1rem;
  text-transform: uppercase;
  letter-spacing: .05em;
}

/* ============================================================
   PRODUCT CARDS
   ============================================================ */
.product-card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  overflow: hidden;
  transition: all var(--transition);
  position: relative;
}
.product-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); border-color: var(--primary); }

.product-card-image {
  position: relative;
  padding-top: 100%;
  overflow: hidden;
  background: var(--surface);
}
.product-card-image img {
  position: absolute;
  inset: 0;
  width: 100%; height: 100%;
  object-fit: cover;
  transition: transform .4s ease;
}
.product-card:hover .product-card-image img { transform: scale(1.05); }

.product-card-badge {
  position: absolute;
  top: .75rem;
  right: .75rem;
  background: var(--accent);
  color: var(--white);
  font-size: .72rem;
  font-weight: 700;
  padding: .2rem .65rem;
  border-radius: var(--radius-xl);
  z-index: 1;
}
.product-card-badge.new { background: var(--primary); }
.product-card-badge.sale { background: #ef4444; }

.product-card-wishlist {
  position: absolute;
  top: .75rem;
  left: .75rem;
  width: 36px; height: 36px;
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 1;
  transition: all var(--transition);
  color: var(--text-muted);
}
.product-card-wishlist:hover { color: #ef4444; border-color: #ef4444; transform: scale(1.1); }
.product-card-wishlist.active { color: #ef4444; border-color: #ef4444; background: #fff5f5; }

.product-card-body { padding: 1rem; }
.product-card-category { font-size: .75rem; color: var(--text-muted); margin-bottom: .3rem; }
.product-card-title {
  font-size: .95rem;
  font-weight: 600;
  color: var(--text);
  margin-bottom: .5rem;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.product-card-price {
  display: flex;
  align-items: center;
  gap: .5rem;
  margin-bottom: .75rem;
}
.product-card-price .current-price {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--primary);
  font-family: var(--font-numbers);
}
.product-card-price .original-price {
  font-size: .85rem;
  color: var(--text-muted);
  text-decoration: line-through;
  font-family: var(--font-numbers);
}
.product-card-price .currency { font-size: .8rem; color: var(--text-muted); }
.product-card-price .discount-badge {
  font-size: .72rem;
  background: #fef3c7;
  color: #92400e;
  padding: .15rem .5rem;
  border-radius: var(--radius-sm);
  font-weight: 700;
}

.product-card-rating {
  display: flex;
  align-items: center;
  gap: .35rem;
  margin-bottom: .75rem;
}
.stars { color: #f59e0b; font-size: .85rem; letter-spacing: .05em; }
.rating-count { font-size: .75rem; color: var(--text-muted); }

.product-card-actions {
  display: flex;
  gap: .5rem;
  margin-top: auto;
}
.btn-buy-now {
  flex: 1;
  padding: .65rem 1rem;
  background: var(--accent);
  color: var(--white);
  border: none;
  border-radius: var(--radius-sm);
  font-family: var(--font-arabic);
  font-size: .88rem;
  font-weight: 600;
  cursor: pointer;
  transition: all var(--transition);
}
.btn-buy-now:hover { background: var(--accent-dark); transform: translateY(-1px); }

.btn-add-cart {
  padding: .65rem;
  background: var(--primary-light);
  color: var(--primary);
  border: 1px solid var(--primary);
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: all var(--transition);
  display: flex;
  align-items: center;
  justify-content: center;
}
.btn-add-cart:hover { background: var(--primary); color: var(--white); }

/* ============================================================
   COD POPUP MODAL
   ============================================================ */
.cod-overlay {
  position: fixed;
  inset: 0;
  background: rgba(15,15,25,.65);
  backdrop-filter: blur(4px);
  z-index: 9998;
  opacity: 0;
  visibility: hidden;
  transition: all .3s ease;
  display: flex;
  align-items: flex-end;
  justify-content: center;
}

@media (min-width: 768px) {
  .cod-overlay { align-items: center; }
}

.cod-overlay.active { opacity: 1; visibility: visible; }

.cod-modal {
  background: var(--white);
  width: 100%;
  max-width: 540px;
  border-radius: var(--radius-lg) var(--radius-lg) 0 0;
  padding: 1.5rem;
  max-height: 92vh;
  overflow-y: auto;
  transform: translateY(100%);
  transition: transform .35s cubic-bezier(.32,.72,0,1);
  position: relative;
}

@media (min-width: 768px) {
  .cod-modal {
    border-radius: var(--radius-lg);
    transform: translateY(20px) scale(.97);
    max-height: 90vh;
  }
}

.cod-overlay.active .cod-modal { transform: translateY(0) scale(1); }

.cod-modal-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  margin-bottom: 1.25rem;
  gap: 1rem;
}
.cod-modal-title { font-size: 1.15rem; font-weight: 700; color: var(--text); }
.cod-modal-subtitle { font-size: .83rem; color: var(--text-muted); margin-top: .2rem; }

.cod-modal-close {
  width: 36px; height: 36px;
  border-radius: 50%;
  border: none;
  background: var(--surface-2);
  color: var(--text-muted);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  font-size: 1.2rem;
  transition: all var(--transition);
}
.cod-modal-close:hover { background: var(--border); color: var(--text); }

.cod-product-preview {
  display: flex;
  align-items: center;
  gap: 1rem;
  background: var(--surface);
  border-radius: var(--radius-md);
  padding: .85rem 1rem;
  margin-bottom: 1.25rem;
  border: 1px solid var(--border);
}
.cod-product-thumb {
  width: 64px;
  height: 64px;
  border-radius: var(--radius-sm);
  object-fit: cover;
  flex-shrink: 0;
}
.cod-product-name { font-weight: 600; font-size: .92rem; margin-bottom: .3rem; }
.cod-product-price {
  font-family: var(--font-numbers);
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--primary);
}
.cod-product-price .original {
  font-size: .82rem;
  text-decoration: line-through;
  color: var(--text-muted);
  margin-right: .4rem;
}

.cod-qty-selector {
  display: flex;
  align-items: center;
  gap: .5rem;
  margin-right: auto;
}
.cod-qty-selector label { font-size: .8rem; color: var(--text-muted); }
.qty-input-group { display: flex; align-items: center; border: 1.5px solid var(--border); border-radius: var(--radius-sm); overflow: hidden; }
.qty-btn {
  width: 32px; height: 32px;
  background: var(--surface);
  border: none;
  cursor: pointer;
  font-size: 1.1rem;
  color: var(--text);
  transition: background var(--transition);
  display: flex; align-items: center; justify-content: center;
}
.qty-btn:hover { background: var(--border); }
.qty-num {
  width: 40px;
  text-align: center;
  border: none;
  font-family: var(--font-numbers);
  font-weight: 600;
  font-size: .95rem;
  outline: none;
  background: var(--white);
}

.cod-form-divider {
  display: flex;
  align-items: center;
  gap: .75rem;
  margin: 1.1rem 0;
  color: var(--text-muted);
  font-size: .82rem;
}
.cod-form-divider::before,
.cod-form-divider::after { content: ''; flex: 1; height: 1px; background: var(--border); }

.cod-steps {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: .5rem;
  margin-bottom: 1.25rem;
}
.cod-step {
  display: flex;
  align-items: center;
  gap: .35rem;
  font-size: .8rem;
  color: var(--text-muted);
}
.cod-step.active { color: var(--primary); font-weight: 600; }
.cod-step-num {
  width: 22px; height: 22px;
  border-radius: 50%;
  border: 1.5px solid currentColor;
  display: flex; align-items: center; justify-content: center;
  font-size: .72rem;
  font-family: var(--font-numbers);
  font-weight: 600;
}
.cod-step.active .cod-step-num { background: var(--primary); color: var(--white); border-color: var(--primary); }
.cod-step.done .cod-step-num { background: #22c55e; color: var(--white); border-color: #22c55e; }
.cod-step-line { flex: 1; height: 1.5px; background: var(--border); max-width: 40px; }
.cod-step.done ~ .cod-step-line { background: #22c55e; }

.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: .75rem; }
@media (max-width: 480px) { .form-row { grid-template-columns: 1fr; } }

.upsell-item {
  display: flex;
  align-items: center;
  gap: .75rem;
  padding: .75rem;
  border: 1.5px dashed var(--border);
  border-radius: var(--radius-md);
  margin-bottom: .65rem;
  cursor: pointer;
  transition: all var(--transition);
}
.upsell-item:hover,
.upsell-item.selected { border-color: var(--primary); background: var(--primary-light); }
.upsell-item.selected { border-style: solid; }
.upsell-item img { width: 48px; height: 48px; border-radius: var(--radius-sm); object-fit: cover; flex-shrink: 0; }
.upsell-item-name { font-size: .85rem; font-weight: 500; flex: 1; }
.upsell-item-price { font-family: var(--font-numbers); font-size: .88rem; font-weight: 700; color: var(--primary); }
.upsell-discount { background: var(--accent); color: var(--white); font-size: .68rem; padding: .1rem .45rem; border-radius: var(--radius-xl); font-weight: 700; }
.upsell-checkbox { width: 20px; height: 20px; accent-color: var(--primary); flex-shrink: 0; cursor: pointer; }

.cod-total-preview {
  background: var(--primary-light);
  border: 1px solid rgba(26,107,58,.2);
  border-radius: var(--radius-md);
  padding: .9rem 1rem;
  margin-bottom: 1.25rem;
}
.cod-total-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: .88rem;
  padding: .2rem 0;
}
.cod-total-row.final {
  font-size: 1rem;
  font-weight: 700;
  color: var(--primary);
  border-top: 1px solid rgba(26,107,58,.2);
  margin-top: .4rem;
  padding-top: .6rem;
}
.cod-total-row .amount { font-family: var(--font-numbers); }

.cod-trust-badges {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1.25rem;
  padding: .75rem;
  background: var(--surface);
  border-radius: var(--radius-md);
  margin-bottom: 1rem;
  flex-wrap: wrap;
}
.cod-trust-badge {
  display: flex;
  align-items: center;
  gap: .3rem;
  font-size: .75rem;
  color: var(--text-muted);
}
.cod-trust-badge svg { width: 16px; height: 16px; color: var(--primary); }

.cod-submit-area { margin-top: 1rem; }
.cod-submit-btn {
  width: 100%;
  padding: 1.1rem;
  background: linear-gradient(135deg, var(--accent), #ff4500);
  color: var(--white);
  border: none;
  border-radius: var(--radius-md);
  font-family: var(--font-arabic);
  font-size: 1.05rem;
  font-weight: 700;
  cursor: pointer;
  transition: all var(--transition);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: .6rem;
  box-shadow: 0 6px 20px rgba(255,107,43,.35);
}
.cod-submit-btn:hover { transform: translateY(-2px); box-shadow: 0 8px 28px rgba(255,107,43,.45); }
.cod-submit-btn:disabled { opacity: .65; cursor: not-allowed; transform: none; }

.cod-whatsapp-btn {
  width: 100%;
  padding: .85rem;
  background: #25d366;
  color: var(--white);
  border: none;
  border-radius: var(--radius-md);
  font-family: var(--font-arabic);
  font-size: .95rem;
  font-weight: 600;
  cursor: pointer;
  margin-top: .65rem;
  transition: all var(--transition);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: .5rem;
}
.cod-whatsapp-btn:hover { background: #1ebe5d; transform: translateY(-1px); }

.cod-success-state {
  text-align: center;
  padding: 2rem 1rem;
  display: none;
}
.cod-success-state.active { display: block; }
.cod-success-icon {
  width: 72px; height: 72px;
  background: linear-gradient(135deg, #22c55e, #16a34a);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 1.25rem;
  box-shadow: 0 8px 24px rgba(34,197,94,.3);
}
.cod-success-title { font-size: 1.3rem; font-weight: 700; color: var(--primary); margin-bottom: .5rem; }
.cod-success-msg { color: var(--text-muted); font-size: .92rem; margin-bottom: 1.5rem; }
.cod-order-number {
  display: inline-block;
  background: var(--primary-light);
  color: var(--primary);
  font-family: var(--font-numbers);
  font-size: 1.1rem;
  font-weight: 700;
  padding: .5rem 1.5rem;
  border-radius: var(--radius-md);
  margin-bottom: 1.25rem;
  border: 1px solid rgba(26,107,58,.2);
}

/* ============================================================
   SECTION BLOCKS
   ============================================================ */
.section { padding: 3rem 0; }
.section-header { margin-bottom: 2rem; }
.section-header h2 { margin-bottom: .4rem; }
.section-header p { color: var(--text-muted); }
.section-header .section-actions { margin-top: .75rem; }

.categories-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 1rem; }
.category-card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 1.25rem 1rem;
  text-align: center;
  cursor: pointer;
  transition: all var(--transition);
  display: block;
}
.category-card:hover { border-color: var(--primary); transform: translateY(-3px); box-shadow: var(--shadow-md); }
.category-card img,
.category-card .cat-emoji { font-size: 2.2rem; margin-bottom: .6rem; display: block; text-align: center; }
.category-card img { width: 56px; height: 56px; object-fit: contain; margin: 0 auto .6rem; }
.category-card .cat-name { font-size: .88rem; font-weight: 600; color: var(--text); }
.category-card .cat-count { font-size: .75rem; color: var(--text-muted); margin-top: .15rem; }

/* ============================================================
   FEATURES / TRUST BAR
   ============================================================ */
.trust-bar {
  background: var(--surface);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  padding: 1.25rem 0;
}
.trust-bar-grid { display: flex; flex-wrap: wrap; justify-content: center; gap: 1.5rem 3rem; }
.trust-item {
  display: flex;
  align-items: center;
  gap: .6rem;
  font-size: .88rem;
  color: var(--text-muted);
}
.trust-item svg { width: 22px; height: 22px; color: var(--primary); flex-shrink: 0; }
.trust-item strong { color: var(--text); }

/* ============================================================
   SINGLE PRODUCT PAGE
   ============================================================ */
.product-page { padding: 2rem 0; }
.product-page-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 3rem; align-items: start; }
@media (max-width: 900px) { .product-page-grid { grid-template-columns: 1fr; gap: 2rem; } }

.product-images { position: sticky; top: 90px; }
.product-main-image {
  border-radius: var(--radius-md);
  overflow: hidden;
  margin-bottom: .75rem;
  border: 1px solid var(--border);
  aspect-ratio: 1;
}
.product-main-image img { width: 100%; height: 100%; object-fit: cover; }
.product-thumbnails { display: flex; gap: .5rem; flex-wrap: wrap; }
.product-thumb {
  width: 72px; height: 72px;
  border-radius: var(--radius-sm);
  border: 2px solid var(--border);
  cursor: pointer;
  object-fit: cover;
  transition: all var(--transition);
}
.product-thumb:hover,
.product-thumb.active { border-color: var(--primary); }

.product-info { }
.product-breadcrumb { font-size: .8rem; color: var(--text-muted); margin-bottom: .75rem; }
.product-breadcrumb a { color: var(--text-muted); }
.product-breadcrumb span { margin: 0 .3rem; }
.product-category-tag {
  display: inline-block;
  background: var(--primary-light);
  color: var(--primary);
  font-size: .75rem;
  font-weight: 600;
  padding: .25rem .75rem;
  border-radius: var(--radius-xl);
  margin-bottom: .75rem;
}
.product-title { font-size: clamp(1.3rem, 3vw, 1.9rem); margin-bottom: 1rem; }
.product-rating { display: flex; align-items: center; gap: .5rem; margin-bottom: 1rem; }
.product-price-wrap { margin-bottom: 1.25rem; }
.product-price { font-size: 2rem; font-weight: 800; color: var(--primary); font-family: var(--font-numbers); }
.product-price-original { font-size: 1.1rem; color: var(--text-muted); text-decoration: line-through; margin-right: .5rem; font-family: var(--font-numbers); }
.product-save-badge {
  display: inline-block;
  background: var(--accent-light);
  color: var(--accent);
  font-size: .8rem;
  font-weight: 700;
  padding: .25rem .75rem;
  border-radius: var(--radius-xl);
  margin-right: .5rem;
}

.product-short-desc { color: var(--text-muted); font-size: .95rem; margin-bottom: 1.25rem; line-height: 1.7; }
.product-divider { border: none; border-top: 1px solid var(--border); margin: 1.25rem 0; }

.product-options { margin-bottom: 1.25rem; }
.product-options label { font-size: .88rem; font-weight: 600; margin-bottom: .5rem; display: block; }
.swatch-group { display: flex; gap: .5rem; flex-wrap: wrap; }
.swatch {
  width: 36px; height: 36px;
  border-radius: 50%;
  border: 2px solid var(--border);
  cursor: pointer;
  transition: all var(--transition);
}
.swatch:hover,
.swatch.active { border-color: var(--primary); transform: scale(1.1); box-shadow: 0 0 0 2px var(--primary); }

.size-group { display: flex; gap: .5rem; flex-wrap: wrap; }
.size-btn {
  padding: .4rem .9rem;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: .85rem;
  cursor: pointer;
  background: var(--white);
  transition: all var(--transition);
  font-family: var(--font-arabic);
}
.size-btn:hover,
.size-btn.active { border-color: var(--primary); background: var(--primary-light); color: var(--primary); font-weight: 600; }

.product-cta { display: flex; flex-direction: column; gap: .75rem; margin-bottom: 1.5rem; }
.product-qty-row { display: flex; align-items: center; gap: 1rem; }

.product-features {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: .6rem;
  margin-bottom: 1.5rem;
}
.product-feature-item {
  display: flex;
  align-items: center;
  gap: .5rem;
  font-size: .83rem;
  color: var(--text-muted);
}
.product-feature-item svg { width: 16px; height: 16px; color: var(--primary); flex-shrink: 0; }

/* ============================================================
   SITE FOOTER
   ============================================================ */
.site-footer {
  background: #0f1f17;
  color: rgba(255,255,255,.75);
  padding: 3rem 0 1.5rem;
  margin-top: 4rem;
}
.footer-grid { display: grid; grid-template-columns: 2fr 1fr 1fr 1fr; gap: 2.5rem; margin-bottom: 2.5rem; }
@media (max-width: 900px) { .footer-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 640px) { .footer-grid { grid-template-columns: 1fr; gap: 1.75rem; } }

.footer-brand .footer-logo { font-size: 1.5rem; font-weight: 800; color: var(--white); margin-bottom: .75rem; }
.footer-brand .footer-logo span { color: var(--accent); }
.footer-brand p { font-size: .88rem; line-height: 1.7; color: rgba(255,255,255,.6); margin-bottom: 1rem; }

.footer-social { display: flex; gap: .6rem; }
.footer-social a {
  width: 38px; height: 38px;
  border-radius: var(--radius-sm);
  background: rgba(255,255,255,.08);
  display: flex; align-items: center; justify-content: center;
  color: rgba(255,255,255,.7);
  transition: all var(--transition);
  font-size: 1.1rem;
}
.footer-social a:hover { background: var(--accent); color: var(--white); transform: translateY(-2px); }

.footer-col h4 { font-size: .9rem; font-weight: 700; color: var(--white); margin-bottom: 1rem; }
.footer-links { list-style: none; }
.footer-links li { margin-bottom: .5rem; }
.footer-links a { font-size: .85rem; color: rgba(255,255,255,.6); transition: color var(--transition); }
.footer-links a:hover { color: var(--white); }

.footer-contact-item {
  display: flex;
  align-items: flex-start;
  gap: .6rem;
  margin-bottom: .6rem;
  font-size: .83rem;
  color: rgba(255,255,255,.65);
}
.footer-contact-item svg { width: 16px; height: 16px; color: var(--accent); flex-shrink: 0; margin-top: .15rem; }

.footer-bottom {
  border-top: 1px solid rgba(255,255,255,.08);
  padding-top: 1.25rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: .75rem;
}
.footer-bottom p { font-size: .8rem; color: rgba(255,255,255,.45); }
.footer-payment-methods { display: flex; align-items: center; gap: .5rem; }
.payment-badge {
  height: 22px;
  padding: 2px 8px;
  background: rgba(255,255,255,.1);
  border-radius: 4px;
  font-size: .7rem;
  color: rgba(255,255,255,.7);
  display: flex;
  align-items: center;
}

/* ============================================================
   NOTIFICATIONS / ALERTS
   ============================================================ */
.alert {
  padding: .85rem 1rem;
  border-radius: var(--radius-sm);
  border: 1px solid transparent;
  font-size: .9rem;
  display: flex;
  align-items: flex-start;
  gap: .6rem;
  margin-bottom: 1rem;
}
.alert-success { background: #f0fdf4; border-color: #86efac; color: #166534; }
.alert-danger  { background: #fef2f2; border-color: #fca5a5; color: #991b1b; }
.alert-warning { background: #fffbeb; border-color: #fcd34d; color: #92400e; }
.alert-info    { background: #eff6ff; border-color: #93c5fd; color: #1e40af; }

.toast-container {
  position: fixed;
  top: 1.25rem;
  right: 1.25rem;
  z-index: 9999;
  display: flex;
  flex-direction: column;
  gap: .65rem;
  pointer-events: none;
}
.toast {
  background: var(--white);
  border: 1px solid var(--border);
  border-right: 4px solid var(--primary);
  border-radius: var(--radius-sm);
  padding: .85rem 1.1rem;
  box-shadow: var(--shadow-lg);
  font-size: .88rem;
  max-width: 320px;
  animation: toastIn .35s ease;
  pointer-events: auto;
  display: flex;
  align-items: center;
  gap: .6rem;
}
.toast.error { border-right-color: #ef4444; }
.toast.warning { border-right-color: #f59e0b; }

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

/* ============================================================
   LOADING SPINNER
   ============================================================ */
.spinner {
  width: 20px; height: 20px;
  border: 2.5px solid rgba(255,255,255,.4);
  border-top-color: var(--white);
  border-radius: 50%;
  animation: spin .7s linear infinite;
  display: inline-block;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ============================================================
   UTILITIES
   ============================================================ */
.text-center { text-align: center; }
.text-muted { color: var(--text-muted); }
.font-bold { font-weight: 700; }
.d-none { display: none !important; }
.d-flex { display: flex; }
.align-center { align-items: center; }
.gap-1 { gap: .5rem; }
.gap-2 { gap: 1rem; }
.mt-1 { margin-top: .5rem; }
.mt-2 { margin-top: 1rem; }
.mb-2 { margin-bottom: 1rem; }

/* ============================================================
   SCROLL ANIMATIONS
   ============================================================ */
.fade-in { opacity: 0; transform: translateY(20px); transition: opacity .6s ease, transform .6s ease; }
.fade-in.visible { opacity: 1; transform: translateY(0); }

/* ============================================================
   MOBILE NAV DRAWER
   ============================================================ */
.mobile-nav-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,.5);
  z-index: 9990;
}
.mobile-nav-overlay.active { display: block; }
.mobile-nav-drawer {
  position: fixed;
  top: 0; right: -100%;
  width: 85%; max-width: 340px;
  height: 100%;
  background: var(--white);
  z-index: 9991;
  padding: 1.5rem;
  overflow-y: auto;
  transition: right .3s ease;
}
.mobile-nav-drawer.active { right: 0; }
.mobile-nav-close {
  position: absolute;
  top: 1rem; left: 1rem;
  width: 36px; height: 36px;
  border-radius: 50%;
  border: none;
  background: var(--surface-2);
  cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  font-size: 1.2rem;
}

/* ============================================================
   RESPONSIVE HELPERS
   ============================================================ */
@media (max-width: 768px) {
  .hide-mobile { display: none !important; }
  .header-search { display: none; }
  .header-main { flex-wrap: wrap; }
  .product-page-grid { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr; }
}
@media (min-width: 769px) { .show-mobile-only { display: none !important; } }
