/*
Theme Name: Fazli Yadak
Theme URI: https://fazliyadak.ir
Author: Fazli Yadak
Author URI: https://fazliyadak.ir
Description: قالب فروشگاه لوازم یدکی فضلی یدک — طراحی یخی، دیسک ترمز ذره‌ای، انتخاب خودرو با برند ← مدل ← نسل، و ماشین سه‌بعدی با تمرکز روی لنت
Version: 4.2.0
Requires at least: 6.0
Requires PHP: 7.4
Text Domain: fazliyadak
*/

/* ==========================================================================
   توکن‌ها
   ========================================================================== */
:root {
  --abyss:   #080B10;
  --deep:    #0D121A;
  --slate:   #383E4E;
  --slate-2: #262C39;
  --frost:   #B6BAC5;
  --ice:     #E6ECF5;
  --glacier: #8FB2D4;
  --ember:   #E8A04C;

  --line:        rgba(182, 186, 197, 0.14);
  --line-strong: rgba(182, 186, 197, 0.28);

  --font: 'FY Sans', 'Vazirmatn', Tahoma, 'Segoe UI', 'Noto Naskh Arabic', Arial, sans-serif;
  --w-thin: 200;
  --w-light: 300;
  --header-h: 76px;
  --wrap: 1280px;
}

/* ==========================================================================
   پایه
   ========================================================================== */
*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; padding: 0; }
html { scroll-behavior: smooth; scroll-padding-top: calc(var(--header-h) + 16px); -webkit-text-size-adjust: 100%; }

body {
  font-family: var(--font);
  font-weight: 400;
  font-size: 16px;
  line-height: 1.9;
  color: var(--frost);
  background: var(--abyss);
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}
body::before {
  content: "";
  position: fixed; inset: 0; z-index: -2;
  background:
    radial-gradient(120% 80% at 12% -10%, #16202f 0%, transparent 55%),
    radial-gradient(90% 70% at 100% 100%, #111925 0%, transparent 60%),
    var(--abyss);
}
body::after {
  content: "";
  position: fixed; inset: 0; z-index: 90; pointer-events: none; opacity: .05;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='160' height='160'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='2' stitchTiles='stitch'/><feColorMatrix values='0 0 0 0 1  0 0 0 0 1  0 0 0 0 1  0 0 0 .9 0'/></filter><rect width='100%' height='100%' filter='url(%23n)'/></svg>");
}

img { max-width: 100%; height: auto; display: block; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; }
ul { list-style: none; }
::selection { background: rgba(143, 178, 212, .35); color: #fff; }

:focus-visible { outline: 2px solid var(--glacier); outline-offset: 3px; }

.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 28px; }
.wrap.narrow { max-width: 820px; }

.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: fixed; top: -60px; right: 16px; z-index: 200;
  background: var(--ice); color: var(--abyss); padding: 10px 18px; border-radius: 3px;
  transition: top .2s;
}
.skip-link:focus { top: 12px; }

h1, h2, h3, h4, h5 { color: var(--ice); font-family: var(--font); line-height: 1.35; }

/* ==========================================================================
   بلوک یخی — سطح مشترک کارت‌ها
   ========================================================================== */
.ice {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  border: 1px solid rgba(182, 186, 197, .17);
  border-radius: 4px;
  background-color: rgba(13, 18, 26, .55);
  background-image: linear-gradient(155deg, rgba(230, 236, 245, .11) 0%, rgba(143, 178, 212, .05) 40%, rgba(56, 62, 78, .24) 100%);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, .15),
    inset 0 -22px 34px rgba(8, 11, 16, .38),
    0 18px 44px rgba(0, 0, 0, .32);
  -webkit-backdrop-filter: blur(10px) saturate(1.15);
  backdrop-filter: blur(10px) saturate(1.15);
}
.ice::before {
  content: "";
  position: absolute; inset: 0; z-index: -1; pointer-events: none;
  opacity: .09; mix-blend-mode: screen;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='240' height='240'><filter id='f'><feTurbulence type='fractalNoise' baseFrequency='.6' numOctaves='2' seed='7' stitchTiles='stitch'/><feColorMatrix values='0 0 0 0 .8  0 0 0 0 .88  0 0 0 0 .97  0 0 0 1.1 -.3'/></filter><rect width='100%' height='100%' filter='url(%23f)'/></svg>");
}
.ice::after {
  content: "";
  position: absolute; inset: 0; z-index: -1; pointer-events: none;
  background: linear-gradient(115deg, transparent 38%, rgba(255, 255, 255, .07) 48%, transparent 58%);
}

