/* =====================================================
   小白云 IDC · 新版站点样式（ThinkPHP 8）
   设计基调：白底紧凑布局 / 单一蓝色主色 / 真实业务密度
   明确规避：紫色渐变、emoji 装饰、过度圆角阴影、发光效果
   ===================================================== */
:root {
    --blue: #1d4ed8;
    --blue-h: #173fb0;
    --blue-l: #eef3fd;
    --ink: #1a2233;
    --sub: #5b6472;
    --mute: #8b93a1;
    --line: #e4e8ef;
    --bg: #f6f7f9;
    --card: #ffffff;
    --r: 8px;
    --green: #15803d;
    --grey-dot: #b3b9c3;
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body.site {
    font: 14px/1.6 -apple-system, "PingFang SC", "Microsoft YaHei", "Segoe UI", sans-serif;
    color: var(--ink); background: var(--bg);
    padding-bottom: 64px; /* 移动端 tab 占位 */
}
a { color: var(--blue); text-decoration: none; }
a:hover { color: var(--blue-h); }
.muted { color: var(--mute); }
.small { font-size: 12.5px; }

/* ---------- 顶栏 ---------- */
.hd { background: #fff; border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 60; }
.hd-in {
    max-width: 1120px; margin: 0 auto; padding: 0 16px;
    height: 56px; display: flex; align-items: center; gap: 24px;
}
.brand { display: flex; align-items: center; gap: 10px; color: var(--ink); }
.brand-mark {
    width: 32px; height: 32px; border-radius: 7px; background: var(--blue);
    color: #fff; font-weight: 700; font-size: 16px;
    display: inline-flex; align-items: center; justify-content: center;
}
.brand-txt { font-weight: 700; font-size: 16px; line-height: 1.15; display: flex; flex-direction: column; }
.brand-txt small { font-weight: 400; font-size: 11px; color: var(--mute); }
.hd-nav { display: flex; gap: 4px; flex: 1; }
.hd-nav a { color: var(--sub); padding: 6px 12px; border-radius: 6px; font-weight: 500; }
.hd-nav a:hover { background: var(--blue-l); color: var(--blue); }
.hd-nav a.on { background: var(--blue-l); color: var(--blue); font-weight: 600; }
.hd-act { display: flex; align-items: center; gap: 12px; }
.lnk { color: var(--sub); }
.hd-user { display: inline-flex; align-items: center; gap: 8px; color: var(--ink); font-weight: 500; }
.hd-bal {
    background: var(--blue-l); color: var(--blue); font-size: 12px; font-weight: 600;
    padding: 2px 8px; border-radius: 4px;
}
.uc-avatar {
    width: 26px; height: 26px; border-radius: 50%; background: var(--blue-l); color: var(--blue);
    font-style: normal; font-weight: 700; display: inline-flex; align-items: center; justify-content: center;
    font-size: 13px;
}

/* ---------- 按钮 ---------- */
.btn-primary {
    display: inline-flex; align-items: center; justify-content: center;
    background: var(--blue); color: #fff; font-weight: 600; font-size: 14px;
    padding: 9px 20px; border-radius: 6px; border: 1px solid var(--blue);
    cursor: pointer; transition: background .15s;
}
.btn-primary:hover { background: var(--blue-h); color: #fff; }
.btn-primary.sm { padding: 5px 12px; font-size: 13px; }
.btn-primary.full { width: 100%; margin-top: 6px; }
.btn-ghost {
    display: inline-flex; align-items: center; padding: 9px 20px;
    border: 1px solid var(--line); border-radius: 6px; color: var(--ink);
    background: #fff; font-weight: 500;
}
.btn-ghost:hover { border-color: var(--blue); color: var(--blue); }

/* ---------- 布局 ---------- */
.main { max-width: 1120px; margin: 0 auto; padding: 24px 16px; }
.main.with-side { display: grid; grid-template-columns: 220px minmax(0, 1fr); gap: 20px; align-items: start; }
.main.narrow { max-width: 860px; }
.main.center-col { max-width: 420px; margin: 48px auto; }

/* ---------- Hero（限时特惠/热销榜） ---------- */
.hero {
    display: grid; grid-template-columns: minmax(0, 1fr) 460px; gap: 28px;
    background: #fff; border: 1px solid var(--line); border-radius: var(--r);
    padding: 30px; margin-bottom: 22px;
}
.hero-copy h1 { font-size: 26px; line-height: 1.3; letter-spacing: .5px; }
.hero-copy p { color: var(--sub); margin: 10px 0 20px; }
.hero-copy { display: flex; flex-direction: column; height: 100%; }
.hero-act { display: flex; gap: 12px; margin-top: 2px; }
.hero-trust {
    list-style: none; margin-top: auto; padding-top: 16px;
    border-top: 1px dashed var(--line);
    display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px 12px;
}
.hero-trust li { font-size: 12.5px; color: var(--sub); display: flex; align-items: center; gap: 6px; }
.tk {
    width: 15px; height: 15px; border-radius: 50%; background: var(--blue);
    flex: none; display: inline-block;
    -webkit-mask: center/contain no-repeat url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='currentColor'%3E%3Cpath d='M9.6 16.8 5 12.2l1.5-1.5 3.1 3.1 8-8 1.5 1.5z'/%3E%3C/svg%3E");
    mask: center/contain no-repeat url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='currentColor'%3E%3Cpath d='M9.6 16.8 5 12.2l1.5-1.5 3.1 3.1 8-8 1.5 1.5z'/%3E%3C/svg%3E");
}
.hero-cards { display: grid; gap: 14px; align-content: start; }
.hero-card {
    position: relative; display: block; background: var(--blue-l);
    border: 1px solid #d7e2f8; border-radius: var(--r); padding: 16px 18px;
    color: var(--ink); transition: border-color .15s;
}
.hero-card:hover { border-color: var(--blue); color: var(--ink); }
.hero-card.sub { background: #fff; }
.tag {
    display: inline-block; font-size: 12px; font-weight: 600; color: var(--sub);
    background: #f0f2f5; border-radius: 4px; padding: 2px 8px; margin-bottom: 8px;
}
.tag-blue { background: var(--blue); color: #fff; }
.hero-card .nm { display: block; font-size: 16px; margin-bottom: 4px; }
.hero-card .desc { font-size: 12.5px; color: var(--sub); margin-bottom: 8px; }
.pr { color: var(--blue); font-size: 15px; font-weight: 600; }
.pr b { font-size: 22px; font-weight: 800; }
.pr small { color: var(--mute); font-weight: 400; font-size: 12.5px; }
.go { display: inline-block; margin-top: 8px; font-size: 13px; color: var(--blue); font-weight: 500; }

/* ---------- 分区与卡片 ---------- */
.sec { margin-bottom: 26px; }
.sec-hd { display: flex; align-items: baseline; justify-content: space-between; margin-bottom: 12px; }
.sec-hd h2 { font-size: 19px; letter-spacing: .3px; }
.more { font-size: 13px; }
.hot-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); gap: 14px; }
/* 单卡宽幅：横向布局填充整行，避免右侧大面积空白 */
.hot-card:only-child {
    display: grid; grid-template-columns: max-content 1fr max-content;
    align-items: center; column-gap: 18px;
}
.hot-card:only-child .nm { margin: 0; }
.hot-card:only-child .pr { justify-self: end; margin-right: 18px; }
.hot-card:only-child .go { justify-self: end; }
.hot-card {
    display: block; background: #fff; border: 1px solid var(--line); border-radius: var(--r);
    padding: 16px 18px; color: var(--ink); transition: border-color .15s, box-shadow .15s;
}
.hot-card:hover { border-color: var(--blue); color: var(--ink); box-shadow: 0 2px 10px rgba(29,78,216,.08); }
.hot-card.best { border-color: var(--blue); }
.hot-card .nm { display: block; font-size: 15.5px; margin: 6px 0; }

/* ---------- 分类宫格 ---------- */
.cat-grid { display: grid; grid-template-columns: repeat(6, 1fr); gap: 10px; }
.cat-cell {
    background: #fff; border: 1px solid var(--line); border-radius: var(--r);
    padding: 12px 14px; color: var(--ink); display: flex; flex-direction: column; gap: 2px;
}
.cat-cell:hover { border-color: var(--blue); color: var(--blue); }
.cat-cell .cnt { font-size: 12px; color: var(--mute); }

/* ---------- 产品表格（真实业务密度） ---------- */
.prod-table { background: #fff; border: 1px solid var(--line); border-radius: var(--r); overflow: hidden; }
.prod-table.wide table { min-width: 640px; }
.prod-table table { width: 100%; border-collapse: collapse; font-size: 13.5px; }
.prod-table th {
    text-align: left; padding: 10px 14px; background: #fafbfc; border-bottom: 1px solid var(--line);
    color: var(--sub); font-weight: 600; font-size: 12.5px; white-space: nowrap;
}
.prod-table td { padding: 12px 14px; border-bottom: 1px solid var(--line); vertical-align: middle; }
.prod-table tr:last-child td { border-bottom: 0; }
.prod-table td b { display: block; font-size: 14px; }
.prod-table td .muted { display: block; font-size: 12px; }
.pr-cell { color: var(--blue); white-space: nowrap; }
.pr-cell b { font-size: 16px; }
.pr-cell small { color: var(--mute); }
.empty { text-align: center; color: var(--mute); padding: 32px 0 !important; }
.dot { display: inline-block; width: 7px; height: 7px; border-radius: 50%; margin-right: 5px; vertical-align: 1px; }
.dot-green { background: var(--green); }
.dot-grey { background: var(--grey-dot); }

/* ---------- 底部统计 ---------- */
.stat-bar {
    display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px;
    background: #fff; border: 1px solid var(--line); border-radius: var(--r); padding: 20px 0;
}
.stat-bar > div { text-align: center; }
.stat-bar b { font-size: 24px; font-weight: 800; color: var(--blue); display: block; }
.stat-bar span { font-size: 12.5px; color: var(--mute); }

/* ---------- 侧栏（列表页） ---------- */
.side { background: #fff; border: 1px solid var(--line); border-radius: var(--r); padding: 12px; position: sticky; top: 70px; }
.side-hd { font-weight: 700; padding: 6px 10px 10px; font-size: 14.5px; }
.side-group { border-top: 1px dashed var(--line); padding: 8px 0; }
.side-item {
    display: flex; justify-content: space-between; align-items: center;
    padding: 7px 10px; border-radius: 6px; color: var(--ink); font-size: 13.5px;
}
.side-item:hover { background: var(--blue-l); color: var(--blue); }
.side-item.sub { padding-left: 26px; color: var(--sub); }
.side-item .cnt { font-size: 12px; color: var(--mute); font-style: normal; }

/* ---------- 产品详情 ---------- */
.crumb { font-size: 13px; color: var(--mute); margin-bottom: 14px; }
.crumb b { color: var(--ink); }
.pd { background: #fff; border: 1px solid var(--line); border-radius: var(--r); padding: 26px; }
.pd-head h1 { font-size: 22px; }
.pd-meta { display: flex; gap: 14px; align-items: center; margin-top: 8px; font-size: 13px; color: var(--sub); }
.pd-price-card {
    display: flex; justify-content: space-between; align-items: center;
    background: var(--blue-l); border: 1px solid #d7e2f8; border-radius: var(--r);
    padding: 16px 20px; margin: 18px 0;
}
.pd-sec { border-top: 1px dashed var(--line); padding: 18px 0 6px; margin-top: 12px; }
.pd-sec h3 { font-size: 15.5px; margin-bottom: 10px; }
.pd-desc, .pd-specs { color: var(--sub); font-size: 13.5px; }
.os-grid { display: flex; flex-wrap: wrap; gap: 8px; }
.os-item {
    border: 1px solid var(--line); border-radius: 6px; padding: 5px 12px;
    font-size: 13px; color: var(--ink); background: #fafbfc;
}
.os-item.win { color: var(--blue); border-color: #d7e2f8; background: var(--blue-l); }
.pd-config li { list-style: none; padding: 6px 0; border-bottom: 1px dashed var(--line); font-size: 13.5px; }
.pd-config em { color: var(--blue); font-style: normal; font-weight: 600; margin-left: 4px; }

/* ---------- 登录/注册 ---------- */
.auth-card { background: #fff; border: 1px solid var(--line); border-radius: var(--r); padding: 28px; }
.auth-card h1 { font-size: 20px; margin-bottom: 4px; }
.auth-card .muted { margin-bottom: 18px; }
.auth-card label { display: block; font-size: 13px; color: var(--sub); margin: 12px 0 5px; }
.auth-card input {
    width: 100%; padding: 10px 12px; border: 1px solid var(--line); border-radius: 6px;
    font-size: 14px; font-family: inherit; outline: none;
}
.auth-card input:focus { border-color: var(--blue); box-shadow: 0 0 0 2px rgba(29,78,216,.1); }
.form-err { color: #b91c1c; font-size: 13px; min-height: 18px; margin-top: 8px; }
.auth-foot { margin-top: 14px; font-size: 13px; color: var(--sub); text-align: center; }

/* ---------- 页脚 ---------- */
.ft { background: #fff; border-top: 1px solid var(--line); margin-top: 30px; padding: 26px 16px 20px; }
.ft-in {
    max-width: 1120px; margin: 0 auto; display: grid;
    grid-template-columns: 2fr 1fr 1fr 1fr; gap: 20px;
}
.ft-col b { display: block; margin-bottom: 8px; font-size: 13.5px; }
.ft-col a { display: block; color: var(--sub); font-size: 13px; padding: 2px 0; }
.ft-base { text-align: center; color: var(--mute); font-size: 12px; margin-top: 18px; }

/* ---------- 移动端底部 Tab ---------- */
.mtab {
    position: fixed; left: 0; right: 0; bottom: 0; z-index: 70;
    display: none; background: #fff; border-top: 1px solid var(--line);
    height: 56px; padding-bottom: env(safe-area-inset-bottom);
}
.mtab a { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; color: var(--mute); font-size: 11px; }
.mtab a.on { color: var(--blue); }
.mtab .mi { width: 20px; height: 20px; background: currentColor; -webkit-mask: center/contain no-repeat; mask: center/contain no-repeat; }
.mtab .mi-home { -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='currentColor'%3E%3Cpath d='M3 10.5 12 3l9 7.5V21h-6v-6H9v6H3z'/%3E%3C/svg%3E"); mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='currentColor'%3E%3Cpath d='M3 10.5 12 3l9 7.5V21h-6v-6H9v6H3z'/%3E%3C/svg%3E"); }
.mtab .mi-server { -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='currentColor'%3E%3Cpath d='M4 4h16v6H4zM4 14h16v6H4z'/%3E%3C/svg%3E"); mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='currentColor'%3E%3Cpath d='M4 4h16v6H4zM4 14h16v6H4z'/%3E%3C/svg%3E"); }
.mtab .mi-user { -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='currentColor'%3E%3Cpath d='M12 12a4.5 4.5 0 1 0-4.5-4.5A4.5 4.5 0 0 0 12 12Zm0 2c-4.5 0-8 2.5-8 6v3h16v-3c0-3.5-3.5-6-8-6Z'/%3E%3C/svg%3E"); mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='currentColor'%3E%3Cpath d='M12 12a4.5 4.5 0 1 0-4.5-4.5A4.5 4.5 0 0 0 12 12Zm0 2c-4.5 0-8 2.5-8 6v3h16v-3c0-3.5-3.5-6-8-6Z'/%3E%3C/svg%3E"); }

/* ---------- 响应式 ---------- */
@media (max-width: 900px) {
    .hero { grid-template-columns: 1fr; padding: 22px; }
    .cat-grid { grid-template-columns: repeat(3, 1fr); }
    .hot-grid { grid-template-columns: 1fr; }
    .main.with-side { grid-template-columns: 1fr; }
    .side { position: static; }
    .ft-in { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 640px) {
    .hd-nav { display: none; }
    .mtab { display: flex; }
    body.site { padding-bottom: 72px; }
    .main { padding: 16px 12px; }
    .cat-grid { grid-template-columns: repeat(2, 1fr); }
    .prod-table { overflow-x: auto; }
    .hero-copy h1 { font-size: 21px; }
    .pd { padding: 18px; }
}
