/* متجر أنور — الواجهة */
:root {
  --ink: #0F1B2A;
  --ink-2: #17263A;
  --ink-line: #2B3A4D;
  --ink-line-2: #3A4B61;
  --brand: #0594FD;
  --brand-deep: #0070D6;
  --action: #0068C9;
  --action-hover: #00539F;
  --ground: #F4F6F8;
  --surface: #FFFFFF;
  --line: #DDE2E8;
  --line-strong: #C9D0D8;
  --text: #18222E;
  --text-2: #33404E;
  --muted: #56616E;
  --on-ink: #FFFFFF;
  --on-ink-muted: #B9C4D0;
  --on-ink-soft: #D5DCE4;
  --ok: #157F3B;
  --warn: #9A5B00;
  --danger: #B42318;
  --radius: 14px;
  --radius-sm: 10px;
  --font: "IBM Plex Sans Arabic", system-ui, "Segoe UI", Tahoma, sans-serif;
  --font-display: "Readex Pro", "IBM Plex Sans Arabic", system-ui, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.6;
  color: var(--text);
  background: var(--ground);
}
img { max-width: 100%; height: auto; display: block; }
[hidden] { display: none !important; }
a { color: var(--action); }
a:hover { color: var(--action-hover); }
h1, h2, h3 { line-height: 1.35; }
button, input, select, textarea { font: inherit; color: inherit; }
:focus-visible { outline: 3px solid var(--brand); outline-offset: 2px; }

.sr-only {
  position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}
.skip-link {
  position: absolute; top: -60px; right: 16px; z-index: 100;
  background: var(--surface); color: var(--text); padding: 10px 16px; border-radius: var(--radius-sm);
}
.skip-link:focus { top: 12px; }

.container { max-width: 1280px; margin: 0 auto; padding-inline: 24px; }
.section { padding-block: 48px 24px; }
.narrow { max-width: 880px; }

/* ---------- الهيدر ---------- */
.badge {
  background: var(--brand); color: var(--ink); font-weight: 700; font-size: 13px;
  min-width: 22px; height: 22px; padding: 0 6px; border-radius: 11px;
  display: inline-flex; align-items: center; justify-content: center;
}
/* ---------- الواجهة الأولى ---------- */
.hero { background: var(--ink); color: var(--on-ink); position: relative; overflow: hidden; }
.hero-inner { position: relative; padding-block: 64px 80px; }
.hero h1 { font-family: var(--font-display); font-weight: 700; font-size: clamp(30px, 4.4vw, 52px); line-height: 1.25; margin: 0 0 16px; max-width: 760px; }
.hero-lead { font-size: 19px; line-height: 1.7; color: var(--on-ink-muted); margin: 0 0 36px; max-width: 620px; }
.pixel { position: absolute; background: var(--brand); }
.p1 { left: 72px; top: 40px; width: 40px; height: 40px; }
.p2 { left: 136px; top: 104px; width: 56px; height: 56px; }
.p3 { left: 40px; top: 184px; width: 64px; height: 64px; }
.p4 { left: 152px; top: 248px; width: 32px; height: 32px; background: var(--brand-deep); }

.finder {
  background: var(--ink-2); border: 1px solid var(--ink-line); border-radius: 16px; padding: 24px;
  display: flex; flex-wrap: wrap; gap: 16px; align-items: flex-end; max-width: 1040px;
}
.finder .field { flex: 1 1 220px; }
.finder label { color: var(--on-ink-soft); }
.finder .field select {
  height: 52px; border-color: var(--ink-line-2); background-color: var(--ink); color: var(--on-ink);
}
.finder .field select option, .finder .field select optgroup { background: var(--surface); color: var(--text); }
.brand-chips { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 24px; align-items: center; }
.brand-chips span { color: var(--on-ink-muted); font-size: 15px; margin-left: 4px; }
.brand-chips a {
  color: var(--on-ink); text-decoration: none; border: 1px solid var(--ink-line-2);
  border-radius: 999px; padding: 8px 16px; font-size: 15px;
}
.brand-chips a:hover { border-color: var(--brand); color: var(--on-ink); }

/* ---------- عناصر عامة ---------- */
.section-title { font-family: var(--font-display); font-weight: 600; font-size: 28px; margin: 0 0 20px; }
.page-title { font-family: var(--font-display); font-weight: 700; font-size: 34px; margin: 0 0 24px; }
.section-head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: baseline; gap: 12px; }
.section-head a { font-weight: 600; }
.empty-note { color: var(--muted); }