/* ==========================================================================
   دکمه‌ها
   ========================================================================== */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  min-height: 48px; padding: 0 26px;
  font-family: var(--font); font-weight: 500; font-size: .95rem; line-height: 1.2;
  border: 1px solid transparent; border-radius: 3px; cursor: pointer;
  transition: background-color .25s, color .25s, border-color .25s;
}
.btn-lg { min-height: 58px; padding: 0 36px; font-size: 1.02rem; }
.btn-ice { background: var(--ice); color: var(--abyss); }
.btn-ice:hover { background: #fff; }
.btn-heat {
  color: var(--ember);
  border-color: rgba(232, 160, 76, .6);
  background: rgba(232, 160, 76, .06);
}
.btn-heat:hover { background: var(--ember); color: var(--abyss); border-color: var(--ember); }
.btn-quiet { color: var(--frost); border-color: var(--line-strong); background: transparent; }
.btn-quiet:hover { color: var(--ice); border-color: var(--frost); }

/* ==========================================================================
   هدر
   ========================================================================== */
.site-header {
  position: fixed; top: 0; right: 0; left: 0; z-index: 60;
  border-bottom: 1px solid transparent;
  transition: background-color .3s, border-color .3s;
}
.site-header.is-scrolled,
body:not(.home) .site-header,
.site-header.nav-open {
  background: rgba(8, 11, 16, .78);
  -webkit-backdrop-filter: blur(16px);
  backdrop-filter: blur(16px);
  border-bottom-color: var(--line);
}
.header-row {
  display: flex; align-items: center; justify-content: space-between; gap: 28px;
  height: var(--header-h);
}
.site-brand { display: flex; align-items: center; gap: 14px; flex-shrink: 0; }
.site-brand .logo-mark, .site-brand .custom-logo { width: 44px; height: 44px; flex-shrink: 0; object-fit: contain; }
.brand-text { display: flex; flex-direction: column; line-height: 1.3; }
.brand-name { color: var(--ice); font-weight: 600; font-size: 1.1rem; }
.brand-tag { color: var(--frost); font-size: .74rem; font-weight: var(--w-light); }

.primary { display: flex; align-items: center; gap: 2px; margin-inline-end: auto; margin-inline-start: 24px; }
.primary a {
  color: var(--frost); font-size: .93rem; font-weight: 400;
  padding: 8px 14px; border-radius: 3px; transition: color .2s, background-color .2s;
}
.primary a:hover, .primary .current-menu-item > a { color: var(--ice); background: rgba(182, 186, 197, .08); }
.primary ul { display: flex; gap: 2px; }

.header-tools { display: flex; align-items: center; gap: 10px; }
.header-phone {
  display: inline-flex; align-items: center; gap: 10px;
  min-height: 42px; padding: 0 18px; border-radius: 3px;
  border: 1px solid rgba(232, 160, 76, .5); color: var(--ember);
  font-size: .95rem; font-weight: 500; direction: ltr;
  transition: background-color .25s, color .25s;
}
.header-phone:hover { background: var(--ember); color: var(--abyss); }
.header-phone .dot {
  width: 7px; height: 7px; border-radius: 50%; background: currentColor;
  box-shadow: 0 0 10px currentColor;
}
.tool-btn {
  width: 42px; height: 42px; display: inline-flex; align-items: center; justify-content: center;
  border: 1px solid var(--line-strong); border-radius: 3px; color: var(--ice);
  transition: border-color .2s;
}
.tool-btn:hover { border-color: var(--frost); }

.nav-toggle {
  display: none; width: 42px; height: 42px; position: relative;
  border: 1px solid var(--line-strong); border-radius: 3px; background: transparent; cursor: pointer;
}
.nav-toggle span {
  position: absolute; right: 11px; left: 11px; height: 1.5px; background: var(--ice);
  transition: transform .25s, top .25s;
}
.nav-toggle span:first-child { top: 16px; }
.nav-toggle span:last-child { top: 24px; }
.nav-open .nav-toggle span:first-child { top: 20px; transform: rotate(45deg); }
.nav-open .nav-toggle span:last-child { top: 20px; transform: rotate(-45deg); }

/* ==========================================================================
   هیرو
   ========================================================================== */
.hero { position: relative; isolation: isolate; min-height: 100vh; min-height: 100svh; overflow: hidden; }
.hero-grid {
  display: grid; grid-template-rows: 1fr auto;
  min-height: 100vh; min-height: 100svh;
  padding-top: calc(var(--header-h) + 24px); padding-bottom: 40px;
}
.hero-copy { align-self: center; max-width: 620px; }
.hero-title {
  font-weight: var(--w-thin);
  font-size: clamp(2.3rem, 5vw, 4.4rem);
  line-height: 1.38;
  color: var(--ice);
  margin-bottom: 28px;
}
.hero-lead { font-size: 1.05rem; color: var(--frost); max-width: 500px; margin-bottom: 36px; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 14px; }

.hero-stats { display: flex; flex-wrap: wrap; gap: 0; align-self: end; border-top: 1px solid var(--line); padding-top: 22px; max-width: 620px; }
.hero-stats > div { padding-inline-end: 44px; margin-inline-end: 44px; border-inline-end: 1px solid var(--line); }
.hero-stats > div:last-child { border-inline-end: 0; margin-inline-end: 0; padding-inline-end: 0; }
.hero-stats dd { font-size: 1.75rem; font-weight: var(--w-light); color: var(--ice); line-height: 1.3; order: -1; }
.hero-stats dt { font-size: .82rem; color: var(--frost); }
.hero-stats > div { display: flex; flex-direction: column; }

/* یک توالی ورود هنگام بارگذاری: ذرات جمع می‌شوند و عنوان با انحراف رنگی جا می‌افتد */
@keyframes settle {
  0%   { opacity: 0; filter: blur(12px); text-shadow: -12px 0 rgba(255, 70, 70, .7), 12px 0 rgba(70, 150, 255, .7); }
  55%  { opacity: 1; }
  100% { opacity: 1; filter: blur(0);   text-shadow: -.6px 0 rgba(255, 70, 70, .0), .6px 0 rgba(70, 150, 255, .0); }
}
@keyframes rise { from { opacity: 0; } to { opacity: 1; } }
.hero-title { animation: settle 1.9s cubic-bezier(.2, .7, .2, 1) .5s both; }
.hero-lead { animation: rise 1s ease 1.4s both; }
.hero-actions { animation: rise 1s ease 1.7s both; }
.hero-stats { animation: rise 1s ease 2s both; }

/* ==========================================================================
   نوار اطمینان
   ========================================================================== */
.assurance { border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); background: rgba(13, 18, 26, .6); }
.assurance .wrap { display: grid; grid-template-columns: repeat(4, 1fr); }
.assure-item {
  display: flex; align-items: center; gap: 16px; padding: 28px 20px;
  border-inline-start: 1px solid var(--line);
}
.assure-item:first-child { border-inline-start: 0; padding-inline-start: 0; }
.assure-item svg { width: 30px; height: 30px; color: var(--glacier); flex-shrink: 0; }
.assure-item strong { display: block; color: var(--ice); font-weight: 500; font-size: .95rem; }
.assure-item span { font-size: .8rem; color: var(--frost); }

