/* ZNB发卡站 — 前台样式 (按原站 luna 模板视觉适配, 无框架依赖) */
:root {
    --grad: linear-gradient(135deg, #3C8CE7 10%, #00EAFF 100%);
    --blue: #3C8CE7;
    --ink: #545454;
    --shadow: 0 7px 29px rgba(18, 52, 91, .11);
}
* { box-sizing: border-box; margin: 0; padding: 0; }
html { -webkit-text-size-adjust: 100%; }
body {
    font-family: "Helvetica Neue", Helvetica, "PingFang SC", Tahoma, Arial, sans-serif;
    color: var(--ink);
    font-size: 14px;
    background: #eef3f8 url(/assets/img/background.png) center top / cover fixed no-repeat;
    min-height: 100vh;
}
a { color: var(--blue); text-decoration: none; }
img { max-width: 100%; }

/* 页头 */
.header { background: rgba(255,255,255,.92); box-shadow: var(--shadow); }
.header-in {
    max-width: 1000px; margin: 0 auto; padding: 10px 16px;
    display: flex; align-items: center; justify-content: space-between; gap: 12px;
}
.logo-link { display: flex; align-items: center; gap: 10px; color: var(--ink); }
.logo { height: 44px; width: auto; border-radius: 6px; }
.logo-text { font-size: 13px; }
.btn-search {
    background: var(--grad); color: #fff; border-radius: 999px;
    padding: 8px 22px; font-size: 14px; white-space: nowrap;
    box-shadow: 0 4px 14px rgba(60, 140, 231, .35);
}

/* 布局与卡片 */
.container { max-width: 1000px; margin: 18px auto 30px; padding: 0 12px; }
.card {
    background: #fff; border-radius: 6px; box-shadow: var(--shadow);
    padding: 18px; margin-bottom: 16px;
}
.card-title { font-size: 16px; font-weight: 700; color: #333; margin-bottom: 12px; }
.notice-body p { margin-bottom: 8px; line-height: 1.7; }

/* 分类 */
.cate-box {
    background: #f1f1f1; border-radius: 10px; padding: 10px;
    display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px;
}
.cate-item {
    border: 0; cursor: pointer; background: #fff; border-radius: 8px;
    min-height: 67px; padding: 10px 14px; text-align: left;
    display: flex; flex-direction: column; justify-content: center; gap: 4px;
    font-family: inherit;
}
.cate-name { font-size: 15px; font-weight: 700; color: #333; }
.cate-count { font-size: 12px; color: #999; }
.cate-item.active {
    background: var(--grad); box-shadow: 0 6px 18px rgba(60, 140, 231, .35);
}
.cate-item.active .cate-name, .cate-item.active .cate-count { color: #fff; }

/* 商品列表 */
.goods-list { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; }
.goods-item {
    display: flex; gap: 12px; padding: 10px; border: 1px solid #eef1f5;
    border-radius: 8px; color: var(--ink); align-items: center;
}
.goods-item:hover { border-color: #bcd8f7; }
.goods-item.sold-out { cursor: not-allowed; opacity: .65; }
.goods-pic { width: 80px; height: 80px; object-fit: cover; border-radius: 8px; flex: none; }
.goods-info { min-width: 0; }
.goods-name { font-size: 12px; color: #545454; line-height: 1.5; }
.goods-price { color: var(--blue); font-weight: 700; font-size: 16px; margin: 4px 0; }
.goods-stock { display: flex; align-items: center; gap: 8px; }
.stock-bar {
    width: 53px; height: 6px; background: #e8f5ee; border-radius: 3px; overflow: hidden;
}
.stock-bar i {
    display: block; height: 100%;
    background: linear-gradient(90deg, #0db26a, #5fd68f);
}
.stock-text { color: #0db26a; font-size: 12px; }

/* 购买页 */
.buy-pic { width: 100%; max-height: 380px; object-fit: cover; border-radius: 8px; }
.buy-name { font-size: 18px; font-weight: 700; color: #545454; margin: 14px 0 8px; }
.buy-tags { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 10px; }
.tag { font-size: 12px; padding: 3px 10px; border-radius: 999px; color: #fff; }
.tag-green { background: #0db26a; }
.tag-blue { background: var(--blue); }
.tag-gray { background: #9aa5b1; }
.tag-pink { background: #f06595; }
.buy-price .price-now { color: #e4393c; font-size: 28px; font-weight: 700; }
.buy-price .price-retail { color: #999; margin-left: 8px; }
.wholesale { margin: 8px 0; display: flex; gap: 8px; flex-wrap: wrap; }
.form-row { margin: 14px 0; display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.form-row label { width: 70px; font-weight: 700; color: #333; }
.form-row input[type="email"], .form-row input[type="text"] {
    flex: 1; min-width: 200px; padding: 10px 12px; border: 1px solid #dcdfe6;
    border-radius: 6px; font-size: 14px; font-family: inherit;
}
.qty-box { display: flex; align-items: stretch; }
.qty-box button {
    width: 38px; border: 1px solid #dcdfe6; background: #f7f9fc; font-size: 18px; cursor: pointer;
}
.qty-box input {
    width: 64px; text-align: center; border: 1px solid #dcdfe6; border-left: 0; border-right: 0;
    font-size: 14px; padding: 8px 0;
}
.qty-tip { color: #e4393c; font-size: 13px; }
.total-row { font-size: 15px; }
.total-price { color: #e4393c; font-size: 20px; font-weight: 700; }
.btn-grad {
    background: var(--grad); color: #fff; border: 0; cursor: pointer;
    border-radius: 999px; padding: 10px 26px; font-size: 14px; font-family: inherit;
    box-shadow: 0 4px 14px rgba(60, 140, 231, .35); display: inline-block;
}
.btn-grad:disabled { background: #c0c4cc; box-shadow: none; cursor: not-allowed; }
.btn-small { padding: 6px 16px; font-size: 13px; }
.btn-buy { width: 100%; padding: 13px; font-size: 16px; }
.btn-plain {
    background: none; border: 0; color: var(--blue); cursor: pointer;
    font-size: 14px; font-family: inherit; padding: 6px 4px;
}
.buy-prompt {
    margin-top: 14px; background: #fff8e6; border: 1px solid #f3d27a;
    border-radius: 6px; padding: 12px; line-height: 1.7;
}
.intro { line-height: 1.8; word-break: break-word; }
.intro p { margin-bottom: 10px; }
.intro img { height: auto; }

/* 错误盒 (未上架/下单错误) */
.error-box {
    max-width: 480px; margin: 15vh auto; background: #fff; border-radius: 8px;
    box-shadow: var(--shadow); padding: 36px 28px; text-align: center;
}
.error-box h1 { font-size: 22px; color: #333; margin-bottom: 12px; }
.error-box p { color: #888; margin-bottom: 22px; }

/* 订单查询 */
.search-tip { color: #999; margin-bottom: 12px; }
.search-tabs { display: flex; gap: 8px; margin-bottom: 16px; flex-wrap: wrap; }
.search-tabs a {
    padding: 8px 18px; border-radius: 999px; background: #f1f1f1; color: #545454;
}
.search-tabs a.active { background: var(--grad); color: #fff; }
.search-form { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.search-form input {
    flex: 1; min-width: 200px; padding: 10px 12px; border: 1px solid #dcdfe6;
    border-radius: 6px; font-size: 14px; font-family: inherit;
}
.not-found { color: #999; }
.order-info {
    border: 1px solid #eef1f5; border-radius: 8px; padding: 14px; margin-bottom: 12px;
}
.order-info p { margin: 5px 0; }
.order-info p span {
    display: inline-block; width: 76px; color: #999;
}
.cards-box {
    width: 100%; border: 1px solid #dcdfe6; border-radius: 6px; padding: 10px;
    font-family: ui-monospace, Menlo, Consolas, monospace; font-size: 13px; resize: vertical;
}

/* 支付页 (aloprivacy 式两步版式, 本站色系) */
.pay-head { margin: 6px 0 14px; }
.pay-kicker {
    color: var(--blue); font-size: 12px; letter-spacing: .12em;
    text-transform: uppercase; margin-bottom: 6px; font-weight: 700;
}
.pay-title { font-size: 26px; color: #222; margin-bottom: 6px; }
.pay-sub { color: #777; }
.pay-layout { display: grid; grid-template-columns: 1fr 300px; gap: 16px; align-items: start; }
.pay-step-label {
    color: var(--blue); font-size: 12px; letter-spacing: .12em;
    text-transform: uppercase; font-weight: 700; margin-bottom: 12px;
}
.pay-summary p { margin: 6px 0; }
.pay-alert { border-radius: 6px; padding: 12px 14px; margin-bottom: 14px; line-height: 1.6; }
.pay-alert-error { background: #fdecec; border: 1px solid #f5b5b5; color: #a33; }
.pay-alert-warn { background: #fdf0f3; border: 1px solid #f3b8c6; color: #8c2f45; margin-top: 14px; }
.pay-alert-ok { background: #e9f9f0; border: 1px solid #a9e5c3; color: #146c43; }
.price-bar {
    background: #f0f7ff; border: 1px solid #d6e8fb; color: #3369a8;
    border-radius: 6px; padding: 9px 12px; font-size: 13px; margin-bottom: 12px;
}
.price-error { color: #c0392b; }
.coin-list { display: flex; flex-direction: column; gap: 10px; }
.coin-row {
    display: flex; justify-content: space-between; align-items: center; gap: 10px;
    border: 1px solid #e3e9f2; border-radius: 8px; padding: 12px 14px; margin: 0;
}
.coin-row:hover { border-color: var(--blue); }
.coin-disabled { opacity: .65; }
.coin-left { display: flex; align-items: center; gap: 12px; min-width: 0; }
.coin-badge {
    background: var(--grad); color: #fff; font-weight: 700; font-size: 12px;
    border-radius: 6px; padding: 5px 8px; min-width: 44px; text-align: center;
}
.coin-name { font-weight: 700; color: #333; display: flex; flex-direction: column; }
.coin-name small { color: var(--blue); font-weight: 400; margin-top: 2px; }
.coin-right { display: flex; align-items: center; gap: 12px; }
.coin-arrival { color: #999; font-size: 12px; white-space: nowrap; }
.coin-noaddr { color: #c0392b; font-size: 12px; white-space: nowrap; }
.pay-note { color: #999; font-size: 13px; line-height: 1.7; margin-top: 12px; }
.pay-status {
    display: flex; align-items: center; gap: 10px; font-weight: 700; color: #333;
    margin-bottom: 16px;
}
.dot-wait {
    width: 11px; height: 11px; border-radius: 50%; background: #f5b301;
    box-shadow: 0 0 0 4px rgba(245, 179, 1, .18); flex: none;
}
.pay-countdown { margin-left: auto; font-size: 22px; color: #e4393c; font-variant-numeric: tabular-nums; }
.mono-box {
    display: flex; align-items: center; gap: 10px; background: #f7fafd;
    border: 1px solid #dbe7f5; border-radius: 8px; padding: 14px; margin-bottom: 10px;
    font-family: ui-monospace, Menlo, Consolas, monospace; font-size: 16px;
    word-break: break-all;
}
.mono-box.grow { flex: 1; }
.btn-copy {
    background: #222; color: #fff; border: 0; border-radius: 6px; cursor: pointer;
    padding: 7px 14px; font-size: 12px; letter-spacing: .08em; flex: none;
    font-family: inherit;
}
.pay-address-row { display: flex; gap: 12px; align-items: stretch; }
.qr-placeholder {
    width: 132px; flex: none; border: 2px dashed #b9cfe8; border-radius: 8px;
    color: #7d9cbd; display: flex; flex-direction: column; align-items: center;
    justify-content: center; text-align: center; font-size: 13px; padding: 10px;
    background: #fbfdff;
}
.qr-placeholder small { font-size: 11px; margin-top: 6px; line-height: 1.5; }
.qr-img { width: 132px; height: 132px; flex: none; border: 2px solid #eef1f5; border-radius: 8px; background: #fff; }
.inline-form { display: inline; }
.pay-side-list { list-style: none; }
.pay-side-list li {
    padding: 8px 0 8px 20px; position: relative; color: #666; line-height: 1.6;
    border-bottom: 1px dashed #eef1f5;
}
.pay-side-list li::before {
    content: ""; position: absolute; left: 2px; top: 15px; width: 7px; height: 7px;
    border-radius: 50%; background: var(--grad);
}
.flash { border-radius: 6px; padding: 11px 14px; margin-bottom: 12px; }
.flash-success { background: #e9f9f0; border: 1px solid #a9e5c3; color: #146c43; }
.flash-error { background: #fdecec; border: 1px solid #f5b5b5; color: #a33; }

/* 页脚与浮钮 */
.footer { text-align: center; color: #8a97a5; padding: 10px 12px 34px; font-size: 13px; }
.footer p { margin: 4px 0; }
.float-search {
    display: none; position: fixed; right: 16px; bottom: 22px; z-index: 50;
    width: 54px; height: 54px; border-radius: 50%; background: var(--grad);
    color: #fff; align-items: center; justify-content: center; font-size: 13px;
    box-shadow: 0 8px 22px rgba(60, 140, 231, .45);
}

/* 移动端公告弹窗 */
.notice-modal {
    position: fixed; inset: 0; background: rgba(20, 40, 70, .45); z-index: 100;
    display: flex; align-items: center; justify-content: center; padding: 18px;
}
.notice-modal[hidden] { display: none; }
.notice-modal-box {
    background: #fff; border-radius: 10px; padding: 20px; max-width: 520px;
    width: 100%; max-height: 82vh; overflow: auto;
}
.notice-modal-box .btn-grad { width: 100%; margin-top: 14px; }

@media (max-width: 768px) {
    .header { background: var(--grad); }
    .header-in { flex-direction: column; padding: 18px 12px 26px; border-radius: 0 0 18px 18px; }
    .logo-text { color: #fff; }
    .btn-search { background: #fff; color: var(--blue); }
    .goods-list { grid-template-columns: 1fr; }
    .cate-box { grid-template-columns: repeat(2, 1fr); }
    .pay-layout { grid-template-columns: 1fr; }
    .float-search { display: flex; }
    .coin-row { flex-direction: column; align-items: flex-start; }
    .pay-address-row { flex-direction: column; }
    .qr-placeholder { width: 100%; min-height: 110px; }
}
