@import url('https://fonts.googleapis.com/css2?family=Cairo:wght@400;600;700;800;900&display=swap');

/* ===================== الهوية البصرية =====================
   متجر ساعات فاخرة:
   - كحلي داكن جداً للخلفيات الرئيسية (Top bar / قسم المنتجات)
   - أبيض للهيدر والفوتر
   - أزرق مشرق للعناصر التفاعلية
   - وردي/أحمر للخصومات
   ========================================================= */
:root {
  --navy-950: #0a1224;
  --navy-900: #0d1730;
  --navy-800: #12203f;
  --navy-700: #1a2c56;
  --navy-650: #213462;
  --blue: #3b82f6;
  --blue-soft: #60a5fa;
  --blue-line: rgba(96, 150, 250, 0.35);
  --ink: #18264a;
  --ink-soft: #3a4a72;
  --text: #eef2ff;
  --text-sub: #93a3d8;
  --muted: #7485b4;
  --line-dark: rgba(140, 165, 255, 0.13);
  --line-white: #e8edf7;
  --pink: #e93a74;
  --green: #25D366;
  --radius: 16px;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; overflow-x: hidden; overflow-x: clip; }

body {
  margin: 0;
  background: var(--navy-950);
  color: var(--text);
  font-family: 'Cairo', 'Segoe UI', sans-serif;
  direction: rtl;
  line-height: 1.7;
  overflow-x: hidden;
  overflow-x: clip;
  -webkit-font-smoothing: antialiased;
}

/* ===================== تثبيت الصفحة: منع التمرير الأفقي =====================
   ضمان أن الصفحة لا تتحرك يميناً أو يساراً على أي شاشة (هاتف/كمبيوتر):
   clip يقطع أي تجاوز أفقي بشكل جذري مع احتفاظ overflow-x:hidden كاحتياط
   للمتصفحات الأقدم، وتحتوى الأقسام الداخلية على max-width:100%. */
.checkout-page, .cart-page { overflow-x: hidden; overflow-x: clip; max-width: 100vw; }
.checkout-page .container, .cart-page .container { max-width: 100%; }
#checkoutForm, .checkout-layout, .checkout-layout-fixed,
.checkout-form, .checkout-summary, .co-items, .pay-cards, .pay-card,
.summary-card, .cart-layout, .cart-list, #cartItemsWrap { max-width: 100%; }

button, input, select, textarea { font-family: 'Cairo', 'Segoe UI', sans-serif; }
a { color: inherit; }
img { max-width: 100%; }

.container {
  max-width: 1180px;
  margin: 0 auto;
  padding: 0 22px;
}

/* ===================== الشريط العلوي ===================== */
.topbar {
  background: var(--navy-950);
  color: var(--text-sub);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 7px 22px;
  font-size: 0.78rem;
  border-bottom: 1px solid var(--line-dark);
}
.topbar-tagline { display: flex; align-items: center; gap: 7px; }
.topbar-phone {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--blue-soft);
  font-weight: 700;
  text-decoration: none;
  direction: ltr;
}
.topbar-phone svg { color: var(--blue-soft); }

/* ===================== الهيدر الأبيض ===================== */
.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  background: #ffffff;
  border-bottom: 1px solid var(--line-white);
  box-shadow: 0 6px 26px rgba(13, 23, 48, 0.06);
}
.header-inner {
  display: flex;
  align-items: center;
  gap: 26px;
  padding-top: 14px;
  padding-bottom: 14px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  flex-shrink: 0;
}
.brand-logo {
  width: 48px;
  height: 48px;
  border-radius: 13px;
  background: var(--navy-900);
  color: var(--blue-soft);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.brand-text { display: flex; flex-direction: column; line-height: 1.35; }
.brand-text b { font-size: 1.12rem; font-weight: 900; color: var(--ink); }
.brand-text small { font-size: 0.72rem; color: var(--ink-soft); font-weight: 600; }

/* شريط البحث */
.search {
  position: relative;
  flex: 1;
  max-width: 470px;
  min-width: 200px;
  margin: 0 auto;
}
.search-input {
  width: 100%;
  background: var(--navy-900);
  border: 1px solid transparent;
  border-radius: 999px;
  padding: 12px 20px 12px 58px;
  color: #ffffff;
  font-size: 0.95rem;
  transition: border-color .18s ease, box-shadow .18s ease;
}
.search-input::placeholder { color: rgba(220, 228, 255, 0.55); }
.search-input:focus {
  outline: none;
  border-color: var(--blue);
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.25);
}
.search-input::-webkit-search-cancel-button { display: none; }
.search-btn {
  position: absolute;
  top: 50%;
  left: 6px;
  transform: translateY(-50%);
  width: 38px;
  height: 38px;
  border-radius: 50%;
  border: none;
  background: var(--blue);
  color: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background .18s ease, transform .12s ease;
}
.search-btn:hover { background: var(--blue-soft); }
.search-btn:active { transform: translateY(-50%) scale(0.94); }