/* ==========================================================================
   بخش‌ها
   ========================================================================== */
.section { padding: 112px 0; }
.section-head { margin-bottom: 44px; max-width: 640px; }
.section-head h2 { font-weight: var(--w-light); font-size: clamp(1.8rem, 3.4vw, 2.9rem); line-height: 1.4; margin-bottom: 14px; }
.section-head p { color: var(--frost); font-size: 1rem; }
.see-all { color: var(--ember); border-bottom: 1px solid rgba(232, 160, 76, .5); padding-bottom: 3px; }
.see-all:hover { border-bottom-color: var(--ember); }

/* ==========================================================================
   انتخاب خودرو
   ========================================================================== */
.finder-search { position: relative; max-width: 660px; margin-bottom: 36px; }
.finder-search input {
  width: 100%; height: 62px; padding: 0 56px 0 20px;
  font-family: var(--font); font-size: 1.05rem; color: var(--ice);
  background: rgba(230, 236, 245, .05);
  border: 1px solid var(--line-strong); border-radius: 3px;
  transition: border-color .2s, background-color .2s;
}
.finder-search input::placeholder { color: rgba(182, 186, 197, .55); }
.finder-search input:hover { border-color: rgba(182, 186, 197, .45); }
.finder-search input:focus { outline: none; border-color: var(--glacier); background: rgba(143, 178, 212, .07); }
.finder-search input::-webkit-search-cancel-button { filter: invert(.8); cursor: pointer; }
.search-ico { position: absolute; top: 21px; right: 20px; color: var(--frost); pointer-events: none; }

.search-results {
  position: absolute; z-index: 30; top: calc(100% + 6px); right: 0; left: 0;
  max-height: 380px; overflow-y: auto; padding: 6px;
  background: #0e141d; border: 1px solid var(--line-strong); border-radius: 3px;
  box-shadow: 0 28px 70px rgba(0, 0, 0, .65);
}
.search-results[hidden] { display: none; }
.search-results li {
  display: flex; align-items: baseline; justify-content: space-between; gap: 16px;
  padding: 11px 14px; border-radius: 2px; cursor: pointer;
}
.search-results li[aria-selected="true"], .search-results li:hover { background: rgba(143, 178, 212, .13); }
.r-main { color: var(--ice); font-weight: 500; }
.r-sub { color: var(--frost); font-size: .8rem; white-space: nowrap; }
.r-empty { cursor: default !important; color: var(--frost); }
.r-empty:hover { background: transparent !important; }

.finder-tabs { display: flex; gap: 36px; border-bottom: 1px solid var(--line); margin-bottom: 26px; }
.finder-tab {
  position: relative; padding: 14px 2px; background: none; border: 0; cursor: pointer;
  font-size: 1.05rem; font-weight: 400; color: var(--frost); transition: color .2s;
}
.finder-tab:hover { color: var(--ice); }
.finder-tab[aria-selected="true"] { color: var(--ice); }
.finder-tab[aria-selected="true"]::after {
  content: ""; position: absolute; right: 0; left: 0; bottom: -1px; height: 2px; background: var(--glacier);
}
.finder-tab .count { font-size: .8rem; color: rgba(182, 186, 197, .7); margin-inline-start: 6px; }

