/* ==================== Palet Warna & Variabel ==================== */
:root {
    --dark-grey: #1a1a1a;        /* Abu Gelap/Arang - Latar Utama */
    --light-text: #f0f0f0;       /* Putih/Krem Pucat - Teks Utama */
    --accent-color: #a07a50;     /* Cokelat Muted/Emas Soft - Aksen/CTA */
    --secondary-dark: #2c2c2c;   /* Abu Gelap Sekunder - Latar Sekunder */
    --text-faded: rgba(255, 255, 255, 0.7); /* Teks Pudar */
}

/* ==================== Reset & Global Styles ==================== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Montserrat', sans-serif;
    background-color: var(--dark-grey);
    color: var(--light-text);
    line-height: 1.6;
    scroll-behavior: smooth;
}

a {
    color: var(--accent-color);
    text-decoration: none;
    transition: color 0.3s;
}

a:hover {
    color: var(--light-text);
}

h1, h2, h3 {
    font-family: 'Lora', serif;
    margin-bottom: 1rem;
    color: var(--light-text);
}

section {
    padding: 5rem 10%;
    text-align: center;
}

/* ==================== Header & Navigasi ==================== */
header {
    display: flex;
    justify-content: space-between; /* Kiri: Logo, Kanan: Nav/Burger */
    align-items: center;
    padding: 1rem 10%;
    background-color: rgba(26, 26, 26, 0.95);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.logo {
    font-size: 1.8rem;
    font-weight: 700;
    color: var(--light-text);
}

nav a {
    margin-left: 25px;
    font-weight: 400;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--light-text);
    transition: all 0.3s ease;
    border-bottom: 2px solid transparent;
    padding-bottom: 5px;
}

nav a:hover {
    color: var(--accent-color) !important;
    border-bottom: 2px solid var(--accent-color);
}

/* Tombol CTA di Navigasi */
nav .cta-button {
    background-color: var(--accent-color);
    color: var(--dark-grey) !important;
    padding: 6px 15px;
    border-radius: 4px;
    font-weight: 700;
    transition: background-color 0.3s;
    border: none;
}
nav .cta-button:hover {
    background-color: #c99c68; 
    border-bottom: none;
}

/* ==================== Slideshow (Carousel) ==================== */
#slideshow-container {
    position: relative;
    max-width: 100%;
    margin: auto;
    overflow: hidden;
    height: 90vh; /* Sesuaikan tinggi slideshow */
}

.mySlides {
    display: none; /* Semua slide disembunyikan secara default */
    height: 100%;
    width: 100%;
    position: relative;
    background-size: cover;
    background-position: center;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    color: var(--light-text);
    text-align: center;
    transition: opacity 1s ease-in-out;
}

/* Overlay untuk setiap slide */
.mySlides::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.65); 
    z-index: 1;
}

.slide-content {
    z-index: 2;
    padding: 0 10%;
}

.slide-content h1 {
    font-size: 4.5rem;
    margin-bottom: 1.5rem;
    text-shadow: 2px 2px 5px rgba(0, 0, 0, 1);
}

/* Tombol Next & Previous */
.prev, .next {
    cursor: pointer;
    position: absolute;
    top: 50%;
    width: auto;
    padding: 16px;
    margin-top: -22px;
    color: white;
    font-weight: bold;
    font-size: 20px;
    transition: 0.6s ease;
    border-radius: 0 3px 3px 0;
    user-select: none;
    z-index: 10;
    background-color: rgba(0, 0, 0, 0.5);
}

.next {
    right: 0;
    border-radius: 3px 0 0 3px;
}

.prev:hover, .next:hover {
    background-color: rgba(0, 0, 0, 0.8);
}

/* Dots/Indicator */
.dot-container {
    text-align: center;
    padding: 20px;
    background-color: rgba(0, 0, 0, 0.3); /* Transparan */
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 5;
}
.dot {
    cursor: pointer;
    height: 15px;
    width: 15px;
    margin: 0 2px;
    background-color: var(--secondary-dark);
    border-radius: 50%;
    display: inline-block;
    transition: background-color 0.6s ease;
}

.active, .dot:hover {
    background-color: var(--accent-color);
}

/* Tombol CTA Global */
.cta-button {
    background-color: var(--accent-color);
    color: var(--dark-grey);
    padding: 14px 35px;
    border-radius: 5px;
    font-weight: 700;
    letter-spacing: 1px;
    text-transform: uppercase;
    transition: background-color 0.3s;
}

