/* ========== المتغيرات (الألوان) ========== */
:root {
  --navy: #0a1330;
  --navy-2: #101c47;
  --blue: #1e4fd8;
  --blue-light: #eef3ff;
  --gold: #d4a93a;
  --gold-light: #f3d98b;
  --text: #1a1f36;
  --muted: #7a8199;
  --radius: 22px;
}

/* ========== أساسيات ========== */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html { -webkit-text-size-adjust: 100%; }

body {
  font-family: 'Tajawal', sans-serif;
  background: #fff;
  color: var(--text);
  line-height: 1.6;
  overflow-x: hidden;
}

img { max-width: 100%; display: block; }
a { text-decoration: none; color: inherit; }

/* ========== الشريط العلوي ========== */
.header {
  background: var(--navy);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 40px;
  position: sticky;
  top: 0;
  z-index: 100;
}

.nav { display: flex; gap: 28px; flex: 1; }
.nav a { font-weight: 500; transition: color .2s; }
.nav a:hover { color: var(--gold); }

.logo { flex: 0 0 auto; }
.logo img { height: 70px; width: auto; border-radius: 12px; }

.header-actions {
  flex: 1;
  display: flex;
  gap: 14px;
  justify-content: flex-end;
}

.icon-btn {
  background: none;
  border: none;
  color: #fff;
  font-size: 22px;
  cursor: pointer;
  position: relative;
}

