/* --- GLOBAL STYLES --- */
* {
    box-sizing: border-box;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

body {
    margin: 0;
    padding: 0;
    background-color: #f4f6f8;
    color: #333;
}

/* --- HEADER & NAVIGATION --- */
header {
    background-color: #4CAF50;
    color: white;
    text-align: center;
    padding: 25px;
}

nav {
    background-color: #333;
    padding: 12px;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 20px;
    flex-wrap: wrap;
}

nav a, nav span {
    color: white;
    text-decoration: none;
    font-size: 14px;
}

nav a:hover {
    text-decoration: underline;
}

/* --- FORM CONTAINERS (LOGIN & REGISTER) --- */
.login-container, .register-container {
    max-width: 420px;
    margin: 50px auto;
    background: white;
    padding: 30px;
    border-radius: 10px;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.1);
}

.login-container h2, .register-container h2 {
    text-align: center;
    margin-bottom: 20px;
    color: #4CAF50;
}

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

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

.input-group input {
    width: 100%;
    padding: 10px;
    border-radius: 5px;
    border: 1px solid #ccc;
    font-size: 14px;
}

.input-group input:focus {
    outline: none;
    border-color: #4CAF50;
}

/* --- BUTTONS --- */
.btn-login, .btn-register {
    width: 100%;
    padding: 12px;
    border: none;
    background: #4CAF50;
    color: white;
    font-size: 15px;
    border-radius: 5px;
    cursor: pointer;
    transition: background 0.3s;
    margin-top: 10px;
}

.btn-login:hover, .btn-register:hover {
    background: #43a047;
}

/* --- LINKS & MESSAGES --- */
.login-link, .register-link {
    text-align: center;
    margin-top: 15px;
    font-size: 14px;
}

.login-link a, .register-link a {
    color: #4CAF50;
    font-weight: bold;
    text-decoration: none;
}

.message {
    margin-top: 15px;
    text-align: center;
    color: red;
    font-size: 14px;
}

/* --- MENU PRODUK --- */
.menu {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 20px;
    margin: 20px auto;
    max-width: 1000px;
    padding: 0 20px;
}

.product {
    background: white;
    border-radius: 12px;
    padding: 15px;
    text-align: center;
    box-shadow: 0 6px 15px rgba(0,0,0,0.08);
}

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

.product h3 {
    margin: 12px 0 8px;
    font-size: 16px;
}

.product p {
    font-size: 14px;
    color: #555;
    min-height: 60px;
}

.product button {
    margin-top: 10px;
    padding: 10px;
    width: 100%;
    background: #4CAF50;
    border: none;
    color: white;
    border-radius: 6px;
    cursor: pointer;
}

/* --- FOOTER --- */
footer {
    background-color: #333;
    color: white;
    padding: 40px 20px 20px 20px;
    margin-top: 60px;
}

.footer-container {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    max-width: 1000px;
    margin: 0 auto;
}

.footer-section {
    flex: 1;
    min-width: 250px;
    margin-bottom: 20px;
    padding: 0 15px;
}

.footer-section h2 {
    border-bottom: 2px solid #4CAF50;
    padding-bottom: 10px;
    font-size: 1.2rem;
}

.footer-section ul {
    list-style: none;
    padding: 0;
}

.footer-bottom {
    text-align: center;
    border-top: 1px solid #555;
    margin-top: 20px;
    padding-top: 20px;
    font-size: 0.9rem;
}

/* ================================================= */
/* === ENHANCED PRODUCT CARD (HOVER & CLICKABLE) === */
/* ================================================= */

.product {
    position: relative;
    overflow: hidden;
    transition: all 0.3s ease;
    cursor: pointer;
}

/* Hover: kartu naik & shadow lebih kuat */
.product:hover {
    transform: translateY(-8px);
    box-shadow: 0 15px 30px rgba(0,0,0,0.15);
}

/* IMAGE ZOOM */
.product img {
    transition: transform 0.4s ease;
}

.product:hover img {
    transform: scale(1.00);
}

/* BUTTON ANIMATION */
.product button {
    opacity: 0;
    transform: translateY(10px);
    transition: all 0.3s ease;
}

/* Button muncul saat hover */
.product:hover button {
    opacity: 1;
    transform: translateY(0);
}

/* Button hover lebih hidup */
.product button:hover {
    background: #43a047;
}

/* OPTIONAL: clickable feel */
.product::after {
    content: "";
    position: absolute;
    inset: 0;
}

.remove-btn:hover {
    background: darkred;
}

/* --- RESPONSIVE --- */
@media (max-width: 480px) {
    .login-container, .register-container {
        margin: 30px 15px;
    }
}

/* =========================
   CART PAGE
========================= */

.cart-container {
    max-width: 900px;
    margin: 40px auto;
    padding: 0 20px;
}

.cart-title {
    text-align: center;
    margin-bottom: 30px;
    color: #4CAF50;
}

/* KARTU ITEM */
.cart-item {
    position: relative;
    display: flex;
    gap: 20px;
    background: #fff;
    padding: 18px;
    border-radius: 14px;
    margin-bottom: 18px;
    box-shadow: 0 6px 16px rgba(0,0,0,0.08);
    transition: transform 0.2s, box-shadow 0.2s;
}

