/* ==========================================================================
   مسارات الرماح لقطع غيار السيارات الأمريكية - الواجهة
   ========================================================================== */

:root {
  --night: #0a1a35;
  --night-2: #10264a;
  --night-3: #18345f;
  --blue: #0b2e93;
  --blue-hover: #08236f;
  --blue-bright: #4a78e6;
  --blue-tint: #ebf0fb;
  --blue-tint-2: #dde5f8;
  --blue-line: #c3d0ef;
  --red: #d3192c;
  --red-hover: #b31324;
  --paper: #f3f5f8;
  --surface: #ffffff;
  --line: #dce2ea;
  --line-strong: #c4cdd9;
  --ink: #13203a;
  --muted: #586883;
  --ok: #157a4c;
  --ok-bg: #e5f4ec;
  --warn-bg: #fff4e0;

  --font-display: "Tajawal", system-ui, sans-serif;
  --font-body: "Tajawal", system-ui, -apple-system, "Segoe UI", sans-serif;

  --wrap: 1240px;
  --gutter: clamp(16px, 4vw, 40px);
  --header-h: 76px;
  --ease: cubic-bezier(.2, .7, .2, 1);
}

*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; scroll-padding-top: calc(var(--header-h) + 16px); }

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

img, video, svg { display: block; max-width: 100%; }
img { height: auto; }
a { color: inherit; text-decoration: none; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
h1, h2, h3, h4 { font-family: var(--font-display); line-height: 1.25; margin: 0; font-weight: 700; letter-spacing: 0; }
p { margin: 0; }
ul, ol { margin: 0; padding: 0; list-style: none; }

:focus-visible { outline: 3px solid var(--blue-bright); outline-offset: 2px; border-radius: 6px; }

.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: -100px; right: 16px; z-index: 1000; background: var(--surface); padding: 10px 16px; border-radius: 8px; }
.skip-link:focus { top: 12px; }

.wrap { width: 100%; max-width: var(--wrap); margin-inline: auto; padding-inline: var(--gutter); }

