/* === CSS RESET & VARIABLES === */
:root {
    --primary-color: #d21616;
    --secondary-color: #FDF4E3;
    --dark-color: #2D2D2D;
    --light-color: #FFFFFF;
    --grey-color: #f8f8f8;
    --success-color: #28a745;
    --header-height: 80px;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    scroll-behavior: smooth;
    font-family: 'Poppins', sans-serif;
}

body {
    background-color: var(--light-color);
    color: var(--dark-color);
    line-height: 1.6;
    padding-top: var(--header-height);
}

/* === GLOBAL STYLES === */
.container {
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 20px;
}

section {
    padding: 80px 0;
}

section:nth-child(even) {
    background-color: var(--grey-color);
}

h1, h2, h3, h4, h5 {
    font-family: 'Lora', serif;
    font-weight: 700;
    color: var(--primary-color);
    margin-bottom: 20px;
}

h1 { font-size: 3rem; }
h2 { font-size: 2.5rem; text-align: center; }
p { margin-bottom: 15px; max-width: 650px; margin-left: auto; margin-right: auto; }

.btn {
    display: inline-block;
    background-color: var(--primary-color);
    color: var(--light-color);
    padding: 12px 30px;
    text-decoration: none;
    border-radius: 5px;
    font-weight: 600;
    border: none;
    cursor: pointer;
    transition: transform 0.3s ease, background-color 0.3s;
}
.btn:hover {
    background-color: #9d1a1a;
    transform: translateY(-2px);
}
.btn i { margin-right: 8px; }

/* === HEADER & NAVIGATION === */
header {
    background-color: var(--light-color);
    padding: 10px 0;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    height: var(--header-height);
    display: flex;
    align-items: center;
}

header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
}

header .logo {
    max-height: 60px;
    width: auto;
}

header nav {
    flex-grow: 1; 
    display: flex;
    justify-content: flex-end; 
}

header nav ul {
    list-style: none;
    display: flex;
    gap: 25px; 
    align-items: center;
}

header nav a {
    text-decoration: none;
    color: var(--dark-color);
    font-weight: 600;
    font-size: 0.95rem;
    transition: color 0.3s ease;
}

header nav a:hover {
    color: var(--primary-color);
}

.header-right {
    display: flex;
    align-items: center;
    gap: 20px; 
}

.hamburger { 
    display: none; 
    cursor: pointer;
}

/* === HERO SECTION === */
.hero {
    background-image: url('../images/banner.png');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    min-height: 60vh;
    height: calc(100vh - var(--header-height));
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 0 20px;
    background-color: var(--primary-color);
}

/* === TENTANG KAMI SECTION === */
.about-content { text-align: center; }

/* === MENU SECTION === */
.menu-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 50px;
    margin-top: 40px;
}

.menu-category h3 {
    font-size: 1.8rem;
    color: var(--dark-color);
    border-bottom: 2px solid var(--primary-color);
    padding-bottom: 10px;
    margin-bottom: 25px;
    text-align: left;
}

.menu-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    font-size: 1rem;
    gap: 15px;
}

.item-details { flex-grow: 1; }
.item-name { font-weight: 600; }
.item-badge {
    background-color: var(--primary-color);
    color: var(--light-color);
    font-size: 0.7rem;
    padding: 3px 8px;
    border-radius: 5px;
    margin-left: 8px;
    font-weight: 600;
    text-transform: uppercase;
}

.item-price {
    font-weight: 700;
    color: var(--primary-color);
    font-size: 1.1rem;
    white-space: nowrap;
    min-width: 50px;
    text-align: right;
}

.quantity-selector {
    display: flex;
    align-items: center;
}

.quantity-selector button {
    background-color: var(--dark-color);
    color: white;
    border: none;
    width: 30px;
    height: 30px;
    cursor: pointer;
    font-size: 1.2rem;
    line-height: 30px;
    border-radius: 5px;
    transition: background-color 0.3s;
}

.quantity-selector button:hover { background-color: var(--primary-color); }

.quantity-selector input {
    width: 45px;
    text-align: center;
    border: 1px solid #ddd;
    border-radius: 5px;
    margin: 0 8px;
    font-size: 1rem;
    font-weight: 600;
    -moz-appearance: textfield;
}

.quantity-selector input::-webkit-outer-spin-button,
.quantity-selector input::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

/* === OTHER SECTIONS (KEUNGGULAN, GALERI, KONTAK) === */
.why-us-grid, .gallery-grid {
    display: grid;
    margin-top: 40px;
}
.why-us-grid { grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); gap: 40px; text-align: center; }
.why-us-item .icon { font-size: 3rem; color: var(--primary-color); margin-bottom: 15px; }
.why-us-item h3 { color: var(--dark-color); font-size: 1.5rem; }
.gallery-grid { grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 15px; }
.gallery-grid img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 8px;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}
.gallery-grid img:hover {
    transform: scale(1.05);
    box-shadow: 0 10px 20px rgba(0,0,0,0.15);
}