/* التنقل + السلة */
.header-actions {
  display: flex;
  align-items: center;
  gap: 20px;
  flex-shrink: 0;
}
.main-nav { display: flex; align-items: center; gap: 20px; }
.main-nav a {
  text-decoration: none;
  color: var(--ink);
  font-weight: 800;
  font-size: 0.95rem;
  position: relative;
  padding: 4px 0;
}
.main-nav a:hover { color: var(--blue); }
.main-nav a::after {
  content: '';
  position: absolute;
  bottom: 0;
  right: 0;
  width: 0;
  height: 2px;
  border-radius: 99px;
  background: var(--blue);
  transition: width .2s ease;
}
.main-nav a:hover::after { width: 100%; }

.cart-btn {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 9px;
  background: var(--navy-900);
  color: var(--text);
  border: 1px solid var(--line-dark);
  border-radius: 999px;
  padding: 11px 20px;
  font-weight: 800;
  font-size: 0.92rem;
  cursor: pointer;
  transition: border-color .18s ease, box-shadow .18s ease, transform .12s ease;
}
.cart-btn:hover {
  border-color: var(--blue);
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.18);
  transform: translateY(-1px);
}
.cart-icon { color: var(--blue-soft); display: flex; }
.cart-count {
  position: absolute;
  top: -7px;
  left: -6px;
  min-width: 21px;
  height: 21px;
  padding: 0 5px;
  border-radius: 999px;
  background: var(--blue);
  color: #ffffff;
  font-size: 0.72rem;
  font-weight: 900;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 2px 8px rgba(59, 130, 246, 0.5);
}

/* ===================== قسم المنتجات ===================== */
.products-section {
  background: var(--navy-950);
  padding: 52px 0 80px;
}
.section-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 34px;
}
.section-title { display: flex; align-items: center; gap: 12px; }
.accent-bar {
  width: 4px;
  height: 27px;
  border-radius: 99px;
  background: var(--blue);
  flex-shrink: 0;
}
.section-title h2 {
  margin: 0;
  color: #ffffff;
  font-size: clamp(1.3rem, 3vw, 1.7rem);
  font-weight: 900;
}
.section-sub {
  margin: 10px 0 0 16px;
  color: var(--text-sub);
  font-size: 0.92rem;
}
.view-all {
  color: var(--blue-soft);
  font-weight: 800;
  text-decoration: none;
  font-size: 0.95rem;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  white-space: nowrap;
  padding-bottom: 4px;
}
.view-all:hover { color: var(--blue); }
.view-all span { transition: transform .2s ease; }
.view-all:hover span { transform: translateX(-4px); }

/* شبكة المنتجات */
.product-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 22px;
}

.product-card {
  background: var(--navy-900);
  border: 1px solid var(--line-dark);
  border-radius: var(--radius);
  overflow: hidden;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  transition: border-color .22s ease, transform .18s ease;
}
.product-card:hover {
  border-color: var(--blue-line);
  transform: translateY(-4px);
}
.product-card:active { transform: translateY(0) scale(0.99); }

.card-media {
  position: relative;
  background: var(--navy-800);
  overflow: hidden;
}
.card-media img {
  width: 100%;
  aspect-ratio: 1;
  object-fit: cover;
  display: block;
  transition: transform .4s ease;
}
.product-card:hover .card-media img { transform: scale(1.05); }

/* شارة الخصم (وردي/أحمر) */
.badge {
  position: absolute;
  top: 11px;
  right: 11px;
  background: var(--pink);
  color: #ffffff;
  font-size: 0.72rem;
  font-weight: 800;
  padding: 4px 11px;
  border-radius: 999px;
  box-shadow: 0 4px 14px rgba(233, 58, 116, 0.4);
}
.badge-out {
  background: #2c3552;
  color: var(--text-sub);
  box-shadow: none;
}

