/*==================================
  1. RESET & FONT
====================================*/
@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@300;400;600;700&display=swap');

:root {
    /* Warna Utama */
    --primary-color: #007bff; /* Biru Kebanggaan */
    --secondary-color: #28a745; /* Hijau (Untuk sukses) */
    --accent-color: #ff6347; /* Merah (Harga/Penting/Error) */
    --background-light: #f8f9fa; /* Latar Belakang Cerah */
    --text-dark: #343a40;
    --text-light: #6c757d;
    --card-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);

    --brand-text-color: var(--primary-color);
    --icon-color: var(--primary-color);
    
    --button-primary: #007bff; 
    --button-secondary: #00bfff; 
    --button-wa: #25D366; 
    
    --input-border-color: #a8d2ff; 
    --button-shadow-color: rgba(0, 123, 255, 0.3);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Poppins', sans-serif;
    line-height: 1.6;
    background-color: var(--background-light);
    color: var(--text-dark);
    scroll-behavior: smooth;
}

/* Global Elements */
hr {
    border: none;
    border-top: 1px solid #dee2e6;
    margin: 50px auto;
    width: 90%;
}

section {
    padding: 60px 5%;
    max-width: 1200px;
    margin: 0 auto;
}

h2 {
    text-align: center;
    margin-bottom: 40px;
    font-size: 2.2em;
    color: var(--brand-text-color);
    font-weight: 700;
}

/*==================================
  2. NAVIGASI (HEADER) - FIXED FOR RIGHT BURGER
====================================*/
.navbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background-color: var(--primary-color);
    padding: 15px 5%;
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    min-height: 70px;
}

.logo-link {
    height: 40px;
}

.logo {
    height: 100%;
    width: auto;
    object-fit: contain;
}

.nav-links {
    display: flex;
    list-style: none;
    gap: 25px;
    margin-left: auto; /* FIXED: Memastikan nav-links rata kanan di desktop */
}

.nav-links li a, .nav-links li button {
    color: white;
    text-decoration: none;
    padding: 10px 15px;
    display: block;
    font-weight: 600;
    transition: background-color 0.3s, color 0.3s;
    border-radius: 5px;
}

.nav-links li a:hover, .nav-links li button:hover {
    background-color: #0056b3;
}

/* CTA Button Umum */
.cta-button {
    background-color: var(--button-primary); 
    color: white;
    padding: 8px 18px;
    border-radius: 5px; 
    text-decoration: none;
    font-weight: 600;
    transition: background-color 0.3s, border-color 0.3s;
    border: 2px solid white; 
    cursor: pointer;
    box-sizing: border-box;
    display: inline-flex; 
    justify-content: center; 
    align-items: center;
    gap: 5px;
}

/* Tombol Login/Daftar (Big CTA) */
.big-cta {
    background-color: var(--button-primary); 
    color: white;
}

/* Hover effect */
.cta-button:hover {
    background-color: #0056b3;
    border-color: #ccc; 
}

/* Burger Icon */
.burger {
    display: none; 
    order: 3; /* FIXED: Pastikan burger ada di akhir jika ditampilkan */
}

.burger div {
    width: 25px;
    height: 3px;
    background-color: white;
    margin: 5px;
    border-radius: 2px;
    transition: all 0.3s ease;
}

.burger.toggle .line1 { transform: rotate(-45deg) translate(-5px, 6px); }
.burger.toggle .line2 { opacity: 0; }
.burger.toggle .line3 { transform: rotate(45deg) translate(-5px, -6px); }

/*==================================
  3. BERANDA (INDEX.PHP)
====================================*/
.hero-section {
    display: flex;
    align-items: center;
    gap: 40px;
    background: white;
    padding: 80px 5%;
    border-bottom: 5px solid var(--primary-color);
    min-height: 70vh;
}

.hero-content {
    flex: 1;
    max-width: 55%; 
}

.hero-content h2 {
    text-align: left;
    font-size: 3em;
    margin-bottom: 20px;
    color: var(--brand-text-color);
}

.usp-list {
    margin: 25px 0;
    display: flex;
    gap: 20px;
    flex-wrap: wrap;
    font-weight: 600;
    color: var(--brand-text-color); 
}