.contact-content { text-align: center; }
.social-icons { margin-top: 20px; }
.social-icons a {
    margin: 0 15px;
    text-decoration: none;
    font-size: 2.5rem;
    color: var(--dark-color);
    transition: color 0.3s, transform 0.3s;
}
.social-icons a:hover {
    color: var(--primary-color);
    transform: scale(1.1);
}

/* === FOOTER === */
footer {
    background-color: var(--dark-color);
    color: var(--light-color);
    text-align: center;
    padding: 25px 0;
}

/* === KERANJANG BELANJA (MODAL & BUTTON) === */
.cart-nav-btn {
    background-color: var(--primary-color);
    color: var(--light-color) !important;
    padding: 8px 15px;
    border-radius: 20px;
    transition: background-color 0.3s, transform 0.3s;
    display: flex;
    align-items: center;
    text-decoration: none;
}
.cart-nav-btn:hover {
    background-color: #9d1a1a;
    transform: scale(1.05);
    color: var(--light-color) !important;
}
.cart-nav-btn i { margin-right: 8px; }
#cart-count {
    background-color: var(--light-color);
    color: var(--primary-color);
    font-size: 0.8rem;
    font-weight: 700;
    padding: 2px 8px;
    border-radius: 50%;
}

.cart-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.6);
    z-index: 1002;
    display: none;
    justify-content: center;
    align-items: center;
}
.cart-overlay.show { display: flex; }

.cart-section {
    position: relative;
    background-color: var(--dark-color);
    color: white;
    padding: 25px;
    border-radius: 10px;
    box-shadow: 0 8px 20px rgba(0,0,0,0.3);
    width: 90%;
    max-width: 450px;
    transform: scale(0.95);
    transition: transform 0.3s ease-out;
    max-height: 85vh;
    overflow-y: auto;
}
.cart-overlay.show .cart-section { transform: scale(1); }
.close-btn {
    position: absolute;
    top: 10px;
    right: 15px;
    background: none;
    border: none;
    color: white;
    font-size: 2rem;
    cursor: pointer;
}
.cart-section h4 {
    color: var(--light-color);
    margin-top: 0;
    border-bottom: 1px solid #555;
    padding-bottom: 10px;
}
#cart-items { margin: 15px 0; max-height: 180px; overflow-y: auto; padding-right: 10px; }
#cart-items p { color: #aaa; margin: 0; }
.cart-item { display: flex; justify-content: space-between; margin-bottom: 8px; font-size: 0.95rem; }
.cart-section hr { border-color: #555; margin: 15px 0; }
.cart-section strong { font-size: 1.2rem; }
#checkout-btn:disabled {
    background-color: #777;
    cursor: not-allowed;
    transform: none;
}
#checkout-btn:disabled:hover { background-color: #777; }
#checkout-form { display: none; margin-top: 15px; }
#checkout-form h5 { color: var(--light-color); }
#checkout-form label { display: block; margin-top: 10px; margin-bottom: 5px; font-size: 0.9rem; }
#checkout-form input,
#checkout-form textarea {
    width: 100%;
    padding: 10px;
    margin-bottom: 10px;
    border-radius: 5px;
    border: 1px solid #ccc;
    font-family: 'Poppins', sans-serif;
    font-size: 0.95rem;
    background: #f0f0f0;
}
#checkout-form button { width: 100%; background-color: var(--success-color); }
#checkout-form button:hover { background-color: #218838; }

/* Gaya untuk input WhatsApp */
.whatsapp-input-container {
    position: relative;
    margin-bottom: 10px;
}
.whatsapp-prefix {
    position: absolute;
    top: 50%;
    left: 12px;
    transform: translateY(-50%);
    color: #555;
    font-weight: 600;
    font-size: 0.95rem;
    pointer-events: none;
    z-index: 2;
}
#checkout-form #customer_whatsapp_input {
    padding-left: 50px !important;
    margin-bottom: 0;
}


/* === MEDIA QUERIES FOR RESPONSIVENESS === */
@media (min-width: 769px) {
    .menu-grid { grid-template-columns: repeat(2, 1fr); }
    header nav { margin-right: 20px; }
}

