/* =======================================================================
 * AutoParts homepage — elegant automotive theme (v2).
 *
 * Aesthetic anchors:
 *  - Deep charcoal (#0E1014) + warm cream (#f8f6f1) + brand red (#CD1719) as accent only
 *  - Tajawal (Arabic) + Manrope (Latin numerics) typography
 *  - Generous whitespace, subtle gradients, refined micro-interactions
 *  - RTL-first; works ltr-aware where necessary
 * ======================================================================= */

:root {
  /* Brand palette */
  --ap-ink:       #0E1014;
  --ap-ink-2:     #14181d;
  --ap-ink-3:     #1a1f25;
  --ap-charcoal:  #2a3038;
  --ap-silver:    #c5c8cc;
  --ap-silver-2:  #a8acb1;
  --ap-cream:     #f8f6f1;
  --ap-cream-2:   #f1ede4;
  --ap-line:      #e7e2d6;
  --ap-line-dark: #2a3038;
  --ap-paper:     #ffffff;
  --ap-red:       #CD1719;
  --ap-red-2:     #a6101a;
  --ap-red-3:     #6a0c0e;
  --ap-wa:        #25D366;
  --ap-wa-dark:   #1da851;

  --ap-text:       #0E1014;
  --ap-text-muted: #585d65;
  --ap-text-soft:  #767b83;
  --ap-text-on-dark: #f4f1ec;
  --ap-text-on-dark-muted: #9aa1a8;

  /* Radii */
  --ap-r:    18px;
  --ap-r-sm: 10px;
  --ap-r-lg: 28px;
  --ap-r-pill: 999px;

  /* Shadows */
  --ap-shadow-1: 0 1px 2px rgba(14,16,20,.04), 0 1px 1px rgba(14,16,20,.03);
  --ap-shadow-2: 0 4px 12px -2px rgba(14,16,20,.08), 0 2px 4px rgba(14,16,20,.04);
  --ap-shadow-3: 0 18px 40px -16px rgba(14,16,20,.22), 0 6px 16px -8px rgba(14,16,20,.12);
  --ap-shadow-red: 0 8px 28px -10px rgba(205,23,25,.5);

  /* Spacing */
  --ap-gap:    clamp(14px, 1.6vw, 24px);
  --ap-gap-lg: clamp(24px, 3vw, 44px);
  --ap-section-pad-y: clamp(64px, 8vw, 112px);
  --ap-container: 1280px;

  /* Type */
  --ap-font:     'Tajawal', 'Cairo', system-ui, -apple-system, 'Segoe UI', Tahoma, Arial, sans-serif;
  --ap-font-num: 'Manrope', 'Tajawal', system-ui, sans-serif;
}

/* ========== Base ========== */
.ap-home, .ap-home *, .ap-home *::before, .ap-home *::after { box-sizing: border-box; }
.ap-home {
  font-family: var(--ap-font);
  color: var(--ap-text);
  background: var(--ap-cream);
  line-height: 1.6;
  font-size: 16px;
  font-weight: 500;
  text-align: right;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}
.ap-home h1, .ap-home h2, .ap-home h3, .ap-home h4 {
  margin: 0 0 .4em;
  line-height: 1.18;
  color: var(--ap-ink);
  font-weight: 800;
  letter-spacing: -0.01em;
}
.ap-home p  { margin: 0 0 1em; color: var(--ap-text-muted); }
.ap-home ul { padding: 0; margin: 0; list-style: none; }
.ap-home a  { color: inherit; text-decoration: none; transition: color .2s; }
.ap-home img { display: block; max-width: 100%; height: auto; }

/* Sections are full-width: backgrounds span viewport, content centers via inner shell. */
.ap-home section {
  padding: var(--ap-section-pad-y) clamp(18px, 4vw, 40px);
  max-width: none;
  margin: 0;
  position: relative;
}
/* Constrain direct children to the container — this is the "inner shell" pattern. */
.ap-home section > .ap-section__head,
.ap-home section > .ap-brands__grid,
.ap-home section > .ap-cats__grid,
.ap-home section > .ap-products__grid,
.ap-home section > .ap-pillars__grid,
.ap-home section > .ap-pay-ship__row,
.ap-home section > .ap-faq__list,
.ap-home section > .ap-trust-strip__inner,
.ap-home section > .ap-hero__inner,
.ap-home section > .ap-vin__inner,
.ap-home section > .ap-vin__glow,
.ap-home section > .ap-hero__bg {
  max-width: var(--ap-container);
  margin-inline: auto;
}
/* Hero & VIN have absolute-positioned bg/glow children that must NOT be constrained. */
.ap-home section > .ap-hero__bg,
.ap-home section > .ap-vin__glow {
  max-width: none;
}