.region-bar { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 26px; }
.region-bar[hidden] { display: none; }

.chip {
  display: inline-flex; align-items: center; gap: 8px;
  min-height: 38px; padding: 0 16px; border-radius: 99px;
  font-family: var(--font); font-size: .9rem; color: var(--frost);
  background: transparent; border: 1px solid var(--line-strong); cursor: pointer;
  transition: border-color .2s, color .2s, background-color .2s;
}
.chip:hover { color: var(--ice); border-color: var(--frost); }
.chip[aria-pressed="true"] { color: var(--ice); border-color: var(--glacier); background: rgba(143, 178, 212, .14); }
.chip .dot { width: 6px; height: 6px; border-radius: 50%; background: var(--ember); box-shadow: 0 0 8px var(--ember); }

.brand-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(196px, 1fr)); gap: 14px; }
.car-card {
  display: flex; flex-direction: column; justify-content: space-between; gap: 14px;
  min-height: 150px; padding: 16px 18px 16px; text-align: start; cursor: pointer;
  color: inherit; font: inherit;
  transition: border-color .25s;
}
.car-card:hover { border-color: rgba(143, 178, 212, .6); }
.car-art, .car-photo { display: block; width: 100%; height: 64px; direction: ltr; }
.car-art { color: var(--frost); transition: color .25s; }
.car-card:hover .car-art { color: var(--ice); }
.car-photo { object-fit: contain; }
.brand-row { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; }
.brand-fa { font-size: 1.12rem; font-weight: 400; color: var(--ice); }
.brand-meta { font-size: .78rem; color: rgba(182, 186, 197, .7); }
.brand-stock {
  position: absolute; top: 14px; left: 14px; display: inline-flex; align-items: center; gap: 7px;
  font-size: .74rem; color: var(--ember);
}
.brand-stock::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--ember); box-shadow: 0 0 9px var(--ember); }

.catalog-index { margin-top: 64px; border-top: 1px solid var(--line); padding-top: 22px; }
.catalog-index summary { cursor: pointer; color: var(--frost); font-size: .95rem; }
.catalog-index summary:hover { color: var(--ice); }
.catalog-index h3 { font-size: 1rem; font-weight: 500; margin: 26px 0 10px; }
.catalog-brands li { padding: 8px 0; border-bottom: 1px solid var(--line); font-size: .88rem; }
.catalog-brands strong { color: var(--ice); font-weight: 500; margin-inline-end: 8px; }
.noscript-note { color: var(--ember); margin: 12px 0; }

/* ---------- ورقه‌ی جزئیات خودرو ---------- */
dialog.sheet {
  border: 0; padding: 0; margin: auto; background: transparent; color: var(--ice);
  width: min(1180px, calc(100vw - 24px)); max-height: min(92vh, 900px); overflow: visible;
}
dialog.sheet::backdrop { background: rgba(5, 7, 11, .78); -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px); }
.sheet-inner::before { opacity: .04; }
.sheet-inner { display: flex; flex-direction: column; max-height: min(92vh, 900px); background-color: #0c111a; }
.sheet-head {
  display: flex; align-items: flex-start; justify-content: space-between; gap: 20px;
  padding: 28px 32px 22px; border-bottom: 1px solid var(--line);
}
.sheet-head h3 { font-size: clamp(1.9rem, 4vw, 2.7rem); font-weight: var(--w-thin); line-height: 1.25; color: var(--ice); }
.sheet-meta { font-size: .85rem; color: rgba(182, 186, 197, .75); margin-top: 4px; }
.sheet-close {
  width: 42px; height: 42px; flex-shrink: 0; display: inline-flex; align-items: center; justify-content: center;
  border: 1px solid var(--line-strong); border-radius: 3px; background: transparent; color: var(--ice); cursor: pointer;
  transition: border-color .2s;
}
.sheet-close:hover { border-color: var(--frost); }
.sheet-body { padding: 26px 32px 34px; overflow-y: auto; }
.sheet-body h4 { font-size: .92rem; font-weight: 500; color: var(--frost); margin-bottom: 12px; }
.sheet-block + .sheet-block { margin-top: 26px; }
/* ---------- صفحه‌ی خودرو: انتخاب‌ها + ماشین سه‌بعدی ---------- */
.sheet-cols { display: grid; grid-template-columns: minmax(0, 1fr); gap: 26px; }
.stage {
  position: relative; height: 340px; overflow: hidden; border-radius: 4px;
  border: 1px solid var(--line);
  background:
    radial-gradient(70% 60% at 50% 55%, rgba(143, 178, 212, .09), transparent 70%),
    rgba(5, 8, 12, .55);
}
.stage-canvas { position: absolute; inset: 0; width: 100%; height: 100%; display: block; cursor: grab; touch-action: pan-y; }
.stage-canvas:active { cursor: grabbing; }
.stage-modes { position: absolute; bottom: 14px; left: 50%; transform: translateX(-50%); display: flex; gap: 8px; }
.stage-modes .chip { min-height: 34px; white-space: nowrap; padding: 0 14px; background: rgba(8, 11, 16, .72); -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px); }
.stage-tag {
  position: absolute; top: 0; left: 0; z-index: 2; pointer-events: none; opacity: 0;
  margin-top: -26px; padding: 0 12px 4px; font-size: .86rem; font-weight: 500; color: var(--ember); white-space: nowrap;
  border-bottom: 1px solid var(--ember); will-change: transform, opacity;
}
.stage-tag::before {
  content: ""; position: absolute; left: 0; bottom: -1px; width: 48px; height: 1px; background: var(--ember);
  transform-origin: left bottom; transform: rotate(135deg); box-shadow: 0 0 8px var(--ember);
}
@media (min-width: 1000px) {
  .sheet-cols { grid-template-columns: minmax(340px, 430px) minmax(0, 1fr); gap: 32px; align-items: start; }
  .stage { position: sticky; top: 0; height: min(560px, 68vh); }
}
.chip-list { display: flex; flex-wrap: wrap; gap: 8px; }
.sheet-hint { font-size: .82rem; color: rgba(182, 186, 197, .7); margin-top: 10px; }

