:root {
  --bg: #f5f6f8;
  --card: #ffffff;
  --ink: #1c1f26;
  --muted: #8a8f9c;
  --line: #e6e8ee;
  --green: #7ccb4b;
  --green-ink: #163b05;
  --red: #e2334b;
  --radius: 14px;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--bg); color: var(--ink);
  font-family: "Cairo", system-ui, -apple-system, "Segoe UI", sans-serif;
  font-size: 16px; line-height: 1.6;
}
a { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; }
button { font: inherit; cursor: pointer; }
input, select, textarea { font: inherit; }
.wrap { max-width: 1180px; margin: 0 auto; padding: 0 16px; }

/* header */
#announce { background: var(--ink); color: #fff; text-align: center; padding: 8px 12px; font-size: 14px; }
.header { background: var(--card); border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 20; }
.header .wrap { display: flex; align-items: center; justify-content: space-between; height: 64px; }
.logo { font-weight: 800; font-size: 22px; letter-spacing: -0.3px; }
.logo img { height: 40px; }
.cart-link { position: relative; display: inline-flex; align-items: center; gap: 8px; font-weight: 600; }
.cart-link svg { width: 24px; height: 24px; }
.cart-link b { position: absolute; top: -8px; left: -10px; background: var(--red); color: #fff; font-size: 11px; min-width: 20px; height: 20px; border-radius: 10px; display: grid; place-items: center; padding: 0 5px; }

/* grid */
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 18px; padding: 24px 0 48px; }
@media (max-width: 560px) { .grid { grid-template-columns: repeat(2, 1fr); gap: 10px; } }
.card {
  background: var(--card); border-radius: var(--radius); padding: 14px;
  box-shadow: 0 1px 2px rgba(20, 24, 40, 0.06), 0 8px 24px -12px rgba(20, 24, 40, 0.15);
  display: flex; flex-direction: column;
}
.card-img { position: relative; display: block; border-radius: 10px; overflow: hidden; aspect-ratio: 1; background: #f0f1f4; }
.card-img img { width: 100%; height: 100%; object-fit: cover; }
.noimg { width: 100%; height: 100%; }
.badge { position: absolute; top: 8px; left: 8px; background: var(--red); color: #fff; font-weight: 700; font-size: 13px; padding: 3px 10px; border-radius: 999px; z-index: 1; }
.card-title { display: block; text-align: center; font-weight: 700; font-size: 16px; margin: 14px 0 6px; min-height: 2.6em; }
.card-rating { text-align: center; font-size: 13px; margin: -4px 0 6px; color: var(--muted); }
.price-row { display: flex; justify-content: center; align-items: baseline; gap: 10px; margin-bottom: 12px; }
.price { font-weight: 800; font-size: 17px; }
.was { color: var(--muted); font-size: 14px; }
.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: 700; font-size: 15px;
  transition: filter .15s;
}
.btn-add:hover, .btn-primary:hover { filter: brightness(0.95); }
.btn-primary:disabled { opacity: .6; cursor: default; }
.btn-ghost { background: transparent; border: 1px solid var(--line); border-radius: 10px; padding: 10px 14px; }

/* product page */
.product { display: grid; grid-template-columns: 1fr 1fr; gap: 32px; padding: 28px 0 48px; }
@media (max-width: 800px) { .product { grid-template-columns: 1fr; gap: 20px; } }
.gallery .main { border-radius: var(--radius); overflow: hidden; aspect-ratio: 1; background: #fff; position: relative; }
.gallery .main img { width: 100%; height: 100%; object-fit: cover; }
.gallery .main .badge { font-size: 15px; top: 12px; left: 12px; }
.thumbs { display: flex; gap: 8px; margin-top: 10px; overflow-x: auto; }
.thumbs img { width: 68px; height: 68px; object-fit: cover; border-radius: 8px; border: 2px solid transparent; cursor: pointer; }
.thumbs img.on { border-color: var(--green); }
.pinfo h1 { font-size: 26px; margin: 0 0 8px; line-height: 1.35; }
.pinfo .caption { color: #4b5060; margin: 0 0 6px; }
.pinfo .price-row { justify-content: flex-start; gap: 14px; }
.pinfo .price { font-size: 26px; }
.pinfo .was { font-size: 17px; }
.ship-note { display: inline-flex; align-items: center; gap: 8px; background: #eefbe5; color: var(--green-ink); padding: 6px 12px; border-radius: 999px; font-size: 14px; margin-bottom: 18px; }
.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; }
.offer.on { border-color: var(--green); background: #f4fcee; }
.offer input { accent-color: var(--green); width: 18px; height: 18px; margin: 0; }
.offer .ot { font-weight: 700; display: flex; flex-direction: column; }
.offer .ot small { color: var(--red); font-weight: 600; font-size: 12px; }
.offer .op { margin-right: auto; font-weight: 800; }
.ol { display: inline-block; background: #eefbe5; color: var(--green-ink); font-size: 12px; padding: 1px 8px; border-radius: 999px; font-weight: 600; }
.qty { display: inline-flex; align-items: center; border: 1px solid var(--line); border-radius: 10px; overflow: hidden; margin-bottom: 14px; }
.qty button { width: 40px; height: 42px; border: 0; background: #fff; font-size: 20px; }
.qty input { width: 52px; height: 42px; border: 0; border-inline: 1px solid var(--line); text-align: center; font-weight: 700; }
.pinfo .btn-primary { margin-top: 0; padding: 14px; font-size: 17px; }
.pinfo .btn-buy { background: var(--ink); color: #fff; margin-top: 10px; }
.desc { margin: 4px 0 18px; padding: 18px; background: var(--card); border-radius: var(--radius); white-space: pre-line; color: #3a3f4c; text-align: center; font-size: 16px; box-shadow: 0 1px 2px rgba(20,24,40,.06); overflow-wrap: anywhere; }
.desc p { margin: 0 0 .6em; } .desc h1, .desc h2, .desc h3 { margin: .6em 0 .3em; line-height: 1.35; } .desc h1 { font-size: 24px; } .desc h2 { font-size: 20px; } .desc h3 { font-size: 18px; }
.desc ul, .desc ol { text-align: right; display: inline-block; margin: .4em 0; padding-right: 22px; } .desc li { margin: 2px 0; }
.desc img { max-width: 100%; border-radius: 10px; margin: 8px auto; } .desc iframe { max-width: 100%; aspect-ratio: 16/9; border-radius: 10px; border: 0; }
.desc a { color: var(--green-ink); text-decoration: underline; } .desc pre { background: #f0f1f4; padding: 10px; border-radius: 8px; text-align: left; direction: ltr; overflow: auto; }
.desc .ql-align-left { text-align: left; } .desc .ql-align-right { text-align: right; } .desc .ql-align-center { text-align: center; }
.off-pill { background: #eefbe5; color: var(--green-ink); font-size: 13px; font-weight: 700; padding: 2px 10px; border-radius: 999px; }
.timer { background: linear-gradient(135deg, #a5e27a, #7ccb4b); border-radius: 16px; padding: 14px 16px; display: flex; align-items: center; justify-content: space-between; gap: 12px; margin: 14px 0 10px; color: var(--green-ink); }
.timer .tl { font-weight: 800; font-size: 18px; }
.timer .tt { display: flex; align-items: center; gap: 6px; direction: rtl; }
.timer .tt div { text-align: center; }
.timer .tt b { display: block; background: rgba(255,255,255,.7); border-radius: 10px; min-width: 46px; padding: 6px 4px; font-size: 20px; line-height: 1.2; }
.timer .tt span { font-size: 11px; font-weight: 600; }
.timer .tt i { font-style: normal; font-weight: 800; padding-bottom: 16px; }
@media (max-width: 420px) { .timer { flex-direction: column; } }
.viewers { font-weight: 600; margin: 4px 0 12px; }
.viewers b { background: var(--ink); color: #fff; padding: 1px 8px; border-radius: 6px; }
.order-box { margin-top: 18px; padding: 18px; border: 2px solid var(--green); border-radius: var(--radius); background: #fbfffa; scroll-margin-top: 80px; }
.order-box h3 { margin: 0 0 12px; text-align: center; }
.order-box .btn-primary { margin-top: 6px; }
.sticky-bar { position: fixed; bottom: 0; left: 0; right: 0; background: #fff; box-shadow: 0 -6px 24px rgba(20,24,40,.12); padding: 10px 16px; display: flex; align-items: center; gap: 12px; z-index: 30; transform: translateY(110%); transition: transform .25s; }
.sticky-bar.show { transform: none; }
.sticky-bar img { width: 52px; height: 52px; border-radius: 10px; object-fit: cover; }
.sticky-bar .sb-info { display: flex; flex-direction: column; line-height: 1.3; min-width: 0; }
.sticky-bar .sb-info b { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sticky-bar .btn-primary { margin: 0 0 0 auto; width: auto; max-width: 260px; flex: 1; }
.stars { color: #f5b83d; letter-spacing: 1px; }
.rating-sum { display: inline-flex; align-items: center; gap: 6px; margin-bottom: 8px; font-size: 14px; }
.rating-sum span { color: var(--muted); }
.reviews { padding: 8px 0 56px; }
.reviews h2 { font-size: 22px; display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin: 0 0 16px; }
.reviews h2 small { color: var(--muted); font-size: 14px; font-weight: 600; }
.rgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 14px; }
.review { background: var(--card); border-radius: var(--radius); padding: 16px; box-shadow: 0 1px 2px rgba(20,24,40,.06); }
.review .rh { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-bottom: 6px; }
.review .vf { color: var(--green-ink); background: #eefbe5; font-size: 12px; padding: 1px 8px; border-radius: 999px; font-weight: 600; }
.review p { margin: 0; color: #3a3f4c; }
.rimgs { display: flex; gap: 6px; margin-top: 10px; flex-wrap: wrap; }
.rimgs img { width: 84px; height: 84px; object-fit: cover; border-radius: 8px; }
.inline-form { margin-top: 18px; padding: 18px; border: 2px solid var(--green); border-radius: var(--radius); background: #fbfffa; }
.inline-form h3 { margin: 0 0 12px; text-align: center; }
.inline-form .btn-primary { margin-top: 6px; }

/* cart & checkout */
.page-title { font-size: 24px; margin: 28px 0 16px; }
.box { background: var(--card); border-radius: var(--radius); padding: 18px; box-shadow: 0 1px 2px rgba(20,24,40,.06); }
.cart-item { display: grid; grid-template-columns: 72px 1fr auto; gap: 14px; align-items: center; padding: 12px 0; border-bottom: 1px solid var(--line); }
.cart-item:last-child { border-bottom: 0; }
.cart-item img { width: 72px; height: 72px; object-fit: cover; border-radius: 8px; }
.cart-item .nm { font-weight: 700; }
.cart-item .rm { background: none; border: 0; color: var(--red); font-size: 13px; padding: 0; }
.cart-item .qty { margin: 6px 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: 14px; }
.totals div { display: flex; justify-content: space-between; }
.totals .grand { font-weight: 800; font-size: 20px; border-top: 1px solid var(--line); padding-top: 10px; margin-top: 4px; }
.two { display: grid; grid-template-columns: 1.4fr 1fr; gap: 20px; align-items: start; padding-bottom: 48px; }
@media (max-width: 800px) { .two { grid-template-columns: 1fr; } }
.field { display: grid; gap: 6px; margin-bottom: 14px; }
.field label { font-weight: 600; font-size: 14px; }
.field input, .field select, .field textarea { width: 100%; border: 1px solid var(--line); border-radius: 10px; padding: 12px; background: #fff; }
.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 { border-color: var(--red); }
.field.invalid .err { display: block; }
.empty { text-align: center; padding: 48px 0; color: var(--muted); }
.empty a { color: var(--green-ink); font-weight: 700; text-decoration: underline; }

/* thanks */
.thanks { text-align: center; padding: 56px 0; }
.thanks .check { width: 84px; height: 84px; border-radius: 50%; background: var(--green); color: var(--green-ink); display: grid; place-items: center; margin: 0 auto 18px; font-size: 40px; }
.thanks h1 { margin: 0 0 6px; }
.thanks .num { font-size: 32px; font-weight: 800; }

/* footer */
.footer { border-top: 1px solid var(--line); padding: 24px 0; color: var(--muted); font-size: 14px; text-align: center; }

/* toast */
#sx-toast { position: fixed; bottom: 24px; 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: 600; }
#sx-toast.show { opacity: 1; transform: translate(-50%, 0); }

.skel { background: linear-gradient(90deg, #eee, #f6f6f6, #eee); background-size: 200% 100%; animation: sk 1.2s infinite; border-radius: var(--radius); height: 340px; }
@keyframes sk { to { background-position: -200% 0; } }
@media (prefers-reduced-motion: reduce) { * { animation: none !important; transition: none !important; } }

/* ===== landing page sections ===== */
.landing { max-width: 820px; margin: 0 auto; padding: 16px 0 48px; display: grid; gap: 18px; }
.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 { display: flex; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; }
.sec-slider .slides::-webkit-scrollbar { display: none; }
.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; 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: #4b5060; 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: #4b5060; }
.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: #4b5060; }
.sec-form .pinfo { max-width: 560px; margin: 0 auto; }
.sec-form .pinfo h1 { text-align: center; }
.sec-form .price-row { justify-content: center; }
.sec-hero .product { padding: 0; }
.sec-html { padding: 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; } }
