.car-list-header {
    padding: 1.5rem 0;
    border-bottom: 1px solid #e9ecef;
    margin-bottom: 1rem;
}

/* 썸네일 래퍼 (PC) */
.car-thumbnail-wrapper {
    display: inline-block;
    width: 90px;
    height: 67.5px;
}

/* 찜 버튼 스타일 (PC) */
.car-list-wishlist-btn {
    position: absolute;
    top: 4px;
    right: 4px;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background-color: rgba(255, 255, 255, 0.9);
    border: 2px solid rgba(0, 0, 0, 0.1);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 10;
    transition: all 0.3s ease;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.15);
    padding: 0;
    color: #6c757d;
}

.car-list-wishlist-btn:hover {
    color: var(--brand-color, rgb(118, 32, 246));
    background-color: rgba(255, 255, 255, 1);
    border-color: rgba(0, 0, 0, 0.2);
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
    transform: scale(1.05);
}

.car-list-wishlist-btn.active {
    color: var(--brand-color, rgb(118, 32, 246));
    background-color: rgba(255, 255, 255, 1);
    border-color: var(--brand-color, rgb(118, 32, 246));
}

.car-list-wishlist-btn.active i {
    color: var(--brand-color, rgb(118, 32, 246));
}

.car-list-wishlist-btn i {
    font-size: 0.85rem;
    pointer-events: none;
}

/* 찜 버튼 스타일 (모바일) */
.car-list-wishlist-btn-mobile {
    position: absolute;
    top: 8px;
    right: 8px;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background-color: rgba(255, 255, 255, 0.9);
    border: 2px solid rgba(0, 0, 0, 0.1);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 10;
    transition: all 0.3s ease;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.15);
    padding: 0;
}

.car-list-wishlist-btn-mobile:hover {
    background-color: rgba(255, 255, 255, 1);
    border-color: rgba(0, 0, 0, 0.2);
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
    transform: scale(1.05);
}

.car-list-wishlist-btn-mobile i {
    font-size: 0.9rem;
    color: #6c757d;
    transition: color 0.3s ease;
    pointer-events: none;
}

.car-list-wishlist-btn-mobile.active i {
    color: var(--brand-color, rgb(118, 32, 246));
}

.car-list-wishlist-btn-mobile.active {
    background-color: rgba(255, 255, 255, 1);
    border-color: var(--brand-color, rgb(118, 32, 246));
}

.car-list-wishlist-btn-mobile:active {
    transform: scale(0.95);
}

/* 조건변경 버튼 스타일 - 패딩/마진 작게 */
#changeConditionsBtn {
    padding: 0.375rem 0.75rem;
    margin: 0;
    font-size: 0.875rem;
}

/* 정렬 드롭다운 스타일 */
.dropdown-menu .sort-option.active {
    background-color: var(--brand-color, rgb(118, 32, 246));
    color: white;
    font-weight: 600;
}

.dropdown-menu .sort-option:hover:not(.active) {
    background-color: rgba(118, 32, 246, 0.1);
}

.dropdown-menu .sort-option.active:hover {
    background-color: var(--brand-color-dark, rgb(98, 22, 226));
    color: white;
}

/* 정렬 버튼 스타일 */
#changeSortBtn {
    color: #495057;
    border-color: #495057;
    padding: 0.375rem 0.75rem;
    margin: 0;
    font-size: 0.875rem;
}

#changeSortBtn:hover {
    background-color: #495057;
    color: white;
    border-color: #495057;
}

.sort-icon-wrapper {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    line-height: 1;
}

.sort-icon-wrapper .fa-grip-lines {
    font-size: 0.7rem;
    letter-spacing: -2px;
}

.sort-icon-wrapper .fa-chevron-down {
    font-size: 0.6rem;
    margin-left: 2px;
}

.car-list-count {
    font-size: 1rem;
    font-weight: 500;
    white-space: nowrap;
}

.car-list-content {
    min-height: 400px;
}

/* PC 버전 테이블 스타일 */
.car-table {
    font-size: 0.9rem;
}

.car-table thead th {
    background-color: #f8f9fa;
    font-weight: 600;
    border-bottom: 2px solid #dee2e6;
    white-space: nowrap;
}

.car-table tbody tr {
    transition: background-color 0.2s;
}

.car-table tbody tr:hover {
    background-color: #f8f9fa;
}

.car-table tbody td {
    vertical-align: middle;
}

/* 등급 컬럼 최소 너비 보장 */
.car-table tbody td:nth-child(2) {
    min-width: 150px;
    width: 200px;
}

