:root {
    --bg: #0d0d12;
    --bg-soft: #15151e;
    --bg-card: #1a1a24;
    --border: #262633;
    --text: #e8e8ed;
    --muted: #8a8a99;
    --purple: #7c5cbf;
    --purple-light: #a78bfa;
    --red: #dc2626;
    --red-dark: #991b1b;
    --green: #10b981;
    --yellow: #f59e0b;
}

* { margin: 0; padding: 0; box-sizing: border-box; font-family: 'Inter', sans-serif; }
html { scroll-behavior: smooth; }
body { background: var(--bg); color: var(--text); line-height: 1.65; font-size: 15px; overflow-x: hidden; }
a { color: var(--purple-light); text-decoration: none; }
.container { max-width: 1080px; margin: 0 auto; padding: 0 20px; }

/* Navbar */
nav {
    position: sticky; top: 0; z-index: 100;
    background: rgba(13, 13, 18, 0.85);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--border);
    padding: 16px 20px;
}
.nav-inner { max-width: 1080px; margin: 0 auto; display: flex; justify-content: space-between; align-items: center; }
.brand { display: flex; align-items: center; gap: 10px; font-weight: 800; font-size: 1.15rem; }
.brand i { color: var(--purple); font-size: 1.3rem; }
.nav-links { display: flex; gap: 28px; }
.nav-links a { color: var(--muted); font-weight: 500; font-size: 0.9rem; transition: color 0.2s; }
.nav-links a:hover { color: var(--text); }
@media (max-width: 640px) { .nav-links { display: none; } }

/* Hero */
.hero { text-align: center; padding: 80px 20px 60px; }
.hero-badge {
    display: inline-block; padding: 6px 14px; border-radius: 20px;
    background: rgba(124, 92, 191, 0.15); border: 1px solid rgba(124, 92, 191, 0.3);
    color: var(--purple-light); font-size: 0.8rem; font-weight: 600; margin-bottom: 24px;
}
.hero h1 { font-size: 2.5rem; font-weight: 800; line-height: 1.2; margin-bottom: 20px; letter-spacing: -0.02em; }
.hero h1 span { color: var(--purple-light); }
.hero p { color: var(--muted); max-width: 600px; margin: 0 auto; font-size: 1rem; }
@media (max-width: 640px) { .hero h1 { font-size: 1.8rem; } .hero { padding: 50px 20px 40px; } }

/* Sections */
.section { padding: 50px 0; }
.section-head { text-align: center; margin-bottom: 40px; }
.section-head h2 { font-size: 1.8rem; font-weight: 800; margin-bottom: 12px; letter-spacing: -0.02em; }
.section-head p { color: var(--muted); max-width: 500px; margin: 0 auto; font-size: 0.9rem; }

/* === FIX GRID & CARD === */
.products { 
    display: grid; 
    grid-template-columns: 1fr;
    gap: 24px; 
}
@media (min-width: 768px) {
    .products { grid-template-columns: repeat(2, 1fr); }
}

.product {
    background: var(--bg-card); border: 1px solid var(--border); border-radius: 16px;
    padding: 24px;
    transition: transform 0.25s, border-color 0.25s;
    width: 100%;
    max-width: 100%;
    min-width: 0;
    /* overflow: hidden; <--- INI YANG BIKIN BADGE KECEMPET, JADI GUA HAPUS */
    box-sizing: border-box;
}

.product:hover { transform: translateY(-4px); border-color: var(--purple); }
.product.free { border-top: 3px solid var(--red); }
.product.pro { border-top: 3px solid var(--purple); position: relative; }
.product h3 { font-size: 1.3rem; font-weight: 700; margin-bottom: 6px; display: flex; align-items: center; gap: 8px; }
.product .subtitle { color: var(--muted); font-size: 0.88rem; margin-bottom: 20px; }
.product .price { font-size: 2.2rem; font-weight: 800; margin-bottom: 24px; letter-spacing: -0.02em; }
.product .price small { font-size: 0.85rem; font-weight: 500; color: var(--muted); }
.product.free .price { color: var(--green); }
.product.pro .price { color: var(--purple-light); }
.product ul { list-style: none; margin-bottom: 28px; }
.product ul li { padding: 6px 0; color: var(--muted); font-size: 0.9rem; display: flex; gap: 10px; }
.product ul li i { color: var(--green); margin-top: 4px; font-size: 0.85rem; }

