:root {
  --bg: #eaeded;
  --surface: #ffffff;
  --ink: #0f1111;
  --muted: #565959;
  --line: #d5d9d9;
  --accent: #ffd814;
  --accent-ink: #0f1111;
  --accent-soft: #f7f8f8;
  --navy: #131921;
  --navy2: #232f3e;
  --price: #b12704;
  --link: #007185;
  --danger: #b12704;
  --ok: #007600;
  --ok-soft: #e8f5e8;
  --warn-soft: #fff8e1;
  --shadow: none;
  --radius: 8px;
}
* { box-sizing: border-box; }
html, body { margin: 0; }
body {
  background: var(--bg);
  color: var(--ink);
  font-family: 'Segoe UI', Tahoma, 'Noto Sans Arabic', Arial, sans-serif;
  line-height: 1.6;
  -webkit-text-size-adjust: 100%;
}
[hidden] { display: none !important; }
a { color: inherit; text-decoration: none; }
button, input, textarea, select { font: inherit; color: inherit; }
.wrap { max-width: 1080px; margin: 0 auto; padding: 0 16px; }

/* header */
.top { position: sticky; top: 0; z-index: 20; background: var(--surface); border-bottom: 1px solid var(--line); }
.top-in { display: flex; align-items: center; justify-content: space-between; height: 64px; gap: 12px; }
.brand { display: flex; align-items: center; gap: 10px; font-weight: 700; font-size: 18px; min-width: 0; }
.brand img { height: 40px; width: auto; max-width: 120px; object-fit: contain; border-radius: 8px; }
.brand span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.top-nav { display: flex; align-items: center; gap: 6px; }
.link { padding: 8px 12px; border-radius: 10px; color: var(--muted); font-size: 14px; }
.link:hover { background: var(--bg); color: var(--ink); }
.cart-btn { position: relative; display: grid; place-items: center; width: 44px; height: 44px; border-radius: 12px; background: var(--accent-soft); color: var(--accent); }
.count { position: absolute; top: -4px; inset-inline-start: -4px; min-width: 20px; height: 20px; padding: 0 5px; border-radius: 999px; background: var(--accent); color: var(--accent-ink); font-size: 12px; font-weight: 700; display: grid; place-items: center; }

/* persistent categories bar, right under the header (like most modern storefronts) */
.cat-nav { background: var(--accent); overflow-x: auto; scrollbar-width: none; -ms-overflow-style: none; }
.cat-nav::-webkit-scrollbar { display: none; }
.cat-nav .wrap { display: flex; gap: 2px; }
.cat-nav a { flex: none; padding: 11px 14px; font-size: 14px; font-weight: 600; color: var(--accent-ink); opacity: 0.82; border-bottom: 2px solid transparent; white-space: nowrap; }
.cat-nav a:hover { opacity: 1; }
.cat-nav a.active { opacity: 1; border-bottom-color: var(--accent-ink); }

/* home */
.hero { padding: 28px 0 8px; }
.hero h1 { margin: 0 0 4px; font-size: 26px; }
.hero p { margin: 0; color: var(--muted); }
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 14px; padding: 16px 0 32px; }
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); overflow: hidden; }
.pcard { display: flex; flex-direction: column; transition: transform 0.15s ease, box-shadow 0.15s ease; }
.pcard:hover { transform: translateY(-3px); }
.pcard .img { aspect-ratio: 4 / 3; background: var(--accent-soft); display: grid; place-items: center; overflow: hidden; }
.pcard .img img { width: 100%; height: 100%; object-fit: cover; display: block; }
.ph { font-size: 44px; font-weight: 700; color: var(--accent); }
.pcard .body { padding: 12px 14px 14px; }
.pcard h3 { margin: 0 0 4px; font-size: 16px; }
.from { color: var(--muted); font-size: 13px; }
.from b { color: var(--accent); font-size: 17px; }
.empty { text-align: center; color: var(--muted); padding: 56px 12px; }

