/* Dasar Estetika Scandinavian & Minimalist */
:root {
    --primary-color: #2D3436; 
    --accent-color: #A8B29B;  
    --bg-color: #F9F9F9;      
    --text-color: #2D3436;
    --font-main: 'Inter', sans-serif;
}

/* KUNCI GEMBOK ABSOLUT TINGKAT DEWA */
html, body {
    width: 100%;
    max-width: 100%;
    margin: 0;
    padding: 0;
    overflow-x: hidden !important; 
    position: relative;
    overscroll-behavior-x: none; /* Matikan efek memantul horizontal bawaan HP */
    touch-action: pan-y; /* SANGAT PENTING: Hanya izinkan jari menggeser ke atas/bawah */
}

/* Kunci juga bungkus utama HTML Anda */
.main-header, .content-wrapper {
    width: 100%;
    max-width: 100%;
    overflow-x: hidden;
}

* {
    box-sizing: border-box !important; /* Paksa semua elemen menghitung padding ke dalam */
    margin: 0;
    padding: 0;
}

body {
    font-family: var(--font-main);
    background-color: var(--bg-color);
    color: var(--text-color);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}

/* PERBAIKAN CONTAINER: Pakai 100% dan Padding (Bukan Width 90%) */
.container {
    width: 100%; 
    max-width: 1100px;
    margin: 0 auto;
    padding: 20px 5%; /* Ini menciptakan efek jarak aman di kiri-kanan tanpa merusak batas layar */
}

.text-center { text-align: center; }
.hidden { display: none; }

/* Header & Logo */
.main-header {
    background: white;
    border-bottom: 1px solid #EAEAEA;
    padding: 15px 0;
}

.main-header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-weight: 600;
    letter-spacing: 4px;
    font-size: 1.5rem;
}

/* Button Styling (Tanpa Pop-up Bawaan) */
.btn-primary {
    background-color: var(--primary-color);
    color: white;
    padding: 15px 40px;
    border: none;
    border-radius: 4px;
    font-size: 1rem;
    cursor: pointer;
    transition: 0.3s;
    margin-top: 20px;
}

.btn-secondary {
    background: transparent;
    border: 1px solid var(--primary-color);
    padding: 8px 20px;
    border-radius: 4px;
    cursor: pointer;
}

.btn-primary:hover { opacity: 0.9; transform: translateY(-2px); }

/* Hero Section */
#hero h2 {
    font-size: 2.5rem;
    font-weight: 300;
    margin-bottom: 20px;
    color: var(--primary-color);
}

#hero p {
    font-size: 1.1rem;
    color: #636E72;
    max-width: 600px;
    margin: 0 auto;
}

/* Responsive Media Queries */
@media (max-width: 768px) {
    #hero h2 { 
        font-size: 1.4rem; /* Ukuran lebih aman untuk layar sempit */
        line-height: 1.5;
        word-wrap: break-word; /* Memaksa teks turun jika mentok batas layar */
        padding: 0 10px;
    }
    #hero p {
        font-size: 0.95rem;
        padding: 0 10px;
    }
    .logo { 
        font-size: 1.1rem; 
    }
    .btn-primary {
        padding: 12px 30px; 
        font-size: 0.95rem;
        width: 90%; /* Tombol menyesuaikan lebar layar */
    }
    .btn-secondary {
        padding: 6px 15px; /* Tombol 'Masuk' disesuaikan agar tidak memakan tempat */
        font-size: 0.85rem;
    }
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Styling Radar Identitas */
#radarSection {
    max-width: 500px;
    margin: 40px auto;
    padding: 20px;
    background: white;
    border-radius: 12px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.05); /* Shadow tipis premium */
    animation: fadeIn 0.8s ease;
}

#skinRadarChart {
    width: 100% !important;
    height: auto !important;
}

/* Kategori & Slider Horizontal */
.category-section {
    margin-top: 40px;
    text-align: left;
}

.category-title {
    font-size: 1.2rem;
    color: var(--primary-color);
    margin-bottom: 15px;
    text-transform: uppercase;
    letter-spacing: 2px;
    border-bottom: 1px solid #EAEAEA;
    padding-bottom: 10px;
}

.scrolling-wrapper {
    display: flex;
    flex-wrap: nowrap;
    overflow-x: auto;
    gap: 15px;
    padding-bottom: 15px;
    -webkit-overflow-scrolling: touch; /* Efek geser mulus di HP */
    scrollbar-width: none; /* Sembunyikan scrollbar di Firefox */
}
.scrolling-wrapper::-webkit-scrollbar {
    display: none; /* Sembunyikan scrollbar di Chrome/Safari */
}