/* CTA Beranda Besar */
.hero-content .big-cta {
    background-color: var(--button-primary);
    padding: 14px 30px;
    font-size: 1.1em;
    border-radius: 5px;
    border: none;
    gap: 5px;
}
.hero-content .big-cta:hover {
    background-color: #0056b3; 
}

/* Carousel */
.hero-image-carousel {
    flex: 1;
    position: relative;
    max-width: 45%;
    overflow: hidden;
    border-radius: 12px;
    box-shadow: var(--card-shadow);
}

.carousel-img {
    width: 100%;
    aspect-ratio: 16/10; 
    object-fit: cover;
    display: none; 
}

/* Carousel Navigation */
.prev, .next {
    background-color: rgba(0, 0, 0, 0.5);
    color: white;
    padding: 10px;
    font-size: 1.5em;
    border-radius: 50%;
    width: 45px;
    height: 45px;
    display: flex;
    justify-content: center;
    align-items: center;
    position: absolute; 
    top: 50%; 
    transform: translateY(-50%); 
    transition: background-color 0.3s;
    border: none; 
    cursor: pointer;
    z-index: 10;
}

/* Penempatan Panah Kiri dan Kanan */
.prev {
    left: 10px; 
}
.next {
    right: 10px; 
}

.prev:hover, .next:hover {
    background-color: rgba(0, 0, 0, 0.8);
}


/* About Section */
.about-grid {
    display: flex;
    gap: 40px;
    align-items: flex-start; 
}

.about-text {
    flex: 2; 
}
.about-text p {
    margin-bottom: 15px; 
}

.about-image {
    flex: 2; 
    border-radius: 12px;
    overflow: hidden;
    box-shadow: var(--card-shadow);
    max-width: none; 
    margin: 0; 
    aspect-ratio: 16/10;
}

.about-image img {
    width: 100%;
    height: 100%; 
    object-fit: cover;
    display: block;
}

/*==================================
  4. DAFTAR MENU (MENU.PHP)
====================================*/
.menu-section {
    background: white;
}

.menu-section h3 {
    font-size: 1.5em;
    color: var(--brand-text-color); 
    margin-top: 30px;
    margin-bottom: 20px;
    text-align: center;
}

.menu-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 30px;
}

.menu-item {
    background-color: white;
    padding: 20px;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
    text-align: center;
    transition: transform 0.3s, box-shadow 0.3s;
    border: 1px solid #e9ecef;
}

.menu-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.1);
}

.menu-item img {
    width: 100%;
    height: 180px;
    object-fit: cover;
    border-radius: 8px;
    margin-bottom: 15px;
}

/* Harga Menu */
.menu-item .price {
    display: block;
    font-size: 1.5em;
    font-weight: 700;
    color: var(--primary-color); 
    margin: 15px 0;
}

.item-actions {
    display: block; 
    margin-top: 15px;
}

/* Tombol Aksi di Menu Item */
.item-actions button {
    width: 100%; 
    padding: 10px;
    border-radius: 5px;
    font-weight: 600;
    border: none; 
    background-color: var(--primary-color); 
    color: white; 
    transition: background-color 0.3s;
    
    display: flex; 
    justify-content: center; 
    align-items: center; 
    gap: 5px; 
}

.item-actions button:hover {
    background-color: #0056b3; 
}


/*==================================
  5. INFO & KONTAK (INFO.PHP)
====================================*/
.info-section {
    background-color: white;
    border-radius: 10px;
    box-shadow: var(--card-shadow);
    display: grid;
    grid-template-columns: 1fr;
    gap: 40px;
    padding: 40px; 
}

.lokasi-section h3, .kontak-section h3 {
    color: var(--brand-text-color);
    margin-bottom: 20px;
    font-size: 1.8em;
}

.map-container {
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    border-radius: 8px;
    overflow: hidden; 
}

.kontak-section ul {
    list-style: none;
    padding-left: 0;
}

.kontak-section li {
    margin: 15px 0;
    font-size: 1.1em;
    color: var(--text-dark); 
}
.kontak-section a {
    color: var(--brand-text-color); 
    text-decoration: none;
    font-weight: 600;
    transition: color 0.3s;
}

/*==================================
  6. FOOTER
====================================*/
footer {
    background-color: var(--text-dark);
    color: #e9ecef;
    text-align: center;
    padding: 25px 0;
    font-size: 0.9em;
}


