/* =============================================================================
   آقای بدنه — Design System (shop.css)
   Direction: «کاتالوگ قطعات» — technical catalogue aesthetic.
   Loaded AFTER each page's inline <style>, so it re-skins the shared vocabulary
   (header, footer, cards, tables, forms…) without touching page markup.
   Tokens are prefixed --sh- ; legacy tokens are re-mapped so page-specific
   rules inherit the new palette automatically.
   ========================================================================== */

@font-face {
    font-family: "Vazirmatn";
    src: url("/assets/fonts/Vazirmatn-Regular.woff2") format("woff2");
    font-weight: 400 600;
    font-style: normal;
    font-display: swap;
}
@font-face {
    font-family: "Vazirmatn";
    src: url("/assets/fonts/Vazirmatn-Bold.woff2") format("woff2");
    font-weight: 700 900;
    font-style: normal;
    font-display: swap;
}

:root {
    /* ---- legacy token remap (page CSS keeps working, new colours) ---- */
    --bg-gradient-start: #eef2f6;
    --bg-gradient-end: #ffffff;
    --glass-bg: rgba(255, 255, 255, 0.92);
    --glass-border: #e2e8ef;
    --glass-shadow: 0 1px 2px rgba(13, 19, 25, 0.06);
    --glass-blur: blur(16px);
    --text-primary: #0d1319;
    --text-secondary: #55616e;
    --text-tertiary: #8b97a4;
    --accent: #16407a;
    --accent-hover: #0e2a52;
    --accent-glass: rgba(22, 64, 122, 0.09);
    --radius-card: 10px;
    --radius-pill: 8px;
    --transition: all 0.18s ease;
    --header-height: 64px;
    --safe-bottom: env(safe-area-inset-bottom, 0px);

    /* ---- new system ---- */
    --sh-ink: #0d1319;
    --sh-steel: #131a22;
    --sh-paper: #f2f5f8;
    --sh-surface: #ffffff;
    --sh-line: #e2e8ef;
    --sh-line-strong: #cfd8e2;
    --sh-muted: #66727f;
    --sh-brand: #16407a;
    --sh-brand-dark: #0d2a52;
    --sh-brand-soft: #e8eef7;
    --sh-signal: #c2410c;
    --sh-signal-soft: #fdf0e9;
    --sh-ok: #0f6b52;
    --sh-ok-soft: #e7f4ef;
    --sh-warn: #8a5a00;
    --sh-warn-soft: #fdf4e3;
    --sh-r-sm: 6px;
    --sh-r: 10px;
    --sh-r-lg: 14px;
    --sh-shadow-1: 0 1px 2px rgba(13, 19, 25, 0.05);
    --sh-shadow-2: 0 10px 30px -12px rgba(13, 19, 25, 0.22);
    --sh-mono: ui-monospace, "SF Mono", "Cascadia Mono", Consolas, "Liberation Mono", monospace;
    --sh-max: 1180px;
    --sh-ease: cubic-bezier(0.22, 0.61, 0.36, 1);
}

/* ============================== base ==================================== */
* { margin: 0; padding: 0; box-sizing: border-box; }

html {
    scroll-behavior: smooth;
    -webkit-text-size-adjust: 100%;
}

body {
    font-family: "Vazirmatn", "Segoe UI", Tahoma, sans-serif;
    background: var(--sh-paper);
    color: var(--sh-ink);
    line-height: 1.75;
    font-size: 15px;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    overflow-x: hidden;
    font-feature-settings: "ss01" 1;
}

img, svg { max-width: 100%; }
img { display: block; }

a { color: var(--sh-brand); text-decoration: none; transition: color 0.15s ease; }
a:hover { color: var(--sh-brand-dark); }

h1, h2, h3, h4 { line-height: 1.45; font-weight: 800; letter-spacing: 0; }
h1 span, h2 span, .hero-title span, .section-title span { color: var(--sh-signal); }

:focus-visible {
    outline: 2px solid var(--sh-brand);
    outline-offset: 2px;
    border-radius: 4px;
}

::selection { background: var(--sh-brand); color: #fff; }

.container {
    width: 100%;
    max-width: var(--sh-max);
    margin-inline: auto;
    padding-inline: 16px;
    padding-block: 22px 40px;
    flex: 1;
}

main { flex: 1; }

/* H1/H2 داخل هیروهای صفحات */
.page-hero {
    width: 100%;
    max-width: var(--sh-max);
    margin: 22px auto 0;
    padding: 0 16px;
    text-align: start;
    background: transparent;
    border: 0;
    border-radius: 0;
    box-shadow: none;
}
.page-hero .tag {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 11.5px;
    font-weight: 700;
    color: var(--sh-brand);
    background: var(--sh-brand-soft);
    border: 1px solid #d7e2f1;
    border-radius: var(--sh-r-sm);
    padding: 4px 9px;
    margin-bottom: 10px;
}
.page-hero h1 { font-size: clamp(21px, 4.6vw, 30px); color: var(--sh-ink); }

/* ============================== header ================================== */
header {
    position: sticky;
    top: 0;
    z-index: 90;
    height: var(--header-height);
    padding: 0;
    background: rgba(255, 255, 255, 0.94);
    backdrop-filter: saturate(180%) blur(16px);
    -webkit-backdrop-filter: saturate(180%) blur(16px);
    border-bottom: 1px solid var(--sh-line);
    display: block;
    box-shadow: none;
}

.sh-head-inner {
    max-width: var(--sh-max);
    height: 100%;
    margin-inline: auto;
    padding-inline: 16px;
    display: flex;
    align-items: center;
    gap: 18px;
}

/* logo */
.logo { display: inline-flex; align-items: center; gap: 9px; flex-shrink: 0; }
.logo-icon {
    width: 34px; height: 34px;
    border-radius: 8px;
    background: var(--sh-brand);
    display: grid; place-items: center;
    box-shadow: inset 0 -1px 0 rgba(0, 0, 0, 0.18);
}
.logo-icon svg { width: 19px; height: 19px; stroke: #fff; fill: none; }
.logo-text {
    font-size: 17px;
    font-weight: 800;
    color: var(--sh-ink);
    letter-spacing: 0;
    white-space: nowrap;
}
.logo-text span { color: var(--sh-brand); }

/* desktop nav */
#mainNav {
    display: flex;
    align-items: center;
    gap: 2px;
    margin-inline-start: 8px;
}
#mainNav a {
    position: relative;
    font-size: 13.5px;
    font-weight: 600;
    color: var(--sh-muted);
    padding: 8px 11px;
    border-radius: var(--sh-r-sm);
    white-space: nowrap;
}
#mainNav a:hover { color: var(--sh-ink); background: #f3f6f9; }
#mainNav a.active { color: var(--sh-brand); background: var(--sh-brand-soft); }

/* header actions */
.header-actions {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-inline-start: auto;
}
.btn-login {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    height: 36px;
    padding: 0 12px;
    font-size: 13px;
    font-weight: 700;
    color: var(--sh-ink);
    border: 1px solid var(--sh-line-strong);
    border-radius: var(--sh-r-sm);
    background: #fff;
}
.btn-login:hover { border-color: var(--sh-brand); color: var(--sh-brand); }

