/* ================================================================
   كابسات امبليوم — الأنماط (موبايل أولاً، RTL)
   بدون أي style= داخلي وبدون <style> بالصفحات (CSP بلا unsafe-inline).
   ================================================================ */
:root {
  --navy: #0F3D66;
  --navy-2: #0B2D4B;
  --green: #1F8A3B;
  --green-2: #176C2E;
  --lime: #96C93D;
  --ink: #16202B;
  --muted: #6B7785;
  --line: #E3E8EE;
  --bg: #F4F7FA;
  --white: #FFFFFF;
  --red: #C62828;
  --save: #B3261E;
  --gold: #F2B400;
  --radius: 14px;
  --shadow: 0 6px 22px rgba(15, 61, 102, .10);
  --font: 'Tajawal', system-ui, -apple-system, 'Segoe UI', Tahoma, Arial, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0; font-family: var(--font); color: var(--ink); background: var(--bg);
  line-height: 1.6; font-size: 16px; overflow-x: hidden;
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--navy); }
button, input, select { font: inherit; }
h1, h2, h3 { line-height: 1.3; margin: 0; }
.wrap { width: 100%; max-width: 1160px; margin: 0 auto; padding: 0 16px; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.ns-pixel { display: none; }
:focus-visible { outline: 3px solid var(--gold); outline-offset: 2px; }
[hidden] { display: none !important; }

/* ---------------- الشريط المتحرك ---------------- */
.ticker { background: var(--navy-2); color: #fff; overflow: hidden; direction: rtl; position: relative; }
.ticker__track {
  display: flex; width: max-content; will-change: transform;
  animation: tick 38s linear infinite;
}
.ticker__group { display: flex; flex: none; align-items: center; }
.ticker__item { display: inline-flex; align-items: center; gap: 6px; white-space: nowrap; padding: 9px 14px; font-weight: 700; font-size: 14px; }
.ticker__ico { flex: none; }
.ticker__dot { color: var(--lime); font-size: 11px; flex: none; }
.ticker:hover .ticker__track { animation-play-state: paused; }
/* RTL: المجموعة الثانية على يسار الأولى؛ الإزاحة +50% = عرض مجموعة وحدة بالضبط */
@keyframes tick { from { transform: translateX(0); } to { transform: translateX(50%); } }
@media (prefers-reduced-motion: reduce) {
  .ticker__track { animation: none; }
}

/* ---------------- الرأس ---------------- */
.hdr { background: var(--white); border-bottom: 1px solid var(--line); }
.hdr__in { display: flex; align-items: center; justify-content: space-between; min-height: 64px; }
.hdr__logo img { width: 94px; height: auto; }

/* ---------------- الأزرار ---------------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  background: var(--green); color: #fff; text-decoration: none; border: 0; border-radius: 12px;
  font-weight: 800; padding: 12px 20px; min-height: 48px; cursor: pointer; text-align: center;
  transition: background .15s;
}
.btn:hover { background: var(--green-2); }
.btn:disabled { background: #9AA5B1; cursor: not-allowed; }
.btn--sm { min-height: 44px; padding: 8px 16px; font-size: 15px; }
.btn--lg { min-height: 56px; font-size: 19px; }
.btn--block { display: flex; width: 100%; }
.btn--wa { background: #1DA851; }
.btn--wa:hover { background: #168A42; }

/* ---------------- الواجهة ---------------- */
.hero { background: linear-gradient(180deg, var(--white), var(--bg)); padding: 22px 0 6px; text-align: center; }
.hero__title { font-size: 28px; font-weight: 900; color: var(--navy); }
.hero__sub { color: #3A4652; margin: 6px auto 12px; font-size: 16px; max-width: 640px; }
.hero__badges { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; justify-content: center; gap: 6px 8px; }
.hero__badges li { background: var(--white); border: 1px solid var(--line); border-radius: 999px; padding: 4px 12px; font-weight: 800; font-size: 14px; color: var(--navy); }

/* ---------------- اختيار الكابسة ---------------- */
.picker { padding: 14px 0 6px; }
.picker__title { text-align: center; margin-bottom: 10px; }
.pick { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 10px; }
.pcard {
  position: relative; display: flex; flex-direction: column; align-items: stretch; gap: 6px; min-width: 0;
  background: var(--white); border: 2px solid var(--line); border-radius: var(--radius);
  padding: 8px; cursor: pointer; text-align: right; color: var(--ink); box-shadow: var(--shadow);
  transition: border-color .15s, box-shadow .15s; font: inherit;
}
.pcard:hover { border-color: #B7C6D6; }
.pcard.is-on { border-color: var(--green); box-shadow: 0 0 0 3px rgba(31, 138, 59, .22), var(--shadow); }
.pcard:disabled { cursor: not-allowed; opacity: .7; }
.pcard__media { position: relative; display: flex; justify-content: center; align-items: center; height: 118px; background: #FAFBFC; border-radius: 10px; overflow: hidden; }
.pcard__img { max-height: 108px; max-width: 100%; width: auto; height: auto; object-fit: contain; }
.pcard__badge { position: absolute; top: 6px; inset-inline-start: 6px; background: var(--save); color: #fff; font-weight: 900; font-size: 12px; border-radius: 8px; padding: 1px 7px; }
.pcard__tx { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.pcard__check { align-self: flex-start; font-size: 12px; font-weight: 800; color: #fff; background: var(--green); border-radius: 999px; padding: 0 10px; visibility: hidden; }
.pcard.is-on .pcard__check { visibility: visible; }
.pcard__n { font-size: 16px; font-weight: 900; color: var(--navy); line-height: 1.3; }
.pcard__m { font-size: 12px; color: var(--muted); direction: ltr; text-align: right; unicode-bidi: isolate; }
.pcard__pr { display: flex; flex-wrap: wrap; align-items: baseline; gap: 0 8px; line-height: 1.3; }
.pcard__o { font-size: 14px; color: #7C8894; font-weight: 700; text-decoration-thickness: 2px; text-decoration-color: #7C8894; }
.pcard__p { font-size: 18px; color: var(--ink); font-weight: 900; }
.pcard__save { align-self: flex-start; background: #FDECEA; color: var(--save); font-weight: 800; font-size: 12px; border-radius: 8px; padding: 0 8px; }
.pcard__ship { font-size: 12px; color: var(--green-2); font-weight: 700; }

/* ---------------- المنتج ---------------- */
.pdp { padding: 16px 0 24px; }
.pdp__grid { display: grid; gap: 18px; }
.gallery { min-width: 0; }
.gallery__stage {
  background: var(--white); border-radius: var(--radius); box-shadow: var(--shadow);
  height: min(68vh, 460px); display: flex; align-items: center; justify-content: center; padding: 14px; overflow: hidden;
}
/* بلا تمديد: الصورة ما تكبر فوق حجمها الطبيعي ولا تتشوه نسبتها */
.gallery__main { width: auto; height: auto; max-width: 100%; max-height: 100%; object-fit: contain; }
.gallery__thumbs { display: flex; gap: 8px; margin-top: 10px; overflow-x: auto; padding-bottom: 4px; }
.thumbw { flex: none; }
.thumb { width: 64px; height: 64px; padding: 4px; background: var(--white); border: 2px solid var(--line); border-radius: 10px; cursor: pointer; display: flex; align-items: center; justify-content: center; }
.thumb img { max-width: 100%; max-height: 100%; width: auto; height: auto; object-fit: contain; }
.thumb.is-on { border-color: var(--navy); }

.info { min-width: 0; }
.info__model { margin: 0; font-size: 13px; color: var(--muted); }
.info__model span { direction: ltr; unicode-bidi: isolate; font-weight: 700; color: var(--navy); }
.info__name { font-size: 26px; font-weight: 900; color: var(--navy); margin: 2px 0 4px; }
.info__tag { margin: 0 0 12px; color: #3A4652; }
.info__desc { color: #3A4652; }
.info__sku { font-size: 13px; color: var(--muted); margin: 0 0 12px; }
.info__sku span { font-weight: 700; unicode-bidi: isolate; }

.price {
  position: relative; display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 8px 12px; align-items: end;
  background: var(--white); border: 1px solid var(--line); border-radius: var(--radius); padding: 30px 14px 12px;
}
.price__badge { position: absolute; top: -1px; inset-inline-start: 12px; background: var(--save); color: #fff; font-weight: 900; font-size: 14px; border-radius: 0 0 10px 10px; padding: 3px 12px; }
.price__col { display: flex; flex-direction: column; line-height: 1.2; }
.price__lbl { font-size: 13px; color: var(--muted); font-weight: 700; margin-bottom: 2px; }
/* السعر السابق: رمادي باهت، شطب واضح، تقريباً بنفس حجم السعر الجديد */
.price__was { font-size: 26px; font-weight: 700; color: #8A96A3; text-decoration: line-through; text-decoration-thickness: 2.5px; text-decoration-color: #7C8894; }
.price__is { font-size: 28px; font-weight: 900; color: var(--ink); }
.price__was, .price__is, .pcard__o, .pcard__p, #sUnit, #sTotal, #sDelivery, #sSave { white-space: nowrap; }
.price__save { grid-column: 1 / -1; margin: 0; justify-self: start; background: #FDECEA; color: var(--save); font-weight: 900; font-size: 17px; border-radius: 8px; padding: 2px 12px; }
.assure { list-style: none; margin: 10px 0; padding: 0; display: flex; flex-wrap: wrap; gap: 6px 14px; font-weight: 800; color: var(--green-2); }

/* ---------------- الأقسام ---------------- */
.sec { padding: 30px 0; }
.sec--white { background: var(--white); }
.sec--dark { background: var(--navy); color: #fff; }
.sec__title { font-size: 22px; font-weight: 900; color: var(--navy); margin-bottom: 14px; }
.sec--dark .sec__title { color: #fff; }
.cards { display: grid; grid-template-columns: 1fr; gap: 10px; }
.card { background: var(--bg); border-radius: var(--radius); padding: 14px; border: 1px solid var(--line); }
.card__t { font-size: 17px; color: var(--navy); font-weight: 900; }
.card__d { margin: 4px 0 0; color: #3A4652; }

.acc { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-bottom: 12px; }
.acc__i { margin: 0; background: var(--white); border-radius: var(--radius); padding: 10px; display: flex; justify-content: center; align-items: center; box-shadow: var(--shadow); }
.acc__i img { max-height: 260px; width: auto; }
.acc:has(> :only-child) { grid-template-columns: 1fr; }
.chips { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.chip { background: var(--white); border: 1px solid var(--line); border-radius: 999px; padding: 6px 14px; font-weight: 700; }

.specs { width: 100%; border-collapse: collapse; table-layout: fixed; }
.specs th, .specs td { padding: 10px 8px; border-bottom: 1px solid rgba(255, 255, 255, .15); text-align: right; vertical-align: top; overflow-wrap: anywhere; }
.specs th { width: 42%; color: #BFD4E8; font-weight: 700; }
.specs td { font-weight: 800; }

/* ---------------- الطلب ---------------- */
.order { background: linear-gradient(180deg, #E9F1F8, var(--bg)); }
.order__grid { display: grid; gap: 14px; }
.order__head p { margin: 4px 0; }
.order__card { background: var(--white); border-radius: 18px; box-shadow: var(--shadow); padding: 16px; min-width: 0; }
.osel { display: flex; gap: 12px; align-items: center; padding-bottom: 12px; border-bottom: 1px solid var(--line); margin-bottom: 12px; }
.osel__img { width: 96px; height: 96px; object-fit: contain; background: #FAFBFC; border-radius: 10px; flex: none; }
.osel__txt { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.osel__txt > b { color: var(--navy); font-size: 18px; }
.osel__price s { color: #8A96A3; font-weight: 700; }
.osel__price b { font-size: 18px; }
.osel__model { font-size: 13px; color: var(--muted); direction: ltr; text-align: right; unicode-bidi: isolate; }
.osel__save { align-self: flex-start; background: #FDECEA; color: var(--save); font-weight: 800; font-size: 13px; border-radius: 8px; padding: 0 8px; }
.fld { display: flex; flex-direction: column; gap: 6px; margin-bottom: 14px; border: 0; padding: 0; }
.fld__l { font-weight: 800; }
.req { font-style: normal; color: var(--save); font-weight: 700; font-size: 13px; }
.fld input, .fld select {
  width: 100%; min-height: 50px; border: 1.5px solid #C9D3DD; border-radius: 12px; padding: 10px 12px;
  font-size: 16px; background: #fff; color: var(--ink);
}
.fld input.is-err, .fld select.is-err { border-color: var(--red); }
.qty output { display: inline-block; }
.fld__err { display: none; color: var(--red); font-size: 14px; font-weight: 700; margin: 0; }
.fld__err.is-on { display: block; }
.qty { display: inline-flex; align-items: center; border: 1.5px solid #C9D3DD; border-radius: 12px; overflow: hidden; align-self: flex-start; }
.qty button { width: 52px; height: 50px; border: 0; background: var(--bg); font-size: 22px; font-weight: 900; cursor: pointer; color: var(--navy); }
.qty button:disabled { color: #B6C0CA; cursor: not-allowed; }
.qty output { min-width: 52px; text-align: center; font-weight: 900; font-size: 18px; }
.hp { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); inset-inline-start: -9999px; }

.sum { margin: 6px 0 14px; background: var(--bg); border-radius: 12px; padding: 10px 12px; }
.sum > div { display: flex; justify-content: space-between; gap: 10px; padding: 5px 0; }
.sum dt { color: var(--muted); font-weight: 700; }
.sum dd { margin: 0; font-weight: 800; text-align: left; overflow-wrap: anywhere; }
.sum__ship dd { color: var(--green-2); }
.sum__total { border-top: 1px dashed #C9D3DD; margin-top: 4px; padding-top: 8px !important; }
.sum__total dt, .sum__total dd { color: var(--ink); font-size: 19px; font-weight: 900; }
.sum__save dt, .sum__save dd { color: var(--save); }
.sum__free dd { font-size: 13px; font-weight: 700; color: var(--green-2); text-align: right; }
.sum__free dt { display: none; }
.alert { background: #FDECEA; color: var(--red); border-radius: 10px; padding: 10px 12px; font-weight: 700; }
.order__fine { font-size: 13px; color: var(--muted); margin: 10px 0 0; }
.done { text-align: center; padding: 10px 0; }
.done__icon { width: 64px; height: 64px; margin: 0 auto 8px; border-radius: 50%; background: var(--green); color: #fff; font-size: 34px; display: flex; align-items: center; justify-content: center; }
.done h3 { color: var(--navy); font-size: 22px; }
.done:focus { outline: none; }

/* ---------------- الثقة والأسئلة ---------------- */
.trust { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.trust li { background: var(--bg); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px 10px; display: flex; flex-direction: column; align-items: center; text-align: center; gap: 2px; }
.trust__i { font-size: 26px; }
.trust b { color: var(--navy); }
.trust span:last-child { color: var(--muted); font-size: 14px; }
.trust li:last-child { grid-column: 1 / -1; }
.reviews { display: grid; gap: 10px; }
.review { margin: 0; background: var(--white); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px; }
.review p { margin: 0 0 6px; }
.review cite { font-style: normal; font-weight: 800; color: var(--navy); }
.faq details { background: var(--white); border: 1px solid var(--line); border-radius: 12px; margin-bottom: 8px; padding: 0 14px; }
.faq summary { cursor: pointer; font-weight: 800; padding: 14px 0; min-height: 48px; }
.faq p { margin: 0 0 14px; color: #3A4652; }

/* ---------------- التذييل والعناصر الثابتة ---------------- */
.ftr { background: var(--navy-2); color: #C8D6E4; padding: 24px 0 96px; }
.ftr__in { display: flex; flex-direction: column; align-items: center; gap: 12px; text-align: center; }
.ftr__logo { background: #fff; border-radius: 8px; padding: 4px; }
.ftr__nav { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px 16px; }
.ftr__nav a { color: #fff; min-height: 44px; display: inline-flex; align-items: center; }
.ftr__c { margin: 0; font-size: 13px; }
.ftr__wa { margin: 0; }
.ftr__wa a { color: #fff; font-weight: 700; min-height: 44px; display: inline-flex; align-items: center; }

.sticky {
  position: fixed; bottom: 0; left: 0; right: 0; z-index: 40; background: var(--white);
  box-shadow: 0 -6px 20px rgba(0, 0, 0, .12); transform: translateY(110%); transition: transform .2s;
  padding: 8px 12px calc(8px + env(safe-area-inset-bottom));
}
.sticky.is-on { transform: translateY(0); }
.sticky__in { display: flex; align-items: center; justify-content: space-between; gap: 10px; max-width: 1160px; margin: 0 auto; }
.sticky__txt { display: flex; flex-direction: column; min-width: 0; line-height: 1.25; }
.sticky__txt > b { color: var(--navy); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sticky__txt s { color: #8A96A3; font-size: 14px; font-weight: 700; }
.sticky__txt span b { font-size: 17px; }
.sticky .btn { flex: none; min-height: 48px; padding: 8px 22px; font-size: 17px; }

.wafloat {
  position: fixed; left: 14px; bottom: 84px; z-index: 39; width: 54px; height: 54px; border-radius: 50%;
  background: #1DA851; color: #fff; display: flex; align-items: center; justify-content: center; box-shadow: 0 6px 18px rgba(0, 0, 0, .2);
  transition: opacity .2s;
}
.wafloat svg { width: 30px; height: 30px; }
.wafloat.is-away { opacity: 0; pointer-events: none; }

/* ---------------- صفحات قانونية ---------------- */
.legal { padding: 24px 0 40px; }
.legal h1 { color: var(--navy); font-size: 26px; margin-bottom: 4px; }
.legal h2 { color: var(--navy); font-size: 19px; margin: 20px 0 6px; }
.legal .upd { color: var(--muted); margin-top: 0; }
.legal .box { background: var(--white); border: 1px solid var(--line); border-radius: 12px; padding: 12px 14px; }

/* ---------------- الشاشات الأكبر ---------------- */
@media (max-width: 359px) {
  .price { padding-inline: 10px; gap: 6px 8px; }
  .price__was { font-size: 20px; }
  .price__is { font-size: 22px; }
  .pick { gap: 8px; }
  .pcard { padding: 6px; }
  .pcard__n { font-size: 15px; }
  .pcard__p { font-size: 16px; }
  .pcard__o { font-size: 13px; }
  .hero__title { font-size: 25px; }
}
@media (min-width: 560px) {
  .pcard__media { height: 150px; }
  .pcard__img { max-height: 140px; }
  .cards { grid-template-columns: 1fr 1fr; }
  .reviews { grid-template-columns: 1fr 1fr; }
}
@media (min-width: 768px) {
  .pick { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .trust { grid-template-columns: repeat(5, 1fr); }
  .trust li:last-child { grid-column: auto; }
}
@media (min-width: 900px) {
  .hero__title { font-size: 36px; }
  .pick { gap: 16px; }
  .pcard { padding: 10px; }
  .pcard__media { height: 170px; }
  .pcard__img { max-height: 160px; }
  .pdp__grid { grid-template-columns: 1.05fr 1fr; gap: 32px; align-items: start; }
  .gallery { position: sticky; top: 12px; }
  .gallery__stage { height: 560px; }
  .info__name { font-size: 32px; }
  .price__was { font-size: 30px; }
  .price__is { font-size: 32px; }
  .cards { grid-template-columns: repeat(4, 1fr); }
  .order__grid { grid-template-columns: 1fr 1.1fr; align-items: start; gap: 28px; }
  .sticky { display: none; }
  .wafloat { bottom: 22px; }
  .ftr { padding-bottom: 28px; }
  .acc__i img { max-height: 320px; }
}