/*==================================
   7. LOGIN UI (KHUSUS LOGIN.PHP)
====================================*/

.login-container {
    display: flex;
    max-width: 900px;
    width: 90%;
    background: white;
    border-radius: 15px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    overflow: hidden;
}

.login-form-area {
    flex: 1;
    padding: 40px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
}

.login-form-area h1 {
    color: var(--primary-color);
    font-size: 2.2em;
    margin-bottom: 5px;
    font-weight: 700;
}

.login-form-area p {
    color: #6c757d;
    margin-bottom: 30px;
    font-size: 1.1em;
}

.error-message {
    color: #dc3545;
    font-weight: 600;
    margin-bottom: 15px;
}

.auth-form {
    width: 100%;
    max-width: 300px;
    display: flex;
    flex-direction: column;
    align-items: center;
}

/* Input UI: Presisi */
.auth-form input {
    width: 100%;
    padding: 12px 20px;
    margin-bottom: 20px;
    border: 1px solid var(--input-border-color);
    border-radius: 50px; 
    font-size: 1.05em;
    outline: none;
    transition: border-color 0.3s, box-shadow 0.3s;
    color: var(--text-dark);
    background-color: white; 
}

.auth-form input:focus {
    border-color: #0056b3;
    box-shadow: 0 0 0 2px rgba(0, 123, 255, 0.2); 
}

/* Kontainer tombol untuk mengontrol lebar presisi */
.button-wrapper {
    width: 80%; 
    margin-top: 5px; 
}

/* Button UI: Presisi dan Compact */
.auth-form button {
    width: 100%; 
    padding: 12px 0; 
    background-color: var(--primary-color); 
    color: white;
    border: none;
    border-radius: 50px;
    font-size: 1.1em; 
    font-weight: 700;
    cursor: pointer;
    transition: background-color 0.2s, transform 0.1s, box-shadow 0.2s;
    box-shadow: 0 4px 10px var(--button-shadow-color);
}

.auth-form button:hover {
    background-color: #0056b3;
    transform: translateY(-1px);
    box-shadow: 0 6px 15px var(--button-shadow-color);
}

.login-image-area {
    flex: 1;
    background: url('./images/login.jpg') no-repeat center center; 
    background-size: cover;
    position: relative;
}


/*==================================
   8. PAYMENT SECTION (PAYMENT.PHP)
   ================================== */
.payment-section {
    background-color: white;
    border-radius: 10px;
    box-shadow: var(--card-shadow);
    max-width: 800px;
    margin: 40px auto;
    padding: 30px;
    text-align: center; 
}

/* Judul H2 Halaman Pembayaran */
.payment-section h2 {
    margin-bottom: 25px;
}

/* Teks Konfirmasi WA (Paragraf Keterangan) */
.payment-section > p:nth-of-type(1) { 
    text-align: center;
    margin-bottom: 25px;
    font-size: 1.05em; 
    padding: 0 10px; 
}

/* Judul H3 Pembayaran (Data Pelanggan, Metode Pembayaran) */
.payment-section h3 {
    text-align: left; 
    color: var(--brand-text-color);
    margin-bottom: 15px;
    font-size: 1.5em;
    padding-top: 10px; 
    margin-top: 30px; 
}

/* Hapus padding-top pada h3 pertama (Data Pelanggan) */
.order-summary h3:first-of-type { 
    padding-top: 0;
}


/* Container Ringkasan Pesanan */
.order-summary {
    border: 1px solid #dee2e6;
    padding: 20px;
    margin-bottom: 30px;
    border-radius: 8px;
    background-color: var(--background-light);
    text-align: left; 
}

/* Input Nama Pelanggan */
#customer-name {
    width: 100%;
    padding: 10px 15px; 
    margin-bottom: 20px;
    border: 1px solid #ccc;
    border-radius: 8px; 
    font-size: 1em;
    text-align: left; 
    display: block;
    margin-left: auto;
    margin-right: auto;
}

/* Daftar Rincian Pesanan */
#order-details-list {
    list-style: none;
    padding-left: 0;
    margin-bottom: 15px;
}

#order-details-list li {
    padding: 8px 0; 
    display: flex;
    justify-content: space-between; 
    border-bottom: 1px dotted #ced4da;
    font-size: 1em;
}

