/* File: assets/css/unit-style.css - REVISI RESPONSIVE */

:root {
    --toyota-red: #EB0A1E;
    --toyota-dark: #231F20;
    --toyota-gray: #F6F6F6;
    --whatsapp-green: #25D366;
}

/* General Layout */
body {
    /* Mencegah footer tertutup tombol sticky di HP */
    padding-bottom: 0; 
}

.unit-page-section {
    padding: 30px 0;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    color: #333;
    line-height: 1.6;
}

.container {
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 15px;
}

/* Breadcrumb Styling */
.breadcrumb {
    font-size: 0.85rem;
    color: #666;
    margin-bottom: 20px;
}
.breadcrumb a { text-decoration: none; color: var(--toyota-red); }

/* Hero / Header Section */
.unit-header {
    text-align: center;
    margin-bottom: 30px;
}
.unit-header h1 {
    font-size: 2.2rem;
    color: var(--toyota-dark);
    margin-bottom: 10px;
    font-weight: 800;
    line-height: 1.2;
}
.unit-header .subtitle {
    font-size: 1.1rem;
    color: #666;
}
.highlight-red { color: var(--toyota-red); }

/* Promo Cards (Grid) */
.promo-grid {
    display: grid;
    /* Desktop: Otomatis bagi kolom, Mobile: Nanti diatur di media query */
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 15px;
    margin-bottom: 40px;
}
.promo-card {
    background: #fff;
    border: 1px solid #eee;
    border-radius: 10px;
    padding: 15px;
    text-align: center;
    box-shadow: 0 4px 15px rgba(0,0,0,0.05);
}
.promo-card h3 { color: var(--toyota-red); font-size: 1.8rem; margin: 0; font-weight: 800; }
.promo-card p { margin: 5px 0 0; font-weight: 600; color: #555; font-size: 0.9rem; }

/* Price Table Container */
.price-section {
    background: var(--toyota-gray);
    padding: 30px 20px;
    border-radius: 15px;
    margin-bottom: 40px;
}
/* Wrapper agar tabel bisa di-scroll di HP */
.table-responsive {
    width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch; /* Smooth scroll iOS */
}
.price-table {
    width: 100%;
    border-collapse: collapse;
    background: #fff;
    border-radius: 8px;
    overflow: hidden;
    min-width: 300px; /* Mencegah tabel gepeng */
}
.price-table th {
    background: var(--toyota-red);
    color: #fff;
    padding: 12px 15px;
    text-align: left;
    font-weight: 600;
    font-size: 0.95rem;
}
.price-table td {
    padding: 12px 15px;
    border-bottom: 1px solid #eee;
    font-size: 0.95rem;
}
.price-val {
    font-weight: bold;
    color: var(--toyota-dark);
    text-align: right;
    white-space: nowrap; /* Harga tidak turun baris */
}

/* Content & Features Layout */
.unit-content {
    display: flex;
    flex-wrap: wrap;
    gap: 40px;
    margin-bottom: 40px;
}
.unit-desc { flex: 2; min-width: 0; /* Fix flex overflow issue */ }
.unit-sidebar { 
    flex: 1; 
    min-width: 280px;
}

/* Marketing Box & Buttons */
.marketing-box {
    text-align: center;
    background: #fff; 
    padding: 25px; 
    border: 1px solid #eee; 
    border-radius: 10px; 
    box-shadow: 0 5px 20px rgba(0,0,0,0.05);
}
.marketing-photo {
    width: 100px;
    height: 100px;
    border-radius: 50%;
    object-fit: cover;
    margin-bottom: 15px;
    border: 3px solid var(--toyota-red);
}
.btn-cta {
    display: inline-block;
    padding: 12px 20px;
    border-radius: 50px;
    text-decoration: none;
    font-weight: bold;
    text-align: center;
    transition: 0.3s;
    width: 100%;
    box-sizing: border-box;
    margin-bottom: 10px;
    font-size: 1rem;
}
.btn-wa { background-color: var(--whatsapp-green); color: #fff; }
.btn-call { background-color: var(--toyota-dark); color: #fff; }

/* Sticky Footer Mobile */
.sticky-footer {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    background: #fff;
    padding: 12px 15px;
    box-shadow: 0 -4px 20px rgba(0,0,0,0.1);
    display: none; 
    z-index: 9999;
    justify-content: space-between;
    gap: 10px;
}

/* GALLERY STYLES */
.gallery-container { margin-bottom: 30px; }
.main-image-frame {
    width: 100%;
    border-radius: 10px;
    overflow: hidden;
    border: 1px solid #eee;
    margin-bottom: 10px;
    position: relative;
    aspect-ratio: 16/10; /* Rasio gambar konsisten */
    background: #f9f9f9;
}
.main-image-frame img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}
.preview-badge {
    position: absolute;
    top: 0; left: 0;
    background: var(--toyota-red); color: #fff;
    padding: 5px 12px; font-size: 0.8rem;
    border-bottom-right-radius: 10px;
}
.thumb-grid {
    display: flex; gap: 8px;
    overflow-x: auto; padding-bottom: 5px;
    -webkit-overflow-scrolling: touch;
}
.thumb-item {
    width: 70px; height: 50px;
    border: 2px solid #eee;
    border-radius: 5px; flex-shrink: 0; /* Agar tidak gepeng */
}
.thumb-item.active { border-color: var(--toyota-red); }

/* CROSS SELLING STYLES */
.cross-sell-section {
    margin-top: 50px;
    padding-top: 30px;
    border-top: 2px dashed #eee;
}
.section-title-red {
    color: var(--toyota-red);
    font-size: 1.4rem;
    margin-bottom: 20px;
    font-weight: 800;
}
.model-grid {
    display: grid;
    /* Desktop default */
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 20px;
}
.model-card {
    background: #fff; border: 1px solid #eee;
    border-radius: 8px; overflow: hidden;
    position: relative;
}
.model-img-wrapper { padding: 15px; background: #fcfcfc; text-align: center; }
.model-img-wrapper img { max-width: 100%; height: auto; }
.model-info { text-align: center; padding-bottom: 20px; }
.model-name-label {
    background: var(--toyota-red); color: #fff;
    display: inline-block; padding: 5px 15px;
    font-size: 0.9rem; font-weight: bold;
    margin-top: -15px; position: relative; margin-bottom: 8px;
}
.card-badge {
    position: absolute; top: 10px; left: 10px;
    background: #e3f9e5; color: #1f9d55;
    padding: 2px 8px; font-size: 0.7rem; font-weight: bold;
    border-radius: 4px;
}

/* =========================================
   MEDIA QUERIES (BAGIAN MOBILE RESPONSIVE)
   ========================================= */
@media (max-width: 768px) {
    /* 1. Typography Adjustment */
    .unit-header h1 { font-size: 1.6rem; margin-top: 10px; }
    .unit-header .subtitle { font-size: 1rem; }

    /* 2. Layout Stacking */
    .unit-content { flex-direction: column; gap: 30px; }
    .unit-sidebar { order: 2; } /* Kontak pindah ke bawah konten */
    .unit-desc { order: 1; }

    /* 3. Grid menjadi 1 Kolom Penuh di HP */
    .promo-grid { grid-template-columns: 1fr; gap: 10px; }
    .model-grid { grid-template-columns: 1fr; gap: 20px; }
    
    /* 4. Cross Selling Card Optimization */
    .model-card { display: flex; align-items: center; text-align: left; }
    .model-img-wrapper { width: 40%; padding: 10px; background: none; }
    .model-info { width: 60%; padding: 10px 10px 10px 0; text-align: left; }
    .model-name-label { margin-top: 0; font-size: 0.85rem; padding: 4px 10px; }

    /* 5. Sticky Footer Space */
    body { padding-bottom: 80px; } /* Jarak agar konten tidak tertutup */
    .sticky-footer { display: flex; }
    
    /* 6. Breadcrumb Hide (Optional - biar clean) */
    .breadcrumb { font-size: 0.8rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
}