.cart-item:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 22px rgba(0,0,0,0.12);
}

/* GAMBAR */
.cart-item img {
    width: 110px;
    height: 110px;
    object-fit: cover;
    border-radius: 10px;
    background: #eee;
}

/* INFO */
.cart-info {
    flex: 1;
}

.cart-info h4 {
    margin: 0 0 8px;
    font-size: 16px;
}

.cart-price {
    color: #4CAF50;
    font-weight: bold;
    margin-bottom: 10px;
}

/* QTY */
.cart-qty {
    width: 70px;
    padding: 6px;
    border-radius: 6px;
    border: 1px solid #ccc;
}

/* TOMBOL HAPUS */
.cart-remove {
    position: absolute;
    top: 10px;
    right: 10px;
    background: #ff4d4d;
    color: white;
    border: none;
    border-radius: 50%;
    width: 28px;
    height: 28px;
    cursor: pointer;
    font-size: 16px;
    line-height: 26px;
    text-align: center;
}

.cart-remove:hover {
    background: #e53935;
}

/* TOTAL */
.cart-total {
    text-align: right;
    font-size: 18px;
    font-weight: bold;
    margin-top: 25px;
}

/* RESPONSIVE */
@media (max-width: 600px) {
    .cart-item {
        flex-direction: column;
        align-items: center;
        text-align: center;
    }

    .cart-item img {
        width: 100%;
        height: 180px;
    }

    .cart-remove {
        top: 8px;
        right: 8px;
    }
}

.cart-badge {
    background: red;
    color: white;
    font-size: 12px;
    padding: 2px 6px;
    border-radius: 50%;
    margin-left: 5px;
    font-weight: bold;
}

/* ===== ORDER HISTORY ===== */

.order-container {
    max-width: 900px;
    margin: 40px auto;
    padding: 0 20px;
}

.order-title {
    text-align: center;
    margin-bottom: 30px;
    color: #4CAF50;
}

.order-card {
    background: #fff;
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 20px;
    box-shadow: 0 6px 15px rgba(0,0,0,0.08);
}

.order-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
}

.order-id {
    font-weight: bold;
    font-size: 14px;
}

.order-status {
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: bold;
    text-transform: capitalize;
}

/* Status colors */
.status-pending {
    background: #fff3cd;
    color: #856404;
}

.status-diproses {
    background: #cce5ff;
    color: #004085;
}

.status-dikirim {
    background: #d4edda;
    color: #155724;
}

.status-selesai {
    background: #4CAF50;
    color: white;
}

.order-body {
    display: flex;
    justify-content: space-between;
    gap: 20px;
}

.order-body small {
    font-size: 12px;
    color: #777;
}

.order-body p {
    margin: 5px 0 0;
    font-weight: bold;
}

.order-empty {
    text-align: center;
    color: #777;
    margin-top: 40px;
}

/* ===== RESPONSIVE ===== */
@media (max-width: 480px) {
    .order-body {
        flex-direction: column;
        gap: 10px;
    }
}

/* ===== MODERN NAVBAR ===== */
.navbar {
    background: #333;
    border-bottom: 1px solid #eaeaea;
    position: sticky;
    top: 0;
    z-index: 1000;
}

.nav-container {
    max-width: 1200px;
    margin: auto;
    padding: 12px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.nav-logo {
    font-size: 20px;
    font-weight: bold;
    color: #4CAF50;
    text-decoration: none;
}

.nav-logo span {
    color: #ffffff;
}

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

.nav-menu a {
    color: #ffffff;
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
}

.nav-menu a:hover {
    color: #4CAF50;
}

.nav-cart {
    position: relative;
}

#cart-count {
    background: #ff5252;
    color: white;
    font-size: 12px;
    padding: 2px 7px;
    border-radius: 50%;
    position: absolute;
    top: -8px;
    right: -12px;
}

.nav-admin {
    color: #ff9800;
    font-weight: bold;
}

.nav-login {
    border: 1px solid #4CAF50;
    padding: 6px 14px;
    border-radius: 6px;
    color: #4CAF50;
}

.nav-register {
    background: #4CAF50;
    padding: 6px 14px;
    border-radius: 6px;
    color: white;
}

.nav-logout {
    color: #f44336;
}

/* ===== MOBILE ===== */
.nav-toggle {
    display: none;
    font-size: 24px;
    cursor: pointer;
    background-color: white;
}

@media (max-width: 768px) {
    .nav-menu {
        position: absolute;
        top: 60px;
        right: 0;
        background: #ffffff;
        flex-direction: column;
        width: 200px;
        padding: 15px;
        box-shadow: 0 10px 20px rgba(0,0,0,0.15);
        display: none;
    }

    .nav-menu.active {
        display: flex;
    }

    .nav-toggle {
        display: block;
    }
}

/* ===== USER AVATAR ===== */
.nav-user {
    position: relative;
}