/* Total Bar */
.total-payment {
    display: flex;
    justify-content: space-between;
    font-size: 1.5em;
    font-weight: 700;
    color: var(--accent-color); 
    padding-top: 15px; 
    padding-bottom: 5px;
    border-top: 2px solid var(--primary-color);
}

.payment-options-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    justify-content: center;
    align-items: flex-start;
}

.payment-card {
    border: 1px solid #dee2e6;
    padding: 20px;
    border-radius: 8px;
    text-align: left; 
    background-color: var(--background-light); 
    transition: none;
}

.payment-card:hover {
    border-color: #dee2e6; 
}

.payment-card h4 {
    color: var(--brand-text-color);
    margin-bottom: 10px;
    font-size: 1.2em;
    font-weight: 600;
    display: flex; 
    align-items: center;
    gap: 10px;
}

.payment-card h4 i {
    font-size: 1.4em;
    color: var(--icon-color);
}


.payment-card .account-info {
    font-size: 1em; 
    font-weight: 400; 
    color: var(--text-dark);
    margin: 10px 0 5px 0;
    line-height: 1.8; 
}

.payment-card .note {
    font-size: 0.9em;
    color: var(--text-light);
    margin-bottom: 10px;
}


/* Tombol WA di Halaman Pembayaran */
#pay-to-wa-btn {
    width: 100%;
    margin-top: 25px;
    padding: 15px;
    background-color: var(--button-wa); 
    border: none;
    border-radius: 5px;
    font-size: 1.1em;
    
    display: flex; 
    justify-content: center; 
    align-items: center; 
    gap: 10px; 
    color: white; 
}
#pay-to-wa-btn:hover {
    background-color: #128C7E;
}


/*==================================
   9. POP-UP NOTIFIKASI KUSTOM
   ================================== */

.custom-popup-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 2000; 
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

.custom-popup-overlay.show {
    opacity: 1;
    visibility: visible;
}

.custom-popup-content {
    background: white;
    padding: 30px 40px;
    border-radius: 10px;
    text-align: center;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    transform: scale(0.8);
    opacity: 0;
    transition: transform 0.3s ease, opacity 0.3s ease;
}

.custom-popup-overlay.show .custom-popup-content {
    transform: scale(1);
    opacity: 1;
}

.popup-icon-container {
    width: 80px;
    height: 80px;
    margin: 0 auto 15px;
    position: relative;
}

.popup-icon-container i {
    font-size: 40px;
    animation: bounceIn 0.6s ease-out both;
}

/* Style Default/Success (hijau) */
.popup-icon-container.success i {
    color: var(--secondary-color); 
}

/* Style Error (merah) */
.popup-icon-container.error i {
    color: var(--accent-color); 
}


.popup-title {
    font-size: 1.5em;
    font-weight: 700;
    color: var(--text-dark);
    margin-bottom: 5px;
}

.popup-message {
    color: var(--text-light);
    margin-bottom: 20px;
}

.popup-close-btn {
    background-color: var(--primary-color);
    color: white;
    padding: 10px 20px;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-weight: 600;
    transition: background-color 0.2s;
}

.popup-close-btn:hover {
    background-color: #0056b3;
}

@keyframes bounceIn {
    0% {
        transform: scale(0.1);
        opacity: 0;
    }
    60% {
        transform: scale(1.2);
        opacity: 1;
    }
    100% {
        transform: scale(1);
    }
}