.car-thumbnail {
    width: 90px;
    height: 67.5px;
    object-fit: cover;
    border-radius: 4px;
    border: 1px solid #dee2e6;
}

.car-image-error {
    width: 90px;
    height: 67.5px;
    flex-shrink: 0;
}

.car-thumbnail-placeholder {
    width: 90px;
    height: 67.5px;
    background-color: #f8f9fa;
    border: 1px solid #dee2e6;
    border-radius: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #6c757d;
}

.car-thumbnail-placeholder svg {
    width: 100%;
    height: 100%;
}

.car-image-error {
    display: inline-block;
}

.car-image-error svg {
    width: 100%;
    height: 100%;
}

.color-badge {
    display: inline-block;
    padding: 2px 6px;
    border-radius: 4px;
    font-size: 0.7rem;
    font-weight: 500;
    border: 1px solid #dee2e6;
    text-align: center;
    font-weight: 500;
    white-space: nowrap;
}

/* 모바일 버전 카드 스타일 */
.car-card {
    cursor: pointer;
}

.car-card .card {
    border: 1px solid #dee2e6;
    transition: box-shadow 0.2s;
}

.car-card .card:hover {
    box-shadow: 0 0.125rem 0.25rem rgba(0, 0, 0, 0.075);
}

.car-thumbnail-mobile {
    width: 100px;
    min-width: 100px;
    height: 75px;
    overflow: hidden;
    border-radius: 4px;
    border: 1px solid #dee2e6;
    flex-shrink: 0;
}

.car-thumbnail-mobile img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.car-thumbnail-mobile .car-image-error {
    width: 100px;
    height: 75px;
}

.car-thumbnail-placeholder-mobile {
    width: 100px;
    height: 75px;
    background-color: #f8f9fa;
    border: 1px solid #dee2e6;
    border-radius: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #6c757d;
}

.car-thumbnail-placeholder-mobile svg {
    width: 100%;
    height: 100%;
}

.car-thumbnail-mobile-large {
    width: 120px;
    min-width: 120px;
    height: 90px;
    overflow: hidden;
    border-radius: 4px;
    border: 1px solid #dee2e6;
    flex-shrink: 0;
}

.car-thumbnail-mobile-large img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.car-thumbnail-placeholder-mobile-large {
    width: 120px;
    height: 90px;
    background-color: #f8f9fa;
    border: 1px solid #dee2e6;
    border-radius: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #6c757d;
}

.car-thumbnail-placeholder-mobile-large svg {
    width: 100%;
    height: 100%;
}

.car-info-mobile {
    font-size: 0.9rem;
}

.car-badges-mobile {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
}

.car-badges-section-mobile {
    border-top: 1px solid #e9ecef;
    padding-top: 0.75rem;
}

/* 등급 링크 스타일 - 검정색 계열 */
.car-rank-link {
    color: #495057 !important;
    text-decoration: none;
}

.car-rank-link:hover {
    color: #212529 !important;
    text-decoration: underline;
}

.car-rank-text {
    color: #495057;
}

/* 2줄 말줄임표 스타일 */
.car-rank-name {
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    overflow: hidden;
    text-overflow: ellipsis;
    min-width: 150px;
    max-width: 200px;
    line-height: 1.4;
    word-break: break-word;
}

/* 카드 뷰 차량 이름 2줄 제한 스타일 */
.car-card-name {
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    overflow: hidden;
    text-overflow: ellipsis;
    line-height: 1.4;
    word-break: break-word;
}

.car-card-name-link,
.car-card-name-text {
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    overflow: hidden;
    text-overflow: ellipsis;
    line-height: 1.4;
    word-break: break-word;
}

/* 배지 스타일 - common.css의 글로벌 스타일 사용 */
/* 점수 배지는 더 크고 굵게 */
.badge.custom-badge.popoverCustom[data-bs-toggle='popover'][data-bs-placement='right'],
.badge.custom-badge.popoverCustom[data-bs-toggle='popover'][data-bs-placement='top'] {
    font-size: 0.7rem;
    font-weight: 500;
}

.badge.custom-badge.history-exists {
    background-color: #a6a6a6;
    color: white;
    font-weight: 500;
}

.badge.custom-badge.high {
    background-color: #d99694;
    color: white;
}

.badge.popoverCustom {
    cursor: help;
}

/* 페이징 스타일 */
.pagination {
    margin-top: 2rem;
}

.pagination .page-link {
    color: var(--brand-color, rgb(118, 32, 246));
    border-color: #dee2e6;
}