.cart-count {
  position: absolute;
  top: -8px;
  left: -10px;
  background: var(--gold);
  color: var(--navy);
  font-size: 12px;
  font-weight: 700;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* زر القائمة (مخفي على الحاسوب) */
.menu-btn {
  display: none;
  background: none;
  border: none;
  color: #fff;
  font-size: 28px;
  cursor: pointer;
}

/* ========== البانر الرئيسي ========== */
.hero {
  background: linear-gradient(135deg, var(--navy), var(--navy-2) 60%, var(--blue));
  color: #fff;
  min-height: 380px;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 40px 20px;
}

.hero h1 {
  font-size: 44px;
  font-weight: 800;
  color: var(--gold-light);
  margin-bottom: 10px;
}

.hero p { font-size: 22px; opacity: .9; }

/* ========== الأقسام ========== */
.section {
  max-width: 1200px;
  margin: 40px auto;
  padding: 50px 30px;
  background: linear-gradient(180deg, #fff, var(--blue-light));
  border-radius: 40px;
  box-shadow: 0 10px 40px rgba(30, 79, 216, .08);
}

.section-title {
  text-align: center;
  font-size: 34px;
  font-weight: 800;
  color: var(--navy);
  margin-bottom: 40px;
  position: relative;
}

.section-title::before {
  content: "✦";
  display: block;
  color: var(--gold);
  font-size: 20px;
}

.section-title::after {
  content: "";
  display: block;
  width: 90px;
  height: 4px;
  margin: 14px auto 0;
  border-radius: 4px;
  background: linear-gradient(90deg, var(--gold), var(--blue), var(--gold));
}

/* ========== بطاقات المنتجات ========== */
.products-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
}

.product-card {
  background: linear-gradient(180deg, #fff, var(--blue-light));
  border: 2px solid #d6e0ff;
  border-radius: var(--radius);
  padding: 18px;
  text-align: center;
  transition: transform .25s, box-shadow .25s, border-color .25s;
}

.product-card:hover {
  transform: translateY(-6px);
  border-color: var(--blue);
  box-shadow: 0 16px 36px rgba(30, 79, 216, .2);
}

.product-card img {
  width: 100%;
  aspect-ratio: 1 / 1;
  object-fit: cover;
  border-radius: 18px;
  margin-bottom: 16px;
}

.product-card h3 {
  font-size: 17px;
  font-weight: 700;
  min-height: 56px;
  margin-bottom: 12px;
}

.price {
  font-size: 30px;
  font-weight: 800;
  color: var(--blue);
}

.old-price {
  color: var(--muted);
  text-decoration: line-through;
  font-size: 16px;
  margin-bottom: 14px;
}

/* ========== الأزرار ========== */
.btn {
  display: inline-block;
  background: var(--blue);
  color: #fff;
  border: none;
  padding: 14px 40px;
  font-family: inherit;
  font-size: 18px;
  font-weight: 700;
  border-radius: 16px;
  cursor: pointer;
  box-shadow: 0 8px 20px rgba(30, 79, 216, .35);
  transition: background .2s, transform .2s;
}

.btn:hover { background: #163bb0; transform: translateY(-2px); }

/* ========== ما يميزنا ========== */
.features {
  background: linear-gradient(135deg, var(--navy), var(--navy-2));
  color: #fff;
  text-align: center;
  padding: 50px 20px 60px;
  margin: 40px 0;
}

.features h2 {
  font-size: 36px;
  font-weight: 800;
  color: var(--gold-light);
  margin-bottom: 36px;
}

.features-grid {
  max-width: 1000px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
}

.feature {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
  font-size: 56px;
}

.feature span {
  font-size: 17px;
  font-weight: 700;
  color: var(--navy);
  background: linear-gradient(90deg, var(--gold), var(--gold-light), var(--gold));
  padding: 6px 22px;
  border-radius: 8px;
}

/* ========== الفوتر ========== */
.footer {
  background: var(--navy);
  color: #fff;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 30px;
  padding: 60px 8% 30px;
}

.footer-col h4 {
  font-size: 22px;
  margin-bottom: 18px;
  color: var(--gold-light);
}

.footer-col a {
  display: block;
  margin-bottom: 12px;
  opacity: .85;
  transition: opacity .2s, color .2s;
}

.footer-col a:hover { opacity: 1; color: var(--gold); }

.copyright {
  grid-column: 1 / -1;
  text-align: center;
  padding-top: 24px;
  border-top: 1px solid rgba(255, 255, 255, .15);
  font-size: 14px;
  opacity: .7;
}

/* ========== صفحة المنتج ========== */
.product-body { padding-bottom: 90px; }

.product-page {
  max-width: 1200px;
  margin: 30px auto;
  padding: 0 24px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 30px;
  align-items: start;
}

.product-gallery {
  position: relative;
  border: 3px solid var(--blue);
  border-radius: 28px;
  padding: 14px;
  background: #fff;
  box-shadow: 0 12px 40px rgba(30, 79, 216, .15);
}

.product-gallery img {
  width: 100%;
  border-radius: 20px;
  object-fit: cover;
}

.badge-limited {
  position: absolute;
  top: 26px;
  left: 26px;
  z-index: 2;
  background: var(--blue);
  color: #fff;
  font-weight: 700;
  padding: 8px 18px;
  border-radius: 12px;
}

.product-info {
  background: linear-gradient(180deg, #fff, var(--blue-light));
  border: 2px solid #d6e0ff;
  border-radius: 28px;
  padding: 28px;
}

.product-info h1 {
  font-size: 30px;
  font-weight: 800;
  line-height: 1.5;
  margin-bottom: 18px;
}

.price-row {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 20px;
}

.price-big { font-size: 34px; font-weight: 800; color: var(--blue); }

.discount-badge {
  background: var(--blue);
  color: #fff;
  font-weight: 700;
  padding: 6px 16px;
  border-radius: 12px;
  box-shadow: 0 6px 16px rgba(30, 79, 216, .3);
}

.opt-title { font-size: 20px; font-weight: 800; margin: 18px 0 12px; }

.chips { display: flex; flex-wrap: wrap; gap: 10px; }

.chip {
  background: #fff;
  border: 1.5px solid #cfd6ea;
  border-radius: 12px;
  padding: 12px 18px;
  font-family: inherit;
  font-size: 16px;
  cursor: pointer;
  transition: all .2s;
}

.chip:hover { border-color: var(--blue); }
.chip.active { background: var(--blue); color: #fff; border-color: var(--blue); }

.colors { display: flex; gap: 12px; }

.color-dot {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: 3px solid #fff;
  box-shadow: 0 0 0 1.5px #cfd6ea;
  cursor: pointer;
  transition: box-shadow .2s, transform .2s;
}

.color-dot:hover { transform: scale(1.08); }
.color-dot.active { box-shadow: 0 0 0 3px var(--blue); }

/* المزايا */
.perks {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin: 26px 0;
  padding: 16px;
  border: 2px solid var(--blue);
  border-radius: 22px;
  background: #fff;
}

.perk {
  display: flex;
  align-items: center;
  gap: 12px;
  background: var(--blue-light);
  border: 1.5px solid #d6e0ff;
  border-radius: 16px;
  padding: 12px;
}

.perk-ic {
  flex: 0 0 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--blue);
  border-radius: 12px;
  font-size: 20px;
}

.perk b { display: block; font-size: 15px; }
.perk small { color: var(--muted); font-size: 12px; }

/* النموذج */
.order-form {
  border: 2px solid var(--blue);
  border-radius: 22px;
  padding: 22px;
  background: #fff;
}

.order-form h3 { font-size: 18px; margin-bottom: 16px; }

.order-form input,
.order-form select {
  width: 100%;
  padding: 16px 18px;
  margin-bottom: 14px;
  border: 1.5px solid #d6dcf0;
  border-radius: 16px;
  font-family: inherit;
  font-size: 16px;
  background: #fff;
}

.order-form input:focus,
.order-form select:focus { outline: none; border-color: var(--blue); }

.form-error { color: #d12c2c; font-weight: 700; margin-bottom: 10px; min-height: 20px; }

.btn-full { width: 100%; }

.success-box {
  text-align: center;
  border: 2px solid var(--blue);
  border-radius: 22px;
  padding: 36px 20px;
  background: #fff;
}
.success-box[hidden] { display: none; }
.success-ic { font-size: 56px; }
.success-box p { margin: 10px 0 20px; color: var(--muted); }

/* الشريط الثابت */
.sticky-bar {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 200;
  background: #fff;
  box-shadow: 0 -6px 24px rgba(10, 19, 48, .12);
  display: flex;
  align-items: center;
  gap: 20px;
  padding: 12px 6%;
}

.sticky-price { font-size: 24px; font-weight: 800; color: var(--blue); white-space: nowrap; }
.btn-sticky { flex: 1; text-align: center; border-radius: 14px; }

/* ========== التوصيل والملخص ========== */
.delivery-opts { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-bottom: 16px; }

.d-opt {
  display: flex;
  align-items: center;
  gap: 10px;
  border: 1.5px solid #d6dcf0;
  border-radius: 16px;
  padding: 12px 14px;
  cursor: pointer;
  background: #fff;
  transition: all .2s;
}

.d-opt:has(input:checked) { border-color: var(--blue); background: var(--blue-light); }
.d-opt:has(input:disabled) { opacity: .45; cursor: not-allowed; }

.order-form .d-opt input { width: auto; margin: 0; padding: 0; accent-color: var(--blue); }
.d-opt b { display: block; font-size: 15px; }
.d-opt small { color: var(--blue); font-weight: 700; font-size: 14px; }

.summary {
  background: var(--blue-light);
  border: 1.5px solid #d6e0ff;
  border-radius: 16px;
  padding: 14px 18px;
  margin-bottom: 14px;
}

.summary > div { display: flex; justify-content: space-between; padding: 5px 0; }
.summary .total { border-top: 1px dashed #b9c6ee; margin-top: 6px; padding-top: 10px; font-size: 20px; font-weight: 800; color: var(--blue); }

/* ==========================================================
   التجاوب مع الشاشات (يجب أن يبقى في آخر الملف)
   ========================================================== */

/* تابلت */
@media (max-width: 992px) {
  .header { padding: 10px 20px; }
  .hero { min-height: 280px; }
  .hero h1 { font-size: 34px; }
  .products-grid { grid-template-columns: repeat(2, 1fr); }
  .features-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 800px) {
  .product-page { grid-template-columns: 1fr; padding: 0 12px; }
  .product-info h1 { font-size: 22px; }
  .perks { grid-template-columns: 1fr; }
}

/* هاتف */
@media (max-width: 700px) {
  /* الشريط العلوي: ☰ | الشعار | أيقونات */
  .header { padding: 8px 14px; }
  .menu-btn { display: block; flex: 1; text-align: right; }
  .logo { flex: 0 0 auto; }
  .logo img { height: 50px; }
  .header-actions { flex: 1; }

  .nav {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    flex-direction: column;
    gap: 0;
    background: var(--navy-2);
    border-top: 1px solid rgba(255, 255, 255, .12);
    box-shadow: 0 12px 24px rgba(0, 0, 0, .3);
  }
  .nav.open { display: flex; }
  .nav a { padding: 16px 22px; border-bottom: 1px solid rgba(255, 255, 255, .08); }

  /* البانر */
  .hero { min-height: 220px; padding: 28px 16px; }
  .hero h1 { font-size: 26px; }
  .hero p { font-size: 16px; }

  /* الأقسام */
  .section { margin: 18px 10px; padding: 28px 12px; border-radius: 26px; }
  .section-title { font-size: 24px; margin-bottom: 24px; }

  /* المنتجات: عمودان */
  .products-grid { grid-template-columns: repeat(2, 1fr); gap: 10px; }
  .product-card { padding: 8px; border-radius: 16px; }
  .product-card img { border-radius: 12px; margin-bottom: 10px; }
  .product-card h3 { font-size: 13px; min-height: 60px; line-height: 1.5; }
  .price { font-size: 19px; }
  .old-price { font-size: 13px; margin-bottom: 8px; }
  .btn { padding: 10px 16px; font-size: 14px; border-radius: 12px; }

  /* ما يميزنا */
  .features { padding: 34px 14px 40px; }
  .features h2 { font-size: 26px; margin-bottom: 22px; }
  .features-grid { grid-template-columns: repeat(2, 1fr); gap: 22px 10px; }
  .feature { font-size: 44px; }
  .feature span { font-size: 14px; padding: 5px 12px; }

  /* الفوتر */
  .footer { grid-template-columns: 1fr; padding: 40px 24px 24px; gap: 8px; }
  .footer-col { margin-bottom: 14px; }

  /* صفحة المنتج */
  .product-page { grid-template-columns: 1fr; gap: 16px; margin: 16px auto; padding: 0 10px; }
  .product-gallery { padding: 8px; border-radius: 20px; }
  .badge-limited { top: 16px; left: 16px; font-size: 13px; padding: 6px 12px; }
  .product-info { padding: 16px; border-radius: 20px; }
  .product-info h1 { font-size: 21px; margin-bottom: 12px; }
  .price-row { flex-wrap: wrap; gap: 10px; }
  .price-big { font-size: 28px; }
  .opt-title { font-size: 17px; }
  .chip { padding: 10px 14px; font-size: 14px; }
  .color-dot { width: 36px; height: 36px; }
  .perks { grid-template-columns: 1fr; padding: 10px; }
  .order-form { padding: 16px; }
  .order-form h3 { font-size: 16px; line-height: 1.6; }
  .delivery-opts { grid-template-columns: 1fr; }

  /* الشريط الثابت */
  .sticky-bar { padding: 10px 14px; gap: 12px; }
  .sticky-price { font-size: 19px; }
  .btn-sticky { padding: 13px 10px; font-size: 16px; }
}
/* ========== البانر بالصورة ========== */
.hero-banner img { width: 100%; height: auto; display: block; }

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
}

/* ========== زر واتساب ========== */
.wa-float {
  position: fixed;
  left: 18px;
  bottom: 18px;
  z-index: 300;
  width: 58px;
  height: 58px;
  border-radius: 50%;
  background: #25d366;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 8px 22px rgba(37, 211, 102, .5);
  transition: transform .2s;
}

.wa-float:hover { transform: scale(1.1); }

/* في صفحة المنتج نرفعه فوق الشريط الثابت */
.product-body .wa-float { bottom: 90px; }

/* هواتف صغيرة */
@media (max-width: 380px) {
  .products-grid { gap: 8px; }
  .product-card h3 { font-size: 12px; }
  .price { font-size: 17px; }
}