/* Section head pattern */
.ap-section__head {
  text-align: center;
  margin-bottom: clamp(36px, 4.5vw, 64px);
  max-width: 720px;
  margin-inline: auto;
}
.ap-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 14px;
  border-radius: var(--ap-r-pill);
  background: rgba(205,23,25,.08);
  color: var(--ap-red);
  font-family: var(--ap-font-num);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .04em;
  text-transform: uppercase;
  margin-bottom: 14px;
}
.ap-eyebrow--on-dark {
  background: rgba(255,255,255,.06);
  color: var(--ap-silver);
}
.ap-h2 {
  font-size: clamp(26px, 3vw, 40px);
  color: var(--ap-ink);
}
.ap-h2--on-dark { color: #fff; }
.ap-h2__sub {
  font-size: clamp(15px, 1.4vw, 18px);
  color: var(--ap-text-muted);
  margin-top: 10px;
  font-weight: 500;
  line-height: 1.65;
}
.ap-h2__sub--on-dark { color: var(--ap-text-on-dark-muted); }

/* Icon container — uniform sizing for SVGs */
.ap-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  line-height: 0;
  vertical-align: middle;
}
.ap-icon svg { display: block; }

/* ========== Buttons ========== */
.ap-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 20px;
  font-family: var(--ap-font);
  font-size: 15px;
  font-weight: 700;
  border-radius: var(--ap-r-pill);
  border: 1.5px solid transparent;
  transition: transform .18s ease, background .2s, color .2s, box-shadow .25s, border-color .2s;
  cursor: pointer;
  white-space: nowrap;
  letter-spacing: -0.005em;
}
.ap-btn .ap-icon { color: currentColor; }
.ap-btn:hover { transform: translateY(-1px); }
.ap-btn--lg { padding: 15px 30px; font-size: 16px; }
.ap-btn--sm { padding: 8px 14px; font-size: 13px; }
.ap-btn--full { width: 100%; }

.ap-btn--call {
  background: var(--ap-red);
  color: #fff;
  box-shadow: var(--ap-shadow-red);
}
.ap-btn--call:hover { background: var(--ap-red-2); }

.ap-btn--wa {
  background: var(--ap-wa);
  color: #fff;
  box-shadow: 0 8px 28px -10px rgba(37,211,102,.55);
}
.ap-btn--wa:hover { background: var(--ap-wa-dark); }

.ap-btn--ghost {
  background: transparent;
  color: #fff;
  border-color: rgba(255,255,255,.25);
}
.ap-btn--ghost:hover { background: rgba(255,255,255,.06); border-color: rgba(255,255,255,.5); }

.ap-btn--outline {
  background: transparent;
  color: var(--ap-ink);
  border-color: var(--ap-line);
}
.ap-btn--outline:hover { background: var(--ap-paper); border-color: var(--ap-ink); }

