/* Minimalist, Ultra-Lightweight CSS */
:root {
    --bg-color: #ffffff;
    --text-main: #111111;
    --text-muted: #666666;
    --border-color: #e5e5e5;
    --primary: #000000;
    --radius: 4px;
    --font-sans: "Times New Roman", Times, Baskerville, Georgia, serif;
}

html {
    scroll-behavior: smooth;
    scroll-padding-top: 80px;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    background-color: var(--bg-color);
    color: var(--text-main);
    font-family: var(--font-sans);
    line-height: 1.6;
    font-size: 16px;
}

a {
    color: var(--primary);
    text-decoration: none;
}

a:hover {
    text-decoration: underline;
}

.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 2rem;
}

/* Typography */
h1, h2, h3 {
    margin-bottom: 1rem;
    font-weight: 600;
    line-height: 1.2;
}

p {
    margin-bottom: 1rem;
    color: var(--text-muted);
}

/* Buttons */
.btn {
    display: inline-block;
    padding: 0.5rem 1rem;
    border: 1px solid var(--primary);
    background: transparent;
    color: var(--primary);
    border-radius: var(--radius);
    cursor: pointer;
    text-align: center;
    font-size: 0.9rem;
    transition: background 0.2s, color 0.2s;
}
.btn:hover {
    background: var(--primary);
    color: #fff;
    text-decoration: none;
}

/* Header */
.main-header {
    position: sticky;
    top: 0;
    z-index: 1000;
    background-color: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    border-bottom: 1px solid var(--border-color);
    padding: 0.6rem 0;
    margin-bottom: 2rem;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.03);
}
.header-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.logo {
    display: flex;
    align-items: center;
}
.logo-img {
    height: 50px;
    width: auto;
    display: block;
}
.nav-links {
    list-style: none;
    display: flex;
    gap: 1.5rem;
}
.header-actions {
    display: flex;
    align-items: center;
    gap: 1rem;
}
.search-container {
    display: flex;
    align-items: center;
    border: 1px solid var(--border-color);
    border-radius: var(--radius);
    padding: 0.25rem 0.5rem;
    background-color: #fafafa;
    transition: border-color 0.2s, box-shadow 0.2s;
}
.search-container:focus-within {
    border-color: var(--primary);
    box-shadow: 0 0 0 2px rgba(0, 0, 0, 0.05);
    background-color: #ffffff;
}
.search-input {
    border: none;
    background: transparent;
    font-family: inherit;
    font-size: 0.85rem;
    color: var(--text-main);
    outline: none;
    width: 120px;
    transition: width 0.25s ease;
}
.search-input:focus {
    width: 170px;
}
.search-btn {
    border: none;
    background: transparent;
    cursor: pointer;
    color: var(--text-muted);
    padding: 2px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: color 0.2s;
}
.search-btn:hover {
    color: var(--primary);
}

/* Hero */
.hero {
    padding: 3rem 0;
    text-align: center;
    border-bottom: 1px solid var(--border-color);
    margin-bottom: 3rem;
}
.hero-title {
    font-size: 2.5rem;
}
.hero-subtitle {
    font-size: 1.1rem;
    max-width: 600px;
    margin: 0 auto 1.5rem;
}

/* Section */
.section {
    margin-bottom: 4rem;
}
.section-title {
    font-size: 1.5rem;
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 0.5rem;
    margin-bottom: 1.5rem;
}

/* Grid Cards */
.grid-cards {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(165px, 1fr));
    gap: 0.75rem;
}
.card {
    background: #ffffff;
    border: 1px solid var(--border-color);
    border-radius: 6px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    transition: transform 0.2s cubic-bezier(0.4, 0, 0.2, 1), box-shadow 0.2s cubic-bezier(0.4, 0, 0.2, 1), border-color 0.2s ease;
}
.card:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.08);
    border-color: #bbbbbb;
}

