/* ==========================================================================
   MULYA CUISINE - MAIN STYLESHEET
   Features: Dark Mode, WCAG Colors, Responsive Grid, Sticky Actions
   ========================================================================== */

/* 1. CSS VARIABLES (THEME CONFIG) */
:root {
    /* --- BRAND COLORS --- */
    --brand-red: #D32F2F;        /* Merah Cabai (Primary) */
    --brand-dark-red: #8B0000;   /* Merah Marun (Hover/Header) */
    --brand-gold: #FFC107;       /* Kuning Emas (Accent/Highlight) */
    --brand-green: #25D366;      /* WhatsApp Green */
    --brand-ig: #E1306C;         /* Instagram Pink */

    /* --- LIGHT MODE (DEFAULT) --- */
    --header-bg: #8B0000;        /* Header Merah Marun */
    --header-text: #ffffff;      
    --primary-color: #D32F2F;    /* Judul Utama Merah */
    --accent-color: #D32F2F;     /* Link & Aksen */
    --bg-color: #ffffff;         
    --text-color: #333333;       
    --text-muted: #666666;
    --card-bg: #f8f9fa;          
    --border-color: #dddddd;     
    --input-bg: #ffffff;         
    --button-text: #ffffff;      
    --shadow: 0 4px 6px rgba(0,0,0,0.1);
    --hero-overlay: rgba(0,0,0,0.6);
}

[data-theme="dark"] {
    /* --- DARK MODE (OPTIMIZED) --- */
    --header-bg: #1a0000;        /* Hitam Kemerahan */
    --header-text: #f4f4f4;      
    --primary-color: #ff8a80;    /* Merah Muda Terang */
    --accent-color: #ffd740;     /* Emas Terang */
    --bg-color: #121212;         
    --text-color: #e6e6e6;       
    --text-muted: #aaaaaa;
    --card-bg: #1e1e1e;          
    --border-color: #444444;     
    --input-bg: #2c2c2c;         
    --button-text: #000000;      
    --shadow: 0 4px 6px rgba(0,0,0,0.5);
    --hero-overlay: rgba(0,0,0,0.8);
}

/* 2. GLOBAL RESET & BASE STYLES */
* { box-sizing: border-box; }

body {
    font-family: 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
    line-height: 1.6;
    margin: 0;
    padding: 0;
    background-color: var(--bg-color);
    color: var(--text-color);
    transition: background-color 0.3s, color 0.3s;
}

/* Link Default */
a {
    color: var(--accent-color);
    text-decoration: none;
    transition: color 0.2s;
}
a:hover { text-decoration: underline; }

h1, h2, h3, h4, h5, h6 { color: var(--primary-color); margin-top: 0; }

/* Skip Link (Accessibility) */
.skip-link {
    position: absolute;
    top: -50px;
    left: 0;
    background: var(--brand-gold);
    color: #000;
    padding: 10px 15px;
    z-index: 10000;
    text-decoration: none;
    font-weight: bold;
    transition: top 0.3s;
}
.skip-link:focus { top: 0; }

/* 3. HEADER & NAVIGATION */
.site-header {
    background: var(--header-bg);
    color: var(--header-text);
    padding: 1rem 0;
    border-bottom: 5px solid var(--brand-gold);
    position: sticky;
    top: 0;
    z-index: 100;
}

.container {
    width: 90%;
    max-width: 1100px;
    margin: auto;
    padding: 0 1rem;
}

.navbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 15px;
}

/* Logo Styling */
.brand-wrapper { display: flex; align-items: center; }

.logo-text {
    display: flex;
    align-items: center;
    gap: 12px;
    text-decoration: none !important;
    color: var(--header-text) !important;
}

.logo-icon {
    font-size: 2.5rem;
    background: white;
    width: 50px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    border: 2px solid var(--brand-gold);
}

.logo-group { display: flex; flex-direction: column; }

.brand-main {
    font-family: serif;
    font-weight: bold;
    font-size: 1.4rem;
    line-height: 1.1;
    letter-spacing: 0.5px;
}

.brand-sub {
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--brand-gold);
}

