/* ========================================
   차량 목록 페이지
======================================== */

.vehicles-page {
    padding-top: 80px; /* 헤더 높이 */
}

/* ========================================
   페이지 헤더
======================================== */

.page-header {
    background: linear-gradient(135deg, #1e3a8a 0%, #3b82f6 100%);
    padding: 48px 0;
    position: relative;
    overflow: hidden;
}

.page-header::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image:
        radial-gradient(circle at 20% 80%, rgba(255, 255, 255, 0.1) 0%, transparent 50%),
        radial-gradient(circle at 80% 20%, rgba(255, 255, 255, 0.08) 0%, transparent 50%);
    pointer-events: none;
}

.page-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 40px;
}

.page-title {
    font-size: 2rem;
    font-weight: 700;
    color: #ffffff;
    margin-bottom: 8px;
    letter-spacing: -1px;
}

.page-subtitle {
    font-size: 1rem;
    color: rgba(255, 255, 255, 0.8);
    margin-bottom: 24px;
}

/* ========================================
   빠른 필터 탭
======================================== */

.quick-filter-tabs {
    display: flex;
    gap: 8px;
    margin-bottom: 16px;
    flex-wrap: wrap;
}

.quick-tab {
    padding: 8px 16px;
    background: rgba(255, 255, 255, 0.15);
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 20px;
    font-size: 0.85rem;
    color: rgba(255, 255, 255, 0.9);
    text-decoration: none;
    transition: all 0.3s;
    backdrop-filter: blur(4px);
}

.quick-tab:hover {
    background: rgba(255, 255, 255, 0.25);
    border-color: rgba(255, 255, 255, 0.5);
    color: #ffffff;
}

.quick-tab.active {
    background: #ffffff;
    border-color: #ffffff;
    color: #1e3a8a;
}

/* ========================================
   선택된 필터 태그
======================================== */

