/* style.css - OtoDriveZone Production Final Edition */

:root {
   --primary: #007bff;
   --primary-hover: #0056b3;
   --bg-main: #f8fafc;
   --text-dark: #1e293b;
   --text-muted: #64748b;
   --card-bg: #ffffff;
   --border-color: #e2e8f0;
   --header-height: 70px;
   --radius-lg: 16px;
   --radius-md: 12px;
}

/* 1. GLOBAL & LAYOUT */
body {
   font-family: 'Inter', 'Segoe UI', Roboto, sans-serif;
   margin: 0;
   padding: 0;
   background-color: var(--bg-main);
   color: var(--text-dark);
   line-height: 1.6;
}

.container {
   max-width: 1200px;
   margin: 0 auto;
   padding: 20px;
}

.main-layout {
   display: grid;
   grid-template-columns: 1fr 300px;
   gap: 32px;
   align-items: start;
}

/* 2. HEADER UTAMA (MODERN GLASS) */
.main-header {
   background: rgba(255, 255, 255, 0.9);
   backdrop-filter: blur(12px);
   -webkit-backdrop-filter: blur(12px);
   height: var(--header-height);
   position: sticky;
   top: 0;
   z-index: 1000;
   border-bottom: 1px solid var(--border-color);
   box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05);
}

.header-container {
   max-width: 1200px;
   margin: 0 auto;
   height: 100%;
   display: flex;
   justify-content: space-between;
   align-items: center;
   padding: 0 20px;
}

.logo-section {
   display: flex;
   flex-direction: column; /* Mengatur Judul & Tagline berbaris ke bawah */
   align-items: flex-start;
   justify-content: center;
   cursor: pointer;
}

.site-name {
   font-size: 1.4rem;
   font-weight: 800;
   letter-spacing: -0.5px;
   line-height: 1.1; /* Merapatkan jarak dengan tagline */
}

.site-name span {
   color: var(--primary);
}

/* Penambahan Style Tagline */
.site-tagline {
   font-size: 10px;
   font-weight: 500;
   color: var(--text-muted);
   text-transform: uppercase;
   letter-spacing: 0.3px;
   margin-top: 2px;
}

.main-nav {
   display: flex;
   gap: 8px;
}

.nav-link {
   background: none;
   border: none;
   font-weight: 600;
   color: var(--text-muted);
   cursor: pointer;
   padding: 8px 16px;
   border-radius: 8px;
   transition: 0.2s;
}

.nav-link:hover,
.nav-link.active {
   color: var(--primary);
   background: rgba(0, 123, 255, 0.08);
}

/* 3. BRAND GRID & CARDS (SCROLLABLE & MOBILE 3-COL) */
h2#mainTitle {
   text-align: left;
   font-size: 1.5rem;
   font-weight: 800;
   margin-bottom: 24px;
}

.brand-scroll-container {
   background: var(--card-bg);
   border: 1px solid var(--border-color);
   border-radius: var(--radius-lg);
   padding: 20px;
   max-height: 480px;
   overflow-y: auto;
   box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.02);
}

.brand-scroll-container::-webkit-scrollbar {
   width: 5px;
}

.brand-scroll-container::-webkit-scrollbar-thumb {
   background: #cbd5e0;
   border-radius: 10px;
}

.grid {
   display: grid;
   grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
   gap: 16px;
}