.icon { width: 22px; height: 22px; flex: none; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.icon--fill { fill: currentColor; stroke: none; }
.ltr { direction: ltr; unicode-bidi: isolate; display: inline-block; }

/* ---------- الأزرار ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  min-height: 48px; padding: 0 22px;
  border: 0; border-radius: 10px;
  font-family: var(--font-display); font-weight: 600; font-size: 15px;
  transition: background-color .2s, color .2s, box-shadow .2s;
  white-space: nowrap;
}
.btn--primary { background: var(--red); color: #fff; }
.btn--primary:hover { background: var(--red-hover); }
.btn--blue { background: var(--blue); color: #fff; }
.btn--blue:hover { background: var(--blue-hover); }
.btn--ghost { background: transparent; color: var(--ink); box-shadow: inset 0 0 0 1.5px var(--line-strong); }
.btn--ghost:hover { box-shadow: inset 0 0 0 1.5px var(--ink); }
.btn--wa { background: #1fa855; color: #fff; }
.btn--wa:hover { background: #18914a; }

/* ==========================================================================
   الشريط العلوي والهيدر
   ========================================================================== */
.topbar {
  background: var(--night);
  color: #c7d3e6;
  font-size: 13px;
}
.topbar .wrap { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 36px; }
.topbar__list { display: flex; gap: 22px; }
.topbar__list li { display: flex; align-items: center; gap: 7px; }
.topbar__list .icon { width: 15px; height: 15px; color: #8fa6cc; }
.topbar a:hover { color: #fff; }

.site-header {
  position: sticky; top: 0; z-index: 50;
  background: var(--surface);
  border-bottom: 1px solid var(--line);
  transition: background-color .3s, border-color .3s, box-shadow .3s;
}
.site-header .wrap { display: flex; align-items: center; gap: 28px; height: var(--header-h); }

.brand { flex: none; display: flex; align-items: center; }
.brand img { height: 50px; width: auto; border-radius: 9px; }

.nav { display: flex; gap: 4px; margin-inline-start: 8px; }
.nav > li { position: relative; }
.nav > li > a, .nav > li > button {
  display: flex; align-items: center; gap: 6px;
  height: 44px; padding: 0 14px; border: 0; background: none; border-radius: 8px;
  font-family: var(--font-display); font-weight: 500; font-size: 15px;
}
.nav > li > a:hover, .nav > li > button:hover { background: var(--paper); }
.nav .icon { width: 16px; height: 16px; }

.nav__panel {
  position: absolute; top: calc(100% + 8px); inset-inline-start: 0;
  min-width: 560px; padding: 22px;
  background: var(--surface); border: 1px solid var(--line); border-radius: 14px;
  box-shadow: 0 24px 48px -20px rgba(10, 26, 53, .28);
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px 24px;
  opacity: 0; visibility: hidden; transform: translateY(6px);
  transition: opacity .18s, transform .18s var(--ease), visibility .18s;
}
.nav > li:hover .nav__panel, .nav > li:focus-within .nav__panel, .nav > li.is-open .nav__panel { opacity: 1; visibility: visible; transform: none; }
.nav__panel h4 { font-size: 14px; color: var(--muted); font-weight: 500; margin-bottom: 4px; padding-bottom: 8px; border-bottom: 1px solid var(--line); }
.nav__panel a { display: block; padding: 5px 0; font-size: 15px; }
.nav__panel a:hover { color: var(--blue); }

.header-tools { display: flex; align-items: center; gap: 6px; margin-inline-start: auto; }
.tool {
  position: relative; display: inline-flex; align-items: center; gap: 8px;
  height: 44px; padding: 0 12px; border-radius: 10px; border: 0; background: none;
  font-size: 14px; font-weight: 500;
}
.tool:hover { background: var(--paper); }
.tool__count {
  position: absolute; top: 4px; inset-inline-start: 4px;
  min-width: 19px; height: 19px; padding: 0 5px; border-radius: 10px;
  background: var(--red); color: #fff; font-size: 11px; font-weight: 700; line-height: 19px; text-align: center;
}

.garage-chip {
  display: inline-flex; align-items: center; gap: 10px;
  height: 44px; padding: 0 14px 0 10px;
  border-radius: 10px; border: 1.5px dashed var(--line-strong); background: none;
  font-size: 14px; max-width: 260px;
}
.garage-chip:hover { border-color: var(--blue); color: var(--blue); }
.garage-chip.has-car { border-style: solid; border-color: var(--blue); background: var(--blue-tint); color: var(--blue); }
.garage-chip span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.menu-toggle { display: none; }

/* ==========================================================================
   الهيرو
   ========================================================================== */
.hero {
  position: relative;
  min-height: calc(100svh - var(--header-h) - 36px);
  min-height: max(640px, calc(100svh - var(--header-h) - 36px));
  display: flex; flex-direction: column; justify-content: flex-end;
  background: var(--night) var(--poster, url("../img/hero-poster.jpg")) center 40% / cover no-repeat;
  color: #fff;
  overflow: hidden;
  isolation: isolate;
}
.hero__video {
  position: absolute; inset: 0; z-index: -2;
  width: 100%; height: 100%; object-fit: cover; object-position: center 42%;
}
.hero::after {
  content: ""; position: absolute; inset: 0; z-index: -1;
  background:
    linear-gradient(180deg, rgba(10, 26, 53, .55) 0%, rgba(10, 26, 53, 0) 22%),
    linear-gradient(0deg, rgba(8, 20, 42, .82) 0%, rgba(8, 20, 42, .35) 30%, rgba(8, 20, 42, 0) 52%);
  pointer-events: none;
}
.hero__sound {
  position: absolute; top: 20px; inset-inline-end: var(--gutter);
  width: 40px; height: 40px; border-radius: 50%; border: 1px solid rgba(255,255,255,.3);
  background: rgba(10, 26, 53, .4); color: #fff; display: grid; place-items: center;
}
.hero__sound .icon { width: 18px; height: 18px; }

/* ---------- صندوق البحث (الدوك) ---------- */
.finder {
  position: relative;
  width: min(1060px, calc(100% - 2 * var(--gutter)));
  margin: 0 auto;
  padding: 6px 6px 8px;
  border-radius: 18px 18px 0 0;
  border-bottom: 0;
  background: rgba(12, 28, 58, .62);
  border: 1px solid rgba(255, 255, 255, .16);
  box-shadow: 0 24px 48px -28px rgba(0, 0, 0, .6), inset 0 1px 0 rgba(255,255,255,.08);
  -webkit-backdrop-filter: blur(16px) saturate(140%);
  backdrop-filter: blur(16px) saturate(140%);
  color: #fff;
}
.finder.is-entering { opacity: 0; transform: translateY(14px); }
.finder.is-in { opacity: 1; transform: none; transition: opacity .7s var(--ease), transform .7s var(--ease); }

.finder__tabs { display: flex; gap: 4px; padding: 2px 2px 6px; }
.finder__tab {
  display: inline-flex; align-items: center; gap: 7px;
  height: 32px; padding: 0 14px; border-radius: 9px;
  border: 0; background: transparent; color: #c9d6ec;
  font-family: var(--font-display); font-size: 14px; font-weight: 500;
}
.finder__tab .icon { width: 16px; height: 16px; }
.finder__tab:hover { color: #fff; background: rgba(255,255,255,.07); }
.finder__tab[aria-selected="true"] { background: rgba(255,255,255,.14); color: #fff; }

.finder__panel { display: none; }
.finder__panel.is-active { display: block; }

.finder__row {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr)) auto;
  background: #fff; color: var(--ink);
  border-radius: 13px;
  overflow: hidden;
}
/* الحقل كله قابل للضغط: القائمة تغطي المستطيل بالكامل والعنوان فوقها */
.field {
  position: relative; display: block;
  min-height: 54px;
  border-inline-start: 1px solid var(--line);
  transition: background-color .2s;
  cursor: pointer;
}
.field:first-child { border-inline-start: 0; }
.field.is-current { background: var(--blue-tint); }
.field__label {
  position: absolute; top: 7px; inset-inline-start: 16px; inset-inline-end: 30px; z-index: 1;
  font-size: 12px; color: var(--muted); font-weight: 500; line-height: 1.3;
  pointer-events: none; white-space: nowrap; overflow: hidden;
}
.field.is-done .field__label::after { content: ""; display: inline-block; width: 6px; height: 6px; border-radius: 50%; background: var(--ok); margin-inline-start: 7px; vertical-align: middle; }
.field select, .field input {
  position: absolute; inset: 0; width: 100%; height: 100%;
  border: 0; background: transparent; margin: 0;
  padding-block: 22px 6px; padding-inline: 16px 30px;
  font-size: 15.5px; font-weight: 700; font-family: var(--font-display); color: var(--ink);
  -webkit-appearance: none; appearance: none; outline: none; cursor: pointer;
  text-overflow: ellipsis;
}
.field select:disabled { color: #a3afc2; cursor: not-allowed; }
.field:has(select:disabled) { cursor: not-allowed; }
.field::after {
  content: ""; position: absolute; inset-inline-end: 13px; top: 50%; z-index: 1;
  width: 7px; height: 7px;
  border-right: 2px solid var(--muted); border-bottom: 2px solid var(--muted);
  transform: translateY(-30%) rotate(45deg);
  pointer-events: none;
}
.field--text::after { display: none; }
.field--text input { padding-inline-end: 16px; cursor: text; }
.field input::placeholder { color: #9aa7bb; font-weight: 500; }
.field:focus-within { background: var(--blue-tint); box-shadow: inset 0 -3px 0 var(--blue); }

.finder__go {
  display: flex; align-items: center; justify-content: center; gap: 9px;
  min-width: 140px; margin: 6px; border: 0; border-radius: 10px;
  background: var(--red); color: #fff;
  font-family: var(--font-display); font-weight: 700; font-size: 16px;
  transition: background-color .2s;
}
.finder__go:hover { background: var(--red-hover); }
.finder__go .icon { width: 19px; height: 19px; }

.finder__row--search { grid-template-columns: minmax(0, 1.2fr) minmax(0, 2fr) auto; }
.finder__row--vin { grid-template-columns: minmax(0, 1fr) auto; }

.finder__foot {
  display: flex; align-items: center; gap: 8px; flex-wrap: wrap;
  padding: 7px 6px 1px;
  font-size: 13px; color: #c9d6ec;
}
.finder__foot > span { margin-inline-end: 2px; white-space: nowrap; flex: none; }
.chip {
  display: inline-flex; align-items: center; height: 26px; padding: 0 11px;
  border-radius: 7px; border: 1px solid rgba(255,255,255,.2); background: rgba(255,255,255,.06);
  color: #e8eef8; font-size: 13px;
  transition: background-color .2s, border-color .2s;
}
.chip:hover { background: rgba(255,255,255,.16); border-color: rgba(255,255,255,.35); }
.finder__note { padding: 8px 8px 2px; font-size: 13px; color: #c9d6ec; }
.finder__note a { color: #fff; text-decoration: underline; text-underline-offset: 3px; }
.finder__status { min-height: 0; padding: 0 8px; font-size: 13px; }
.finder__status:not(:empty) { padding-top: 8px; }
.finder__status.is-error { color: #ffc2c8; }
.finder__status.is-ok { color: #a8e6c4; }

/* ---------- شريط السيارة المختارة (يظهر بعد النزول) ---------- */
.vehicle-bar {
  position: fixed; top: var(--header-h); left: 0; right: 0; z-index: 40;
  background: var(--night-2); color: #fff;
  transform: translateY(-100%); opacity: 0; pointer-events: none;
  transition: transform .3s var(--ease), opacity .3s;
}
.vehicle-bar.is-visible { transform: none; opacity: 1; pointer-events: auto; }
.vehicle-bar .wrap { display: flex; align-items: center; gap: 14px; min-height: 52px; font-size: 14px; }
.vehicle-bar strong { font-family: var(--font-display); font-weight: 600; }
.vehicle-bar .icon { color: var(--blue-bright); }
.vehicle-bar a { margin-inline-start: auto; color: #c9d6ec; text-decoration: underline; text-underline-offset: 3px; }

/* ==========================================================================
   أقسام الصفحة
   ========================================================================== */
.section { padding-block: clamp(56px, 8vw, 96px); }
.section--tight { padding-block: clamp(40px, 6vw, 64px); }
.section__head { display: flex; align-items: end; justify-content: space-between; gap: 24px; margin-bottom: 28px; }
.section__title { font-size: clamp(24px, 2.4vw, 32px); font-weight: 700; }
.section__lead { margin-top: 8px; color: var(--muted); max-width: 60ch; }
.section__link { flex: none; font-weight: 600; color: var(--blue); font-family: var(--font-display); font-size: 15px; }
.section__link:hover { text-decoration: underline; text-underline-offset: 4px; }

/* ---------- الشركات الثلاث ---------- */
.makes { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.make {
  position: relative; display: flex; flex-direction: column;
  background: var(--surface); border: 1px solid var(--line); border-radius: 18px; overflow: hidden;
}
.make__media { position: relative; display: block; aspect-ratio: 19 / 10; background: #fff; overflow: hidden; border-bottom: 1px solid var(--line); }
.make__media > img { width: 100%; height: 100%; object-fit: cover; object-position: center 100%; transition: transform .6s var(--ease); }
.make:hover .make__media > img { transform: scale(1.04); }
.make__mark {
  position: absolute; top: 12px; inset-inline-start: 12px;
  height: 40px; padding: 6px 10px; border-radius: 9px; background: #fff;
  box-shadow: 0 2px 10px rgba(10, 26, 53, .14);
  display: flex; align-items: center;
}
.make__mark img { height: 100%; width: auto; }
.make__body { padding: 20px 22px 22px; display: flex; flex-direction: column; gap: 14px; flex: 1; }
.make__title { font-size: 21px; }
.make__models { display: flex; flex-wrap: wrap; gap: 8px; }
.make__models a {
  display: inline-flex; align-items: center; height: 34px; padding: 0 12px;
  border-radius: 8px; background: var(--paper); font-size: 14px; font-weight: 500;
}
.make__models a:hover { background: var(--blue-tint-2); color: var(--blue); }
.make__all { margin-top: auto; font-weight: 600; color: var(--blue); font-family: var(--font-display); font-size: 15px; }
.make__all:hover { text-decoration: underline; text-underline-offset: 4px; }

/* ---------- الأقسام ---------- */
.cats {
  display: grid; grid-template-columns: repeat(5, 1fr);
  border: 1px solid var(--line); border-radius: 18px; overflow: hidden;
  background: var(--line); gap: 1px;
}
.cat {
  display: flex; flex-direction: column;
  background: var(--surface);
  transition: background-color .2s;
}
.cat:hover { background: #f5f7fb; }
.cat__media { display: block; aspect-ratio: 3 / 2; overflow: hidden; background: #fff; }
.cat__media img { width: 100%; height: 100%; object-fit: cover; transition: transform .5s var(--ease); }
.cat:hover .cat__media img { transform: scale(1.05); }
.cat__icon {
  aspect-ratio: 3 / 2; display: grid; place-items: center;
  background: var(--blue-tint); color: var(--blue);
}
.cat__icon .icon { width: 40px; height: 40px; stroke-width: 1.4; }
.cat__text { display: flex; flex-direction: column; gap: 2px; padding: 14px 16px 16px; }
.cat__name { font-family: var(--font-display); font-weight: 700; font-size: 16px; line-height: 1.4; }
.cat:hover .cat__name { color: var(--blue); }
.cat__count { font-size: 13px; color: var(--muted); }

/* ---------- المنتجات ---------- */
.tabs { display: flex; gap: 6px; padding: 4px; border-radius: 12px; background: #e6ebf2; }
.tabs button {
  height: 38px; padding: 0 16px; border: 0; border-radius: 9px; background: transparent;
  font-family: var(--font-display); font-weight: 500; font-size: 14px; color: var(--muted);
}
.tabs button[aria-selected="true"] { background: var(--surface); color: var(--ink); box-shadow: 0 1px 3px rgba(10,26,53,.12); }

.products-grid {
  display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 18px;
  margin: 0; padding: 0; list-style: none;
}

/* بطاقة المنتج - تستخدم في الرئيسية وصفحات ووكومرس */
.part {
  position: relative; display: flex; flex-direction: column;
  background: var(--surface); border: 1px solid var(--line); border-radius: 14px;
  overflow: hidden; transition: border-color .2s, box-shadow .2s;
}
.part:hover { border-color: var(--line-strong); box-shadow: 0 16px 32px -24px rgba(10,26,53,.4); }
.part__media { position: relative; aspect-ratio: 1; background: #f7f9fb; display: grid; place-items: center; padding: 18px; }
.part__media img { width: 100%; height: 100%; object-fit: contain; mix-blend-mode: multiply; }
.part__tag {
  position: absolute; top: 10px; inset-inline-start: 10px;
  padding: 3px 9px; border-radius: 6px; font-size: 12px; font-weight: 600;
  background: var(--surface); border: 1px solid var(--line);
}
.part__tag--oem { color: var(--blue); border-color: var(--blue-line); background: var(--blue-tint); }
.part__body { padding: 14px 16px 16px; display: flex; flex-direction: column; gap: 6px; flex: 1; }
.part__no { font-size: 12.5px; color: var(--muted); }
.part__no b { font-weight: 600; color: var(--ink); direction: ltr; unicode-bidi: isolate; }
.part__name { font-family: var(--font-display); font-size: 15.5px; font-weight: 600; line-height: 1.45; }
.part__name a:hover { color: var(--blue); }
.part__fits { font-size: 13px; color: var(--muted); line-height: 1.5; }
.fit-badge {
  display: none; align-items: center; gap: 6px; width: fit-content;
  padding: 4px 9px; border-radius: 7px; font-size: 12.5px; font-weight: 600;
  background: var(--ok-bg); color: var(--ok);
}
.fit-badge .icon { width: 15px; height: 15px; stroke-width: 2.2; }
.fit-badge.is-on { display: inline-flex; }
.part__foot { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-top: auto; padding-top: 10px; }
.price { font-family: var(--font-display); font-weight: 700; font-size: 18px; color: var(--ink); }
.price small { font-size: 12px; font-weight: 500; color: var(--muted); margin-inline-start: 3px; }
.price del { font-size: 13px; color: var(--muted); font-weight: 400; margin-inline-start: 6px; }
.part__stock { font-size: 12.5px; font-weight: 500; }
.part__stock.in { color: var(--ok); }
.part__stock.out { color: var(--red); }
.part__add {
  width: 42px; height: 42px; flex: none; border-radius: 10px; border: 0;
  background: var(--blue); color: #fff; display: grid; place-items: center;
}
.part__add:hover { background: var(--blue-hover); }
.part__add .icon { width: 20px; height: 20px; }

/* ---------- شريط ما لقيت قطعتك ---------- */
.request {
  position: relative; overflow: hidden; isolation: isolate;
  border-radius: 22px; background: #0b1a3a url("../img/request.webp") left center / cover no-repeat;
  color: #fff;
  display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  min-height: 400px;
}
.request::before {
  content: ""; position: absolute; inset: 0; z-index: -1;
  background: linear-gradient(270deg, rgba(10,26,58,.78) 0%, rgba(10,26,58,.45) 40%, rgba(10,26,58,0) 62%);
}
.request__body { padding: clamp(28px, 4vw, 56px); display: flex; flex-direction: column; justify-content: center; gap: 16px; }
.request__title { font-size: clamp(24px, 2.6vw, 34px); max-width: 24ch; text-wrap: balance; }
.request__text { color: #c9d6ec; max-width: 46ch; }
.request__steps { display: grid; gap: 10px; margin: 6px 0 8px; }
.request__steps li { display: flex; gap: 12px; align-items: center; font-size: 15px; }
.request__steps li::before {
  content: counter(rq, arabic-indic); counter-increment: rq;
  width: 26px; height: 26px; flex: none; border-radius: 50%;
  display: grid; place-items: center; font-size: 13px; font-weight: 700;
  background: rgba(255,255,255,.12); color: #fff;
}
.request__steps { counter-reset: rq; }
.request__actions { display: flex; gap: 10px; flex-wrap: wrap; }

/* ---------- أصلي أو تجاري ---------- */
.compare { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.compare__card { background: var(--surface); border: 1px solid var(--line); border-radius: 18px; padding: clamp(22px, 3vw, 34px); }
.compare__card--oem { border-color: var(--blue-line); background: linear-gradient(180deg, var(--blue-tint) 0%, #fff 60%); }
.compare__head { display: flex; align-items: center; gap: 12px; margin-bottom: 14px; }
.compare__badge { padding: 4px 10px; border-radius: 7px; font-size: 13px; font-weight: 600; background: var(--blue-tint); color: var(--blue); }
.compare__badge--alt { background: var(--paper); color: var(--ink); }
.compare h3 { font-size: 21px; }
.compare p { color: var(--muted); }
.compare ul { margin-top: 16px; display: grid; gap: 10px; }
.compare li { display: flex; gap: 10px; align-items: flex-start; font-size: 15px; }
.compare li .icon { width: 18px; height: 18px; margin-top: 4px; color: var(--ok); stroke-width: 2.2; }
.compare__brands { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 18px; padding-top: 18px; border-top: 1px solid var(--line); }
.compare__brands span { padding: 4px 10px; border-radius: 7px; background: var(--paper); font-size: 13px; font-weight: 600; direction: ltr; }

/* ---------- خطوات الطلب ---------- */
.steps { display: grid; grid-template-columns: repeat(4, 1fr); gap: 0; counter-reset: st; position: relative; }
.steps li { position: relative; padding-inline: 0 24px; }
.steps li + li { padding-inline-start: 24px; border-inline-start: 1px solid var(--line); }
.steps__no {
  font-family: var(--font-display); font-size: 15px; font-weight: 700; color: var(--blue);
  display: flex; align-items: center; gap: 10px; margin-bottom: 12px;
}
.steps__no::before {
  counter-increment: st; content: counter(st, arabic-indic);
  width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center;
  background: var(--blue); color: #fff; font-size: 15px;
}
.steps h3 { font-size: 18px; margin-bottom: 6px; }
.steps p { color: var(--muted); font-size: 15px; max-width: 30ch; }

/* ==========================================================================
   الفوتر
   ========================================================================== */
.site-footer { background: var(--night); color: #b9c7de; margin-top: clamp(56px, 8vw, 96px); }
.footer__top { display: grid; grid-template-columns: 1.4fr repeat(3, 1fr); gap: 40px; padding-block: 56px 40px; }
.footer__brand img { height: 58px; width: auto; border-radius: 10px; }
.footer__brand p { margin-top: 16px; max-width: 34ch; font-size: 15px; }
.site-footer h4 { color: #fff; font-size: 16px; margin-bottom: 14px; }
.site-footer li { padding: 4px 0; font-size: 15px; }
.site-footer a:hover { color: #fff; }
.footer__contact li { display: flex; gap: 10px; align-items: center; }
.footer__contact .icon { width: 17px; height: 17px; color: #7f97c2; }
.footer__bottom { border-top: 1px solid rgba(255,255,255,.1); }
.footer__bottom .wrap { display: flex; justify-content: space-between; align-items: center; gap: 16px; min-height: 64px; font-size: 13px; flex-wrap: wrap; }
.pay { display: flex; gap: 8px; flex-wrap: wrap; }
.pay span { padding: 4px 10px; border-radius: 6px; border: 1px solid rgba(255,255,255,.18); font-size: 12px; font-weight: 600; color: #dbe4f3; }

/* زر واتساب العائم */
.wa-float {
  position: fixed; bottom: 20px; inset-inline-end: 20px; z-index: 60;
  width: 56px; height: 56px; border-radius: 50%;
  background: #1fa855; color: #fff; display: grid; place-items: center;
  box-shadow: 0 10px 24px -8px rgba(18, 120, 60, .6);
}
.wa-float .icon { width: 28px; height: 28px; }
.wa-float:hover { background: #18914a; }

/* ==========================================================================
   نافذة كراجي (سياراتي)
   ========================================================================== */
.drawer { position: fixed; inset: 0; z-index: 100; display: none; }
.drawer.is-open { display: block; }
.drawer__scrim { position: absolute; inset: 0; background: rgba(10, 26, 53, .5); animation: fade .2s; }
.drawer__panel {
  position: absolute; top: 0; bottom: 0; inset-inline-start: 0;
  width: min(420px, 100%); background: var(--surface);
  display: flex; flex-direction: column;
  animation: slide-in .28s var(--ease);
}
@keyframes fade { from { opacity: 0; } }
@keyframes slide-in { from { transform: translateX(100%); } }
.drawer__head { display: flex; align-items: center; justify-content: space-between; padding: 20px 22px; border-bottom: 1px solid var(--line); }
.drawer__head h2 { font-size: 19px; }
.drawer__close { width: 40px; height: 40px; border-radius: 10px; border: 0; background: var(--paper); display: grid; place-items: center; }
.drawer__body { padding: 22px; overflow-y: auto; flex: 1; display: grid; align-content: start; gap: 12px; }
.drawer__empty { color: var(--muted); }
.car-item {
  display: flex; align-items: center; gap: 12px; padding: 14px 16px;
  border: 1px solid var(--line); border-radius: 12px;
}
.car-item.is-active { border-color: var(--blue); background: var(--blue-tint); }
.car-item__name { font-family: var(--font-display); font-weight: 600; flex: 1; }
.car-item__name small { display: block; font-family: var(--font-body); font-weight: 400; color: var(--muted); font-size: 13px; }
.car-item button { border: 0; background: none; color: var(--muted); font-size: 13px; padding: 6px; }
.car-item button:hover { color: var(--red); }
.car-item__use { color: var(--blue) !important; font-weight: 600; }

.mobile-menu a { display: block; padding: 12px 4px; border-bottom: 1px solid var(--line); font-family: var(--font-display); font-weight: 500; }
.mobile-menu a:hover { color: var(--blue); }

/* ==========================================================================
   صفحات ووكومرس
   ========================================================================== */
.page-head { background: var(--surface); border-bottom: 1px solid var(--line); padding-block: 28px; }
.page-head h1 { font-size: clamp(24px, 2.6vw, 32px); }
.breadcrumbs, .woocommerce-breadcrumb { font-size: 13px; color: var(--muted); margin-bottom: 8px; }
.breadcrumbs a:hover, .woocommerce-breadcrumb a:hover { color: var(--blue); }

.fit-banner {
  display: flex; align-items: center; gap: 12px; flex-wrap: wrap;
  margin: 24px 0 0; padding: 14px 18px; border-radius: 12px;
  background: var(--blue-tint); border: 1px solid var(--blue-line); color: var(--blue); font-size: 15px;
}
.fit-banner strong { font-family: var(--font-display); }
.fit-banner a { margin-inline-start: auto; text-decoration: underline; text-underline-offset: 3px; font-size: 14px; }

.shop-layout { display: grid; grid-template-columns: 270px minmax(0, 1fr); gap: 32px; padding-block: 32px 0; }
.shop-filters { align-self: start; position: sticky; top: calc(var(--header-h) + 64px); background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: 18px; }
.shop-filters h3 { font-size: 15px; margin-bottom: 12px; }
.shop-filters form { display: grid; gap: 10px; }
.shop-filters select, .shop-filters input[type="search"] {
  width: 100%; height: 44px; padding: 0 12px; border: 1px solid var(--line-strong); border-radius: 9px; background: #fff; font-size: 14px;
}
.shop-filters .cat-list { margin-top: 18px; padding-top: 16px; border-top: 1px solid var(--line); display: grid; gap: 2px; }
.shop-filters .cat-list a { display: flex; justify-content: space-between; padding: 6px 8px; border-radius: 7px; font-size: 14px; }
.shop-filters .cat-list a:hover, .shop-filters .cat-list a.is-current { background: var(--paper); color: var(--blue); }

.woocommerce-result-count { color: var(--muted); font-size: 14px; margin: 0 0 16px; }
.woocommerce-ordering { margin: 0 0 16px; }
.woocommerce-ordering select { height: 40px; border: 1px solid var(--line-strong); border-radius: 9px; padding: 0 12px; background: #fff; }
.shop-toolbar { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; }

ul.products { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; margin: 0; padding: 0; list-style: none; }
ul.products::before, ul.products::after { display: none !important; }
ul.products li.product { width: auto !important; margin: 0 !important; float: none !important; }

.woocommerce-pagination ul { display: flex; gap: 6px; justify-content: center; margin-top: 32px; }
.woocommerce-pagination a, .woocommerce-pagination span { display: grid; place-items: center; min-width: 40px; height: 40px; border-radius: 9px; border: 1px solid var(--line); background: #fff; font-weight: 600; }
.woocommerce-pagination .current { background: var(--blue); color: #fff; border-color: var(--blue); }

.empty-state { padding: 40px; text-align: center; background: var(--surface); border: 1px dashed var(--line-strong); border-radius: 14px; }
.empty-state h2 { font-size: 20px; margin-bottom: 8px; }
.empty-state p { color: var(--muted); margin-bottom: 18px; }

/* صفحة المنتج */
.product-layout { display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr); gap: 40px; padding-block: 32px; }
.product-gallery { background: var(--surface); border: 1px solid var(--line); border-radius: 18px; padding: 24px; }
.product-gallery .woocommerce-product-gallery { width: 100% !important; float: none !important; margin: 0 !important; }
.product-gallery img { mix-blend-mode: multiply; }
.product-summary .product_title { font-size: clamp(22px, 2.2vw, 30px); margin-bottom: 10px; }
.product-meta-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 1px; background: var(--line); border: 1px solid var(--line); border-radius: 12px; overflow: hidden; margin: 18px 0; }
.product-meta-grid div { background: var(--surface); padding: 10px 14px; }
.product-meta-grid dt { font-size: 12.5px; color: var(--muted); }
.product-meta-grid dd { margin: 0; font-weight: 600; font-family: var(--font-display); font-size: 15px; }
.product-summary .price { font-size: 26px; margin: 4px 0 12px; display: block; }
.product-summary form.cart { display: flex; gap: 10px; align-items: stretch; margin: 18px 0; flex-wrap: wrap; }
.product-summary .quantity input { width: 80px; height: 52px; border: 1px solid var(--line-strong); border-radius: 10px; text-align: center; font-size: 16px; }
.product-summary .single_add_to_cart_button { flex: 1; min-height: 52px; border: 0; border-radius: 10px; background: var(--red); color: #fff; font-family: var(--font-display); font-weight: 600; font-size: 16px; }
.product-summary .single_add_to_cart_button:hover { background: var(--red-hover); }

.fit-check { border: 1px solid var(--line); border-radius: 14px; background: var(--surface); overflow: hidden; margin: 18px 0; }
.fit-check__head { display: flex; align-items: center; gap: 10px; padding: 14px 16px; font-family: var(--font-display); font-weight: 600; background: var(--paper); }
.fit-check__result { padding: 14px 16px; font-size: 15px; display: flex; gap: 10px; align-items: center; }
.fit-check__result.is-yes { background: var(--ok-bg); color: var(--ok); }
.fit-check__result.is-no { background: #fdecee; color: var(--red); }
.fit-check__result.is-unknown { background: var(--warn-bg); color: #8a5a00; }
.fit-check__result button { margin-inline-start: auto; border: 0; background: none; text-decoration: underline; color: inherit; font-size: 14px; }
.fit-table { width: 100%; border-collapse: collapse; font-size: 14px; }
.fit-table th, .fit-table td { padding: 10px 16px; text-align: start; border-top: 1px solid var(--line); }
.fit-table th { font-weight: 500; color: var(--muted); font-size: 13px; background: #fafbfd; }
.fit-table td.ltr-cell { direction: ltr; text-align: end; }

.woocommerce-tabs { margin-top: 24px; }
.woocommerce-tabs ul.tabs { display: flex; gap: 6px; padding: 4px; border-radius: 12px; background: #e6ebf2; width: fit-content; margin: 0 0 18px; list-style: none; }
.woocommerce-tabs ul.tabs li a { display: block; padding: 8px 16px; border-radius: 9px; font-weight: 500; font-size: 14px; }
.woocommerce-tabs ul.tabs li.active a { background: #fff; }
.woocommerce-tabs .panel { background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: 22px; }

/* تنبيهات ووكومرس */
.woocommerce-message, .woocommerce-info, .woocommerce-error {
  list-style: none; margin: 18px 0; padding: 14px 18px; border-radius: 12px;
  background: var(--blue-tint); border: 1px solid var(--blue-line); display: flex; gap: 12px; align-items: center; flex-wrap: wrap;
}
.woocommerce-error { background: #fdecee; border-color: #f4c3c9; }
.woocommerce-message .button, .woocommerce-info .button { margin-inline-start: auto; }
.woocommerce a.button, .woocommerce button.button, .woocommerce input.button, .woocommerce #respond input#submit {
  display: inline-flex; align-items: center; justify-content: center; min-height: 44px; padding: 0 18px;
  border: 0; border-radius: 10px; background: var(--blue); color: #fff; font-family: var(--font-display); font-weight: 600; font-size: 14px;
}
.woocommerce a.button:hover, .woocommerce button.button:hover { background: var(--blue-hover); color: #fff; }
.woocommerce a.button.alt, .woocommerce button.button.alt, .woocommerce .checkout-button, #place_order { background: var(--red); }
.woocommerce a.button.alt:hover, .woocommerce button.button.alt:hover, .woocommerce .checkout-button:hover, #place_order:hover { background: var(--red-hover); }

.content-page { padding-block: 32px; }
.content-page .entry { background: var(--surface); border: 1px solid var(--line); border-radius: 16px; padding: clamp(20px, 3vw, 36px); }
.content-page input[type="text"], .content-page input[type="email"], .content-page input[type="tel"], .content-page input[type="password"], .content-page input[type="number"], .content-page textarea, .content-page select {
  width: 100%; min-height: 46px; padding: 8px 12px; border: 1px solid var(--line-strong); border-radius: 9px; background: #fff;
}

/* ==========================================================================
   الاستجابة للشاشات
   ========================================================================== */
@media (max-width: 1100px) {
  .nav { display: none; }
  .menu-toggle { display: inline-flex; }
  .cats { grid-template-columns: repeat(3, 1fr); }
  .products-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .finder__row { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .finder__row .field:nth-child(3) { border-inline-start: 0; }
  .finder__row .field:nth-child(n+3) { border-top: 1px solid var(--line); }
  .finder__go { grid-column: 1 / -1; min-height: 52px; }
  .finder__row--search { grid-template-columns: minmax(0, 1fr) minmax(0, 1.6fr); }
  .finder__row--search .field:nth-child(n+3) { border-top: 0; }
  .finder__row--vin { grid-template-columns: 1fr; }
  .finder__row--vin .finder__go { grid-column: auto; }
  .steps { grid-template-columns: 1fr 1fr; row-gap: 32px; }
  .steps li:nth-child(3) { border-inline-start: 0; padding-inline-start: 0; }
  .footer__top { grid-template-columns: 1fr 1fr; }
  .shop-layout { grid-template-columns: 1fr; }
  .shop-filters { position: static; }
}

@media (max-width: 760px) {
  :root { --header-h: 64px; }
  .topbar__list li:not(:first-child) { display: none; }
  .brand img { height: 42px; }
  .site-header .wrap { gap: 8px; }
  .tool__label, .garage-chip span.garage-chip__text { display: none; }
  .garage-chip { padding: 0 10px; }

  .hero { min-height: 0; display: block; background: var(--night); padding-bottom: 8px; }
  .hero__media { background: var(--night) var(--poster, url("../img/hero-poster.jpg")) center 45% / cover no-repeat; }
  .hero__media { position: relative; height: 58svh; min-height: 340px; }
  .hero__video { position: absolute; }
  .hero::after { height: 58svh; min-height: 340px; bottom: auto; }
  .hero__sound { top: 14px; }
  .finder {
    width: auto; margin: -40px 12px 0; border-radius: 16px;
    background: rgba(12, 28, 58, .88);
  }
  .hero__after { height: 24px; }
  .finder__tabs { overflow-x: auto; scrollbar-width: none; }
  .finder__tab { flex: none; padding: 0 12px; }
  .finder__row, .finder__row--search { grid-template-columns: 1fr 1fr; }
  .finder__row--search .field:first-child { grid-column: 1 / -1; }
  .finder__row--search .field:nth-child(2) { grid-column: 1 / -1; border-inline-start: 0; border-top: 1px solid var(--line); }
  .field { min-height: 54px; }
  .field__label { inset-inline-start: 14px; }
  .field select, .field input { padding-inline: 14px 28px; }
  .finder__foot { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; }
  .chip { flex: none; }

  .makes { grid-template-columns: 1fr; }
  .make { display: grid; grid-template-columns: 44% 1fr; }
  .make__media { aspect-ratio: auto; height: 100%; border-bottom: 0; border-inline-end: 1px solid var(--line); }
  .make__body { padding: 16px; gap: 10px; }
  .make__models a:nth-child(n+5) { display: none; }
  .make__mark { height: 34px; padding: 5px 9px; top: 10px; inset-inline-start: 10px; }

  .cats { grid-template-columns: 1fr 1fr; }
  .cat__text { padding: 10px 12px 12px; }
  .cat__count { display: none; }
  .cat__name { font-size: 14.5px; }

  .section__head { flex-wrap: wrap; align-items: start; }
  .products-grid, ul.products { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
  .part__body { padding: 12px; }
  .part__name { font-size: 14.5px; }
  .part__fits { display: none; }
  .price { font-size: 16px; }

  .request { grid-template-columns: 1fr; background-size: auto 230px; background-position: left top; padding-top: 200px; }
  .request::before { background: linear-gradient(180deg, rgba(11,26,58,0) 120px, #0b1a3a 230px); }
  .request__visual { display: none; }
  .compare { grid-template-columns: 1fr; }
  .steps { grid-template-columns: 1fr; }
  .steps li, .steps li + li { border: 0; padding: 0; }
  .footer__top { grid-template-columns: 1fr; gap: 28px; }
  .product-layout { grid-template-columns: 1fr; gap: 20px; }
  .wa-float { bottom: 14px; inset-inline-end: 14px; }
}

@media (min-width: 761px) {
  .hero__media { display: contents; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; }
  .finder.is-entering { opacity: 1; transform: none; }
}

.section--flush-top { padding-top: 0; }

/* ---------- صفحة القطعة (قالب ووكومرس الافتراضي) ---------- */
.product-wrap { padding-block: 24px 0; }
.single-product div.product { display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr); gap: 40px; align-items: start; }
.single-product div.product > .woocommerce-product-gallery {
  width: auto !important; float: none !important; margin: 0 !important;
  background: var(--surface); border: 1px solid var(--line); border-radius: 18px; padding: 20px; position: relative;
}
.single-product div.product > .woocommerce-product-gallery img { border-radius: 10px; }
.single-product .woocommerce-product-gallery__trigger { position: absolute; top: 14px; inset-inline-end: 14px; z-index: 2; width: 38px; height: 38px; border-radius: 9px; background: #fff; border: 1px solid var(--line); display: grid; place-items: center; font-size: 0; }
.single-product .woocommerce-product-gallery__trigger::before { content: ""; width: 14px; height: 14px; border: 2px solid var(--ink); border-radius: 50%; }
.single-product .flex-control-thumbs { display: grid; grid-template-columns: repeat(5, 1fr); gap: 8px; margin-top: 12px; }
.single-product .flex-control-thumbs img { cursor: pointer; opacity: .6; border: 1px solid var(--line); }
.single-product .flex-control-thumbs img.flex-active { opacity: 1; border-color: var(--blue); }
.single-product div.product > .summary { width: auto !important; float: none !important; margin: 0 !important; }
.single-product div.product > .woocommerce-tabs,
.single-product div.product > .related,
.single-product div.product > .upsells { grid-column: 1 / -1; }
.single-product .product_title { font-size: clamp(22px, 2.2vw, 30px); margin-bottom: 10px; }
.single-product .summary > .price { font-family: var(--font-display); font-size: 26px; font-weight: 700; margin: 4px 0 6px; display: block; }
.price del, .price del .amount { color: var(--muted); font-weight: 400; font-size: .7em; }
.price ins { text-decoration: none; color: var(--red); }
.single-product .stock { font-weight: 600; font-size: 14px; }
.single-product .stock.in-stock { color: var(--ok); }
.single-product .stock.out-of-stock { color: var(--red); }
.single-product form.cart { display: flex; gap: 10px; align-items: stretch; margin: 18px 0; flex-wrap: wrap; }
.single-product form.cart .quantity input { width: 80px; height: 52px; border: 1px solid var(--line-strong); border-radius: 10px; text-align: center; font-size: 16px; }
.single-product form.cart .single_add_to_cart_button { flex: 1; min-height: 52px !important; background: var(--red) !important; font-size: 16px !important; }
.single-product form.cart .single_add_to_cart_button:hover { background: var(--red-hover) !important; }
.alt-numbers { font-size: 14px; color: var(--muted); margin-top: -8px; }
.ask-wa { width: 100%; margin-top: 4px; }
.related > h2 { font-size: 24px; margin: 40px 0 18px; }
.related ul.products { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.onsale { position: absolute; top: 14px; inset-inline-start: 14px; z-index: 2; background: var(--red); color: #fff; padding: 3px 10px; border-radius: 7px; font-size: 13px; font-weight: 600; }
.shop-main { min-width: 0; }
.fit-banner .icon { width: 20px; height: 20px; stroke-width: 2.2; }
.page-head .woocommerce-breadcrumb, .product-wrap .woocommerce-breadcrumb { margin: 0 0 8px; }
.product-wrap .woocommerce-breadcrumb { margin-bottom: 18px; }
.added_to_cart { display: none !important; }

/* رسالة الإضافة للسلة */
.cart-toast {
  position: fixed; z-index: 90; bottom: 22px; inset-inline-start: 50%;
  transform: translate(50%, 24px); opacity: 0; pointer-events: none;
  display: flex; align-items: center; gap: 12px;
  width: max-content; max-width: calc(100vw - 32px);
  padding: 10px 10px 10px 16px; padding-inline: 16px 10px;
  border-radius: 14px; background: var(--night); color: #fff;
  box-shadow: 0 18px 40px -16px rgba(5, 15, 35, .55);
  transition: opacity .25s var(--ease), transform .25s var(--ease);
}
.cart-toast.is-on { opacity: 1; transform: translate(50%, 0); pointer-events: auto; }
.cart-toast > .icon { width: 22px; height: 22px; flex: none; color: #7fdcaa; stroke-width: 2.4; }
.cart-toast__text { display: flex; flex-direction: column; min-width: 0; font-size: 13px; line-height: 1.4; color: #c9d6ec; }
.cart-toast__text b { color: #fff; font-size: 14.5px; }
.cart-toast__text span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 260px; }
.cart-toast__go { flex: none; height: 38px; padding: 0 14px; border-radius: 9px; background: var(--red); color: #fff; font-weight: 700; font-size: 14px; display: inline-flex; align-items: center; }
.cart-toast__go:hover { background: var(--red-hover); color: #fff; }
.cart-toast.is-error { background: #7a1420; }
.tool.is-bumped .tool__count { animation: cart-bump .45s var(--ease); }
@keyframes cart-bump { 0% { transform: scale(1); } 40% { transform: scale(1.35); } 100% { transform: scale(1); } }
@media (max-width: 760px) { .cart-toast { bottom: 76px; } }
.part__add.loading { opacity: .6; pointer-events: none; }
.part__add.added { background: var(--ok); }

@media (max-width: 1100px) {
  .related ul.products { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 760px) {
  .single-product div.product { grid-template-columns: 1fr; gap: 20px; }
  .product-meta-grid { grid-template-columns: 1fr 1fr; }
}
.vehicle-bar.is-static { position: sticky; transform: none; }
/* صفحات المتجر فيها الفلتر فما نكرر شريط السيارة */
.woocommerce-shop .vehicle-bar, .tax-product_cat .vehicle-bar, .post-type-archive-product .vehicle-bar { display: none; }

/* ==========================================================================
   السلة والدفع وحسابي (قوالب ووكومرس الكلاسيكية)
   ========================================================================== */
.woocommerce-cart .content-page .entry, .woocommerce-checkout .content-page .entry, .woocommerce-account .content-page .entry { background: none; border: 0; padding: 0; }
.woocommerce form .form-row { margin: 0 0 14px; padding: 0; }
.woocommerce form .form-row label { display: block; margin-bottom: 6px; font-size: 14px; font-weight: 500; }
.woocommerce form .form-row .required { color: var(--red); text-decoration: none; }
.woocommerce form .form-row .optional { color: var(--muted); font-weight: 400; font-size: 13px; }
.woocommerce form .form-row input.input-text, .woocommerce form .form-row textarea, .woocommerce form .form-row select,
.woocommerce-cart .coupon input.input-text, .select2-container .select2-selection--single {
  width: 100%; min-height: 48px; padding: 10px 14px; border: 1px solid var(--line-strong); border-radius: 10px;
  background: #fff; font: inherit; font-size: 15px; color: var(--ink);
}
.woocommerce form .form-row textarea { min-height: 96px; }
.woocommerce form .form-row input.input-text:focus, .woocommerce form .form-row textarea:focus { outline: 0; border-color: var(--blue); box-shadow: 0 0 0 3px var(--blue-tint-2); }
.woocommerce form .form-row.woocommerce-invalid input.input-text { border-color: var(--red); }
.woocommerce form .form-row-first, .woocommerce form .form-row-last { width: calc(50% - 7px); float: right; }
.woocommerce form .form-row-last { float: left; }
.woocommerce form .form-row-wide { clear: both; }
.woocommerce .col2-set::after, .woocommerce form .clear { content: ""; display: table; clear: both; }
.checkout-vin { clear: both; padding-top: 4px; }
.checkout-vin input { letter-spacing: .06em; text-transform: uppercase; }
.checkout-vin__hint { display: block; margin-top: 6px; font-size: 13px; color: var(--muted); }

/* الدفع: الحقول يمين وملخص الطلب يسار */
form.woocommerce-checkout { display: grid; grid-template-columns: minmax(0, 1.35fr) minmax(0, 1fr); gap: 0 28px; align-items: start; }
form.woocommerce-checkout > .woocommerce-NoticeGroup { grid-column: 1 / -1; }
form.woocommerce-checkout #customer_details { grid-column: 1; grid-row: span 3; background: var(--surface); border: 1px solid var(--line); border-radius: 16px; padding: clamp(18px, 2.5vw, 28px); }
form.woocommerce-checkout #customer_details .col-1, form.woocommerce-checkout #customer_details .col-2 { width: auto; float: none; }
form.woocommerce-checkout #order_review_heading, form.woocommerce-checkout #order_review { grid-column: 2; }
form.woocommerce-checkout #order_review_heading { margin: 0; padding: 18px 22px 0; background: var(--surface); border: 1px solid var(--line); border-bottom: 0; border-radius: 16px 16px 0 0; font-size: 18px; }
form.woocommerce-checkout #order_review { background: var(--surface); border: 1px solid var(--line); border-top: 0; border-radius: 0 0 16px 16px; padding: 8px 22px 22px; }
.woocommerce-checkout h3 { font-size: 18px; margin: 0 0 16px; }
.woocommerce-checkout #ship-to-different-address { font-size: 15px; font-weight: 500; }
.woocommerce-checkout #ship-to-different-address label { display: flex; gap: 8px; align-items: center; cursor: pointer; }

table.shop_table { width: 100%; border-collapse: collapse; font-size: 14.5px; }
table.shop_table th, table.shop_table td { padding: 12px 8px; border-bottom: 1px solid var(--line); text-align: start; vertical-align: middle; }
table.shop_table thead th { font-weight: 500; color: var(--muted); font-size: 13px; }
table.shop_table tfoot th { font-weight: 500; }
table.shop_table .order-total th, table.shop_table .order-total td { font-size: 17px; font-weight: 800; border-bottom: 0; }
table.shop_table .includes_tax { display: block; font-size: 12.5px; font-weight: 400; color: var(--muted); }
#shipping_method { list-style: none; margin: 0; padding: 0; }
#shipping_method li { margin-bottom: 6px; }

/* طرق الدفع: هنا تظهر البوابة بعد تركيبها */
#payment { margin-top: 14px; }
#payment ul.payment_methods { list-style: none; margin: 0 0 14px; padding: 0; display: grid; gap: 8px; }
#payment ul.payment_methods li { border: 1px solid var(--line-strong); border-radius: 12px; padding: 12px 14px; background: #fff; }
#payment ul.payment_methods li:has(input:checked) { border-color: var(--blue); background: var(--blue-tint); }
#payment ul.payment_methods li > label { font-weight: 700; cursor: pointer; display: inline-flex; align-items: center; gap: 8px; flex-wrap: wrap; }
#payment ul.payment_methods li img { max-height: 26px; width: auto; margin-inline-start: 6px; vertical-align: middle; }
#payment .payment_box { margin-top: 10px; font-size: 14px; color: var(--muted); }
#payment .payment_box p:last-child { margin-bottom: 0; }
#payment .woocommerce-privacy-policy-text { font-size: 13px; color: var(--muted); }
#payment .woocommerce-terms-and-conditions-wrapper { margin: 10px 0; font-size: 14px; }
#place_order { width: 100%; min-height: 54px; font-size: 17px; border-radius: 12px; }

/* السلة */
.woocommerce-cart-form { background: var(--surface); border: 1px solid var(--line); border-radius: 16px; padding: 8px 18px; }
.woocommerce-cart-form .product-thumbnail img { width: 72px; height: 72px; object-fit: contain; border-radius: 10px; background: var(--paper); }
.woocommerce-cart-form .product-remove a { display: grid; place-items: center; width: 30px; height: 30px; border-radius: 50%; color: var(--muted); font-size: 20px; }
.woocommerce-cart-form .product-remove a:hover { background: #fdecee; color: var(--red); }
.woocommerce-cart-form .product-name a { font-weight: 700; }
.woocommerce-cart-form .quantity input { width: 72px; height: 42px; border: 1px solid var(--line-strong); border-radius: 9px; text-align: center; font: inherit; }
.woocommerce-cart-form td.actions { padding-top: 16px; }
.woocommerce-cart-form .coupon { display: inline-flex; gap: 8px; align-items: center; }
.woocommerce-cart-form .coupon label { display: none; }
.woocommerce-cart-form .coupon input.input-text { width: 200px; min-height: 44px; }
.woocommerce-cart-form button[name="update_cart"] { float: left; background: var(--paper) !important; color: var(--ink) !important; border: 1px solid var(--line-strong) !important; }
.woocommerce-cart-form button[name="update_cart"]:disabled { opacity: .5; }
.cart-collaterals { margin-top: 20px; display: flex; justify-content: flex-end; }
.cart-collaterals .cart_totals { width: min(440px, 100%); background: var(--surface); border: 1px solid var(--line); border-radius: 16px; padding: 18px 22px 22px; }
.cart-collaterals .cart_totals h2 { font-size: 18px; margin: 0 0 6px; }
.wc-proceed-to-checkout .checkout-button { width: 100%; min-height: 54px !important; font-size: 17px !important; margin-top: 14px; border-radius: 12px !important; }
.cart-empty.woocommerce-info { font-size: 16px; }
.return-to-shop .button { margin-top: 6px; }

/* حسابي */
.woocommerce-account .woocommerce { display: grid; grid-template-columns: 240px minmax(0, 1fr); gap: 24px; align-items: start; }
.woocommerce-account .woocommerce > .woocommerce-notices-wrapper, .woocommerce-account .woocommerce > .woocommerce-form-login, .woocommerce-account .woocommerce > h2, .woocommerce-account .woocommerce > .u-columns { grid-column: 1 / -1; }
.woocommerce-MyAccount-navigation ul { list-style: none; margin: 0; padding: 6px; background: var(--surface); border: 1px solid var(--line); border-radius: 14px; }
.woocommerce-MyAccount-navigation a { display: block; padding: 10px 14px; border-radius: 9px; font-weight: 500; }
.woocommerce-MyAccount-navigation .is-active a { background: var(--blue-tint); color: var(--blue); }
.woocommerce-MyAccount-content { background: var(--surface); border: 1px solid var(--line); border-radius: 16px; padding: clamp(18px, 2.5vw, 28px); }
.woocommerce-form-login, .woocommerce-form-register { background: var(--surface); border: 1px solid var(--line); border-radius: 16px; padding: 22px; max-width: 480px; }
.u-columns { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; }
.woocommerce-order-overview { list-style: none; display: flex; flex-wrap: wrap; gap: 10px 24px; background: var(--ok-bg); border-radius: 14px; padding: 16px 20px; }
.woocommerce-order-overview strong { display: block; }

@media (max-width: 900px) {
  form.woocommerce-checkout { grid-template-columns: 1fr; }
  form.woocommerce-checkout #customer_details, form.woocommerce-checkout #order_review_heading, form.woocommerce-checkout #order_review { grid-column: 1; grid-row: auto; }
  form.woocommerce-checkout #order_review_heading { margin-top: 20px; }
  .woocommerce-account .woocommerce, .u-columns { grid-template-columns: 1fr; }
}
@media (max-width: 760px) {
  .woocommerce form .form-row-first, .woocommerce form .form-row-last { width: 100%; float: none; }
  table.shop_table_responsive thead { display: none; }
  table.shop_table_responsive tr { display: block; padding: 10px 0; border-bottom: 1px solid var(--line); }
  table.shop_table_responsive td { display: flex; justify-content: space-between; gap: 12px; border: 0; padding: 5px 0; }
  table.shop_table_responsive td::before { content: attr(data-title); color: var(--muted); font-size: 13px; }
  table.shop_table_responsive td.product-remove::before, table.shop_table_responsive td.product-thumbnail::before, table.shop_table_responsive td.actions::before { content: none; }
  .woocommerce-cart-form .coupon { display: flex; width: 100%; }
  .woocommerce-cart-form .coupon input.input-text { flex: 1; width: auto; }
  .woocommerce-cart-form button[name="update_cart"] { float: none; width: 100%; margin-top: 10px; }
}
