* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    transition: background-color 0.25s ease, color 0.2s ease, border-color 0.2s ease;
}

body {
    font-family: 'Inter', sans-serif;
    background-color: var(--bg-body);
    color: var(--text-primary);
    line-height: 1.5;
}

:root {
    --bg-body: #f8fafc;
    --bg-surface: #ffffff;
    --bg-card: #ffffff;
    --bg-elevated: #f1f5f9;
    --text-primary: #0f172a;
    --text-secondary: #334155;
    --text-muted: #475569;
    --border-light: #e2e8f0;
    --border-card: #eef2ff;
    --accent: #3b82f6;
    --accent-hover: #2563eb;
    --badge-bg: #eef2ff;
    --badge-text: #1e40af;
    --manual-bg: #fff7ed;
    --manual-text: #c2410c;
    --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
    --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.05), 0 2px 4px -1px rgb(0 0 0 / 0.03);
    --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.08), 0 4px 6px -2px rgb(0 0 0 / 0.05);
}

body.dark {
    --bg-body: #0b1120;
    --bg-surface: #111827;
    --bg-card: #1e293b;
    --bg-elevated: #1f2a3e;
    --text-primary: #f1f5f9;
    --text-secondary: #cbd5e1;
    --text-muted: #94a3b8;
    --border-light: #1f2a3e;
    --border-card: #2d3a4e;
    --accent: #60a5fa;
    --accent-hover: #3b82f6;
    --badge-bg: #1e2a47;
    --badge-text: #93c5fd;
    --manual-bg: #2c2418;
    --manual-text: #fdba74;
    --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.3);
    --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.3);
    --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.4);
}

.container {
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 24px;
}

.header {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 20px 0;
    border-bottom: 1px solid var(--border-light);
}

.brand-section {
    display: flex;
    align-items: center;
    gap: 20px;
    flex-wrap: wrap;
}

.logo {
    display: flex;
    align-items: center;
    gap: 12px;
}

.logo h1 {
    margin: 0;
    font-size: 1.8rem;
    font-weight: 700;
    background: linear-gradient(135deg, var(--accent), #8b5cf6);
    background-clip: text;
    -webkit-background-clip: text;
    color: transparent;
    letter-spacing: -0.3px;
}

.theme-toggles {
    display: flex;
    align-items: center;
    gap: 8px;
    background: var(--bg-elevated);
    padding: 4px 10px;
    border-radius: 60px;
    border: 1px solid var(--border-light);
}

.theme-btn {
    background: transparent;
    border: none;
    font-size: 0.9rem;
    font-weight: 500;
    padding: 6px 12px;
    border-radius: 40px;
    cursor: pointer;
    color: var(--text-secondary);
    transition: all 0.2s;
}

.theme-btn.active {
    background: var(--accent);
    color: white;
    box-shadow: var(--shadow-sm);
}

.theme-btn:not(.active):hover {
    background: var(--bg-surface);
    color: var(--text-primary);
}

.action-buttons {
    display: flex;
    gap: 12px;
}

.btn-none {
    background: transparent;
    border: 0px solid var(--border-light);
    padding: 8px 18px;
    border-radius: 40px;
    font-weight: 500;
    font-size: 0.9rem;
    color: var(--text-primary);
    cursor: pointer;
    transition: 0.2s;
    display: flex;
    align-items: center;
    gap: 8px;
}

.btn-outline {
    background: transparent;
    border: 1px solid var(--border-light);
    padding: 8px 18px;
    border-radius: 40px;
    font-weight: 500;
    font-size: 0.9rem;
    color: var(--text-primary);
    cursor: pointer;
    transition: 0.2s;
    display: flex;
    align-items: center;
    gap: 8px;
}

.btn-outline i {
    font-size: 1rem;
    color: var(--accent);
}

.btn-outline:hover {
    background: var(--bg-elevated);
    border-color: var(--accent);
    transform: translateY(-1px);
}

.btn-primary {
    background: var(--accent);
    border: none;
    padding: 8px 18px;
    border-radius: 40px;
    font-weight: 600;
    font-size: 0.9rem;
    color: white;
    cursor: pointer;
    transition: 0.2s;
    display: flex;
    align-items: center;
    gap: 8px;
}

.btn-primary:hover {
    background: var(--accent-hover);
    transform: translateY(-1px);
}

.hero {
    text-align: center;
    margin: 48px 0 32px;
}

.hero-tagline {
    font-size: 1.2rem;
    font-weight: 500;
    background: var(--bg-elevated);
    display: inline-block;
    padding: 10px 24px;
    border-radius: 60px;
    color: var(--text-secondary);
    backdrop-filter: blur(4px);
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border-light);
}