/* Nav Controls */
.nav-controls {
    display: flex;
    align-items: center;
    gap: 15px;
}

nav ul {
    list-style: none;
    padding: 0;
    display: flex;
    gap: 20px;
    margin: 0;
}

nav a {
    color: var(--header-text);
    font-weight: 500;
    font-size: 1rem;
}

/* Active State */
nav a:hover, nav a:focus, 
nav a.active, nav a[aria-current="page"] {
    color: var(--brand-gold);
    text-decoration: underline;
    text-decoration-thickness: 3px;
    text-underline-offset: 4px;
}

/* 4. BUTTONS (THEME & GENERAL) */
#theme-toggle, #lang-toggle {
    background: rgba(255,255,255,0.1);
    border: 2px solid rgba(255,255,255,0.3);
    color: var(--header-text);
    padding: 5px 12px;
    border-radius: 20px;
    cursor: pointer;
    font-size: 0.9rem;
    font-weight: bold;
    transition: all 0.3s;
}

#theme-toggle:hover, #lang-toggle:hover {
    background: rgba(255,255,255,0.2);
    border-color: var(--brand-gold);
    color: var(--brand-gold);
}

.button {
    display: inline-block;
    background: var(--brand-red);
    color: white !important;
    padding: 12px 25px;
    border-radius: 6px;
    text-decoration: none;
    font-weight: bold;
    border: none;
    cursor: pointer;
    transition: transform 0.2s, background 0.2s;
}
.button:hover {
    background: var(--brand-dark-red);
    transform: translateY(-2px);
    text-decoration: none;
}
.btn-large { font-size: 1.1rem; padding: 15px 30px; }

/* 5. HERO SECTION */
.hero-section {
    background-color: var(--brand-dark-red);
    background-image: linear-gradient(var(--hero-overlay), var(--hero-overlay)), url('../img/hero-bg.jpg');
    background-size: cover;
    background-position: center;
    color: white;
    text-align: center;
    padding: 5rem 1rem;
    margin-bottom: 2rem;
    border-radius: 0 0 20px 20px;
}

.hero-content h1 { color: white; font-size: 2.5rem; margin-bottom: 1rem; }
.text-highlight { color: var(--brand-gold); font-style: italic; }

.hero-badges {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin: 20px 0;
    flex-wrap: wrap;
}

.badge {
    background: rgba(255,255,255,0.2);
    border: 1px solid var(--brand-gold);
    padding: 5px 15px;
    border-radius: 20px;
    font-size: 0.9rem;
    color: #fff;
}

/* 6. IMPACT BANNER (Social Enterprise) */
.impact-banner {
    background: #e3f2fd;
    color: #0d47a1;
    border: 1px dashed #0d47a1;
    padding: 1.5rem;
    text-align: center;
    border-radius: 8px;
    margin-bottom: 3rem;
    font-size: 1.1rem;
}
[data-theme="dark"] .impact-banner {
    background: #102027;
    color: #90caf9;
    border-color: #90caf9;
}

/* 7. PRODUCT GRID (ETALASE) */
.section-title {
    text-align: center;
    margin-bottom: 2rem;
    font-size: 2rem;
    position: relative;
    padding-bottom: 10px;
}
.section-title::after {
    content: '';
    display: block;
    width: 60px;
    height: 4px;
    background: var(--brand-gold);
    margin: 10px auto 0;
    border-radius: 2px;
}

.product-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2rem;
    margin-bottom: 4rem;
}

.product-card {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    overflow: hidden;
    transition: transform 0.3s, box-shadow 0.3s;
    display: flex;
    flex-direction: column;
}

.product-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow);
    border-color: var(--brand-gold);
}

