/* --- TEMA GLOBAL DAN TEMA TERANG DITAMBAHKAN --- */
:root {
    --bg-dark: #121212;
    --text-light: #e0e0e0;
    --text-primary: #42a5f5;
    --box-bg: #1e1e1e;
    --border-color: #333333;
    --red-accent: #82b1ff;
    --header-bg: #000;
    --cta-bg: #0d0d0d;
    --footer-bg: #000;
    --hero-overlay: rgba(0,0,0,0.7); 
}

/* DEFINISI TEMA TERANG */
.light-theme {
    --bg-dark: #f0f0f0;      
    --text-light: #121212;   
    --text-primary: #007bff; 
    --box-bg: #ffffff;       
    --border-color: #dddddd; 
    --header-bg: #ffffff;
    --cta-bg: #e5e5e5;
    --footer-bg: #ffffff;
    --hero-overlay: rgba(255,255,255,0.7); 
}

/* RESET */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Montserrat', sans-serif;
    transition: background-color 0.3s ease, color 0.3s ease, border-color 0.3s ease;
}

html, body {
    /* PENTING: Mengunci lebar agar tidak ada horizontal scroll */
    max-width: 100%;
    overflow-x: hidden; 
    width: 100%;
}

body {
    background-color: var(--bg-dark);
    color: var(--text-light);
    line-height: 1.6;
}

/* LAYOUT CONTAINER */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    width: 100%;
}

h1, h2, h3, h4 {
    font-weight: 700;
    color: var(--text-light);
    margin-bottom: 15px;
}

h3 {
    text-align: center;
    color: var(--text-primary);
    font-size: 2.2em;
    padding-top: 50px;
    margin-bottom: 30px;
}

/* HEADER / NAVBAR */
header {
    background-color: var(--header-bg);
    padding: 15px 0;
    position: sticky;
    top: 0;
    z-index: 1000;
    border-bottom: 2px solid var(--text-primary);
}

.nav-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: nowrap; /* Di desktop, tetap satu baris */
}

/* FIX: Pastikan logo dapat di-wrap jika terlalu panjang */
.logo {
    color: var(--text-primary);
    font-size: 1.8em;
    white-space: normal; 
    word-break: break-word;
    flex-shrink: 0; /* Di desktop, biarkan tampil penuh */
}

/* PENTING: Untuk mengelompokkan Nav dan Tombol di Desktop */
.nav-container {
    display: flex;
    align-items: center;
    gap: 20px; 
}

nav {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
}

nav a {
    color: var(--text-light);
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    transition: 0.3s;
    font-size: 0.95em;
    gap: 15px; 
}

nav a i {
    margin-right: 0; 
    transition: 0.3s;
}

nav a:hover {
    color: var(--text-primary);
    text-shadow: 0 0 5px var(--text-primary);
}

nav a:hover i {
    transform: scale(1.2);
    color: var(--text-primary);
}

/* GAYA TOMBOL THEME TOGGLE */
#theme-toggle {
    background: none;
    border: 1px solid var(--text-primary);
    color: var(--text-primary);
    font-size: 1.1em;
    padding: 8px 10px;
    border-radius: 5px;
    cursor: pointer;
    transition: background-color 0.3s, color 0.3s;
    margin-top: 0; 
    outline: none;
    flex-shrink: 0;
}

#theme-toggle:hover {
    background-color: var(--text-primary);
    color: var(--bg-dark); 
}

/* GAYA IKON HAMBURGER (TIDAK DITAMPILKAN DI DESKTOP) */
.menu-icon {
    display: none; 
    background: none;
    border: none;
    color: var(--text-primary);
    font-size: 1.5em;
    cursor: pointer;
    padding: 5px;
    flex-shrink: 0;
}

/* HERO SECTION - PENGGUNAAN VARIABEL OVERLAY */
.hero-section {
    background: linear-gradient(var(--hero-overlay), var(--hero-overlay)), 
                url('https://picsum.photos/1920/1080?blur=5') no-repeat center center/cover;
    text-align: center;
    padding: 150px 20px;
    border-bottom: 8px solid var(--text-primary);
    position: relative;
    z-index: 1;
    width: 100%;
}

