/* ==========================================================================
   ZD Car Battery Module – Master Colors
   با تغییر دادن فقط این متغیرها، تمام استایل هماهنگ می‌شود.
   ========================================================================== */
:root {
    /* ─── رنگ‌های اصلی برند ─── */
    --zd-primary:            #1e3a8a;   /* آبی تیره اصلی */
    --zd-primary-dark:       #172554;   /* آبی تیره‌تر برای هاور */
    --zd-accent:             #dc2626;   /* قرمز اصلی */
    --zd-accent-dark:        #991b1b;   /* قرمز تیره‌تر برای هاور */

    /* ─── رنگ‌های کمکی و ملایم ─── */
    --zd-success:            #059669;   /* سبز (اگر تم سبز می‌خواهید) */
    --zd-success-dark:       #047857;   /* سبز تیره */
    --zd-success-darkest:    #065f46;

    /* ─── پس‌زمینه‌ها ─── */
    --zd-bg-card:            #ed4c43 ;   /* پس‌زمینه کارت جستجو */
    --zd-bg-card-gradient:   #f69494 ;   /* رنگ دوم گرادیان کارت */
    --zd-bg-soft:            #f8fafc;   /* پس‌زمینه ملایم بخش‌ها */
    --zd-bg-input:           #ffffff;   /* پس‌زمینه فیلد جستجو */
    --zd-bg-results:         #ffffff;   /* پس‌زمینه لیست نتایج */
    --zd-bg-option:          #ffffff;   /* پس‌زمینه هر آیتم */
    --zd-bg-option-hover:    #fef2f2;   /* پس‌زمینه آیتم هنگام هاور */

    /* ─── حاشیه‌ها و خطوط ─── */
    --zd-border:             #cbd5e1;
    --zd-border-soft:        #e2e8f0;
    --zd-border-accent:      #fca5a5;   /* حاشیه رنگی (قرمز ملایم) */
    --zd-border-success:     #86efac;   /* حاشیه سبز ملایم */

    /* ─── متن و عنوان‌ها ─── */
    --zd-text-main:          #0f172a;   /* متن اصلی */
    --zd-text-muted:         #64748b;   /* متن ملایم */
    --zd-text-light:         #ffffff;   /* متن سفید */
    --zd-text-placeholder:   #94a3b8;   /* placeholder */
    --zd-text-heading:       #0f172a;   /* عنوان‌ها */

    /* ─── آیکون‌ها و رنگ فکس (Focus) ─── */
    --zd-icon-color:         #64748b;
    --zd-focus-ring:         220, 38, 38;   /* مقدار RGB قرمز برای حلقه فکوس */

    /* ─── مودال ─── */
    --zd-modal-bg:           #ffffff;   /* پس‌زمینه مودال */
    --zd-modal-overlay:      rgb(15 23 42 / 0.72);
}


/* ==========================================================================
   ۱. کانتینر اصلی و کارت جستجوی خودرو
   ================================================================--------- */
.zd-car-search {
    position: relative;
    max-width: 750px;
    margin: 30px auto;
    font-family: inherit;
    box-sizing: border-box;
}

.zd-car-search *,
.zd-car-search *::before,
.zd-car-search *::after {
    box-sizing: inherit;
}

/* کارت اصلی جستجو */
.zd-car-search-card {
    background: linear-gradient(135deg, var(--zd-bg-card-gradient) 0%, var(--zd-bg-card) 100%);
    border: 2px solid var(--zd-border-accent);
    border-radius: 24px;
    padding: 40px 30px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.08), 0 4px 12px rgba(0, 0, 0, 0.03);
    position: relative;
    overflow: hidden;
}

/* افکت دکوراتیو محو در پس‌زمینه کارت */
.zd-car-search-card::before {
    content: '';
    position: absolute;
    top: -50px;
    left: -50px;
    width: 200px;
    height: 200px;
    background: rgba(0, 0, 0, 0.03);
    border-radius: 50%;
    z-index: 0;
}