/* ========== Hero ========== */
.ap-hero {
  background: var(--ap-ink);
  color: var(--ap-text-on-dark);
  padding: 0 !important;
  position: relative;
  overflow: hidden;
}
.ap-hero__bg {
  position: absolute;
  inset: 0;
  background:
    /* Heavy darkening over the headline area for guaranteed contrast (right side in RTL) */
    radial-gradient(900px 600px at 70% 50%, rgba(0,0,0,.45), transparent 70%),
    /* Brand-red atmospheric glow on the LEFT side (away from RTL text) */
    radial-gradient(900px 700px at 8% 35%, rgba(205,23,25,.42), transparent 60%),
    radial-gradient(700px 500px at 85% 90%, rgba(205,23,25,.10), transparent 60%),
    linear-gradient(180deg, #0a0c10 0%, #14181d 100%);
  z-index: 0;
}
.ap-hero__bg::after {
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(255,255,255,.025) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,.025) 1px, transparent 1px);
  background-size: 48px 48px;
  opacity: .8;
  mask-image: radial-gradient(80% 70% at 50% 40%, #000 30%, transparent 100%);
  -webkit-mask-image: radial-gradient(80% 70% at 50% 40%, #000 30%, transparent 100%);
}
.ap-hero__inner {
  position: relative;
  z-index: 1;
  max-width: var(--ap-container);
  margin: 0 auto;
  padding: clamp(72px, 9vw, 130px) clamp(20px, 4vw, 48px) clamp(60px, 8vw, 110px);
  display: grid;
  grid-template-columns: 1.15fr 1fr;
  gap: clamp(28px, 5vw, 64px);
  align-items: center;
}
.ap-hero__eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 7px 14px;
  border-radius: var(--ap-r-pill);
  background: rgba(255,255,255,.06);
  border: 1px solid rgba(255,255,255,.1);
  color: var(--ap-silver);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: .02em;
  margin-bottom: 22px;
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
}
.ap-hero__eyebrow .ap-icon { color: var(--ap-red); }
.ap-hero__h1 {
  font-size: clamp(30px, 4.4vw, 58px);
  color: #ffffff;
  font-weight: 900;
  line-height: 1.14;
  letter-spacing: -0.025em;
  margin-bottom: 20px;
  text-shadow: 0 2px 24px rgba(0,0,0,.5), 0 1px 3px rgba(0,0,0,.4);
}
.ap-hero__h1 em {
  font-style: normal;
  color: #ff5a5d;
  position: relative;
  white-space: nowrap;
  text-shadow: 0 0 30px rgba(205,23,25,.5), 0 2px 4px rgba(0,0,0,.5);
}
.ap-hero__sub {
  font-size: clamp(16px, 1.55vw, 19px);
  color: rgba(255,255,255,.88);
  margin: 0 0 32px;
  max-width: 56ch;
  line-height: 1.65;
  font-weight: 500;
  text-shadow: 0 1px 4px rgba(0,0,0,.5);
}
.ap-hero__cta {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 32px;
}
.ap-hero__badges {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 22px;
  font-size: 13px;
  color: rgba(255,255,255,.62);
  font-weight: 500;
}
.ap-hero__badges li {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.ap-hero__badges .ap-icon { color: var(--ap-red); }
.ap-hero__visual {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
}
.ap-hero__visual-glow {
  position: absolute;
  width: 78%;
  aspect-ratio: 1;
  background: radial-gradient(circle, rgba(205,23,25,.35) 0%, transparent 65%);
  filter: blur(40px);
  z-index: 0;
}
.ap-hero__visual img {
  position: relative;
  z-index: 1;
  width: 100%;
  height: auto;
  max-width: 540px;
  margin-inline: auto;
  filter: drop-shadow(0 30px 60px rgba(0,0,0,.55)) drop-shadow(0 4px 12px rgba(205,23,25,.25));
}
@media (max-width: 880px) {
  .ap-hero__inner { grid-template-columns: 1fr; text-align: center; }
  .ap-hero__sub  { margin-inline: auto; }
  .ap-hero__cta  { justify-content: center; }
  .ap-hero__badges { justify-content: center; }
  .ap-hero__visual img { max-width: 380px; }
}

/* ========== Trust strip ========== */
.ap-trust-strip {
  background: var(--ap-paper);
  padding: 22px clamp(18px, 4vw, 40px) !important;
  border-bottom: 1px solid var(--ap-line);
}
.ap-trust-strip__inner {
  max-width: var(--ap-container);
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
  gap: 18px 28px;
  align-items: center;
}
.ap-trust-strip__item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding-inline-start: 18px;
  border-inline-start: 1px solid var(--ap-line);
}
.ap-trust-strip__item:first-child { border-inline-start: 0; padding-inline-start: 0; }
.ap-trust-strip__icon {
  flex: 0 0 38px;
  width: 38px;
  height: 38px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--ap-cream);
  border-radius: 50%;
  color: var(--ap-red);
}
.ap-trust-strip__text { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.ap-trust-strip__label { font-size: 12px; color: var(--ap-text-soft); font-weight: 500; }
.ap-trust-strip__value {
  font-family: var(--ap-font-num);
  font-size: 14px;
  font-weight: 700;
  color: var(--ap-ink);
  letter-spacing: -.005em;
  overflow: hidden;
  text-overflow: ellipsis;
}
.ap-trust-strip__value--link { color: var(--ap-red); }
@media (max-width: 720px) {
  .ap-trust-strip__item { border-inline-start: 0; padding-inline-start: 0; border-top: 1px solid var(--ap-line); padding-top: 14px; }
  .ap-trust-strip__item:first-child { border-top: 0; padding-top: 0; }
}

/* ========== Brand cards ========== */
.ap-brands { background: var(--ap-cream); }
.ap-brands__grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: var(--ap-gap);
}
.ap-brand-card {
  position: relative;
  background: var(--ap-paper);
  border: 1px solid var(--ap-line);
  border-radius: var(--ap-r);
  overflow: hidden;
  transition: transform .25s ease, box-shadow .25s ease, border-color .25s;
}
.ap-brand-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--ap-shadow-3);
  border-color: rgba(205,23,25,.3);
}
.ap-brand-card__link { display: block; height: 100%; }
.ap-brand-card__media {
  background:
    radial-gradient(circle at 50% 60%, var(--ap-cream) 0%, var(--ap-cream-2) 100%);
  margin: 0;
  padding: 30px;
  display: flex;
  align-items: center;
  justify-content: center;
  height: 180px;
  position: relative;
}
.ap-brand-card__media::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 50%, rgba(14,16,20,.04));
  pointer-events: none;
}
.ap-brand-card__media img {
  max-height: 100%;
  max-width: 70%;
  object-fit: contain;
  filter: drop-shadow(0 6px 12px rgba(14,16,20,.08));
  transition: transform .35s ease;
}
.ap-brand-card:hover .ap-brand-card__media img { transform: scale(1.06); }
.ap-brand-card__body { padding: 20px 22px 24px; }
.ap-brand-card__title { font-size: 19px; margin-bottom: 6px; color: var(--ap-ink); }
.ap-brand-card__count {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 11px;
  border-radius: var(--ap-r-pill);
  background: rgba(205,23,25,.08);
  color: var(--ap-red);
  font-family: var(--ap-font-num);
  font-size: 12px;
  font-weight: 700;
  margin-bottom: 12px;
}
.ap-brand-card__desc { font-size: 14px; color: var(--ap-text-muted); margin-bottom: 14px; line-height: 1.7; }
.ap-brand-card__cta {
  font-size: 13px;
  font-weight: 700;
  color: var(--ap-red);
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

/* ========== Part categories ========== */
.ap-cats { background: var(--ap-paper); }
.ap-cats__grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: var(--ap-gap);
}
.ap-cat-card {
  background: var(--ap-cream);
  border: 1px solid var(--ap-line);
  border-radius: var(--ap-r);
  overflow: hidden;
  transition: transform .25s, box-shadow .25s, border-color .25s;
}
.ap-cat-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--ap-shadow-2);
  border-color: var(--ap-ink);
  background: var(--ap-paper);
}
.ap-cat-card__link { display: block; padding: 26px 24px 22px; height: 100%; }
.ap-cat-card__icon {
  width: 56px;
  height: 56px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--ap-paper);
  border-radius: 14px;
  color: var(--ap-red);
  margin-bottom: 18px;
  border: 1px solid var(--ap-line);
  transition: background .25s, color .25s;
}
.ap-cat-card:hover .ap-cat-card__icon { background: var(--ap-ink); color: #fff; border-color: var(--ap-ink); }
.ap-cat-card__title { font-size: 17px; margin-bottom: 6px; color: var(--ap-ink); }
.ap-cat-card__desc { font-size: 13px; color: var(--ap-text-soft); margin-bottom: 16px; line-height: 1.65; }
.ap-cat-card__cta {
  font-size: 13px;
  font-weight: 700;
  color: var(--ap-red);
  display: inline-flex;
  align-items: center;
  gap: 4px;
}
.ap-cat-card__cta .ap-icon { transition: transform .2s; }
.ap-cat-card:hover .ap-cat-card__cta .ap-icon { transform: translateX(-3px); }

/* ========== Products grid ========== */
.ap-products { background: var(--ap-paper); }
.ap-products--used { background: var(--ap-cream); }
.ap-products__grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: var(--ap-gap);
}
.ap-product-card {
  background: var(--ap-paper);
  border: 1px solid var(--ap-line);
  border-radius: var(--ap-r);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  transition: transform .25s, box-shadow .25s, border-color .25s;
}
.ap-products--used .ap-product-card { background: var(--ap-paper); }
.ap-product-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--ap-shadow-3);
  border-color: rgba(205,23,25,.25);
}
.ap-product-card__link { display: block; color: inherit; }
.ap-product-card__media {
  position: relative;
  background: var(--ap-cream-2);
  margin: 0;
  aspect-ratio: 1 / 1;
  overflow: hidden;
}
.ap-product-card__media img {
  width: 100%; height: 100%;
  object-fit: cover;
  transition: transform .5s ease;
}
.ap-product-card:hover .ap-product-card__media img { transform: scale(1.05); }
.ap-product-card__badge {
  position: absolute;
  top: 12px;
  inset-inline-end: 12px;
  background: var(--ap-ink);
  color: #fff;
  padding: 5px 12px;
  border-radius: var(--ap-r-pill);
  font-family: var(--ap-font-num);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .02em;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}