.store-name {
    font-size: 4em;
    color: var(--text-primary);
    letter-spacing: 5px;
    margin-bottom: 5px;
    word-wrap: break-word;
}

.tagline {
    font-size: 1.8em;
    margin-bottom: 30px;
    opacity: 0.8;
}

.description {
    max-width: 700px;
    margin: 0 auto 40px;
    font-size: 1.1em;
    padding: 0 10px;
}

.btn {
    display: inline-block;
    padding: 12px 35px;
    text-decoration: none;
    border-radius: 50px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    border: 2px solid transparent;
    transition: all 0.3s ease; 
}

.primary-btn {
    background-color: var(--text-light);
    color: var(--bg-dark);
    box-shadow: 0 4px 15px rgba(66,165,245,0.4);
}

.primary-btn:hover {
    background-color: #fff;
    color: var(--bg-dark);
    transform: translateY(-3px);
    box-shadow: 0 8px 20px rgba(66,165,245,0.6);
}

.secondary-btn {
    background-color: var(--bg-dark);
    color: var(--text-primary);
    border: 2px solid var(--text-primary);
}

.secondary-btn:hover {
    background-color: var(--text-primary);
    color: var(--bg-dark);
    transform: scale(1.05);
    box-shadow: 0 0 20px rgba(66,165,245,0.5);
}

/* --- ORDER PAGE BUTTON STYLE --- */
.btn-group {
  display: flex;
  flex-wrap: wrap;
  gap: 15px;
  justify-content: center;
  margin-top: 30px;
}

.btn-group .btn {
  text-align: center;
  font-size: 1rem;
  border-radius: 50px;
  padding: 12px 25px;
  transition: 0.3s ease;
  min-width: 220px;
}

/* Hover halus & glowing biru */
.btn-group .btn:hover {
  transform: scale(1.05);
  box-shadow: 0 0 20px rgba(66,165,245,0.5);
}

.cta-section {
  margin-bottom: 60px;
}

/* WHY CHOOSE US */
.why-choose-us {
    padding: 50px 20px;
}

.why-choose-us .intro-text {
    text-align: center; 
    max-width: 800px; 
    margin: 0 auto 50px auto; 
    font-size: 1.1em;
}

.features-grid {
    display: flex;
    justify-content: space-around;
    gap: 30px;
    padding-bottom: 50px;
    flex-wrap: wrap;
    width: 100%;
}

.feature-box {
    background-color: var(--box-bg);
    padding: 30px;
    border: 1px solid var(--border-color);
    border-left: 5px solid var(--text-primary);
    border-radius: 8px;
    flex: 1 1 250px;
    text-align: center;
    transition: all 0.3s ease; 
}

.feature-box:hover {
    background-color: #252525;
    transform: scale(1.03);
    box-shadow: 0 0 15px rgba(66,165,245,0.3);
}

/* TEMA TERANG: Perbaikan Hover */
.light-theme .feature-box:hover {
    background-color: #eee;
    box-shadow: 0 0 15px rgba(0,123,255,0.3);
}

.feature-box h4 {
    color: var(--text-primary);
    margin-bottom: 10px;
}

/* PRODUCTS */
.products-section {
    background-color: var(--box-bg);
    padding: 50px 20px 80px 20px;
    border-top: 1px solid var(--border-color);
}

.product-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 25px;
    width: 100%;
}

.product-category {
    background-color: var(--bg-dark);
    padding: 25px;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    box-shadow: 0 4px 10px rgba(0,0,0,0.3);
    word-wrap: break-word;
    transition: all 0.3s ease; 
}

.product-category:hover {
    border-color: var(--text-primary);
    box-shadow: 0 0 15px rgba(66,165,245,0.2);
}

.product-category h4 {
    color: var(--text-primary);
    font-size: 1.4em;
    margin-bottom: 15px;
    padding-bottom: 10px;
    border-bottom: 2px solid var(--text-primary);
}

.product-category ul {
    list-style: none;
}

