/* --- Konfigurasi Dasar & Palet Warna Publik --- */
:root {
    --primary-color: #0D284D; /* Biru Tua */
    --secondary-color: #FFFFFF;
    --accent-color: #FF6700;  /* Oranye */
    --text-dark: #212529;
    --text-light: #F8F9FA;
    --body-bg: #FDFDFD;
}

body {
    font-family: 'Montserrat', sans-serif;
    background-color: var(--body-bg);
    color: var(--text-dark);
}

/* --- Navbar --- */
.navbar-brand {
    font-weight: 700;
    color: var(--primary-color) !important;
}

/* --- Hero Section --- */
.hero-section {
    position: relative;
    padding: 12rem 0;
    background: url('https://images.unsplash.com/photo-1552519507-da3b142c6e3d?q=80&w=2070&auto=format&fit=crop') no-repeat center center;
    background-size: cover;
    color: var(--text-light);
}
.hero-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(to right, rgba(13, 40, 77, 0.9), rgba(13, 40, 77, 0.6));
}
.hero-section .container {
    position: relative;
    z-index: 2;
}
.hero-section h1 {
    font-weight: 700;
    font-size: 3.5rem;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.3);
}
.hero-section p {
    font-size: 1.2rem;
    max-width: 600px;
     margin: 0 auto;
}

/* --- Formulir Perbandingan --- */
.comparison-form-box {
    background-color: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    padding: 2rem;
    border-radius: 1rem;
    margin-top: 2rem;
}
.comparison-form-box .form-select {
    padding: 1rem;
    background-color: rgba(255,255,255,0.9);
    border: none;
    font-weight: 500;
}
.comparison-form-box .vs-icon {
    font-size: 2rem;
    color: var(--accent-color);
    font-weight: 700;
}
.comparison-form-box .btn-compare {
    background-color: var(--accent-color);
    color: var(--text-light);
    border: none;
    padding: 1rem 2rem;
    font-weight: 600;
    width: 100%;
    transition: all 0.3s ease;
}
.comparison-form-box .btn-compare:hover {
    background-color: #E65C00;
    transform: translateY(-2px);
    box-shadow: 0 4px 10px rgba(0,0,0,0.2);
}

/* --- Section Styling --- */
.section {
    padding: 6rem 0;
}
.section-title {
    font-weight: 700;
    margin-bottom: 1rem;
}
.section-subtitle {
    color: #6c757d;
    max-width: 600px;
    margin: 0 auto 4rem auto;
}

/* --- Kartu Mobil Unggulan --- */
.car-card {
    border: 1px solid #e9ecef;
    border-radius: 0.75rem;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(0,0,0,0.05);
    transition: all 0.3s ease;
}
.car-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0,0,0,0.1);
}
.car-card-img img {
    width: 100%;
    height: 200px;
    object-fit: cover;
}
.car-card-body {
    padding: 1.5rem;
}
.car-card-title {
    font-weight: 600;
    margin-bottom: 0.5rem;
}
.car-card-brand {
    color: #6c757d;
    font-size: 0.9rem;
    margin-bottom: 1rem;
}
.car-card-spec {
    display: flex;
    justify-content: space-between;
    font-size: 0.85rem;
    color: var(--primary-color);
}

/* --- Section "Cara Kerja" --- */
.how-it-works-item {
    padding: 2rem;
}
.how-it-works-item .icon {
    font-size: 3rem;
    color: var(--accent-color);
    margin-bottom: 1rem;
}

/* --- Footer --- */
.footer {
    background-color: var(--primary-color);
    color: rgba(255, 255, 255, 0.8);
    padding: 4rem 0;
}
.footer h5 {
    color: #fff;
    font-weight: 600;
    margin-bottom: 1.5rem;
}
.footer a {
    color: rgba(255, 255, 255, 0.8);
    text-decoration: none;
    transition: color 0.2s;
}
.footer a:hover {
    color: #fff;
}
.footer .social-icons a {
    font-size: 1.5rem;
    margin-right: 1.5rem;
}
.footer .copyright {
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    padding-top: 2rem;
    margin-top: 2rem;
}
/* --- Halaman Compare --- */
.compare-page-header {
    background-color: var(--primary-color);
    padding: 3rem 0;
    color: var(--text-light);
}

.compare-car-info {
    text-align: center;
}
.compare-car-info img {
    max-width: 100%;
    height: 200px;
    object-fit: cover;
    border-radius: 1rem;
    border: 4px solid var(--secondary-color);
    box-shadow: 0 8px 25px rgba(0,0,0,0.3);
    margin-bottom: 1.5rem;
}
.compare-car-info h2 {
    font-weight: 600;
    color: var(--text-light);
}
.compare-car-info h3 {
    font-size: 1.1rem;
    font-weight: 500;
    color: rgba(255,255,255,0.7);
}

.compare-vs-separator {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 100%;
    font-size: 3rem;
    font-weight: 700;
    color: var(--accent-color);
}

