/* Warna Utama */
:root {
    --primary-color: #FF5722; /* Merah/Orange Aksi */
    --text-color: #333;
    --light-bg: #f5f5f5;
    --card-bg: white;
}

/* Reset dan Font */
body {
    font-family: 'Poppins', sans-serif;
    background-color: var(--light-bg);
    margin: 0;
    padding: 0;
    padding-bottom: 80px; /* Ruang untuk footer */
    color: var(--text-color);
}

/* Header */
.top-header {
    background-color: var(--card-bg);
    padding: 15px 20px;
    border-bottom: 1px solid #ddd;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
}
.outlet-info {
    font-size: 1.1em;
    font-weight: 700;
}
.outlet-info small {
    display: block;
    font-size: 0.75em;
    font-weight: 400;
    color: #888;
}
.table-number {
    font-size: 0.9em;
    margin-top: 5px;
    padding: 5px 0;
    color: var(--primary-color);
    font-weight: 500;
}

/* Navigasi Kategori (Horizontal Scroll) */
.category-scroll-nav {
    overflow-x: auto;
    white-space: nowrap;
    padding: 10px 20px;
    background-color: var(--card-bg);
    border-bottom: 1px solid #eee;
    position: sticky;
    top: 0;
    z-index: 10;
}
.tab-button {
    background: none;
    border: none;
    padding: 8px 15px;
    margin-right: 5px;
    font-size: 0.9em;
    font-weight: 500;
    color: #888;
    cursor: pointer;
    border-bottom: 2px solid transparent;
    transition: all 0.2s;
}
.tab-button.active {
    color: var(--primary-color);
    border-bottom: 2px solid var(--primary-color);
    font-weight: 700;
}

/* Container Menu (Grid) */
.menu-grid-container {
    padding: 15px 15px 0 15px; /* Sedikit padding di sisi */
}

.menu-category-section h2 {
    font-size: 1.2em;
    margin-top: 25px;
    margin-bottom: 15px;
    font-weight: 700;
    padding-left: 5px;
}

.menu-category-section {
    display: grid;
    grid-template-columns: repeat(2, 1fr); /* 2 kolom */
    gap: 15px;
}

/* Kartu Item Menu */
.menu-item-card {
    background-color: var(--card-bg);
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
    padding: 10px;
    text-align: left;
}
.image-placeholder {
    width: 100%;
    height: 100px;
    background-color: #f0f0f0; /* Warna abu-abu untuk simulasi gambar */
    border-radius: 6px;
    margin-bottom: 10px;
}
.item-name {
    font-size: 0.95em;
    font-weight: 500;
    height: 2.4em; /* Tinggi tetap untuk 2 baris nama */
    overflow: hidden;
    margin: 0 0 5px 0;
}
.price {
    font-weight: 700;
    color: var(--primary-color);
    margin-bottom: 10px;
    font-size: 1.1em;
}
.add-button {
    background-color: var(--primary-color);
    color: white;
    border: none;
    width: 100%;
    padding: 8px 0;
    border-radius: 4px;
    cursor: pointer;
    font-weight: 500;
    transition: background-color 0.2s;
}
.add-button:hover {
    background-color: #c04018;
}

/* Utility Class */
.hidden {
    display: none;
}

/* Footer Keranjang (Fixed Bottom) */
.cart-summary-footer {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    background-color: var(--card-bg);
    box-shadow: 0 -2px 5px rgba(0, 0, 0, 0.1);
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 20px;
    box-sizing: border-box;
    z-index: 20;
}
.total-info {
    font-size: 0.9em;
    font-weight: 500;
}
.checkout-button {
    background-color: var(--primary-color);
    color: white;
    border: none;
    padding: 10px 15px;
    border-radius: 4px;
    font-size: 1em;
    font-weight: 700;
    cursor: pointer;
}
/* ===================================== */
/* MEDIA QUERIES (RESPONSIVE DESIGN) */
/* ===================================== */

