/* Reset & Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
}

body {
    background-color: #f4f7f5;
    color: #2d3748;
    line-height: 1.6;
    padding-bottom: 40px;
}

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

/* Header (Solid Hijau) */
header {
    background-color: #1e4620; /* Deep Green Solid */
    color: #fff;
    padding: 25px 0;
    box-shadow: 0 4px 6px rgba(0,0,0,0.05);
    margin-bottom: 30px;
}

.header-container {
    display: flex;
    align-items: center;
    gap: 15px;
}

.logo {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid #fff;
}

.header-text h1 {
    font-size: 1.6rem;
    font-weight: 700;
}

.header-text p {
    font-size: 0.9rem;
    color: #a3e635; /* Akses warna hijau lime cerah */
}

/* Toast Isyarat/Instruksi */
.toast {
    position: fixed;
    top: 20px;
    left: 50%;
    transform: translateX(-50%);
    background-color: #2e7d32;
    color: #fff;
    padding: 12px 24px;
    border-radius: 30px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.2);
    z-index: 1000;
    font-size: 0.9rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 10px;
    transition: opacity 0.3s, transform 0.3s;
    text-align: center;
    width: 90%;
    max-width: 500px;
}

.toast.hidden {
    opacity: 0;
    transform: translate(-50%, -20px);
    pointer-events: none;
}

/* Layout Split */
.main-layout {
    display: flex;
    flex-direction: column;
    gap: 30px;
}

@media (min-width: 768px) {
    .main-layout {
        flex-direction: row;
        align-items: flex-start;
    }
    .menu-section {
        flex: 2;
    }
    .cart-sidebar {
        flex: 1;
        position: sticky;
        top: 20px;
    }
}

/* Menu Categories */
.menu-category h2 {
    border-bottom: 3px solid #2e7d32;
    padding-bottom: 5px;
    margin-bottom: 15px;
    color: #1e4620;
    font-size: 1.3rem;
}

/* Noodle Cards */
.menu-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
    gap: 20px;
    margin-bottom: 25px;
}

.card {
    background: #fff;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0,0,0,0.04);
    border: 1px solid #e2e8f0;
    display: flex;
    flex-direction: column;
}

.menu-img {
    width: 100%;
    height: 140px;
    object-fit: cover;
}

.menu-info {
    padding: 15px;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
    justify-content: space-between;
}

.menu-info h3 {
    font-size: 1.05rem;
    color: #1a202c;
}

.price {
    font-weight: bold;
    color: #2e7d32;
    font-size: 0.9rem;
    margin-bottom: 10px;
}

.level-select {
    margin-bottom: 12px;
    font-size: 0.85rem;
}

.input-lvl {
    width: 100%;
    padding: 6px;
    border-radius: 6px;
    border: 1px solid #cbd5e1;
    margin-top: 4px;
    outline-color: #2e7d32;
}

/* List Items */
.menu-list {
    background: #fff;
    border-radius: 10px;
    padding: 5px 15px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.04);
    border: 1px solid #e2e8f0;
    margin-bottom: 25px;
}

/* --- PERBAIKAN STRUKTUR LIST ITEM (DIMSUM & BEVERAGE) --- */
.list-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 0;
    border-bottom: 1px solid #edf2f7;
    font-size: 0.95rem;
    gap: 15px; /* Memberikan jarak aman antar kolom */
}

/* Kolom 1: Nama Menu */
.list-item span:first-child {
    font-weight: 500;
    flex: 1; /* Mengambil sisa ruang agar mendorong harga & tombol ke kanan secara konstan */
    min-width: 0;
}

/* Kolom 2: Harga Menu */
.list-item span:nth-child(2) {
    color: #2e7d32;
    font-weight: bold;
    text-align: right;
    width: 90px; /* Mengunci lebar kolom harga agar lurus vertikal dari atas ke bawah */
    flex-shrink: 0; /* Mencegah teks harga menyusut */
}

/* Kolom 3: Tombol Keranjang */
.btn-small {
    padding: 6px 12px;
    font-size: 0.8rem;
    flex-shrink: 0; /* Mencegah ukuran tombol berubah akibat teks panjang */
}


/* Buttons Nuansa Hijau */
.btn-order, .btn-small {
    background-color: #2e7d32;
    color: white;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-weight: bold;
    transition: background 0.2s;
}

.btn-order {
    padding: 10px;
    width: 100%;
    font-size: 0.9rem;
}

.btn-small {
    padding: 6px 12px;
    font-size: 0.8rem;
}

.btn-order:hover, .btn-small:hover {
    background-color: #1e4620;
}