.spec-section-summary {
    margin-top: 5rem;
    padding-top: 4rem;
    text-align: center; /* Tambahkan ini */
    /* ... properti lain ... */
}


.spec-section-summary .row {
    display: flex;
    flex-wrap: wrap;
    gap: 20px; /* Atau nilai lain */
    justify-content: center; /* Tambahkan ini untuk memusatkan horizontal */
}

.spec-table-container {
    border: 1px solid #e9ecef;
    border-radius: 0.75rem;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(0,0,0,0.05);
    margin-bottom: 2rem;
}
.spec-table-container .card-header {
    background-color: #f8f9fa;
    font-weight: 600;
    font-size: 1.2rem;
    padding: 1rem 1.5rem;
}
.spec-table {
    width: 100%;
    margin-bottom: 0;
}
.spec-table td {
    padding: 1rem 1.5rem;
    border-bottom: 1px solid #e9ecef;
}
.spec-table tr:last-child td {
    border-bottom: none;
}
.spec-table td:first-child {
    font-weight: 600;
    color: #495057;
    width: 34%;
}
.spec-table td:not(:first-child) {
    text-align: center;
    width: 33%;
}

/* Style untuk sel pemenang */
.is-winner {
    background-color: #e8f5e9; /* Hijau sangat muda */
    font-weight: 600 !important;
    color: #2e7d32 !important;
    transition: background-color 0.4s ease-in-out; /* Tambahkan baris ini */
}

.winner-check {
    color: #2e7d32;
    margin-left: 8px;
}

.back-link {
    display: inline-block;
    margin: 2rem 0;
    color: var(--primary-color);
    font-weight: 600;
}
.back-link:hover {
    color: var(--accent-color);
}
/* --- Link Kartu Mobil di Homepage --- */
a.car-card-link {
    text-decoration: none;
    color: inherit; /* Mewarisi warna teks dari parent, bukan biru default */
}

/* --- Halaman Detail Mobil --- */
.car-gallery-main img {
    border-radius: 1rem;
    width: 100%;
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
}

.car-main-info .car-title {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--primary-color);
}

.car-main-info .car-brand {
    font-size: 1.5rem;
    font-weight: 500;
    color: var(--text-dark);
    margin-top: -10px;
}

.price-box {
    background-color: #f8f9fa;
    border-left: 5px solid var(--accent-color);
    padding: 1.5rem;
    border-radius: 0.5rem;
}

.price-box .price-label {
    font-size: 0.9rem;
    color: var(--text-dark);
}

.price-box .price-value {
    font-size: 2rem;
    font-weight: 700;
    color: var(--primary-color);
}

.key-specs-box .spec-item {
    display: flex;
    flex-direction: column;
    padding: 1rem;
    border: 1px solid #dee2e6;
    border-radius: 0.5rem;
}

.key-specs-box .spec-item i {
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
    color: var(--accent-color);
}

.key-specs-box .spec-item span {
    font-size: 0.8rem;
    color: #6c757d;
}

.key-specs-box .spec-item strong {
    font-size: 1rem;
    color: var(--text-dark);
}

.full-specs-section .table th {
    width: 30%;
    background-color: #f8f9fa;
    font-weight: 600;
}
/* --- Halaman Katalog --- */
.car-card-link-img { display: block; }
.car-card-link-title {
    text-decoration: none;
    color: var(--text-dark);
    transition: color 0.2s;
}
.car-card-link-title:hover {
    color: var(--accent-color);
}
.btn-outline-primary {
    border-color: var(--primary-color);
    color: var(--primary-color);
}
.btn-outline-primary:hover {
    background-color: var(--primary-color);
    color: #fff;
}

/* --- Compare Tray --- */
.compare-tray {
    position: fixed;
    bottom: -100px; /* Mulai dari posisi tersembunyi */
    left: 0;
    width: 100%;
    height: 90px;
    background-color: var(--primary-color);
    box-shadow: 0 -4px 15px rgba(0,0,0,0.2);
    z-index: 1000;
    transition: bottom 0.4s ease-in-out;
}
.compare-tray.show {
    bottom: 0; /* Muncul ke atas */
}
.compare-tray-cars {
    display: flex;
    gap: 1.5rem;
}
.compare-item, .compare-item-placeholder {
    display: flex;
    align-items: center;
    background: rgba(255,255,255,0.1);
    border-radius: 8px;
    padding: 0.5rem 1rem;
    color: #fff;
    width: 250px;
}
.compare-item-placeholder {
    border: 2px dashed rgba(255,255,255,0.3);
    justify-content: center;
    color: rgba(255,255,255,0.5);
}
.compare-item img {
    width: 60px;
    height: 40px;
    object-fit: cover;
    border-radius: 4px;
    margin-right: 1rem;
}
.compare-item span {
    flex-grow: 1;
    font-size: 0.9rem;
    font-weight: 500;
}
.remove-item {
    background: none;
    border: none;
    color: #fff;
    font-size: 1.5rem;
    line-height: 1;
    opacity: 0.7;
    cursor: pointer;
}
.remove-item:hover { opacity: 1; }
.btn-close-tray {
    background: none;
    border: none;
    color: #fff;
    font-size: 2rem;
    line-height: 1;
    margin-left: 1.5rem;
}
/* Memberi ruang untuk Compare Tray agar tidak menutupi footer */
body.compare-tray-active {
    padding-bottom: 90px; /* Sesuaikan dengan tinggi .compare-tray */
    transition: padding-bottom 0.4s ease-in-out;
}