/* product page */
.back { display: inline-block; padding: 14px 0 6px; color: var(--muted); font-size: 14px; }
.pgrid { display: grid; gap: 20px; grid-template-columns: 1fr; padding-bottom: 120px; }
@media (min-width: 820px) {
  .pgrid { grid-template-columns: 5fr 6fr; align-items: start; padding-bottom: 40px; }
}
.pimg { aspect-ratio: 4 / 3; background: var(--accent-soft); border-radius: var(--radius); overflow: hidden; display: grid; place-items: center; }
.pimg img { width: 100%; height: 100%; object-fit: cover; }
.pbody { padding: 18px; }
.pbody h1 { margin: 0 0 6px; font-size: 24px; }
.desc { color: var(--muted); margin: 0 0 12px; }
.sec { margin: 18px 0 8px; font-weight: 700; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip { position: relative; }
.chip input { position: absolute; opacity: 0; inset: 0; cursor: pointer; }
.chip span { display: block; padding: 10px 14px; border: 1.5px solid var(--line); border-radius: 12px; background: var(--surface); cursor: pointer; min-height: 44px; }
.chip input:checked + span { border-color: var(--accent); background: var(--accent-soft); box-shadow: 0 0 0 1px var(--accent) inset; }
.chip input:focus-visible + span { outline: 2px solid var(--accent); outline-offset: 2px; }
.chip small { display: block; color: var(--muted); font-size: 12px; }
.qchips { display: grid; grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); gap: 8px; }
.qchips .chip span { text-align: center; padding: 10px 8px; }
.qchips .q { font-weight: 700; font-size: 16px; }
.qchips .p { color: var(--accent); font-weight: 700; }
.best { position: absolute; top: -9px; inset-inline-end: 8px; background: var(--ok); color: #fff; font-size: 11px; padding: 1px 8px; border-radius: 999px; z-index: 1; }
.note { color: var(--muted); font-size: 13px; margin-top: 8px; }
.buy { position: fixed; inset-inline: 0; bottom: 0; background: var(--surface); border-top: 1px solid var(--line); box-shadow: 0 -6px 20px rgba(16, 24, 40, 0.08); padding: 12px 16px calc(12px + env(safe-area-inset-bottom)); z-index: 15; }
.buy-in { max-width: 1080px; margin: 0 auto; display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.buy .tot { font-size: 12px; color: var(--muted); }
.buy .tot b { display: block; color: var(--ink); font-size: 20px; }
@media (min-width: 820px) {
  .buy { position: static; border: 0; box-shadow: none; padding: 16px 0 0; background: transparent; }
}
.btn { border: 0; border-radius: 12px; padding: 13px 20px; font-weight: 700; cursor: pointer; background: var(--accent); color: var(--accent-ink); min-height: 48px; }
.btn:hover { filter: brightness(1.06); }
.btn:disabled { opacity: 0.55; cursor: not-allowed; }
.btn.ghost { background: var(--surface); color: var(--ink); border: 1.5px solid var(--line); }
.btn.block { width: 100%; }
.linkbtn { background: none; border: 0; color: var(--accent); cursor: pointer; padding: 6px 0; font-weight: 600; }

/* forms */
.field { margin: 0 0 12px; }
.field label { display: block; font-size: 14px; margin-bottom: 4px; color: var(--muted); }
.field input, .field textarea { width: 100%; padding: 12px; border: 1.5px solid var(--line); border-radius: 12px; background: var(--surface); min-height: 46px; }
.field input:focus, .field textarea:focus { outline: 2px solid var(--accent); outline-offset: 1px; border-color: var(--accent); }
.two { display: grid; gap: 12px; grid-template-columns: 1fr; }
@media (min-width: 560px) { .two { grid-template-columns: 1fr 1fr; } }
.quote { margin-top: 14px; padding: 14px; background: var(--warn-soft); border-radius: 12px; }

/* cart */
h1.page { font-size: 24px; margin: 20px 0 12px; }
.lines { display: grid; gap: 10px; margin-bottom: 16px; }
.line { display: flex; gap: 12px; align-items: center; padding: 12px; }
.line .thumb { width: 64px; height: 64px; border-radius: 12px; background: var(--accent-soft); overflow: hidden; display: grid; place-items: center; flex: none; }
.line .thumb img { width: 100%; height: 100%; object-fit: cover; }
.line .info { flex: 1; min-width: 0; }
.line .info b { display: block; }
.line .info small { color: var(--muted); }
.line .amt { font-weight: 700; white-space: nowrap; }
.rm { background: none; border: 0; color: var(--danger); cursor: pointer; padding: 8px; font-size: 13px; }
.sum { padding: 16px; margin-bottom: 16px; }
.sum .r { display: flex; justify-content: space-between; padding: 4px 0; }
.sum .r.big { font-size: 20px; font-weight: 700; border-top: 1px solid var(--line); margin-top: 6px; padding-top: 10px; }
.payinfo { background: var(--accent-soft); border-radius: 12px; padding: 12px 14px; margin-bottom: 16px; font-size: 14px; }

/* done / track */
.center { text-align: center; padding: 32px 16px; }
.code { font-size: 44px; letter-spacing: 6px; font-weight: 800; color: var(--accent); direction: ltr; margin: 8px 0; }
.tick { width: 64px; height: 64px; border-radius: 50%; background: var(--ok-soft); color: var(--ok); display: grid; place-items: center; margin: 0 auto 12px; font-size: 32px; }
.steps { list-style: none; margin: 16px 0; padding: 0; }
.steps li { display: flex; gap: 12px; align-items: center; padding: 10px 0; color: var(--muted); position: relative; }
.steps li .dot { width: 26px; height: 26px; border-radius: 50%; border: 2px solid var(--line); display: grid; place-items: center; flex: none; font-size: 14px; background: var(--surface); }
.steps li.done { color: var(--ink); }
.steps li.done .dot { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.steps li.now { color: var(--ink); font-weight: 700; }
.steps li.now .dot { border-color: var(--accent); box-shadow: 0 0 0 4px var(--accent-soft); }
.alert { padding: 12px 14px; border-radius: 12px; background: var(--warn-soft); margin: 12px 0; }
.alert.bad { background: rgba(180, 35, 24, 0.1); color: var(--danger); }
.items-list { margin: 8px 0 0; padding: 0; list-style: none; }
.items-list li { display: flex; justify-content: space-between; gap: 8px; padding: 6px 0; border-top: 1px solid var(--line); }

.foot { margin-top: 24px; padding: 24px 0 40px; color: var(--muted); font-size: 14px; border-top: 1px solid var(--line); }
.toast { position: fixed; inset-inline: 16px; bottom: 90px; margin: 0 auto; max-width: 420px; background: var(--ink); color: var(--bg); padding: 12px 16px; border-radius: 12px; opacity: 0; pointer-events: none; transition: opacity 0.2s; z-index: 50; text-align: center; }
.toast.show { opacity: 1; }
.toast.err { background: var(--danger); color: #fff; }

.link { white-space: nowrap; }
@media (max-width: 520px) {
  .top-in { height: 60px; }
  .brand span { white-space: normal; font-size: 15px; line-height: 1.25; }
  .brand img { height: 34px; max-width: 70px; }
  .link { padding: 8px 6px; font-size: 13px; }
}

/* categories and layouts */
.sect { font-size: 20px; margin: 8px 0 0; }
.crumbs { padding: 14px 0 4px; color: var(--muted); font-size: 14px; }
.crumbs a:hover { color: var(--accent); }
.cat-title { font-size: 28px; margin: 4px 0 6px; }
.ctiles { grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); padding-bottom: 12px; }
.ctile { display: flex; flex-direction: column; transition: transform 0.15s ease; }
.ctile:hover { transform: translateY(-3px); }
.ctile .img { aspect-ratio: 1 / 1; background: var(--accent-soft); display: grid; place-items: center; overflow: hidden; }
.ctile .img img { width: 100%; height: 100%; object-fit: cover; display: block; }
.ctile .body { padding: 10px 12px 12px; text-align: center; }
.ctile h3 { margin: 0 0 2px; font-size: 16px; }
.pgrid-c { grid-template-columns: repeat(2, 1fr); }
@media (min-width: 720px) { .pgrid-c { grid-template-columns: repeat(var(--cols, 3), 1fr); } }
.plist { display: grid; gap: 10px; padding: 16px 0 24px; }
.pitem { display: flex; align-items: center; gap: 14px; padding: 10px; }
.pitem .thumb { width: 96px; height: 96px; border-radius: 12px; background: var(--accent-soft); overflow: hidden; display: grid; place-items: center; flex: none; }
.pitem .thumb img { width: 100%; height: 100%; object-fit: cover; }
.pitem .pinfo { flex: 1; min-width: 0; }
.pitem h3 { margin: 0 0 2px; font-size: 17px; }
.pitem .clip { margin: 0 0 4px; color: var(--muted); font-size: 13px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.pitem .go { color: var(--muted); font-size: 26px; padding: 0 6px; }
.prow { display: flex; gap: 14px; overflow-x: auto; padding: 16px 2px 24px; scroll-snap-type: x proximity; -webkit-overflow-scrolling: touch; }
.prow .pcard { flex: 0 0 210px; scroll-snap-align: start; }

/* announcement bar */
#announce a, #announce span { display: block; padding: 8px 16px; text-align: center; font-size: 14px; font-weight: 600; }
#announce a:hover { filter: brightness(1.08); }

/* home banner */
.hero-banner { position: relative; border-radius: var(--radius); overflow: hidden; margin: 16px 0 8px; min-height: 180px; display: flex; align-items: center; background: var(--accent); color: var(--accent-ink); }
.hero-banner.plain { background: linear-gradient(135deg, var(--accent), color-mix(in srgb, var(--accent) 60%, #000)); }
.hero-banner img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.hero-banner:not(.plain)::after { content: ''; position: absolute; inset: 0; background: linear-gradient(90deg, rgba(0, 0, 0, 0.55), rgba(0, 0, 0, 0.1)); }
.hb-in { position: relative; z-index: 1; padding: 24px 22px; max-width: 560px; color: #fff; }
.hero-banner.plain .hb-in { color: var(--accent-ink); }
.hb-in h2 { margin: 0 0 6px; font-size: 28px; line-height: 1.25; }
.hb-in p { margin: 0 0 14px; font-size: 16px; opacity: 0.95; }
.hb-btn { display: inline-block; background: #fff; color: #111827; }
.hb-slider { position: relative; overflow: hidden; border-radius: var(--radius); margin: 16px 0 8px; }
.hb-track { display: flex; direction: ltr; transition: transform 0.5s ease; }
.hb-track .hero-banner { flex: 0 0 100%; direction: rtl; margin: 0; border-radius: 0; }
.hb-dots { position: absolute; z-index: 2; bottom: 10px; inset-inline-start: 0; inset-inline-end: 0; display: flex; justify-content: center; gap: 6px; }
.hb-dot { width: 8px; height: 8px; padding: 0; border: 0; border-radius: 50%; background: rgba(255, 255, 255, 0.55); cursor: pointer; }
.hb-dot.on { width: 20px; border-radius: 4px; background: #fff; }
.textblock { padding: 8px 0 20px; }
.textblock p { margin: 6px 0 0; color: var(--muted); max-width: 720px; }

/* badges, old price */
.pcard .img, .pitem .thumb, .pimg { position: relative; }
.badge-tag { position: absolute; top: 8px; inset-inline-start: 8px; background: var(--accent); color: var(--accent-ink); font-size: 12px; font-weight: 700; padding: 2px 10px; border-radius: 999px; z-index: 2; box-shadow: 0 2px 6px rgba(0, 0, 0, 0.2); }
.pitem .thumb .badge-tag { font-size: 10px; padding: 1px 7px; top: 4px; inset-inline-start: 4px; }
s.old { color: var(--muted); font-weight: 400; font-size: 0.85em; }
.off { background: var(--ok-soft); color: var(--ok); font-size: 12px; font-weight: 700; padding: 1px 7px; border-radius: 999px; white-space: nowrap; }

/* gallery */
.thumbs { display: flex; gap: 8px; margin-top: 10px; flex-wrap: wrap; }
.th { width: 64px; height: 64px; padding: 0; border: 2px solid var(--line); border-radius: 10px; overflow: hidden; background: var(--surface); cursor: pointer; }
.th img { width: 100%; height: 100%; object-fit: cover; display: block; }
.th.on { border-color: var(--accent); }

/* design files */
.filesbox { border: 1.5px dashed var(--line); border-radius: 12px; padding: 12px 14px; margin-bottom: 16px; }
.filesbox h3 { margin: 0 0 8px; font-size: 15px; }
.filebtn { display: inline-block; cursor: pointer; }
.flist { list-style: none; margin: 8px 0 0; padding: 0; }
.flist li { display: flex; justify-content: space-between; align-items: center; gap: 8px; padding: 6px 0; border-top: 1px solid var(--line); }
.flist small { color: var(--muted); }

/* device-only sections */
@media (max-width: 767px) { .show-desktop-only { display: none !important; } }
@media (min-width: 768px) { .show-mobile-only { display: none !important; } }

/* banner countdown */
.hb-countdown { display: flex; gap: 8px; margin: 10px 0; }
.hb-countdown.ended { color: #fff; background: rgba(0, 0, 0, 0.35); padding: 6px 12px; border-radius: 8px; display: inline-block; font-weight: 700; }
.hb-countdown .cdbox { background: rgba(255, 255, 255, 0.18); backdrop-filter: blur(2px); border-radius: 10px; padding: 6px 10px; min-width: 46px; text-align: center; }
.hero-banner.plain .hb-countdown .cdbox { background: rgba(0, 0, 0, 0.15); }
.hb-countdown .cdbox b { display: block; font-size: 18px; line-height: 1.1; }
.hb-countdown .cdbox small { font-size: 10px; opacity: 0.9; }

/* quick links tiles */
.quicklinks { display: flex; flex-wrap: wrap; gap: 10px; padding: 4px 0 20px; }
.qlink { position: relative; flex: 0 0 auto; display: flex; flex-direction: column; align-items: center; gap: 6px; width: 92px; padding: 14px 8px; border-radius: 14px; background: var(--surface); border: 1px solid var(--line); box-shadow: var(--shadow); text-align: center; }
.qlink:hover { transform: translateY(-2px); }
.qlink .qicon { width: 40px; height: 40px; border-radius: 50%; background: var(--accent-soft); color: var(--accent); display: grid; place-items: center; font-size: 18px; font-weight: 700; }
.qlink .qtitle { font-size: 12px; font-weight: 600; }
.qlink .badge-tag { position: absolute; top: -6px; inset-inline-end: -6px; font-size: 10px; padding: 1px 7px; }

/* customer reviews */
.reviews { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 14px; padding: 4px 0 24px; }
.review { background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: 16px; box-shadow: var(--shadow); }
.review .stars { color: #f59e0b; letter-spacing: 2px; margin-bottom: 6px; }
.review p { margin: 0 0 10px; color: var(--ink); font-size: 14px; line-height: 1.6; }
.review .rname { font-weight: 700; font-size: 13px; color: var(--muted); }
