/* ==========================================================================
   VARIABEL & RESET DASAR
   ========================================================================== */
:root {
    --primary-color: #A30000;
    --secondary-color: #2D2D2D;
    --text-dark: #333333;
    --text-light: #666666;
    --bg-light: #F9F9F9;
    --transition: all 0.3s ease;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

body {
    font-family: 'Poppins', sans-serif;
    color: var(--text-dark);
    line-height: 1.6;
    background-color: #FFFFFF;
    padding-top: 70px; /* Jarak aman agar konten tidak tertutup navbar fixed */
}

.container { width: 90%; max-width: 1200px; margin: 0 auto; }
.text-center { text-align: center; }
.section { padding: 80px 0; }
.bg-light { background-color: var(--bg-light); }

.section-title {
    text-align: center;
    font-size: 2.5rem;
    color: var(--primary-color);
    margin-bottom: 50px;
    font-family: 'Montserrat', sans-serif;
    font-weight: 700;
}

/* ==========================================================================
   NAVBAR ULTIMATE FIX
   ========================================================================== */
.navbar {
    position: fixed; top: 0; left: 0; width: 100%;
    background-color: white;
    box-shadow: 0 2px 10px rgba(0,0,0,0.08);
    z-index: 1000; padding: 10px 0;
}

.nav-container {
    display: flex; justify-content: space-between; align-items: center;
    width: 92%; max-width: 1200px; margin: 0 auto;
}

.logo-container {
    display: flex; align-items: center; gap: 8px;
    text-decoration: none; flex-shrink: 0;
}

.nav-logo { height: 40px; width: auto; object-fit: contain; }

.logo-text {
    font-family: 'Montserrat', sans-serif;
    font-size: 1.15rem; font-weight: 700;
    color: var(--primary-color); white-space: nowrap;
}

.nav-menu { display: flex; list-style: none; align-items: center; gap: 2px; }

.nav-menu li a {
    text-decoration: none; color: var(--text-dark);
    font-weight: 500; font-size: 0.9rem;
    padding: 6px 12px; transition: var(--transition);
    white-space: nowrap;
}

.nav-menu li a:hover { color: var(--primary-color); }

.menu-toggle {
    display: none; background: none; border: none;
    cursor: pointer; padding: 5px; font-size: 1.5rem; color: var(--primary-color);
}

/* ==========================================================================
   HERO / HEADER SECTION
   ========================================================================== */
.hero-section {
    height: calc(100vh - 70px); min-height: 500px;
    background: url('images/hero-banner.png') no-repeat center center/cover;
    display: flex; justify-content: center; align-items: center;
    text-align: center; color: white; padding: 20px;
}

.hero-content h1 {
    font-family: 'Montserrat', sans-serif; font-size: 3.8rem;
    font-weight: 700; letter-spacing: 2px; text-shadow: 2px 2px 8px rgba(0,0,0,0.5);
    margin-bottom: 10px;
}

.tagline {
    font-size: 1.4rem; color: #F1F1F1; margin-bottom: 30px;
    text-shadow: 1px 1px 4px rgba(0,0,0,0.4);
}

.btn {
    display: inline-block; padding: 12px 30px;
    border-radius: 30px; font-weight: 600; text-decoration: none;
    transition: var(--transition); cursor: pointer; border: none;
}
.btn-primary { background-color: var(--primary-color); color: white; }
.btn-primary:hover { background-color: #800000; transform: translateY(-3px); }
.btn-secondary { background-color: var(--secondary-color); color: white; }
.btn-secondary:hover { background-color: #1a1a1a; }

/* ==========================================================================
   GRID UMUM (TENTANG, PRODUK, OUTLET, KONTAK)
   ========================================================================== */
.about-grid, .contact-grid {
    display: grid; grid-template-columns: 1fr 1fr; gap: 50px; align-items: center;
}
.about-image img { width: 100%; height: 350px; object-fit: contain; border-radius: 12px; }
.mission-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); gap: 20px; }
.mission-card {
    background: white; padding: 25px; border-radius: 10px; text-align: center;
    box-shadow: 0 5px 15px rgba(0,0,0,0.05);
}
.mission-card i { font-size: 2rem; color: var(--primary-color); margin-bottom: 15px; }

/* PRODUK */
.products-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 30px; }
.product-card {
    background: white; border-radius: 12px; padding: 20px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.05); text-align: center;
}
.product-image-area img { width: 100%; height: 280px; object-fit: contain; margin-bottom: 15px; }

