/**
 * Vehicles Page Styles
 * CircuiTek Limited
 */

/* Hero 區塊樣式 */
.vehicle-hero {
    position: relative;
    background-attachment: fixed;
    background-position: center;
    background-repeat: no-repeat;
    background-size: cover;
    display: flex;
    align-items: center;
    color: white;
    width: 100vw;
    margin-left: calc(-50vw + 50%);
    min-height: 40vh;
}

.vehicle-hero .blur {
    backdrop-filter: blur(10px);
    position: relative;
    display: flex;
    align-items: center;
    color: white;
    width: 100vw;
    margin-left: calc(-50vw + 50%);
    min-height: 40vh;
}

.vehicle-hero .text-shadow {
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.7);
}

.vehicle-hero .text-white-75 {
    color: rgba(255, 255, 255, 0.9) !important;
}

.vehicle-hero .btn-outline-light {
    border-width: 2px;
    font-weight: 600;
    transition: all 0.3s ease;
}

.vehicle-hero .btn-outline-light:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.3);
}

/* 響應式調整 Hero */
@media (max-width: 768px) {
    .vehicle-hero {
        min-height: 30em !important;
        background-attachment: scroll;
        padding-top: 60px; /* 手機版導航欄較小 */
    }
    
    .vehicle-hero .display-4 {
        font-size: 2rem;
    }
    
    .vehicle-hero .lead {
        font-size: 1rem;
    }
    
    .vehicle-hero .d-flex {
        flex-direction: column;
        align-items: start;
    }
    
    .vehicle-hero .btn {
        width: 100%;
        margin-bottom: 0.5rem;
    }
}

/* 車輛卡片樣式 */
.vehicle-card {
    transition: all 0.3s ease;
    cursor: pointer;
    border: none;
    border-radius: 12px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.vehicle-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}

.vehicle-card:hover .hover-overlay {
    opacity: 0.1 !important;
}

/* 半透明白色文字 */
.text-white-75 {
    color: rgba(255, 255, 255, 0.9) !important;
}

.vehicle-card:hover .text-white-75 {
    color: rgba(255, 255, 255, 1) !important;
}

/* 過渡效果 */
.transition-opacity {
    transition: opacity 0.3s ease;
}

/* 預設背景圖片樣式 */
.vehicle-card[style*="default-car.svg"] {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%) !important;
}

.vehicle-card[style*="default-car.svg"]::before {
    content: '\f1b9';
    font-family: 'Font Awesome 5 Free';
    font-weight: 900;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 4rem;
    color: rgba(255, 255, 255, 0.3);
    z-index: 0;
}

/* 無圖片時的預設樣式 */
.vehicle-card[style*="default-car.svg"] .position-absolute {
    z-index: 1;
}

/* 響應式調整 */
@media (max-width: 768px) {
    .vehicle-card {
        min-height: 250px !important;
    }
    
    .vehicle-card .card-title {
        font-size: 1.1rem;
    }
    
    .vehicle-card .card-subtitle {
        font-size: 0.9rem;
    }
}

/* 篩選器樣式 */
.filter-card {
    background: rgba(248, 249, 250, 0.8);
    backdrop-filter: blur(5px);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.filter-stats {
    animation: fadeInUp 0.3s ease;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* 無結果提示樣式 */
.no-results {
    animation: fadeIn 0.5s ease;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

/* 車輛項目動畫 */
.vehicle-item {
    animation: fadeInScale 0.3s ease forwards;
}

@keyframes fadeInScale {
    from {
        opacity: 0;
        transform: scale(0.95);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

/* 搜尋過濾器增強樣式 */
.form-select:focus,
.form-control:focus {
    border-color: #007bff;
    box-shadow: 0 0 0 0.2rem rgba(0, 123, 255, 0.25);
}

/* 品牌區塊標題樣式 */
.vehicle-make-section h2 {
    font-weight: 600;
    color: #2c3e50;
    position: relative;
}

.vehicle-make-section h2::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 50px;
    height: 3px;
    background: linear-gradient(90deg, #007bff, #0056b3);
    border-radius: 2px;
}

/* 改裝項目徽章樣式 */
.badge.bg-primary {
    background: linear-gradient(45deg, #007bff, #0056b3) !important;
    box-shadow: 0 2px 4px rgba(0, 123, 255, 0.3);
}

/* Facebook 按鈕樣式 */
.btn-facebook {
    background: #1877f2;
    border-color: #1877f2;
    color: white;
    transition: all 0.3s ease;
}

.btn-facebook:hover {
    background: #166fe5;
    border-color: #166fe5;
    color: white;
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(24, 119, 242, 0.3);
}

/* 載入動畫 */
.loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(255, 255, 255, 0.9);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9999;
}

.loading-spinner {
    width: 40px;
    height: 40px;
    border: 4px solid #f3f3f3;
    border-top: 4px solid #007bff;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}