.ap-product-card__badge--new { background: #0f5d36; }
.ap-product-card__badge--used { background: var(--ap-ink-2); }
.ap-product-card__body { padding: 16px 18px 12px; flex: 1; }
.ap-product-card__title {
  font-size: 15px;
  line-height: 1.45;
  margin: 0 0 10px;
  color: var(--ap-ink);
  font-weight: 700;
  min-height: 2.9em;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.ap-product-card__meta { font-size: 12px; color: var(--ap-text-soft); display: flex; flex-wrap: wrap; gap: 4px 14px; }
.ap-product-card__meta li { display: flex; gap: 4px; }
.ap-product-card__meta span { color: var(--ap-text-soft); opacity: .75; }
.ap-product-card__cta-row { padding: 0 18px 18px; }
.ap-product-card__cta-row .ap-btn { width: 100%; }

/* ========== Trust pillars ========== */
.ap-pillars { background: var(--ap-paper); }
.ap-pillars__grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  gap: var(--ap-gap);
}
.ap-pillar {
  text-align: right;
  background: var(--ap-cream);
  border-radius: var(--ap-r);
  padding: 32px 26px;
  border: 1px solid var(--ap-line);
  position: relative;
  transition: transform .25s, box-shadow .25s, border-color .25s, background .25s;
}
.ap-pillar::before {
  content: "";
  position: absolute;
  top: 0;
  inset-inline-end: 28px;
  width: 40px;
  height: 3px;
  background: var(--ap-red);
  border-radius: 0 0 3px 3px;
}
.ap-pillar:hover {
  transform: translateY(-4px);
  box-shadow: var(--ap-shadow-3);
  background: var(--ap-paper);
  border-color: rgba(205,23,25,.25);
}
.ap-pillar__icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 60px;
  height: 60px;
  background: var(--ap-paper);
  color: var(--ap-red);
  border-radius: 16px;
  margin-bottom: 18px;
  border: 1px solid var(--ap-line);
}
.ap-pillar__stat {
  display: inline-block;
  font-family: var(--ap-font-num);
  font-size: 13px;
  font-weight: 700;
  color: var(--ap-red);
  letter-spacing: -.005em;
  margin-bottom: 6px;
}
.ap-pillar__title {
  font-size: 20px;
  color: var(--ap-ink);
  margin-bottom: 10px;
  font-weight: 800;
}
.ap-pillar__body { font-size: 14px; color: var(--ap-text-muted); margin: 0; line-height: 1.7; }