.zd-car-search-card > * { position: relative; z-index: 1; }

.zd-car-search-header { margin-bottom: 24px; text-align: center; }

.zd-car-search-badge {
    display: inline-block;
    margin-bottom: 10px;
    padding: 8px 15px;
    background: var(--zd-primary);
    border-radius: 20px;
    color: var(--zd-text-light);
    font-size: 15px;
}

.zd-car-search-header p {
    margin: 0;
    color: var(--zd-text-main);
    font-size: 15px;
}

/* باکس ورودی جستجو */
.zd-car-search__box {
    position: relative;
    display: flex;
    align-items: center;
    background: var(--zd-bg-input);
    border: 2px solid var(--zd-border-accent);
    border-radius: 14px;
    padding: 0 16px;
    height: 56px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.03);
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
    direction: rtl;
}

.zd-car-search__box:focus-within {
    border-color: var(--zd-accent);
    box-shadow: 0 0 0 5px rgba(var(--zd-focus-ring), 0.15), 0 6px 15px rgba(var(--zd-focus-ring), 0.08);
}

.zd-car-search__icon {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    margin-left: 12px;
    color: var(--zd-icon-color);
}

.zd-car-search__box:focus-within .zd-car-search__icon { color: var(--zd-accent); }

.zd-car-search__input {
    flex: 1;
    min-width: 0;
    height: 100%;
    background: transparent;
    border: none;
    outline: none;
    color: var(--zd-text-main);
    font-family: inherit;
    font-size: 16px;
    text-align: right;
}

.zd-car-search__input::placeholder { color: var(--zd-text-placeholder); font-weight: 400; }

.zd-car-search__dropdown-trigger {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    height: 100%;
    padding-right: 14px;
    margin-right: 12px;
    border-right: 1px solid var(--zd-border-soft);
    color: var(--zd-icon-color);
}

/* کادر نتایج جستجو */
.zd-car-search__results {
    position: relative !important;
    width: 100%;
    max-height: 280px;
    overflow-y: auto;
    margin: 14px 0 0;
    padding: 46px 10px 10px;
    background: var(--zd-bg-results);
    border: 2px solid var(--zd-border-success);
    border-radius: 16px;
    box-shadow: 0 8px 22px rgba(0, 0, 0, 0.10), inset 0 1px 0 rgba(255, 255, 255, 0.75);
    list-style: none;
    animation: zdResultsIn 0.22s ease-out;
}

.zd-car-search__results[hidden] { display: none !important; }
.zd-car-search__results > li { margin: 0; padding: 0; }

.zd-car-search__results:not(.zd-car-modal__results)::before {
    content: "خودروهای یافت‌شده؛ یکی را انتخاب کنید";
    position: absolute;
    top: 0; right: 0; left: 0;
    display: block;
    padding: 10px 16px;
    background: var(--zd-primary);
    border-radius: 13px 13px 0 0;
    color: var(--zd-text-light);
    font-size: 13px;
    font-weight: 800;
    line-height: 1.5;
    text-align: right;
    z-index: 2;
}

@keyframes zdResultsIn {
    from { opacity: 0; transform: translateY(-5px); }
    to   { opacity: 1; transform: translateY(0); }
}

.zd-car-search__option {
    position: relative;
    display: flex;
    align-items: center;
    width: 100%;
    min-height: 58px;
    margin: 5px 0;
    padding: 13px 58px 13px 48px;
    background: var(--zd-bg-option);
    border: 1px solid var(--zd-border);
    border-radius: 12px;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.06);
    color: var(--zd-text-main);
    cursor: pointer;
    font-family: inherit;
    font-size: 16px;
    font-weight: 800;
    line-height: 1.6;
    text-align: right;
    transition: background-color 0.18s ease, border-color 0.18s ease, box-shadow 0.18s ease, transform 0.18s ease;
}