.field { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.field label, .field > span { font-weight: 600; font-size: 15px; }
.field input, .field select, .field textarea, .form-control {
  width: 100%; min-height: 48px; padding: 10px 14px; border: 1px solid var(--line-strong);
  border-radius: var(--radius-sm); background: var(--surface); font-size: 16px;
}
.field textarea { min-height: 96px; resize: vertical; }
.field input[aria-invalid="true"], .field select[aria-invalid="true"] { border-color: var(--danger); }
.field-error { margin: 0; color: var(--danger); font-size: 14px; font-weight: 600; }
.hint { margin: 0; font-size: 14px; color: var(--muted); }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 48px; padding: 10px 22px; border-radius: var(--radius-sm); border: 2px solid transparent;
  font-weight: 600; font-size: 16px; text-decoration: none; cursor: pointer;
  transition: background-color .15s ease, border-color .15s ease;
}
.btn-primary { background: var(--action); color: #fff; }
.btn-primary:hover { background: var(--action-hover); color: #fff; }
.btn-brand { background: var(--brand); color: var(--ink); font-family: var(--font-display); height: 52px; }
.btn-brand:hover { background: #37A9FF; color: var(--ink); }
.btn-outline { background: transparent; border-color: var(--ink); color: var(--ink); }
.btn-outline:hover { background: var(--ink); color: #fff; }
.btn-link { background: none; color: var(--action); padding-inline: 8px; }
.btn-lg { min-height: 54px; font-size: 18px; font-family: var(--font-display); }
.btn-sm { min-height: 44px; padding: 8px 14px; font-size: 15px; }
.btn-block { width: 100%; }
.btn[disabled] { opacity: .5; cursor: not-allowed; }
.icon-btn {
  width: 44px; height: 44px; display: inline-flex; align-items: center; justify-content: center;
  border: 1px solid var(--line); border-radius: var(--radius-sm); background: var(--surface); color: var(--muted); cursor: pointer;
}
.icon-btn:hover { color: var(--danger); border-color: var(--danger); }

.notice { padding: 12px 16px; border-radius: var(--radius-sm); margin: 0 0 16px; border: 1px solid; }
.notice-success { background: #E9F7EE; border-color: #A8DDBA; color: #155C2E; }
.notice-error { background: #FDECEC; border-color: #F3B8B8; color: #8A1C1C; }
.notice-info { background: #E8F4FF; border-color: #B9DCFF; color: #0B3D6E; }
.hero .notice { max-width: 1040px; }

.panel { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 24px; margin-bottom: 20px; }
.panel h2, .panel legend { font-size: 20px; font-weight: 700; margin: 0 0 16px; padding: 0; }
.panel fieldset { border: 0; margin: 0; padding: 0; }
.form-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 16px; }
.field-wide { grid-column: 1 / -1; }
.form-stack { display: flex; flex-direction: column; gap: 16px; }

.breadcrumb { display: flex; flex-wrap: wrap; gap: 8px; font-size: 15px; color: var(--muted); margin-bottom: 16px; }

/* ---------- الأقسام ---------- */
.cat-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 16px; }
.cat-card {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px;
  display: flex; flex-direction: column; gap: 14px; transition: border-color .15s ease, box-shadow .15s ease;
}
.cat-card:hover { border-color: #B5D7F7; box-shadow: 0 8px 24px rgba(15, 27, 42, .06); }
.cat-card-head { display: flex; align-items: center; gap: 14px; color: var(--text); text-decoration: none; }
.cat-card-icon {
  flex: 0 0 auto; width: 56px; height: 56px; border-radius: 14px; background: #EAF4FF; color: var(--action);
  display: inline-flex; align-items: center; justify-content: center;
}
.cat-card-text { flex: 1 1 auto; min-width: 0; }
.cat-card-text strong { display: block; font-family: var(--font-display); font-size: 18px; font-weight: 600; }
.cat-card-text small { color: var(--muted); font-size: 14px; }
.cat-card-arrow { color: var(--muted); flex: 0 0 auto; }
.cat-card-head:hover .cat-card-arrow, .cat-card-head:hover strong { color: var(--action); }
.cat-card-subs { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.cat-card-subs a {
  display: inline-block; padding: 6px 12px; border-radius: 999px; background: var(--ground); border: 1px solid var(--line);
  color: var(--text-2); text-decoration: none; font-size: 14px; line-height: 1.4;
}
.cat-card-subs a:hover { border-color: var(--action); color: var(--action); background: #F2F8FF; }
.cat-card-subs a.more { color: var(--action); background: transparent; border-style: dashed; }
.cat-card-desc { margin: 0; color: var(--muted); font-size: 14px; }

/* أقسام فرعية أعلى صفحة القسم */
.subcat-chips { display: flex; flex-wrap: wrap; gap: 8px; margin: -4px 0 20px; }
.subcat-chips a {
  flex: 0 0 auto; padding: 8px 14px; border-radius: 999px; border: 1px solid var(--line-strong); background: var(--surface);
  color: var(--text-2); text-decoration: none; font-size: 15px; white-space: nowrap;
}
.subcat-chips a small { color: var(--muted); font-size: 13px; }
.subcat-chips a:hover { border-color: var(--action); color: var(--action); }
.subcat-chips a[aria-current="page"] { background: var(--ink); border-color: var(--ink); color: #fff; }
.subcat-chips a[aria-current="page"] small { color: var(--on-ink-muted); }

.cat-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 1px;
  background: var(--line); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden;
}
.cat-item { background: var(--surface); color: var(--text); text-decoration: none; padding: 22px 24px; display: flex; gap: 16px; align-items: center; }
.cat-item:hover { background: #F2F8FF; color: var(--text); }
.cat-icon { color: var(--action); flex: 0 0 auto; }
.cat-item strong { display: block; font-size: 18px; }
.cat-item small { display: block; color: var(--muted); font-size: 14px; }

/* ---------- بطاقات المنتجات ---------- */
.product-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 20px; }
.product-card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; display: flex; flex-direction: column; }
.product-media { display: block; aspect-ratio: 1 / 1; background: #EEF2F6; position: relative; }
.product-media img { width: 100%; height: 100%; object-fit: contain; }
.media-placeholder { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px; color: #8792A0; font-size: 14px; }
.grade { font-size: 13px; font-weight: 600; padding: 4px 10px; border-radius: 6px; display: inline-block; }
.product-media .grade { position: absolute; top: 12px; right: 12px; }
.grade-original { background: var(--ink); color: #fff; }
.grade-other { background: #D9ECFF; color: #004E99; }
.product-body { padding: 16px; display: flex; flex-direction: column; gap: 6px; flex: 1 1 auto; }
.product-body h3 { margin: 0; font-size: 17px; font-weight: 700; line-height: 1.5; }
.product-body h3 a { color: var(--text); text-decoration: none; }
.product-body h3 a:hover { color: var(--action); }
.fits { margin: 0; font-size: 14px; color: var(--muted); }
.stock { margin: 0; font-size: 14px; font-weight: 600; }
.stock-in { color: var(--ok); }
.stock-low { color: var(--warn); }
.stock-out { color: var(--danger); }
.product-foot { margin-top: auto; padding-top: 8px; display: flex; align-items: center; justify-content: space-between; gap: 8px; flex-wrap: wrap; }
.price { font-family: var(--font-display); font-weight: 700; font-size: 19px; }
.old-price { color: var(--muted); font-size: 14px; font-weight: 400; margin-inline-start: 6px; }

.info-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 20px; }
.info-card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 24px; display: flex; flex-direction: column; gap: 8px; }
.info-card svg { color: var(--action); }
.info-card h3 { margin: 0; font-size: 19px; }
.info-card p { margin: 0; color: var(--muted); }

/* ---------- قائمة المنتجات ---------- */
.listing { display: flex; flex-wrap: wrap; gap: 32px; align-items: flex-start; }
.filters {
  flex: 1 1 240px; max-width: 100%; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 20px; display: flex; flex-direction: column; gap: 14px;
}
.listing-results { flex: 999 1 560px; min-width: 0; }
.filters-box { flex: 1 1 240px; max-width: 100%; }
.filters-box > summary { display: none; }
.filters-box .filters { max-width: none; }
.result-count { margin: 0 0 16px; color: var(--muted); }
.check { display: flex; align-items: center; gap: 10px; min-height: 44px; cursor: pointer; }
.check input { width: 20px; height: 20px; accent-color: var(--action); }
.clear-link { text-align: center; font-size: 15px; }
.pagination { display: flex; justify-content: center; align-items: center; gap: 20px; margin-top: 32px; }
.pagination a { padding: 10px 18px; border: 1px solid var(--line-strong); border-radius: var(--radius-sm); background: var(--surface); text-decoration: none; }
.empty-state { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 40px 24px; text-align: center; }
.empty-state h1, .empty-state h2 { margin-top: 0; }

/* ---------- صفحة المنتج ---------- */
.product-layout { display: flex; flex-wrap: wrap; gap: 40px; align-items: flex-start; }
.gallery { flex: 1 1 420px; min-width: 0; display: flex; flex-direction: column; gap: 12px; }
.gallery-main { aspect-ratio: 1 / 1; background: var(--surface); border: 1px solid var(--line); border-radius: 16px; position: relative; overflow: hidden; display: flex; align-items: center; justify-content: center; }
.gallery-main img { width: 100%; height: 100%; object-fit: contain; }
.gallery-thumbs { display: grid; grid-template-columns: repeat(auto-fill, minmax(72px, 1fr)); gap: 10px; }
.thumb { aspect-ratio: 1 / 1; padding: 0; border: 1px solid var(--line); border-radius: 10px; background: var(--surface); cursor: pointer; overflow: hidden; }
.thumb[aria-pressed="true"] { border: 2px solid var(--action); }
.thumb img { width: 100%; height: 100%; object-fit: cover; }
.product-info { flex: 1 1 420px; min-width: 0; display: flex; flex-direction: column; gap: 18px; }
.tags { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; }
.product-title { font-family: var(--font-display); font-weight: 700; font-size: clamp(26px, 3vw, 36px); margin: 0; }
.fit-box { background: #E8F4FF; border: 1px solid #B9DCFF; border-radius: 12px; padding: 16px; display: flex; gap: 12px; align-items: flex-start; }
.fit-box svg { color: var(--action); flex: 0 0 auto; margin-top: 2px; }
.fit-box strong { display: block; }
.fit-box span { color: var(--text-2); font-size: 15px; }
.price-row { display: flex; align-items: baseline; gap: 12px; }
.price-big { font-family: var(--font-display); font-weight: 700; font-size: 36px; }
.buy-row { display: flex; flex-wrap: wrap; gap: 12px; }
.buy-row .btn { flex: 1 1 160px; }
.qty { display: inline-flex; align-items: center; border: 1px solid var(--line-strong); border-radius: var(--radius-sm); background: var(--surface); }
.qty button { width: 44px; height: 50px; border: 0; background: transparent; font-size: 22px; cursor: pointer; }
.qty input { width: 52px; height: 50px; border: 0; text-align: center; font-weight: 700; font-size: 17px; background: transparent; -moz-appearance: textfield; }
.qty input::-webkit-outer-spin-button, .qty input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.ship-box { background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 14px 16px; display: flex; flex-wrap: wrap; gap: 12px; align-items: center; }
.ship-box label { font-weight: 600; }
.ship-box select { min-height: 44px; padding: 0 12px; border: 1px solid var(--line-strong); border-radius: 8px; background: var(--surface); flex: 1 1 140px; }
.product-extra { display: flex; flex-wrap: wrap; gap: 40px; margin-top: 56px; }
.product-extra > section { flex: 1 1 420px; min-width: 0; }
.spec-table { width: 100%; border-collapse: collapse; background: var(--surface); border: 1px solid var(--line); border-radius: 12px; overflow: hidden; }
.spec-table th, .spec-table td { padding: 14px 16px; border-bottom: 1px solid #E6EAEE; text-align: right; }
.spec-table th { width: 40%; font-weight: 600; color: var(--text-2); }
.spec-table tr:last-child th, .spec-table tr:last-child td { border-bottom: 0; }
.ltr-cell { text-align: right; unicode-bidi: plaintext; }
.description { margin-top: 20px; background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 16px; line-height: 1.8; }
.related-list { list-style: none; margin: 0; padding: 0; background: var(--surface); border: 1px solid var(--line); border-radius: 12px; }
.related-list li { display: flex; align-items: center; gap: 14px; padding: 12px 16px; border-bottom: 1px solid #E6EAEE; }
.related-list li:last-child { border-bottom: 0; }
.related-list img, .related-ph { width: 56px; height: 56px; border-radius: 8px; object-fit: cover; background: #EEF2F6; flex: 0 0 auto; }
.related-list a { flex: 1 1 auto; color: var(--text); font-weight: 600; text-decoration: none; }
.related-price { font-weight: 700; white-space: nowrap; }

/* ---------- السلة ---------- */
.cart-list { list-style: none; margin: 0 0 20px; padding: 0; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); }
.cart-item { display: flex; flex-wrap: wrap; align-items: center; gap: 14px; padding: 16px; border-bottom: 1px solid #E6EAEE; }
.cart-item:last-child { border-bottom: 0; }
.cart-item > img, .cart-ph { width: 80px; height: 80px; border-radius: 10px; object-fit: cover; background: #EEF2F6; display: flex; align-items: center; justify-content: center; color: #8792A0; flex: 0 0 auto; }
.cart-name { flex: 1 1 200px; min-width: 0; display: flex; flex-direction: column; }
.cart-name a { color: var(--text); font-weight: 700; text-decoration: none; }
.cart-name small { color: var(--muted); }
.cart-line { min-width: 90px; text-align: left; }
.cart-actions { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: flex-start; gap: 16px; }
.cart-total { display: flex; flex-direction: column; align-items: flex-end; }
.cart-total strong { font-family: var(--font-display); font-size: 26px; }
.cart-total small { color: var(--muted); }
.cart-next { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px; margin-top: 24px; }

/* ---------- إتمام الطلب ---------- */
.checkout { display: flex; flex-wrap: wrap; gap: 28px; align-items: flex-start; }
.checkout-main { flex: 999 1 540px; min-width: 0; }
.summary { flex: 1 1 320px; min-width: 0; position: sticky; top: 16px; }
.pay-option { display: flex; gap: 14px; align-items: flex-start; padding: 16px; border: 1px solid var(--line-strong); border-radius: 12px; margin-bottom: 12px; cursor: pointer; }
.pay-option:has(input:checked) { border: 2px solid var(--action); background: #F2F8FF; }
.pay-option input { width: 20px; height: 20px; margin: 3px 0 0; accent-color: var(--action); flex: 0 0 auto; }
.pay-option strong { display: block; font-size: 17px; }
.pay-option small { display: block; color: var(--muted); font-size: 15px; }
.summary-list { list-style: none; margin: 0 0 12px; padding: 0; display: flex; flex-direction: column; gap: 12px; }
.summary-list li { display: flex; justify-content: space-between; gap: 12px; }
.summary-list small { display: block; color: var(--muted); font-size: 14px; }
.summary-list strong { white-space: nowrap; }
.totals { margin: 0 0 16px; border-top: 1px solid #E6EAEE; padding-top: 14px; display: grid; grid-template-columns: 1fr auto; row-gap: 10px; }
.totals dt { color: var(--text-2); }
.totals dd { margin: 0; text-align: left; padding-inline-start: 16px; }
.totals .grand { font-weight: 700; font-size: 19px; padding-top: 8px; border-top: 1px solid #E6EAEE; color: var(--text); }
.totals dd.grand { font-family: var(--font-display); font-size: 22px; }

/* ---------- الطلب ---------- */
.success-head { display: flex; gap: 16px; align-items: flex-start; margin-bottom: 24px; }
.success-head svg { color: var(--ok); flex: 0 0 auto; margin-top: 6px; }
.success-head .page-title { margin-bottom: 8px; }
.steps { list-style: none; display: flex; flex-wrap: wrap; gap: 8px; padding: 0; margin: 0 0 24px; counter-reset: step; }
.steps li { flex: 1 1 120px; padding: 12px; border-radius: var(--radius-sm); background: var(--surface); border: 1px solid var(--line); color: var(--muted); font-weight: 600; text-align: center; }
.steps li.done { background: #E8F4FF; border-color: #B9DCFF; color: #0B3D6E; }
.steps li[aria-current="step"] { background: var(--action); border-color: var(--action); color: #fff; }
.pre { white-space: pre-line; background: var(--ground); padding: 12px; border-radius: var(--radius-sm); }

/* ---------- التذييل ---------- */
.site-footer { background: var(--ink); color: var(--on-ink-soft); margin-top: 56px; }
.footer-row { display: flex; flex-wrap: wrap; gap: 40px; justify-content: space-between; padding-block: 48px 24px; }
.footer-row > div { flex: 1 1 200px; }
.footer-brand img { height: 88px; width: auto; margin-bottom: 12px; }
.site-footer h2 { margin: 0 0 8px; font-size: 17px; color: #fff; }
.site-footer p { margin: 0 0 8px; }
.site-footer a { color: var(--on-ink-soft); text-decoration: none; }
.site-footer a:hover { color: #fff; text-decoration: underline; }
.copyright { border-top: 1px solid #22324A; padding-block: 16px; margin: 0; font-size: 14px; color: #8E9BAA; }

/* ---------- الجوال ---------- */

@media (max-width: 720px) {
  .subcat-chips { flex-wrap: nowrap; overflow-x: auto; padding-bottom: 6px; scrollbar-width: none; }
  .cat-cards { grid-template-columns: 1fr; gap: 12px; }
  .cat-card { padding: 14px; gap: 12px; }
  .cat-card-icon { width: 48px; height: 48px; }
  .container { padding-inline: 16px; }
  .brand img { height: 48px; }
  .header-row { gap: 12px; }
  .search { order: 3; flex-basis: 100%; }
  .search-label, .header-link span:not(.badge):not(.sr-only) { display: none; }
  .header-actions { margin-inline-start: auto; }
  .hero-inner { padding-block: 32px 40px; }
  .hero-lead { font-size: 17px; margin-bottom: 24px; }
  .finder { padding: 16px; }
  .finder .btn { width: 100%; }
  .pixel { display: none; }
  .section { padding-block: 32px 16px; }
  .page-title { font-size: 28px; }
  .product-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
  .product-body { padding: 12px; }
  .product-body h3 { font-size: 15px; }
  .fits { display: none; }
  .product-foot form, .product-foot .btn { width: 100%; }
  .cat-grid { grid-template-columns: 1fr 1fr; }
  .cat-item { padding: 16px; flex-direction: column; align-items: flex-start; gap: 8px; }
  .cat-item small { display: none; }
  .cart-line { text-align: right; }
  .summary { position: static; }
  .listing { gap: 16px; }
  .filters-box > summary {
    display: flex; align-items: center; gap: 8px; min-height: 48px; padding: 0 16px; cursor: pointer;
    background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); font-weight: 600;
  }
  .filters-box[open] > summary { border-radius: var(--radius) var(--radius) 0 0; border-bottom: 0; }
  .filters-box[open] .filters { border-radius: 0 0 var(--radius) var(--radius); border-top: 0; }
}

@media (prefers-reduced-motion: reduce) {
  .cat-caret, .cat-card { transition: none; }
  * { transition: none !important; scroll-behavior: auto !important; }
}

/* الحسابات */
.auth-wrap { display: flex; justify-content: center; }
.auth-box { width: 100%; max-width: 460px; }
.auth-box .page-title { margin-bottom: 0; }
.auth-alt { margin: 0; text-align: center; }
.account-head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 12px; }
.account-layout { display: flex; flex-wrap: wrap; gap: 24px; align-items: flex-start; }
.account-orders { flex: 999 1 520px; min-width: 0; }
.account-side { flex: 1 1 300px; min-width: 0; }
.order-list { list-style: none; margin: 0; padding: 0; }
.order-list li { border-bottom: 1px solid #E6EAEE; }
.order-list li:last-child { border-bottom: 0; }
.order-list a { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 8px; padding: 14px 4px; color: var(--text); text-decoration: none; }
.order-list a:hover { background: #F7F9FB; }
.order-list small { display: block; color: var(--muted); font-size: 14px; }
.order-meta { display: flex; align-items: center; gap: 12px; }
.status-pill { font-size: 13px; font-weight: 600; padding: 3px 10px; border-radius: 999px; background: #E8F4FF; color: #0B3D6E; }
.status-pill-delivered { background: #E9F7EE; color: #155C2E; }
.status-pill-cancelled { background: #F1F2F4; color: var(--muted); }
.readonly { margin: 0; padding: 12px 14px; background: var(--ground); border-radius: var(--radius-sm); text-align: right; }
.order-actions { display: flex; flex-wrap: wrap; gap: 12px; }
.btn-whatsapp { background: #17733E; color: #fff; }
.btn-whatsapp:hover { background: #0F5A30; color: #fff; }

/* صفحات نصية (سياسة الخصوصية) */
.prose { line-height: 1.9; }
.prose h2 { font-size: 1.15rem; margin: 1.6em 0 .5em; }
.prose p { margin: 0 0 1em; }
.prose ul { padding-inline-start: 1.3em; margin: 0 0 1em; list-style: disc; }
.prose li { margin-bottom: .4em; }

/* حذف الحساب */
.btn-danger { background: var(--danger); border-color: var(--danger); color: #fff; }
.btn-danger:hover { filter: brightness(.92); }
.danger-zone summary { cursor: pointer; font-weight: 700; color: var(--danger); list-style-position: inside; }
.danger-zone[open] summary { margin-bottom: 12px; }

/* ======================================================================
   الواجهة بأسلوب «المتجر كتطبيق»: شريط علوي ملون، بحث عريض، أقسام كأزرار،
   لوحة جانبية لكل الأقسام والشركات، وشرائط منتجات لكل قسم
   ====================================================================== */
.site-header {
  background: linear-gradient(135deg, #0058B0 0%, #0078E0 55%, #0594FD 100%);
  color: #fff; padding-bottom: 14px;
}
.topbar { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding-block: 12px 10px; }
.site-header .brand { display: flex; align-items: center; gap: 10px; color: #fff; text-decoration: none; min-width: 0; }
.brand-tile {
  flex: 0 0 auto; width: 48px; height: 48px; border-radius: 12px; background: #fff;
  display: inline-flex; align-items: center; justify-content: center; box-shadow: 0 2px 8px rgba(0, 0, 0, .15);
}
.brand-tile img { width: 38px; height: 38px; object-fit: contain; }
.brand-text { display: flex; flex-direction: column; min-width: 0; line-height: 1.3; }
.brand-text strong { font-family: var(--font-display); font-size: 19px; font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.brand-text small { font-size: 13px; opacity: .85; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.top-actions { display: flex; align-items: center; gap: 8px; flex: 0 0 auto; }
.round-btn {
  position: relative; width: 40px; height: 40px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center;
  background: rgba(255, 255, 255, .16); color: #fff; border: 1px solid rgba(255, 255, 255, .28); text-decoration: none; cursor: pointer;
  transition: background .15s ease;
}
.round-btn:hover { background: rgba(255, 255, 255, .28); color: #fff; }
.round-btn.light { background: var(--ground); color: var(--text); border-color: var(--line); }
.round-btn.light:hover { background: #E8EDF2; color: var(--text); }
.cart-btn .badge {
  position: absolute; top: -6px; inset-inline-start: -6px; background: #fff; color: var(--action);
  min-width: 20px; height: 20px; font-size: 12px; border-radius: 10px; box-shadow: 0 1px 4px rgba(0, 0, 0, .2);
}
.searchbar .search {
  display: flex; align-items: center; gap: 8px; background: #fff; border-radius: 14px; padding: 4px 4px 4px 4px;
  padding-inline-start: 14px; box-shadow: 0 4px 14px rgba(0, 40, 90, .18); max-width: none; flex: none; margin: 0;
}
.searchbar .search .search-ic { color: var(--muted); flex: 0 0 auto; }
.searchbar .search input {
  flex: 1 1 auto; min-width: 0; border: 0; background: transparent; color: var(--text); font-size: 16px; padding: 10px 0; outline: none;
}
.searchbar .search input::placeholder { color: #8A96A3; }
.searchbar .search button {
  flex: 0 0 auto; border: 0; border-radius: 10px; background: var(--action); color: #fff; font-weight: 700; padding: 10px 18px; cursor: pointer;
}
.searchbar .search button:hover { background: var(--action-hover); }
.searchbar .search:focus-within { box-shadow: 0 0 0 3px rgba(255, 255, 255, .6), 0 4px 14px rgba(0, 40, 90, .18); }

/* أزرار الأقسام */
.cat-strip { background: var(--surface); border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 30; }
.cat-strip-row { position: relative; display: flex; gap: 8px; overflow-x: auto; padding-block: 10px; scrollbar-width: none; align-items: center; }
.cat-strip-row::-webkit-scrollbar { display: none; }
.pill {
  flex: 0 0 auto; display: inline-flex; align-items: center; gap: 6px; padding: 7px 16px; border-radius: 999px;
  border: 1px solid var(--line-strong); background: var(--surface); color: var(--text-2); text-decoration: none;
  font-size: 15px; font-weight: 500; white-space: nowrap; transition: border-color .15s ease, color .15s ease;
}
.pill:hover { border-color: var(--action); color: var(--action); }
.pill.is-active { background: var(--action); border-color: var(--action); color: #fff; }
.pill-icon { padding: 7px 10px; background: var(--ground); position: sticky; inset-inline-end: 0; margin-inline-start: auto; box-shadow: 0 0 0 6px var(--surface); }

/* اللوحة الجانبية */
.drawer {
  margin: 0; margin-inline-start: auto; height: 100%; max-height: 100%; width: min(380px, 92vw); max-width: 92vw;
  border: 0; padding: 0; background: var(--surface); color: var(--text); display: none; flex-direction: column;
  box-shadow: -10px 0 40px rgba(15, 27, 42, .25);
}
.drawer[open] { display: flex; animation: drawer-in .2s ease-out; }
.drawer::backdrop { background: rgba(15, 27, 42, .45); }
@keyframes drawer-in { from { transform: translateX(100%); } to { transform: none; } }
html.drawer-locked { overflow: hidden; }
.drawer-head { display: flex; align-items: center; justify-content: space-between; padding: 16px 18px 8px; }
.drawer-head h2 { margin: 0; font-family: var(--font-display); font-size: 20px; }
.drawer-search { display: flex; align-items: center; gap: 8px; margin: 4px 18px 10px; padding: 0 12px; border-radius: 12px; background: var(--ground); border: 1px solid var(--line); color: var(--muted); }
.drawer-search input { flex: 1; border: 0; background: transparent; padding: 10px 0; outline: none; color: var(--text); }
.drawer-body { flex: 1 1 auto; overflow-y: auto; padding: 0 10px 12px; }
.drawer-item, .drawer-sub {
  display: flex; align-items: center; gap: 10px; padding: 11px 12px; border-radius: 10px; color: var(--text); text-decoration: none; cursor: pointer;
}
.drawer-item > span:first-child, .drawer-sub > bdi { flex: 1 1 auto; min-width: 0; }
.drawer-item:hover, .drawer-sub:hover { background: #F1F6FC; color: var(--text); }
.drawer-item.is-active, .drawer-sub.is-active, .drawer-item.is-head.is-active { background: #E6F1FF; color: var(--action); font-weight: 700; }
.drawer-item.is-head { font-weight: 700; color: var(--action); }
.drawer-sub { padding-inline-start: 28px; font-size: 15px; color: var(--text-2); }
.count {
  flex: 0 0 auto; min-width: 34px; text-align: center; font-size: 12px; font-weight: 600; color: var(--muted);
  background: var(--ground); border: 1px solid var(--line); border-radius: 999px; padding: 1px 8px;
}
.drawer-group > summary { list-style: none; }
.drawer-group > summary::-webkit-details-marker { display: none; }
.drawer-group .chev { color: var(--muted); transition: transform .15s ease; }
.drawer-group[open] .chev { transform: rotate(-90deg); }
.drawer-group[open] > summary { font-weight: 700; }
.drawer-label { margin: 16px 12px 6px; padding-top: 12px; border-top: 1px solid var(--line); font-size: 14px; color: var(--muted); font-weight: 600; }
.drawer-empty { padding: 16px 12px; color: var(--muted); }
.drawer-foot { padding: 12px 18px 18px; border-top: 1px solid var(--line); display: flex; flex-direction: column; gap: 8px; align-items: center; }
.drawer-foot .btn { width: 100%; gap: 8px; }
.drawer-contact { color: var(--muted); text-decoration: none; font-size: 15px; }

/* الصفحة الأولى */
.home { padding-block: 18px 32px; }
.finder-card {
  display: flex; flex-wrap: wrap; align-items: center; gap: 10px; background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 14px 16px; margin-bottom: 18px;
}
.finder-title { flex: 1 1 200px; min-width: 0; }
.finder-title h1 { margin: 0; font-family: var(--font-display); font-size: 19px; }
.finder-title p { margin: 0; color: var(--muted); font-size: 14px; }
.finder-card .field { flex: 1 1 170px; margin: 0; }
.finder-card .field select { min-height: 44px; }
.finder-card .btn { flex: 0 0 auto; min-height: 44px; }
.home-bar { display: flex; align-items: center; justify-content: space-between; color: var(--muted); font-size: 14px; margin: 4px 0 6px; }
.home-bar a { color: var(--text-2); font-weight: 600; text-decoration: none; }
.rail-section { margin-top: 22px; }
.rail-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 12px; margin-bottom: 8px; }
.rail-head h2 { margin: 0; font-family: var(--font-display); font-size: 21px; font-weight: 700; line-height: 1.3; }
.rail-head h2 a { color: var(--text); text-decoration: none; }
.rail-head small { color: var(--muted); font-size: 13px; }
.see-all { display: inline-flex; align-items: center; gap: 2px; color: var(--action); font-weight: 600; font-size: 14px; text-decoration: none; white-space: nowrap; }
.see-all:hover { text-decoration: underline; }
.rail-subs { display: flex; gap: 6px; overflow-x: auto; scrollbar-width: none; margin-bottom: 10px; }
.rail-subs::-webkit-scrollbar { display: none; }
.rail-subs a { flex: 0 0 auto; font-size: 13px; padding: 4px 12px; border-radius: 999px; background: var(--surface); border: 1px solid var(--line); color: var(--text-2); text-decoration: none; }
.rail-subs a:hover { border-color: var(--action); color: var(--action); }
.rail {
  position: relative; display: grid; grid-auto-flow: column; grid-auto-columns: 200px; gap: 12px; overflow-x: auto; padding: 2px 2px 12px;
  scroll-snap-type: x proximity; scrollbar-width: thin; overscroll-behavior-x: contain;
}
.rail > * { scroll-snap-align: start; }
.rail-more {
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px; text-align: center;
  border: 1px dashed #A9C9EA; border-radius: var(--radius); background: #F3F8FE; color: var(--action); font-weight: 700; text-decoration: none; padding: 16px;
}
.rail-more small { color: var(--muted); font-weight: 500; }

/* بطاقة المنتج */
.product-grid { grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 14px; }
.product-card { position: relative; border-radius: var(--radius); box-shadow: 0 1px 2px rgba(15, 27, 42, .04); transition: box-shadow .15s ease, border-color .15s ease; }
.product-card:hover { border-color: #C3DCF5; box-shadow: 0 8px 22px rgba(15, 27, 42, .08); }
.product-media { background: #fff; border-bottom: 1px solid #EEF1F4; }
.product-media .grade { top: 8px; right: 8px; font-size: 12px; padding: 2px 8px; }
.sale-tag { position: absolute; top: 8px; left: 8px; background: var(--danger); color: #fff; font-size: 12px; font-weight: 700; padding: 2px 8px; border-radius: 6px; }
.product-body { padding: 10px 12px 12px; gap: 4px; }
.product-body h3 { font-size: 15px; font-weight: 600; line-height: 1.45; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; min-height: 2.9em; }
.product-body .fits { font-size: 12px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.product-body .stock { font-size: 12px; }
.product-foot { padding-top: 6px; flex-wrap: nowrap; }
.product-foot .price { font-size: 17px; white-space: nowrap; }
.product-foot .old-price { font-size: 13px; color: var(--muted); font-weight: 500; }
.add-btn {
  flex: 0 0 auto; width: 38px; height: 38px; border-radius: 50%; border: 0; background: var(--action); color: #fff;
  display: inline-flex; align-items: center; justify-content: center; cursor: pointer; box-shadow: 0 3px 8px rgba(0, 104, 201, .35);
  transition: transform .12s ease, background .15s ease;
}
.add-btn:hover { background: var(--action-hover); }
.add-btn:active { transform: scale(.92); }
.add-btn.is-added { background: var(--ok); }
.add-btn:disabled { opacity: .6; }
.product-card.is-out .product-media img { opacity: .55; }

/* إشعار الإضافة */
.toast {
  position: fixed; bottom: 20px; left: 50%; transform: translateX(-50%); z-index: 200; max-width: calc(100vw - 32px);
  background: var(--ink); color: #fff; padding: 12px 18px; border-radius: 12px; box-shadow: 0 10px 30px rgba(0, 0, 0, .25); font-size: 15px;
}
.toast-error { background: var(--danger); }

/* الصفحات الداخلية تحت الشريط الجديد */
.section { padding-block: 28px 24px; }

@media (max-width: 720px) {
  .container { padding-inline: 16px; }
  .brand-tile { width: 42px; height: 42px; }
  .brand-tile img { width: 32px; height: 32px; }
  .brand-text strong { font-size: 16px; }
  .brand-text small { font-size: 12px; }
  .round-btn { width: 36px; height: 36px; }
  .top-actions { gap: 6px; }
  .searchbar .search button { padding: 9px 14px; }
  .finder-title { flex-basis: 100%; }
  .finder-card .field { flex-basis: calc(50% - 5px); }
  .finder-card .btn { flex-basis: 100%; }
  .rail { grid-auto-columns: 46%; gap: 10px; }
  .product-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .rail-head h2 { font-size: 19px; }
}
@media (max-width: 480px) {
  /* على الهاتف: واتساب، الحساب، السلة فقط (التتبع والاتصال في قائمة الأقسام) */
  .top-actions .round-btn.opt { display: none; }
  .brand-text strong { font-size: 15px; white-space: normal; line-height: 1.25; }
  .brand-text small { display: none; }
}
@media (prefers-reduced-motion: reduce) {
  .drawer[open] { animation: none; }
  .add-btn, .round-btn, .pill, .product-card { transition: none; }
}
.drawer-links { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px 18px; }
.drawer-links a { display: inline-flex; align-items: center; gap: 6px; color: var(--text-2); text-decoration: none; font-size: 15px; }
.drawer-links a:hover { color: var(--action); }