/* Card Image/Icon Area */
.card-image-wrapper {
    background: #f8f9fa;
    height: 105px;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    border-bottom: 1px solid var(--border-color);
    transition: background-color 0.2s ease;
}
.card:hover .card-image-wrapper {
    background-color: #f1f3f5;
}
.card-icon-emoji {
    font-size: 2.2rem;
    transition: transform 0.2s ease;
}
.card:hover .card-icon-emoji {
    transform: scale(1.08);
}

/* Badges */
.badge {
    position: absolute;
    top: 8px;
    left: 8px;
    padding: 2px 6px;
    border-radius: 4px;
    font-size: 0.7rem;
    font-weight: 600;
    color: #ffffff;
    letter-spacing: 0.2px;
}
.badge-promo { background: #ff4d4f; }
.badge-popular { background: #fa8c16; }
.badge-instant { background: #52c41a; }
.badge-secure { background: #1890ff; }

/* Card Body */
.card-body {
    padding: 1rem;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}
.product-category {
    font-size: 0.72rem;
    text-transform: uppercase;
    color: var(--text-muted);
    font-weight: 700;
    margin-bottom: 4px;
    letter-spacing: 0.5px;
}
.card-title {
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--text-main);
    margin-bottom: 6px;
    line-height: 1.3;
}
.card-desc {
    font-size: 0.8rem;
    color: var(--text-muted);
    margin-bottom: 12px;
    line-height: 1.4;
    flex-grow: 1;
}

/* Rating */
.product-rating {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 0.72rem;
    margin-bottom: 12px;
}
.stars {
    color: #fadb14;
}
.sold-count {
    color: var(--text-muted);
    border-left: 1px solid var(--border-color);
    padding-left: 6px;
}

/* Product Footer & Price */
.product-footer {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    margin-top: auto;
    border-top: 1px dashed var(--border-color);
    padding-top: 10px;
}
.price-container {
    display: flex;
    flex-direction: column;
}
.price-label {
    font-size: 0.68rem;
    color: var(--text-muted);
}
.price-value {
    font-size: 1rem;
    font-weight: 700;
    color: #e03131;
}
.btn-buy {
    font-size: 0.75rem;
    padding: 0.35rem 0.75rem;
    border-radius: var(--radius);
    background: var(--primary);
    color: #ffffff !important;
    border: none;
    font-weight: 600;
    cursor: pointer;
    text-decoration: none !important;
    transition: background-color 0.2s;
}
.btn-buy:hover {
    background: #333333;
}

/* Footer */
.main-footer {
    border-top: 1px solid var(--border-color);
    padding: 2rem 0;
    margin-top: 4rem;
    font-size: 0.9rem;
    color: var(--text-muted);
    text-align: center;
}

/* Responsive */
@media (max-width: 600px) {
    .header-container {
        flex-direction: column;
        gap: 1rem;
    }
    .nav-links {
        flex-wrap: wrap;
        justify-content: center;
    }
}

/* Category Filter Bar */
.category-filter-container {
    display: flex;
    gap: 0.75rem;
    overflow-x: auto;
    padding: 0.5rem 0 1.25rem 0;
    margin-bottom: 1.5rem;
    scrollbar-width: none; /* Hide scrollbar for Firefox */
}
.category-filter-container::-webkit-scrollbar {
    display: none; /* Hide scrollbar for Chrome/Safari */
}
.filter-btn {
    background: #f8f9fa;
    border: 1px solid var(--border-color);
    color: var(--text-main);
    padding: 0.5rem 1rem;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 500;
    cursor: pointer;
    white-space: nowrap;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    gap: 6px;
}
.filter-btn:hover {
    background: #f1f3f5;
    border-color: #adb5bd;
}
.filter-btn.active {
    background: var(--primary);
    color: #ffffff;
    border-color: var(--primary);
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
}

/* Modal Overlay & Container */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2000;
    opacity: 0;
    pointer-events: none;
}
.modal-overlay.active {
    opacity: 1;
    pointer-events: auto;
}
.modal-container {
    background: #ffffff;
    border-radius: 12px;
    width: 90%;
    max-width: 480px;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.15);
    display: flex;
    flex-direction: column;
}

.modal-header {
    padding: 1.25rem 1.5rem;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.modal-header h3 {
    font-size: 1.15rem;
    font-weight: 700;
    color: var(--text-main);
}
.modal-close-btn {
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: var(--text-muted);
    transition: color 0.15s;
}
.modal-close-btn:hover {
    color: var(--primary);
}
.modal-body {
    padding: 1.5rem;
    overflow-y: auto;
}
.modal-product-desc {
    font-size: 0.85rem;
    color: var(--text-muted);
    margin-bottom: 1.25rem;
    background: #f8f9fa;
    padding: 0.75rem;
    border-radius: 6px;
    border-left: 3px solid var(--primary);
}
.form-group {
    margin-bottom: 1.25rem;
}
.form-group label {
    display: block;
    font-size: 0.8rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
    color: var(--text-main);
}
.form-select, .form-input {
    width: 100%;
    padding: 0.65rem 0.75rem;
    border: 1px solid var(--border-color);
    border-radius: 6px;
    font-family: inherit;
    font-size: 0.9rem;
    outline: none;
    transition: border-color 0.2s, box-shadow 0.2s;
}
.form-select:focus, .form-input:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 2px rgba(0, 0, 0, 0.05);
}
.form-help {
    display: block;
    font-size: 0.75rem;
    color: var(--text-muted);
    margin-top: 4px;
}
.price-summary {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: #fff5f5;
    padding: 1rem;
    border-radius: 8px;
    margin-bottom: 1.25rem;
    border: 1px solid #ffc9c9;
}
.price-summary span:first-child {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-muted);
}
.price-summary .price-value {
    font-size: 1.25rem;
    font-weight: 800;
    color: #e03131;
}
.modal-footer {
    padding: 1rem 1.5rem;
    border-top: 1px solid var(--border-color);
    display: flex;
    justify-content: flex-end;
    gap: 0.75rem;
    background: #fafafa;
    border-bottom-left-radius: 12px;
    border-bottom-right-radius: 12px;
}
.modal-footer .btn {
    padding: 0.6rem 1.2rem;
    font-size: 0.85rem;
    border-radius: 6px;
}
.btn-secondary {
    background: #f1f3f5;
    color: var(--text-main);
    border: 1px solid var(--border-color);
}
.btn-secondary:hover {
    background: #e9ecef;
    color: var(--text-main);
}
.btn-primary {
    background: var(--primary);
    color: #ffffff;
    border: none;
}
.btn-primary:hover {
    background: #333333;
}