.user-avatar {
    width: 36px;
    height: 36px;
    background: #4CAF50;
    color: white;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    font-weight: bold;
    cursor: pointer;
    user-select: none;
}

.user-dropdown {
    position: absolute;
    top: 48px;
    right: 0;
    background: white;
    min-width: 200px;
    border-radius: 10px;
    box-shadow: 0 10px 25px rgba(0,0,0,0.15);
    display: none;
    flex-direction: column;
    overflow: hidden;
    z-index: 100;
}

.user-dropdown.active {
    display: flex;
}

.user-name {
    padding: 12px;
    font-weight: bold;
    background: #f4f6f8;
    border-bottom: 1px solid #ddd;
}

.user-dropdown a {
    padding: 12px;
    color: #333;
    text-decoration: none;
    font-size: 14px;
}

.user-dropdown a:hover {
    background: #f0f0f0;
}

.user-dropdown .logout {
    color: #f44336;
    font-weight: bold;
}

/* ================= ADMIN DASHBOARD ================= */

.admin-container {
    max-width: 1100px;
    margin: 40px auto;
    padding: 0 20px;
}

.admin-title {
    text-align: center;
    margin-bottom: 30px;
    color: #4CAF50;
}

.admin-table-wrapper {
    overflow-x: auto;
}

.admin-table {
    width: 100%;
    border-collapse: collapse;
    background: white;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 8px 20px rgba(0,0,0,0.08);
}

.admin-table thead {
    background: #333;
    color: white;
}

.admin-table th,
.admin-table td {
    padding: 14px 12px;
    text-align: center;
    font-size: 14px;
}

.admin-table tbody tr {
    border-bottom: 1px solid #eee;
}

.admin-table tbody tr:hover {
    background: #f9f9f9;
}

.status-form {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 10px;
}

.status-select {
    padding: 8px 10px;
    border-radius: 6px;
    border: 1px solid #ccc;
    font-size: 13px;
}

.btn-update {
    padding: 8px 14px;
    background: #4CAF50;
    border: none;
    color: white;
    border-radius: 6px;
    cursor: pointer;
    font-size: 13px;
    transition: background 0.3s;
}

.btn-update:hover {
    background: #43a047;
}

.admin-empty {
    text-align: center;
    color: #777;
    margin-top: 40px;
}

/* ================= RESPONSIVE ================= */
@media (max-width: 600px) {
    .admin-table th,
    .admin-table td {
        font-size: 12px;
        padding: 10px 8px;
    }

    .status-form {
        flex-direction: column;
        gap: 6px;
    }
}

/* === ADMIN LAYOUT === */
.admin-body {
    background: #f4f6f8;
}

.admin-layout {
    display: flex;
    min-height: 100vh;
}

.admin-sidebar {
    width: 230px;
    background: #333;
    color: white;
    padding: 25px;
}

.admin-logo {
    margin-bottom: 30px;
    color: #4CAF50;
}

.admin-sidebar a {
    display: block;
    color: white;
    padding: 10px 0;
    text-decoration: none;
    font-size: 14px;
}

.admin-sidebar a:hover {
    color: #4CAF50;
}

.admin-sidebar .logout {
    margin-top: 40px;
    color: #ff6b6b;
}

/* MAIN */
.admin-main {
    flex: 1;
    padding: 30px;
}

.admin-footer {
    text-align: center;
    margin-top: 40px;
    color: #777;
    font-size: 13px;
}

/* === ACCORDION === */
.accordion-item {
    background: white;
    margin-bottom: 15px;
    border-radius: 8px;
    overflow: hidden;
}

.accordion-header {
    display: flex;
    justify-content: space-between;
    padding: 15px;
    cursor: pointer;
    background: #f1f1f1;
    font-weight: bold;
}

.accordion-body {
    display: none;
    padding: 15px;
}

.order-item {
    display: flex;
    gap: 15px;
    margin-bottom: 10px;
}

.order-item img {
    width: 60px;
    height: 60px;
    object-fit: cover;
    border-radius: 6px;
}

.accordion-body select,
.accordion-body button {
    padding: 8px;
    margin-top: 10px;
}

.status {
    padding: 4px 10px;
    border-radius: 12px;
    font-size: 12px;
    color: white;
}

.status.pending { background: orange; }
.status.diproses { background: #2196F3; }
.status.dikirim { background: #673ab7; }
.status.selesai { background: #4CAF50; }

.btn-detail {
    display: inline-block;
    margin-top: 10px;
    color: #4CAF50;
    text-decoration: none;
}

.order-item {
    display: flex;
    gap: 12px;
    margin-bottom: 12px;
    align-items: center;
}

.order-item img {
    width: 60px;
    height: 60px;
    object-fit: cover;
    border-radius: 8px;
}

/* ===STSTISTIK=== */
.stats-container {
    margin-bottom: 40px;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 20px;
}

.stats-card {
    background: white;
    border-radius: 12px;
    padding: 20px;
    box-shadow: 0 6px 15px rgba(0,0,0,0.08);
}

.stats-card h4 {
    margin-bottom: 10px;
    color: #4CAF50;
}