.cta-button:hover {
    background-color: #c99c68; 
    color: var(--dark-grey);
}

/* ==================== Menu Highlight Section (Responsive) ==================== */
#menu-highlight {
    background-color: var(--secondary-dark);
}

.menu-grid {
    display: grid;
    /* auto-fit akan mengisi ruang kosong, minmax memastikan item tidak lebih kecil dari 250px */
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); 
    gap: 30px;
    margin-top: 3rem;
    justify-content: center;
}

.menu-item {
    background-color: var(--dark-grey);
    padding: 20px;
    border-radius: 12px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.4);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    display: flex;
    flex-direction: column;
    height: 100%; /* Menyamakan tinggi kotak menu */
}

.menu-item:hover {
    transform: translateY(-10px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.6);
}

.menu-item img {
    width: 100%;
    height: 200px;
    object-fit: cover;
    border-radius: 8px;
    margin-bottom: 15px;
}

/* Responsivitas Tambahan untuk Layar Sangat Kecil (HP) */
@media (max-width: 480px) {
    .menu-grid {
        grid-template-columns: 1fr; /* Satu kolom penuh di HP kecil */
        gap: 20px;
    }
    
    section {
        padding: 3rem 5%; /* Perkecil padding samping di HP */
    }
}

/* ==================== About Section ==================== */
#about {
    background-color: var(--dark-grey);
    padding: 8rem 15%;
    display: flex;
    align-items: center;
    gap: 50px;
    text-align: left;
}

#about img {
    width: 45%;
    max-width: 500px;
    height: auto;
    border-radius: 8px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.6);
}

#about .text-content {
    width: 55%;
}

/* ==================== Lokasi Section ==================== */
#lokasi {
    background-color: var(--secondary-dark);
}

.lokasi-info {
    margin-top: 2rem;
    display: flex;
    justify-content: space-around;
    text-align: left;
    padding: 0 5%;
}

.lokasi-info div {
    width: 30%;
}

.lokasi-info h3 {
    color: var(--accent-color);
    margin-bottom: 0.5rem;
}

.map-container {
    margin-top: 3rem;
    height: 400px;
    background-color: #333;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.5);
}

.map-container iframe {
    width: 100%;
    height: 100%;
    border: 0;
    /* Filter untuk membuat tampilan peta menjadi gelap/monokrom */
    filter: grayscale(100%) brightness(50%) invert(90%) hue-rotate(180deg);
}

/* ==================== Footer ==================== */
footer {
    background-color: var(--dark-grey);
    padding: 2rem 10%;
    color: rgba(255, 255, 255, 0.5);
    font-size: 0.85rem;
    text-align: center;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

/* ==================== Responsif Dasar ==================== */
@media (max-width: 900px) {
    #about {
        flex-direction: column;
        padding: 5rem 5%;
        text-align: center;
    }
    #about img, #about .text-content {
        width: 100%;
        margin-bottom: 20px;
    }
    .lokasi-info {
        flex-direction: column;
        gap: 30px;
        text-align: center;
    }
    .lokasi-info div {
        width: 100%;
    }
}

@media (max-width: 600px) {
    .slide-content h1 {
        font-size: 2.5rem;
    }
    header {
        flex-direction: column;
        align-items: flex-start;
    }
    nav {
        margin-top: 10px;
    }
    nav a {
        margin-left: 0;
        margin-right: 15px;
    }
}

/* Efek transisi halus untuk slide */
.fade {
    animation-name: fade;
    animation-duration: 1.5s;
}

@keyframes fade {
    from {opacity: .4} 
    to {opacity: 1}
}

/* Memastikan gambar responsif di mobile */
@media (max-width: 600px) {
    #slideshow-container { height: 60vh; }
    .slide-content h1 { font-size: 2rem; }
}

/* ==================== Scroll to Top Button ==================== */
#scrollTopBtn {
    display: none; /* Tersembunyi secara default */
    position: fixed;
    bottom: 30px;
    right: 30px;
    z-index: 99;
    font-size: 20px;
    border: none;
    outline: none;
    background-color: var(--accent-color);
    color: var(--dark-grey);
    cursor: pointer;
    padding: 12px 18px;
    border-radius: 50%; /* Membuat tombol bulat */
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.3);
    transition: background-color 0.3s, transform 0.3s;
}

#scrollTopBtn:hover {
    background-color: #c99c68;
    transform: translateY(-5px); /* Efek melompat kecil saat hover */
}

.lokasi-info a i {
    transition: transform 0.3s ease, color 0.3s ease;
}

