@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&display=swap');

:root {
    --primary: #ee4d2d; /* Orange Marketplace */
    --primary-light: #ff7337;
    --primary-dim: #fff1eb; /* Sangat muda untuk background area aktif */
    --bg-color: #f5f5f5; /* Abu-abu khas background web belanja */
    --text-main: #212121;
    --text-muted: #757575;
    --border-color: #e0e0e0;
    --card-bg: #ffffff;
    --success: #00bfa5; /* Hijau modern */
    --shadow-sm: 0 1px 2px 0 rgba(0,0,0,.05);
    --shadow-md: 0 4px 12px 0 rgba(0,0,0,.05);
    --shadow-lg: 0 8px 24px rgba(0,0,0,.08);
}

html, body {
    background-color: var(--bg-color);
    font-family: 'Inter', sans-serif;
    color: var(--text-main);
    overflow-x: hidden;
}

/* Navbar */
.navbar {
    background-color: #ffffff !important;
    border-bottom: 1px solid var(--border-color);
    padding: 15px 0;
}
.navbar-brand {
    font-weight: 700;
    color: var(--primary) !important;
    font-size: 1.5rem;
    letter-spacing: -0.5px;
}
.btn-cart-nav {
    color: var(--primary);
    background: transparent;
    border: none;
    font-size: 1.2rem;
    position: relative;
    padding: 5px 10px;
}
.btn-cart-nav:hover {
    background: var(--primary-dim);
    border-radius: 8px;
}

/* Hero Section (Clean Banner) */
.hero-section {
    background: #ffffff;
    padding: 60px 0;
    border-bottom: 1px solid var(--border-color);
    text-align: center;
    margin-bottom: 30px;
}
.hero-title {
    font-weight: 700;
    font-size: 2.5rem;
    color: var(--text-main);
    margin-bottom: 15px;
}
.hero-subtitle {
    color: var(--text-muted);
    font-size: 1.1rem;
    max-width: 600px;
    margin: 0 auto;
}

/* Marketplace Product Grid */
.product-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 15px;
}
@media (max-width: 768px) {
    .product-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 10px;
    }
}

/* Product Card */
.card-product {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    overflow: hidden;
    transition: all 0.2s ease;
    cursor: pointer;
    text-decoration: none !important;
    color: inherit;
    display: flex;
    flex-direction: column;
}
.card-product:hover {
    border-color: var(--primary);
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}
.card-img-wrapper {
    position: relative;
    width: 100%;
    padding-top: 100%; /* Square aspect ratio 1:1 */
    overflow: hidden;
    background-color: #f0f0f0;
}
.card-img-wrapper img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.card-body-custom {
    padding: 12px;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}
.product-title {
    font-size: 0.9rem;
    line-height: 1.4;
    height: 2.8em;
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    margin-bottom: 8px;
}
.product-price {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--primary);
    margin-bottom: auto;
}
.product-meta {
    font-size: 0.75rem;
    color: var(--text-muted);
    display: flex;
    justify-content: space-between;
    margin-top: 10px;
}

/* Modal Popup */
.modal-content-clean {
    border-radius: 12px;
    border: none;
    box-shadow: var(--shadow-lg);
}
.modal-header-clean {
    border-bottom: 1px solid var(--border-color);
    padding: 15px 20px;
}
.modal-body-clean {
    padding: 20px;
}

/* Input Kuantitas */
.qty-input-group {
    display: flex;
    align-items: center;
    border: 1px solid var(--border-color);
    border-radius: 4px;
    overflow: hidden;
    width: fit-content;
}
.qty-btn {
    background: #f5f5f5;
    border: none;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-main);
    cursor: pointer;
}
.qty-btn:hover { background: #e0e0e0; }
.qty-input {
    width: 50px;
    height: 32px;
    border: none;
    border-left: 1px solid var(--border-color);
    border-right: 1px solid var(--border-color);
    text-align: center;
    font-size: 0.9rem;
    outline: none;
    -moz-appearance: textfield;
}
.qty-input::-webkit-outer-spin-button,
.qty-input::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

/* Buttons */
.btn-primary-custom {
    background-color: var(--primary);
    color: white;
    border: none;
    border-radius: 4px;
    padding: 10px 15px;
    font-weight: 500;
    transition: 0.2s;
}
.btn-primary-custom:hover {
    background-color: #d84315;
    color: white;
}
.btn-outline-primary-custom {
    color: var(--primary);
    border: 1px solid var(--primary);
    background-color: var(--primary-dim);
    border-radius: 4px;
    padding: 10px 15px;
    font-weight: 500;
    transition: 0.2s;
}
.btn-outline-primary-custom:hover {
    background-color: var(--primary);
    color: white;
}
.btn-wa {
    background-color: #25D366;
    color: white;
    border-radius: 4px;
    border: none;
    padding: 8px 15px;
    font-weight: 500;
    font-size: 0.85rem;
}
.btn-wa:hover {
    background-color: #128C7E;
    color: white;
}
.btn-gofood {
    background-color: #ee2737;
    color: white;
    border-radius: 4px;
    border: none;
    padding: 8px 15px;
    font-weight: 500;
    font-size: 0.85rem;
}
.btn-gofood:hover {
    background-color: #c91f2c;
    color: white;
}

/* Admin Sidebar Layout */
.admin-wrapper {
    display: flex;
    min-height: 100vh;
}
.admin-sidebar {
    width: 250px;
    background: #ffffff;
    border-right: 1px solid var(--border-color);
    padding: 20px 0;
    position: fixed;
    height: 100vh;
    z-index: 100;
}
.admin-sidebar .nav-link {
    color: var(--text-main);
    font-weight: 500;
    padding: 12px 25px;
    border-left: 3px solid transparent;
    transition: 0.2s;
}
.admin-sidebar .nav-link:hover {
    background: #f9f9f9;
}
.admin-sidebar .nav-link.active {
    color: var(--primary);
    background: var(--primary-dim);
    border-left-color: var(--primary);
}
.admin-content {
    flex: 1;
    margin-left: 250px;
    padding: 30px;
    background-color: var(--bg-color);
}

/* Tables & Cards */
.card-clean {
    background: var(--card-bg);
    border-radius: 8px;
    border: 1px solid var(--border-color);
    box-shadow: var(--shadow-sm);
    margin-bottom: 20px;
}
.table-clean th {
    background-color: #f9f9f9;
    color: var(--text-muted);
    font-weight: 600;
    font-size: 0.85rem;
    text-transform: uppercase;
    border-bottom: 1px solid var(--border-color);
}
.table-clean td {
    vertical-align: middle;
    border-bottom: 1px solid var(--border-color);
}

/* Utilities */
.text-primary-custom { color: var(--primary) !important; }
.bg-white { background-color: #ffffff !important; }

/* Animation Base */
.fade-in {
    animation: fadeIn 0.5s ease forwards;
}
@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}