.pagination .page-item.active .page-link {
    background-color: var(--brand-color, rgb(118, 32, 246));
    border-color: var(--brand-color, rgb(118, 32, 246));
    color: white;
    font-weight: 600;
}

.pagination .page-link:hover {
    background-color: #f8f9fa;
    border-color: #dee2e6;
}

.pagination .page-item.disabled .page-link {
    color: #6c757d;
    pointer-events: none;
    background-color: #fff;
    border-color: #dee2e6;
}

/* 모바일 페이징 스타일 */
.pagination-mobile {
    flex-wrap: nowrap;
    justify-content: center;
    width: 100%;
    margin: 0;
}

.pagination-mobile .page-item {
    flex: 0 0 auto;
}

.pagination-mobile .page-link {
    padding: 0.375rem 0.75rem;
    font-size: 0.875rem;
    white-space: nowrap;
    min-width: auto;
}

.pagination-mobile .page-item.active .page-link {
    padding: 0.375rem 0.75rem;
    font-size: 0.875rem;
}

/* 반응형 */
@media (max-width: 767.98px) {
    .car-list-header {
        padding: 1rem 0;
    }
    
    .car-list-header .d-flex {
        flex-direction: row;
        justify-content: space-between;
        align-items: center;
    }
    
    #changeConditionsBtn {
        flex: 1;
        margin: 0 0.5rem;
        font-size: 0.875rem;
        padding: 0.375rem 0.75rem;
    }
    
    #changeSortBtn {
        flex: 1;
        margin: 0 0.5rem;
        font-size: 0.875rem;
        padding: 0.375rem 0.75rem;
    }
    
    .car-list-count {
        margin-top: 1rem !important;
        font-size: 0.9rem;
    }
    
    .car-thumbnail-mobile {
        width: 80px;
        min-width: 80px;
        height: 60px;
    }
    
    .car-thumbnail-placeholder-mobile {
        width: 80px;
        height: 60px;
    }
    
    .car-info-mobile {
        font-size: 0.85rem;
    }
    
    .car-badges-mobile .badge {
        font-size: 0.75rem;
    }
    
    /* 모바일 페이징 컨테이너 */
    .pagination-container {
        flex-wrap: wrap;
        gap: 0.5rem;
    }
    
    .pagination-mobile {
        width: 100%;
        max-width: 100%;
        overflow: hidden;
        justify-content: center;
        flex-wrap: nowrap;
    }
    
    .pagination-mobile .page-link {
        padding: 0.5rem 0.75rem;
        font-size: 0.875rem;
    }
    
    .pagination-mobile .page-item:first-child .page-link {
        border-top-left-radius: 0.375rem;
        border-bottom-left-radius: 0.375rem;
    }
    
    .pagination-mobile .page-item:last-child .page-link {
        border-top-right-radius: 0.375rem;
        border-bottom-right-radius: 0.375rem;
    }
    
    /* 모바일에서 페이징이 화면을 벗어나지 않도록 */
    .pagination-mobile .page-item {
        flex-shrink: 0;
    }
}

/* Popover 스타일 */
.popover {
    max-width: 400px;
}

.popover-body {
    max-height: 300px;
    overflow-y: auto;
}

/* 링크 스타일 */
.underline-blue {
    color: #0d6efd;
    text-decoration: underline;
    cursor: pointer;
}

.underline-blue:hover {
    color: #0a58ca;
}

/* 클릭 방지 스타일 */
.nopointer {
    cursor: default !important;
}

/* 스코어 강조 스타일 (딜러 고객을 위해) */
.car-table tbody tr:hover .badge.custom-badge {
    transform: scale(1.05);
    transition: transform 0.2s;
}

/* 사고/교체 정보 강조 */
.badge.custom-badge.mid-high,
.badge.custom-badge.high {
    font-weight: 500;
}

/* 성능기록 및 관심 배지 색상 - common.css의 글로벌 스타일 사용 */

.badge.custom-badge.performance-unknown i {
    margin-right: 4px;
}

/* 사고/보험/특이이력 컬럼 스타일 */
.accident-insurance-history {
    font-size: 0.85rem;
    line-height: 1.6;
}

.accident-insurance-history .badge {
    font-size: 0.7rem;
    font-weight: 500;
    padding: 3px 6px;
}

.accident-insurance-history .text-danger {
    font-size: 0.85rem;
    font-weight: 500;
}

.accident-insurance-history .text-danger i {
    margin-right: 4px;
}