/* --- GLOBAL VARIABLES --- */
:root {
    --primary: #6F4E37;
    /* Warna Kopi */
    --secondary: #f4f4f4;
    /* Background Abu Terang */
    --accent: #e74c3c;
    /* Merah */
    --green: #27ae60;
    /* Hijau */
    --text: #333;
}

* {
    box-sizing: border-box;
    font-family: 'Poppins', sans-serif;
    margin: 0;
    padding: 0;
}

body {
    background-color: var(--secondary);
    color: var(--text);
}

a {
    text-decoration: none;
    cursor: pointer;
    color: inherit;
}

/* --- NAVBAR --- */
.navbar {
    background: white;
    padding: 15px 30px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.nav-brand {
    font-size: 24px;
    font-weight: 800;
    color: var(--primary);
    letter-spacing: 1px;
}

.nav-links a {
    margin: 0 15px;
    font-weight: 500;
    color: #555;
    transition: 0.3s;
}

.nav-links a:hover,
.nav-links a.active {
    color: var(--primary);
}

.nav-icons {
    display: flex;
    gap: 20px;
    align-items: center;
}

.cart-badge {
    position: absolute;
    top: -8px;
    right: -8px;
    background: var(--accent);
    color: white;
    border-radius: 50%;
    padding: 2px 6px;
    font-size: 10px;
}

/* --- PERBAIKAN FORM LOGIN & REGISTER (YANG HANCUR DI SCREENSHOT) --- */
.auth-container {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 90vh;
    padding: 20px;
}

.form-box {
    background: white;
    padding: 40px;
    border-radius: 10px;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.1);
    width: 100%;
    max-width: 400px;
}

.form-box h2 {
    text-align: center;
    color: var(--primary);
    margin-bottom: 20px;
}

.input-group {
    margin-bottom: 15px;
}

.input-group label {
    display: block;
    margin-bottom: 5px;
    font-weight: 600;
    font-size: 14px;
}

.input-group input,
.input-group select,
.input-group textarea {
    width: 100%;
    padding: 12px;
    border: 1px solid #ddd;
    border-radius: 5px;
    outline: none;
    font-size: 14px;
}

.input-group textarea {
    resize: none;
    height: 80px;
}

/* Wrapper untuk Icon Mata & Lokasi */
.pass-wrapper,
.loc-wrapper {
    position: relative;
}

.pass-wrapper i {
    position: absolute;
    right: 15px;
    top: 15px;
    cursor: pointer;
    color: #888;
}

.loc-wrapper button {
    position: absolute;
    bottom: 10px;
    right: 10px;
    background: var(--primary);
    color: white;
    border: none;
    padding: 5px 10px;
    border-radius: 5px;
    cursor: pointer;
    font-size: 12px;
}

/* --- HERO & SECTIONS (HOME) --- */
.hero {
    background: linear-gradient(rgba(0, 0, 0, 0.6), rgba(0, 0, 0, 0.6)), url('https://www.nescafe.com/id/sites/default/files/2023-08/Keunggulan%20Kopi%20Premium%20yang%20Perlu%20Kamu%20Ketahui_desk.jpg');
    background-size: cover;
    background-position: center;
    color: white;
    text-align: center;
    padding: 200px 20px;
    border-radius: 0 0 20px 20px;
    margin-bottom: 30px;
}

.hero h1 {
    font-size: 3em;
    margin-bottom: 10px;
}

.section-title {
    font-size: 20px;
    font-weight: bold;
    margin: 30px 20px 15px;
    padding-left: 15px;
    border-left: 5px solid var(--primary);
}

.scroll-container {
    display: flex;
    overflow-x: auto;
    gap: 15px;
    padding: 10px 20px;
    scrollbar-width: thin;
    padding-bottom: 20px;
}

/* --- PRODUCT CARD --- */
.product-card {
    background: white;
    border-radius: 10px;
    min-width: 200px;
    width: 200px;
    overflow: hidden;
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.1);
    position: relative;
    transition: 0.3s;
}

.product-card:hover {
    transform: translateY(-5px);
}

.product-img {
    width: 100%;
    height: 160px;
    object-fit: cover;
}

.badge-promo {
    position: absolute;
    top: 10px;
    left: 10px;
    background: var(--accent);
    color: white;
    padding: 4px 10px;
    font-size: 11px;
    border-radius: 20px;
    font-weight: bold;
}