.lokasi-info a:hover i {
    transform: scale(1.2); /* Ikon akan sedikit membesar saat disentuh */
    color: var(--light-text);
}

/* ==================== Cart Sidebar ==================== */
.cart-sidebar {
    height: 100%;
    width: 0; /* Mulai dengan tertutup */
    position: fixed;
    z-index: 2000;
    top: 0;
    right: 0;
    background-color: var(--secondary-dark);
    overflow-x: hidden;
    transition: 0.4s;
    padding-top: 20px;
    box-shadow: -5px 0 15px rgba(0,0,0,0.5);
    display: flex;
    flex-direction: column;
}

.cart-header {
    padding: 20px;
    border-bottom: 1px solid rgba(255,255,255,0.1);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.cart-header h3 { margin: 0; color: var(--accent-color); }

.closebtn {
    font-size: 36px;
    color: var(--light-text);
    text-decoration: none;
}

.cart-body {
    flex-grow: 1;
    padding: 20px;
    overflow-y: auto;
}

.cart-item {
    background: var(--dark-grey);
    padding: 15px;
    border-radius: 8px;
    margin-bottom: 15px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.item-name { font-weight: bold; }
.item-price { font-size: 0.9rem; color: var(--text-faded); }

.remove-item {
    background: transparent;
    border: 1px solid #ff4d4d;
    color: #ff4d4d;
    padding: 5px 10px;
    border-radius: 4px;
    cursor: pointer;
}

.cart-footer {
    padding: 20px;
    background: var(--dark-grey);
    border-top: 1px solid rgba(255,255,255,0.1);
}

.total {
    display: flex;
    justify-content: space-between;
    font-size: 1.2rem;
    font-weight: bold;
    margin-bottom: 20px;
}

.checkout-button {
    width: 100%;
    background-color: var(--accent-color);
    color: var(--dark-grey);
    border: none;
    padding: 15px;
    font-weight: bold;
    text-transform: uppercase;
    cursor: pointer;
    border-radius: 5px;
}

/* Overlay */
.cart-overlay {
    display: none;
    position: fixed;
    top: 0; left: 0;
    width: 100%; height: 100%;
    background: rgba(0,0,0,0.7);
    z-index: 1999;
}

.view-all-container {
    padding-top: 60px; /* Memberikan ruang di atas tombol */
    padding-bottom: 20px;
    display: flex;
    justify-content: center; /* Memastikan tombol tetap di tengah */
}

/* Sembunyikan burger icon di desktop */
.menu-toggle {
    display: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: var(--light-text);
}

/* Responsivitas Layar Mobile */
@media (max-width: 900px) {
    header {
        padding: 1rem 5%;
        flex-direction: row; /* Memastikan tetap sejajar kiri-kanan */
        justify-content: space-between;
    }

    .menu-toggle {
        display: block; /* Munculkan burger */
        font-size: 1.8rem;
        color: var(--light-text);
        cursor: pointer;
    }

    .logo {
        order: 1; /* Memastikan logo tetap di kiri */
    }

    nav {
        display: none; 
        flex-direction: column;
        position: absolute;
        top: 88%;
        left: 0;
        width: 100%;
        background-color: #111111;
        
        /* Memberikan ruang di dalam kontainer menu */
        padding: 20px 0; 
        z-index: 1000;
    }

    nav.active {
        display: flex;
    }

    nav a {
        /* Memberikan padding vertikal agar area klik lebih luas */
        padding: 15px 20px; 
        margin: 5px 0;
        
        width: 100%; /* Agar area klik selebar layar */
        box-sizing: border-box;
        text-align: center;
        
        color: #ffffff !important;
        font-weight: 700;
        text-decoration: none;
        transition: background 0.3s ease;
    }

    /* Efek Hover/Aktif di Mobile */
    nav a:hover {
        background-color: #c99c68;
        /*background-color: rgba(160, 122, 80, 0.2);*/ /* Warna aksen transparan */
        color: var(--accent-color) !important;
    }

    /* Penyesuaian khusus untuk tombol Pesan Online di mobile */
    nav .cta-button {
        width: 80% !important; /* Agar tidak terlalu lebar sampai pinggir */
        margin: 15px auto !important;
        padding: 12px 0 !important;
        border-radius: 8px;
    }
}

.empty-cart {
    font-style: italic;
    opacity: 0.6;
}

.cart-item {
    border-bottom: 1px solid rgba(255,255,255,0.05);
    padding-bottom: 15px;
}

.remove-item:hover {
    background: #ff4d4d;
    color: white;
}

.cart-badge {
    background-color: #ff4d4d; /* Warna merah agar mencolok */
    color: white;
    font-size: 0.7rem;
    padding: 2px 6px;
    border-radius: 50%;
    margin-left: 5px;
    vertical-align: middle;
    /*display: none;*/ /* Sembunyikan jika 0 */
}

/* Munculkan jika ada isi */
.cart-badge.show {
    display: inline-block;
}

.swal2-container {
    z-index: 3000 !important; /* Harus lebih tinggi dari z-index Sidebar (2000) */
}

.floating-cart {
    position: fixed;
    bottom: 20px;
    left: 20px;
    width: 60px;
    height: 60px;
    background-color: var(--accent-color);
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    cursor: pointer;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.4);
    z-index: 9999;
    transition: transform 0.3s ease, background-color 0.3s;
}

.floating-cart:hover {
    transform: scale(1.1);
    background-color: #c99c68;
}

.cart-icon-wrapper {
    position: relative;
    color: var(--dark-grey);
    font-size: 1.5rem;
}

.cart-badge {
    position: absolute;
    top: -10px;
    right: -10px;
    background-color: #d9534f; /* Warna merah bahaya/notif */
    color: white;
    font-size: 0.75rem;
    font-weight: bold;
    padding: 4px 8px;
    border-radius: 50%;
    border: 2px solid var(--dark-grey);
    min-width: 20px;
    text-align: center;
}

/* Animasi goyang saat item bertambah */
@keyframes shake {
    0% { transform: rotate(0deg); }
    25% { transform: rotate(10deg); }
    50% { transform: rotate(-10deg); }
    75% { transform: rotate(10deg); }
    100% { transform: rotate(0deg); }
}
.cart-animate {
    animation: shake 0.5s ease-in-out;
}

/* ==================== Paginasi ==================== */
.pagination-container {
    width: 100%;
    margin-top: 50px;
}

.pagination-container .pagination {
    display: flex !important;
    width: 100%; /* Wajib penuh agar bisa ke kiri-kanan */
    list-style: none;
    padding: 0;
    justify-content: space-between; /* Kunci tombol kiri & kanan terpisah */
    align-items: center;
}

/* Membungkus angka halaman agar tetap di tengah */
.pagination .page-item:not(:first-child):not(:last-child) {
    display: inline-block;
}

/* Tombol Previous & Next agar menempel di ujung */
.pagination .page-item:first-child {
    margin-right: auto; /* Mendorong yang lain ke kanan */
}

.pagination .page-item:last-child {
    margin-left: auto; /* Mendorong yang lain ke kiri */
}

/* Styling Link */
.pagination .page-link {
    background-color: var(--secondary-dark);
    color: var(--light-text);
    border: 1px solid rgba(255, 255, 255, 0.1);
    padding: 10px 20px;
    border-radius: 5px;
    transition: 0.3s;
    text-transform: uppercase;
    font-size: 0.8rem;
    font-weight: bold;
    letter-spacing: 1px;
}

.pagination .page-item.active .page-link {
    background-color: var(--accent-color);
    color: var(--dark-grey);
    border-color: var(--accent-color);
}

/* Hover effect */
.pagination .page-link:hover:not(.active) {
    background-color: var(--accent-color);
    color: var(--dark-grey);
}

/* Responsivitas Mobile */
@media (max-width: 600px) {
    .pagination .page-link {
        padding: 8px 12px;
        font-size: 0.7rem;
    }
    
    /* Sembunyikan angka tengah di HP agar tidak sumpek, 
       sisakan Previous, Next, dan Halaman Aktif saja */
    .pagination .page-item:not(:first-child):not(:last-child):not(.active) {
        display: none;
    }
}

/* ==================== BREAKPOINT MOBILE (< 576px) ==================== */
@media (max-width: 576px) {
    .pagination-container {
        padding: 0 10px;
    }

    /* Sembunyikan semua angka halaman KECUALI yang sedang aktif */
    /* Ini rahasia biar gak "berhamburan" dan pasti muncul di layar sempit */
    .pagination .page-item:not(:first-child):not(:last-child):not(.active) {
        display: none !important;
    }

    .page-item .page-link {
        padding: 8px 12px;
        font-size: 0.8rem;
    }

    /* Ganti teks Previous/Next jadi icon biar hemat tempat jika perlu */
    /* Tapi kalau mau teks tetap muncul, pastikan paddingnya kecil */
}