/* Kartu Produk Minimalis */
.product-card {
    flex: 0 0 auto;
    width: 220px; /* Lebar kartu standar */
    border: 1px solid #EAEAEA;
    border-radius: 12px;
    padding: 15px;
    background: white;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.product-card img {
    width: 100%;
    height: 180px;
    object-fit: contain;
    border-radius: 8px;
    margin-bottom: 10px;
}

.product-card h3 {
    font-size: 1.1rem;
    line-height: 1.3;
    margin: 5px 0 15px 0;
}

/* Modal Detail Estetik */
.detail-modal-overlay {
    position: fixed; top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(0,0,0,0.6); z-index: 2000;
    display: flex; align-items: flex-end; /* Muncul dari bawah di HP */
    justify-content: center;
}

.detail-modal-content {
    background: white;
    width: 100%;
    max-width: 500px;
    max-height: 85vh;
    overflow-y: auto;
    border-radius: 20px 20px 0 0;
    padding: 30px;
    position: relative;
    animation: slideUp 0.3s ease-out;
}

.close-modal {
    position: absolute; top: 20px; right: 20px;
    background: #F0F2EB; border: none; border-radius: 50%;
    width: 30px; height: 30px; cursor: pointer; font-weight: bold; color: var(--primary-color);
}

@keyframes slideUp {
    from { transform: translateY(100%); }
    to { transform: translateY(0); }
}

@media (min-width: 768px) {
    .detail-modal-overlay { align-items: center; }
    .detail-modal-content { border-radius: 12px; }
}

/* --- CSS HAMBURGER & DROPDOWN (VERSI PAKSA OVERRIDE) --- */

.hamburger-icon {
    display: flex;
    flex-direction: column;
    justify-content: space-around;
    width: 28px;
    height: 22px;
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 0;
    z-index: 1001; /* Pastikan ikon selalu bisa diklik */
}

.hamburger-icon span {
    width: 100%;
    height: 3px;
    background-color: var(--text-color, #2D3436);
    border-radius: 2px;
    transition: 0.3s;
}

/* PAKSA SEMBUNYIKAN MENU LAMA & UBAH JADI DROPDOWN */
.main-nav {
    display: none !important; /* Paksa sembunyi saat normal */
    flex-direction: column;
    position: absolute;
    top: 60px; /* Jarak menu dari atas */
    right: 20px; /* Nempel di kanan */
    background-color: #ffffff;
    box-shadow: 0px 8px 20px rgba(0,0,0,0.15);
    border-radius: 10px;
    padding: 10px;
    min-width: 180px;
    z-index: 1000;
}

/* MUNCULKAN SAAT IKON DIKLIK */
.main-nav.active {
    display: flex !important; /* Paksa muncul */
}

/* BERSIHKAN DESAIN TOMBOL AGAR MENYATU DENGAN MENU */
.main-nav .btn-secondary {
    width: 100%;
    text-align: left;
    margin: 2px 0 !important;
    padding: 12px 15px !important;
    border: none !important; /* Hapus garis kotak */
    background: transparent !important; /* Hapus warna latar */
    box-shadow: none !important; /* Hapus bayangan tombol */
    border-radius: 6px;
    font-size: 15px;
    color: #2D3436;
}

.main-nav .btn-secondary:hover {
    background-color: #F8F9FA !important; /* Warna abu-abu halus saat disentuh */
}

/* Efek Silang (X) untuk Hamburger */
.hamburger-icon.open span:nth-child(1) { transform: rotate(45deg) translate(6px, 6px); }
.hamburger-icon.open span:nth-child(2) { opacity: 0; }
.hamburger-icon.open span:nth-child(3) { transform: rotate(-45deg) translate(7px, -8px); }

/* --- PERBAIKAN MENU TERTUMPUK / TERPOTONG --- */

/* 1. Angkat wadah Header ke lapisan paling depan (Dewa) */
.main-header, header {
    position: relative !important;
    z-index: 9999 !important; 
    overflow: visible !important; /* Buka gembok agar menu bisa tumpah ke bawah */
}

/* 2. Pastikan Menu Dropdown juga ada di lapisan terdepan */
.main-nav {
    z-index: 9999 !important;
}

/* 3. Pastikan teks tombol tidak ikut menghilang/transparan */
.main-nav .btn-secondary {
    display: block !important;
    color: #2D3436 !important; /* Warna teks gelap */
    opacity: 1 !important;
    visibility: visible !important;
}

/* --- OBAT KUAT MENU TERPOTONG --- */

/* 1. Paksa semua wadah atas untuk tidak memotong isinya */
body, html, .app-container, .container, header, .main-header {
    overflow: visible !important;
}

/* 2. Angkat derajat Header ke tingkat paling dewa */
header, .main-header {
    position: relative !important;
    z-index: 999999 !important; 
}

/* 3. Pastikan menu dropdown mengambang bebas tanpa halangan */
.main-nav {
    position: absolute !important;
    z-index: 9999999 !important;
    overflow: visible !important;
}