.active-filters {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.filter-tag {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 10px;
    background: rgba(255, 255, 255, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 6px;
    font-size: 0.8rem;
    color: #ffffff;
    backdrop-filter: blur(4px);
}

.tag-remove {
    background: none;
    border: none;
    padding: 0;
    font-size: 1.1rem;
    line-height: 1;
    color: rgba(255, 255, 255, 0.8);
    cursor: pointer;
    transition: color 0.3s;
}

.tag-remove:hover {
    color: #ffffff;
}

.clear-all-filters {
    background: none;
    border: none;
    padding: 6px 0;
    font-size: 0.8rem;
    color: rgba(255, 255, 255, 0.7);
    cursor: pointer;
    text-decoration: underline;
    transition: color 0.3s;
}

.clear-all-filters:hover {
    color: #fca5a5;
}

/* ========================================
   레이아웃
======================================== */

.vehicles-content {
    padding: 40px 0;
}

.vehicles-layout {
    display: grid;
    grid-template-columns: 280px 1fr;
    gap: 40px;
}

.vehicles-main {
    min-width: 0;
}

/* ========================================
   필터 사이드바
======================================== */

.filter-sidebar {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    padding: 24px;
    height: fit-content;
    position: sticky;
    top: 100px;
}

.filter-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 24px;
    padding-bottom: 16px;
    border-bottom: 1px solid #e2e8f0;
}

.filter-title {
    font-size: 1.1rem;
    font-weight: 600;
    color: #1a1a1a;
}

.filter-reset {
    background: none;
    border: none;
    color: #6b7280;
    font-size: 0.85rem;
    cursor: pointer;
    transition: color 0.3s;
}

.filter-reset:hover {
    color: #3b82f6;
}

/* ========================================
   필터 그룹
======================================== */

.filter-group {
    margin-bottom: 24px;
}

.filter-group:last-of-type {
    margin-bottom: 0;
}

.filter-group-title {
    font-size: 0.9rem;
    font-weight: 600;
    color: #1a1a1a;
    margin-bottom: 12px;
}

.filter-options {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

/* ========================================
   체크박스 & 라디오
======================================== */

.filter-checkbox,
.filter-radio {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    padding: 6px 0;
}

.filter-checkbox input,
.filter-radio input {
    width: 16px;
    height: 16px;
    accent-color: #3b82f6;
    cursor: pointer;
}

.filter-checkbox span,
.filter-radio span {
    font-size: 0.9rem;
    color: #4b5563;
}

.filter-checkbox:hover span,
.filter-radio:hover span {
    color: #1a1a1a;
}

/* ========================================
   필터 적용 버튼
======================================== */

.filter-submit {
    width: 100%;
    padding: 12px;
    background: #3b82f6;
    color: #ffffff;
    border: none;
    border-radius: 8px;
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    margin-top: 24px;
    transition: background 0.3s;
}

.filter-submit:hover {
    background: #2563eb;
}

/* ========================================
   반응형 (태블릿)
======================================== */

@media (max-width: 1024px) {
    .page-container {
        padding: 0 30px;
    }

    .vehicles-layout {
        grid-template-columns: 240px 1fr;
        gap: 30px;
    }
}

/* ========================================
   반응형 (모바일)
======================================== */

@media (max-width: 768px) {
    .page-header {
        padding: 32px 0;
    }

    .page-container {
        padding: 0 20px;
    }

    .page-title {
        font-size: 1.6rem;
    }

    .vehicles-layout {
        grid-template-columns: 1fr;
        gap: 24px;
    }

    .filter-sidebar {
        position: static;
    }
}

/* ========================================
   리스트 헤더
======================================== */

.list-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 24px;
    padding-bottom: 16px;
    border-bottom: 1px solid #e2e8f0;
}

.list-info {
    display: flex;
    align-items: center;
    gap: 16px;
    flex-wrap: wrap;
}

.list-info .total-count {
    font-size: 0.95rem;
    color: #6b7280;
}

.list-info .total-count strong {
    color: #1a1a1a;
    font-weight: 600;
}

/* 인라인 필터 태그 (리스트 헤더용) */
.active-filters-inline {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.active-filters-inline .filter-tag {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 10px;
    background: #eff6ff;
    border: 1px solid #bfdbfe;
    border-radius: 16px;
    font-size: 0.8rem;
    color: #1e40af;
    text-decoration: none;
    transition: all 0.2s;
}

.active-filters-inline .filter-tag:hover {
    background: #dbeafe;
    border-color: #93c5fd;
}

.active-filters-inline .tag-remove {
    font-size: 1rem;
    line-height: 1;
    color: #60a5fa;
    font-weight: 500;
}

.active-filters-inline .filter-tag:hover .tag-remove {
    color: #2563eb;
}

.active-filters-inline .clear-all-filters {
    padding: 4px 8px;
    background: none;
    border: none;
    font-size: 0.8rem;
    color: #6b7280;
    text-decoration: underline;
    cursor: pointer;
    transition: color 0.2s;
}

.active-filters-inline .clear-all-filters:hover {
    color: #ef4444;
}

.list-controls {
    display: flex;
    align-items: center;
    gap: 16px;
}

.sort-select select {
    padding: 8px 12px;
    border: 1px solid #e2e8f0;
    border-radius: 6px;
    font-size: 0.85rem;
    color: #4b5563;
    background: #ffffff;
    cursor: pointer;
}

.sort-select select:focus {
    outline: none;
    border-color: #3b82f6;
}

.view-options {
    display: flex;
    gap: 4px;
}

.view-btn {
    padding: 8px;
    background: none;
    border: 1px solid #e2e8f0;
    border-radius: 6px;
    color: #9ca3af;
    cursor: pointer;
    transition: all 0.3s;
}

.view-btn:hover {
    color: #6b7280;
    border-color: #d1d5db;
}

.view-btn.active {
    color: #3b82f6;
    border-color: #3b82f6;
    background: #eff6ff;
}

/* ========================================
   차량 그리드
======================================== */

.vehicles-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
}

/* ========================================
   차량 카드
======================================== */

.vehicle-card {
    background: #ffffff;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    transition: transform 0.3s, box-shadow 0.3s;
    position: relative;
}

.vehicle-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 24px rgba(0, 0, 0, 0.12);
}

.vehicle-image {
    position: relative;
    aspect-ratio: 4/3;
    background: #f1f5f9;
    overflow: hidden;
}

.vehicle-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s;
}

.vehicle-card:hover .vehicle-image img {
    transform: scale(1.05);
}

.image-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #cbd5e1;
}

.vehicle-badge {
    position: absolute;
    top: 12px;
    left: 12px;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 0.75rem;
    font-weight: 600;
}

.badge-popular {
    background: #fef3c7;
    color: #d97706;
}

.badge-new {
    background: #dcfce7;
    color: #16a34a;
}

.badge-recommended {
    background: #dbeafe;
    color: #2563eb;
}

.favorite-btn {
    position: absolute;
    top: 12px;
    right: 12px;
    padding: 8px;
    background: rgba(255, 255, 255, 0.9);
    border: none;
    border-radius: 50%;
    color: #9ca3af;
    cursor: pointer;
    transition: all 0.3s;
}

