/* ====================================================================
   ELEKTROFAMILY - DESIGN SYSTEM
   Palet: Navy (kepercayaan) + Gold (kepremiuman) + WA Green (aksi cepat)
   ==================================================================== */

:root {
    --navy-900: #0F1F38;
    --navy-800: #14294A;
    --navy-700: #1B3A63;
    --navy-600: #234B7D;
    --navy-100: #E9EEF6;

    --gold-600: #C98A34;
    --gold-500: #E3A857;
    --gold-100: #FBF0DD;

    --wa-green: #25D366;
    --wa-green-dark: #1DA851;

    --success: #1E9E5A;
    --success-bg: #E7F7EE;
    --warning: #B4790E;
    --warning-bg: #FCF1DC;
    --danger: #D64545;
    --danger-bg: #FBEAEA;
    --info: #2563A8;
    --info-bg: #E8F1FB;

    --bg: #F5F7FA;
    --surface: #FFFFFF;
    --text: #1B2430;
    --text-muted: #62697A;
    --border: #E4E8F0;

    --radius-sm: 12px;
    --radius: 18px;
    --radius-lg: 24px;
    --shadow: 0 10px 30px rgba(15, 31, 56, 0.08);
    --shadow-lift: 0 16px 40px rgba(15, 31, 56, 0.14);

    --font-display: 'Poppins', 'Segoe UI', sans-serif;
    --font-body: 'Inter', 'Segoe UI', sans-serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
    margin: 0;
    font-family: var(--font-body);
    background: var(--bg);
    color: var(--text);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    overflow-x: hidden;
}
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
h1, h2, h3, h4 { font-family: var(--font-display); color: var(--navy-900); line-height: 1.25; margin: 0 0 .5em; }
p { margin: 0 0 1em; color: var(--text-muted); }
ul { margin: 0; padding: 0; list-style: none; }
button { font-family: inherit; cursor: pointer; }
:focus-visible { outline: 3px solid var(--gold-500); outline-offset: 2px; }

.container {
    width: 100%;
    max-width: 1180px;
    margin: 0 auto;
    padding: 0 20px;
}