/* QRIS Payment Section */
.qris-payment-area {
    margin-top: 1.5rem;
    padding-top: 1rem;
}
.payment-title {
    font-size: 0.9rem;
    font-weight: 700;
    text-align: center;
    margin: 1rem 0;
}
.qris-code-wrapper {
    display: flex;
    justify-content: center;
    margin-bottom: 1.25rem;
}
.qris-code-wrapper img {
    width: 200px;
    height: 200px;
    border: 1px solid var(--border-color);
    padding: 8px;
    border-radius: 8px;
    background: white;
}
.payment-instructions {
    font-size: 0.75rem;
    color: var(--text-muted);
    line-height: 1.5;
    margin-bottom: 1.25rem;
}
.qris-status-box {
    background: #e8f9ee;
    color: #2b8a3e;
    border: 1px solid #c3fae8;
    padding: 0.75rem;
    border-radius: 6px;
    text-align: center;
    font-size: 0.8rem;
    font-weight: 700;
    margin-bottom: 1rem;
}
.qris-status-box.pending {
    background: #fff9db;
    color: #f08c00;
    border-color: #ffe066;
}
.btn-check-status {
    width: 100%;
    padding: 0.65rem;
    font-size: 0.85rem;
    background: #000;
    color: #fff;
    border: none;
    border-radius: 6px;
    font-weight: 600;
    cursor: pointer;
}