.card {
   background: var(--bg-main);
   border-radius: var(--radius-md);
   padding: 16px 10px;
   border: 1px solid var(--border-color);
   display: flex;
   flex-direction: column;
   align-items: center;
   cursor: pointer;
   transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.card:hover {
   transform: translateY(-4px);
   background: white;
   border-color: var(--primary);
   box-shadow: 0 8px 15px -5px rgba(0, 0, 0, 0.1);
}

.card img {
   width: 50px;
   height: 40px;
   object-fit: contain;
   margin-bottom: 10px;
   transition: transform 0.2s;
}

.card:hover img {
   transform: scale(1.1);
}

.card span {
   font-size: 12px;
   font-weight: 700;
   color: var(--text-dark);
   text-align: center;
}

/* 4. SIDEBAR */
.sidebar-section {
   background: var(--card-bg);
   padding: 24px;
   border-radius: var(--radius-lg);
   border: 1px solid var(--border-color);
   margin-bottom: 24px;
}

.sidebar-section h3 {
   font-size: 14px;
   font-weight: 800;
   text-transform: uppercase;
   border-bottom: 2px solid var(--primary);
   padding-bottom: 8px;
   margin-top: 0;
}

.sidebar-list {
   list-style: none;
   padding: 0;
   margin: 0;
}

.sidebar-list li {
   padding: 12px 0;
   border-bottom: 1px solid #f1f5f9;
   cursor: pointer;
   transition: 0.2s;
}

.sidebar-list li:hover .side-model {
   color: var(--primary);
}

.side-brand {
   font-weight: 800;
   font-size: 10px;
   color: var(--primary);
   text-transform: uppercase;
}

.side-model {
   font-size: 14px;
   font-weight: 600;
   display: block;
}

/* 5. SPECIFICATION HEADER & BACK BUTTON */
.header-nav {
   margin-bottom: 20px;
}

.back-btn {
   background: transparent;
   color: var(--primary);
   border: 1px solid var(--primary);
   padding: 8px 16px;
   border-radius: 8px;
   font-weight: 600;
   cursor: pointer;
   display: flex;
   align-items: center;
   gap: 8px;
}

.variant-info-container {
   display: flex;
   align-items: center;
   gap: 24px;
   background: var(--card-bg);
   padding: 30px;
   border-radius: var(--radius-lg);
   border: 1px solid var(--border-color);
   margin-bottom: 24px;
}

.brand-logo-fixed {
   width: 100px;
   height: 70px;
   object-fit: contain;
   flex-shrink: 0;
}

.model-title {
   font-size: 28px !important;
   font-weight: 800 !important;
   margin: 0 !important;
   text-align: left !important;
}

.model-description {
   color: var(--text-muted);
   font-size: 14px;
   text-align: left !important;
}

/* 6. VARIANT TABS (REFINED WRAPPING) */
.variant-selection-wrapper {
   margin-bottom: 24px;
}

.variant-tab-container {
   display: flex;
   flex-wrap: wrap; 
   gap: 8px;
   padding-bottom: 15px;
   border-bottom: 2px solid #eee;
}

.variant-btn {
   padding: 10px 18px;
   background: white;
   border: 1px solid var(--border-color);
   border-radius: 100px;
   font-weight: 600;
   cursor: pointer;
   transition: 0.2s;
   font-size: 13px;
}

.variant-btn:hover,
.variant-btn.active {
   background: var(--primary);
   color: white;
   border-color: var(--primary);
}

/* 7. ACCORDION (DRAWER) */
.accordion {
   background: var(--card-bg);
   border: 1px solid var(--border-color);
   padding: 18px 24px;
   border-radius: var(--radius-md);
   font-weight: 700;
   margin-top: 12px;
   display: flex;
   justify-content: space-between;
   cursor: pointer;
   width: 100%;
}

.accordion.active {
   border-bottom-left-radius: 0;
   border-bottom-right-radius: 0;
   background: #fafafa;
}

.panel {
   background: white;
   border: 1px solid var(--border-color);
   border-top: none;
   padding: 0 24px;
   border-bottom-left-radius: var(--radius-md);
   border-bottom-right-radius: var(--radius-md);
}

.spec-row {
   display: flex;
   justify-content: space-between;
   padding: 14px 0;
   border-bottom: 1px solid #f1f5f9;
}

.spec-label {
   color: var(--text-muted);
   font-size: 14px;
   flex: 1;
}

.spec-value {
   font-weight: 600;
   font-size: 14px;
   flex: 1;
   text-align: right;
}

/* 8. DIALOG BOX (MODAL REFINED) */
.dialog-box {
   position: fixed;
   top: 50%;
   left: 50%;
   transform: translate(-50%, -50%);
   background: white;
   border-radius: 24px;
   padding: 24px;
   z-index: 10001;
   box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.3), 0 0 0 100vw rgba(0, 0, 0, 0.5);
   width: 90%;
   max-width: 380px;
   display: none;
   flex-direction: column;
   max-height: 80vh;
}