/* ========== Payment / Shipping ========== */
.ap-pay-ship { background: var(--ap-cream); }
.ap-pay-ship__row {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr 1fr;
  gap: var(--ap-gap);
}
@media (max-width: 980px) { .ap-pay-ship__row { grid-template-columns: 1fr 1fr; } }
@media (max-width: 560px) { .ap-pay-ship__row { grid-template-columns: 1fr; } }
.ap-pay-ship__card {
  background: var(--ap-paper);
  border-radius: var(--ap-r);
  padding: 28px 24px;
  border: 1px solid var(--ap-line);
  transition: box-shadow .2s, transform .2s, border-color .2s;
}
.ap-pay-ship__card:hover { box-shadow: var(--ap-shadow-2); transform: translateY(-2px); border-color: rgba(205,23,25,.2); }
.ap-pay-ship__card-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 56px; height: 56px;
  border-radius: 14px;
  background: var(--ap-cream);
  color: var(--ap-red);
  margin-bottom: 16px;
  border: 1px solid var(--ap-line);
}
.ap-pay-ship__title { font-size: 17px; color: var(--ap-ink); margin-bottom: 14px; }
.ap-pay-ship__big {
  font-family: var(--ap-font-num);
  font-size: 36px;
  font-weight: 800;
  color: var(--ap-ink);
  margin: 0 0 4px;
  letter-spacing: -.02em;
  line-height: 1.05;
}
.ap-pay-ship__big span { font-size: 16px; font-weight: 600; color: var(--ap-text-soft); margin-inline-start: 4px; }
.ap-pay-ship__note { font-size: 13px; color: var(--ap-text-muted); margin: 8px 0 0; line-height: 1.65; }
.ap-pay-ship__methods { display: flex; flex-wrap: wrap; gap: 8px; }
.ap-pay-chip {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 6px 12px 6px 8px;
  background: var(--ap-cream);
  border: 1px solid var(--ap-line);
  border-radius: var(--ap-r-pill);
  font-size: 12.5px;
  font-weight: 600;
  color: var(--ap-ink);
}
.ap-pay-chip__mark {
  font-family: var(--ap-font-num);
  font-size: 10px;
  font-weight: 800;
  padding: 3px 8px;
  border-radius: var(--ap-r-pill);
  background: var(--ap-ink);
  color: #fff;
  letter-spacing: .03em;
  text-transform: uppercase;
}
.ap-pay-chip[data-mark="mada"]  .ap-pay-chip__mark { background: #84c441; color: #0E1014; }
.ap-pay-chip[data-mark="AP"]    .ap-pay-chip__mark { background: #0E1014; }
.ap-pay-chip[data-mark="stc"]   .ap-pay-chip__mark { background: #4F008C; }
.ap-pay-chip[data-mark="tabby"] .ap-pay-chip__mark { background: #3BFFA0; color: #0E1014; }
.ap-pay-chip[data-mark="tamara"].ap-pay-chip__mark { background: #ff3d3d; }
.ap-pay-chip[data-mark="bank"]  .ap-pay-chip__mark { background: var(--ap-charcoal); }
.ap-pay-chip[data-mark="cash"]  .ap-pay-chip__mark { background: #b08a3a; }

/* ========== VIN search (dark) ========== */
.ap-vin {
  background: var(--ap-ink);
  color: var(--ap-text-on-dark);
  padding-block: clamp(72px, 8vw, 110px);
  position: relative;
  overflow: hidden;
}
.ap-vin__glow {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(800px 500px at 80% 30%, rgba(205,23,25,.22), transparent 65%),
    radial-gradient(600px 400px at 20% 90%, rgba(205,23,25,.08), transparent 65%);
}
.ap-vin__inner {
  position: relative;
  z-index: 1;
  max-width: var(--ap-container);
  margin: 0 auto;
  padding-inline: clamp(18px, 4vw, 48px);
  display: grid;
  grid-template-columns: 1.1fr 1fr;
  gap: clamp(28px, 4vw, 56px);
  align-items: center;
}
.ap-vin__copy .ap-h2 { color: #fff; margin-bottom: 14px; }
.ap-vin__perks {
  list-style: none;
  margin-top: 22px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  font-size: 14.5px;
  color: rgba(255,255,255,.78);
}
.ap-vin__perks li { display: inline-flex; align-items: center; gap: 10px; }
.ap-vin__perks .ap-icon { color: var(--ap-red); }
.ap-vin__form {
  background: rgba(255,255,255,.04);
  border: 1px solid rgba(255,255,255,.1);
  border-radius: var(--ap-r-lg);
  padding: 28px;
  display: flex;
  flex-direction: column;
  gap: 16px;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}
.ap-vin__row { display: flex; flex-direction: column; gap: 7px; }
.ap-vin__label { font-size: 13px; color: rgba(255,255,255,.7); font-weight: 600; }
.ap-vin__input {
  background: rgba(255,255,255,.06);
  border: 1px solid rgba(255,255,255,.12);
  color: #fff;
  border-radius: var(--ap-r-sm);
  padding: 13px 16px;
  font-family: var(--ap-font);
  font-size: 15px;
  font-weight: 500;
  transition: border-color .2s, background .2s, box-shadow .2s;
}
.ap-vin__input::placeholder { color: rgba(255,255,255,.35); font-weight: 400; }
.ap-vin__input:focus {
  outline: none;
  border-color: var(--ap-red);
  background: rgba(255,255,255,.08);
  box-shadow: 0 0 0 3px rgba(205,23,25,.18);
}
.ap-vin__form .ap-btn { align-self: stretch; padding-block: 16px; }
@media (max-width: 820px) {
  .ap-vin__inner { grid-template-columns: 1fr; }
  .ap-vin__copy { text-align: center; }
  .ap-vin__perks { align-items: center; }
}

/* ========== FAQ ========== */
.ap-faq { background: var(--ap-cream); }
/* FAQ uses a tighter container — override the global 1280 */
.ap-home .ap-faq > .ap-section__head,
.ap-home .ap-faq > .ap-faq__list { max-width: 840px; }
.ap-faq__list { display: flex; flex-direction: column; gap: 10px; }
.ap-faq__item {
  background: var(--ap-paper);
  border-radius: var(--ap-r);
  border: 1px solid var(--ap-line);
  overflow: hidden;
  transition: border-color .2s, box-shadow .2s;
}
.ap-faq__item:hover { border-color: rgba(205,23,25,.2); }
.ap-faq__item details > summary {
  cursor: pointer;
  list-style: none;
  padding: 18px 22px;
  display: flex;
  align-items: center;
  gap: 14px;
  position: relative;
}
.ap-faq__item details > summary::-webkit-details-marker { display: none; }
.ap-faq__item details > summary::after {
  content: "+";
  margin-inline-start: auto;
  color: var(--ap-red);
  font-size: 22px;
  font-weight: 900;
  line-height: 1;
  transition: transform .25s;
  font-family: var(--ap-font-num);
}
.ap-faq__item details[open] > summary::after { content: "−"; }
.ap-faq__item details[open] { box-shadow: var(--ap-shadow-2); border-color: rgba(205,23,25,.3); }
.ap-faq__q-text { font-size: 15.5px; margin: 0; font-weight: 700; color: var(--ap-ink); line-height: 1.5; }
.ap-faq__a { padding: 0 22px 22px; }
.ap-faq__a p { margin: 0; color: var(--ap-text-muted); font-size: 14.5px; line-height: 1.75; }

/* ========== Reduce motion ========== */
@media (prefers-reduced-motion: reduce) {
  .ap-home *, .ap-home *::before, .ap-home *::after {
    transition: none !important;
    animation: none !important;
  }
}

/* ============================================================
 * BRAND-ARCHIVE SECTIONS
 * ============================================================ */

/* ========== Brand intro (B1) ========== */
.ap-brand-intro { background: var(--ap-paper); }
.ap-brand-intro__grid {
  display: grid;
  grid-template-columns: 1.3fr 1fr;
  gap: clamp(28px, 4vw, 56px);
  align-items: start;
  max-width: var(--ap-container);
  margin-inline: auto;
}
@media (max-width: 900px) { .ap-brand-intro__grid { grid-template-columns: 1fr; } }
.ap-brand-intro__copy {
  font-size: 16px;
  line-height: 1.85;
  color: var(--ap-text-muted);
}
.ap-brand-intro__copy p { margin: 0; }
.ap-brand-intro__copy strong { color: var(--ap-ink); font-weight: 800; }

.ap-brand-intro__chips {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}
.ap-chip-card {
  background: var(--ap-cream);
  border: 1px solid var(--ap-line);
  border-radius: var(--ap-r);
  padding: 18px 18px 16px;
  display: flex;
  flex-direction: column;
  gap: 4px;
  transition: border-color .2s, box-shadow .2s;
}
.ap-chip-card:hover { border-color: rgba(205,23,25,.25); box-shadow: var(--ap-shadow-2); }
.ap-chip-card--wide { grid-column: span 2; }
.ap-chip-card__label { font-size: 12px; color: var(--ap-text-soft); font-weight: 500; }
.ap-chip-card__value {
  font-family: var(--ap-font-num);
  font-size: 26px;
  font-weight: 800;
  color: var(--ap-ink);
  letter-spacing: -.02em;
  line-height: 1.1;
}
.ap-chip-card__value--sm { font-size: 17px; }
.ap-chip-card__list { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 6px; }
.ap-engine-pill {
  display: inline-flex;
  padding: 4px 11px;
  border-radius: var(--ap-r-pill);
  background: var(--ap-paper);
  border: 1px solid var(--ap-line);
  font-size: 12.5px;
  font-weight: 600;
  color: var(--ap-ink);
  font-family: var(--ap-font-num);
}

/* ========== Brand models grid (B2) ========== */
.ap-brand-models { background: var(--ap-cream); }
.ap-models__grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: var(--ap-gap);
  max-width: var(--ap-container);
  margin-inline: auto;
}
.ap-model-card {
  background: var(--ap-paper);
  border: 1px solid var(--ap-line);
  border-radius: var(--ap-r);
  padding: 22px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  position: relative;
  overflow: hidden;
  transition: transform .25s, box-shadow .25s, border-color .25s;
}
.ap-model-card:hover { transform: translateY(-3px); box-shadow: var(--ap-shadow-2); border-color: rgba(205,23,25,.25); }
.ap-model-card::before {
  content: "";
  position: absolute;
  inset-inline-end: 22px;
  top: 0;
  width: 30px;
  height: 3px;
  background: var(--ap-red);
  border-radius: 0 0 3px 3px;
}
.ap-model-card__link { display: flex; flex-direction: column; gap: 4px; color: inherit; }
.ap-model-card__head { display: flex; flex-direction: column; gap: 4px; }
.ap-model-card__brand {
  font-size: 12px;
  color: var(--ap-text-soft);
  font-weight: 600;
}
.ap-model-card__name {
  font-family: var(--ap-font-num);
  font-size: 24px;
  font-weight: 800;
  color: var(--ap-ink);
  margin: 0;
  letter-spacing: -.01em;
}
.ap-model-card__years {
  font-size: 13px;
  color: var(--ap-red);
  font-family: var(--ap-font-num);
  font-weight: 700;
}
.ap-model-card__cta {
  font-size: 13px;
  font-weight: 700;
  color: var(--ap-ink);
  display: inline-flex;
  align-items: center;
  gap: 4px;
  margin-top: 8px;
}
.ap-model-card__wa { width: 100%; margin-top: 6px; }

/* ========== Most-requested parts (B3) ========== */
.ap-brand-parts { background: var(--ap-paper); }
.ap-parts__grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 10px;
  max-width: var(--ap-container);
  margin-inline: auto;
}
.ap-part-chip {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 16px;
  background: var(--ap-cream);
  border: 1px solid var(--ap-line);
  border-radius: var(--ap-r);
  transition: border-color .2s, box-shadow .2s, background .2s;
}
.ap-part-chip:hover { border-color: rgba(205,23,25,.3); background: var(--ap-paper); box-shadow: var(--ap-shadow-1); }
.ap-part-chip__rank {
  flex: 0 0 32px;
  width: 32px;
  height: 32px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--ap-ink);
  color: #fff;
  border-radius: 50%;
  font-family: var(--ap-font-num);
  font-size: 13px;
  font-weight: 800;
}
.ap-part-chip__name {
  flex: 1;
  font-size: 15px;
  font-weight: 700;
  color: var(--ap-ink);
  line-height: 1.35;
}
.ap-part-chip__cta {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 7px 13px;
  border-radius: var(--ap-r-pill);
  background: var(--ap-wa);
  color: #fff;
  font-size: 12.5px;
  font-weight: 700;
  white-space: nowrap;
  transition: background .2s;
}
.ap-part-chip__cta:hover { background: var(--ap-wa-dark); }

/* ========== Brand related (B5) ========== */
.ap-brand-related { background: var(--ap-cream); }
.ap-related__grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: var(--ap-gap);
  max-width: var(--ap-container);
  margin-inline: auto;
}
.ap-related-card {
  background: var(--ap-paper);
  border: 1px solid var(--ap-line);
  border-radius: var(--ap-r);
  overflow: hidden;
  transition: transform .25s, box-shadow .25s, border-color .25s;
}
.ap-related-card:hover { transform: translateY(-3px); box-shadow: var(--ap-shadow-2); border-color: rgba(205,23,25,.25); }
.ap-related-card__link {
  display: grid;
  grid-template-columns: 70px 1fr 28px;
  gap: 14px;
  padding: 16px 18px;
  align-items: center;
}
.ap-related-card__link img {
  width: 70px; height: 70px;
  object-fit: contain;
  filter: drop-shadow(0 4px 8px rgba(14,16,20,.06));
}
.ap-related-card__name { font-size: 15px; color: var(--ap-ink); margin: 0 0 4px; font-weight: 800; }
.ap-related-card__count {
  font-size: 12.5px;
  color: var(--ap-text-soft);
  font-family: var(--ap-font-num);
  font-weight: 600;
}
.ap-related-card__arrow { color: var(--ap-red); display: inline-flex; }


/* ============================================================
 * MODEL-LANDING SECTIONS
 * ============================================================ */

/* Model common-issues */
.ap-model-issues { background: var(--ap-paper); }
.ap-issues__grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: var(--ap-gap);
  max-width: var(--ap-container);
  margin-inline: auto;
}
.ap-issue-card {
  background: var(--ap-cream);
  border: 1px solid var(--ap-line);
  border-radius: var(--ap-r);
  padding: 22px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  position: relative;
  transition: transform .25s, box-shadow .25s, border-color .25s, background .25s;
}
.ap-issue-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--ap-shadow-2);
  border-color: rgba(205,23,25,.3);
  background: var(--ap-paper);
}
.ap-issue-card__rank {
  font-family: var(--ap-font-num);
  font-size: 14px;
  font-weight: 800;
  color: var(--ap-red);
  letter-spacing: .04em;
}
.ap-issue-card__title {
  font-size: 16px;
  margin: 0;
  color: var(--ap-ink);
  font-weight: 700;
  line-height: 1.5;
  flex: 1;
}
.ap-issue-card__cta {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 14px;
  border-radius: var(--ap-r-pill);
  background: var(--ap-wa);
  color: #fff;
  font-size: 13px;
  font-weight: 700;
  align-self: flex-start;
  transition: background .2s;
}
.ap-issue-card__cta:hover { background: var(--ap-wa-dark); }


