/* ===== إعدادات عامة ===== */
* { margin: 0; padding: 0; box-sizing: border-box; }

:root {
  --primary: #d9720b;
  --primary-dark: #b45a05;
  --accent: #fdf0e3;
  --bg: #faf9f7;
  --text: #2a2420;
  --muted: #857f78;
  --white: #ffffff;
  --success: #1fa855;
  --whatsapp: #25d366;
  --radius: 16px;
  --shadow: 0 4px 20px rgba(40, 30, 20, .08);
}

html { scroll-behavior: smooth; }

body {
  font-family: 'Cairo', 'Tajawal', sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
}

img, video { max-width: 100%; height: auto; display: block; }

.container { max-width: 560px; margin: 0 auto; padding: 0 16px; }

/* ===== الشريط العلوي ===== */
.topbar {
  background: var(--primary);
  color: #fff;
  text-align: center;
  font-size: 14px;
  font-weight: 700;
  padding: 8px 12px;
}

/* ===== الهيدر ===== */
header.site {
  background: #eceae6;
  padding: 14px 0;
  box-shadow: var(--shadow);
  position: sticky;
  top: 0;
  z-index: 50;
}
header.site .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.brand { font-size: 20px; font-weight: 900; color: var(--primary); }
.brand img { height: 38px; width: auto; display: block; }
.header-cta {
  background: var(--primary);
  color: #fff;
  border: none;
  border-radius: 999px;
  padding: 8px 20px;
  font-family: inherit;
  font-size: 14px;
  font-weight: 800;
  cursor: pointer;
  text-decoration: none;
}

/* ===== الهيرو ===== */
.hero { padding: 24px 0 8px; text-align: center; }
.hero h1 { font-size: 26px; font-weight: 900; line-height: 1.4; }
.hero p.sub { color: var(--muted); font-size: 15px; margin-top: 4px; }
.hero .hero-img {
  margin-top: 16px;
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
}
.hero .hero-img img {
  width: 100%;
  aspect-ratio: 3 / 4;
  object-fit: cover;
  object-position: center 25%;
}

/* ===== شارات الثقة ===== */
.badges {
  display: flex;
  gap: 8px;
  justify-content: center;
  flex-wrap: wrap;
  margin: 16px 0;
}
.badge {
  background: var(--accent);
  color: var(--primary-dark);
  font-size: 12.5px;
  font-weight: 700;
  border-radius: 999px;
  padding: 6px 14px;
}