.dialog-box h3 {
   margin: 0 0 16px 0;
   font-size: 1.1rem;
   font-weight: 800;
   text-align: center;
   color: var(--text-dark);
}

.models-list {
   display: grid;
   grid-template-columns: repeat(2, 1fr);
   gap: 8px;
   margin: 15px 0;
   max-height: 300px;
   overflow-y: auto;
   padding: 4px;
}

.model-item {
   padding: 10px 6px;
   background: #f8fafc;
   border-radius: 10px;
   font-weight: 600;
   cursor: pointer;
   transition: all 0.2s ease;
   text-align: center;
   font-size: 12px;
   border: 1px solid var(--border-color);
   display: flex;
   align-items: center;
   justify-content: center;
   min-height: 40px;
}

.model-item:hover {
   background: var(--primary);
   color: white;
   border-color: var(--primary);
   transform: translateY(-2px);
}

.btn-cancel {
   width: 100%;
   padding: 12px;
   border: none;
   border-radius: 12px;
   background: #f1f5f9;
   color: var(--text-muted);
   font-weight: 700;
   font-size: 13px;
   cursor: pointer;
   margin-top: 5px;
}

/* 9. RESPONSIVE DESIGN */
@media (max-width: 900px) {
   .main-layout {
      grid-template-columns: 1fr;
   }
   .sidebar {
      order: 2;
      width: 100%;
   }
}

@media (max-width: 768px) {
   .main-header {
      height: auto;
      padding: 15px 0;
   }
   .header-container {
      flex-direction: column;
      gap: 15px;
   }
   /* Logo & tagline di mobile jadi rata tengah */
   .logo-section {
      align-items: center; 
      text-align: center;
   }
   .main-nav {
      width: 100%;
      justify-content: center;
      flex-wrap: wrap;
   }
}

@media (max-width: 480px) {
   .brand-scroll-container {
      padding: 12px;
      max-height: 400px;
   }
   .grid {
      grid-template-columns: repeat(3, 1fr);
      gap: 8px;
   }
   .card { padding: 12px 5px; }
   .card img { width: 40px; height: 30px; }
   .card span { font-size: 10px; }

   .variant-info-container {
      flex-direction: column;
      text-align: center;
      padding: 20px;
   }
   .model-title {
      font-size: 22px !important;
      text-align: center !important;
   }
   .model-description { text-align: center !important; }
   .spec-row { flex-direction: column; gap: 4px; }
   .spec-value { text-align: left; }
   
   .variant-tab-container {
      justify-content: center;
   }
   .variant-btn {
      flex: 1 1 calc(50% - 10px);
      text-align: center;
      font-size: 12px;
      padding: 10px 5px;
   }
}

/* 10. SKELETONS & OTHERS */
.site-footer {
   margin-top: 60px;
   padding: 40px 20px;
   border-top: 1px solid var(--border-color);
   text-align: center;
}

.site-footer p {
   font-size: 13px;
   color: var(--text-muted);
   font-weight: 500;
   margin: 0;
}

.skeleton {
   background: linear-gradient(90deg, #f0f0f0 25%, #f8f8f8 50%, #f0f0f0 75%);
   background-size: 200% 100%;
   animation: shimmer 1.5s infinite;
}

@keyframes shimmer {
   0% { background-position: 200% 0; }
   100% { background-position: -200% 0; }
}

.sk-header { height: 120px; width: 100%; border-radius: 16px; margin-bottom: 20px; }
.sk-drawer { height: 50px; width: 100%; border-radius: 12px; margin-bottom: 10px; }
.sk-card { height: 110px; width: 100%; border-radius: 16px; }

@media (max-width: 350px) {
   .models-list { grid-template-columns: 1fr; }
}

/* ===============================
 * 11. HERO SPECS (ENGINE & DRIVETRAIN)
 * =============================== */
.hero-specs-section {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 40px 20px;
    margin-top: 12px;
    margin-bottom: 24px;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.02);
}