/* FIX BADGE PREMIUM */
.badge-popular {
    position: absolute; top: -12px; right: 20px; background: var(--purple);
    color: white; padding: 4px 12px; border-radius: 12px; font-size: 0.7rem; font-weight: 700; letter-spacing: 0.05em;
    white-space: nowrap; /* Biar teksnya gak turun ke bawah */
    z-index: 10;
}

/* Buttons */
.btn {
    display: inline-flex; align-items: center; justify-content: center; gap: 10px;
    padding: 14px 20px; border-radius: 10px; font-weight: 600; font-size: 0.92rem;
    cursor: pointer; border: none; transition: all 0.2s; text-decoration: none; width: 100%;
}
.btn-red { background: var(--red-dark); color: white; }
.btn-red:hover { background: #7f1d1d; }
.btn-purple { background: var(--purple); color: white; }
.btn-purple:hover { background: #6a4cb0; }
.btn-copy { background: var(--green); color: white; padding: 10px 18px; font-size: 0.85rem; width: auto; }
.btn-copy:hover { background: #0d9668; }
.btn-download { background: var(--bg-soft); border: 1px solid var(--border); color: var(--text); padding: 10px 18px; font-size: 0.85rem; width: auto; }
.btn-download:hover { border-color: var(--purple); color: var(--purple-light); }

/* Tutorial Steps */
.steps { display: flex; flex-direction: column; gap: 20px; }
.step {
    background: var(--bg-card); border: 1px solid var(--border); border-radius: 14px;
    padding: 24px; display: flex; gap: 20px; align-items: flex-start;
}
.step-num {
    flex-shrink: 0; width: 42px; height: 42px; border-radius: 10px;
    background: rgba(124, 92, 191, 0.15); border: 1px solid rgba(124, 92, 191, 0.3);
    color: var(--purple-light); font-weight: 800; font-size: 1.1rem;
    display: flex; align-items: center; justify-content: center;
}
.step-body { flex: 1; min-width: 0; }
.step-body h3 { font-size: 1.1rem; font-weight: 700; margin-bottom: 8px; }
.step-body p { color: var(--muted); font-size: 0.92rem; margin-bottom: 16px; }
.step-actions { display: flex; gap: 10px; flex-wrap: wrap; }
.step-code {
    background: #0a0a0f; border: 1px solid var(--border); border-radius: 8px;
    padding: 12px 16px; font-family: monospace; font-size: 0.82rem; color: var(--purple-light);
    overflow-x: auto; margin: 8px 0; white-space: pre-wrap; word-break: break-all;
}
.step-note {
    margin-top: 12px; padding: 12px 16px; background: rgba(245, 158, 11, 0.08);
    border-left: 3px solid var(--yellow); border-radius: 6px;
    color: var(--muted); font-size: 0.85rem;
}
.step-note i { color: var(--yellow); margin-right: 6px; }

/* Troubleshooting */
.trouble { display: grid; grid-template-columns: 1fr; gap: 20px; }
@media (min-width: 768px) {
    .trouble { grid-template-columns: repeat(2, 1fr); }
}
.trouble-item {
    background: var(--bg-card); border: 1px solid var(--border);
    border-left: 3px solid var(--red); border-radius: 10px; padding: 22px;
    min-width: 0;
}
.trouble-item h4 { font-size: 1rem; font-weight: 700; margin-bottom: 10px; color: var(--text); display: flex; align-items: center; gap: 8px; }
.trouble-item h4 i { color: var(--red); }
.trouble-item p { color: var(--muted); font-size: 0.88rem; margin-bottom: 12px; }
.trouble-item code {
    display: block; background: #0a0a0f; border: 1px solid var(--border); border-radius: 6px;
    padding: 10px 12px; font-family: monospace; font-size: 0.78rem; color: var(--purple-light);
    overflow-x: auto; margin-top: 6px; white-space: pre-wrap; word-break: break-all;
}

/* Contact */
.contact { text-align: center; padding: 60px 20px; border-top: 1px solid var(--border); background: var(--bg-soft); }
.contact h2 { font-size: 1.8rem; margin-bottom: 12px; }
.contact p { color: var(--muted); margin-bottom: 24px; }
.contact-links { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; }
.contact-links a {
    padding: 12px 24px; border-radius: 10px; color: white; font-weight: 600;
    display: inline-flex; align-items: center; gap: 8px;
}
.wa { background: #25D366; }
.tg { background: #0088cc; }
footer { text-align: center; padding: 30px 20px; color: var(--muted); font-size: 0.82rem; border-top: 1px solid var(--border); }

/* Toast Notification */
#toast {
    position: fixed; bottom: 30px; left: 50%; transform: translateX(-50%) translateY(100px);
    background: var(--green); color: white; padding: 14px 24px; border-radius: 10px;
    font-weight: 600; font-size: 0.9rem; opacity: 0; transition: all 0.3s;
    box-shadow: 0 10px 30px rgba(0,0,0,0.4); z-index: 999;
    max-width: 90vw; text-align: center;
}
#toast.show { transform: translateX(-50%) translateY(0); opacity: 1; }

/* === PREVIEW IMAGE (VERSI FIX) === */
.preview-box {
    position: relative;
    width: 100%;
    aspect-ratio: 4 / 3;
    overflow: hidden; /* Ini yang nahan gambar biar gak jebol */
    border-radius: 10px;
    margin-bottom: 20px;
    border: 1px solid var(--border);
    cursor: pointer;
    background: #000;
    display: block;
    box-sizing: border-box;
}
.preview-box img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    transition: transform 0.4s ease, opacity 0.3s;
    display: block;
}
.preview-box:hover img { transform: scale(1.05); opacity: 0.7; }
.zoom-icon {
    position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%);
    background: rgba(0, 0, 0, 0.7); color: white; padding: 12px 16px;
    border-radius: 50%; font-size: 1.2rem; opacity: 0; transition: opacity 0.3s;
    pointer-events: none;
}
.preview-box:hover .zoom-icon { opacity: 1; }

/* === MODAL LIGHTBOX (VERSI FIX) === */
.modal {
    display: none;
    position: fixed; z-index: 9999;
    left: 0; top: 0; width: 100%; height: 100%;
    background-color: rgba(0, 0, 0, 0.95);
    backdrop-filter: blur(5px);
    overflow-y: auto;
    padding: 60px 16px 30px;
    box-sizing: border-box;
}
.modal-content {
    margin: 0 auto; display: block;
    width: 100%;
    max-width: 900px;
    max-height: 82vh;
    object-fit: contain;
    border-radius: 8px;
    box-shadow: 0 0 30px rgba(0, 0, 0, 0.8);
    animation: zoomIn 0.3s;
    background: #000;
}
@keyframes zoomIn { from { transform: scale(0.9); opacity: 0; } to { transform: scale(1); opacity: 1; } }
.close-modal {
    position: fixed;
    top: 15px; right: 20px;
    color: #fff; font-size: 40px; font-weight: bold;
    cursor: pointer; transition: color 0.3s;
    z-index: 10000; line-height: 1;
    background: rgba(0,0,0,0.5); width: 48px; height: 48px;
    border-radius: 50%; display: flex; align-items: center; justify-content: center;
}
.close-modal:hover { color: var(--red); }

/* Fix tambahan biar body gak ikut scroll pas modal kebuka */
body.modal-open { overflow: hidden; }

@media (max-width: 640px) {
    .product { padding: 18px; }
    .modal { padding: 50px 10px 20px; }
    .modal-content { max-height: 78vh; }
}