.zd-car-search__option::before {
    content: "🚗";
    position: absolute;
    top: 50%; right: 12px;
    display: grid;
    place-items: center;
    width: 34px; height: 34px;
    background: var(--zd-bg-option-hover);
    border-radius: 10px;
    font-size: 20px;
    line-height: 1;
    transform: translateY(-50%);
}

.zd-car-search__option::after {
    content: "‹";
    position: absolute;
    top: 50%; left: 16px;
    color: var(--zd-accent);
    font-size: 28px;
    font-weight: 800;
    line-height: 1;
    transform: translateY(-50%);
    transition: color 0.18s ease, transform 0.18s ease;
}

.zd-car-search__option:hover,
.zd-car-search__option:focus-visible {
    background: var(--zd-bg-option-hover);
    border-color: var(--zd-accent);
    box-shadow: 0 5px 14px rgba(var(--zd-focus-ring), 0.2);
    color: var(--zd-text-main);
    outline: none;
    transform: translateX(-3px);
}

.zd-car-search__no-result { padding: 12px; color: var(--zd-text-muted); text-align: center; }


/* ==========================================================================
   ۲. مودال جزئیات سریع خودرو
   ================================================================--------- */
body.zd-car-modal-open { overflow: hidden; }

.zd-car-modal {
    position: fixed;
    inset: 0;
    z-index: 999999;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    direction: rtl;
}

.zd-car-modal[hidden] { display: none !important; }

.zd-car-modal__backdrop {
    position: absolute;
    inset: 0;
    background: var(--zd-modal-overlay);
    backdrop-filter: blur(5px);
}

.zd-car-modal__content {
    position: relative;
    z-index: 1;
    display: flex;
    flex-direction: column;
    width: min(680px, 100%);
    max-height: 88vh;
    min-height: 0;
    background: var(--zd-modal-bg);
    border: 1px solid rgba(255, 255, 255, 0.8);
    border-radius: 18px;
    box-shadow: 0 25px 60px rgba(0, 0, 0, 0.28);
    overflow: hidden;
}

.zd-car-modal__header {
    position: relative;
    display: flex;
    flex: 0 0 auto;
    align-items: center;
    justify-content: center;
    min-height: 64px;
    padding: 14px 60px;
    background: var(--zd-bg-soft);
    border-bottom: 1px solid var(--zd-border-soft);
    text-align: center;
}

.zd-car-modal__title { margin: 0; color: var(--zd-text-heading); font-size: 18px; font-weight: 800; }

.zd-car-modal__close {
    position: absolute !important;
    top: 50%; left: 16px;
    display: grid;
    place-items: center;
    width: 36px; height: 36px;
    padding: 0;
    background: var(--zd-bg-soft);
    border: 1px solid var(--zd-border-soft);
    border-radius: 50%;
    color: var(--zd-icon-color);
    cursor: pointer;
    font-size: 24px;
    line-height: 1;
    transform: translateY(-50%);
}

.zd-car-modal__close:hover,
.zd-car-modal__close:focus-visible {
    background: var(--zd-bg-option-hover);
    color: var(--zd-accent-dark);
    outline: none;
}

.zd-car-modal__body {
    flex: 1 1 auto;
    min-height: 0;
    overflow-x: hidden;
    overflow-y: auto;
    overscroll-behavior: contain;
    padding: 24px;
}

.zd-car-modal__car-title { margin: 0 0 6px; color: var(--zd-primary); font-size: 22px; font-weight: 800; }

.zd-car-modal__intro { margin: 0 0 18px; color: var(--zd-text-muted); font-size: 14px; line-height: 1.7; }

.zd-car-modal__specs {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
    margin-bottom: 20px;
}

.zd-car-modal__spec {
    display: flex;
    flex-direction: column;
    gap: 4px;
    padding: 12px 14px;
    background: var(--zd-bg-soft);
    border: 1px solid var(--zd-border-soft);
    border-radius: 10px;
}

