:root {
    --brand: #4F46E5;
    --brand-dark: #4338CA;
    --accent: #06B6D4;
    --ink: #0F172A;
    --muted: #64748B;
    --line: #E2E8F0;
    --bg: #FFFFFF;
    --bg-soft: #F8FAFC;
    --bg-tint: #EEF2FF;
    --radius: 16px;
    --shadow: 0 10px 30px rgba(15, 23, 42, .08);
    --shadow-sm: 0 4px 14px rgba(15, 23, 42, .06);
    --maxw: 1120px;
    --font: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", Roboto, Helvetica, Arial, sans-serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
    margin: 0;
    font-family: var(--font);
    color: var(--ink);
    background: var(--bg);
    line-height: 1.65;
    -webkit-font-smoothing: antialiased;
}
a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
h1, h2, h3, h4 { line-height: 1.25; margin: 0 0 .5em; letter-spacing: -.01em; }
p { margin: 0 0 1em; }

.container { width: 100%; max-width: var(--maxw); margin: 0 auto; padding: 0 20px; }

/* ---------- Buttons ---------- */
.btn {
    display: inline-flex; align-items: center; justify-content: center; gap: 8px;
    padding: 11px 22px; border-radius: 999px; font-weight: 600; font-size: 15px;
    border: 1px solid transparent; cursor: pointer; transition: all .2s ease;
}
.btn-primary { background: var(--brand); color: #fff; box-shadow: var(--shadow-sm); }
.btn-primary:hover { background: var(--brand-dark); transform: translateY(-1px); }
.btn-ghost { background: #fff; color: var(--brand); border-color: var(--line); }
.btn-ghost:hover { border-color: var(--brand); }
.btn-light { background: rgba(255,255,255,.16); color: #fff; border-color: rgba(255,255,255,.4); }
.btn-light:hover { background: rgba(255,255,255,.28); }

/* ---------- Header / Nav ---------- */
.site-header {
    position: sticky; top: 0; z-index: 50;
    background: rgba(255,255,255,.85); backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--line);
}
.nav { display: flex; align-items: center; justify-content: space-between; height: 68px; }
.brand { display: flex; align-items: center; gap: 10px; }
.brand-mark {
    width: 38px; height: 38px; border-radius: 11px;
    background: linear-gradient(135deg, var(--brand), var(--accent));
    color: #fff; font-weight: 800; font-size: 20px;
    display: grid; place-items: center; box-shadow: var(--shadow-sm);
}
.brand-text { display: flex; flex-direction: column; line-height: 1.1; }
.brand-text strong { font-size: 17px; }
.brand-text small { color: var(--muted); font-size: 11px; letter-spacing: .04em; }
.brand-logo { width: 40px; height: 40px; border-radius: 50%; object-fit: cover; box-shadow: var(--shadow-sm); flex: 0 0 auto; background: #fff; }

.nav-links { display: flex; align-items: center; gap: 26px; }
.nav-links a { color: var(--muted); font-weight: 500; font-size: 15px; }
.nav-links a:hover, .nav-links a.active { color: var(--brand); }
.nav-cta { margin-left: 6px; }

.nav-toggle { display: none; flex-direction: column; gap: 5px; background: none; border: 0; cursor: pointer; padding: 8px; }
.nav-toggle span { width: 22px; height: 2px; background: var(--ink); border-radius: 2px; transition: .2s; }

/* ---------- Hero ---------- */
.hero {
    background: radial-gradient(1200px 500px at 80% -10%, #E0E7FF 0%, transparent 60%),
                radial-gradient(900px 400px at 0% 10%, #CFFAFE 0%, transparent 55%),
                var(--bg-soft);
    padding: 84px 0 72px;
}
.hero-grid { display: grid; grid-template-columns: 1.1fr .9fr; gap: 48px; align-items: center; }
.hero h1 { font-size: clamp(32px, 4.4vw, 52px); font-weight: 800; }
.hero h1 .hl { background: linear-gradient(135deg, var(--brand), var(--accent)); -webkit-background-clip: text; background-clip: text; color: transparent; }
.hero p.lead { font-size: 18px; color: var(--muted); max-width: 520px; }
.hero-actions { display: flex; gap: 14px; flex-wrap: wrap; margin-top: 8px; }
.hero-stats { display: flex; gap: 28px; margin-top: 28px; }
.hero-stats .num { font-size: 26px; font-weight: 800; color: var(--brand); }
.hero-stats .lbl { font-size: 13px; color: var(--muted); }

.hero-card {
    background: #fff; border: 1px solid var(--line); border-radius: 22px;
    padding: 26px; box-shadow: var(--shadow); position: relative; overflow: hidden;
}
.hero-card .phone {
    background: linear-gradient(160deg, #fff, var(--bg-soft));
    border: 1px solid var(--line); border-radius: 18px; padding: 18px; min-height: 320px;
}
.app-row { display: flex; align-items: center; gap: 12px; padding: 12px; border-radius: 14px; background: var(--bg-soft); margin-bottom: 12px; }
.app-row .ic { width: 44px; height: 44px; border-radius: 12px; display: grid; place-items: center; font-size: 22px; color: #fff; }
.app-row .ic-img { width: 44px; height: 44px; border-radius: 12px; object-fit: cover; display: block; background: #fff; flex: 0 0 auto; }
.app-row .t { font-weight: 700; }
.app-row .s { font-size: 12px; color: var(--muted); }

/* ---------- Sections ---------- */
section.block { padding: 72px 0; }
.section-head { text-align: center; max-width: 680px; margin: 0 auto 44px; }
.section-head .eyebrow { color: var(--brand); font-weight: 700; letter-spacing: .08em; text-transform: uppercase; font-size: 13px; }
.section-head h2 { font-size: clamp(26px, 3.4vw, 38px); font-weight: 800; }
.section-head p { color: var(--muted); font-size: 17px; }

/* ---------- Product cards ---------- */
.product-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.pcard {
    background: #fff; border: 1px solid var(--line); border-radius: var(--radius);
    padding: 26px; box-shadow: var(--shadow-sm); transition: all .22s ease; display: flex; flex-direction: column;
}
.pcard:hover { transform: translateY(-4px); box-shadow: var(--shadow); border-color: transparent; }
.pcard .pic { width: 56px; height: 56px; border-radius: 15px; display: grid; place-items: center; font-size: 28px; color: #fff; margin-bottom: 16px; overflow: hidden; }
.pcard .pic img { width: 100%; height: 100%; object-fit: cover; display: block; }
.pcard h3 { font-size: 21px; }
.pcard .cat { font-size: 12px; color: var(--muted); font-weight: 600; letter-spacing: .03em; }
.pcard p.desc { color: var(--muted); font-size: 15px; flex: 1; }
.pcard .more { margin-top: 14px; color: var(--brand); font-weight: 600; font-size: 14px; }

/* ---------- Feature list (product detail) ---------- */
.feat-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.feat {
    background: #fff; border: 1px solid var(--line); border-radius: 14px; padding: 22px; box-shadow: var(--shadow-sm);
}
.feat .fi { font-size: 22px; }
.feat h4 { margin: 10px 0 6px; font-size: 17px; }
.feat p { color: var(--muted); font-size: 14px; margin: 0; }

/* ---------- Detail hero ---------- */
.detail-hero { padding: 64px 0 40px; background: var(--bg-soft); }
.detail-hero .wrap { display: flex; align-items: center; gap: 22px; }
.detail-hero .bigic { width: 92px; height: 92px; border-radius: 24px; display: grid; place-items: center; font-size: 46px; color: #fff; box-shadow: var(--shadow); }
.detail-hero h1 { font-size: clamp(28px, 3.6vw, 40px); }
.detail-hero .tag { color: var(--muted); font-size: 16px; }
.tags { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 14px; }
.tagpill { font-size: 12px; padding: 5px 12px; border-radius: 999px; background: #fff; border: 1px solid var(--line); color: var(--muted); }

/* ---------- Generic cards / about ---------- */
.split { display: grid; grid-template-columns: 1fr 1fr; gap: 40px; align-items: center; }
.value-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; }
.value { background: #fff; border: 1px solid var(--line); border-radius: 14px; padding: 24px; box-shadow: var(--shadow-sm); }
.value .vi { font-size: 26px; }
.value h4 { margin: 12px 0 6px; }

/* ---------- Contact ---------- */
.contact-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 40px; }
.info-card { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 28px; box-shadow: var(--shadow-sm); }
.info-card .row { display: flex; gap: 14px; padding: 14px 0; border-bottom: 1px dashed var(--line); }
.info-card .row:last-child { border-bottom: 0; }
.info-card .ric { width: 40px; height: 40px; border-radius: 11px; background: var(--bg-tint); color: var(--brand); display: grid; place-items: center; font-size: 18px; }
.info-card .rl { font-weight: 600; }
.info-card .rv { color: var(--muted); font-size: 14px; }

form .field { margin-bottom: 16px; }
form label { display: block; font-size: 14px; font-weight: 600; margin-bottom: 6px; }
form input, form textarea, form select {
    width: 100%; padding: 12px 14px; border: 1px solid var(--line); border-radius: 11px;
    font-size: 15px; font-family: inherit; color: var(--ink); background: #fff; transition: border .2s;
}
form input:focus, form textarea:focus, form select:focus { outline: none; border-color: var(--brand); box-shadow: 0 0 0 3px var(--bg-tint); }
form textarea { min-height: 130px; resize: vertical; }
.form-note { font-size: 13px; color: var(--muted); }
.alert { padding: 12px 16px; border-radius: 11px; margin-bottom: 16px; font-size: 14px; }
.alert-ok { background: #ECFDF5; color: #047857; border: 1px solid #A7F3D0; }
.alert-err { background: #FEF2F2; color: #B91C1C; border: 1px solid #FECACA; }
.hp { position: absolute; left: -9999px; top: -9999px; }

/* ---------- Admin ---------- */
.admin-table { width: 100%; border-collapse: collapse; background: #fff; border: 1px solid var(--line); border-radius: 12px; overflow: hidden; }
.admin-table th, .admin-table td { text-align: left; padding: 12px 14px; border-bottom: 1px solid var(--line); font-size: 14px; vertical-align: top; }
.admin-table th { background: var(--bg-soft); color: var(--muted); }
.admin-table tr:last-child td { border-bottom: 0; }

/* ---------- Footer ---------- */
.site-footer { background: #0F172A; color: #CBD5E1; margin-top: 40px; padding: 56px 0 24px; }
.footer-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1fr; gap: 32px; }
.site-footer h4 { color: #fff; font-size: 15px; margin-bottom: 14px; }
.site-footer ul { list-style: none; padding: 0; margin: 0; }
.site-footer li { margin-bottom: 8px; }
.site-footer a { color: #CBD5E1; font-size: 14px; }
.site-footer a:hover { color: #fff; }
.brand-footer .brand-text strong { color: #fff; }
.brand-footer .brand-text small { color: #94A3B8; }
.footer-slogan { color: #94A3B8; margin: 14px 0 6px; }
.footer-addr { color: #94A3B8; font-size: 14px; }
.footer-bottom { display: flex; justify-content: space-between; align-items: center; margin-top: 36px; padding-top: 20px; border-top: 1px solid #1E293B; color: #64748B; font-size: 13px; }

/* ---------- Product detail extras ---------- */
.detail-hero { padding: 40px 0 8px; }
.detail-hero .wrap { display: flex; gap: 22px; align-items: center; flex-wrap: wrap; }
.bigic { width: 92px; height: 92px; border-radius: 24px; color: #fff; font-size: 46px; display: grid; place-items: center; box-shadow: var(--shadow); flex: 0 0 auto; }
.app-logo { width: 96px; height: 96px; border-radius: 24px; box-shadow: var(--shadow); flex: 0 0 auto; object-fit: cover; }
.detail-hero h1 { font-size: clamp(28px, 4vw, 42px); font-weight: 800; margin: 0; }
.detail-hero .tag { color: var(--muted); font-size: 17px; margin: 6px 0 14px; }
.tags { display: flex; gap: 8px; flex-wrap: wrap; }
.tagpill { display: inline-block; padding: 6px 12px; border-radius: 999px; background: var(--bg-tint); color: var(--brand); font-size: 13px; font-weight: 600; }
.tagpill.ghost { background: #fff; border: 1px solid var(--line); color: var(--muted); }

.gallery { display: grid; grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); gap: 18px; margin-top: 8px; }
.gitem { margin: 0; background: #fff; border: 1px solid var(--line); border-radius: 16px; padding: 18px; text-align: center; box-shadow: var(--shadow-sm); }
.gitem img { width: 64px; height: 64px; object-fit: contain; display: block; margin: 0 auto; }
.gitem figcaption { margin-top: 10px; font-size: 14px; color: var(--muted); font-weight: 600; }

.dl-grid { display: flex; flex-wrap: wrap; gap: 12px; justify-content: center; margin-top: 18px; }
.dl-btn { display: inline-block; padding: 12px 22px; border-radius: 12px; background: var(--brand); color: #fff; font-weight: 600; text-decoration: none; box-shadow: var(--shadow-sm); transition: transform .15s; }
.dl-btn:hover { transform: translateY(-2px); }
.dl-btn.ghost { background: #fff; color: var(--brand); border: 1px solid var(--brand); }
.muted-note { color: var(--muted); font-size: 13px; margin-top: 16px; }
code { background: var(--bg-tint); padding: 2px 6px; border-radius: 6px; font-size: 13px; color: var(--brand); }

/* ---------- Responsive ---------- */
@media (max-width: 900px) {
    .hero-grid, .split, .contact-grid { grid-template-columns: 1fr; }
    .product-grid, .feat-grid, .value-grid { grid-template-columns: 1fr; }
    .footer-grid { grid-template-columns: 1fr 1fr; }
    .nav-toggle { display: flex; }
    .nav-links {
        position: absolute; top: 68px; left: 0; right: 0; background: #fff;
        flex-direction: column; align-items: stretch; gap: 0; padding: 10px 20px 20px;
        border-bottom: 1px solid var(--line); box-shadow: var(--shadow); display: none;
    }
    body.nav-open .nav-links { display: flex; }
    .nav-links a { padding: 12px 0; border-bottom: 1px solid var(--line); }
    .nav-cta { margin: 12px 0 0; }
    .hero { padding: 56px 0 48px; }
}
@media (max-width: 520px) {
    .footer-grid { grid-template-columns: 1fr; }
    .hero-stats { gap: 18px; flex-wrap: wrap; }
}
