/* =========================================
   STYLE.CSS - MODERN WARKOP UI (RESPONSIVE BACKGROUND FIX)
   ========================================= */

:root {
    --primary: #d35400;
    --primary-dark: #a04000;
    --secondary: #fab936;
    --bg-color: #f4f6f9;
    --white: #ffffff;
    --success: #27ae60;
    --danger: #c0392b;
    --warning: #f39c12;
    --text-color: #333;
    --shadow: 0 4px 6px rgba(0,0,0,0.05);
    --radius: 8px;
}

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }

/* --- SETTING BACKGROUND LOGO --- */
body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
    background-color: var(--bg-color);
    color: var(--text-color);
    margin: 0;
    padding-bottom: 100px;
    font-size: 16px;
    min-height: 100vh;
    position: relative;
}

/* Elemen Semu untuk Logo Watermark */
body::before {
    content: "";
    position: fixed;
    top: 0; left: 0; width: 100%; height: 100%;
    z-index: -1; /* Di belakang konten */

    /* Pastikan file 'logo.jpg' ada di folder yang sama */
    background-image: url('logo.jpg'); 
    
    background-repeat: no-repeat;
    background-position: center center;
    
    /* UKURAN DEFAULT (DESKTOP/LAPTOP) */
    /* Kita set 35% agar tidak terlalu raksasa di layar komputer */
    background-size: 100%; 
    
    /* TRANSPARANSI (PENTING) */
    /* Saya ubah ke 0.15 agar tulisan menu tetap terbaca jelas */
    opacity: 0.8    ; 
    
    pointer-events: none;
    
    /* Opsional: Efek hitam putih biar lebih elegan */
    /* filter: grayscale(100%); */
}

h1, h2, h3 { margin-top: 0; color: var(--secondary); }

/* --- LAYOUT UTAMA --- */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 15px;
}

.header {
    background-color: var(--secondary);
    color: var(--white);
    padding: 15px 20px;
    margin-bottom: 20px;
    box-shadow: var(--shadow);
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: sticky;
    top: 0;
    z-index: 100;
    flex-wrap: wrap;
    gap: 10px;
}

.header h1 { color: white; margin: 0; font-size: 1.3rem; }
.header div { display: flex; gap: 10px; }
.header a { 
    color: white; text-decoration: none; font-weight: bold; 
    background: rgba(255,255,255,0.1); padding: 8px 12px; 
    border-radius: 4px; font-size: 0.85rem; white-space: nowrap; 
}

/* --- GRID SYSTEM --- */
.grid-container {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); 
    gap: 15px;
}

/* --- KARTU --- */
.card {
    background: var(--white);
    border-radius: var(--radius);
    padding: 15px;
    box-shadow: var(--shadow);
    display: flex; flex-direction: column; justify-content: space-between;
    border: 1px solid #eee; height: 100%;
    transition: transform 0.2s, box-shadow 0.2s;
    position: relative; z-index: 1; /* Agar background kartu menutupi logo */
    opacity: 0.95;
}
.card:hover { transform: translateY(-3px); box-shadow: 0 8px 15px rgba(0,0,0,0.1); }