.product-info {
    padding: 15px;
}

.btn-add {
    width: 100%;
    background: var(--primary);
    color: white;
    border: none;
    padding: 10px;
    margin-top: 10px;
    border-radius: 5px;
    cursor: pointer;
    font-weight: 600;
}

.btn-add:hover {
    background: #5a3e2b;
}

/* --- ADMIN LAYOUT --- */
.admin-container {
    display: flex;
    min-height: 100vh;
}

.sidebar {
    width: 250px;
    background: var(--primary);
    color: white;
    padding: 20px;
    display: flex;
    flex-direction: column;
    position: fixed;
    height: 100%;
    top: 0;
    left: 0;
}

.sidebar h2 {
    text-align: center;
    margin-bottom: 30px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.2);
    padding-bottom: 20px;
}

.sidebar-menu {
    padding: 15px;
    cursor: pointer;
    border-radius: 8px;
    margin-bottom: 8px;
    transition: 0.2s;
    display: flex;
    align-items: center;
    gap: 10px;
}

.sidebar-menu:hover,
.sidebar-menu.active {
    background: rgba(255, 255, 255, 0.2);
}

.admin-content {
    flex: 1;
    padding: 30px;
    margin-left: 250px;
}

.table-custom {
    width: 100%;
    border-collapse: collapse;
    background: white;
    margin-top: 20px;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.05);
}

.table-custom th,
.table-custom td {
    padding: 15px;
    border-bottom: 1px solid #eee;
    text-align: left;
}

.table-custom th {
    background: #eee;
    color: #555;
    font-weight: 600;
}

/* --- CHAT WIDGET --- */
.chat-btn {
    position: fixed;
    bottom: 20px;
    right: 20px;
    background: var(--green);
    color: white;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 24px;
    cursor: pointer;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
    z-index: 999;
    transition: 0.3s;
}

.chat-box {
    display: none;
    position: fixed;
    bottom: 90px;
    right: 20px;
    width: 320px;
    height: 450px;
    background: white;
    border-radius: 12px;
    box-shadow: 0 5px 25px rgba(0, 0, 0, 0.2);
    z-index: 999;
    flex-direction: column;
    overflow: hidden;
}

.chat-header {
    background: var(--primary);
    color: white;
    padding: 15px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.chat-messages {
    flex: 1;
    padding: 15px;
    overflow-y: auto;
    background: #f9f9f9;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.chat-input-area {
    padding: 10px;
    border-top: 1px solid #ddd;
    display: flex;
    gap: 10px;
    background: white;
}

.msg {
    padding: 8px 12px;
    border-radius: 10px;
    max-width: 80%;
    font-size: 13px;
    word-wrap: break-word;
}

.msg.me {
    background: var(--primary);
    color: white;
    align-self: flex-end;
    border-bottom-right-radius: 0;
}

.msg.admin {
    background: #e0e0e0;
    color: black;
    align-self: flex-start;
    border-bottom-left-radius: 0;
}

/* --- BUTTONS & UTILS --- */
.btn-primary {
    background: var(--primary);
    color: white;
    padding: 10px 20px;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-weight: bold;
    width: 100%;
}

.btn-primary:hover {
    background: #5a3e2b;
}

.section {
    display: none;
}

.section.active {
    display: block;
    animation: fadeIn 0.4s;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ... CSS Global yang lain biarkan sama ... */

/* --- CART & QTY BUTTONS --- */
.cart-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid #eee;
    padding: 10px 0;
}

.qty-control {
    display: flex;
    align-items: center;
    gap: 10px;
    background: #f9f9f9;
    padding: 5px;
    border-radius: 5px;
}

.btn-qty {
    width: 25px;
    height: 25px;
    background: #ddd;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-weight: bold;
    color: #333;
    display: flex;
    justify-content: center;
    align-items: center;
}

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

/* --- PAYMENT QR --- */
.qr-container {
    text-align: center;
    display: none;
    margin-top: 15px;
    padding: 20px;
    background: #f8f9fa;
    border-radius: 10px;
    border: 1px dashed #aaa;
}

.qr-img {
    width: 150px;
    height: 150px;
    object-fit: contain;
    mix-blend-mode: multiply;
}