/* Variabel Warna */
:root {
    --primary: #1e3c72;
    --secondary: #2a5298;
    --accent: #f53d2d;
    --wa: #25D366;
    --bg-light: #f8f9fa;
    --text-dark: #333;
    --text-muted: #666;
    --white: #ffffff;
    --blue-btn: #007bff;
    --blue-btn-hover: #0056b3;
}

/* Reset Dasar */
body {
    font-family: 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
    background-color: var(--bg-light);
    color: var(--text-dark);
    margin: 0;
    padding: 0;
    line-height: 1.6;
    /* Memberi ruang di bawah agar konten tidak tertutup tombol sticky */
    padding-bottom: 100px; 
}

/* Container Utama */
.detail-container {
    max-width: 1000px;
    margin: 0 auto;
    padding: 0 20px 20px 20px; /* PERBAIKAN: Padding atas diubah jadi 0 agar sticky menempel sempurna */
}

/* --- BAR NAVIGASI STICKY ATAS (PERBAIKAN TOTAL) --- */
.nav-top-sticky {
    position: -webkit-sticky;
    position: sticky;
    top: 0;
    background-color: var(--white); /* Mencegah konten bawah tembus pandang saat di-scroll */
    padding: 15px 20px;
    margin: 0 -20px 30px -20px; /* Menetralkan padding container agar menempel ke ujung layar */
    z-index: 999;
    box-shadow: 0 2px 10px rgba(0,0,0,0.08); /* Bayangan halus saat melayang */
    
    /* Membuat Back & Katalog Sejajar Sempurna */
    display: flex;
    justify-content: space-between; /* Back di kiri, Katalog di kanan */
    align-items: center;            /* Kunci sejajar vertikal di tengah */
    border-bottom: 1px solid #eee;
    border-radius: 0px 0px 18px 18px;
}

.nav-back {
    margin-bottom: 0; /* PERBAIKAN: Reset margin bawaan agar tidak merusak posisi vertikal */
    display: flex;
    align-items: center;
}

.nav-back a {
    text-decoration: none;
    color: var(--primary);
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    transition: 0.3s;
    font-size: 1rem;
    line-height: 1;
}

.nav-back a:hover {
    transform: translateX(-5px);
}

.nav-katalog-right {
    display: flex;
    align-items: center;
}

.btn-katalog {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 10px 24px;
    background-color: var(--blue-btn);
    color: var(--white) !important;
    border-radius: 50px;
    font-weight: bold;
    text-decoration: none;
    font-size: 0.95rem;
    line-height: 1;
    transition: all 0.3s ease;
    box-shadow: 0 4px 10px rgba(0, 123, 255, 0.2);
}

.btn-katalog:hover {
    background-color: var(--blue-btn-hover);
    box-shadow: 0 6px 15px rgba(0, 123, 255, 0.4);
    transform: translateY(-2px);
}

/* Wrapper Konten Produk */
.detail-wrapper {
    display: grid;
    grid-template-columns: 1fr 1fr; /* Dua kolom di desktop */
    gap: 40px;
    background: var(--white);
    padding: 30px;
    border-radius: 20px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.05);
}

/* Bagian Gambar (Desktop) */
.image-section img {
    width: 100%;
    height: auto;
    aspect-ratio: 1 / 1; /* Mengunci rasio kotak sempurna 1:1 */
    border-radius: 15px;
    object-fit: contain; /* Gambar mengecil agar muat penuh, TIDAK dipotong */
    background-color: #ffffff; /* Sisi kosong otomatis berwarna putih seperti Shopee */
    box-shadow: 0 5px 20px rgba(0,0,0,0.08);
}

/* Bagian Info */
.detail-badge {
    background: #eef2ff;
    color: var(--primary);
    padding: 6px 16px;
    border-radius: 50px;
    font-size: 0.75rem;
    font-weight: bold;
    text-transform: uppercase;
    display: inline-block;
    letter-spacing: 0.5px;
}

.detail-title {
    font-size: 2.2rem;
    margin: 15px 0;
    color: var(--text-dark);
    line-height: 1.2;
}

.detail-price {
    font-size: 2rem;
    color: var(--accent);
    font-weight: 800;
    margin-bottom: 25px;
}

.detail-description {
    border-top: 1px solid #eee;
    padding-top: 20px;
    margin-top: 20px;
}

.detail-description h3 {
    font-size: 1.2rem;
    margin-bottom: 12px;
    color: #444;
}

.detail-description p {
    color: var(--text-muted);
    font-size: 1rem;
    text-align: justify;
}

/* RESPONSIVE VIDEO WRAPPER */
.video-responsive-container {
    position: relative;
    height: 0;
    overflow: hidden;
    border-radius: 12px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
    background: #000;
}
.video-responsive-container iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: none;
}

/* --- STICKY FOOTER ACTION --- */
.sticky-action {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    background: var(--white);
    box-shadow: 0 -5px 25px rgba(0,0,0,0.1);
    padding: 15px 0;
    z-index: 1000;
}

.sticky-container {
    max-width: 1000px;
    margin: 0 auto;
    display: flex;
    gap: 15px;
    padding: 0 20px;
}

/* Tombol Dasar */
.btn-action {
    flex: 1;
    text-align: center;
    padding: 16px;
    border-radius: 12px;
    text-decoration: none;
    font-weight: bold;
    color: var(--white);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    font-size: 1rem;
    border: none;
    cursor: pointer;
    outline: none;
}

/* Warna Tombol Bagikan (Lebih Netral) */
.share-btn {
    background-color: #6c757d;
}

/* Warna Tombol Shopee */
.buy-shopee {
    background-color: var(--accent);
}

/* Efek Hover */
.btn-action:hover {
    transform: translateY(-5px);
    filter: brightness(1.1);
    box-shadow: 0 8px 20px rgba(0,0,0,0.15);
}

.btn-action:active {
    transform: translateY(-2px);
}

/* --- RESPONSIF MOBILE --- */
@media (max-width: 768px) {
    .nav-top-sticky {
        padding: 12px 15px;
        margin: 0 -20px 20px -20px;
    }

    .btn-katalog {
        padding: 8px 18px;
        font-size: 0.85rem;
    }

    .detail-wrapper {
        grid-template-columns: 1fr; /* Menjadi satu kolom di HP */
        padding: 20px;
        gap: 20px;
    }
    
    .detail-title {
        font-size: 1.6rem;
    }

    .detail-price {
        font-size: 1.5rem;
    }

    .sticky-container {
        gap: 10px;
        padding: 0 15px;
    }

    .btn-action {
        font-size: 0.9rem;
        padding: 14px;
    }
    
    /* Bagian Gambar (Mobile) - DIPERBAIKI KE 1:1 */
    .image-section img {
        aspect-ratio: 1 / 1; /* Di HP rasionya tetap dikunci kotak 1:1 */
        width: 100%;
        height: auto;
    }
}