.hero-specs-header h3 {
    text-align: center;
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 2px;
    color: var(--text-muted);
    margin: 0 0 40px 0;
    font-weight: 700;
}

.hero-specs-grid {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 50px;
}

.hero-spec-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    width: 100%;
    position: relative;
}

.hero-spec-value {
    font-size: 4rem; /* Angka Hero Utama */
    font-weight: 200; /* Gaya Light ala BMW */
    color: var(--text-dark);
    line-height: 1;
    letter-spacing: -2px;
}

.hero-spec-label {
    font-size: 12px;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-top: 10px;
    font-weight: 600;
}

/* Garis Pemisah Antar Item (Kecuali yang terakhir) */
.hero-spec-item:not(:last-child):after {
    content: "";
    width: 40px;
    height: 2px;
    background: var(--primary);
    opacity: 0.2;
    margin-top: 40px;
    border-radius: 2px;
}

/* Responsif Mobile Hero Specs */
@media (max-width: 480px) {
    .hero-specs-section {
        padding: 30px 15px;
    }
    .hero-spec-value {
        font-size: 3.2rem; /* Ukuran sedikit mengecil di HP agar tidak pecah */
    }
    .hero-spec-label {
        font-size: 10px;
    }
}

/* ===============================
 * 12. DESKTOP OPTIMIZATION (2-COLUMN REFINED)
 * =============================== */
@media (min-width: 901px) {
    .hero-specs-section {
        padding: 60px 40px;
        background: var(--card-bg);
        border: 1px solid var(--border-color);
        border-radius: var(--radius-lg);
    }

    .hero-specs-grid {
        display: grid;
        grid-template-columns: repeat(2, 1fr); 
        gap: 60px 40px; /* Jarak vertikal sedikit dirapatkan dari 80px ke 60px */
        align-items: center;
    }

    .hero-spec-item {
        padding: 20px;
        display: flex;
        flex-direction: column;
        align-items: center;
    }

    .hero-spec-value {
        font-size: 3rem; /* UKURAN BARU: Lebih proporsional & elegan */
        font-weight: 300; /* Sedikit lebih tebal dari 200 agar tetap tegas di 3rem */
        color: var(--text-dark);
        line-height: 1.1;
        letter-spacing: -1px; /* Jarak antar huruf lebih natural */
    }

    .hero-spec-label {
        font-size: 12px;
        margin-top: 8px;
        color: var(--text-muted);
        text-transform: uppercase;
        letter-spacing: 1.5px;
        font-weight: 600;
    }

    /* Pemisah vertikal halus antar kolom */
    .hero-spec-item:nth-child(odd) {
        border-right: 1px solid #f1f5f9;
    }

    /* Pastikan separator mobile benar-benar hilang */
    .hero-spec-item:not(:last-child):after {
        display: none;
    }
}

/* ===============================
 * 13. MOBILE REFINEMENT (HERO SPECS)
 * =============================== */
@media (max-width: 480px) {
    .hero-specs-section {
        padding: 40px 15px; /* Kurangi padding agar tidak terlalu makan tempat */
        margin-top: 8px;
    }

    .hero-specs-grid {
        gap: 40px; /* Jarak antar item lebih rapat tapi tetap lega */
    }

    .hero-spec-value {
        font-size: 2.2rem; /* UKURAN MOBILE: Lebih proporsional */
        font-weight: 400; /* Sedikit lebih tebal agar kontras di layar kecil */
        letter-spacing: -1px;
        line-height: 1;
    }

    .hero-spec-label {
        font-size: 11px; /* Label sedikit lebih kecil */
        margin-top: 6px;
        letter-spacing: 1px;
    }

    /* Penyesuaian garis pemisah mobile */
    .hero-spec-item:not(:last-child):after {
        width: 30px;
        margin-top: 30px;
        opacity: 0.15; /* Lebih samar agar tidak mengganggu pandangan */
    }
}