.categories {
    display: flex;
    justify-content: center;
    gap: 16px;
    margin: 40px 0 32px;
    flex-wrap: wrap;
}

.cat-item {
    background: var(--bg-surface);
    border: 1px solid var(--border-light);
    padding: 10px 28px;
    border-radius: 40px;
    font-weight: 600;
    font-size: 1rem;
    cursor: pointer;
    box-shadow: var(--shadow-sm);
    color: var(--text-primary);
    transition: all 0.2s;
}

.cat-item.active {
    background: var(--accent);
    color: white;
    border-color: var(--accent);
}

.cat-item:hover:not(.active) {
    background: var(--bg-elevated);
    transform: translateY(-2px);
}

.section-title {
    font-size: 1.6rem;
    font-weight: 600;
    margin: 24px 0 16px;
    letter-spacing: -0.3px;
}

.products-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 28px;
    margin: 20px 0 48px;
}

.product-card {
    background: var(--bg-card);
    border-radius: 28px;
    padding: 20px;
    box-shadow: var(--shadow-md);
    border: 1px solid var(--border-card);
    transition: transform 0.2s, box-shadow 0.2s;
}

.product-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
}

.custom-logo {
    width: 42px;
    height: 42px;
    object-fit: contain;
    display: inline-flex;
}

.product-icon {
    display: flex;
    align-items: center;
    justify-content: left;
    min-height: 52px;
    font-size: 2.2rem;
    margin-bottom: 16px;
    color: var(--accent);
}

.product-title {
    font-size: 1.35rem;
    font-weight: 700;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
    margin-bottom: 12px;
}

.product-title span:first-child {
    color: var(--text-primary);
    font-weight: 700;
}

.stock-badge {
    background: var(--badge-bg);
    color: var(--badge-text);
    font-size: 0.7rem;
    font-weight: 600;
    padding: 4px 10px;
    border-radius: 30px;
    align-self: flex-start;
}

.manual-badge {
    background: var(--manual-bg);
    color: var(--manual-text);
    font-size: 0.7rem;
    font-weight: 600;
    padding: 4px 10px;
    border-radius: 30px;
    align-self: flex-start;
}

.product-desc {
    font-size: 0.85rem;
    color: var(--text-muted);
    margin: 8px 0 12px;
    display: flex;
    align-items: center;
    gap: 6px;
}

.price {
    font-weight: 700;
    font-size: 1.3rem;
    margin: 12px 0;
    color: var(--accent);
}

