/* العناصر اللي عليها hidden لازم تختفي حتى لو الكلاس بتاعها فيه display (زي زرار الواتساب في الهيدر) */
[hidden] { display: none !important; }
/* ===== Shopax storefront — marketplace style ===== */
:root {
  /* هوية المتجر — غيّر اللونين دول بس لو عاوز لون تاني */
  --brand: #6b46c1;          /* لون الهيدر */
  --brand-ink: #ffffff;      /* لون النص فوق الهيدر */

  --bg: #f3f4f8;
  --card: #ffffff;
  --ink: #1a1d24;
  --ink-2: #404553;
  --muted: #7e859b;
  --line: #e7e9f0;
  --soft: #f7f8fb;
  --green: #6b46c1;          /* زرار الشراء (بيتغير من ثيم المنتج) */
  --green-ink: #ffffff;
  --ok: #1f9d55;             /* نسبة الخصم / مميزات */
  --ok-soft: #e8f7ee;
  --red: #e2334b;
  --star: #f5a623;
  --radius: 12px;
  --shadow: 0 1px 2px rgba(20, 24, 40, .05), 0 6px 20px -10px rgba(20, 24, 40, .18);
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0; background: var(--bg); color: var(--ink);
  font-family: "Cairo", system-ui, -apple-system, "Segoe UI", sans-serif;
  font-size: 15px; line-height: 1.6;
}
a { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; }
button { font: inherit; cursor: pointer; color: inherit; }
input, select, textarea { font: inherit; color: inherit; }
svg { flex: none; }
.wrap { max-width: 1280px; margin: 0 auto; padding: 0 16px; }
.hide { display: none !important; }

/* ===== announcement ===== */
#announce { background: var(--ink); color: #fff; text-align: center; padding: 7px 12px; font-size: 13px; font-weight: 600; }