.product-img-wrapper {
    height: 220px;
    background: #ccc;
    position: relative;
}
.product-img-wrapper img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.product-info {
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

.product-info h3 { margin-bottom: 5px; color: var(--text-color); }
.product-weight { color: var(--text-muted); font-size: 0.9rem; margin-bottom: 10px; }
.product-desc { flex-grow: 1; margin-bottom: 15px; font-size: 0.95rem; }
.product-price {
    font-size: 1.4rem;
    font-weight: bold;
    color: var(--brand-red);
    margin-bottom: 15px;
}

[data-theme="dark"] .product-price { color: var(--primary-color); }

/* Tombol WhatsApp di Produk */
.btn-wa-product {
    background-color: var(--brand-green);
    width: 100%;
    text-align: center;
    display: block;
}
.btn-wa-product:hover {
    background-color: #1ea952;
    transform: none; 
}

/* 8. SOCIAL PROOF & CERTIFICATES */
.proof-section {
    text-align: center;
    padding: 3rem 0;
    background: var(--card-bg);
    border-radius: 12px;
    margin-bottom: 4rem;
}

.rating-box .stars { color: var(--brand-gold); font-size: 1.5rem; letter-spacing: 5px; }
.cert-display { margin-top: 2rem; }
.cert-img { max-width: 100%; height: auto; border-radius: 8px; box-shadow: var(--shadow); border: 4px solid white; max-height: 300px; }

/* 9. FOOTER */
.site-footer {
    background: #0a0a0a;
    color: #e0e0e0;
    padding: 4rem 0 2rem;
    border-top: 5px solid var(--brand-gold);
}

.footer-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 3rem;
    margin-bottom: 3rem;
}

.footer-col h3 { color: white; border-bottom: 1px solid #333; padding-bottom: 10px; margin-bottom: 15px; }

/* Instagram Button Style */
.btn-ig {
    display: inline-block;
    margin-top: 15px;
    color: var(--brand-ig);
    background: white;
    padding: 8px 15px;
    border-radius: 6px;
    font-weight: bold;
    font-size: 0.95rem;
    text-decoration: none;
    transition: transform 0.2s;
}
.btn-ig:hover {
    transform: translateY(-2px);
    text-decoration: none;
    box-shadow: 0 2px 5px rgba(255,255,255,0.2);
}

.legal-list { list-style: none; padding: 0; }
.legal-list li { margin-bottom: 10px; display: flex; gap: 10px; }

.maps-link { color: var(--brand-gold); text-decoration: underline; }

.footer-bottom {
    text-align: center;
    border-top: 1px solid #333;
    padding-top: 20px;
    font-size: 0.9rem;
    color: #888;
}
.footer-bottom a { color: #aaa; }

/* 10. STICKY WHATSAPP (MOBILE ONLY) */
.sticky-wa {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    z-index: 9999;
    background: white;
    padding: 10px 15px;
    box-shadow: 0 -4px 10px rgba(0,0,0,0.1);
    display: none; /* Default hidden */
}

.btn-wa-sticky {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 10px;
    background: var(--brand-green);
    color: white;
    width: 100%;
    padding: 14px;
    border-radius: 50px;
    font-weight: bold;
    font-size: 1.1rem;
    text-decoration: none;
    box-shadow: 0 4px 6px rgba(37, 211, 102, 0.4);
}

/* Helpers */
.visually-hidden {
    position: absolute;
    width: 1px; height: 1px;
    padding: 0; margin: -1px;
    overflow: hidden;
    clip: rect(0,0,0,0);
    border: 0;
}

/* --- LOGO & RESPONSIVE RULES (UPDATED) --- */

.site-logo {
    height: 60px;      /* Ukuran Laptop */
    width: auto;
    display: block;
    transition: all 0.3s ease;
}

/* Tampilan Mobile (Layar HP) - FIX LAYOUT */
@media (max-width: 768px) {
    .navbar { 
        flex-direction: column; 
        align-items: center; /* KUNCI: Membuat semua elemen rata tengah */
        gap: 15px; 
    }
    
    .brand-wrapper {
        width: 100%;
        display: flex;
        justify-content: center; /* Logo di tengah */
    }

    .site-logo {
        height: 35px; /* Ukuran Logo DIKECILKAN di HP agar proporsional */
    }

    .nav-controls { 
        width: 100%; 
        justify-content: center; /* Tombol menu/bahasa di tengah */
    }

    /* Pemanis Hero Text di HP */
    .hero-content h1 { font-size: 1.8rem; }
    
    /* Show Sticky WA on Mobile */
    .sticky-wa { display: block; }
    .site-footer { padding-bottom: 90px; } 
}