.inquiry {
  margin-top: 28px; padding: 24px; border-radius: 3px;
  border: 1px solid rgba(232, 160, 76, .38); background: rgba(232, 160, 76, .055);
}
.inq-label { font-size: .82rem; color: var(--frost); }
.inq-name { display: flex; flex-wrap: wrap; align-items: center; gap: 14px; margin: 2px 0 14px; }
.inq-name strong { font-size: 1.3rem; font-weight: 400; color: var(--ice); }
.inq-flag { display: inline-flex; align-items: center; gap: 7px; font-size: .8rem; color: var(--ember); }
.inq-flag::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--ember); box-shadow: 0 0 9px var(--ember); }
.inq-note { font-size: .86rem; color: var(--frost); margin-bottom: 18px; max-width: 560px; }
.inq-actions { display: flex; flex-wrap: wrap; gap: 10px; }

/* ==========================================================================
   موجود در انبار
   ========================================================================== */
.stock-list { border-top: 1px solid var(--line); }
.stock-row {
  display: grid; grid-template-columns: 140px 1fr 130px 90px auto; align-items: center; gap: 24px;
  padding: 22px 6px; border-bottom: 1px solid var(--line); transition: background-color .25s;
}
.stock-row:hover { background: rgba(182, 186, 197, .035); }
.stock-code { direction: ltr; text-align: right; font-size: .85rem; letter-spacing: .08em; color: var(--frost); }
.stock-info strong { display: block; color: var(--ice); font-weight: 500; font-size: 1rem; }
.stock-info span { font-size: .86rem; color: var(--frost); }
.stock-brand { direction: ltr; text-align: right; font-size: .8rem; color: rgba(182, 186, 197, .75); }
.stock-flag { display: inline-flex; align-items: center; gap: 8px; font-size: .85rem; color: var(--ember); }
.stock-flag::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--ember); box-shadow: 0 0 9px var(--ember); }
.stock-more { margin-top: 32px; }

/* ==========================================================================
   چرا فضلی یدک
   ========================================================================== */
.why-grid { display: grid; grid-template-columns: 1fr 1.5fr; gap: 72px; align-items: start; }
.why-grid .section-head { position: sticky; top: calc(var(--header-h) + 32px); margin-bottom: 0; }
.why-item { padding: 34px 0; border-top: 1px solid var(--line); }
.why-item:last-child { border-bottom: 1px solid var(--line); }
.why-item h4 { font-size: 1.2rem; font-weight: 500; margin-bottom: 8px; }
.why-item p { max-width: 520px; color: var(--frost); }

/* ==========================================================================
   تماس
   ========================================================================== */
.contact-band { padding-top: 0; }
.contact-slab {
  display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 32px;
  padding: 60px 56px;
}
.contact-slab h3 { font-weight: var(--w-light); font-size: clamp(1.6rem, 3vw, 2.4rem); margin-bottom: 8px; }
.contact-slab p { max-width: 460px; color: var(--frost); }

/* ==========================================================================
   فوتر
   ========================================================================== */