/* --- Style untuk Tombol di Compare Tray --- */
.compare-tray .btn-compare {
    background-color: var(--accent-color); /* Warna oranye */
    color: var(--secondary-color); /* Warna putih */
    border-radius: 8px;
    font-weight: 600;
    padding: 0.75rem 1.5rem;
    transition: all 0.3s ease;
    border: none;
}

/* Style saat tombol aktif (bisa diklik) dan di-hover */
.compare-tray .btn-compare:not(:disabled):hover {
    background-color: #E65C00; /* Oranye lebih gelap */
    transform: translateY(-2px);
}

/* Style saat tombol non-aktif (disabled) */
.compare-tray .btn-compare:disabled {
    background-color: rgba(255, 255, 255, 0.1);
    color: rgba(255, 255, 255, 0.4);
    cursor: not-allowed;
}
/* --- Animasi Transisi Halaman --- */

/* State awal halaman saat dimuat: transparan */
body.fade-in {
    opacity: 0;
    transition: opacity 0.5s ease-in-out;
}

/* State saat halaman siap ditampilkan: terlihat */
body.fade-in.visible {
    opacity: 1;
}

/* State saat halaman akan ditutup: kembali transparan */
body.fade-out {
    opacity: 0;
    transition: opacity 0.5s ease-in-out;
}
/* --- Style untuk Kolom Pencarian di Hero Section --- */
.search-container {
    position: relative;
}
.search-icon {
    position: absolute;
    top: 50%;
    left: 1.25rem;
    transform: translateY(-50%);
    color: #aaa;
}
.search-input {
    padding: 1rem 1rem 1rem 3rem !important; /* Override Bootstrap padding */
    background-color: rgba(255,255,255,0.9) !important;
    border: none !important;
    font-weight: 500 !important;
    border-radius: 0.5rem !important;
}
.search-results {
    position: absolute;
    top: 100%;
    left: 0;
    width: 100%;
    background-color: #fff;
    border-radius: 0 0 0.5rem 0.5rem;
    box-shadow: 0 8px 15px rgba(0,0,0,0.1);
    z-index: 10;
    max-height: 300px;
    overflow-y: auto;
    display: none; /* Sembunyi secara default */
}
.result-item {
    display: flex;
    align-items: center;
    padding: 0.75rem 1rem;
    cursor: pointer;
    transition: background-color 0.2s;
}
.result-item:hover {
    background-color: #f8f9fa;
}
.result-item img {
    width: 60px;
    height: 40px;
    object-fit: cover;
    border-radius: 4px;
    margin-right: 1rem;
}
.result-item-info span {
    display: block;
    font-size: 0.8rem;
    color: #6c757d;
}
.result-item-info strong {
    font-weight: 600;
     color: #343a40;
}
/* --- Style untuk Kontrol di Halaman Katalog --- */
.catalog-controls {
    background-color: #f8f9fa;
    padding: 2rem;
    border-radius: 0.75rem;
}

.search-form-catalog .form-control {
    padding: 0.75rem 1rem;
}

.search-form-catalog .btn {
    padding: 0.75rem 1.25rem;
}

.brand-filter {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    justify-content: center;
    border-top: 1px solid #e9ecef;
    padding-top: 1.5rem;
}

.brand-filter a {
    display: inline-block;
    padding: 0.5rem 1rem;
    color: var(--primary-color);
    text-decoration: none;
    border: 1px solid #dee2e6;
    border-radius: 2rem; 
    font-weight: 500;
    transition: all 0.2s ease;
}

.brand-filter a:hover {
    background-color: #e9ecef;
    border-color: #ced4da;
}

.brand-filter a.active {
    background-color: var(--primary-color);
    color: #fff;
    border-color: var(--primary-color);
}
.summary-card {
    background-color: #f8f9fa;
    border: 1px solid #e9ecef;
    border-radius: 0.75rem;
    padding: 1.5rem;
    height: 100%;
    text-align: left; 
}

.comparison-form-box .row {
    align-items: center;
}

.comparison-form-box .vs-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 100%;
}
.comparison-inner-flex {
    display: flex;
    align-items: center; 
    gap: 1rem;
}


.comparison-inner-flex .search-container {
    flex: 1; 
    position: relative;
}


.comparison-inner-flex .vs-icon {
    font-size: 2rem;
    color: var(--accent-color);
    font-weight: 700;
}