/* ================= HEADER / NAV ================= */
.site-header {
    background: var(--navy-900);
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: 0 2px 16px rgba(0,0,0,.15);
}
.header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 68px;
}
.logo { display: flex; align-items: center; gap: 10px; }
.logo-mark {
    width: 38px; height: 38px;
    background: linear-gradient(135deg, var(--gold-500), var(--gold-600));
    color: var(--navy-900);
    border-radius: 10px;
    display: flex; align-items: center; justify-content: center;
    font-family: var(--font-display); font-weight: 800; font-size: 15px;
    flex-shrink: 0;
}
.logo-text { color: #fff; font-family: var(--font-display); font-weight: 700; font-size: 17px; }

.nav-toggle {
    display: flex; flex-direction: column; gap: 5px;
    background: none; border: none; padding: 8px;
}
.nav-toggle span { width: 22px; height: 2px; background: #fff; border-radius: 2px; transition: .25s; }

.main-nav {
    position: fixed;
    top: 68px; left: 0; right: 0; bottom: 0;
    background: var(--navy-900);
    display: flex;
    flex-direction: column;
    padding: 18px 20px 100px;
    gap: 4px;
    transform: translateX(100%);
    transition: transform .3s ease;
    overflow-y: auto;
    z-index: 99;
}
.main-nav.open { transform: translateX(0); }
.main-nav a {
    color: rgba(255,255,255,.85);
    font-weight: 500;
    padding: 14px 16px;
    border-radius: 12px;
}
.main-nav a.active, .main-nav a:hover { background: rgba(255,255,255,.08); color: #fff; }
.main-nav a.btn-nav { margin-top: 10px; }

/* ================= BUTTONS ================= */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 14px 24px;
    border-radius: 14px;
    font-weight: 600;
    font-size: 15px;
    border: none;
    transition: transform .15s ease, box-shadow .15s ease, opacity .15s;
    text-align: center;
    min-height: 48px;
}
.btn:active { transform: scale(.98); }
.btn-primary { background: var(--navy-700); color: #fff; box-shadow: 0 8px 20px rgba(27,58,99,.3); }
.btn-primary:hover { background: var(--navy-600); }
.btn-gold { background: linear-gradient(135deg, var(--gold-500), var(--gold-600)); color: var(--navy-900); box-shadow: 0 8px 20px rgba(201,138,52,.3); }
.btn-outline { background: transparent; color: var(--navy-700); border: 2px solid var(--navy-100); }
.btn-outline:hover { border-color: var(--navy-700); }
.btn-wa { background: var(--wa-green); color: #fff; box-shadow: 0 8px 20px rgba(37,211,102,.35); }
.btn-wa:hover { background: var(--wa-green-dark); }
.btn-block { width: 100%; }
.btn-sm { padding: 10px 16px; min-height: 40px; font-size: 14px; border-radius: 10px; }
.btn:disabled { opacity: .5; cursor: not-allowed; }

/* ================= HERO ================= */
.hero {
    background: radial-gradient(circle at 15% 20%, var(--navy-700), var(--navy-900) 65%);
    color: #fff;
    padding: 52px 0 76px;
    position: relative;
    overflow: hidden;
}
.hero::after {
    content: "";
    position: absolute; inset: 0;
    background: radial-gradient(circle at 90% 10%, rgba(227,168,87,.18), transparent 40%);
    pointer-events: none;
}
.hero-grid { display: grid; gap: 36px; align-items: center; position: relative; z-index: 1; }
.hero-eyebrow {
    display: inline-flex; align-items: center; gap: 8px;
    background: rgba(227,168,87,.15); color: var(--gold-500);
    padding: 6px 14px; border-radius: 999px; font-size: 13px; font-weight: 600;
    margin-bottom: 16px;
}
.hero h1 { color: #fff; font-size: clamp(1.9rem, 6vw, 2.9rem); font-weight: 700; margin-bottom: 16px; }
.hero p.lead { color: rgba(255,255,255,.78); font-size: 16px; max-width: 480px; margin-bottom: 26px; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; }

.hero-card {
    background: var(--surface);
    border-radius: var(--radius-lg);
    padding: 22px;
    box-shadow: var(--shadow-lift);
    color: var(--text);
}
.hero-card-title { font-size: 13px; text-transform: uppercase; letter-spacing: .06em; color: var(--text-muted); font-weight: 600; margin-bottom: 14px; }
.hero-compare-row {
    display: flex; align-items: center; justify-content: space-between;
    padding: 12px 0; border-bottom: 1px solid var(--border);
}
.hero-compare-row:last-child { border-bottom: none; }
.hero-compare-row .toko-name { font-size: 12px; color: var(--text-muted); }
.hero-compare-row .harga { font-family: var(--font-display); font-weight: 700; color: var(--navy-800); }
.badge-termurah {
    background: var(--success-bg); color: var(--success);
    font-size: 11px; font-weight: 700; padding: 3px 9px; border-radius: 999px;
    display: inline-block; margin-top: 3px;
}

/* ================= SECTIONS ================= */
section { padding: 52px 0; }
.section-head { text-align: center; max-width: 620px; margin: 0 auto 34px; }
.section-head .eyebrow { color: var(--gold-600); font-weight: 700; font-size: 13px; text-transform: uppercase; letter-spacing: .06em; }
.section-head h2 { font-size: clamp(1.5rem, 4vw, 2.1rem); margin-top: 8px; }
.bg-alt { background: var(--surface); }

/* ================= GRIDS & CARDS ================= */
.grid { display: grid; gap: 20px; }
.grid-3 { grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); }
.grid-4 { grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); }

.card {
    background: var(--surface);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    padding: 24px;
    border: 1px solid var(--border);
}

.benefit-card { text-align: left; }
.benefit-icon {
    width: 48px; height: 48px; border-radius: 14px;
    background: var(--navy-100); color: var(--navy-700);
    display: flex; align-items: center; justify-content: center;
    font-size: 22px; margin-bottom: 16px;
}
.benefit-card h3 { font-size: 17px; margin-bottom: 6px; }
.benefit-card p { font-size: 14px; margin: 0; }

.kategori-card {
    background: var(--surface);
    border-radius: var(--radius);
    border: 1px solid var(--border);
    padding: 22px 18px;
    text-align: center;
    transition: transform .18s ease, box-shadow .18s ease;
}
.kategori-card:hover { transform: translateY(-4px); box-shadow: var(--shadow); }
.kategori-icon { font-size: 34px; margin-bottom: 10px; }
.kategori-card h3 { font-size: 15px; margin-bottom: 2px; }
.kategori-card span { font-size: 13px; color: var(--text-muted); }

/* ================= PRODUCT CARD ================= */
.produk-card {
    background: var(--surface);
    border-radius: var(--radius);
    border: 1px solid var(--border);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    transition: box-shadow .2s ease, transform .2s ease;
    position: relative;
}
.produk-card:hover { box-shadow: var(--shadow-lift); transform: translateY(-3px); }
.produk-thumb {
    height: 160px;
    background: linear-gradient(135deg, var(--navy-100), #fff);
    display: flex; align-items: center; justify-content: center;
    font-size: 46px;
}
.produk-body { padding: 18px; display: flex; flex-direction: column; gap: 8px; flex: 1; }
.produk-toko { font-size: 12px; color: var(--text-muted); font-weight: 500; }
.produk-nama { font-size: 15px; font-weight: 600; color: var(--navy-900); min-height: 40px; }
.produk-harga { font-family: var(--font-display); font-weight: 700; font-size: 18px; color: var(--navy-800); }
.produk-garansi {
    font-size: 12px; color: var(--success); background: var(--success-bg);
    display: inline-block; padding: 3px 10px; border-radius: 999px; width: fit-content;
}
.produk-actions { display: flex; gap: 8px; margin-top: auto; padding-top: 8px; }
.produk-actions .btn { flex: 1; padding: 11px 10px; font-size: 13px; }

.compare-checkbox-wrap {
    position: absolute; top: 14px; right: 14px;
    background: rgba(255,255,255,.92); border-radius: 10px; padding: 6px 10px;
    display: flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 600; color: var(--navy-700);
    box-shadow: 0 2px 8px rgba(0,0,0,.08);
}
.compare-checkbox-wrap input { width: 17px; height: 17px; accent-color: var(--navy-700); }

/* ================= FILTER BAR ================= */
.filter-bar {
    display: flex; flex-wrap: wrap; gap: 10px;
    margin-bottom: 28px;
}
.filter-bar a {
    padding: 10px 18px; border-radius: 999px;
    background: var(--surface); border: 1px solid var(--border);
    font-size: 14px; font-weight: 500; color: var(--text-muted);
    white-space: nowrap;
}
.filter-bar a.active { background: var(--navy-700); color: #fff; border-color: var(--navy-700); }

/* ================= COMPARE BAR (floating) ================= */
.compare-bar {
    position: fixed; left: 0; right: 0; bottom: 0; z-index: 90;
    background: var(--navy-900); color: #fff;
    padding: 14px 20px;
    display: none;
    align-items: center; justify-content: space-between; gap: 14px;
    box-shadow: 0 -8px 24px rgba(0,0,0,.2);
}
.compare-bar.show { display: flex; }
.compare-bar span { font-size: 14px; }
.compare-bar strong { color: var(--gold-500); }

/* ================= FORMS ================= */
.form-card { max-width: 640px; margin: 0 auto; }
.form-group { margin-bottom: 20px; }
label { display: block; font-weight: 600; font-size: 14px; margin-bottom: 7px; color: var(--navy-900); }
label .req { color: var(--danger); }
input[type=text], input[type=tel], input[type=date], input[type=time], input[type=search],
select, textarea {
    width: 100%;
    padding: 13px 16px;
    border: 1.5px solid var(--border);
    border-radius: var(--radius-sm);
    font-size: 15px;
    font-family: var(--font-body);
    background: var(--surface);
    color: var(--text);
    transition: border-color .15s ease, box-shadow .15s ease;
}
textarea { resize: vertical; min-height: 100px; }
input:focus, select:focus, textarea:focus {
    border-color: var(--navy-700);
    box-shadow: 0 0 0 4px var(--navy-100);
    outline: none;
}
.field-hint { font-size: 12.5px; color: var(--text-muted); margin-top: 6px; }
.field-error { font-size: 12.5px; color: var(--danger); margin-top: 6px; font-weight: 500; }
.form-row { display: grid; gap: 16px; }
@media (min-width: 640px) { .form-row-2 { grid-template-columns: 1fr 1fr; } }

.alert {
    padding: 14px 18px; border-radius: var(--radius-sm);
    font-size: 14px; margin-bottom: 20px; font-weight: 500;
}
.alert-error { background: var(--danger-bg); color: var(--danger); }
.alert-success { background: var(--success-bg); color: var(--success); }

/* ================= SUCCESS / EMPTY STATE ================= */
.state-box {
    text-align: center;
    padding: 48px 24px;
    background: var(--surface);
    border-radius: var(--radius-lg);
    border: 1px dashed var(--border);
}
.state-box.success { border-style: solid; border-color: var(--success); background: var(--success-bg); }
.state-icon { font-size: 44px; margin-bottom: 14px; }
.state-box h3 { margin-bottom: 8px; font-size: 19px; }
.state-box p { max-width: 420px; margin: 0 auto 18px; }
.state-code {
    display: inline-block; background: var(--navy-900); color: var(--gold-500);
    font-family: var(--font-display); font-weight: 700; letter-spacing: .05em;
    padding: 10px 20px; border-radius: 12px; margin-bottom: 18px; font-size: 17px;
}

/* ================= COMPARE TABLE ================= */
.compare-table-wrap { overflow-x: auto; border-radius: var(--radius-lg); box-shadow: var(--shadow); background: var(--surface); }
table.compare-table { width: 100%; border-collapse: collapse; min-width: 560px; }
.compare-table th, .compare-table td {
    padding: 16px 18px; text-align: left; border-bottom: 1px solid var(--border); font-size: 14px;
}
.compare-table thead th {
    background: var(--navy-900); color: #fff; font-family: var(--font-display); font-weight: 600;
    position: sticky; top: 0;
}
.compare-table .label-col { font-weight: 600; color: var(--text-muted); background: var(--bg); white-space: nowrap; }
.compare-table td.harga-cell { font-family: var(--font-display); font-weight: 700; font-size: 16px; color: var(--navy-800); }
.compare-table td.harga-cell.termurah { color: var(--success); }
.compare-table tr:last-child td { border-bottom: none; }

/* ================= TESTIMONI ================= */
.testi-card { position: relative; }
.testi-quote { font-size: 30px; color: var(--gold-500); font-family: var(--font-display); line-height: 1; }
.testi-name { font-weight: 700; margin-top: 14px; color: var(--navy-900); }
.testi-role { font-size: 13px; color: var(--text-muted); }
.stars { color: var(--gold-500); font-size: 14px; margin-bottom: 8px; }

/* ================= STATUS BADGE ================= */
.status-badge { display: inline-flex; align-items: center; padding: 5px 12px; border-radius: 999px; font-size: 12.5px; font-weight: 600; }
.status-info { background: var(--info-bg); color: var(--info); }
.status-warning { background: var(--warning-bg); color: var(--warning); }
.status-success { background: var(--success-bg); color: var(--success); }
.status-danger { background: var(--danger-bg); color: var(--danger); }

/* ================= CTA BAND ================= */
.cta-band {
    background: linear-gradient(120deg, var(--navy-800), var(--navy-900));
    border-radius: var(--radius-lg);
    padding: 42px 26px;
    text-align: center;
    color: #fff;
    margin: 0 20px;
    box-shadow: var(--shadow-lift);
}
.cta-band h2 { color: #fff; margin-bottom: 10px; }
.cta-band p { color: rgba(255,255,255,.75); margin-bottom: 22px; }
.cta-band .btn-actions { display: flex; flex-wrap: wrap; gap: 12px; justify-content: center; }

/* ================= BREADCRUMB ================= */
.breadcrumb { font-size: 13px; color: var(--text-muted); margin-bottom: 18px; }
.breadcrumb a { color: var(--navy-700); font-weight: 500; }

/* ================= PRODUCT DETAIL ================= */
.detail-grid { display: grid; gap: 30px; }
.detail-image {
    background: linear-gradient(135deg, var(--navy-100), #fff);
    border-radius: var(--radius-lg);
    height: 260px;
    display: flex; align-items: center; justify-content: center;
    font-size: 90px;
}
.detail-info h1 { font-size: 1.5rem; }
.detail-price { font-family: var(--font-display); font-weight: 800; font-size: 26px; color: var(--navy-800); margin: 10px 0 16px; }
.spec-list { margin: 18px 0; }
.spec-list li { display: flex; justify-content: space-between; padding: 12px 0; border-bottom: 1px solid var(--border); font-size: 14px; }
.spec-list li span:first-child { color: var(--text-muted); }
.spec-list li span:last-child { font-weight: 600; color: var(--navy-900); }
.toko-box { background: var(--bg); border-radius: var(--radius-sm); padding: 16px; display: flex; align-items: center; gap: 12px; margin: 18px 0; }
.toko-avatar { width: 42px; height: 42px; border-radius: 10px; background: var(--navy-700); color: #fff; display: flex; align-items: center; justify-content: center; font-weight: 700; flex-shrink: 0; }

/* ================= FOOTER ================= */
.site-footer { background: var(--navy-900); color: rgba(255,255,255,.7); padding: 40px 0 0; margin-top: 40px; }
.footer-inner { display: flex; flex-direction: column; gap: 24px; padding-bottom: 28px; border-bottom: 1px solid rgba(255,255,255,.1); }
.footer-brand { display: flex; align-items: center; gap: 12px; }
.footer-brand strong { color: #fff; font-family: var(--font-display); font-size: 16px; }
.footer-brand p { margin: 2px 0 0; font-size: 13px; color: rgba(255,255,255,.55); }
.footer-links { display: flex; flex-direction: column; gap: 10px; font-size: 14px; }
.footer-links a:hover { color: #fff; }
.footer-bottom { text-align: center; font-size: 12.5px; padding: 18px 0; color: rgba(255,255,255,.45); }

/* ================= WA FLOAT ================= */
.wa-float {
    position: fixed; bottom: 22px; right: 18px; z-index: 95;
    width: 56px; height: 56px; border-radius: 50%;
    background: var(--wa-green); color: #fff;
    display: flex; align-items: center; justify-content: center;
    box-shadow: 0 10px 24px rgba(37,211,102,.4);
}

/* ================= ADMIN ================= */
.admin-body { background: var(--bg); }
.admin-shell { display: flex; min-height: 100vh; }
.admin-sidebar {
    width: 230px; background: var(--navy-900); color: #fff; flex-shrink: 0;
    padding: 22px 16px; position: fixed; top: 0; bottom: 0; left: 0; z-index: 50;
    transform: translateX(-100%); transition: transform .25s ease;
}
.admin-sidebar.open { transform: translateX(0); }
.admin-sidebar a { display: block; padding: 12px 14px; border-radius: 10px; color: rgba(255,255,255,.75); font-size: 14px; margin-bottom: 4px; }
.admin-sidebar a.active, .admin-sidebar a:hover { background: rgba(255,255,255,.08); color: #fff; }
.admin-main { flex: 1; padding: 20px 16px 60px; width: 100%; }
.admin-topbar { display: flex; align-items: center; justify-content: space-between; margin-bottom: 22px; }
.admin-menu-toggle { background: var(--navy-900); color: #fff; border: none; width: 42px; height: 42px; border-radius: 10px; }
.stat-card { background: var(--surface); border-radius: var(--radius); padding: 20px; box-shadow: var(--shadow); border: 1px solid var(--border); }
.stat-card .num { font-family: var(--font-display); font-size: 28px; font-weight: 800; color: var(--navy-900); }
.stat-card .lbl { color: var(--text-muted); font-size: 13px; }
.admin-table-wrap { background: var(--surface); border-radius: var(--radius); box-shadow: var(--shadow); overflow-x: auto; border: 1px solid var(--border); }
table.admin-table { width: 100%; border-collapse: collapse; min-width: 640px; }
.admin-table th, .admin-table td { padding: 14px 16px; text-align: left; border-bottom: 1px solid var(--border); font-size: 13.5px; }
.admin-table th { background: var(--bg); font-weight: 700; color: var(--navy-900); }
.login-shell { min-height: 100vh; display: flex; align-items: center; justify-content: center; background: var(--navy-900); padding: 20px; }
.login-card { background: #fff; border-radius: var(--radius-lg); padding: 36px 28px; max-width: 380px; width: 100%; box-shadow: var(--shadow-lift); }

/* ================= RESPONSIVE ================= */
@media (min-width: 860px) {
    .nav-toggle { display: none; }
    .main-nav {
        position: static; transform: none; flex-direction: row; align-items: center;
        padding: 0; background: transparent; overflow: visible; gap: 6px;
    }
    .main-nav a { padding: 10px 14px; font-size: 14.5px; }
    .main-nav a.btn-nav { margin-top: 0; margin-left: 8px; }

    .hero-grid { grid-template-columns: 1.1fr .9fr; }
    .detail-grid { grid-template-columns: 380px 1fr; }
    .form-card.wide { max-width: 780px; }

    .admin-sidebar { transform: translateX(0); }
    .admin-main { margin-left: 230px; width: calc(100% - 230px); }
    .admin-menu-toggle { display: none; }
}

@media (min-width: 1024px) {
    .grid-3 { grid-template-columns: repeat(3, 1fr); }
    .grid-4 { grid-template-columns: repeat(4, 1fr); }
}