.site-footer { margin-top: 24px; padding-top: 96px; border-top: 1px solid var(--line); background: rgba(5, 7, 11, .55); }
.footer-call p { font-size: .95rem; color: var(--frost); }
.footer-phone {
  display: block; text-align: right; margin: 6px 0 80px;
  font-size: clamp(2.4rem, 7.5vw, 6rem); font-weight: var(--w-thin); line-height: 1.15; color: var(--ice);
  letter-spacing: .01em; transition: color .25s;
}
.footer-phone:hover { color: var(--ember); }
.footer-grid { display: grid; grid-template-columns: 1.6fr 1fr 1fr 1.2fr; gap: 40px; padding-bottom: 56px; border-bottom: 1px solid var(--line); }
.footer-grid h5 { font-size: .95rem; font-weight: 500; margin-bottom: 18px; }
.footer-grid li { margin-bottom: 10px; font-size: .9rem; }
.footer-grid li a:hover { color: var(--ice); }
.footer-brand p { font-size: .9rem; max-width: 300px; margin-top: 16px; }
.foot-logo { display: flex; align-items: center; gap: 12px; }
.foot-logo .logo-mark, .foot-logo .custom-logo { width: 38px; height: 38px; }
.foot-logo span { color: var(--ice); font-weight: 600; font-size: 1.1rem; }
.bottom-bar { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 10px; padding: 24px 0; font-size: .8rem; color: rgba(182, 186, 197, .6); }

/* ==========================================================================
   صفحات داخلی
   ========================================================================== */
.page-body { padding-top: calc(var(--header-h) + 72px); min-height: 70vh; }
.entry-title { font-weight: var(--w-light); font-size: clamp(1.9rem, 4vw, 2.9rem); margin-bottom: 28px; }
.entry-cat { font-size: .85rem; color: var(--glacier); margin-bottom: 6px; }
.entry-thumb { border-radius: 4px; overflow: hidden; margin-bottom: 28px; border: 1px solid var(--line); }
.entry-content { font-size: 1.02rem; line-height: 2; }
.entry-content > * + * { margin-top: 1.2em; }
.entry-content h2, .entry-content h3 { margin-top: 1.8em; font-weight: 400; }
.entry-content a { color: var(--glacier); border-bottom: 1px solid rgba(143, 178, 212, .4); }
.entry-content ul { list-style: disc; padding-inline-start: 1.4em; }
.entry-content ol { padding-inline-start: 1.4em; }
.entry-summary { padding-bottom: 36px; margin-bottom: 36px; border-bottom: 1px solid var(--line); }
.entry-summary h2 { font-weight: 400; font-size: 1.5rem; margin-bottom: 8px; }
.entry-summary h2 a:hover { color: var(--glacier); }
.navigation.pagination { margin-top: 24px; }
.navigation.pagination .nav-links { display: flex; gap: 8px; flex-wrap: wrap; }
.navigation.pagination .page-numbers { padding: 6px 14px; border: 1px solid var(--line-strong); border-radius: 3px; }
.navigation.pagination .page-numbers.current { border-color: var(--glacier); color: var(--ice); }

/* ==========================================================================
   ووکامرس
   ========================================================================== */
.woocommerce ul.products li.product,
.woocommerce-page ul.products li.product {
  background: rgba(13, 18, 26, .6) !important;
  border: 1px solid var(--line) !important;
  border-radius: 4px !important;
  padding: 0 0 18px !important; overflow: hidden;
}
.woocommerce ul.products li.product .price { display: none !important; }
.woocommerce ul.products li.product .woocommerce-loop-product__title { color: var(--ice); padding: 12px 16px 0 !important; }
.woocommerce a.button, .woocommerce button.button {
  background: rgba(232, 160, 76, .06) !important; color: var(--ember) !important;
  border: 1px solid rgba(232, 160, 76, .6) !important; border-radius: 3px !important; font-weight: 500 !important;
}
.woocommerce a.button:hover, .woocommerce button.button:hover { background: var(--ember) !important; color: var(--abyss) !important; }

/* ==========================================================================
   واکنش‌گرا
   ========================================================================== */