.zd-car-modal__spec-label { color: var(--zd-text-muted); font-size: 12px; font-weight: 600; }
.zd-car-modal__spec-value { color: var(--zd-text-main); font-size: 15px; font-weight: 800; }

.zd-car-modal__car-link {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    min-height: 48px;
    padding: 12px 20px;
    background: var(--zd-accent);
    border-radius: 11px;
    box-shadow: 0 5px 14px rgba(var(--zd-focus-ring), 0.22);
    color: var(--zd-text-light);
    font-size: 15px;
    font-weight: 800;
    text-decoration: none;
}

.zd-car-modal__car-link:hover,
.zd-car-modal__car-link:focus-visible {
    background: var(--zd-accent-dark);
    color: var(--zd-text-light);
    outline: none;
}

.zd-car-modal__footer {
    position: relative;
    flex: 0 0 auto;
    max-height: 38vh;
    overflow-y: auto;
    overscroll-behavior: contain;
    padding: 16px 24px 20px;
    background: var(--zd-bg-soft);
    border-top: 1px solid var(--zd-border-soft);
}

.zd-car-modal__footer-label {
    display: block;
    margin: 0 0 8px;
    color: var(--zd-text-muted);
    font-size: 13px;
    font-weight: 700;
    text-align: right;
}

.zd-car-modal__results {
    position: relative !important;
    max-height: 190px;
    overflow-y: auto;
    margin-top: 10px;
    padding: 8px;
    background: var(--zd-bg-option-hover);
    border-color: var(--zd-border-success);
}

@media (max-width: 600px) {
    .zd-car-modal { align-items: flex-end; padding: 8px; }
    .zd-car-modal__content { max-height: 94vh; border-radius: 18px 18px 12px 12px; }
    .zd-car-modal__header { min-height: 58px; padding: 12px 56px; }
    .zd-car-modal__body { padding: 16px; }
    .zd-car-modal__footer { max-height: 40vh; padding: 14px 16px; }
    .zd-car-modal__specs { grid-template-columns: 1fr; }
}


/* ==========================================================================
   ۳. صفحه تکی جزئیات خودرو (Single Car Page)
   ================================================================--------- */
.zd-car-page-wrapper { background-color: var(--zd-bg-soft); padding: 10px 0 60px; font-family: inherit; }
.zd-car-page-wrapper .site-main { max-width: 100%; margin: 0 auto; padding: 0 2px; }

.zd-car-single {
    background: var(--zd-modal-bg);
    border-radius: 16px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.04);
    padding: 20px;
	padding-top: 0px;
    border: 1px solid var(--zd-border-soft);
}

.zd-car-single .entry-header { border-bottom: 1px solid var(--zd-border-soft); }
.zd-car-single .entry-title { font-size: 26px; font-weight: 800; color: var(--zd-text-heading); line-height: 1.4; }

.zd-car-single .zd-car-single__specs {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 0;
    direction: rtl;
    margin: 15px 0 22px;
    padding: 15px 10px;
    background: var(--zd-modal-bg);
    border: 1px solid #edf0f2;
    border-radius: 20px;
    box-shadow: 0 8px 22px rgba(15, 42, 55, 0.08);
}

.zd-car-single .zd-car-single__specs > .zd-car-spec-item {
    display: flex;
    flex-direction: column;
    justify-content: center;
    min-width: 0;
    padding: 4px 20px;
    background: transparent;
    border: 0;
    border-radius: 0;
    box-shadow: none;
}

.zd-car-single .zd-car-single__specs > .zd-car-spec-item:not(:first-child) { border-inline-start: 1px solid var(--zd-border-soft); }
.zd-car-single .zd-car-spec-heading { display: flex; align-items: center; gap: 12px; min-height: 48px; }

.zd-car-single .zd-car-spec-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 46px;
    width: 46px; height: 46px;
    color: var(--zd-accent);
    background: var(--zd-bg-option-hover);
    border-radius: 50%;
}