/* MARKETPLACE BUTTONS */
.marketplace-links { display: flex; gap: 10px; margin-top: 20px; }
.btn-mp {
    flex: 1; display: flex; justify-content: center; align-items: center; gap: 8px;
    padding: 10px; border-radius: 8px; font-weight: 600; font-size: 0.9rem;
    text-decoration: none; color: white; transition: var(--transition);
}
.btn-shopee { background-color: #EE4D2D; }
.btn-shopee:hover { background-color: #d74224; transform: translateY(-2px); }
.btn-tokopedia { background-color: #00AA5B; }
.btn-tokopedia:hover { background-color: #008f4c; transform: translateY(-2px); }

/* OUTLETS */
.search-box { text-align: center; margin-bottom: 30px; }
.search-box input {
    width: 100%; max-width: 500px; padding: 12px 20px;
    border: 1px solid #ddd; border-radius: 30px; font-size: 1rem; outline: none;
}
.outlets-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); gap: 15px; }
.outlet-card {
    background-color: #fff; border: 1px solid #eee; padding: 15px;
    border-radius: 8px; text-align: center; font-weight: 500; font-size: 0.9rem;
}
.outlet-hidden { display: none !important; }

/* KONTAK FORM */
.contact-form { display: flex; flex-direction: column; gap: 15px; }
.contact-form input, .contact-form textarea {
    padding: 12px; border: 1px solid #ddd; border-radius: 8px; font-family: inherit; font-size: 1rem;
}
.contact-info p { margin-bottom: 15px; font-size: 1.1rem; }
.contact-info i { color: var(--primary-color); width: 25px; }

/* FOOTER */
footer { background-color: var(--secondary-color); color: white; padding: 20px 0; margin-top: 50px; }

/* ==========================================================================
   RESPONSIVE DESIGN (HP & TABLET)
   ========================================================================== */
@media (max-width: 1024px) {
    .menu-toggle { display: block !important; }
    .nav-menu {
        position: fixed; top: 60px; left: -100%; flex-direction: column; gap: 0;
        background-color: white; width: 100%; height: calc(100vh - 60px);
        text-align: center; transition: 0.3s; padding-top: 20px;
    }
    .nav-menu.active { left: 0; }
    .nav-menu li { margin: 15px 0; width: 100%; }
    .nav-menu li a { font-size: 1.1rem; display: block; padding: 10px 0; }
}
@media (max-width: 768px) {
    .hero-content h1 { font-size: 2.6rem; }
    .about-grid, .contact-grid { grid-template-columns: 1fr; }
}
@media (max-width: 480px) {
    .hero-content h1 { font-size: 2rem; }
    .btn { width: 100%; text-align: center; }
}

/* ==========================================================================
   STYLE KHUSUS KARTU LEGALITAS & SERTIFIKAT (RASIO 9:16)
   ========================================================================== */
.legality-card {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.legality-img-box {
    margin: 0 auto 15px auto;
    width: 100%; /* Membuat kotak mengikuti lebar penuh kartu */
    max-width: 220px; /* Batasi lebar maksimal agar tidak terlalu besar */
    border-radius: 8px;
    overflow: hidden;
    border: 1px solid #ddd;
    background: #fdfdfd;
    padding: 5px; /* Memberikan sedikit ruang bingkai putih */
}

.legality-img-box img {
    width: 100%;
    height: auto; /* Membiarkan gambar menyesuaikan bentuk aslinya secara natural */
    max-height: 160px; /* Batasi tinggi maksimal agar tetap ringkas */
    object-fit: contain; /* Memastikan seluruh isi sertifikat terlihat utuh tanpa terpotong */
    transition: transform 0.3s ease;
    display: block;
    margin: 0 auto;
}

.legality-img-box img:hover {
    transform: scale(1.05);
}

.legality-number {
    font-size: 0.85rem;
    color: var(--primary-color);
    font-weight: 600;
    margin-top: 15px;
    background: #fff5f5;
    padding: 6px;
    border-radius: 4px;
}

/* ==========================================================================
   MODAL / POP-UP GAMBAR (LIGHTBOX)
   ========================================================================== */
.modal {
    display: none; /* Disembunyikan secara default */
    position: fixed;
    z-index: 9999; /* Pastikan selalu berada di posisi paling atas layar */
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0.85); /* Latar belakang hitam transparan */
    align-items: center;
    justify-content: center;
}

.modal-content {
    max-width: 90%;
    max-height: 85vh;
    border-radius: 8px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.3);
    animation: zoomIn 0.3s ease; /* Efek animasi membesar */
}

@keyframes zoomIn {
    from { transform: scale(0.8); opacity: 0; }
    to { transform: scale(1); opacity: 1; }
}

.modal-close {
    position: absolute;
    top: 20px;
    right: 35px;
    color: #fff;
    font-size: 40px;
    font-weight: bold;
    cursor: pointer;
    transition: 0.3s;
}

.modal-close:hover {
    color: var(--primary-color);
}