/* Aturan untuk Layar Tablet dan Laptop (Lebar lebih dari 768px) */
@media (min-width: 768px) {
    
    /* 1. Kontainer Utama */
    .menu-grid-container {
        /* Batasi lebar konten di tengah layar agar tidak terlalu lebar di desktop */
        max-width: 1200px; 
        margin: 0 auto; /* Tengah-kan konten */
        padding: 20px;
    }

    /* 2. Tata Letak Grid Menu */
    .menu-category-section {
        /* Ubah tata letak dari 2 kolom menjadi 3 kolom */
        grid-template-columns: repeat(3, 1fr); 
        gap: 20px;
    }
    
    /* 3. Header */
    .top-header {
        padding: 20px 40px;
    }

    /* 4. Navigasi Kategori */
    .category-scroll-nav {
        /* Nonaktifkan scroll horizontal di desktop dan buat tombol kategori lebih besar */
        white-space: normal;
        display: flex;
        flex-wrap: wrap; /* Izinkan tombol kategori turun baris */
        justify-content: center;
        padding: 15px 40px;
        position: static; /* Hapus efek sticky, atau atur dengan hati-hati */
    }
    
    .tab-button {
        padding: 10px 20px;
        font-size: 1em;
        margin: 5px; /* Tambahkan sedikit margin antar tombol */
    }

    /* 5. Footer (Keranjang) */
    .cart-summary-footer {
        /* Di desktop, keranjang mungkin lebih baik diletakkan di samping, tapi untuk simulasi, kita bisa melebarkan checkout button */
        justify-content: center;
        gap: 30px;
    }
    
    .checkout-button {
        padding: 15px 40px;
        font-size: 1.1em;
    }
}


/* Aturan untuk Layar Desktop Besar (Lebar lebih dari 1024px) */
@media (min-width: 1024px) {
    .menu-category-section {
        /* Ubah tata letak menjadi 4 kolom untuk layar besar */
        grid-template-columns: repeat(4, 1fr); 
    }
}
/* =================== GENERAL & ADMIN CSS =================== */
body {
    font-family: 'Poppins', Arial, sans-serif;
    margin: 40px;
    background-color: #f5f5f5;
    color: #333;
}
h1 {
    color: #FF5722;
}
p {
    margin-bottom: 20px;
}
hr {
    border: 0;
    border-top: 1px solid #ddd;
    margin: 20px 0;
}
#add-menu-form input {
    padding: 10px;
    margin-right: 10px;
    border: 1px solid #ccc;
    border-radius: 4px;
    width: 200px;
}
#add-menu-form button {
    background-color: #4CAF50;
    color: white;
    padding: 10px 15px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
}
#menu-list-admin {
    list-style: none;
    padding: 0;
}
#menu-list-admin li {
    background-color: white;
    padding: 10px;
    margin-bottom: 8px;
    border-radius: 4px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: 0 1px 3px rgba(0,0,0,0.05);
}
.delete-btn {
    background-color: #D32F2F !important; /* Merah untuk Hapus */
    color: white;
    padding: 5px 10px;
    border: none;
    border-radius: 3px;
    cursor: pointer;
}
#loading-message, #loading-message-pembeli {
    color: #FF5722;
    font-style: italic;
    display: none;
}

/* =================== PEMBELI (CARD VIEW) CSS =================== */
.menu-grid-container {
    display: grid;
    /* Default: 2 kolom untuk mobile/layar kecil */
    grid-template-columns: repeat(2, 1fr); 
    gap: 15px;
    max-width: 1200px; 
    margin: 0 auto; 
    padding: 15px 0;
}
.menu-item-card {
    background-color: white;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
    padding: 10px;
    text-align: left;
}
.image-placeholder {
    width: 100%;
    height: 100px;
    background-color: #ddd; 
    border-radius: 6px;
    margin-bottom: 10px;
}
.item-name {
    font-size: 0.95em;
    font-weight: 500;
    margin: 0 0 5px 0;
}
.price {
    font-weight: 700;
    color: #FF5722;
    margin-bottom: 10px;
    font-size: 1.1em;
}
.add-button {
    background-color: #FF5722;
    color: white;
    border: none;
    width: 100%;
    padding: 8px 0;
    border-radius: 4px;
    cursor: pointer;
    font-weight: 500;
}
.add-button:hover {
    background-color: #c04018;
}

/* --- MEDIA QUERY FOR LAPTOP/DESKTOP --- */
@media (min-width: 768px) {
    body {
        margin: 20px 80px;
    }
    .menu-grid-container {
        /* Ubah menjadi 3 kolom untuk desktop/laptop */
        grid-template-columns: repeat(3, 1fr); 
        gap: 20px;
    }
}
@media (min-width: 1024px) {
    .menu-grid-container {
        /* Ubah menjadi 4 kolom untuk desktop besar */
        grid-template-columns: repeat(4, 1fr); 
    }
}