.zd-car-single .zd-car-spec-icon svg {
    display: block;
    width: 25px; height: 25px;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.9;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.zd-car-single .zd-car-spec-label { color: var(--zd-text-muted); font-size: 16px; font-weight: 700; line-height: 1.6; }

.zd-car-single .zd-car-spec-value {
    display: block;
    margin-top: 2px;
    margin-inline-start: 58px;
    color: var(--zd-text-heading);
    font-size: 20px;
    font-weight: 700;
    line-height: 1.5;
    overflow-wrap: anywhere;
}

.zd-car-single__content { color: var(--zd-text-muted); font-size: 16px; line-height: 1.9; margin-bottom: 35px; padding: 0 5px; }

.zd-car-single__widget-box { margin-top: 40px; border-top: 1px solid var(--zd-border-soft); padding-top: 35px; }

.zd-car-single__widget-box-title { font-size: 25px; font-weight: 800; color: var(--zd-text-heading); margin-bottom: 20px; text-align: center; }

@media (max-width: 960px) {
    .zd-car-single .zd-car-single__specs { grid-template-columns: repeat(2, minmax(0, 1fr)); padding: 12px; }
    .zd-car-single .zd-car-single__specs > .zd-car-spec-item { padding: 16px; }
    .zd-car-single .zd-car-single__specs > .zd-car-spec-item:not(:first-child) { border-inline-start: 0; }
    .zd-car-single .zd-car-single__specs > .zd-car-spec-item:nth-child(even) { border-inline-start: 1px solid var(--zd-border-soft); }
    .zd-car-single .zd-car-single__specs > .zd-car-spec-item:nth-child(n+3) { border-top: 1px solid var(--zd-border-soft); }
}

@media (max-width: 540px) {
    .zd-car-single { padding: 14px; }
    .zd-car-single .entry-title { font-size: 20px; }
    .zd-car-single .zd-car-single__specs { grid-template-columns: minmax(0, 1fr); margin: 20px 0 26px; padding: 8px 16px; border-radius: 16px; }
    .zd-car-single .zd-car-single__specs > .zd-car-spec-item { padding: 15px 4px; flex-direction: row; justify-content: flex-start; }
    .zd-car-single .zd-car-single__specs > .zd-car-spec-item:nth-child(even) { border-inline-start: 0; }
    .zd-car-single .zd-car-single__specs > .zd-car-spec-item:not(:first-child) { border-top: 1px solid var(--zd-border-soft); }
    .zd-car-single .zd-car-spec-value { font-size: 23px; margin-inline-start: 20px; }
}
/* ==========================================================================
   ZD Car Single Content Styles
   ========================================================================== */
/* ==========================================================================
   ZD Car Single Content Styles (Hirmed with Main Plugin Theme)
   ========================================================================== */

.zd-car-single-content {
    font-family: inherit;
    color: #333;
    margin: 25px 0;
    line-height: 1.7;
}

/* بخش معرفی دو ستونه */
.zd-car-intro-section {
    display: flex;
    flex-wrap: wrap;
    gap: 30px;
    align-items: center;
    margin-bottom: 40px;
}

.zd-car-intro-text {
    flex: 1;
    min-width: 280px;
}

.zd-car-intro-text h2 {
    color: var(--zd-primary, #1e3a8a);
    margin-top: 0;
    font-size: 24px;
    line-height: 1.4;
    font-weight: 700;
}

.zd-car-intro-image {
    flex: 0 0 550px;
    text-align: center;
}

.zd-car-intro-image img {
    width: 100%;
    height: auto;
    border-radius: 12px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
    border: 1px solid #edf0f2;
}

/* تیترهای بخش‌ها (هماهنگ با سبک خط زیرین تأکیدی) */
.zd-car-single-content h3 {
    color: var(--zd-primary, #1e3a8a);
    border-bottom: 2px solid var(--zd-accent, #dc2626);
    padding-bottom: 8px;
    display: inline-block;
    font-size: 20px;
    margin-bottom: 20px;
    font-weight: 700;
}

/* جدول مشخصات فنی */
.zd-car-specs-section {
    margin-bottom: 40px;
    overflow-x: auto;
}

.zd-car-single-content .zd-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 10px;
    background: #fff;
    box-shadow: 0 2px 8px rgba(15, 42, 55, 0.06);
    border-radius: 8px;
    overflow: hidden;
    border: 1px solid #edf0f2;
}

.zd-car-single-content .zd-table thead tr {
    background-color: var(--zd-primary, #1e3a8a);
    color: #fff !important;
    text-align: right;
}

.zd-car-single-content .zd-table th {
    padding: 14px 16px;
    font-weight: 600;
	 color: #fff !important;
    font-size: 14px;
}

.zd-car-single-content .zd-table td {
    padding: 12px 16px;
    border-bottom: 1px solid #edf0f2;
    color: #111a29;
}

.zd-car-single-content .zd-table tbody tr:nth-child(even) {
    background-color: #f9fafb;
}

.zd-spec-title {
    font-weight: 600;
    color: #091320;
}

.zd-highlight-text {
    color: var(--zd-accent, #dc2626);
    font-weight: bold;
}

/* بخش نکات کلیدی */
.zd-car-tips-section {
    margin-bottom: 40px;
    background: #fdfdfd;
    padding: 25px;
    border-radius: 10px;
    border: 1px solid #edf0f2;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.02);
}

.zd-car-tips-section p {   
    margin-bottom: 15px;
}

.zd-car-tips-section ul {
    line-height: 1.8;   
    padding-right: 20px;
    margin-bottom: 0;
}

.zd-car-tips-section li {
    margin-bottom: 8px;
}

/* بخش سوالات متداول */
.zd-car-faq-section {
    margin-bottom: 30px;
}

.zd-faq-item {
    margin-top: 20px;
    background: #fff;
    padding: 18px 20px;
    border-radius: 8px;
    border: 1px solid #edf0f2;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.02);
}

.zd-faq-item h4 {
    color: #1f2937;
    margin-top: 0;
    margin-bottom: 8px;
    font-size: 16px;
    font-weight: 600;
}

.zd-faq-item p {   
    line-height: 1.6;
    margin: 0;
}

/* ریسپانسیو برای موبایل */
@media (max-width: 768px) {
    .zd-car-intro-section {
        flex-direction: column-reverse;
    }
    .zd-car-intro-image {
        width: 100%;
        flex: auto;
    }
}
/* استایل بخش چیپ‌های خودرو در صفحه آمپر */
/* استایل دکمه‌های کپسولی (Chip) برای خودروهای فابریک آمپر */
.zd-amper-chips-container {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 15px;
}

.zd-amper-chip {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 8px 18px;
    background: #f3f3f3;
    color: #1f2937;
    border: 1px solid #edf0f2;
    border-radius: 8px;
    font-weight: 700;
    text-decoration: none;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.02);
    transition: all 0.2s ease-in-out;
}

.zd-amper-chip:hover {
    border-color: var(--zd-primary, #1e3a8a);
    color: var(--zd-primary, #1e3a8a);
    background: #f8fafc;
    box-shadow: 0 2px 6px rgba(30, 58, 138, 0.08);
}

#zd-amper-products-title,#zd-amper-cars-title,#zd-amper-guide-title{
    color: var(--zd-primary, #1e3a8a);
    border-bottom: 2px solid var(--zd-accent, #dc2626);
    padding-bottom: 8px;
    display: inline-block;
    font-size: 20px;
    margin-bottom: 20px;
    font-weight: 700;
}
.modal-car-link{
	display:inline-block; direction:ltr; unicode-bidi:embed;
	  color: var(--zd-primary,#0e36a7); 
}