/* ===== header ===== */
.header { background: var(--brand); color: var(--brand-ink); position: sticky; top: 0; z-index: 30; box-shadow: 0 1px 0 rgba(0,0,0,.06); }
.header .wrap { display: flex; align-items: center; gap: 18px; height: 66px; justify-content: flex-start; }
.logo { font-weight: 800; font-size: 25px; letter-spacing: -.5px; white-space: nowrap; display: flex; align-items: center; }
.logo img { height: 40px; width: auto; }
.deliver { display: flex; align-items: center; gap: 6px; font-size: 12px; line-height: 1.3; white-space: nowrap; }
.deliver svg { width: 22px; height: 22px; }
.deliver b { display: block; font-size: 13px; }
.search { flex: 1; display: flex; align-items: center; background: #fff; border-radius: 10px; height: 42px; padding: 0 12px; gap: 8px; min-width: 0; box-shadow: inset 0 0 0 1px rgba(0,0,0,.04); }
.search svg { width: 20px; height: 20px; color: var(--muted); }
.search input { flex: 1; border: 0; outline: 0; background: none; height: 100%; min-width: 0; font-size: 14px; }
.h-actions { display: flex; align-items: center; gap: 4px; }
.h-btn, .cart-link { position: relative; display: inline-flex; align-items: center; gap: 8px; font-weight: 700; font-size: 14px; padding: 8px 10px; border-radius: 10px; white-space: nowrap; }
.h-btn:hover, .cart-link:hover { background: rgba(0,0,0,.06); }
.h-btn svg, .cart-link svg { width: 24px; height: 24px; }
.cart-link b { position: absolute; top: 0; right: 0; background: var(--red); color: #fff; font-size: 11px; min-width: 19px; height: 19px; border-radius: 10px; display: grid; place-items: center; padding: 0 5px; line-height: 1; }
.catnav { background: #fff; border-bottom: 1px solid var(--line); }
.catnav .wrap { display: flex; gap: 4px; overflow-x: auto; scrollbar-width: none; height: 44px; align-items: center; }
.catnav .wrap::-webkit-scrollbar { display: none; }
.catnav a { white-space: nowrap; font-size: 14px; font-weight: 700; padding: 6px 12px; border-radius: 8px; color: var(--ink-2); }
.catnav a:hover, .catnav a.on { background: var(--soft); color: var(--ink); }
.catnav a.hot { color: var(--red); }

@media (max-width: 860px) {
  .header .wrap { flex-wrap: wrap; height: auto; padding-top: 8px; padding-bottom: 10px; gap: 8px 10px; }
  .logo { font-size: 22px; order: 1; }
  .logo img { height: 34px; }
  .deliver { order: 2; margin-inline-start: 4px; }
  .h-actions { order: 3; margin-inline-start: auto; }
  .h-btn span, .cart-link span { display: none; }
  .search { order: 4; flex-basis: 100%; height: 40px; }
  .h-wa { display: none; }
}

/* ===== mobile bottom nav ===== */
.bnav { display: none; }
@media (max-width: 860px) {
  .bnav { display: grid; grid-template-columns: repeat(3, 1fr); position: fixed; bottom: 0; left: 0; right: 0; z-index: 35; background: #fff; border-top: 1px solid var(--line); padding: 6px 0 calc(6px + env(safe-area-inset-bottom)); }
  .bnav a { display: flex; flex-direction: column; align-items: center; gap: 2px; font-size: 11px; font-weight: 700; color: var(--muted); position: relative; }
  .bnav a.on { color: var(--ink); }
  .bnav svg { width: 22px; height: 22px; }
  .bnav b { position: absolute; top: -4px; left: calc(50% - 20px); background: var(--red); color: #fff; font-size: 10px; min-width: 17px; height: 17px; border-radius: 9px; display: grid; place-items: center; padding: 0 4px; line-height: 1; }
  body.has-bnav { padding-bottom: 64px; }
  body.has-bnav .sp.bottom-left, body.has-bnav .sp.bottom-right { bottom: 80px !important; }
}

/* ===== home: hero ===== */
.hero { display: grid; grid-template-columns: 1fr 300px; gap: 14px; padding-top: 16px; }
.hero-side { display: grid; gap: 14px; }
@media (max-width: 860px) { .hero { grid-template-columns: 1fr; padding-top: 12px; } .hero-side { display: none; } }
.slider { position: relative; border-radius: 14px; overflow: hidden; background: #fff; }
.slides { display: flex; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; scroll-behavior: smooth; }
.slides::-webkit-scrollbar { display: none; }
.slide { flex: 0 0 100%; scroll-snap-align: start; aspect-ratio: 16 / 6; position: relative; display: block; overflow: hidden; }
.slide > img { width: 100%; height: 100%; object-fit: cover; }
@media (max-width: 860px) { .slide { aspect-ratio: 16 / 8; } }
.slider .dots { position: absolute; bottom: 10px; left: 0; right: 0; display: flex; justify-content: center; gap: 6px; }
.slider .dots i { width: 7px; height: 7px; border-radius: 4px; background: rgba(255,255,255,.6); box-shadow: 0 0 0 1px rgba(0,0,0,.08); transition: width .2s; }
.slider .dots i.on { width: 20px; background: #fff; }
.sl-arrow { position: absolute; top: 50%; transform: translateY(-50%); width: 38px; height: 38px; border-radius: 50%; background: rgba(255,255,255,.9); border: 0; display: grid; place-items: center; box-shadow: var(--shadow); z-index: 2; }
.sl-arrow svg { width: 18px; height: 18px; }
.sl-arrow.prev { right: 12px; } .sl-arrow.next { left: 12px; }
@media (max-width: 860px) { .sl-arrow { display: none; } }

/* auto banner (من المنتجات لو مفيش بانرات) */
.abn { display: grid; grid-template-columns: 1.1fr 1fr; align-items: center; height: 100%; padding: 0 6%; gap: 4%; color: #fff; }
.abn .t { min-width: 0; }
.abn small { display: inline-block; background: rgba(255,255,255,.18); padding: 3px 12px; border-radius: 999px; font-weight: 700; font-size: clamp(11px, 1.4vw, 14px); margin-bottom: 8px; }
.abn h2 { margin: 0 0 6px; font-size: clamp(18px, 3.2vw, 38px); line-height: 1.25; font-weight: 800; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.abn .pr { font-size: clamp(14px, 2vw, 22px); font-weight: 800; }
.abn .pr s { opacity: .7; font-weight: 600; font-size: .75em; margin-inline-start: 8px; }
.abn .go { display: inline-block; margin-top: 12px; background: #fff; color: var(--ink); font-weight: 800; padding: 8px 18px; border-radius: 999px; font-size: clamp(12px, 1.5vw, 15px); }
.abn .im { height: 86%; display: grid; place-items: center; }
.abn .im img { max-height: 100%; width: auto; max-width: 100%; aspect-ratio: 1; object-fit: cover; border-radius: 16px; box-shadow: 0 20px 40px -18px rgba(0,0,0,.5); }
.abn.c0 { background: linear-gradient(120deg, #1f3bb3, #4f7cff); }
.abn.c1 { background: linear-gradient(120deg, #b3124a, #ff5a7a); }
.abn.c2 { background: linear-gradient(120deg, #0f6e5a, #26c29a); }
.abn.c3 { background: linear-gradient(120deg, #5a2bb8, #9a6bff); }
.abn.c4 { background: linear-gradient(120deg, #c2410c, #fb923c); }

.promo { border-radius: 14px; padding: 18px; display: flex; flex-direction: column; justify-content: center; gap: 4px; position: relative; overflow: hidden; }
.promo b { font-size: 19px; line-height: 1.3; }
.promo span { font-size: 13px; color: var(--ink-2); }
.promo svg { position: absolute; left: 14px; bottom: 12px; width: 54px; height: 54px; opacity: .9; }
.promo.p1 { background: #f1ecfb; } .promo.p2 { background: #dff3ff; }

/* ===== trust strip ===== */
.trust { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; margin-top: 14px; }
.trust div { background: #fff; border-radius: 12px; padding: 12px; display: flex; align-items: center; gap: 10px; font-size: 13px; line-height: 1.35; }
.trust svg { width: 30px; height: 30px; color: var(--green); }
.trust b { display: block; font-size: 14px; }
.trust span { color: var(--muted); font-size: 12px; }
@media (max-width: 860px) {
  .trust { grid-template-columns: repeat(4, minmax(185px, 1fr)); overflow-x: auto; scrollbar-width: none; margin-inline: -16px; padding-inline: 16px; }
  .trust::-webkit-scrollbar { display: none; }
}

/* ===== categories (circles) ===== */
.cats { display: grid; grid-template-columns: repeat(6, 1fr); gap: 10px; background: #fff; border-radius: 14px; padding: 16px 12px; margin-top: 14px; }
.cat { display: flex; flex-direction: column; align-items: center; gap: 8px; text-align: center; font-weight: 700; font-size: 13px; line-height: 1.3; }
.cat i { width: 76px; height: 76px; border-radius: 50%; display: grid; place-items: center; transition: transform .15s; }
.cat i svg { width: 34px; height: 34px; }
.cat:hover i { transform: translateY(-2px); }
@media (max-width: 860px) {
  .cats { display: flex; overflow-x: auto; scrollbar-width: none; gap: 14px; padding: 14px; }
  .cats::-webkit-scrollbar { display: none; }
  .cat { flex: 0 0 70px; font-size: 12px; }
  .cat i { width: 62px; height: 62px; } .cat i svg { width: 28px; height: 28px; }
}

/* ===== sections / rows ===== */
.row-sec { background: #fff; border-radius: 14px; padding: 16px; margin-top: 14px; }
.row-h { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 12px; }
.row-h h2 { margin: 0; font-size: 20px; font-weight: 800; display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.row-h .more { font-size: 13px; font-weight: 700; color: var(--green); white-space: nowrap; display: inline-flex; align-items: center; gap: 2px; }
.row-h .more svg { width: 16px; height: 16px; }
.deal-h { background: linear-gradient(90deg, #fff4f5, #fff); }
.cdown { display: inline-flex; align-items: center; gap: 4px; font-size: 13px; font-weight: 700; color: var(--ink-2); }
.cdown b { background: var(--red); color: #fff; border-radius: 6px; padding: 1px 6px; font-variant-numeric: tabular-nums; min-width: 28px; text-align: center; }
.hscroll { display: grid; grid-auto-flow: column; grid-auto-columns: calc((100% - 60px) / 6); gap: 12px; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; padding-bottom: 2px; }
.hscroll::-webkit-scrollbar { display: none; }
.hscroll > * { scroll-snap-align: start; }
@media (max-width: 1100px) { .hscroll { grid-auto-columns: calc((100% - 36px) / 4); } }
@media (max-width: 860px) { .hscroll { grid-auto-columns: 44%; gap: 10px; margin-inline: -16px; padding-inline: 16px; scroll-padding-inline: 16px; } .row-sec { padding: 14px 16px; border-radius: 0; margin-inline: -16px; } .row-h h2 { font-size: 17px; } }

/* ===== listing ===== */
.list-h { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin: 18px 0 12px; }
.list-h h1 { margin: 0; font-size: 22px; }
.list-h h1 small { color: var(--muted); font-size: 14px; font-weight: 600; margin-inline-start: 6px; }
.sort { border: 1px solid var(--line); background: #fff; border-radius: 10px; padding: 8px 12px; font-weight: 600; font-size: 14px; }
.chipbar { display: flex; gap: 8px; overflow-x: auto; scrollbar-width: none; padding-bottom: 4px; }
.chipbar::-webkit-scrollbar { display: none; }
.chipbar a { white-space: nowrap; border: 1px solid var(--line); background: #fff; padding: 6px 14px; border-radius: 999px; font-weight: 700; font-size: 13px; }
.chipbar a.on { background: var(--ink); color: #fff; border-color: var(--ink); }

/* ===== product grid & card ===== */
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 12px; padding: 4px 0 40px; }
@media (max-width: 560px) { .grid { grid-template-columns: repeat(2, 1fr); gap: 8px; } }
.card { background: var(--card); border-radius: var(--radius); padding: 10px; display: flex; flex-direction: column; border: 1px solid var(--line); transition: box-shadow .15s, transform .15s; min-width: 0; position: relative; }
.card:hover { box-shadow: var(--shadow); }
.card-img { position: relative; display: block; border-radius: 8px; overflow: hidden; aspect-ratio: 1; background: var(--soft); }
.card-img img { width: 100%; height: 100%; object-fit: cover; transition: transform .3s; }
.card:hover .card-img img { transform: scale(1.03); }
.noimg { width: 100%; height: 100%; }
.badge { position: absolute; top: 8px; right: 8px; background: var(--red); color: #fff; font-weight: 800; font-size: 12px; padding: 2px 8px; border-radius: 6px; z-index: 1; line-height: 1.6; }
.tag-best { position: absolute; top: 8px; left: 8px; background: rgba(26,29,36,.85); color: #fff; font-size: 11px; font-weight: 700; padding: 2px 8px; border-radius: 6px; z-index: 1; }
.quick-add { position: absolute; bottom: 8px; left: 8px; width: 36px; height: 36px; border-radius: 10px; background: #fff; border: 1px solid var(--line); display: grid; place-items: center; z-index: 2; box-shadow: 0 2px 8px rgba(0,0,0,.1); }
.quick-add svg { width: 20px; height: 20px; }
.quick-add:hover { background: var(--ink); color: #fff; border-color: var(--ink); }
.card-title { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; font-weight: 600; font-size: 14px; line-height: 1.45; margin: 10px 0 4px; min-height: 2.9em; color: var(--ink); }
.card-rating { display: flex; align-items: center; gap: 6px; font-size: 12px; color: var(--muted); margin-bottom: 2px; }
.rpill { display: inline-flex; align-items: center; gap: 3px; background: var(--ok); color: #fff; font-weight: 800; font-size: 11px; padding: 0 6px; border-radius: 5px; line-height: 1.7; }
.rpill svg { width: 10px; height: 10px; }
.price-row { display: flex; align-items: baseline; gap: 6px; flex-wrap: wrap; margin: 2px 0 6px; }
.price { font-weight: 800; font-size: 17px; }
.price small { font-size: .7em; font-weight: 700; margin-inline-start: 2px; }
.was { color: var(--muted); font-size: 13px; }
.offp { color: var(--ok); font-weight: 800; font-size: 13px; }
.card-tags { display: flex; flex-wrap: wrap; gap: 4px; margin-top: auto; }
.ctag { display: inline-flex; align-items: center; gap: 3px; font-size: 11px; font-weight: 700; padding: 1px 6px; border-radius: 5px; background: var(--soft); color: var(--ink-2); }
.ctag svg { width: 12px; height: 12px; }
.ctag.free { background: var(--ok-soft); color: var(--ok); }
.ctag.cod { background: #f1ecfb; color: #553399; }

.btn-add, .btn-primary {
  margin-top: auto; width: 100%; border: 0; border-radius: 10px; padding: 12px;
  background: var(--green); color: var(--green-ink); font-weight: 800; font-size: 15px;
  transition: filter .15s, transform .1s; display: inline-flex; align-items: center; justify-content: center; gap: 8px; text-align: center;
}
.btn-add:hover, .btn-primary:hover { filter: brightness(1.08); }
.btn-add:active, .btn-primary:active { transform: scale(.99); }
.btn-primary:disabled { opacity: .6; cursor: default; }
.btn-primary svg { width: 20px; height: 20px; }
.btn-ghost { background: #fff; border: 1px solid var(--line); border-radius: 10px; padding: 10px 16px; font-weight: 700; display: inline-flex; align-items: center; gap: 6px; }

/* ===== breadcrumb ===== */
.crumbs { display: flex; gap: 6px; align-items: center; font-size: 13px; color: var(--muted); padding: 14px 0 0; flex-wrap: wrap; }
.crumbs a:hover { color: var(--ink); text-decoration: underline; }
.crumbs svg { width: 14px; height: 14px; }
.crumbs span:last-child { color: var(--ink-2); display: -webkit-box; -webkit-line-clamp: 1; -webkit-box-orient: vertical; overflow: hidden; max-width: 60vw; }

/* ===== product page ===== */
.product { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr); gap: 28px; padding: 16px 0 28px; align-items: start; }
.product > div:first-child { position: sticky; top: 130px; }
@media (max-width: 860px) { .product { grid-template-columns: minmax(0, 1fr); gap: 16px; padding-top: 10px; } .product > div:first-child { position: static; } }
.gallery { background: #fff; border-radius: 14px; padding: 12px; }
.gallery .main { border-radius: 10px; overflow: hidden; aspect-ratio: 1; background: var(--soft); position: relative; }
.gallery .main img { width: 100%; height: 100%; object-fit: cover; }
.gallery .main .badge { font-size: 14px; top: 12px; right: 12px; }
.thumbs { display: flex; gap: 8px; margin-top: 10px; overflow-x: auto; scrollbar-width: none; }
.thumbs img { width: 70px; height: 70px; object-fit: cover; border-radius: 8px; border: 2px solid var(--line); cursor: pointer; flex: none; }
.thumbs img.on { border-color: var(--ink); }
.pinfo { background: #fff; border-radius: 14px; padding: 20px; }
.pinfo .pcat { display: inline-block; font-size: 13px; font-weight: 700; color: var(--green); margin-bottom: 4px; }
.pinfo h1 { font-size: 22px; margin: 0 0 6px; line-height: 1.45; font-weight: 800; }
.rating-sum { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; color: var(--muted); margin-bottom: 8px; }
.rating-sum b { color: var(--ink); }
.stars { color: var(--star); letter-spacing: 1px; }
.pinfo .caption { color: var(--ink-2); margin: 0 0 12px; }
.pinfo .price-row { gap: 10px; align-items: center; padding: 12px 0; border-top: 1px solid var(--line); margin: 8px 0 4px; }
.pinfo .price { font-size: 28px; }
.pinfo .was { font-size: 16px; }
.off-pill { background: var(--ok-soft); color: var(--ok); font-weight: 800; font-size: 13px; padding: 2px 10px; border-radius: 6px; }
.vat { width: 100%; font-size: 12px; color: var(--muted); margin-top: -4px; }
.ship-note { display: inline-flex; align-items: center; gap: 8px; background: var(--ok-soft); color: var(--ok); padding: 6px 12px; border-radius: 999px; font-size: 14px; margin-bottom: 14px; font-weight: 700; }
.ptrust { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; margin: 14px 0; }
.ptrust div { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 4px; font-size: 12px; font-weight: 700; color: var(--ink-2); line-height: 1.3; padding: 10px 4px; background: var(--soft); border-radius: 10px; }
.ptrust svg { width: 24px; height: 24px; color: var(--green); }
@media (max-width: 420px) { .ptrust div { font-size: 11px; } }

.timer { background: linear-gradient(135deg, #ff5b3c, #e2334b); color: #fff; border-radius: 12px; padding: 10px 14px; display: flex; align-items: center; justify-content: space-between; gap: 10px; margin: 10px 0; flex-wrap: wrap; }
.timer .tl { font-weight: 800; font-size: 15px; }
.timer .tt { display: flex; align-items: center; gap: 4px; direction: ltr; }
.timer .tt > div { display: flex; flex-direction: column; align-items: center; background: rgba(255,255,255,.18); border-radius: 8px; padding: 2px 8px; min-width: 46px; }
.timer .tt b { font-size: 18px; font-variant-numeric: tabular-nums; line-height: 1.3; }
.timer .tt span { font-size: 10px; opacity: .9; }
.timer .tt i { font-style: normal; font-weight: 800; }
.timer .tt { flex-direction: row-reverse; }
.viewers { display: flex; align-items: center; gap: 8px; font-size: 13px; color: var(--ink-2); margin: 8px 0; }
.viewers::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--red); box-shadow: 0 0 0 4px rgba(226,51,75,.15); animation: pulse 1.4s infinite; }
@keyframes pulse { 50% { box-shadow: 0 0 0 7px rgba(226,51,75,0); } }
.viewers b { color: var(--red); }

.order-box { border: 2px solid var(--ink); border-radius: 14px; padding: 16px; margin-top: 16px; scroll-margin-top: 140px; }
.order-box h3 { margin: 0 0 12px; font-size: 17px; font-weight: 800; display: flex; align-items: center; gap: 8px; }
.popts { display: grid; gap: 12px; margin-bottom: 14px; }
.popt label { font-weight: 700; display: block; margin-bottom: 6px; }
.popt .req { color: var(--red); }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip { border: 2px solid var(--line); background: #fff; border-radius: 10px; padding: 7px 16px; font-weight: 700; color: var(--ink); min-width: 54px; }
.chip.on { border-color: var(--ink); background: var(--ink); color: #fff; }
.popt.missing .chips { outline: 2px solid var(--red); outline-offset: 4px; border-radius: 12px; }
.oline { font-size: 12px; color: var(--muted); margin-top: 2px; font-weight: 400; }
.offers { display: grid; gap: 8px; margin-bottom: 14px; }
.offer { display: flex; align-items: center; gap: 10px; border: 2px solid var(--line); border-radius: 12px; padding: 10px 14px; cursor: pointer; background: #fff; transition: border-color .15s; }
.offer.on { border-color: var(--green); background: color-mix(in srgb, var(--green) 6%, #fff); }
.offer input { accent-color: var(--green); width: 18px; height: 18px; margin: 0; }
.offer .ot { font-weight: 700; display: flex; flex-direction: column; line-height: 1.4; }
.offer .ot small { color: var(--ok); font-weight: 800; font-size: 12px; }
.offer .op { margin-right: auto; font-weight: 800; }
.ol { display: inline-block; background: var(--ok-soft); color: var(--ok); font-size: 11px; padding: 0 8px; border-radius: 999px; font-weight: 700; }
.qty { display: inline-flex; align-items: center; border: 1px solid var(--line); border-radius: 10px; overflow: hidden; margin-bottom: 14px; background: #fff; }
.qty button { width: 40px; height: 42px; border: 0; background: #fff; font-size: 20px; }
.qty button:hover { background: var(--soft); }
.qty input { width: 52px; height: 42px; border: 0; border-inline: 1px solid var(--line); text-align: center; font-weight: 700; -moz-appearance: textfield; }
.qty input::-webkit-outer-spin-button, .qty input::-webkit-inner-spin-button { -webkit-appearance: none; }
.pinfo .btn-primary { margin-top: 0; padding: 14px; font-size: 17px; }
.pinfo .btn-buy { background: var(--ink); color: #fff; margin-top: 10px; }
.pinfo > .cta { margin: 6px 0 0; }
.desc { margin-top: 20px; padding-top: 18px; border-top: 1px solid var(--line); white-space: pre-line; color: var(--ink-2); overflow-wrap: anywhere; }
.desc img { border-radius: 10px; height: auto; }
.desc :is(h1, h2, h3) { color: var(--ink); line-height: 1.4; }

/* reviews */
.reviews { background: #fff; border-radius: 14px; padding: 20px; margin-bottom: 20px; }
.reviews h2 { margin: 0 0 14px; font-size: 20px; display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.reviews h2 small { font-size: 13px; color: var(--muted); font-weight: 600; }
.rgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 12px; }
.review { border: 1px solid var(--line); border-radius: 12px; padding: 14px; }
.review .rh { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; font-size: 14px; }
.review .vf { color: var(--ok); font-size: 12px; font-weight: 700; margin-inline-start: auto; }
.review p { margin: 8px 0 0; color: var(--ink-2); font-size: 14px; }
.rimgs { display: flex; gap: 6px; margin-top: 8px; overflow-x: auto; }
.rimgs img { width: 72px; height: 72px; object-fit: cover; border-radius: 8px; }

/* sticky buy bar */
.sticky-bar { position: fixed; bottom: 0; left: 0; right: 0; z-index: 36; background: #fff; border-top: 1px solid var(--line); padding: 10px 16px calc(10px + env(safe-area-inset-bottom)); display: flex; align-items: center; gap: 10px; transform: translateY(110%); transition: transform .25s; box-shadow: 0 -8px 24px -12px rgba(0,0,0,.2); }
.sticky-bar.show { transform: none; }
.sticky-bar img { width: 46px; height: 46px; border-radius: 8px; object-fit: cover; }
.sticky-bar .sb-info { flex: 1; min-width: 0; display: flex; flex-direction: column; line-height: 1.35; }
.sticky-bar .sb-info b { font-size: 13px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sticky-bar .sb-info span { font-weight: 800; color: var(--ink); }
.sticky-bar .btn-primary { width: auto; margin: 0; padding: 12px 22px; white-space: nowrap; }
@media (min-width: 861px) { .sticky-bar { max-width: 640px; left: 50%; right: auto; transform: translate(-50%, 130%); bottom: 16px; border-radius: 14px; border: 1px solid var(--line); } .sticky-bar.show { transform: translate(-50%, 0); } }

/* ===== cart & checkout ===== */
.page-title { font-size: 22px; margin: 20px 0 14px; font-weight: 800; display: flex; align-items: center; gap: 8px; }
.page-title small { font-size: 14px; color: var(--muted); font-weight: 600; }
.box { background: var(--card); border-radius: 14px; padding: 18px; border: 1px solid var(--line); }
.box h3 { margin: 0 0 12px; font-size: 17px; }
.cart-item { display: grid; grid-template-columns: 84px 1fr auto; gap: 14px; align-items: center; padding: 14px 0; border-bottom: 1px solid var(--line); }
.cart-item:first-child { padding-top: 0; }
.cart-item:last-child { border-bottom: 0; padding-bottom: 0; }
.cart-item img { width: 84px; height: 84px; object-fit: cover; border-radius: 10px; background: var(--soft); }
.cart-item .nm { font-weight: 700; line-height: 1.45; }
.cart-item .rm { background: none; border: 0; color: var(--muted); font-size: 13px; padding: 4px 0 0; display: inline-flex; align-items: center; gap: 4px; }
.cart-item .rm:hover { color: var(--red); }
.cart-item .qty { margin: 8px 0 0; }
.cart-item .qty button { height: 32px; width: 32px; }
.cart-item .qty input { height: 32px; width: 42px; }
.totals { display: grid; gap: 8px; margin-top: 4px; font-size: 14px; }
.totals div { display: flex; justify-content: space-between; }
.totals .grand { font-weight: 800; font-size: 19px; border-top: 1px solid var(--line); padding-top: 12px; margin-top: 4px; }
.two { display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr); gap: 16px; align-items: start; padding-bottom: 40px; }
.two > .box:last-child { position: sticky; top: 130px; }
@media (max-width: 860px) { .two { grid-template-columns: 1fr; } .two > .box:last-child { position: static; } }
.sum-trust { display: grid; gap: 8px; margin-top: 14px; padding-top: 14px; border-top: 1px dashed var(--line); font-size: 13px; color: var(--ink-2); }
.sum-trust div { display: flex; align-items: center; gap: 8px; }
.sum-trust svg { width: 18px; height: 18px; color: var(--ok); }
.field { display: grid; gap: 6px; margin-bottom: 14px; }
.field label { font-weight: 700; font-size: 14px; }
.field input, .field select, .field textarea { width: 100%; border: 1px solid #d5d9e3; border-radius: 10px; padding: 12px; background: #fff; font-size: 15px; }
.field input:focus, .field select:focus, .field textarea:focus { outline: 2px solid var(--green); border-color: transparent; }
.field .err { color: var(--red); font-size: 13px; display: none; }
.field.invalid input, .field.invalid select, .field.invalid textarea { border-color: var(--red); background: #fff7f8; }
.field.invalid .err { display: block; }
.order-box .totals { background: rgba(128,128,128,.14); border-radius: 10px; padding: 12px; margin-bottom: 14px; }
.empty { text-align: center; padding: 48px 16px; color: var(--muted); }
.empty svg { width: 72px; height: 72px; margin: 0 auto 10px; color: #c7cbd6; }
.empty a { color: var(--green); font-weight: 800; }
.empty .btn-primary { width: auto; padding: 12px 28px; margin-top: 12px; color: var(--green-ink); }

/* ===== thanks ===== */
.thanks { text-align: center; padding: 48px 20px; background: #fff; border-radius: 16px; margin: 24px auto 40px; max-width: 620px; }
.thanks .check { width: 84px; height: 84px; border-radius: 50%; background: var(--ok); color: #fff; display: grid; place-items: center; margin: 0 auto 18px; }
.thanks .check svg { width: 44px; height: 44px; }
.thanks h1 { margin: 0 0 6px; }
.thanks .num { font-size: 28px; font-weight: 800; background: var(--soft); display: inline-block; padding: 6px 18px; border-radius: 10px; margin: 8px 0; }
.steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin: 22px 0 6px; text-align: center; font-size: 13px; }
.steps div { background: var(--soft); border-radius: 12px; padding: 12px 8px; font-weight: 700; }
.steps b { display: grid; place-items: center; width: 28px; height: 28px; border-radius: 50%; background: var(--ink); color: #fff; margin: 0 auto 6px; }

/* ===== footer ===== */
.footer { background: #fff; border-top: 1px solid var(--line); margin-top: 24px; color: var(--ink-2); font-size: 14px; }
.f-trust { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; padding: 22px 0; border-bottom: 1px solid var(--line); }
.f-trust div { display: flex; align-items: center; gap: 10px; }
.f-trust svg { width: 30px; height: 30px; color: var(--green); }
.f-trust b { display: block; color: var(--ink); }
.f-trust span { font-size: 12px; color: var(--muted); }
.f-main { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1fr; gap: 24px; padding: 24px 0; }
.f-main h4 { margin: 0 0 10px; color: var(--ink); font-size: 15px; }
.f-main a { display: block; padding: 3px 0; }
.f-main a:hover { color: var(--ink); text-decoration: underline; }
.f-main .f-logo { font-size: 24px; font-weight: 800; color: var(--ink); margin-bottom: 6px; }
.f-main .f-logo img { height: 36px; }
.f-main p { margin: 0; color: var(--muted); }
.f-contact a { display: inline-flex; align-items: center; gap: 6px; }
.f-contact svg { width: 18px; height: 18px; }
.f-bottom { border-top: 1px solid var(--line); padding: 14px 0; display: flex; justify-content: space-between; gap: 10px; flex-wrap: wrap; font-size: 13px; color: var(--muted); }
.paybadge { display: inline-flex; align-items: center; gap: 6px; background: #f1ecfb; color: #553399; font-weight: 800; padding: 3px 10px; border-radius: 6px; }
@media (max-width: 860px) {
  .f-trust { grid-template-columns: repeat(2, 1fr); gap: 12px; }
  .f-main { grid-template-columns: 1fr 1fr; }
  .f-main > div:first-child { grid-column: 1 / -1; }
}

/* ===== toast ===== */
#sx-toast { position: fixed; bottom: 90px; left: 50%; transform: translate(-50%, 20px); background: var(--ink); color: #fff; padding: 10px 18px; border-radius: 999px; opacity: 0; pointer-events: none; transition: .2s; z-index: 99; font-weight: 700; display: flex; align-items: center; gap: 8px; white-space: nowrap; }
#sx-toast.show { opacity: 1; transform: translate(-50%, 0); }
#sx-toast a { color: var(--brand); text-decoration: underline; pointer-events: auto; }

.skel { background: linear-gradient(90deg, #eceef3, #f6f7fa, #eceef3); background-size: 200% 100%; animation: sk 1.2s infinite; border-radius: var(--radius); min-height: 280px; }
.skel.s-hero { aspect-ratio: 16 / 6; min-height: 0; border-radius: 14px; }
@keyframes sk { to { background-position: -200% 0; } }
@media (prefers-reduced-motion: reduce) { * { animation: none !important; transition: none !important; scroll-behavior: auto !important; } }

/* ===== landing page sections (page builder) ===== */
.landing { max-width: 820px; margin: 0 auto; padding: 16px 0 48px; display: grid; gap: 16px; }
.landing .product > div:first-child { position: static; }
.sec { background: var(--card); border-radius: var(--radius); overflow: hidden; box-shadow: 0 1px 2px rgba(20,24,40,.06); }
.sec h2 { text-align: center; font-size: 22px; margin: 0 0 14px; }
.sec .cta { margin: 0; border-radius: 0; padding: 16px; font-size: 18px; }
.sec-image img { width: 100%; display: block; }
.sec-slider .slides img { flex: 0 0 100%; width: 100%; scroll-snap-align: start; }
.sec-slider .dots { display: flex; justify-content: center; gap: 6px; padding: 10px; }
.sec-slider .dots i { width: 8px; height: 8px; border-radius: 50%; background: var(--line); }
.sec-slider .dots i.on { background: var(--green); }
.sec-text, .sec-features, .sec-video, .sec-faq, .sec-guarantee, .sec-countdown, .sec-form, .sec-hero { padding: 20px; }
.sec-text .desc { margin: 0; padding: 0; border: 0; background: none; box-shadow: none; }
.sec-countdown .timer { margin: 0; }
.sec-countdown .cta { margin-top: 14px; border-radius: 10px; }
.sec-cta { background: none; box-shadow: none; }
.sec-cta .cta { border-radius: 12px; }
.fgrid { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 12px; }
.feat { text-align: center; padding: 14px 10px; border: 1px solid var(--line); border-radius: 12px; }
.feat img { width: 100%; aspect-ratio: 1; object-fit: cover; border-radius: 10px; margin-bottom: 8px; }
.feat .fi { font-size: 34px; margin-bottom: 6px; }
.feat b { display: block; font-size: 15px; }
.feat p { margin: 4px 0 0; color: var(--ink-2); font-size: 14px; }
.vid { aspect-ratio: 16/9; border-radius: 10px; overflow: hidden; }
.vid iframe { width: 100%; height: 100%; border: 0; }
.sec-faq details { border-bottom: 1px solid var(--line); padding: 10px 0; }
.sec-faq details:last-child { border: 0; }
.sec-faq summary { font-weight: 700; cursor: pointer; list-style: none; display: flex; justify-content: space-between; align-items: center; }
.sec-faq summary::after { content: "+"; font-size: 20px; color: var(--muted); }
.sec-faq details[open] summary::after { content: "−"; }
.sec-faq p { margin: 8px 0 0; color: var(--ink-2); }
.sec-guarantee { text-align: center; }
.sec-guarantee .gi { font-size: 44px; }
.sec-guarantee h3 { margin: 6px 0 4px; font-size: 20px; }
.sec-guarantee p { margin: 0; color: var(--ink-2); }
.sec-form .pinfo { max-width: 560px; margin: 0 auto; padding: 0; }
.sec-form .pinfo h1 { text-align: center; }
.sec-form .price-row { justify-content: center; }
.sec-hero .product { padding: 0; }
.sec-hero .gallery, .sec-hero .pinfo { padding: 0; }
.sec-html { padding: 0; }
.sec .reviews { margin: 0; }

/* ===== social proof popup ===== */
.sp { position: fixed; z-index: 40; display: flex; align-items: center; gap: 10px; background: #fff; color: var(--ink); border-radius: 14px; padding: 10px 12px; box-shadow: 0 10px 30px rgba(20,24,40,.2); max-width: 340px; width: calc(100% - 32px); opacity: 0; pointer-events: none; transition: .3s; font-size: 14px; }
.sp.show { opacity: 1; pointer-events: auto; }
.sp.bottom-left { left: 16px; bottom: 90px; transform: translateY(16px); }
.sp.bottom-right { right: 16px; bottom: 90px; transform: translateY(16px); }
.sp.top-left { left: 16px; top: 80px; transform: translateY(-16px); }
.sp.top-right { right: 16px; top: 80px; transform: translateY(-16px); }
.sp.show { transform: none; }
.sp img { width: 52px; height: 52px; border-radius: 10px; object-fit: cover; flex: none; }
.sp .t { font-weight: 600; line-height: 1.4; }
.sp .m { color: var(--muted); font-size: 12px; margin-top: 2px; }
.sp button { background: none; border: 0; color: var(--muted); font-size: 18px; padding: 0 4px; margin-right: auto; }
@media (max-width: 480px) { .sp { max-width: none; left: 12px !important; right: 12px !important; width: auto; } }

/* ===== floating whatsapp (desktop) ===== */
.wa-fab { position: fixed; left: 18px; bottom: 18px; z-index: 34; width: 54px; height: 54px; border-radius: 50%; background: #25d366; color: #fff; display: grid; place-items: center; box-shadow: 0 8px 22px -6px rgba(37,211,102,.6); }
.wa-fab svg { width: 30px; height: 30px; }
@media (max-width: 860px) { .wa-fab { display: none; } }
body.has-sticky .wa-fab { bottom: 96px; }

/* ===== mobile overflow guards ===== */
.product > div, .pinfo, .gallery, .gallery .main, .landing, .sec, .two > * { min-width: 0; }
.desc, .sec-text .desc, .sec-html { overflow-wrap: anywhere; }
.desc img, .desc video, .desc iframe, .sec-html img, .sec-html video, .sec-html iframe, .sec img { max-width: 100% !important; height: auto; }
.desc table, .sec-html table { display: block; max-width: 100%; overflow-x: auto; }
.sec-html > *, .desc > * { max-width: 100%; }
html, body { overflow-x: hidden; }
@media (max-width: 860px) {
  .trust { grid-template-columns: 1fr 1fr; overflow: visible; margin-inline: 0; padding-inline: 0; gap: 8px; }
  .trust div { padding: 10px; gap: 8px; }
  .trust svg { width: 24px; height: 24px; }
  .trust b { font-size: 13px; line-height: 1.3; } .trust span { display: none; }
  .timer .tt > div { min-width: 40px; padding: 2px 6px; }
  .timer .tt b { font-size: 16px; }
  .pinfo { padding: 14px; }
  .pinfo h1 { font-size: 19px; }
  .order-box { padding: 12px; }
  .offer { padding: 9px 10px; }
  .reviews { padding: 14px; }
  .rgrid { grid-template-columns: minmax(0, 1fr); }
}

/* ===== purple brand tweaks ===== */
.h-btn:hover, .cart-link:hover { background: rgba(255,255,255,.14); }
.logo { color: #fff; }
.logo img { background: #fff; border-radius: 10px; padding: 3px; }
.catnav a.on, .catnav a:hover { color: var(--brand); background: #f1ecfb; }
#announce { background: #2d1b5e; }
.btn-add:hover, .btn-primary:hover { filter: none; background: #553399; }
#sx-toast a { color: #c9b6ff; }

/* social proof popup: never stretch */
.sp { height: auto !important; max-height: 96px; }
.sp.top-left, .sp.top-right { bottom: auto !important; }
.sp.bottom-left, .sp.bottom-right { top: auto !important; }
@media (max-width: 860px) { .sp.top-left, .sp.top-right { top: 140px; } .sp .t { font-size: 13px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; } .sp img { width: 44px; height: 44px; } }

/* ===== SEO: عنوان الصفحة الرئيسية + صفحات المعلومات ===== */
.home-h1 { font-size: 20px; font-weight: 800; color: var(--ink); margin: 14px 0 4px; line-height: 1.5; }
.home-h1 small { display: block; font-size: 13px; font-weight: 600; color: var(--muted); }
@media (max-width: 640px) { .home-h1 { font-size: 17px; } }
.info-page { max-width: 820px; margin: 18px auto 30px; background: var(--card, #fff); border: 1px solid var(--line); border-radius: 14px; padding: 22px 22px 26px; line-height: 1.9; color: var(--ink-2); }
.info-page h1 { font-size: 24px; color: var(--ink); margin: 0 0 6px; }
.info-page h2 { font-size: 18px; color: var(--ink); margin: 22px 0 6px; }
.info-page .lead { color: var(--muted); margin: 0 0 10px; }
.info-page ul { padding-inline-start: 20px; margin: 6px 0; }
.info-page a { color: var(--brand); text-decoration: underline; }
.info-page table { width: 100%; border-collapse: collapse; margin: 8px 0; font-size: 14px; }
.info-page th, .info-page td { border: 1px solid var(--line); padding: 8px 10px; text-align: start; }
.info-page th { background: var(--bg, #f5f6f8); }
.info-page .contact-box { display: flex; flex-wrap: wrap; gap: 10px; margin: 10px 0; }
.info-page .contact-box a { display: inline-flex; align-items: center; gap: 8px; padding: 10px 14px; border: 1px solid var(--line); border-radius: 10px; text-decoration: none; color: var(--ink); font-weight: 700; }
.info-page .contact-box svg { width: 20px; height: 20px; }
.info-page .updated { font-size: 13px; color: var(--muted); margin-top: 18px; }
@media (max-width: 640px) { .info-page { padding: 16px; margin-top: 12px; } .info-page h1 { font-size: 20px; } }
.seo-text { margin: 26px 0 8px; padding: 18px 20px; background: var(--card); border: 1px solid var(--line); border-radius: 14px; color: var(--ink-2); line-height: 1.9; font-size: 14px; }
.seo-text h2 { font-size: 17px; color: var(--ink); margin: 0 0 6px; }
.seo-text p { margin: 0; }
.seo-text a { color: var(--brand); text-decoration: underline; }