.price { font-size: 1.1rem; color: var(--primary); font-weight: bold; margin: 10px 0; }
.stock-badge { font-size: 0.75rem; background: #eee; padding: 3px 8px; border-radius: 4px; color: #666; }

/* --- TOMBOL --- */
button, .btn {
    border: none; padding: 12px 15px; border-radius: 6px;
    cursor: pointer; font-weight: 600; font-size: 0.95rem;
    transition: background 0.2s; width: 100%;
    display: inline-flex; justify-content: center; align-items: center;
}
.btn-primary { background: var(--primary); color: white; }
.btn-success { background: var(--success); color: white; }
.btn-danger { background: var(--danger); color: white; }
.btn-warning { background: var(--warning); color: white; }
button:disabled { background: #ccc; cursor: not-allowed; opacity: 0.7; }

/* --- INPUT --- */
input, select {
    width: 100%; padding: 12px; margin: 5px 0 15px;
    border: 1px solid #ddd; border-radius: 6px; font-size: 1rem; background: #fff;
}

/* --- TABEL --- */
.table-responsive { overflow-x: auto; -webkit-overflow-scrolling: touch; background: white; border-radius: var(--radius); box-shadow: var(--shadow); }
table { width: 100%; border-collapse: collapse; min-width: 600px; }
th { background: var(--secondary); color: white; padding: 12px; text-align: left; font-size: 0.9rem; }
td { padding: 12px; border-bottom: 1px solid #eee; font-size: 0.9rem; }

/* --- STATS --- */
.stat-card { background: white; padding: 15px; border-radius: var(--radius); box-shadow: var(--shadow); border-left: 5px solid var(--secondary); }
.stat-title { font-size: 0.8rem; text-transform: uppercase; color: #888; margin-bottom: 5px; }
.stat-value { font-size: 1.8rem; font-weight: bold; color: var(--secondary); }

/* --- FLOATING CART --- */
.floating-cart {
    position: fixed; bottom: 15px; left: 15px; right: 15px;
    max-width: 800px; margin: 0 auto;
    background: var(--secondary); color: white; padding: 15px 20px; border-radius: 12px;
    display: flex; justify-content: space-between; align-items: center;
    box-shadow: 0 10px 20px rgba(0,0,0,0.3); z-index: 999;
}

/* --- TIKET --- */
.ticket { background: #fff; border-top: 5px solid var(--primary); padding: 15px; border-radius: var(--radius); box-shadow: var(--shadow); animation: fadeIn 0.4s ease-out; }
@keyframes fadeIn { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: translateY(0); } }
.ticket-header { display: flex; justify-content: space-between; border-bottom: 2px dashed #ddd; padding-bottom: 10px; margin-bottom: 10px; flex-wrap: wrap; gap: 5px; }
.ticket-items li { display: flex; justify-content: space-between; padding: 5px 0; border-bottom: 1px solid #f0f0f0; }
.table-badge { background: var(--warning); color: #fff; padding: 4px 8px; border-radius: 5px; font-weight: bold; font-size: 0.9rem; }

/* --- MODAL --- */
.modal { display: none; position: fixed; top: 0; left: 0; width: 100%; height: 100%; background: rgba(0,0,0,0.6); z-index: 1000; align-items: center; justify-content: center; padding: 20px; }
.modal-content { background: white; padding: 25px; border-radius: var(--radius); width: 100%; max-width: 400px; box-shadow: 0 10px 30px rgba(0,0,0,0.3); }

/* --- UTILITY --- */
.form-responsive { display: flex; gap: 10px; flex-wrap: wrap; }
.input-group { flex: 1; min-width: 120px; }
.badge-pay { padding: 5px 10px; border-radius: 4px; font-size: 0.85rem; font-weight: bold; display: inline-block; }
.badge-unpaid { background-color: #ffebee; color: #c62828; border: 1px solid #ffcdd2; }
.badge-paid { background-color: #e8f5e9; color: #2e7d32; border: 1px solid #c8e6c9; }
.actions { display: flex; gap: 10px; margin-top: 15px; }
.topping-option { display: flex; justify-content: space-between; align-items: center; padding: 10px; border: 1px solid #eee; margin-bottom: 5px; border-radius: 5px; cursor: pointer; }
.filter-box { background: white; padding: 15px 20px; border-radius: var(--radius); box-shadow: var(--shadow); margin-bottom: 20px; display: flex; gap: 15px; align-items: center; flex-wrap: wrap; border-left: 5px solid var(--primary); }
.btn-filter { background: var(--primary); color: white; padding: 8px 15px; border-radius: 5px; border: none; cursor: pointer; font-weight: bold; }
.btn-reset { background: #95a5a6; color: white; padding: 8px 15px; border-radius: 5px; text-decoration: none; font-weight: bold; display: inline-block; }

/* --- ACCORDION --- */
.cat-accordion { background: white; border-radius: var(--radius); box-shadow: var(--shadow); margin-bottom: 15px; border: 1px solid #eee; }
.cat-header { padding: 15px 20px; cursor: pointer; display: flex; justify-content: space-between; align-items: center; font-weight: bold; color: var(--secondary); background-color: #fff; }
.cat-header.active { background-color: var(--primary); color: white; }
.cat-body { display: none; padding: 20px; background-color: #fafafa; border-top: 1px solid #eee; }
.cat-body.show { display: grid; }

/* =========================================
   MEDIA QUERIES (AGAR RESPONSIVE DI HP)
   ========================================= */

/* Tablet & HP Besar */
@media (max-width: 768px) {
    .header { padding: 10px 15px; }
    .header a { font-size: 0.75rem; padding: 6px 10px; }
    .grid-container { grid-template-columns: repeat(2, 1fr); }
    .floating-cart { bottom: 10px; padding: 12px 15px; flex-direction: row; }
    
    /* UPDATE BACKGROUND: Agak membesar di Tablet */
    body::before {
        background-size: 100%;
    }
}

/* HP Kecil / Portrait (Max 480px) */
@media (max-width: 480px) {
    .header { justify-content: center; text-align: center; gap: 10px; }
    .header h1 { width: 100%; margin-bottom: 0; }
    .header div { justify-content: center; width: 100%; }
    .grid-container { grid-template-columns: 1fr; }
    .form-responsive { flex-direction: column; }
    .input-group { width: 100%; }

    /* UPDATE BACKGROUND: Membesar di HP agar terlihat jelas */
    /* Karena layar HP sempit, kita butuh width lebih besar (85%) */
    body::before {
        background-size: 160%;
        opacity: 0.8; /* Pastikan tetap transparan */
        height: 100%; /* Agar tidak terpotong di layar kecil */
        width: 100%;
        padding-bottom: 0%;
    }
}