.buy-btn {
    width: 100%;
    background: var(--bg-elevated);
    border: 1px solid var(--border-light);
    padding: 10px 0;
    border-radius: 40px;
    font-weight: 600;
    cursor: pointer;
    transition: 0.2s;
    color: var(--text-primary);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.buy-btn i {
    font-size: 0.9rem;
}

.buy-btn:hover {
    background: var(--accent);
    border-color: var(--accent);
    color: white;
}

.btn-manual {
    background: var(--manual-bg);
    border-color: var(--manual-text);
    color: var(--manual-text);
}

.btn-manual:hover {
    background: var(--manual-text);
    color: #1e1b10;
    border-color: var(--manual-text);
}

.features {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    gap: 24px;
    margin: 56px 0 48px;
}

.feature-item {
    flex: 1;
    min-width: 180px;
    background: var(--bg-surface);
    padding: 24px 16px;
    border-radius: 28px;
    text-align: center;
    border: 1px solid var(--border-light);
    box-shadow: var(--shadow-sm);
}

.feature-icon {
    font-size: 2.2rem;
    margin-bottom: 16px;
    color: var(--accent);
}

.feature-title {
    font-weight: 700;
    font-size: 1.2rem;
    margin-bottom: 8px;
}

.feature-desc {
    font-size: 0.85rem;
    color: var(--text-muted);
}

.footer {
    border-top: 1px solid var(--border-light);
    padding: 40px 0 32px;
    margin-top: 20px;
    text-align: center;
}

.footer-logo {
    font-size: 1.7rem;
    font-weight: 700;
    background: linear-gradient(135deg, var(--accent), #8b5cf6);
    background-clip: text;
    -webkit-background-clip: text;
    color: transparent;
    margin-bottom: 16px;
}

.footer-desc {
    max-width: 600px;
    margin: 12px auto;
    color: var(--text-muted);
    font-size: 0.9rem;
}

.copyright {
    margin-top: 28px;
    font-size: 0.8rem;
    color: var(--text-muted);
}

@media (max-width: 768px) {
    .container {
        padding: 0 20px;
    }
    .header {
        flex-direction: column;
        align-items: stretch;
    }
    .brand-section {
        justify-content: space-between;
    }
    .action-buttons {
        justify-content: center;
    }
    .hero-tagline {
        font-size: 1rem;
        padding: 8px 18px;
    }
    .products-grid {
        gap: 20px;
    }
}

@media (max-width: 480px) {
    .product-title {
        font-size: 1.2rem;
    }
    .features {
        flex-direction: column;
    }
}

.toast-msg {
    position: fixed;
    bottom: 24px;
    left: 50%;
    transform: translateX(-50%);
    background: var(--accent);
    color: white;
    padding: 10px 24px;
    border-radius: 60px;
    font-size: 0.85rem;
    font-weight: 500;
    z-index: 1000;
    opacity: 0;
    transition: opacity 0.2s;
    pointer-events: none;
    box-shadow: var(--shadow-lg);
}

/* Popup Overlay */
.popup-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.7);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2000;
    visibility: hidden;
    opacity: 0;
    transition: visibility 0.2s, opacity 0.2s;
}

.popup-overlay.show {
    visibility: visible;
    opacity: 1;
}

/* Popup Content */
.popup-content {
    background: var(--bg-card);
    color: var(--text-primary);
    max-width: 400px;
    width: 90%;
    border-radius: 32px;
    padding: 2rem;
    text-align: center;
    position: relative;
    box-shadow: var(--shadow-lg);
    border: 1px solid var(--border-card);
    animation: popupFadeIn 0.3s ease-out;
}

@keyframes popupFadeIn {
    from {
        transform: scale(0.9);
        opacity: 0;
    }
    to {
        transform: scale(1);
        opacity: 1;
    }
}

/* Tombol close (X) */
.popup-close {
    position: absolute;
    top: 16px;
    right: 20px;
    background: transparent;
    border: none;
    font-size: 1.8rem;
    cursor: pointer;
    color: var(--text-muted);
    transition: 0.2s;
}

.popup-close:hover {
    color: var(--accent);
}

/* Icon */
.popup-icon {
    margin-bottom: 1rem;
}

/* Tombol aksi */
.popup-action-btn {
    background: var(--accent);
    border: none;
    color: white;
    padding: 10px 24px;
    border-radius: 40px;
    font-weight: 600;
    font-size: 1rem;
    cursor: pointer;
    margin-top: 1rem;
    transition: 0.2s;
}

.popup-action-btn:hover {
    background: var(--accent-hover);
    transform: translateY(-2px);
}