@media (max-width: 1100px) {
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .stock-row { grid-template-columns: 120px 1fr 100px auto; }
  .stock-brand { display: none; }
}
@media (max-width: 980px) {
  .hero-copy { align-self: end; padding-top: 340px; }
  .hero-title { font-size: clamp(2rem, 7.4vw, 3.2rem); }
  .why-grid { grid-template-columns: 1fr; gap: 24px; }
  .why-grid .section-head { position: static; }
  .assurance .wrap { grid-template-columns: repeat(2, 1fr); }
  .assure-item { border-inline-start: 0; padding: 22px 0; border-bottom: 1px solid var(--line); }
  .assure-item:nth-last-child(-n+2) { border-bottom: 0; }
}
@media (min-width: 721px) and (max-width: 980px) {
  .hero-copy { padding-top: 470px; }
}
@media (max-width: 900px) {
  .nav-toggle { display: inline-block; }
  .primary {
    position: fixed; top: var(--header-h); right: 0; left: 0; margin: 0;
    flex-direction: column; align-items: stretch; gap: 0; padding: 8px 24px 24px;
    background: rgba(8, 11, 16, .97); border-bottom: 1px solid var(--line);
    opacity: 0; pointer-events: none; transform: translateY(-8px); transition: opacity .25s, transform .25s;
  }
  .primary ul { flex-direction: column; }
  .primary a { display: block; padding: 14px 4px; border-bottom: 1px solid var(--line); border-radius: 0; font-size: 1rem; }
  .nav-open .primary { opacity: 1; pointer-events: auto; transform: none; }
}
@media (max-width: 720px) {
  .section { padding: 80px 0; }
  .wrap { padding: 0 20px; }
  .stock-row { grid-template-columns: 1fr auto; gap: 8px 16px; }
  .stock-code { grid-column: 1 / -1; text-align: start; }
  .stock-info { grid-column: 1 / 2; }
  .stock-flag { grid-column: 2 / 3; grid-row: 2; }
  .stock-row .btn { grid-column: 1 / -1; }
  .contact-slab { padding: 40px 28px; }
  .hero-stats > div { padding-inline-end: 22px; margin-inline-end: 22px; }
  .hero-stats dd { font-size: 1.35rem; }
}
@media (max-width: 640px) {
  dialog.sheet { width: 100vw; max-width: 100vw; margin: auto 0 0; max-height: 92vh; }
  .sheet-inner { max-height: 92vh; border-radius: 10px 10px 0 0; }
  .sheet-head { padding: 22px 20px 18px; }
  .sheet-body { padding: 20px 20px 28px; }
}
@media (max-width: 560px) {
  .brand-tag { display: none; }
  .car-art, .car-photo { height: 52px; }
  .stage { height: 300px; }
  .header-phone { padding: 0 12px; font-size: .88rem; }
  .brand-grid { grid-template-columns: repeat(2, 1fr); gap: 10px; }
  .car-card { padding: 12px 12px 14px; min-height: 124px; }
    .assurance .wrap { grid-template-columns: 1fr; }
  .assure-item:nth-last-child(-n+2) { border-bottom: 1px solid var(--line); }
  .assure-item:last-child { border-bottom: 0; }
  .footer-grid { grid-template-columns: 1fr; }
  .finder-tabs { gap: 22px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .hero-title, .hero-lead, .hero-actions, .hero-stats { opacity: 1; filter: none; }
}


/* ==========================================================================
   4.1 — خودرو واقعی + چت هوش مصنوعی
   ========================================================================== */

.ai-chat-launcher{position:fixed;left:24px;bottom:24px;z-index:160;width:62px;height:62px;border:1px solid rgba(232,160,76,.55);border-radius:50%;background:linear-gradient(145deg,#18202b,#0d121a);box-shadow:0 16px 40px rgba(0,0,0,.4),0 0 28px rgba(232,160,76,.12);color:var(--ember);cursor:pointer;display:flex;align-items:center;justify-content:center;transition:transform .2s,box-shadow .2s}
.ai-chat-launcher:hover{transform:translateY(-3px);box-shadow:0 20px 48px rgba(0,0,0,.48),0 0 34px rgba(232,160,76,.2)}
.ai-chat-launcher span{position:absolute;right:-4px;top:-5px;background:var(--ember);color:#10141b;font-size:10px;font-weight:800;padding:2px 6px;border-radius:999px}
.ai-chat-panel{position:fixed;left:24px;bottom:98px;z-index:159;width:min(390px,calc(100vw - 32px));height:min(600px,calc(100vh - 125px));display:none;flex-direction:column;border:1px solid rgba(182,186,197,.2);border-radius:18px;background:rgba(9,13,19,.96);box-shadow:0 28px 90px rgba(0,0,0,.55);overflow:hidden;backdrop-filter:blur(18px)}
.ai-chat-panel.is-open{display:flex}
.ai-chat-head{display:flex;align-items:center;justify-content:space-between;padding:16px 18px;border-bottom:1px solid var(--line);background:linear-gradient(135deg,rgba(232,160,76,.12),rgba(143,178,212,.04))}
.ai-chat-title{display:flex;align-items:center;gap:10px}.ai-chat-orb{width:36px;height:36px;border-radius:50%;display:grid;place-items:center;background:radial-gradient(circle at 35% 30%,#ffe1ad,#b9772c 60%,#6b431d);color:#10141b;font-weight:800}
.ai-chat-title strong{display:block;color:var(--ice);font-size:14px}.ai-chat-title small{display:block;color:#8e96a5;font-size:11px}
.ai-chat-close{background:none;border:0;color:#aeb5c0;cursor:pointer;font-size:22px}
.ai-chat-messages{flex:1;overflow:auto;padding:16px;display:flex;flex-direction:column;gap:10px}
.ai-msg{max-width:88%;padding:10px 13px;border-radius:14px;font-size:13px;line-height:1.9;white-space:pre-wrap}
.ai-msg.bot{align-self:flex-start;background:#151c26;border:1px solid rgba(182,186,197,.1);color:#d7dbe2;border-bottom-right-radius:5px}
.ai-msg.user{align-self:flex-end;background:rgba(232,160,76,.16);border:1px solid rgba(232,160,76,.18);color:#f3e7d5;border-bottom-left-radius:5px}
.ai-chat-form{display:flex;gap:8px;padding:12px;border-top:1px solid var(--line)}
.ai-chat-input{flex:1;min-width:0;resize:none;min-height:44px;max-height:100px;border:1px solid rgba(182,186,197,.18);border-radius:12px;background:#111721;color:var(--ice);padding:10px 12px;font-family:var(--font);font-size:13px;outline:none}
.ai-chat-input:focus{border-color:rgba(232,160,76,.55)}
.ai-chat-send{width:48px;border:0;border-radius:12px;background:var(--ember);color:#15100a;font-weight:800;cursor:pointer}
.ai-chat-send:disabled{opacity:.45;cursor:wait}
.ai-chat-note{text-align:center;font-size:10px;color:#626b79;padding:0 12px 10px}
@media(max-width:600px){.ai-chat-launcher{left:16px;bottom:16px}.ai-chat-panel{left:16px;bottom:88px}}

/* ---------- عکس مرجع خودرو (Wikimedia Commons) کنار ماشین سه‌بعدی ---------- */
.car-photo { position: absolute; top: 12px; right: 12px; z-index: 3; width: min(36%, 210px); margin: 0; overflow: hidden;
  border: 1px solid var(--line-strong); border-radius: 3px; background: rgba(8, 11, 16, .82);
  -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px);
  opacity: 0; transform: translateY(-6px); transition: opacity .4s, transform .4s; }
.car-photo.is-visible { opacity: 1; transform: none; }
.car-photo[hidden] { display: none; }
.car-photo img { display: block; width: 100%; aspect-ratio: 16 / 10; object-fit: cover; }
.car-photo figcaption { padding: 5px 8px; font-size: 10px; line-height: 1.6; color: rgba(182, 186, 197, .75); }
.car-photo figcaption a { color: inherit; text-decoration: underline; text-decoration-color: rgba(182, 186, 197, .4); }

/* ---------- دستیار هوشمند: دکمه‌های عملی و پاسخ‌های سریع ---------- */
.ai-chat-launcher span { font-size: 10px; letter-spacing: 0; padding: 2px 8px; right: -8px; }
.ai-actions { align-self: flex-start; display: flex; flex-direction: column; gap: 6px; max-width: 92%; margin-top: -2px; }
.ai-act { display: block; text-align: center; padding: 9px 14px; border-radius: 10px; font-family: var(--font); font-size: 12.5px; line-height: 1.6;
  color: var(--ice); background: rgba(143, 178, 212, .12); border: 1px solid rgba(143, 178, 212, .35); cursor: pointer; transition: background-color .2s, border-color .2s; }
.ai-act:hover { background: rgba(143, 178, 212, .22); border-color: var(--glacier); }
.ai-act.is-heat { color: var(--ember); background: rgba(232, 160, 76, .08); border-color: rgba(232, 160, 76, .5); }
.ai-act.is-heat:hover { background: var(--ember); color: #15100a; }
.ai-chips { align-self: flex-start; display: flex; flex-wrap: wrap; gap: 6px; max-width: 96%; }
.ai-chip { padding: 6px 12px; border-radius: 99px; font-family: var(--font); font-size: 12px; color: var(--frost);
  background: transparent; border: 1px solid var(--line-strong); cursor: pointer; transition: color .2s, border-color .2s; }
.ai-chip:hover { color: var(--ice); border-color: var(--frost); }
.ai-typing { color: var(--frost); letter-spacing: 2px; }

/* ---------- فونت: سازگاری و جلوگیری از به‌هم‌ریختگی ---------- */
/* بی‌یکان وزن سبک ندارد؛ عنوان‌های نازک با وزن معمولی نمایش داده می‌شوند و اندازه کمی بزرگ‌تر می‌شود */
body.font-byekan { --w-thin: 400; --w-light: 400; font-size: 17px; }
body.font-byekan .hero-title { line-height: 1.5; }
body { overflow-wrap: break-word; }
.wrap > *, .sheet-cols > *, .brand-grid > *, .footer-grid > * { min-width: 0; }

/* ---------- صحنه‌ی سه‌بعدی سراسری ---------- */
.scene-canvas { position: fixed; top: 0; right: 0; left: 0; bottom: 0; width: 100%; height: 100%; z-index: -1; pointer-events: none; display: block; }

/* ---------- کارت‌های برند: کج‌شدن سه‌بعدی + درخشش نور ---------- */
.car-card {
  transform: perspective(800px) rotateX(var(--rx, 0deg)) rotateY(var(--ry, 0deg));
  transition: transform .18s ease-out, border-color .25s; will-change: transform;
}
.car-card::after { background: radial-gradient(240px circle at var(--mx, 50%) var(--my, 0%), rgba(255, 255, 255, .13), transparent 62%); }

@media (max-width: 720px) { .hero-grid { padding-bottom: 104px; } }