.product-info { padding: 13px 16px 16px; display: flex; flex-direction: column; }
.product-info h3 {
  margin: 0;
  color: #ffffff;
  font-size: 0.97rem;
  font-weight: 800;
  line-height: 1.5;
  min-height: 44px;
}
.product-desc {
  color: var(--text-sub);
  font-size: 0.8rem;
  margin: 0 0 8px;
  display: -webkit-box;
  -webkit-line-clamp: 1;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.divider {
  height: 1px;
  background: var(--line-dark);
  margin: 9px 0 11px;
}

/* صف السعر + الزر */
.card-price-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-top: auto;
}
.price-stack { display: flex; flex-direction: column; line-height: 1.3; }
.price-now { color: #ffffff; font-weight: 900; font-size: 1.14rem; }
.price-old {
  color: var(--muted);
  font-weight: 400;
  font-size: 0.76rem;
  text-decoration: line-through;
}

.btn-add {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  background: var(--navy-700);
  border: 1px solid var(--blue-line);
  color: var(--blue-soft);
  border-radius: 10px;
  padding: 9px 14px;
  font-size: 0.84rem;
  font-weight: 800;
  cursor: pointer;
  white-space: nowrap;
  transition: background .18s ease, color .18s ease, border-color .18s ease;
}
.btn-add svg { color: var(--blue-soft); }
.btn-add:hover {
  background: var(--blue);
  border-color: var(--blue);
  color: #ffffff;
}
.btn-add:hover svg { color: #ffffff; }
.btn-add:disabled {
  background: #1b2440;
  color: var(--muted);
  border-color: transparent;
  cursor: not-allowed;
}
.btn-add:disabled svg { color: var(--muted); }

.empty-msg { color: var(--text-sub); text-align: center; grid-column: 1/-1; padding: 60px 0; font-size: 1rem; }

/* ===================== الفوتر الأبيض ===================== */
.site-footer { background: #ffffff; color: var(--ink-soft); }
.footer-grid {
  display: grid;
  grid-template-columns: 1.35fr 1fr 1fr 1.2fr;
  gap: 40px;
  padding-top: 56px;
  padding-bottom: 46px;
}
.brand-dark .brand-text b { color: var(--ink); }
.brand-dark .brand-text small { color: var(--ink-soft); }
.brand-dark .brand-logo {
  background: var(--navy-900);
  color: var(--blue-soft);
}
.footer-desc {
  margin: 18px 0 0;
  font-size: 0.9rem;
  line-height: 2;
  color: var(--ink-soft);
}
.socials { display: flex; gap: 12px; margin-top: 18px; }
.social-link {
  width: 40px;
  height: 40px;
  border-radius: 11px;
  background: #eef2fb;
  color: var(--blue);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background .18s ease, color .18s ease, transform .15s ease;
}
.social-link:hover { background: var(--blue); color: #ffffff; transform: translateY(-2px); }

.wa-btn {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  margin-top: 16px;
  background: var(--green);
  color: #ffffff;
  text-decoration: none;
  font-weight: 800;
  font-size: 0.92rem;
  border-radius: 12px;
  padding: 13px 20px;
  transition: filter .18s ease, transform .15s ease;
}
.wa-btn:hover { filter: brightness(1.06); transform: translateY(-2px); }

.footer-title {
  margin: 0 0 18px;
  color: var(--ink);
  font-size: 1.02rem;
  font-weight: 900;
  position: relative;
  padding-bottom: 10px;
}
.footer-title::after {
  content: '';
  position: absolute;
  bottom: 0;
  right: 0;
  width: 34px;
  height: 3px;
  border-radius: 99px;
  background: var(--blue);
}
.footer-links { list-style: none; margin: 0; padding: 0; }
.footer-links li { margin-bottom: 13px; font-size: 0.9rem; display: flex; align-items: flex-start; gap: 9px; }
.footer-links li svg { color: var(--blue); flex-shrink: 0; margin-top: 5px; }
.footer-links a {
  color: var(--ink-soft);
  text-decoration: none;
  transition: color .15s ease;
}
.footer-links a:hover { color: var(--blue); }

.footer-bottom {
  border-top: 1px solid var(--line-white);
  padding: 18px 0;
  font-size: 0.85rem;
}
.footer-bottom-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  color: var(--muted);
}
.footer-bottom-inner b { color: var(--blue); font-weight: 900; }

/* ===================== درج السلة ===================== */
.drawer {
  position: fixed;
  top: 0;
  left: -400px;
  width: 370px;
  max-width: 90vw;
  height: 100%;
  background: var(--navy-900);
  border-left: 1px solid var(--line-dark);
  z-index: 40;
  transition: left .32s cubic-bezier(.22, .75, .25, 1);
  display: flex;
  flex-direction: column;
  box-shadow: -24px 0 60px rgba(0, 0, 0, 0.5);
}
.drawer.open { left: 0; }
.drawer-head {
  padding: 20px 22px;
  border-bottom: 1px solid var(--line-dark);
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.drawer-head h2 { margin: 0; font-size: 1.12rem; font-weight: 900; color: #ffffff; }
.close-btn { background: none; border: none; color: var(--text-sub); font-size: 1.6rem; cursor: pointer; line-height: 1; }
.close-btn:hover { color: #ffffff; }

#cartItems { flex: 1; overflow-y: auto; padding: 18px 22px; }
.cart-item { display: flex; gap: 13px; margin-bottom: 18px; padding-bottom: 16px; border-bottom: 1px dashed var(--line-dark); }
.cart-item img { width: 66px; height: 66px; object-fit: cover; border-radius: 10px; background: var(--navy-800); }
.cart-item-info { flex: 1; min-width: 0; }
.cart-item-name { font-size: 0.9rem; font-weight: 800; color: #ffffff; }
.cart-item-price { color: var(--blue-soft); font-size: 0.86rem; margin-top: 2px; font-weight: 700; }
.qty-control { display: flex; align-items: center; gap: 11px; margin-top: 9px; }
.qty-control button {
  width: 28px; height: 28px; border-radius: 50%;
  border: 1px solid var(--line-dark); background: var(--navy-800); color: var(--text);
  cursor: pointer; font-size: 1rem; line-height: 1;
}
.qty-control button:hover { border-color: var(--blue); color: var(--blue-soft); }

.drawer-foot { padding: 18px 22px 22px; border-top: 1px solid var(--line-dark); background: rgba(6, 12, 28, 0.4); }
.drawer-foot .total-row { display: flex; justify-content: space-between; margin-bottom: 14px; font-size: 1rem; font-weight: 800; color: #ffffff; }
.drawer-foot .total-row span:last-child { color: var(--blue-soft); }

/* الأزرار الأساسية */
.btn-primary {
  width: 100%;
  background: var(--blue);
  color: #ffffff;
  border: none;
  padding: 14px;
  border-radius: 11px;
  font-weight: 900;
  font-size: 0.98rem;
  cursor: pointer;
  transition: background .18s ease, transform .12s ease, box-shadow .18s ease;
}
.btn-primary:hover { background: var(--blue-soft); box-shadow: 0 8px 22px rgba(59, 130, 246, 0.3); transform: translateY(-1px); }
.btn-primary:active { transform: scale(0.985); }
.btn-primary:disabled { opacity: 0.55; cursor: not-allowed; transform: none; box-shadow: none; }

.overlay {
  position: fixed; inset: 0; background: rgba(4, 8, 20, 0.68);
  z-index: 30; opacity: 0; pointer-events: none; transition: opacity .3s ease;
  backdrop-filter: blur(2px);
}
.drawer.open ~ .overlay, .modal.open ~ .overlay { opacity: 1; pointer-events: auto; }

/* ===================== النوافذ المنبثقة ===================== */
.modal {
  position: fixed;
  top: 50%; left: 50%;
  transform: translate(-50%, -50%) scale(.96);
  width: 460px;
  max-width: 92vw;
  max-height: 88vh;
  overflow-y: auto;
  background: var(--navy-900);
  border: 1px solid var(--line-dark);
  border-radius: 16px;
  z-index: 50;
  opacity: 0;
  pointer-events: none;
  transition: opacity .22s ease, transform .22s ease;
  padding: 28px;
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.6);
}
.modal.open { opacity: 1; pointer-events: auto; transform: translate(-50%, -50%) scale(1); }
.modal-center { text-align: center; }
.modal h2 { font-weight: 900; color: #ffffff; margin-top: 0; font-size: 1.22rem; }

/* ===================== نافذة صفحات الموقع (من نحن / السياسات) ===================== */
.page-modal { width: 640px; max-width: 94vw; max-height: 90vh; padding: 0; display: flex; flex-direction: column; }
.page-modal-head {
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  padding: 16px 22px;
  background: var(--navy-900);
  border-bottom: 1px solid var(--line-dark);
  border-radius: 16px 16px 0 0;
  position: sticky; top: 0; z-index: 2;
}
.page-modal-head h2 { margin: 0; font-size: 1.15rem; }
.page-modal-body {
  padding: 22px;
  overflow-y: auto;
  max-height: 68vh;
  color: var(--text-sub);
  line-height: 2;
  font-size: 0.95rem;
}
.page-modal-body h2 {
  color: #ffffff;
  font-size: 1.02rem;
  font-weight: 900;
  margin: 18px 0 8px;
}
.page-modal-body h2:first-child { margin-top: 0; }
.page-modal-body p { margin: 0 0 12px; }
.page-modal-body ul { margin: 0 0 14px; padding-right: 18px; }
.page-modal-body li { margin-bottom: 6px; }
.page-modal-body b, .page-modal-body strong { color: #ffffff; }
.page-modal-body .updated { color: var(--blue-soft); font-weight: 800; margin-top: 16px; }
.page-modal-body .sig { color: var(--blue-soft); font-weight: 800; margin-top: 14px; }
@media (max-width: 480px) {
  .page-modal-body { padding: 16px; max-height: 72vh; }
}

.field { margin-bottom: 15px; }
.field label { display: block; margin-bottom: 6px; font-size: 0.86rem; font-weight: 700; color: var(--text-sub); }
.field input, .field textarea, .field select {
  width: 100%;
  background: var(--navy-950);
  border: 1px solid var(--line-dark);
  border-radius: 10px;
  padding: 11px 13px;
  color: #ffffff;
  font-size: 0.95rem;
  transition: border-color .15s ease, box-shadow .15s ease;
}
.field input:focus, .field textarea:focus, .field select:focus {
  outline: none;
  border-color: var(--blue);
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.18);
}
.field textarea { resize: vertical; min-height: 60px; }
.field select option { background: var(--navy-900); }

/* ===== محدد المدن: مربع بحث بالكتابة مع الحفاظ على تصميم القائمة الأصلية ===== */
.combo {
  position: relative;
  display: flex;
  align-items: center;
  width: 100%;
  background: var(--navy-950);
  border: 1px solid var(--line-dark);
  border-radius: 10px;
  padding: 11px 13px;
  cursor: pointer;
  transition: border-color .15s ease, box-shadow .15s ease;
}
.combo:focus-within { border-color: var(--blue); box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.18); }
.combo > input {
  flex: 1;
  min-width: 0;
  border: none !important;
  outline: none !important;
  box-shadow: none !important;
  background: transparent !important;
  padding: 0 !important;
  color: #ffffff;
  font-size: 0.95rem;
  cursor: pointer;
  font-family: inherit;
}
.combo-arrow { color: var(--text-sub); margin-left: 8px; font-size: 0.8rem; pointer-events: none; user-select: none; }
.combo-menu {
  position: fixed;
  z-index: 1200;
  background: var(--navy-900);
  border: 1px solid var(--line-dark);
  border-radius: 10px;
  overflow: hidden;
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.45);
}
.combo-menu input {
  width: 100%;
  box-sizing: border-box;
  background: var(--navy-950);
  border: none;
  border-bottom: 1px solid var(--line-dark);
  color: #ffffff;
  font-size: 0.9rem;
  padding: 10px 12px;
  outline: none;
}
.combo-menu ul { list-style: none; margin: 0; padding: 0; max-height: 260px; overflow-y: auto; }
.combo-menu li {
  padding: 9px 13px;
  cursor: pointer;
  font-size: 0.92rem;
  color: #dbe4f0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.combo-menu li:hover { background: rgba(59, 130, 246, 0.15); color: #ffffff; }
.combo-menu .empty { padding: 14px; color: var(--text-sub); font-size: 0.85rem; text-align: center; }

.fee-line { color: var(--blue-soft); font-size: 0.88rem; font-weight: 800; margin: -4px 0 14px; }

.pay-options { display: flex; gap: 12px; }
.pay-options label {
  flex: 1;
  border: 1px solid var(--line-dark);
  border-radius: 10px;
  padding: 11px;
  text-align: center;
  cursor: pointer;
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--text-sub);
  transition: border-color .15s ease, color .15s ease, background .15s ease;
}
.pay-options input { display: none; }
.pay-options input:checked + span { color: var(--blue-soft); }
.pay-options label:has(input:checked) { border-color: var(--blue); background: rgba(59, 130, 246, 0.1); }

.success-icon {
  font-size: 2.8rem;
  text-align: center;
  margin-bottom: 10px;
  width: 76px; height: 76px;
  line-height: 76px;
  margin-inline: auto;
  border-radius: 50%;
  color: #ffffff;
  background: var(--blue);
  box-shadow: 0 10px 30px rgba(59, 130, 246, 0.35);
}

/* ===================== صفحة تفاصيل المنتج ===================== */
.pd-wrap {
  background: var(--navy-950);
  min-height: 60vh;
}
.pd-content {
  max-width: 980px;
  margin: 0 auto;
  padding: 30px 22px 80px;
}
.back-link {
  color: var(--text-sub);
  text-decoration: none;
  font-size: 0.9rem;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 20px;
  font-weight: 700;
  transition: color .15s ease;
}
.back-link:hover { color: var(--blue-soft); }

.pd-main {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 28px;
  align-items: start;
}
.pd-layout {
  background: var(--navy-900);
  border: 1px solid var(--line-dark);
  border-radius: 18px;
  padding: 26px;
}
.pd-img {
  position: relative;
  border-radius: 14px;
  overflow: hidden;
  background: var(--navy-800);
}
.pd-img img {
  width: 100%;
  aspect-ratio: 1;
  object-fit: cover;
  display: block;
}

.pd-name { color: #ffffff; font-size: clamp(1.4rem, 3vw, 1.8rem); font-weight: 900; margin: 4px 0 12px; }
.pd-desc { color: var(--text-sub); line-height: 1.9; margin-bottom: 20px; font-size: 0.97rem; }
.pd-price-row { display: flex; align-items: baseline; gap: 14px; margin-bottom: 26px; }
.pd-price { color: #ffffff; font-size: 1.9rem; font-weight: 900; }
.pd-price-old { color: var(--muted); text-decoration: line-through; font-size: 1.1rem; }

.pd-qty { display: flex; align-items: center; gap: 16px; margin-bottom: 24px; }
.pd-qty span { font-size: 1.15rem; min-width: 28px; text-align: center; font-weight: 900; color: #ffffff; }
.pd-qty button {
  width: 42px; height: 42px; border-radius: 50%;
  border: 1px solid var(--line-dark); background: var(--navy-800); color: #ffffff;
  font-size: 1.3rem; cursor: pointer;
  transition: border-color .15s ease, color .15s ease, transform .12s ease;
}
.pd-qty button:hover { border-color: var(--blue); color: var(--blue-soft); }

.pd-actions { display: flex; gap: 12px; }
.btn-outline {
  flex: 1; background: transparent; border: 1px solid var(--blue-line); color: var(--blue-soft);
  border-radius: 11px; padding: 14px; font-weight: 800; cursor: pointer;
  transition: background .18s ease, border-color .18s ease, color .18s ease;
}
.btn-outline:hover { background: rgba(59, 130, 246, 0.12); border-color: var(--blue); color: #ffffff; }
.pd-actions .btn-primary { flex: 1; }

.pd-stock-out {
  background: rgba(233, 58, 116, 0.12);
  color: #ffb1c8;
  border: 1px dashed var(--pink);
  border-radius: 11px;
  padding: 14px 16px;
  font-size: 0.92rem;
  font-weight: 600;
  margin-bottom: 22px;
}

/* ===================== التجاوب ===================== */
@media (max-width: 1100px) {
  .product-grid { grid-template-columns: repeat(3, 1fr); }
}

@media (max-width: 980px) {
  .header-inner { flex-wrap: wrap; gap: 14px 18px; }
  .brand { /* يحتفظ بالمساحة */ }
  .search { order: 10; flex: 1 1 100%; max-width: none; }
  .header-actions { margin-right: auto; }
  .main-nav { gap: 16px; }
  .footer-grid { grid-template-columns: 1fr 1fr; gap: 34px; }
}

@media (max-width: 760px) {
  .container { padding: 0 15px; }
  .topbar { padding: 6px 15px; font-size: 0.72rem; }
  .site-header .container { padding: 0 15px; }
  .header-inner { padding-top: 11px; padding-bottom: 11px; }
  .brand-logo { width: 42px; height: 42px; }
  .brand-text b { font-size: 1rem; }
  .brand-text small { font-size: 0.66rem; }
  .main-nav a { font-size: 0.86rem; }
  .cart-btn { padding: 10px 16px; font-size: 0.86rem; gap: 7px; }

  .products-section { padding: 38px 0 56px; }
  .section-head { flex-wrap: wrap; gap: 14px; margin-bottom: 24px; }
  .view-all { align-self: flex-start; }
  .product-grid { grid-template-columns: repeat(2, 1fr); gap: 12px; }
  .product-info { padding: 10px 12px 13px; }
  .product-info h3 { font-size: 0.88rem; min-height: 40px; }
  .card-price-row { flex-direction: column; align-items: flex-start; gap: 8px; }
  .btn-add { width: 100%; justify-content: center; padding: 9px 12px; }
  .price-now { font-size: 1.05rem; }

  .footer-grid { grid-template-columns: 1fr; gap: 30px; padding-top: 40px; padding-bottom: 34px; }
  .footer-bottom-inner { flex-direction: column; text-align: center; }

  .pd-main { grid-template-columns: 1fr; }
  .pd-layout { padding: 16px; }
  .pd-content { padding: 20px 15px 60px; }
}

@media (max-width: 360px) {
  .product-grid { grid-template-columns: 1fr; }
  .header-actions { gap: 12px; }
  .main-nav { gap: 12px; }
}

/* =========================================================
   صفحة تفاصيل المنتج — أقسام إضافية بنفس الهوية الحالية فقط
   (الكمية/المجموع/الوصف/المواصفات/التوصيل/المقترحات)
   ========================================================= */
.pd-label { color: var(--text-sub); font-size: 0.86rem; font-weight: 700; display: block; margin-bottom: 8px; }
.pd-qty-block { margin-bottom: 14px; }
.pd-total-row {
  display: flex;
  align-items: baseline;
  gap: 8px;
  font-size: 1.05rem;
  font-weight: 800;
  color: #ffffff;
  margin-bottom: 22px;
}
.pd-total-row b { color: #ffffff; }

.pd-h {
  color: #ffffff;
  font-size: 1.16rem;
  font-weight: 900;
  margin: 0 0 18px;
  display: flex;
  align-items: center;
  gap: 10px;
}
.pd-h::before {
  content: '';
  width: 4px;
  height: 22px;
  border-radius: 99px;
  background: var(--blue);
  flex-shrink: 0;
}
.pd-section { margin-top: 34px; }
.pd-desc-text { color: var(--text-sub); line-height: 2; font-size: 0.97rem; margin: 0; }

.pd-specs {
  background: var(--navy-900);
  border: 1px solid var(--line-dark);
  border-radius: var(--radius);
  overflow: hidden;
}
.pd-specs-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 14px;
  padding: 12px 18px;
  border-bottom: 1px solid var(--line-dark);
  font-size: 0.93rem;
}
.pd-specs-row:last-child { border-bottom: none; }
.pd-specs-row b { color: #ffffff; font-weight: 800; }
.pd-specs-row span { color: var(--text-sub); }

.pd-benefits { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
.pd-benefit {
  background: var(--navy-900);
  border: 1px solid var(--line-dark);
  border-radius: 13px;
  padding: 16px 18px;
  display: flex;
  align-items: center;
  gap: 13px;
}
.pd-benefit svg { color: var(--blue-soft); flex-shrink: 0; }
.pd-benefit b { color: #ffffff; font-size: 0.9rem; font-weight: 800; display: block; margin-bottom: 2px; }
.pd-benefit span { color: var(--text-sub); font-size: 0.78rem; }

.pd-suggest { padding-top: 36px; }

@media (max-width: 760px) {
  .pd-benefits { grid-template-columns: 1fr; gap: 11px; }
  .pd-section { margin-top: 26px; }
  .pd-suggest { padding-top: 22px; }
}

/* ===================== صفحة السلة ===================== */
.cart-page, .checkout-page { background: var(--navy-950); padding: 42px 0 70px; }

.page-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  margin-bottom: 26px;
}
.page-title { color: #ffffff; font-size: 1.6rem; font-weight: 900; margin: 0; }
.page-sub { color: var(--text-sub); font-size: 0.9rem; margin: 8px 0 0; }
.page-count { color: var(--blue-soft); }

.clear-cart {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  background: transparent;
  border: none;
  color: #f87171;
  font-size: 0.86rem;
  font-weight: 800;
  cursor: pointer;
  padding: 6px 10px;
  border-radius: 9px;
  transition: background .18s ease;
}
.clear-cart:hover { background: rgba(248, 113, 113, 0.1); }

.cart-layout {
  display: grid;
  grid-template-columns: 1.45fr 1fr;
  gap: 26px;
  align-items: start;
}

.cart-list { min-width: 0; }
#cartItemsWrap { display: flex; flex-direction: column; gap: 14px; }

.cart-empty {
  text-align: center;
  padding: 56px 20px;
  background: var(--navy-900);
  border: 1px solid var(--line-dark);
  border-radius: var(--radius);
}
.cart-empty svg { color: var(--blue-soft); margin-bottom: 14px; }
.cart-empty b { color: #ffffff; font-size: 1.1rem; display: block; margin-bottom: 6px; }
.cart-empty p { color: var(--text-sub); font-size: 0.9rem; margin: 0 0 18px; }

.cart-row {
  display: flex;
  align-items: center;
  gap: 16px;
  background: var(--navy-900);
  border: 1px solid var(--line-dark);
  border-radius: var(--radius);
  padding: 16px 18px;
}
.cart-row-img {
  width: 86px;
  height: 86px;
  object-fit: cover;
  border-radius: 12px;
  background: var(--navy-800);
  flex-shrink: 0;
}
.cart-row-main { flex: 1; min-width: 0; }
.cart-row-main h3 { color: #ffffff; font-size: 1rem; font-weight: 800; margin: 0 0 4px; }
.cart-row-price { color: var(--text-sub); font-size: 0.84rem; margin-bottom: 10px; }
.cart-row-price b { color: var(--blue-soft); }
.cart-row-ctrl {
  display: flex;
  align-items: center;
  gap: 18px;
  flex-wrap: wrap;
}
.qty-control { margin-top: 0; }
.qty-input {
  width: 48px;
  height: 34px;
  text-align: center;
  background: var(--navy-950);
  border: 1px solid var(--line-dark);
  border-radius: 10px;
  color: #ffffff;
  font-size: 0.92rem;
  font-weight: 800;
  outline: none;
}
.qty-input::-webkit-outer-spin-button, .qty-input::-webkit-inner-spin-button { -webkit-appearance: none; }
.qty-input:focus { border-color: var(--blue); }
.cart-row-line-total { color: var(--text-sub); font-size: 0.84rem; }
.cart-row-line-total b { color: #ffffff; }
.cart-row-del {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  border-radius: 11px;
  background: transparent;
  border: 1px solid transparent;
  color: #f87171;
  cursor: pointer;
  flex-shrink: 0;
  transition: background .18s ease, border-color .18s ease;
}
.cart-row-del:hover { background: rgba(248, 113, 113, 0.1); border-color: rgba(248, 113, 113, 0.3); }

.continue-link {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  color: var(--blue-soft);
  font-weight: 800;
  font-size: 0.92rem;
  margin-top: 18px;
  transition: color .18s ease;
}
.continue-link:hover { color: var(--blue); }

.cart-side { display: flex; flex-direction: column; gap: 16px; min-width: 0; }

.summary-card {
  background: var(--navy-900);
  border: 1px solid var(--line-dark);
  border-radius: var(--radius);
  padding: 22px;
}
.summary-card h2 {
  color: #ffffff;
  font-size: 1.14rem;
  font-weight: 900;
  margin: 0 0 16px;
}
.summary-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  color: var(--text-sub);
  font-size: 0.92rem;
  margin-bottom: 13px;
}
.summary-row > span:last-child { color: #ffffff; font-weight: 800; }
.summary-row.strong { margin-bottom: 0; margin-top: 4px; }
.summary-row.strong > span { color: #ffffff; font-size: 1.05rem; font-weight: 900; }
.summary-card .divider { margin: 4px 0 14px; }

.btn-block { width: 100%; margin-top: 18px; }
.go-arrow { font-weight: 900; }

.pay-info-card {
  background: var(--navy-900);
  border: 1px solid var(--line-dark);
  border-radius: var(--radius);
  padding: 18px 22px;
}
.pay-info-card h3 { color: #ffffff; font-size: 0.96rem; font-weight: 900; margin: 0 0 13px; }
.pay-info-line {
  display: flex;
  align-items: center;
  gap: 12px;
  color: var(--text-sub);
  font-size: 0.9rem;
}
.pay-info-ico {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 42px;
  border-radius: 12px;
  background: var(--navy-800);
  border: 1px solid var(--line-dark);
  color: var(--blue-soft);
  flex-shrink: 0;
}

/* ===================== صفحة تأكيد الطلب ===================== */
.checkout-layout {
  display: grid;
  grid-template-columns: 1.25fr 0.95fr;
  gap: 26px;
  align-items: start;
  margin-top: 26px;
}

.co-notice {
  display: flex;
  align-items: center;
  gap: 10px;
  background: rgba(59, 130, 246, 0.12);
  border: 1px solid rgba(59, 130, 246, 0.35);
  color: #bfdbfe;
  font-size: 0.88rem;
  font-weight: 700;
  border-radius: 12px;
  padding: 13px 16px;
  margin-bottom: 20px;
}
.co-notice svg { color: var(--blue-soft); flex-shrink: 0; }

.checkout-form { max-width: 560px; min-width: 0; }
.hint { display: block; color: var(--muted); font-size: 0.78rem; margin-top: 6px; }

.fee-chip {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  background: rgba(59, 130, 246, 0.12);
  border: 1px solid rgba(59, 130, 246, 0.35);
  color: #bfdbfe;
  border-radius: 999px;
  padding: 6px 14px;
  font-size: 0.8rem;
  font-weight: 800;
  margin: 2px 0 0;
}
.fee-chip:empty { display: none; }

.pay-cards { display: flex; flex-direction: column; gap: 12px; }
.pay-card {
  display: flex;
  align-items: center;
  gap: 13px;
  background: var(--navy-950);
  border: 1px solid var(--line-dark);
  border-radius: 13px;
  padding: 14px 16px;
  cursor: pointer;
  transition: border-color .18s ease, background .18s ease;
  position: relative;
}
.pay-card input { position: absolute; opacity: 0; pointer-events: none; width: 1px; height: 1px; margin: 0; }
.pay-card-ico {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border-radius: 12px;
  background: var(--navy-800);
  border: 1px solid var(--line-dark);
  color: var(--text-sub);
  flex-shrink: 0;
  transition: color .18s ease, background .18s ease;
}
.pay-card-txt { flex: 1; min-width: 0; }
.pay-card-txt b { display: block; color: #ffffff; font-size: 0.94rem; font-weight: 800; margin-bottom: 3px; }
.pay-card-txt small { color: var(--muted); font-size: 0.78rem; }
.pay-card-check {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  border: 2px solid var(--line-dark);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: transparent;
  font-size: 0.78rem;
  font-weight: 900;
  flex-shrink: 0;
  transition: all .18s ease;
}
.pay-card.selected {
  border-color: var(--blue);
  background: rgba(59, 130, 246, 0.08);
}
.pay-card.selected .pay-card-ico { background: var(--blue); border-color: var(--blue); color: #ffffff; }
.pay-card.selected .pay-card-check { background: var(--blue); border-color: var(--blue); color: #ffffff; }

.btn-confirm { margin-top: 20px; }

.checkout-summary {
  display: flex;
  min-width: 0;
  position: sticky;
  top: 96px;
  align-self: start;
}
.co-summary-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  width: 100%;
}
.co-count-badge {
  background: var(--blue);
  color: #ffffff;
  font-size: 0.72rem;
  font-weight: 800;
  padding: 3px 11px;
  border-radius: 999px;
}
.co-items {
  display: flex;
  flex-direction: column;
  gap: 13px;
  margin-bottom: 16px;
  max-height: 340px;
  overflow-y: auto;
}
.co-item {
  display: flex;
  align-items: center;
  gap: 12px;
}
.co-item img {
  width: 58px;
  height: 58px;
  object-fit: cover;
  border-radius: 10px;
  background: var(--navy-800);
  flex-shrink: 0;
}
.co-item-info { flex: 1; min-width: 0; }
.co-item-name { color: #ffffff; font-size: 0.86rem; font-weight: 800; margin-bottom: 3px; }
.co-item-meta { color: var(--muted); font-size: 0.76rem; }
.co-item-total { color: #ffffff; font-weight: 800; font-size: 0.88rem; white-space: nowrap; }

.checkout-summary .summary-card { width: 100%; }

@media (max-width: 880px) {
  .cart-layout { grid-template-columns: 1fr; }
}
@media (max-width: 980px) {
  .checkout-layout { grid-template-columns: 1.15fr 1fr; gap: 20px; }
}
@media (max-width: 720px) {
  .checkout-layout { grid-template-columns: 1fr; margin-top: 18px; }
  .checkout-summary { position: static; order: -1; }
}
@media (max-width: 560px) {
  .cart-page, .checkout-page { padding: 28px 0 50px; }
  .cart-row { flex-wrap: wrap; gap: 13px; padding: 14px; }
  .cart-row-img { width: 74px; height: 74px; }
  .cart-row-del { order: 2; }
  .cart-row-ctrl { gap: 12px; }
  .page-title { font-size: 1.3rem; }
}