.header-cta {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    height: 36px;
    padding: 0 14px;
    font-size: 13px;
    font-weight: 700;
    color: #fff;
    background: var(--sh-brand);
    border-radius: var(--sh-r-sm);
    border: 1px solid var(--sh-brand);
}
.header-cta:hover { background: var(--sh-brand-dark); color: #fff; }

/* header search */
.sh-search {
    position: relative;
    flex: 1;
    max-width: 320px;
}
.sh-search input {
    width: 100%;
    height: 38px;
    padding: 0 38px 0 12px;
    font-family: inherit;
    font-size: 13px;
    color: var(--sh-ink);
    background: #f4f7fa;
    border: 1px solid var(--sh-line);
    border-radius: var(--sh-r-sm);
    transition: border-color 0.15s ease, background 0.15s ease;
}
.sh-search input::placeholder { color: var(--sh-tertiary, #96a2b0); }
.sh-search input:focus {
    outline: none;
    background: #fff;
    border-color: var(--sh-brand);
    box-shadow: 0 0 0 3px var(--sh-brand-soft);
}
.sh-search .sh-search-ico {
    position: absolute;
    inset-inline-start: 11px;
    top: 50%;
    transform: translateY(-50%);
    width: 16px; height: 16px;
    color: var(--sh-muted);
    pointer-events: none;
}
.sh-suggest {
    position: absolute;
    top: calc(100% + 6px);
    inset-inline: 0;
    background: #fff;
    border: 1px solid var(--sh-line);
    border-radius: var(--sh-r);
    box-shadow: var(--sh-shadow-2);
    padding: 6px;
    display: none;
    z-index: 120;
    max-height: 60vh;
    overflow: auto;
}
.sh-suggest.open { display: block; }
.sh-suggest a {
    display: flex;
    align-items: center;
    gap: 9px;
    padding: 7px 8px;
    border-radius: var(--sh-r-sm);
    color: var(--sh-ink);
    font-size: 13px;
}
.sh-suggest a:hover, .sh-suggest a.is-active { background: #f3f6f9; }
.sh-suggest img { width: 34px; height: 34px; border-radius: 5px; background: #f5f8fa; object-fit: contain; }
.sh-suggest small { display: block; color: var(--sh-muted); font-size: 11px; }
.sh-suggest .sh-suggest-empty { padding: 12px; font-size: 12.5px; color: var(--sh-muted); }

/* user menu */
.user-menu { position: relative; }
.user-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    height: 36px;
    padding: 0 8px 0 4px;
    border: 1px solid var(--sh-line-strong);
    border-radius: var(--sh-r-sm);
    background: #fff;
    cursor: pointer;
}
.user-avatar {
    width: 26px; height: 26px;
    border-radius: 6px;
    background: var(--sh-brand-soft);
    color: var(--sh-brand);
    font-weight: 800;
    font-size: 12.5px;
    display: grid; place-items: center;
}
.user-name { font-size: 12.5px; font-weight: 700; color: var(--sh-ink); max-width: 90px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dropdown-menu {
    position: absolute;
    top: calc(100% + 8px);
    inset-inline-end: 0;
    min-width: 190px;
    background: #fff;
    border: 1px solid var(--sh-line);
    border-radius: var(--sh-r);
    box-shadow: var(--sh-shadow-2);
    padding: 6px;
    display: none;
    z-index: 120;
}
.dropdown-menu.show { display: block; }
.dropdown-menu a {
    display: flex;
    align-items: center;
    gap: 9px;
    padding: 9px 10px;
    border-radius: var(--sh-r-sm);
    font-size: 13px;
    font-weight: 600;
    color: var(--sh-ink);
}
.dropdown-menu a:hover { background: #f3f6f9; }
.dropdown-menu svg { width: 15px; height: 15px; color: var(--sh-muted); flex-shrink: 0; }

/* cart chip */
.sh-cart {
    position: relative;
    display: inline-grid;
    place-items: center;
    width: 36px; height: 36px;
    border: 1px solid var(--sh-line-strong);
    border-radius: var(--sh-r-sm);
    color: var(--sh-ink);
    background: #fff;
}
.sh-cart svg { width: 17px; height: 17px; }
.sh-cart:hover { border-color: var(--sh-brand); color: var(--sh-brand); }
.sh-cart .sh-cart-count {
    position: absolute;
    top: -6px; inset-inline-start: -6px;
    min-width: 17px; height: 17px;
    padding: 0 4px;
    border-radius: 9px;
    background: var(--sh-signal);
    color: #fff;
    font-size: 10.5px;
    font-weight: 800;
    line-height: 17px;
    text-align: center;
}

/* burger */
.menu-toggle {
    display: none;
    width: 38px; height: 38px;
    border: 1px solid var(--sh-line-strong);
    border-radius: var(--sh-r-sm);
    background: #fff;
    color: var(--sh-ink);
    place-items: center;
    cursor: pointer;
}
.menu-toggle svg { width: 19px; height: 19px; }

/* announcement */
.announcement-bar {
    font-size: 12.5px;
    font-weight: 600;
    text-align: center;
    padding: 8px 14px;
    line-height: 1.75;
    border-bottom: 1px solid rgba(0, 0, 0, 0.06);
}
.announcement-bar.personal { border-bottom: 2px solid currentColor; }

/* ============================== buttons ================================= */
.btn-primary, .btn-outline, .btn-ghost, .action-btn, .btn-add-to-cart {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    height: 42px;
    padding: 0 18px;
    font-family: inherit;
    font-size: 13.5px;
    font-weight: 700;
    border-radius: var(--sh-r-sm);
    border: 1px solid transparent;
    cursor: pointer;
    transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease, transform 0.15s ease;
    white-space: nowrap;
}
.btn-primary, .btn-add-to-cart {
    background: var(--sh-brand);
    color: #fff;
    border-color: var(--sh-brand);
}
.btn-primary:hover, .btn-add-to-cart:hover { background: var(--sh-brand-dark); border-color: var(--sh-brand-dark); color: #fff; }
.btn-outline {
    background: #fff;
    color: var(--sh-ink);
    border-color: var(--sh-line-strong);
}
.btn-outline:hover { border-color: var(--sh-brand); color: var(--sh-brand); background: #fff; }
.btn-primary svg, .btn-outline svg, .btn-add-to-cart svg, .action-btn svg { width: 15px; height: 15px; flex-shrink: 0; }
.btn-block { width: 100%; }

/* ============================== badges ================================== */
.badge {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    height: 22px;
    padding: 0 8px;
    font-size: 11px;
    font-weight: 700;
    border-radius: 5px;
    border: 1px solid transparent;
    background: var(--sh-ok-soft);
    color: var(--sh-ok);
    white-space: nowrap;
}
.badge::before {
    content: "";
    width: 5px; height: 5px;
    border-radius: 50%;
    background: currentColor;
}
.badge.badge-out, .badge.badge-unavailable {
    background: #f1f4f7;
    color: #6b7684;
    border-color: #e4e9ee;
}
.badge.badge-presale { background: var(--sh-warn-soft); color: var(--sh-warn); border-color: #f3e4c6; }
.badge.badge-available { background: var(--sh-ok-soft); color: var(--sh-ok); }

/* ============================== hero (index) ============================= */
.hero {
    position: relative;
    width: 100%;
    max-width: var(--sh-max);
    min-height: 0;
    margin: 16px auto 0;
    padding: 27px 30px 20px;
    border-radius: var(--sh-r-lg);
    border: 1px solid #e4eaf3;
    background:
        radial-gradient(118% 132% at 97% -22%, #dde8f9 0%, rgba(221, 232, 249, 0) 62%),
        linear-gradient(180deg, #f8fafd 0%, #ffffff 70%);
    box-shadow: 0 22px 60px -46px rgba(16, 42, 76, 0.5);
    color: var(--sh-ink);
    display: grid;
    grid-template-columns: minmax(0, 1.06fr) minmax(0, 0.94fr);
    gap: 12px 28px;
    align-items: center;
    overflow: hidden;
    isolation: isolate;
}
/* بافت نقطه‌ای ملایم */
.hero::before {
    content: "";
    position: absolute;
    inset: 0;
    background-image: radial-gradient(rgba(23, 62, 115, 0.11) 1px, transparent 1px);
    background-size: 22px 22px;
    mask-image: radial-gradient(64% 92% at 10% 6%, #000 8%, transparent 78%);
    -webkit-mask-image: radial-gradient(64% 92% at 10% 6%, #000 8%, transparent 78%);
    pointer-events: none;
    z-index: -1;
}
.hero-blob { display: none; }
.hero-content { position: relative; z-index: 2; }
.hero-label {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    font-size: 11.5px;
    font-weight: 700;
    color: var(--sh-brand);
    background: #fff;
    border: 1px solid #dbe5f2;
    border-radius: 999px;
    padding: 5px 12px;
    margin-bottom: 13px;
    box-shadow: 0 2px 8px rgba(20, 45, 80, 0.06);
}
.hero-label svg { color: var(--sh-signal); }
.hero-title {
    font-size: clamp(24px, 3.5vw, 35px);
    font-weight: 800;
    line-height: 1.42;
    color: var(--sh-ink);
    margin-bottom: 10px;
    letter-spacing: -0.2px;
    text-wrap: balance;
}
.hero-title span { color: var(--sh-brand); }
.hero-sub {
    font-size: clamp(13px, 2vw, 14.5px);
    color: var(--sh-muted);
    margin-bottom: 17px;
    max-width: 44ch;
    line-height: 1.9;
}
.hero-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 15px; }
.hero-points {
    list-style: none;
    display: flex;
    flex-wrap: wrap;
    gap: 7px 18px;
    margin: 0;
    padding: 0;
}
.hero-points li {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 12px;
    font-weight: 600;
    color: #4a5c70;
}
.hero-points svg { width: 15px; height: 15px; color: var(--sh-ok); flex: none; }

/* ویترین عکس محصول */
.hero-visual {
    position: relative;
    z-index: 1;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
}
.hero-shot {
    position: relative;
    margin: 0;
    padding: 8px 8px 0;
    background: #fff;
    border: 1px solid #e6ecf4;
    border-radius: 14px;
    box-shadow: 0 18px 36px -30px rgba(16, 42, 76, 0.65);
    overflow: hidden;
}
.hero-shot img {
    display: block;
    width: 100%;
    height: 124px;
    object-fit: contain;
}
.hero-shot--main { grid-column: 1 / -1; }
.hero-shot--main img { height: 188px; }
.hero-shot figcaption {
    position: absolute;
    inset-block-end: 7px;
    inset-inline-start: 7px;
    font-size: 10.5px;
    font-weight: 700;
    color: var(--sh-brand);
    background: rgba(255, 255, 255, 0.94);
    border: 1px solid #e2e9f3;
    border-radius: 999px;
    padding: 3px 9px;
}

/* ---- finder (کارت انتخاب خودرو) ---- */
.sh-finder {
    grid-column: 1 / -1;
    margin-top: 10px;
    background: #fff;
    border: 1px solid #e2e9f3;
    border-radius: var(--sh-r);
    padding: 13px;
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr)) auto;
    gap: 10px;
    align-items: end;
    box-shadow: 0 16px 38px -32px rgba(16, 42, 76, 0.6);
    color: var(--sh-ink);
}
.sh-finder .sh-field { display: flex; flex-direction: column; gap: 5px; min-width: 0; }
.sh-finder label {
    font-size: 11.5px;
    font-weight: 700;
    color: var(--sh-muted);
}
.sh-finder select {
    width: 100%;
    height: 40px;
    padding: 0 10px;
    font-family: inherit;
    font-size: 13px;
    font-weight: 600;
    color: var(--sh-ink);
    background: #f7f9fb;
    border: 1px solid var(--sh-line-strong);
    border-radius: var(--sh-r-sm);
    appearance: none;
    background-image: url("data:image/svg+xml;charset=utf8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%2366727f' stroke-width='2.5' stroke-linecap='round'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: left 10px center;
    padding-inline-start: 30px;
}
.sh-finder select:focus { outline: none; border-color: var(--sh-brand); background-color: #fff; box-shadow: 0 0 0 3px var(--sh-brand-soft); }
.sh-finder .btn-primary { height: 40px; }

/* ============================== stats =================================== */
.stats-bar {
    width: calc(100% - 32px);
    max-width: var(--sh-max);
    margin: 18px auto 0;
    padding: 0 16px;
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 0;
    background: #fff;
    border: 1px solid var(--sh-line);
    border-radius: var(--sh-r);
    overflow: hidden;
}
.stat-card {
    padding: 16px 18px;
    border-inline-start: 1px solid var(--sh-line);
    display: grid;
    gap: 2px;
    background: #fff;
    border-radius: 0;
    box-shadow: none;
    text-align: start;
}
.stat-card:first-child { border-inline-start: 0; }
.stat-icon {
    width: 26px; height: 26px;
    display: grid; place-items: center;
    color: var(--sh-brand);
    background: var(--sh-brand-soft);
    border-radius: 6px;
    margin-bottom: 4px;
}
.stat-icon svg { width: 15px; height: 15px; }
.stat-num {
    font-size: 21px;
    font-weight: 800;
    color: var(--sh-ink);
    font-variant-numeric: tabular-nums;
}
.stat-label { font-size: 12px; color: var(--sh-muted); font-weight: 600; }

/* ============================== sections ================================ */
.section { width: 100%; max-width: var(--sh-max); margin: 34px auto 0; padding-inline: 16px; }
.section-header { text-align: start; margin-bottom: 16px; }
.section-tag {
    display: inline-block;
    font-size: 11.5px;
    font-weight: 700;
    color: var(--sh-brand);
    background: var(--sh-brand-soft);
    border-radius: 5px;
    padding: 3px 9px;
    margin-bottom: 8px;
}
.section-title { font-size: clamp(19px, 3.4vw, 27px); color: var(--sh-ink); }

.services-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 12px;
}
.service-card {
    background: #fff;
    border: 1px solid var(--sh-line);
    border-radius: var(--sh-r);
    padding: 18px 16px;
    box-shadow: none;
    transition: border-color 0.15s ease, transform 0.15s ease;
}
.service-card:hover { border-color: var(--sh-line-strong); transform: translateY(-2px); }
.service-icon {
    width: 34px; height: 34px;
    border-radius: 8px;
    background: #f4f7fa;
    border: 1px solid var(--sh-line);
    color: var(--sh-brand);
    display: grid; place-items: center;
    margin-bottom: 12px;
}
.service-icon svg { width: 17px; height: 17px; }
.service-name { font-size: 14.5px; font-weight: 700; margin-bottom: 4px; color: var(--sh-ink); }
.service-desc { font-size: 12.5px; color: var(--sh-muted); line-height: 1.7; }

/* ============================== brand / model pickers =================== */
.brands-showcase {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 14px;
    margin-top: 18px;
}
@media (min-width: 861px) {
    .brands-showcase--3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
.brand-item {
    position: relative;
    display: grid;
    grid-template-columns: 84px minmax(0, 1fr);
    align-items: center;
    gap: 16px;
    padding: 20px;
    background: #fff;
    border: 1px solid var(--sh-line);
    border-radius: var(--sh-r);
    color: var(--sh-ink);
    overflow: hidden;
    transition: border-color 0.15s ease, transform 0.15s ease, box-shadow 0.15s ease;
}
.brand-item::after {
    content: "";
    position: absolute;
    inset-inline-start: 0; top: 0; bottom: 0;
    width: 3px;
    background: var(--sh-brand);
    opacity: 0;
    transition: opacity 0.15s ease;
}
.brand-item:hover {
    border-color: var(--sh-line-strong);
    transform: translateY(-2px);
    box-shadow: var(--sh-shadow-2);
    color: var(--sh-ink);
}
.brand-item:hover::after { opacity: 1; }
.brand-circle {
    width: 84px; height: 84px;
    border-radius: 50%;
    background: #fff;
    border: 1px solid var(--sh-line);
    display: grid; place-items: center;
    overflow: hidden;
    margin: 0;
}
.brand-circle img { width: 100%; height: 100%; object-fit: contain; padding: 9px; }
.brand-label { font-size: 18px; font-weight: 800; display: block; }
.brand-item .sh-brand-sub { font-size: 12.5px; color: var(--sh-muted); font-weight: 600; }

/* محافظ: خنثی‌سازی استایل‌های درون‌صفحه‌ای قدیمی کارت برند (max-width و ستون‌های ۶۴px) */
.brands-showcase .brand-item {
    display: grid;
    grid-template-columns: 84px minmax(0, 1fr);
    align-items: center;
    width: 100%;
    max-width: none;
    min-width: 0;
    padding: 18px;
    text-align: start;
}
.brands-showcase .brand-item > * { min-width: 0; }
.brands-showcase .brand-circle {
    width: 84px;
    height: 84px;
    max-width: none;
    margin: 0;
    flex: none;
}
.brands-showcase .brand-label {
    display: block;
    padding: 0;
    margin: 0;
    background: none;
    border: 0;
    font-size: 17px;
    font-weight: 800;
    color: var(--sh-ink);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.cars-hero {
    width: 100%;
    max-width: var(--sh-max);
    margin: 18px auto 0;
    padding: 0 16px;
}
.cars-hero h2 { font-size: clamp(20px, 4vw, 27px); color: var(--sh-ink); }

.cars-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: 12px;
    margin-top: 16px;
}
.car-card {
    display: flex;
    flex-direction: column;
    gap: 0;
    background: #fff;
    border: 1px solid var(--sh-line);
    border-radius: var(--sh-r);
    overflow: hidden;
    color: var(--sh-ink);
    transition: border-color 0.15s ease, transform 0.15s ease, box-shadow 0.15s ease;
}
.car-card:hover {
    border-color: var(--sh-line-strong);
    transform: translateY(-2px);
    box-shadow: var(--sh-shadow-2);
    color: var(--sh-ink);
}
.car-card .sh-car-thumb {
    aspect-ratio: 3 / 2;
    background: #fff;
    border-bottom: 1px solid var(--sh-line);
    display: grid;
    place-items: center;
    overflow: hidden;
}
.car-card .sh-car-thumb img { width: 100%; height: 100%; object-fit: cover; }
.car-card-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    padding: 12px 14px 0;
}
.car-brand { font-size: 11.5px; font-weight: 700; color: var(--sh-muted); }
.car-model { padding: 2px 14px 0; font-size: 16.5px; font-weight: 800; color: var(--sh-ink); }
.car-meta {
    padding: 2px 14px 14px;
    font-size: 12px;
    color: var(--sh-muted);
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.car-card .sh-car-link {
    margin: auto 14px 14px;
    font-size: 12.5px;
    font-weight: 700;
    color: var(--sh-brand);
    display: inline-flex;
    align-items: center;
    gap: 5px;
}

/* ============================== parts grid ============================== */
.sh-parts-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    flex-wrap: wrap;
    margin: 22px 0 12px;
}
.sh-parts-head h2 { font-size: 18px; }
.sh-parts-head .sh-count { font-size: 12.5px; color: var(--sh-muted); font-weight: 600; }

.sh-parts-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(196px, 1fr));
    gap: 12px;
}

/* صفحه‌بندی تدریجی کاتالوگ (نمایش بیشتر) */
.sh-part[hidden] { display: none !important; }
.sh-more-row {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: 10px 14px;
    margin-top: 20px;
}
.sh-more-count { font-size: 12.5px; color: var(--sh-muted); font-weight: 600; }
.sh-more-btn {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    height: 42px;
    padding: 0 20px;
    border: 1px solid var(--sh-line-strong);
    background: #fff;
    color: var(--sh-brand);
    font-family: inherit;
    font-size: 13.5px;
    font-weight: 700;
    border-radius: var(--sh-r-sm);
    cursor: pointer;
    transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}
.sh-more-btn:hover { background: var(--sh-brand); border-color: var(--sh-brand); color: #fff; }
.sh-more-btn svg { width: 16px; height: 16px; }
.sh-more-btn[hidden] { display: none; }
.sh-part {
    display: flex;
    flex-direction: column;
    background: #fff;
    border: 1px solid var(--sh-line);
    border-radius: var(--sh-r);
    overflow: hidden;
    color: var(--sh-ink);
    transition: border-color 0.15s ease, transform 0.15s ease, box-shadow 0.15s ease;
}
.sh-part:hover {
    border-color: var(--sh-line-strong);
    transform: translateY(-2px);
    box-shadow: var(--sh-shadow-2);
    color: var(--sh-ink);
}
.sh-part-thumb {
    position: relative;
    aspect-ratio: 4 / 3;
    background: #fff;
    border-bottom: 1px solid var(--sh-line);
    display: grid;
    place-items: center;
    overflow: hidden;
}
.sh-part-thumb img { width: 100%; height: 100%; object-fit: contain; padding: 6px; }
.sh-part-thumb .badge { position: absolute; top: 8px; inset-inline-start: 8px; background: #fff; }
.sh-part-body { padding: 10px 12px 12px; display: flex; flex-direction: column; gap: 5px; flex: 1; }
.sh-part-code {
    font-family: var(--sh-mono);
    font-size: 10.5px;
    color: var(--sh-muted);
    direction: ltr;
    unicode-bidi: isolate;
    letter-spacing: 0;
}
.sh-part-name {
    font-size: 13.5px;
    font-weight: 700;
    line-height: 1.55;
    color: var(--sh-ink);
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    min-height: 2.9em;
}
.sh-part-cat { font-size: 11.5px; color: var(--sh-muted); }
.sh-part-foot {
    margin-top: auto;
    padding-top: 8px;
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 8px;
}
.sh-price {
    font-size: 14.5px;
    font-weight: 800;
    color: var(--sh-ink);
    font-variant-numeric: tabular-nums;
    line-height: 1.3;
}
.sh-price small { font-size: 10.5px; font-weight: 600; color: var(--sh-muted); margin-inline-start: 3px; }
.sh-price.is-unknown { font-size: 12.5px; color: var(--sh-signal); }
.sh-part-foot .sh-go {
    display: inline-grid;
    place-items: center;
    width: 30px; height: 30px;
    border-radius: 6px;
    border: 1px solid var(--sh-line-strong);
    color: var(--sh-brand);
    background: #fff;
    flex-shrink: 0;
}
.sh-part-foot .sh-go:hover { background: var(--sh-brand); border-color: var(--sh-brand); color: #fff; }
.sh-part-foot .sh-go svg { width: 15px; height: 15px; }

/* ============================== filters / selectors ===================== */
.car-selector, .filter-bar {
    display: flex;
    flex-wrap: wrap;
    align-items: end;
    gap: 10px;
    background: #fff;
    border: 1px solid var(--sh-line);
    border-radius: var(--sh-r);
    padding: 14px;
    margin-top: 16px;
    box-shadow: none;
}
.car-selector label {
    font-size: 12.5px;
    font-weight: 700;
    color: var(--sh-muted);
    width: 100%;
    margin: 0;
}
.car-selector select, .filter-bar select, .filter-bar input[type="text"], .filter-bar input[type="search"] {
    height: 40px;
    padding: 0 10px;
    font-family: inherit;
    font-size: 13px;
    font-weight: 600;
    color: var(--sh-ink);
    background: #f7f9fb;
    border: 1px solid var(--sh-line-strong);
    border-radius: var(--sh-r-sm);
    min-width: 0;
}
.filter-bar select, .filter-bar input { flex: 1 1 190px; }
.car-selector select { flex: 1 1 260px; }
.car-selector select:focus, .filter-bar select:focus, .filter-bar input:focus {
    outline: none;
    border-color: var(--sh-brand);
    background: #fff;
    box-shadow: 0 0 0 3px var(--sh-brand-soft);
}
.car-selector .btn-primary, .filter-bar button {
    height: 40px;
    padding: 0 16px;
    font-family: inherit;
    font-size: 13px;
    font-weight: 700;
    color: #fff;
    background: var(--sh-brand);
    border: 1px solid var(--sh-brand);
    border-radius: var(--sh-r-sm);
    display: inline-flex;
    align-items: center;
    gap: 6px;
    cursor: pointer;
}
.car-selector .btn-primary:hover, .filter-bar button:hover { background: var(--sh-brand-dark); }
.clear-link {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    height: 40px;
    font-size: 12.5px;
    font-weight: 700;
    color: var(--sh-signal);
    padding: 0 8px;
}
.update-time {
    margin-inline-start: auto;
    display: inline-flex;
    align-items: center;
    gap: 5px;
    font-size: 11.5px;
    color: var(--sh-muted);
    font-variant-numeric: tabular-nums;
}

.support-hint {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-top: 12px;
    padding: 12px 14px;
    background: #f7f9fb;
    border: 1px dashed var(--sh-line-strong);
    border-radius: var(--sh-r);
}
.support-hint-icon {
    width: 32px; height: 32px;
    flex-shrink: 0;
    border-radius: 7px;
    background: #fff;
    border: 1px solid var(--sh-line);
    color: var(--sh-brand);
    display: grid; place-items: center;
}
.support-hint-icon svg { width: 16px; height: 16px; }
.support-hint-text { font-size: 12.5px; color: var(--sh-secondary, #55616e); }
.support-hint a { font-weight: 700; text-decoration: underline; text-underline-offset: 3px; }

.count-bar {
    margin-top: 14px;
    font-size: 12.5px;
    color: var(--sh-muted);
    display: flex;
    align-items: center;
    gap: 5px;
    flex-wrap: wrap;
}
.count-bar strong { color: var(--sh-ink); font-weight: 800; }

/* ============================== tables ================================== */
.table-wrapper {
    margin-top: 12px;
    background: #fff;
    border: 1px solid var(--sh-line);
    border-radius: var(--sh-r);
    overflow: auto;
    box-shadow: none;
}
table.cart-table { width: 100%; border-collapse: collapse; font-size: 13px; }
table.cart-table thead th {
    position: sticky;
    top: 0;
    background: #f7f9fb;
    color: var(--sh-muted);
    font-size: 11.5px;
    font-weight: 700;
    text-align: start;
    padding: 10px 12px;
    border-bottom: 1px solid var(--sh-line);
    white-space: nowrap;
}
table.cart-table tbody td {
    padding: 11px 12px;
    border-bottom: 1px solid #eef2f6;
    color: var(--sh-ink);
    vertical-align: middle;
}
table.cart-table tbody tr:last-child td { border-bottom: 0; }
table.cart-table tbody tr:hover { background: #fafcfe; }
.td-code {
    font-family: var(--sh-mono);
    font-size: 11px;
    color: var(--sh-muted);
    direction: ltr;
    unicode-bidi: isolate;
    display: inline-block;
}
.td-name { font-weight: 700; }
.td-price { font-variant-numeric: tabular-nums; font-weight: 600; white-space: nowrap; }
.td-price small { font-size: 10.5px; color: var(--sh-muted); margin-inline-start: 3px; font-weight: 500; }
.action-btn {
    height: 32px;
    padding: 0 10px;
    font-size: 12px;
    background: #fff;
    color: var(--sh-brand);
    border: 1px solid var(--sh-line-strong);
    border-radius: var(--sh-r-sm);
}
.action-btn:hover { background: var(--sh-brand); border-color: var(--sh-brand); color: #fff; }

/* ============================== product detail ========================== */
.product-card {
    margin-top: 16px;
    background: #fff;
    border: 1px solid var(--sh-line);
    border-radius: var(--sh-r);
    overflow: hidden;
    box-shadow: none;
}
.card-inner { display: grid; grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr); }
.card-media {
    background: #fff;
    border-inline-end: 1px solid var(--sh-line);
    display: grid;
    place-items: center;
    padding: 14px;
    min-height: 260px;
}
.card-media img { width: 100%; max-width: 480px; height: auto; object-fit: contain; border-radius: 10px; }
.card-info { padding: 22px; display: grid; gap: 16px; align-content: start; }
.product-header { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.product-title { font-size: clamp(18px, 3.2vw, 24px); color: var(--sh-ink); }
.specs-section { border-top: 1px solid var(--sh-line); padding-top: 14px; }
.specs-title {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 12px;
    font-weight: 700;
    color: var(--sh-muted);
    margin-bottom: 10px;
}
.specs-title svg { width: 14px; height: 14px; }
.specs-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0; border: 1px solid var(--sh-line); border-radius: var(--sh-r-sm); overflow: hidden; }
.spec-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 9px 12px; border-bottom: 1px solid #eef2f6; }
.spec-row:nth-child(odd) { border-inline-end: 1px solid #eef2f6; }
.spec-row:nth-last-child(-n+2) { border-bottom: 0; }
.spec-label { font-size: 12px; color: var(--sh-muted); }
.spec-value { font-size: 12.5px; font-weight: 700; color: var(--sh-ink); text-align: end; }
.price-box {
    background: #f7f9fb;
    border: 1px solid var(--sh-line);
    border-radius: var(--sh-r-sm);
    padding: 14px;
}
.price-label { display: flex; align-items: center; gap: 6px; font-size: 11.5px; font-weight: 700; color: var(--sh-muted); }
.price-label svg { width: 14px; height: 14px; }
.price-value { font-size: clamp(20px, 3.4vw, 26px); font-weight: 800; color: var(--sh-ink); font-variant-numeric: tabular-nums; margin-top: 4px; }
.price-value small { font-size: 12px; font-weight: 600; color: var(--sh-muted); }
.price-note { font-size: 11.5px; color: var(--sh-muted); margin-top: 2px; }
.price-value.is-unknown { color: var(--sh-signal); font-size: 19px; }

.cart-controls { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
.quantity-box {
    display: inline-flex;
    align-items: center;
    border: 1px solid var(--sh-line-strong);
    border-radius: var(--sh-r-sm);
    overflow: hidden;
    height: 42px;
    background: #fff;
}
.quantity-box button {
    width: 36px;
    height: 100%;
    border: 0;
    background: #f7f9fb;
    color: var(--sh-ink);
    font-size: 17px;
    font-weight: 700;
    cursor: pointer;
    font-family: inherit;
}
.quantity-box button:hover { background: var(--sh-brand-soft); color: var(--sh-brand); }
.quantity-box input {
    width: 54px;
    height: 100%;
    border: 0;
    border-inline: 1px solid var(--sh-line);
    text-align: center;
    font-family: inherit;
    font-size: 14px;
    font-weight: 700;
    color: var(--sh-ink);
    -moz-appearance: textfield;
    background: #fff;
}
.quantity-box input::-webkit-outer-spin-button,
.quantity-box input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.total-price-display { font-size: 13px; color: var(--sh-muted); font-weight: 600; }
.total-price-display span { font-size: 15px; font-weight: 800; color: var(--sh-ink); font-variant-numeric: tabular-nums; }
.btn-add-to-cart { flex: 1 1 200px; }

.login-warning {
    display: flex;
    align-items: center;
    gap: 9px;
    padding: 11px 13px;
    border-radius: var(--sh-r-sm);
    background: var(--sh-warn-soft);
    border: 1px solid #f0e0bd;
    color: var(--sh-warn);
    font-size: 12.5px;
    font-weight: 600;
    line-height: 1.7;
}
.login-warning svg { width: 16px; height: 16px; flex-shrink: 0; }
.login-warning a { color: #6b4500; font-weight: 800; text-decoration: underline; text-underline-offset: 3px; }

.back-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 12.5px;
    font-weight: 700;
    color: var(--sh-muted);
    padding: 6px 0;
    margin-bottom: 6px;
}
.back-link:hover { color: var(--sh-brand); }
.back-link svg { width: 15px; height: 15px; }

/* ============================== forms (auth pages) ====================== */
.form-group { margin-bottom: 14px; }
.form-group label {
    display: block;
    font-size: 12.5px;
    font-weight: 700;
    color: var(--sh-ink);
    margin-bottom: 6px;
}
.form-group input, .form-group select, .form-group textarea,
input[type="text"], input[type="password"], input[type="tel"], input[type="email"],
input[type="number"], input[type="search"], select, textarea {
    font-family: inherit;
}
.form-group input, .form-group select, .form-group textarea {
    width: 100%;
    min-height: 44px;
    padding: 10px 12px;
    font-size: 14px;
    color: var(--sh-ink);
    background: #f9fbfc;
    border: 1px solid var(--sh-line-strong);
    border-radius: var(--sh-r-sm);
    transition: border-color 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
}
.form-group input:focus, .form-group select:focus, .form-group textarea:focus {
    outline: none;
    background: #fff;
    border-color: var(--sh-brand);
    box-shadow: 0 0 0 3px var(--sh-brand-soft);
}
.form-group input::placeholder, .form-group textarea::placeholder { color: #9aa6b3; }
.form-group input:disabled { background: #f1f4f7; color: #8b97a4; }

/* ورودی‌های داخل wrapper قدیمی (ورود / ثبت‌نام / فراموشی رمز): بدون کادر تکراری */
.input-wrapper {
    background: #f8fafc;
    border: 1px solid var(--sh-line-strong);
    border-radius: var(--sh-r-sm);
    padding: 0 12px;
    min-height: 46px;
    gap: 8px;
}
.input-wrapper:focus-within {
    background: #fff;
    border-color: var(--sh-brand);
    box-shadow: 0 0 0 3px var(--sh-brand-soft);
}
.input-wrapper input,
.input-wrapper select,
.input-wrapper textarea {
    width: 100%;
    min-height: 0;
    padding: 0;
    background: transparent;
    border: 0;
    border-radius: 0;
    box-shadow: none;
    font-size: 14px;
    color: var(--sh-ink);
}
.input-wrapper input:focus,
.input-wrapper select:focus,
.input-wrapper textarea:focus {
    background: transparent;
    border: 0;
    box-shadow: none;
}
.input-wrapper svg { color: #8d9baa; flex: none; }
.input-wrapper:focus-within svg { color: var(--sh-brand); }

/* auth card: each page has its own wrapper; normalise common ones */
.auth-card, .login-card, .signup-card, .form-card {
    background: #fff;
    border: 1px solid var(--sh-line);
    border-radius: var(--sh-r);
    box-shadow: var(--sh-shadow-1);
}

/* ============================== empty states ============================ */
.empty {
    display: grid;
    place-items: center;
    gap: 10px;
    padding: 46px 20px;
    text-align: center;
    background: #fff;
    border: 1px dashed var(--sh-line-strong);
    border-radius: var(--sh-r);
    color: var(--sh-muted);
    margin-top: 16px;
}
.empty svg { color: var(--sh-line-strong); }
.empty p { font-size: 13px; max-width: 46ch; }

/* ============================== footer ================================== */
footer {
    margin-top: auto;
    background: var(--sh-steel);
    color: #c3cfdb;
    border-top: 1px solid #0a0f14;
    padding: 0;
    font-size: 13px;
}
.sh-foot-inner {
    width: 100%;
    max-width: var(--sh-max);
    margin-inline: auto;
    padding: 30px 16px 18px;
    display: grid;
    grid-template-columns: 1.4fr 1fr 1fr 1fr;
    gap: 22px;
}
.footer-brand .logo-text { color: #fff; }
.footer-brand .logo-text span { color: #f0b45a; }
.footer-brand .logo-icon { background: #f0b45a; }
.footer-brand .logo-icon svg { stroke: #20180a; }
.footer-brand p { font-size: 12.5px; color: #8d9baa; margin-top: 10px; max-width: 34ch; line-height: 1.8; }
.footer-col h4 {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 12.5px;
    font-weight: 700;
    color: #fff;
    margin-bottom: 10px;
}
.footer-col h4 svg { width: 14px; height: 14px; color: #f0b45a; }
.footer-col ul { list-style: none; display: grid; gap: 7px; }
.footer-col a { font-size: 12.5px; color: #a6b4c2; }
.footer-col a:hover { color: #fff; }
.footer-bottom {
    width: 100%;
    max-width: var(--sh-max);
    margin-inline: auto;
    padding: 14px 16px;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    flex-wrap: wrap;
    font-size: 11.5px;
    color: #7d8b99;
}
.intro-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    height: 30px;
    padding: 0 10px;
    font-family: inherit;
    font-size: 11.5px;
    font-weight: 700;
    color: #d6e0ea;
    background: rgba(255, 255, 255, 0.07);
    border: 1px solid rgba(255, 255, 255, 0.14);
    border-radius: 6px;
    cursor: pointer;
}
.intro-badge svg { width: 13px; height: 13px; }
.intro-badge:hover { background: rgba(255, 255, 255, 0.12); }

/* plain footer (pages that only print a line) */
footer:not(:has(.sh-foot-inner)) {
    background: var(--sh-steel);
    color: #8d9baa;
    text-align: center;
    padding: 18px 16px calc(18px + var(--safe-bottom));
    font-size: 12px;
}

/* ============================== bottom nav (mobile) =====================
   نکته: صفحات قدیمی قواعد سراسری `nav {}` دارند (position/top/padding/
   flex-direction: column). چون نوار پایین هم یک <nav> است، این مقادیر
   نشت می‌کنند و آن را تبدیل به ستون تمام‌قد می‌کنند. پایین بازنویسی شده‌اند. */
.sh-bottom-nav {
    display: none;
    position: fixed;
    inset: auto 0 0 0;
    inset-block-start: auto;
    top: auto;
    left: 0;
    right: 0;
    bottom: 0;
    flex-direction: row;
    align-items: center;
    gap: 0;
    height: auto;
    max-height: none;
    overflow: visible;
    z-index: 95;
    background: rgba(255, 255, 255, 0.97);
    -webkit-backdrop-filter: blur(14px);
    backdrop-filter: blur(14px);
    border: 0;
    border-top: 1px solid var(--sh-line);
    border-radius: 0;
    padding: 0 0 var(--safe-bottom);
    margin: 0;
    box-shadow: 0 -6px 20px -14px rgba(13, 19, 25, 0.35);
}
.sh-bottom-nav a {
    flex: 1 1 0;
    display: grid;
    place-items: center;
    gap: 2px;
    padding: 8px 0 6px;
    font-size: 10.5px;
    font-weight: 700;
    line-height: 1.4;
    color: var(--sh-muted);
    background: transparent;
    border: 0;
    border-radius: 0;
    text-align: center;
    text-decoration: none;
}
.sh-bottom-nav a svg { width: 20px; height: 20px; }
.sh-bottom-nav a.active { color: var(--sh-brand); background: transparent; }
.sh-bottom-nav a.active svg { transform: translateY(-1px); }

/* ============================== toast =================================== */
.toast-message {
    position: fixed;
    inset-inline: 16px;
    bottom: calc(20px + var(--safe-bottom));
    margin-inline: auto;
    max-width: 420px;
    z-index: 200;
    background: var(--sh-ink);
    color: #fff;
    font-size: 13px;
    font-weight: 600;
    padding: 12px 16px;
    border-radius: var(--sh-r-sm);
    box-shadow: var(--sh-shadow-2);
    text-align: center;
    opacity: 0;
    transform: translateY(10px);
    transition: opacity 0.2s ease, transform 0.2s ease;
    pointer-events: none;
}
.toast-message.show { opacity: 1; transform: translateY(0); }

/* ============================== reveal ================================== */
.js .animate-on-scroll {
    opacity: 0;
    transform: translateY(10px);
    transition: opacity 0.4s var(--sh-ease), transform 0.4s var(--sh-ease);
    will-change: opacity, transform;
}
.animate-on-scroll.visible, .animate-on-scroll.is-visible { opacity: 1; transform: none; }

/* ============================== responsive ============================== */
@media (max-width: 1080px) {
    .services-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .stats-bar { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .stat-card:nth-child(3) { border-inline-start: 0; }
    .stat-card:nth-child(-n+2) { border-bottom: 1px solid var(--sh-line); }
    .sh-foot-inner { grid-template-columns: 1.2fr 1fr 1fr; }
    .sh-foot-inner .footer-col:nth-child(4) { grid-column: 1 / -1; }
}

@media (max-width: 900px) {
    .hero { grid-template-columns: 1fr; padding: 24px 20px 18px; text-align: start; gap: 16px; }
    .hero-visual { grid-template-columns: 1fr 1fr; order: 3; }
    .hero-shot img { height: 104px; }
    .hero-shot--main img { height: 150px; }
    .card-inner { grid-template-columns: 1fr; }
    .card-media { border-inline-end: 0; border-bottom: 1px solid var(--sh-line); min-height: 200px; }
    .sh-finder { grid-template-columns: 1fr 1fr; }
    .sh-finder .sh-field:nth-child(3), .sh-finder .btn-primary { grid-column: 1 / -1; }
    .brands-showcase { grid-template-columns: 1fr; }
}

@media (min-width: 861px) {
    /* محافظ: نوار پایین فقط برای موبایل */
    .sh-bottom-nav { display: none !important; }
}

@media (max-width: 860px) {
    #mainNav {
        position: absolute;
        inset-block-start: 100%;
        inset-inline: 0;
        flex-direction: column;
        align-items: stretch;
        gap: 2px;
        background: #fff;
        border-bottom: 1px solid var(--sh-line);
        box-shadow: var(--sh-shadow-2);
        padding: 10px 12px 14px;
        margin: 0;
        transform: translateY(-8px);
        opacity: 0;
        visibility: hidden;
        pointer-events: none;
        transition: transform 0.22s var(--sh-ease), opacity 0.18s ease, visibility 0.18s;
        max-height: calc(100vh - 64px);
        overflow: auto;
        z-index: 99;
    }
    #mainNav.open, #mainNav.mobile-open { transform: none; opacity: 1; visibility: visible; pointer-events: auto; }
    #mainNav a { padding: 11px 12px; font-size: 14px; border-radius: var(--sh-r-sm); }
    .menu-toggle { display: grid; }
    .btn-login .sh-btn-text { display: none; }
    .btn-login { padding: 0 9px; }
    .header-cta { display: none; }
    .sh-search { max-width: none; }
    .user-name { display: none; }
    .user-btn { padding: 0 5px; }

    .sh-bottom-nav { display: flex; }
    body { padding-bottom: calc(60px + var(--safe-bottom)); }
    .toast-message { bottom: calc(78px + var(--safe-bottom)); }
    .support-fab { bottom: calc(74px + var(--safe-bottom)); }
}

@media (max-width: 640px) {
    body { font-size: 14.5px; }
    /* هدر دو ردیفه: لوگو + اکشن‌ها، سپس جستجو */
    header { height: auto; }
    .sh-head-inner {
        flex-wrap: wrap;
        gap: 8px 10px;
        padding-block: 8px;
        padding-inline: 12px;
    }
    .sh-head-inner .logo { order: 1; }
    .header-actions { order: 2; margin-inline-start: auto; }
    .sh-search { order: 3; flex: 1 1 100%; }
    .sh-search input { height: 40px; }
    #mainNav { max-height: calc(100vh - 120px); }
    .container { padding-inline: 12px; padding-block: 16px 26px; }
    .page-hero { padding-inline: 12px; margin-top: 16px; }
    .hero { width: auto; margin: 12px 12px 0; padding: 22px 16px 16px; border-radius: var(--sh-r); }
    .hero-title { font-size: 23px; }
    .hero-sub { font-size: 13px; margin-bottom: 16px; }
    .hero-actions .btn-primary, .hero-actions .btn-outline { flex: 1 1 100%; }
    .sh-finder { grid-template-columns: 1fr 1fr; padding: 12px; gap: 8px; }
    .sh-finder .sh-field:nth-child(3) { grid-column: 1 / -1; }
    .sh-finder .btn-primary { grid-column: 1 / -1; }
    .stats-bar { grid-template-columns: repeat(2, minmax(0, 1fr)); margin: 12px 12px 0; padding: 0; width: auto; }
    .stat-card { padding: 12px; }
    .stat-num { font-size: 18px; }
    .section { padding-inline: 12px; margin-top: 26px; }
    .services-grid { grid-template-columns: 1fr; }
    .sh-parts-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 9px; }
    .sh-part-name { font-size: 12.5px; }
    .sh-part-body { padding: 8px 9px 10px; }
    .sh-parts-head { margin-top: 16px; }
    .sh-foot-inner { grid-template-columns: 1fr 1fr; padding: 22px 14px 14px; gap: 16px; }
    .sh-foot-inner .footer-col:nth-child(4) { grid-column: auto; }
    .cars-grid { grid-template-columns: 1fr; gap: 10px; }
    .brands-showcase .brand-item { grid-template-columns: 72px minmax(0, 1fr); padding: 14px; gap: 12px; }
    .brands-showcase .brand-circle { width: 72px; height: 72px; }
    .brands-showcase .brand-label { font-size: 16px; }
    .car-selector, .filter-bar { padding: 12px; gap: 8px; }
    .car-selector select, .filter-bar select, .filter-bar input { flex: 1 1 100%; }
    .update-time { margin-inline-start: 0; width: 100%; }
    .card-info { padding: 16px; gap: 13px; }
    .specs-grid { grid-template-columns: 1fr; }
    .spec-row:nth-child(odd) { border-inline-end: 0; }
    .spec-row:nth-last-child(-n+2) { border-bottom: 1px solid #eef2f6; }
    .spec-row:last-child { border-bottom: 0; }
    .btn-add-to-cart { flex: 1 1 100%; }
    .login-warning { font-size: 12px; }

    /* کارت‌های جدول در موبایل */
    table.cart-table thead { display: none; }
    table.cart-table, table.cart-table tbody, table.cart-table tr, table.cart-table td { display: block; width: 100%; }
    table.cart-table tbody tr {
        border-bottom: 1px solid var(--sh-line);
        padding: 10px 12px;
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 4px 10px;
    }
    table.cart-table tbody tr:last-child { border-bottom: 0; }
    table.cart-table tbody td {
        border: 0;
        padding: 2px 0;
        display: flex;
        align-items: baseline;
        justify-content: space-between;
        gap: 8px;
        font-size: 12.5px;
    }
    table.cart-table tbody td::before {
        content: attr(data-label);
        font-size: 10.5px;
        font-weight: 700;
        color: var(--sh-muted);
        flex-shrink: 0;
    }
    table.cart-table tbody td[data-label="نام قطعه"],
    table.cart-table tbody td[data-label="محصول"] { grid-column: 1 / -1; }
    table.cart-table tbody td[data-label="عملیات"] { grid-column: 1 / -1; }
    table.cart-table tbody td[data-label="عملیات"]::before { display: none; }
    table.cart-table tbody td[data-label="عملیات"] .action-btn { width: 100%; }
    .table-wrapper { background: transparent; border: 0; box-shadow: none; border-radius: 0; }
    table.cart-table { background: #fff; border: 1px solid var(--sh-line); border-radius: var(--sh-r); overflow: hidden; }
}

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { animation-duration: 0.001ms !important; transition-duration: 0.001ms !important; }
    html { scroll-behavior: auto; }
    .animate-on-scroll { opacity: 1; transform: none; }
}

/* ============================== support fab ============================= */
.support-fab {
    position: fixed;
    inset-inline-start: 16px;
    bottom: calc(18px + var(--safe-bottom));
    z-index: 92;
    width: 46px;
    height: 46px;
    display: grid;
    place-items: center;
    border-radius: 50%;
    background: var(--sh-brand);
    color: #fff;
    border: 1px solid var(--sh-brand-dark);
    box-shadow: 0 12px 24px -12px rgba(13, 19, 25, 0.55);
    transition: background 0.15s ease, transform 0.15s ease;
}
.support-fab svg { width: 21px; height: 21px; }
.support-fab:hover { background: var(--sh-brand-dark); color: #fff; transform: translateY(-2px); }

/* صفحات جانبی قدیمی (درباره ما / تماس / پشتیبانی) */
.value-icon { margin-inline: auto; }
.value-card .value-title { text-align: center; }

/* ============================== utilities =============================== */
.sr-only {
    position: absolute;
    width: 1px; height: 1px;
    padding: 0; margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}
[dir="ltr"] { unicode-bidi: isolate; }

/* اعداد لاتین داخل متن فارسی */
.sh-num { font-variant-numeric: tabular-nums; direction: ltr; unicode-bidi: isolate; display: inline-block; }

/* دکمهٔ پشتیبانی در موبایل بالای نوار پایین */
@media (max-width: 860px) {
    .support-fab { bottom: calc(72px + var(--safe-bottom)); inset-inline-start: 14px; }
}
