:root {
    --primary: #6366f1;
    --primary-dark: #4f46e5;
    --primary-light: #a5b4fc;
    --primary-soft: rgba(99, 102, 241, 0.1);
    --secondary: #f472b6;
    --secondary-soft: rgba(244, 114, 182, 0.12);
    --dark: #0f172a;
    --dark-2: #1e293b;
    --gray: #64748b;
    --light-gray: #f1f5f9;
    --border: #e2e8f0;
    --success: #22c55e;
    --success-soft: rgba(34, 197, 94, 0.12);
    --white: #ffffff;
    --radius: 16px;
    --radius-sm: 10px;
    --shadow: 0 10px 30px rgba(15, 23, 42, 0.08);
    --shadow-lg: 0 20px 50px rgba(15, 23, 42, 0.15);
    --glass-border: rgba(255, 255, 255, 0.35);
}

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

body {
    font-family: 'Poppins', 'Segoe UI', Arial, sans-serif;
    background: #f8fafc
        radial-gradient(circle at 8% 0%, rgba(99,102,241,.05), transparent 32%)
        radial-gradient(circle at 95% 18%, rgba(244,114,182,.05), transparent 32%);
    background-attachment: fixed;
    color: #1e293b;
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}

a { text-decoration: none; color: inherit; }
ul { list-style: none; }
img { max-width: 100%; display: block; }
.container {
    max-width: 1240px;
    margin: 0 auto;
    padding: 0 20px;
}

/* ---------- NAVBAR ---------- */
.navbar {
    position: sticky;
    top: 0;
    z-index: 100;
    background: rgba(255,255,255,0.85);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--border);
}
.navbar .container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-top: 14px;
    padding-bottom: 14px;
}
.brand {
    font-size: 22px;
    font-weight: 800;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    display: flex;
    align-items: center;
    gap: 8px;
}
.nav-links { display: flex; gap: 30px; align-items: center; }
.nav-links a { font-weight: 500; color: var(--dark-2); transition: .2s; }
.nav-links a:hover { color: var(--primary); }
.nav-cta {
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    color: #fff !important;
    padding: 10px 22px;
    border-radius: 50px;
    font-weight: 600;
    box-shadow: 0 6px 16px rgba(99,102,241,.35);
}
.menu-toggle { display: none; font-size: 24px; background: none; border: none; cursor: pointer; color: var(--dark-2); }