/* ============================================================
   Footer — child theme owns this
   ============================================================ */
.ap-footer {
  background: var(--ap-ink, #0E1014);
  color: #d8dadd;
  padding: 64px 0 32px;
  margin-top: 80px;
  border-top: 3px solid var(--ap-red, #CD1719);
}
.ap-footer__inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
  display: grid;
  grid-template-columns: 1fr 2fr 1fr;
  gap: 40px;
  align-items: start;
}
.ap-footer__brand-link {
  font-family: 'Tajawal', system-ui, sans-serif;
  font-size: 26px;
  font-weight: 900;
  color: #ffffff;
  text-decoration: none;
  letter-spacing: -0.02em;
  display: inline-block;
  margin-bottom: 8px;
}
.ap-footer__brand-link:hover { color: var(--ap-red, #ff5a5d); }
.ap-footer__brand-sub {
  font-size: 13px;
  color: #9ca3af;
  margin: 0;
  line-height: 1.5;
}
.ap-footer__menu {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 8px 28px;
  justify-content: center;
}
.ap-footer__menu li { display: inline-flex; }
.ap-footer__menu a {
  color: #e5e7eb;
  text-decoration: none;
  font-size: 14px;
  font-weight: 500;
  padding: 6px 0;
  transition: color .2s;
  position: relative;
}
.ap-footer__menu a:hover { color: var(--ap-red, #ff5a5d); }
.ap-footer__menu a.ap-footer__sister {
  color: #ffd166;
  font-weight: 700;
  padding: 6px 12px;
  border: 1px solid rgba(255,209,102,.3);
  border-radius: 6px;
  background: rgba(255,209,102,.06);
}
.ap-footer__menu a.ap-footer__sister:hover {
  background: rgba(255,209,102,.15);
  border-color: rgba(255,209,102,.6);
  color: #ffd166;
}
.ap-footer__copyright {
  text-align: left;
  font-size: 12px;
  color: #9ca3af;
}
.ap-footer__copyright p { margin: 0; }

@media (max-width: 768px) {
  .ap-footer__inner {
    grid-template-columns: 1fr;
    gap: 28px;
    text-align: center;
  }
  .ap-footer__menu { justify-content: center; }
  .ap-footer__copyright { text-align: center; }
}