/*==================================
  10. RESPONSIVE MOBILE (FINAL FIX)
====================================*/
@media screen and (max-width: 768px) {
    
    /* --- Global & Headings --- */
    section {
        padding: 30px 5%; 
    }

    h2 {
        font-size: 1.8em;
        margin-bottom: 25px;
    }
    
    /* --- Navigasi Mobile --- */
    .navbar {
        min-height: 60px; 
        padding: 10px 5%; 
        justify-content: space-between; 
    }

    .logo-link {
        height: 30px; 
    }

    /* BURGER - DIPINDAH KE KANAN */
    .burger { 
        display: block; 
        order: 3; 
    }

    /* NAV LINKS (Menu Hamburger) */
    .nav-links {
        position: fixed;
        right: 0; /* FIXED: Menu muncul dari sisi kanan layar */
        top: 60px; 
        background-color: var(--primary-color);
        flex-direction: column;
        width: 100%;
        height: auto;
        transform: translateX(100%); /* Geser ke kanan (sembunyi) */
        transition: transform 0.5s ease-in;
        overflow-y: auto;
        z-index: 999;
    }
    .nav-links.nav-active {
        transform: translateX(0); /* Muncul di layar */
    }
    .nav-links li a, .nav-links li button {
        text-align: center;
        padding: 12px 15px; 
        border-bottom: 1px solid rgba(255, 255, 255, 0.1);
        border-radius: 0;
    }

    /* --- 3. BERANDA (INDEX.PHP) --- */
    .hero-section {
        flex-direction: column;
        text-align: center;
        padding: 30px 5% 40px; 
        min-height: auto; 
        gap: 20px;
    }
    
    /* Konten Teks Hero */
    .hero-content {
        order: 2;
        max-width: 100%;
        margin-bottom: 20px;
    }
    .hero-content h2 {
        text-align: center;
        font-size: 2.2em; 
        margin-bottom: 15px;
        line-height: 1.2;
    }

    /* Daftar Keunggulan (USP) */
    .usp-list {
        margin: 15px 0;
        gap: 15px;
        font-size: 0.95em;
        justify-content: center;
        text-align: center;
    }
    
    /* Gambar Carousel Hero (Presisi Gambar) */
    .hero-image-carousel {
        order: 1;
        max-width: 100%;
        aspect-ratio: 16/9; 
    }
    .carousel-img {
        aspect-ratio: 16/9; 
    }
    
    /* Navigasi Carousel */
    .prev, .next {
        font-size: 1.1em;
        width: 30px;
        height: 30px;
        padding: 0; 
    }
    
    /* CTA Beranda Besar (Big CTA) */
    .hero-content .big-cta {
        padding: 12px 25px; 
        font-size: 1em;
        gap: 8px;
    }

    /* About Mobile */
    .about-grid { 
        flex-direction: column; 
        align-items: center; 
        gap: 25px; 
    }
    .about-image {
        order: 1; 
        max-width: 100%;
        margin-bottom: 15px;
        aspect-ratio: 16/9; 
    }
    .about-text {
        order: 2;
    }
    .about-text p {
        font-size: 0.95em; 
    }

    /* --- 4. DAFTAR MENU --- */
    .menu-grid {
        grid-template-columns: 1fr; 
        gap: 20px;
    }
    .menu-item img {
        height: 180px; 
    }
    .menu-item .price {
        font-size: 1.3em;
    }

    /* Tombol Aksi Menu Item */
    .item-actions button {
        padding: 12px; 
        font-size: 1em;
        gap: 8px; 
    }
    
    /* --- 5. INFO & KONTAK --- */
    .info-section {
        grid-template-columns: 1fr;
        padding: 25px;
    }
    .lokasi-section h3, .kontak-section h3 {
        font-size: 1.6em;
    }
    
    /* --- 7. LOGIN UI --- */
    .login-container {
        flex-direction: column;
        width: 100%;
        max-width: none;
        border-radius: 0;
        box-shadow: none;
        min-height: 100vh;
        margin: 0;
    }
    .login-image-area {
        display: none; 
    }
    .login-form-area {
        padding: 40px 5% 20px;
        flex: 1; 
    }
    .auth-form {
        max-width: 350px; 
    }
    .auth-form input {
        padding: 10px 20px; 
        font-size: 1em;
    }
    .button-wrapper {
        width: 100%; 
    }
    
    /* --- 8. PAYMENT SECTION --- */
    .payment-section {
        padding: 25px;
        margin: 20px auto;
    }

    /* Tombol WA di Payment */
    #pay-to-wa-btn {
        padding: 14px;
        font-size: 1em;
        gap: 8px; 
    }
    
    /* --- 9. POP-UP NOTIFIKASI --- */
    .custom-popup-content {
        padding: 25px 30px;
        width: 90%;
        max-width: 350px;
    }
    .popup-icon-container {
        width: 70px;
        height: 70px;
    }
    .popup-icon-container i {
        font-size: 35px;
    }
    .popup-title {
        font-size: 1.3em;
    }

    /* Footer */
    footer {
        padding: 15px 5%; 
    }
}