@media (max-width: 768px) {
    .hero {
        height: 50vh; 
        min-height: 350px;
    }

    header .container {
        justify-content: space-between;
    }
    
    header nav {
        position: absolute;
        top: var(--header-height);
        left: 0;
        width: 100%;
        background-color: var(--light-color);
        box-shadow: 0 4px 8px rgba(0,0,0,0.1);
        flex-direction: column;
        max-height: 0;
        overflow: hidden;
        transition: max-height 0.4s ease-in-out;
        flex-grow: 0;
        justify-content: flex-start;
        order: 3;
    }

    header nav.active {
        max-height: 500px;
        padding-bottom: 10px;
    }

    header nav ul {
        flex-direction: column;
        width: 100%;
        padding: 10px 0;
        gap: 0;
    }

    header nav li {
        width: 100%;
        text-align: center;
    }

    header nav a {
        display: block;
        padding: 12px 0;
    }

    .hamburger {
        display: block;
    }
    .hamburger span {
        display: block;
        width: 25px;
        height: 3px;
        margin: 5px 0;
        background-color: var(--dark-color);
        transition: 0.4s;
    }
    .hamburger.active span:nth-child(1) {
        transform: rotate(-45deg) translate(-5px, 6px);
    }
    .hamburger.active span:nth-child(2) {
        opacity: 0;
    }
    .hamburger.active span:nth-child(3) {
        transform: rotate(45deg) translate(-5px, -6px);
    }
}

/* =========================================
   MODERN ADMIN LOGIN MODAL (REVISION)
   ========================================= */

/* 1. Overlay dengan Efek Blur (Fokus) */
#admin-login-overlay {
    background-color: rgba(44, 62, 80, 0.6); /* Warna gelap transparan */
    backdrop-filter: blur(8px); /* Efek buram pada latar belakang */
    -webkit-backdrop-filter: blur(8px);
    z-index: 2000; /* Pastikan di atas segalanya */
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

/* 2. Modal Box dengan Glassmorphism & Tema Merah-Oranye */
#admin-login-modal {
    background: rgba(255, 255, 255, 0.9); /* Putih transparan */
    border: 1px solid rgba(255, 255, 255, 0.5);
    box-shadow: 0 20px 50px rgba(171, 18, 12, 0.25); /* Bayangan merah halus */
    border-radius: 20px;
    padding: 40px 30px;
    width: 90%;
    max-width: 380px;
    text-align: center;
    color: #2c3e50; /* Teks gelap (bukan putih lagi) */
    
    /* Animasi Muncul */
    transform: scale(0.8);
    opacity: 0;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275); /* Efek mantul dikit */
}

/* State Aktif untuk Animasi */
#admin-login-overlay.show #admin-login-modal {
    transform: scale(1);
    opacity: 1;
}

/* 3. Header Modal */
#admin-login-modal h4 {
    font-family: 'Plus Jakarta Sans', 'Poppins', sans-serif;
    font-size: 1.5rem;
    font-weight: 800;
    margin-bottom: 25px;
    background: linear-gradient(135deg, #ab120c 0%, #e96527 100%); /* Gradasi Brand */
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    border-bottom: none; /* Hapus garis lama */
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

#admin-login-modal h4 i {
    font-size: 1.2rem;
    background: linear-gradient(135deg, #ab120c 0%, #e96527 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

/* 4. Input Fields Modern */
#admin-login-modal label {
    display: block;
    text-align: left;
    font-size: 0.85rem;
    font-weight: 600;
    color: #666;
    margin-bottom: 6px;
    margin-top: 15px;
}

#admin-login-modal input {
    width: 100%;
    padding: 12px 15px;
    background: #fdfdfd;
    border: 2px solid #eee;
    border-radius: 10px;
    font-size: 0.95rem;
    color: #333;
    transition: all 0.3s ease;
    box-shadow: inset 0 2px 4px rgba(0,0,0,0.02);
}

#admin-login-modal input:focus {
    border-color: #e96527; /* Oranye saat fokus */
    box-shadow: 0 0 0 4px rgba(233, 101, 39, 0.1);
    background: white;
    outline: none;
}

/* 5. Tombol Login Gradient */
#admin-login-modal button[type="submit"] {
    margin-top: 25px;
    width: 100%;
    padding: 14px;
    border: none;
    border-radius: 50px;
    background: linear-gradient(135deg, #ab120c 0%, #e96527 100%);
    color: white;
    font-size: 1rem;
    font-weight: 700;
    cursor: pointer;
    box-shadow: 0 10px 20px rgba(171, 18, 12, 0.2);
    transition: transform 0.2s, box-shadow 0.2s;
}

#admin-login-modal button[type="submit"]:hover {
    transform: translateY(-2px);
    box-shadow: 0 15px 25px rgba(171, 18, 12, 0.3);
    background: linear-gradient(135deg, #c0392b 0%, #d35400 100%);
}

/* 6. Tombol Close (X) */
#close-admin-login-btn {
    position: absolute;
    top: 15px;
    right: 15px;
    background: #f1f1f1;
    color: #888;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    font-weight: bold;
    cursor: pointer;
    transition: 0.2s;
    border: none;
}

#close-admin-login-btn:hover {
    background: #e96527;
    color: white;
    transform: rotate(90deg);
}