/* Keranjang Belanja Box */
.cart-box {
    background: #fff;
    border-radius: 12px;
    padding: 20px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.06);
    border: 2px solid #2e7d32;
}

.cart-box h3 {
    color: #1e4620;
    margin-bottom: 15px;
    font-size: 1.2rem;
    border-bottom: 2px solid #f0f4f1;
    padding-bottom: 10px;
}

/* Input Form Nama */
.customer-info-input {
    margin-bottom: 15px;
}

.customer-info-input label {
    display: block;
    font-size: 0.85rem;
    font-weight: 600;
    margin-bottom: 5px;
    color: #4a5568;
}

.customer-info-input input {
    width: 100%;
    padding: 10px;
    border: 1px solid #cbd5e1;
    border-radius: 6px;
    font-size: 0.9rem;
    outline-color: #2e7d32;
}

.empty-cart-text {
    color: #a0aec0;
    font-size: 0.9rem;
    text-align: center;
    padding: 20px 0;
}

/* Row Item di Keranjang */
.cart-item-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 0;
    border-bottom: 1px dashed #e2e8f0;
    font-size: 0.9rem;
}

.cart-item-name {
    font-weight: 600;
    color: #2d3748;
}

.cart-item-price {
    font-size: 0.8rem;
    color: #718096;
}

.cart-item-actions {
    display: flex;
    align-items: center;
    gap: 8px;
}

.btn-qty {
    background: #edf2f7;
    border: none;
    width: 26px;
    height: 26px;
    border-radius: 4px;
    cursor: pointer;
    font-weight: bold;
    color: #2d3748;
}

.btn-qty:hover {
    background: #cbd5e1;
}

.cart-divider {
    border: none;
    border-top: 1px solid #edf2f7;
    margin: 15px 0;
}

.cart-summary {
    display: flex;
    justify-content: space-between;
    font-size: 0.9rem;
    margin-bottom: 6px;
}

.font-bold {
    font-weight: bold;
    font-size: 1.1rem;
    color: #2e7d32;
}

/* Button Checkout WA */
.btn-checkout {
    background-color: #25d366;
    color: white;
    border: none;
    padding: 12px;
    border-radius: 6px;
    cursor: pointer;
    font-weight: bold;
    width: 100%;
    font-size: 1rem;
    margin-top: 15px;
    transition: background 0.2s;
    box-shadow: 0 4px 6px rgba(37, 211, 102, 0.2);
}

.btn-checkout:hover:not(:disabled) {
    background-color: #128c7e;
}

.btn-checkout:disabled {
    background-color: #cbd5e1;
    color: #94a3b8;
    cursor: not-allowed;
    box-shadow: none;
}

footer {
    text-align: center;
    padding: 25px;
    font-size: 0.85rem;
    color: #718096;
    background: #edf2f7;
    margin-top: 50px;
}

/* --- OPTIMALISASI RESPONSIVITAS SEMUA DEVICE --- */

/* 1. Layar HP (Mobile) secara umum */
@media (max-width: 767px) {
    .container {
        width: 95%; /* Memperlebar area konten di HP agar tidak terlalu banyak membuang space di kiri-kanan */
    }
    
    .header-container {
        flex-direction: row;
        gap: 12px;
    }
    
    .logo {
        width: 50px;
        height: 50px; /* Sedikit memperkecil logo di HP agar header tidak terlalu tebal */
    }

    .header-text h1 {
        font-size: 1.3rem; /* Menyesuaikan ukuran font judul di layar kecil */
    }
}

/* 2. Khusus HP dengan layar sangat kecil / sempit (Lebar 360px kebawah) */
@media (max-width: 360px) {
    .list-item {
        font-size: 0.85rem; /* Mengecilkan teks agar nama menu panjang tidak memakan tempat */
        gap: 8px;
    }
    
    .list-item span:nth-child(2) {
        width: 75px; /* Menyesuaikan lebar kolom harga agar tidak memotong tombol */
    }
    
    .btn-small {
        padding: 5px 8px;
        font-size: 0.75rem; /* Menyesuaikan ukuran tombol "+ Keranjang" agar pas */
    }
    
    .menu-grid {
        grid-template-columns: 1fr; /* Memastikan kartu mie menjadi 1 kolom penuh ke bawah */
    }
}

/* 3. Layar Tablet (Medium Devices) */
@media (min-width: 768px) and (max-width: 1024px) {
    .menu-grid {
        grid-template-columns: repeat(2, 1fr); /* Di tablet, menu kartu mie otomatis membelah jadi 2 kolom sejajar */
    }
}