/* ===== الأسعار / الباقات ===== */
.offers { padding: 8px 0 4px; }
.section-title {
  text-align: center;
  font-size: 21px;
  font-weight: 900;
  margin-bottom: 14px;
}
.section-title span { color: var(--primary); }
.offer-card {
  background: var(--white);
  border: 2px solid #eee;
  border-radius: var(--radius);
  padding: 16px;
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 12px;
  cursor: pointer;
  transition: border-color .2s, transform .15s;
  position: relative;
}
.offer-card.selected { border-color: var(--primary); background: #fff8f0; }
.offer-card input { accent-color: var(--primary); width: 20px; height: 20px; }
.offer-info { flex: 1; }
.offer-info .name { font-weight: 800; font-size: 16px; }
.offer-info .desc { font-size: 13px; color: var(--muted); }
.offer-price { text-align: left; }
.offer-price .now { font-size: 20px; font-weight: 900; color: var(--primary); }
.offer-price .save {
  display: inline-block;
  background: var(--success);
  color: #fff;
  font-size: 11.5px;
  font-weight: 700;
  border-radius: 6px;
  padding: 1px 8px;
}
.offer-tag {
  position: absolute;
  top: -11px;
  right: 14px;
  background: var(--primary);
  color: #fff;
  font-size: 11.5px;
  font-weight: 800;
  padding: 2px 12px;
  border-radius: 999px;
}
.shipping-note {
  text-align: center;
  font-size: 13.5px;
  color: var(--muted);
  margin: 4px 0 8px;
}

/* ===== المعرض ===== */
.gallery { padding: 20px 0 6px; }
.gallery-scroll {
  display: flex;
  gap: 12px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  padding-bottom: 10px;
  -webkit-overflow-scrolling: touch;
}
.gallery-scroll::-webkit-scrollbar { display: none; }
.g-item {
  flex: 0 0 78%;
  scroll-snap-align: center;
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
  position: relative;
}
.g-item .color-tag {
  position: absolute;
  bottom: 10px;
  right: 10px;
  background: rgba(255,255,255,.92);
  color: var(--text);
  font-size: 13px;
  font-weight: 800;
  padding: 3px 14px;
  border-radius: 999px;
}
.swipe-hint { text-align: center; font-size: 12.5px; color: var(--muted); }

/* ===== الفيديو ===== */
.video-sec { padding: 20px 0; }
.video-wrap {
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
  position: relative;
}
.video-wrap video { width: 100%; }

/* ===== المميزات ===== */
.features { padding: 12px 0; }
.feature-list { display: grid; gap: 10px; }
.feature {
  background: var(--white);
  border-radius: 12px;
  padding: 12px 16px;
  display: flex;
  align-items: center;
  gap: 12px;
  box-shadow: var(--shadow);
  font-weight: 700;
  font-size: 14.5px;
}
.feature .ico { font-size: 22px; }

/* ===== الفورم ===== */
.order-sec { padding: 24px 0 40px; }
.order-form {
  background: var(--white);
  border-radius: var(--radius);
  padding: 22px 18px;
  box-shadow: var(--shadow);
}
.form-group { margin-bottom: 14px; }
.form-group label {
  display: block;
  font-weight: 800;
  font-size: 14px;
  margin-bottom: 5px;
}
.form-group label .req { color: var(--primary); }
.form-group input,
.form-group select,
.form-group textarea {
  width: 100%;
  border: 1.5px solid #e5ddd5;
  border-radius: 10px;
  padding: 11px 14px;
  font-family: inherit;
  font-size: 15px;
  background: #fdfbfa;
  color: var(--text);
}
.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
  outline: none;
  border-color: var(--primary);
}
.two-col { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.total-box {
  background: var(--accent);
  border-radius: 12px;
  padding: 12px 16px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-weight: 800;
  margin: 16px 0;
}
.total-box .amount { font-size: 22px; color: var(--primary-dark); }
.total-box small { display: block; font-weight: 600; color: var(--muted); font-size: 12px; }
.submit-btn {
  width: 100%;
  background: var(--primary);
  color: #fff;
  border: none;
  border-radius: 12px;
  padding: 15px;
  font-family: inherit;
  font-size: 18px;
  font-weight: 900;
  cursor: pointer;
  transition: background .2s;
}
.submit-btn:hover { background: var(--primary-dark); }
.submit-btn:disabled { opacity: .6; cursor: wait; }
.form-note { text-align: center; font-size: 12.5px; color: var(--muted); margin-top: 10px; }
.err-msg { color: #d0342c; font-size: 12.5px; margin-top: 3px; display: none; }

/* ===== شاشة النجاح ===== */
.success-overlay {
  position: fixed;
  inset: 0;
  background: rgba(20, 15, 10, .55);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 200;
  padding: 20px;
}
.success-overlay.show { display: flex; }
.success-card {
  background: #fff;
  border-radius: 20px;
  padding: 32px 24px;
  text-align: center;
  max-width: 400px;
  width: 100%;
}
.success-card .check { font-size: 54px; }
.success-card h3 { font-size: 21px; font-weight: 900; margin: 8px 0 4px; }
.success-card p { color: var(--muted); font-size: 14.5px; }
.wa-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  background: var(--whatsapp);
  color: #fff;
  text-decoration: none;
  border-radius: 12px;
  padding: 13px;
  font-weight: 900;
  font-size: 16px;
  margin-top: 18px;
}

/* ===== زر واتساب عائم ===== */
.wa-float {
  position: fixed;
  left: 16px;
  bottom: calc(80px + env(safe-area-inset-bottom));
  width: 54px;
  height: 54px;
  background: var(--whatsapp);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 16px rgba(0, 0, 0, .28);
  z-index: 90;
  transition: transform .15s;
}
.wa-float:hover { transform: scale(1.08); }
.wa-float svg { width: 28px; height: 28px; fill: #fff; }

/* ===== زر سفلي ثابت ===== */
.sticky-cta {
  position: fixed;
  bottom: 0;
  right: 0;
  left: 0;
  background: var(--primary);
  color: #fff;
  text-decoration: none;
  box-shadow: 0 -4px 20px rgba(40, 30, 20, .12);
  padding: 14px 16px calc(14px + env(safe-area-inset-bottom));
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background .2s;
}
.sticky-cta:hover { background: var(--primary-dark); }
.sticky-cta .sticky-brand {
  font-weight: 900;
  font-size: 17px;
  letter-spacing: 1px;
}
body { padding-bottom: 64px; }

footer.site {
  text-align: center;
  color: var(--muted);
  font-size: 13px;
  padding: 20px 16px 30px;
}

/* ===== الاستجابة للتابلت والآيباد ===== */
@media (min-width: 700px) {
  .container { max-width: 640px; }
  .hero h1 { font-size: 30px; }
  .hero p.sub { font-size: 16px; }
  .section-title { font-size: 23px; }
  .badge { font-size: 13.5px; }
  .feature { font-size: 15.5px; }

  .gallery-scroll {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    overflow: visible;
    gap: 14px;
  }
  .g-item { scroll-snap-align: unset; }
  .swipe-hint { display: none; }

  .order-form { padding: 28px 32px; }
}

/* ===== الاستجابة لشاشات الكمبيوتر ===== */
@media (min-width: 1024px) {
  .container { max-width: 780px; }
  header.site .container { max-width: 1080px; }
  .order-sec .container { max-width: 660px; }

  /* هيرو بعمودين: النص يمين والصورة يسار */
  .hero { padding: 48px 0; text-align: right; }
  .hero .container {
    max-width: 1080px;
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 56px;
  }
  .hero-copy { flex: 1 1 0; }
  .hero h1 { font-size: 34px; }
  .hero p.sub { font-size: 17px; max-width: 440px; }
  .hero .badges { justify-content: flex-start; margin: 20px 0 0; }
  .hero .hero-img {
    flex: 0 0 380px;
    width: 380px;
    margin: 0;
  }
  .hero .hero-img img { max-height: 560px; }

  .features .feature-list { grid-template-columns: 1fr 1fr; }
  .gallery-scroll { grid-template-columns: repeat(4, 1fr); }
}

/* ===== شاشات كبيرة جداً ===== */
@media (min-width: 1400px) {
  .container { max-width: 860px; }
  header.site .container { max-width: 1180px; }
  .hero .container { max-width: 1180px; gap: 70px; }
  .hero .hero-img { flex-basis: 420px; width: 420px; }
  .hero .hero-img img { max-height: 620px; }
}
