/* SECTION WRAP */
.cpf-car-models-section {
    background: #22242A;
    padding: 40px 20px;
    color: #ffffff;
}

.cpf-title {
    font-size: 26px;
    font-weight: 700;
    margin-bottom: 20px;
}

/* BRAND SLIDER + ARROWS */
.cpf-brand-slider-wrap {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 18px;
    margin-bottom: 25px;
}

.cpf-brand-nav {
    background: #2c2e33;
    border: none;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: 0.25s ease;
}

.cpf-brand-nav:hover {
    background: #ff0000;
}

.arrow-left,
.arrow-right {
    display: inline-block;
    width: 12px;
    height: 12px;
    border-top: 2px solid #fff;
    border-right: 2px solid #fff;
}

.arrow-left {
    transform: rotate(-135deg);
}

.arrow-right {
    transform: rotate(45deg);
}

.cpf-brand-slider {
    display: flex;
    gap: 32px; /* more spacing between brand names */
    overflow-x: auto;
    scrollbar-width: none;
    -ms-overflow-style: none;
}

.cpf-brand-slider::-webkit-scrollbar {
    display: none;
}

.cpf-brand-tab {
    white-space: nowrap;
    cursor: pointer;
    font-weight: 500;
    color: #ffffff;
    padding-bottom: 4px;
    border-bottom: 2px solid transparent;
    font-size: 14px;
}

.cpf-brand-tab.active {
    color: #ff0000;
    border-color: #ff0000;
}

/* MODEL GROUP ROW */
.cpf-model-group {
    margin-bottom: 30px;
    border-top: 1px solid #333;
    padding-top: 18px;
}

.cpf-model-group-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 10px;
    margin-bottom: 12px;
}

.cpf-model-group-title {
    font-size: 16px;
    font-weight: 600;
}

.cpf-model-count {
    font-size: 13px;
    color: #aaaaaa;
    margin-left: 6px;
}

.cpf-view-all-btn {
    background: #ff0000;
    color: #ffffff;
    padding: 6px 16px;
    border-radius: 4px;
    font-size: 13px;
    text-decoration: none;
    white-space: nowrap;
}

/* PRODUCT GRID */
.cpf-model-cards-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 18px;
}

.cpf-model-card {
    background: #1b1c22;
    border-radius: 8px;
    overflow: hidden;
    border: 1px solid #333;
    transition: 0.2s ease;
}

.cpf-model-card-inner {
    display: block;
    text-decoration: none;
    color: inherit;
}

.cpf-model-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 0 18px rgba(0, 0, 0, 0.6);
    border-color: #ff0000;
}

.cpf-model-image img {
    width: 100%;
    display: block;
}

.cpf-model-info {
    padding: 10px 12px;
}

/* IMPORTANT: remove underline from product title */
.cpf-model-name {
    font-size: 14px;
    font-weight: 600;
    margin: 0;
    text-decoration: none;
    border-bottom: none;
}

/* In case theme adds underline to links inside */
.cpf-model-card-inner:hover .cpf-model-name,
.cpf-model-card-inner .cpf-model-name {
    text-decoration: none !important;
    border-bottom: none !important;
}

/* LOADING */
.cpf-loading {
    color: #cccccc;
    font-size: 14px;
}

/* RESPONSIVE */
@media (max-width: 1024px) {
    .cpf-model-cards-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}

@media (max-width: 768px) {
    .cpf-car-models-section {
        padding: 30px 15px;
    }

    .cpf-model-group-header {
        flex-direction: column;
        align-items: flex-start;
    }

    .cpf-view-all-btn {
        align-self: flex-end;
    }

    .cpf-model-cards-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr)); /* mobile: 2 per row */
    }

    .cpf-brand-slider-wrap {
        gap: 10px;
    }
}

@media (max-width: 480px) {
    .cpf-brand-nav {
        width: 34px;
        height: 34px;
    }

    .cpf-brand-tab {
        font-size: 13px;
    }
}