.favorite-btn:hover {
    color: #ef4444;
    background: #ffffff;
}

.vehicle-info {
    padding: 16px;
}

/* 1줄: 차량 이름 (한줄, 넘치면 ...) */
.vehicle-name {
    font-size: 1rem;
    font-weight: 600;
    color: #1a1a1a;
    margin-bottom: 6px;
    letter-spacing: -0.3px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* 2줄: 연식 + 키로수 */
.vehicle-year-mileage {
    display: flex;
    gap: 12px;
    margin-bottom: 4px;
    font-size: 0.85rem;
    color: #6b7280;
}

/* 3줄: 연료 */
.vehicle-fuel {
    font-size: 0.85rem;
    color: #6b7280;
    margin-bottom: 8px;
}

/* 4줄: 차량 가격 */
.vehicle-price {
    font-size: 1.15rem;
    font-weight: 700;
    color: #3b82f6;
}

/* ========================================
   페이지네이션
======================================== */

.vehicles-pagination {
    margin-top: 48px;
    display: flex;
    justify-content: center;
}

.pagination-list {
    display: flex;
    align-items: center;
    gap: 4px;
    list-style: none;
    padding: 0;
    margin: 0;
}

.pagination-link {
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 36px;
    height: 36px;
    padding: 0 12px;
    border: 1px solid #e2e8f0;
    border-radius: 6px;
    font-size: 0.9rem;
    color: #4b5563;
    text-decoration: none;
    transition: all 0.3s;
}

.pagination-link:hover:not(.disabled):not(.active) {
    border-color: #3b82f6;
    color: #3b82f6;
}

.pagination-link.active {
    background: #3b82f6;
    border-color: #3b82f6;
    color: #ffffff;
}

.pagination-link.disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.pagination-ellipsis {
    padding: 0 8px;
    color: #9ca3af;
}

/* ========================================
   반응형 (리스트 그리드)
======================================== */

@media (max-width: 1200px) {
    .vehicles-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    /* 페이지 헤더 모바일 */
    .page-header {
        padding: 32px 0;
    }

    .page-container {
        padding: 0 20px;
    }

    .page-title {
        font-size: 1.5rem;
    }

    .page-subtitle {
        font-size: 0.9rem;
        margin-bottom: 16px;
    }

    /* 빠른 필터 탭 - 가로 스크롤 */
    .quick-filter-tabs {
        flex-wrap: nowrap;
        overflow-x: auto;
        margin-left: -20px;
        margin-right: -20px;
        padding: 0 20px 8px;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none;
    }

    .quick-filter-tabs::-webkit-scrollbar {
        display: none;
    }

    .quick-tab {
        flex-shrink: 0;
        font-size: 0.8rem;
        padding: 6px 12px;
    }

    /* 필터 태그 모바일 */
    .active-filters {
        margin-left: -20px;
        margin-right: -20px;
        padding: 0 20px;
        overflow-x: auto;
        flex-wrap: nowrap;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none;
    }

    .active-filters::-webkit-scrollbar {
        display: none;
    }

    .filter-tag {
        flex-shrink: 0;
    }

    /* 필터 사이드바 - 숨기고 버튼으로 대체 */
    .filter-sidebar {
        display: none;
    }

    /* 모바일 필터 버튼 */
    .mobile-filter-btn {
        display: flex;
        align-items: center;
        gap: 6px;
        padding: 10px 16px;
        background: #ffffff;
        border: 1px solid #e2e8f0;
        border-radius: 8px;
        font-size: 0.85rem;
        color: #4b5563;
        cursor: pointer;
        margin-bottom: 16px;
    }

    .mobile-filter-btn svg {
        width: 16px;
        height: 16px;
    }

    /* 리스트 헤더 */
    .list-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 12px;
    }

    /* 차량 그리드 - 세로 카드 1열 */
    .vehicles-grid {
        grid-template-columns: 1fr;
        gap: 16px;
    }

    .vehicle-info {
        padding: 12px;
    }

    .vehicle-name {
        font-size: 0.9rem;
    }

    .vehicle-year-mileage {
        font-size: 0.75rem;
        gap: 6px;
    }

    .vehicle-fuel {
        font-size: 0.75rem;
        margin-bottom: 6px;
    }

    .vehicle-price {
        font-size: 1rem;
    }

    /* 페이지네이션 */
    .vehicles-pagination {
        margin-top: 32px;
    }

    .pagination-link {
        min-width: 32px;
        height: 32px;
        font-size: 0.8rem;
    }
}
