/*
 * Car Finder - Single Car Page Styles
 * محل قرارگیری پیشنهادی: chid-theme/include/classes/car-finder/assets/css/car-single.css
 */

:root {
    --car-finder-accent: #f5a623; /* رنگ فعال تب‌ها - می‌تونی با رنگ اصلی سایتت هماهنگش کنی */
    --car-finder-border: #e5e5e5;
}

.car-finder-single {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

/* --- بردکرامب --- */
.car-finder-breadcrumb {
    font-size: 14px;
    color: #888;
    margin-bottom: 20px;
}

.car-finder-breadcrumb a {
    color: #888;
    text-decoration: none;
}

.car-finder-breadcrumb a:hover {
    color: var(--main-color) !important;
}

.car-finder-breadcrumb-sep {
    margin: 0 6px;
}

.car-finder-breadcrumb-current {
    color: #333;
    font-weight: 600;
}

/* --- آرشیو برند --- */
.car-finder-brand-archive-header {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 30px;
}

.car-finder-brand-archive-header .car-finder-brand-logo img {
    max-height: 40px;
    width: auto;
}

.car-finder-brand-models-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 20px;
}

.car-finder-brand-model-card {
    display: block;
    background: #fff;
    border: 1px solid var(--car-finder-border);
    border-radius: 12px;
    padding: 16px;
    text-decoration: none;
    color: inherit;
    text-align: center;
    transition: box-shadow 0.2s ease, transform 0.2s ease;
}

.car-finder-brand-model-card:hover {
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.08);
    transform: translateY(-3px);
}

.car-finder-brand-model-card img {
    width: 100%;
    height: 140px;
    object-fit: contain;
    margin-bottom: 12px;
}

.car-finder-brand-model-card h2 {
    font-size: 16px;
    margin: 0 0 6px;
}

.car-finder-brand-model-year {
    font-size: 13px;
    color: #888;
}

/* --- هدر خودرو --- */
.car-finder-header {
    display: flex;
    flex-wrap: wrap;
    gap: 30px;
    align-items: flex-start;
    margin-bottom: 40px;
}

.car-finder-image {
    flex: 1 1 350px;
    max-width: 450px;
}

.car-finder-image img {
    width: 100%;
    height: auto;
    border-radius: 12px;
    display: block;
}

.car-finder-info {
    flex: 1 1 300px;
}

.car-finder-brand-logo img {
    max-height: 85px;
    width: auto;
    margin-bottom: 10px;
}

.car-finder-title {
    font-size: 26px;
    margin: 0 0 15px;
}

.car-finder-specs {
    width: 100%;
    border-collapse: separate;
}

.car-finder-specs th,
.car-finder-specs td {
    text-align: right;
    padding: 10px 12px;
    border-bottom: 1px solid var(--car-finder-border);
    font-size: 15px;
}

.car-finder-specs th {
    color: #ffffff;
    font-weight: 500;
    width: 30%;
    background-color: var(--main-color) !important;
    border-radius: 12px;
}

.car-finder-specs td {
    font-weight: 600;
}

/* --- بخش دسته‌ها (تب افقی) --- */
.car-finder-categories {
    background: #efefef;
    border-radius: 16px;
    padding: 25px;
}

.car-finder-section-title {
    font-size: 20px;
    margin: 0 0 20px;
    position: relative;
    padding-right: 12px;
}

.car-finder-section-title::before {
    content: '';
    position: absolute;
    right: 0;
    top: 3px;
    bottom: 3px;
    width: 4px;
    background: var(--main-color) !important;
    border-radius: 2px;
}

/* --- ردیف تب‌ها --- */
.car-finder-tabs-wrap {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 25px;
}

.car-finder-tabs {
    flex: 1;
    display: flex;
    gap: 12px;
    overflow-x: auto;
    scroll-behavior: smooth;
    scrollbar-width: none; /* فایرفاکس */
    -ms-overflow-style: none;
}

.car-finder-tabs::-webkit-scrollbar {
    display: none; /* کروم/سافاری */
}

.car-finder-tab-item {
    flex: 0 0 auto;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-width: 110px;
    padding: 18px 14px;
    background: #f7f7f7;
    border: 1px solid var(--car-finder-border);
    border-radius: 12px;
    cursor: pointer;
    font-family: inherit;
    transition: background 0.2s ease, border-color 0.2s ease;
}

.car-finder-tab-item:hover {
    border-color: var(--main-color) !important;
}

.car-finder-tab-item.is-active {
    background: var(--main-color) !important;
    border-color: var(--main-color) !important;
}

.car-finder-tab-icon {
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.car-finder-tab-icon img {
    width: 36px;
    height: 36px;
    object-fit: contain;
}

.car-finder-tab-label {
    font-size: 14px;
    font-weight: 600;
    white-space: nowrap;
    color: #333;
}

.car-finder-tab-item.is-active .car-finder-tab-label {
    color: #fff;
}

.car-finder-tab-arrow {
    flex: 0 0 auto;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    border: 1px solid var(--car-finder-border);
    background: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 20px;
    line-height: 1;
    color: #555;
    transition: background 0.2s ease;
}

.car-finder-tab-arrow:hover {
    background: #f0f0f0;
}

/* --- پنل محصولات --- */
.car-finder-panel {
    background: #fff;
    border-radius: 12px;
    padding: 20px;
}

/* --- اسلایدر محصولات (Swiper) --- */
.car-finder-swiper {
    overflow: hidden;
}

.car-finder-swiper .swiper-wrapper {
    display: flex;
    flex-wrap: nowrap;
}

.car-finder-swiper .swiper-slide {
    width: 210px;
    flex-shrink: 0;
    height: auto;
}

.car-finder-swiper-nav {
    display: none !important;
    justify-content: flex-end;
    gap: 10px;
    margin-top: 14px;
}

.car-finder-swiper-prev,
.car-finder-swiper-next {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    border: 1px solid var(--car-finder-border);
    background: #fff;
    font-size: 20px;
    line-height: 1;
    color: #555;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s ease;
}

.car-finder-swiper-prev:hover,
.car-finder-swiper-next:hover {
    background: #f0f0f0;
}

.car-finder-swiper .swiper-button-disabled,
.car-finder-swiper-prev.swiper-button-disabled,
.car-finder-swiper-next.swiper-button-disabled {
    opacity: 0.35;
    cursor: not-allowed;
}

/* --- توضیحات دسته (زیر محصولات) --- */
.car-finder-category-description {
    margin-top: unset;
    padding-top: 20px;
    border-top: 1px solid var(--car-finder-border);
    color: #555;
    font-size: 14px;
    line-height: 2;
}
.hero-archive .product-item {
    width: unset !important;
}
.hero-archive {
     gap: unset !important;
}
.hero-product {
    margin-bottom: 30px !important;
    margin-top: 10px !important;
}
@media (max-width: 600px) {
    .car-finder-header {
        flex-direction: column;
    }

    .car-finder-tab-item {
        min-width: 90px;
        padding: 14px 10px;
    }

    .car-finder-swiper .swiper-slide {
        width: 160px;
    }
    .car-finder-image {
    flex: unset !important;
}
.car-finder-specs td {
    font-size: 11px;
}
.car-finder-specs th {
    width: 53%;
    font-size: 12px;
}
.car-finder-header {
    gap: unset !important;
}
.car-finder-selector {
    max-width: 360px;
    background: linear-gradient(180deg, #2b2b2b 0%, #161616 100%);
    border-radius: 18px;
    padding: 28px 22px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.25);
    font-family: inherit;
    direction: rtl;
    margin: auto;
}
}