.product-category ul li {
    padding: 8px 0;
    color: #ccc; 
    position: relative;
    padding-left: 20px;
    font-size: 0.95em;
}

/* TEMA TERANG: Perbaikan Teks List Produk */
.light-theme .product-category ul li {
    color: var(--text-light); 
}

.product-category ul li::before {
    content: "â—";
    color: var(--text-primary);
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
}

/* CTA */
.cta-section {
    text-align: center;
    padding: 80px 20px;
    background-color: var(--cta-bg);
}

/* FOOTER */
footer {
    background-color: var(--footer-bg);
    text-align: center;
    padding: 25px 20px;
    border-top: 1px solid var(--border-color);
    font-size: 0.9em;
    color: #888;
}

/* SCROLL ANIM */
.scroll-reveal-item {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.8s ease-out, transform 0.8s ease-out;
}

.scroll-reveal-item.visible {
    opacity: 1;
    transform: translateY(0);
}

/* FIX MEDIA RESPONSIVE */
img, iframe, video {
    max-width: 100%;
    height: auto;
}

/* TABLET */
@media(max-width:992px){
    .product-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 20px;
    }
}

/* HP - MEDIA QUERY FINAL UNTUK HAMBURGER MENU & FIX OFFSIDE */
@media(max-width:600px){
    /* PENTING: Perbaiki padding container di HP agar tidak terlalu lebar */
    .container {
        padding: 0 15px; /* Padding sedikit lebih kecil di HP */
    }

    .nav-bar { 
        flex-direction: row; 
        justify-content: space-between; 
        align-items: center; 
        flex-wrap: nowrap; 
        width: 100%; 
    }
    
    /* FIX OFFSIDE TERAKHIR: Mengatur logo agar menyusut dan tidak memaksakan lebar */
    .logo {
        flex-grow: 0;
        flex-shrink: 1; 
        min-width: 0; /* Mengizinkan Flexbox menyusutkan elemen */
        font-size: 1.4em; /* Ukuran font lebih kecil di HP */
        line-height: 1.2;
        margin-right: 10px; /* Jarak dari ikon Hamburger */
    }
    
    /* Tombol Hamburger Tampil di HP */
    .menu-icon {
        display: block; 
        flex-shrink: 0; 
    }

    /* Menyembunyikan Navigasi & Tombol Tema secara default */
    #main-nav-menu {
        display: none; 
        position: absolute;
        top: 65px; 
        left: 0;
        width: 100%;
        background-color: var(--header-bg);
        border-top: 1px solid var(--border-color);
        padding: 15px 20px;
        box-shadow: 0 5px 10px rgba(0,0,0,0.5);
        flex-direction: column; 
        align-items: flex-start;
        z-index: 999;
    }

    /* Class yang akan ditambahkan oleh JS saat menu dibuka */
    #main-nav-menu.open {
        display: flex; 
    }

    /* Gaya Navigasi di dalam Menu Terbuka */
    #main-nav-menu nav {
        flex-direction: column;
        width: 100%;
        gap: 0; 
        margin-bottom: 10px;
    }
    
    #main-nav-menu nav a {
        padding: 10px 0;
        border-bottom: 1px solid var(--border-color);
        width: 100%;
    }
    
    /* Tombol Tema di dalam menu */
    #main-nav-menu #theme-toggle {
        width: 100%;
        text-align: center;
        padding: 10px;
    }
    
    /* Hero */
    .hero-section { padding: 100px 15px; }
    .store-name { 
        font-size: 2.2em; 
        letter-spacing: 2px; 
    }
    .tagline { font-size: 1.2em; }
    
    /* Fitur/Features Grid FIX (Menumpuk ke Bawah) */
    .features-grid { 
        flex-direction: column; 
        gap: 20px; 
    }
    .feature-box {
        flex: 1 1 100%; 
    }

    /* Lain-lain */
    .btn { padding: 10px 25px; font-size: 0.9em; }
    h3 { font-size: 1.6em; }

    /* Produk */
    .product-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    .product-category {
        width: 100%;
        margin: 0 auto;
    }
}