/* ---------- HERO ---------- */
.hero {
    background: linear-gradient(160deg, #0f172a 0%, #23206b 45%, #4c46c9 85%, #6366f1 120%);
    color: #fff;
    padding: 90px 0 110px;
    position: relative;
    overflow: hidden;
}
.hero::before {
    content: "";
    position: absolute;
    width: 520px; height: 520px;
    background: radial-gradient(circle, rgba(244,114,182,.30), transparent 70%);
    top: -160px; right: -120px;
    filter: blur(10px);
}
.hero::after {
    content: "";
    position: absolute;
    width: 420px; height: 420px;
    background: radial-gradient(circle, rgba(165,180,252,.22), transparent 70%);
    bottom: -180px; left: -100px;
    filter: blur(10px);
}
.hero .container { position: relative; z-index: 2; text-align: center; }
.hero h1 { font-size: 44px; font-weight: 800; max-width: 780px; margin: 0 auto 18px; line-height: 1.25; }
.hero h1 span { background: linear-gradient(135deg, #f472b6, #a5b4fc); -webkit-background-clip: text; -webkit-text-fill-color: transparent; }
.hero p { font-size: 17px; color: #cbd5e1; max-width: 600px; margin: 0 auto 34px; }

.search-box {
    max-width: 620px;
    margin: 0 auto;
    background: #fff;
    border-radius: 50px;
    display: flex;
    padding: 6px;
    box-shadow: var(--shadow-lg);
}
.search-box input {
    flex: 1;
    border: none;
    outline: none;
    padding: 14px 22px;
    font-size: 15px;
    border-radius: 50px;
    color: var(--dark);
}
.search-box button {
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    color: #fff;
    border: none;
    padding: 0 28px;
    border-radius: 50px;
    font-weight: 600;
    cursor: pointer;
}

.hero-stats { display: flex; justify-content: center; gap: 50px; margin-top: 50px; flex-wrap: wrap; }
.hero-stats div { text-align: center; }
.hero-stats strong { display: block; font-size: 28px; font-weight: 800; }
.hero-stats span { color: #cbd5e1; font-size: 13px; }

/* ---------- SECTION ---------- */
.section { padding: 70px 0; }
.section-title { text-align: center; margin-bottom: 46px; }
.section-title h2 { font-size: 32px; font-weight: 800; margin-bottom: 10px; }
.section-title p { color: var(--gray); max-width: 550px; margin: 0 auto; }

/* ---------- CATEGORY TABS ---------- */
.cat-tabs { display: flex; justify-content: center; gap: 12px; flex-wrap: wrap; margin-bottom: 40px; }
.cat-tab {
    padding: 10px 22px;
    border-radius: 50px;
    background: var(--white);
    border: 1px solid var(--border);
    font-weight: 600;
    font-size: 14px;
    color: var(--dark-2);
    cursor: pointer;
    transition: .2s;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}
.cat-tab:hover { border-color: var(--primary); color: var(--primary); }
.cat-tab.active {
    background: linear-gradient(135deg, var(--primary-soft), var(--secondary-soft));
    border-color: rgba(99,102,241,.35);
    color: var(--primary-dark);
}

/* ---------- PRODUCT GRID ---------- */
.product-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(270px, 1fr));
    gap: 26px;
}
.product-card {
    background: var(--white);
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow);
    border: 1px solid var(--border);
    transition: transform .25s, box-shadow .25s;
    display: flex;
    flex-direction: column;
}
.product-card:hover { transform: translateY(-6px); box-shadow: var(--shadow-lg); }
.product-thumb { position: relative; aspect-ratio: 16/10; overflow: hidden; background: var(--light-gray); }
.product-thumb img { width: 100%; height: 100%; object-fit: cover; transition: .4s; }
.product-card:hover .product-thumb img { transform: scale(1.06); }
.badge {
    position: absolute; top: 12px; left: 12px;
    background: rgba(255,255,255,.82); backdrop-filter: blur(6px);
    color: var(--dark-2); font-size: 11px; font-weight: 600;
    padding: 5px 12px; border-radius: 50px;
    border: 1px solid rgba(255,255,255,.5);
}
.badge-featured {
    background: linear-gradient(135deg, rgba(244,114,182,.85), rgba(251,146,60,.85));
    backdrop-filter: blur(6px);
    color: #fff; top: 12px; right: 12px; left: auto; border: none;
}
.product-body { padding: 20px; display: flex; flex-direction: column; flex: 1; }
.product-body h3 { font-size: 17px; font-weight: 700; margin-bottom: 6px; }
.product-body p.desc { font-size: 13.5px; color: var(--gray); margin-bottom: 14px; flex: 1; }
.price-row { display: flex; align-items: baseline; gap: 8px; margin-bottom: 14px; }
.price-now { font-size: 19px; font-weight: 800; color: var(--primary-dark); }
.price-old { font-size: 13px; color: #94a3b8; text-decoration: line-through; }
.btn-detail {
    display: block; text-align: center;
    background: rgba(15,23,42,.055);
    color: var(--dark-2); padding: 11px; border-radius: var(--radius-sm);
    font-weight: 600; font-size: 14px; transition: .2s;
    border: 1px solid transparent;
}
.btn-detail:hover { background: linear-gradient(135deg, var(--primary), var(--primary-dark)); color: #fff; }

/* ---------- BUTTONS ---------- */
.btn {
    display: inline-flex; align-items: center; justify-content: center; gap: 8px;
    padding: 13px 26px; border-radius: var(--radius-sm); font-weight: 600; font-size: 14.5px;
    border: none; cursor: pointer; transition: .2s;
}
.btn-primary { background: linear-gradient(135deg, var(--primary), var(--primary-dark)); color: #fff; box-shadow: 0 8px 20px rgba(99,102,241,.3); }
.btn-primary:hover { filter: brightness(1.08); transform: translateY(-2px); }
.btn-whatsapp { background: linear-gradient(135deg, #25D366, #128C7E); color: #fff; box-shadow: 0 8px 20px rgba(37,211,102,.3); }
.btn-whatsapp:hover { filter: brightness(1.05); transform: translateY(-2px); }
.btn-outline { background: transparent; border: 1.5px solid var(--border); color: var(--dark-2); }
.btn-outline:hover { border-color: var(--primary); color: var(--primary); }
.btn-block { width: 100%; }

/* ---------- PRODUCT DETAIL ---------- */
.breadcrumb { font-size: 13.5px; color: var(--gray); margin-bottom: 24px; }
.breadcrumb a { color: var(--primary); }
.detail-wrap { display: grid; grid-template-columns: 1.1fr 1fr; gap: 46px; align-items: start; }
.gallery-main { border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); aspect-ratio: 16/10; background: var(--light-gray); margin-bottom: 14px;}
.gallery-main img { width: 100%; height: 100%; object-fit: cover; }
.gallery-thumbs { display: flex; gap: 10px; }
.gallery-thumbs img { width: 74px; height: 54px; object-fit: cover; border-radius: 8px; cursor: pointer; border: 2px solid transparent; }
.gallery-thumbs img.active { border-color: var(--primary); }

.detail-info h1 { font-size: 27px; font-weight: 800; margin-bottom: 10px; }
.meta-badges { display: flex; gap: 10px; margin-bottom: 18px; flex-wrap: wrap; }
.meta-badges span { background: var(--light-gray); padding: 6px 14px; border-radius: 50px; font-size: 12.5px; font-weight: 600; color: var(--dark-2); }
.detail-price { display: flex; align-items: baseline; gap: 12px; margin-bottom: 22px; }
.detail-price .now { font-size: 30px; font-weight: 800; color: var(--primary-dark); }
.detail-price .old { font-size: 16px; color: #94a3b8; text-decoration: line-through; }
.detail-price .discount { background: #fee2e2; color: #dc2626; font-size: 12px; font-weight: 700; padding: 4px 10px; border-radius: 6px; }

.action-buttons { display: flex; gap: 12px; margin-bottom: 26px; flex-wrap: wrap; }
.demo-buttons { display: flex; gap: 12px; margin-bottom: 30px; flex-wrap: wrap; }

.tabs-nav { display: flex; gap: 6px; border-bottom: 1.5px solid var(--border); margin: 40px 0 24px; }
.tabs-nav button {
    background: none; border: none; padding: 12px 20px; font-weight: 600; color: var(--gray); cursor: pointer;
    border-bottom: 2.5px solid transparent; margin-bottom: -1.5px; font-size: 14.5px;
}
.tabs-nav button.active { color: var(--primary); border-color: var(--primary); }
.tab-content { display: none; line-height: 1.9; color: #334155; }
.tab-content.active { display: block; }
.tab-content ul { list-style: none; padding: 0; }
.tab-content ul li { position: relative; padding-left: 26px; margin-bottom: 10px; }
.tab-content ul li::before { content: "✓"; position: absolute; left: 0; color: var(--success); font-weight: 800; }

/* ---------- MODAL ---------- */
.modal-overlay {
    display: none; position: fixed; inset: 0; background: rgba(15,23,42,.5);
    z-index: 999; align-items: center; justify-content: center; padding: 20px;
    backdrop-filter: blur(6px);
}
.modal-overlay.show { display: flex; }
.modal-box {
    background: #fff; border-radius: var(--radius); max-width: 460px; width: 100%;
    padding: 32px; position: relative; max-height: 90vh; overflow-y: auto;
}
.modal-close { position: absolute; top: 16px; right: 18px; background: none; border: none; font-size: 22px; cursor: pointer; color: var(--gray); }
.modal-box h3 { font-size: 20px; font-weight: 800; margin-bottom: 6px; }
.modal-box p.sub { color: var(--gray); font-size: 13.5px; margin-bottom: 22px; }
.form-group { margin-bottom: 16px; }
.form-group label { display: block; font-size: 13.5px; font-weight: 600; margin-bottom: 6px; }
.form-group input, .form-group textarea, .form-group select {
    width: 100%; padding: 11px 14px; border: 1.5px solid var(--border); border-radius: 10px; font-size: 14.5px;
    font-family: inherit;
}
.form-group input:focus, .form-group textarea:focus, .form-group select:focus { outline: none; border-color: var(--primary); }

.bank-info-card {
    background: var(--light-gray); border-radius: 12px; padding: 16px 18px; margin-bottom: 8px;
}
.bank-info-card .bank-name { font-weight: 700; font-size: 14.5px; margin-bottom: 4px; }
.bank-info-card .bank-acc { font-size: 18px; font-weight: 800; color: var(--primary-dark); letter-spacing: 1px; }
.bank-info-card .bank-owner { font-size: 13px; color: var(--gray); }

.order-success { text-align: center; padding: 10px 0; }
.order-success .icon { width: 64px; height: 64px; background: #dcfce7; color: var(--success); border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 28px; margin: 0 auto 16px; }
.order-code-box { background: var(--dark); color: #fff; padding: 14px; border-radius: 10px; text-align: center; font-size: 20px; font-weight: 800; letter-spacing: 2px; margin: 16px 0; }

/* ---------- FOOTER ---------- */
footer { background: linear-gradient(160deg, var(--dark), var(--dark-2)); color: #cbd5e1; padding: 60px 0 24px; margin-top: 60px; }
.footer-grid { display: grid; grid-template-columns: 2fr 1fr 1fr; gap: 40px; margin-bottom: 40px; }
.footer-grid h4 { color: #fff; font-size: 15px; margin-bottom: 16px; }
.footer-grid p { font-size: 13.5px; color: #94a3b8; }
.footer-grid ul li { margin-bottom: 10px; }
.footer-grid ul li a { font-size: 13.5px; color: #cbd5e1; }
.footer-grid ul li a:hover { color: var(--primary-light); }
.footer-bottom { border-top: 1px solid #1e293b; padding-top: 20px; text-align: center; font-size: 13px; color: #64748b; }

/* ---------- EMPTY STATE ---------- */
.empty-state { text-align: center; padding: 60px 20px; color: var(--gray); }
.empty-state .icon { font-size: 50px; margin-bottom: 16px; opacity: .5; }

/* ---------- AUTH CARD (Registrasi Penjual) ---------- */
.auth-card {
    background: rgba(255,255,255,.75);
    backdrop-filter: blur(10px);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius);
    box-shadow: var(--shadow-lg);
    padding: 36px;
    margin-bottom: 60px;
}
.auth-card h1 { font-size: 22px; font-weight: 800; margin-bottom: 8px; display: flex; align-items: center; gap: 10px; }
.auth-card h1 i { color: var(--primary); }
.auth-card p.sub { color: var(--gray); font-size: 13.5px; margin-bottom: 24px; }
.auth-success { text-align: center; padding: 10px 0; }
.auth-success .icon { width: 64px; height: 64px; background: var(--success-soft); color: var(--success); border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 28px; margin: 0 auto 16px; }
.auth-success h1 { justify-content: center; margin-bottom: 12px; }
.auth-success p { color: var(--gray); font-size: 14px; line-height: 1.8; }

/* ---------- PAGINATION ---------- */
.pagination { display: flex; align-items: center; justify-content: center; gap: 16px; margin-top: 40px; }
.page-btn {
    width: 42px; height: 42px; display: flex; align-items: center; justify-content: center;
    background: var(--white); border: 1px solid var(--border); border-radius: 50%; color: var(--dark-2); transition: .2s;
}
.page-btn:hover { border-color: var(--primary); color: var(--primary); background: var(--primary-soft); }
.page-info { font-size: 13.5px; color: var(--gray); font-weight: 500; }

/* ---------- RESPONSIVE ---------- */
@media (max-width: 900px) {
    .detail-wrap { grid-template-columns: 1fr; }
    .footer-grid { grid-template-columns: 1fr 1fr; }
}

/* ---- Tablet ---- */
@media (max-width: 768px) {
    /* Navbar mobile */
    .menu-toggle { display: block; }
    .nav-links {
        position: fixed;
        top: 64px; left: 0; right: 0;
        background: rgba(255,255,255,0.97);
        backdrop-filter: blur(12px);
        flex-direction: column;
        padding: 18px 24px 24px;
        box-shadow: var(--shadow-lg);
        display: none;
        gap: 6px;
        border-top: 1px solid var(--border);
        z-index: 99;
    }
    .nav-links.show { display: flex; }
    .nav-links a {
        padding: 12px 16px;
        border-radius: 10px;
        font-size: 15px;
        text-align: center;
        transition: background .2s;
    }
    .nav-links a:hover { background: var(--light-gray); }
    .nav-cta {
        padding: 13px 22px !important;
        border-radius: 10px !important;
        text-align: center;
        font-size: 15px;
    }

    /* Hero */
    .hero { padding: 60px 0 76px; }
    .hero h1 { font-size: 28px; line-height: 1.3; }
    .hero p { font-size: 14.5px; }
    .hero-stats { gap: 24px; margin-top: 36px; }
    .hero-stats strong { font-size: 22px; }

    /* Search box */
    .search-box {
        flex-direction: column;
        border-radius: 16px;
        padding: 10px;
        gap: 6px;
    }
    .search-box input { padding: 12px 16px; font-size: 15px; }
    .search-box button { border-radius: 12px; padding: 13px; }

    /* Section */
    .section { padding: 50px 0; }
    .section-title h2 { font-size: 24px; }
    .section-title p { font-size: 14px; }

    /* Category tabs */
    .cat-tabs { gap: 8px; }
    .cat-tab { padding: 8px 16px; font-size: 13px; }

    /* Product grid */
    .product-grid { grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 18px; }

    /* Product detail */
    .detail-wrap { grid-template-columns: 1fr; gap: 24px; }
    .detail-info h1 { font-size: 22px; }
    .detail-price .now { font-size: 26px; }
    .action-buttons, .demo-buttons { flex-direction: column; gap: 10px; }
    .action-buttons .btn, .demo-buttons .btn { width: 100%; justify-content: center; }
    .tabs-nav { gap: 0; overflow-x: auto; }
    .tabs-nav button { padding: 10px 14px; font-size: 13.5px; white-space: nowrap; }

    /* Auth / Register card */
    .auth-card { padding: 22px 18px; }
    .reg-steps { padding: 10px 14px; }

    /* Footer */
    .footer-grid { grid-template-columns: 1fr; gap: 28px; }
    footer { padding: 44px 0 18px; }
}

/* ---- Mobile small ---- */
@media (max-width: 480px) {
    .container { padding: 0 14px; }

    /* Navbar */
    .navbar .container { padding-top: 12px; padding-bottom: 12px; }
    .brand { font-size: 19px; }

    /* Hero */
    .hero { padding: 50px 0 60px; }
    .hero h1 { font-size: 24px; }
    .hero p { font-size: 14px; }
    .hero-stats { gap: 18px; }
    .hero-stats strong { font-size: 20px; }
    .hero-stats span { font-size: 12px; }

    /* Product grid single column */
    .product-grid { grid-template-columns: 1fr; gap: 14px; }

    /* Buttons */
    .btn { padding: 12px 18px; font-size: 14px; }

    /* Auth card */
    .auth-card { padding: 18px 14px; border-radius: 14px; }

    /* Modal */
    .modal-box { padding: 22px 16px; }

    /* Gallery thumbs */
    .gallery-thumbs img { width: 58px; height: 42px; }

    /* Pagination */
    .pagination { gap: 10px; }
    .page-btn { width: 38px; height: 38px; }
}

/* ---- Safe area support (iPhone notch) ---- */
@supports (padding: env(safe-area-inset-bottom)) {
    body { padding-bottom: env(safe-area-inset-bottom); }
    .nav-links { padding-bottom: calc(24px + env(safe-area-inset-bottom)); }
}

