/* ============================================================
   Quiet 静谧 · 独立商城前台样式 v1.0
   ============================================================ */
:root {
    --q-bg: #F6F5FB;
    --q-surface: #FFFFFF;
    --q-text: #23202F;
    --q-text-2: #8A8798;
    --q-text-3: #B4B1C2;
    --q-line: #EDEBF5;
    --q-primary: #6D5AE6;
    --q-primary-deep: #5B48D6;
    --q-primary-soft: #EFECFD;
    --q-grad: linear-gradient(135deg, #7B68EE 0%, #9C8CF0 55%, #B9A8F8 100%);
    --q-grad-soft: linear-gradient(135deg, #EFECFD 0%, #F7F5FE 100%);
    --q-price: #FF6A5C;
    --q-green: #35C48D;
    --q-orange: #F5A623;
    --q-red: #FF5C5C;
    --q-blue: #4E9CF5;
    --q-radius: 18px;
    --q-radius-s: 12px;
    --q-shadow: 0 10px 30px rgba(109, 90, 230, .08);
    --q-shadow-sm: 0 4px 14px rgba(35, 32, 47, .05);
    --q-shadow-lg: 0 18px 50px rgba(109, 90, 230, .16);
}
* { margin: 0; padding: 0; box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html { -webkit-text-size-adjust: 100%; }
body {
    background: var(--q-bg);
    color: var(--q-text);
    font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "HarmonyOS Sans SC", "Microsoft YaHei", sans-serif;
    font-size: 14px;
    line-height: 1.6;
    padding-bottom: calc(64px + env(safe-area-inset-bottom));
}
a { color: var(--q-primary); text-decoration: none; }
img { max-width: 100%; display: block; }
::selection { background: var(--q-primary-soft); }

/* ---------- 顶栏 ---------- */
.q-topbar {
    position: sticky; top: 0; z-index: 50;
    background: rgba(255, 255, 255, .82);
    backdrop-filter: saturate(160%) blur(14px);
    -webkit-backdrop-filter: saturate(160%) blur(14px);
    border-bottom: 1px solid var(--q-line);
}
.q-topbar__in {
    max-width: 680px; margin: 0 auto; padding: 12px 16px;
    display: flex; align-items: center; gap: 10px;
}
.q-logo {
    width: 34px; height: 34px; border-radius: 11px;
    background: var(--q-grad); color: #fff;
    display: flex; align-items: center; justify-content: center;
    font-size: 16px; font-weight: 800; flex: none;
    box-shadow: 0 6px 16px rgba(109, 90, 230, .35);
}
.q-topbar__name { font-size: 16.5px; font-weight: 800; letter-spacing: .5px; flex: 1; min-width: 0;
    white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.q-topbar__link { font-size: 13px; color: var(--q-primary); font-weight: 600;
    background: var(--q-primary-soft); border-radius: 999px; padding: 6px 14px; flex: none; }

/* ---------- Hero ---------- */
.q-wrap { max-width: 680px; margin: 0 auto; padding: 14px 16px 30px; }
.q-hero {
    position: relative; overflow: hidden;
    background: var(--q-grad); border-radius: 20px;
    color: #fff; padding: 22px 20px; margin-bottom: 16px;
    box-shadow: var(--q-shadow);
}
.q-hero::before, .q-hero::after {
    content: ""; position: absolute; border-radius: 50%;
    background: rgba(255, 255, 255, .14);
}
.q-hero::before { width: 150px; height: 150px; right: -42px; top: -58px; }
.q-hero::after { width: 92px; height: 92px; right: 66px; bottom: -46px; background: rgba(255,255,255,.10); }
.q-hero h1 { font-size: 21px; font-weight: 800; letter-spacing: .5px; margin-bottom: 6px; position: relative; }
.q-hero p { font-size: 12.5px; opacity: .92; position: relative; }
.q-notice {
    position: relative; display: inline-flex; align-items: center; gap: 6px;
    background: rgba(255, 255, 255, .18); border: 1px solid rgba(255, 255, 255, .35);
    border-radius: 999px; padding: 5px 12px; font-size: 12px; margin-top: 12px; max-width: 100%;
}
.q-notice b { flex: none; font-size: 11px; background: rgba(255,255,255,.25); border-radius: 999px; padding: 1px 8px; }
.q-notice span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* ---------- 区块标题 ---------- */
.q-sec { display: flex; align-items: baseline; justify-content: space-between; margin: 18px 2px 10px; }
.q-sec h2 { font-size: 16px; font-weight: 800; }
.q-sec span { font-size: 12px; color: var(--q-text-3); }

/* ---------- 商品网格 ---------- */
.q-goods { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.q-gcard {
    background: var(--q-surface); border-radius: var(--q-radius);
    box-shadow: var(--q-shadow-sm); border: 1px solid var(--q-line);
    overflow: hidden; display: flex; flex-direction: column;
    transition: transform .15s ease, box-shadow .15s ease;
}
.q-gcard:active { transform: scale(.985); }
.q-gcard__cover {
    height: 96px; background: var(--q-grad-soft);
    display: flex; align-items: center; justify-content: center;
    font-size: 34px; color: var(--q-primary);
}
.q-gcard__body { padding: 11px 12px 12px; flex: 1; display: flex; flex-direction: column; gap: 4px; }
.q-gcard__name { font-size: 13.5px; font-weight: 700; line-height: 1.45;
    display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; min-height: 38px; }
.q-gcard__meta { font-size: 11px; color: var(--q-text-3); }
.q-gcard__foot { display: flex; align-items: center; justify-content: space-between; margin-top: 4px; }
.q-price { color: var(--q-price); font-weight: 800; font-size: 15px; }
.q-price i { font-style: normal; font-size: 11px; margin-right: 1px; }
.q-buy {
    width: 30px; height: 30px; border: none; border-radius: 10px; cursor: pointer;
    background: var(--q-grad); color: #fff; font-size: 17px; line-height: 1;
    box-shadow: 0 5px 12px rgba(109, 90, 230, .35);
}
.q-gcard--off { opacity: .55; }
.q-tag-out { font-size: 10.5px; color: var(--q-text-3); background: #F3F2F8; border-radius: 999px; padding: 2px 8px; }

/* ---------- 卡片面板 ---------- */
.q-panel {
    background: var(--q-surface); border: 1px solid var(--q-line);
    border-radius: var(--q-radius); box-shadow: var(--q-shadow-sm);
    padding: 16px; margin-bottom: 14px;
}
.q-panel h3 { font-size: 15px; font-weight: 800; margin-bottom: 10px; }
.q-sub { font-size: 12px; color: var(--q-text-2); }

/* ---------- 表单 ---------- */
.q-field { margin-bottom: 13px; }
.q-field label { display: block; font-size: 12.5px; font-weight: 600; color: var(--q-text-2); margin-bottom: 6px; }
.q-field input, .q-field select, .q-field textarea {
    width: 100%; border: 1.5px solid var(--q-line); background: #FBFAFE;
    border-radius: var(--q-radius-s); padding: 11px 13px; font-size: 14px;
    color: var(--q-text); font-family: inherit; outline: none; transition: border .15s, box-shadow .15s;
}
.q-field textarea { min-height: 86px; resize: vertical; }
.q-field input:focus, .q-field select:focus, .q-field textarea:focus {
    border-color: var(--q-primary); box-shadow: 0 0 0 3px rgba(109, 90, 230, .14); background: #fff;
}
.q-captcha { display: flex; gap: 10px; align-items: center; }
.q-captcha input { flex: 1; }
.q-captcha em { font-style: normal; flex: none; background: var(--q-primary-soft); color: var(--q-primary);
    font-weight: 800; border-radius: 10px; padding: 9px 12px; font-size: 14px; user-select: none; }

/* ---------- 按钮 ---------- */
.q-btn {
    display: inline-flex; align-items: center; justify-content: center; gap: 6px;
    border: none; cursor: pointer; font-family: inherit;
    background: var(--q-grad); color: #fff; font-weight: 700; font-size: 14.5px;
    border-radius: 999px; padding: 12px 22px; letter-spacing: 1px;
    box-shadow: 0 8px 20px rgba(109, 90, 230, .35);
    transition: transform .12s ease, box-shadow .12s ease;
}
.q-btn:active { transform: translateY(1px) scale(.99); }
.q-btn--block { width: 100%; }
.q-btn--ghost { background: var(--q-primary-soft); color: var(--q-primary); box-shadow: none; }
.q-btn--danger { background: linear-gradient(135deg, #FF7A6E, #FF5C5C); box-shadow: 0 8px 20px rgba(255, 92, 92, .3); }
.q-btn--sm { padding: 7px 14px; font-size: 12.5px; letter-spacing: 0; }
.q-btn[disabled] { opacity: .5; pointer-events: none; }

/* ---------- 提示条 ---------- */
.q-flash { border-radius: var(--q-radius-s); padding: 11px 14px; font-size: 13px; margin-bottom: 12px; }
.q-flash--ok { background: #E9F9F1; color: #1E9E6E; border: 1px solid #C9F0DD; }
.q-flash--err { background: #FFF0EF; color: #E05248; border: 1px solid #FFD9D9; }

/* ---------- 订单卡片 ---------- */
.q-order { background: var(--q-surface); border: 1px solid var(--q-line); border-radius: var(--q-radius);
    box-shadow: var(--q-shadow-sm); padding: 14px 16px; margin-bottom: 12px; }
.q-order__head { display: flex; align-items: center; justify-content: space-between; gap: 8px;
    padding-bottom: 9px; border-bottom: 1px dashed var(--q-line); margin-bottom: 9px; }
.q-order__no { font-size: 12px; color: var(--q-text-2); font-family: ui-monospace, monospace; word-break: break-all; }
.q-order__rows div { display: flex; font-size: 13px; padding: 3px 0; }
.q-order__rows i { font-style: normal; flex: none; width: 76px; color: var(--q-text-2); }
.q-order__rows p { flex: 1; min-width: 0; word-break: break-all; }
.q-badge { font-size: 11px; font-weight: 700; border-radius: 999px; padding: 3px 10px; flex: none; }
.b0 { background: #FFF4E2; color: #D98A00; }
.b1 { background: #E9F3FF; color: #2F80D8; }
.b2 { background: #E9F9F1; color: #1E9E6E; }
.b3 { background: #F3F2F8; color: var(--q-text-2); }

/* ---------- 卡密展示 ---------- */
.q-kami { background: #FBFAFE; border: 1.5px dashed #D8D2F5; border-radius: var(--q-radius-s);
    padding: 10px 12px; margin-top: 8px; }
.q-kami__row { display: flex; align-items: center; gap: 8px; padding: 5px 0; }
.q-kami__row code { flex: 1; font-family: ui-monospace, SFMono-Regular, Consolas, monospace;
    font-size: 13px; color: var(--q-primary-deep); word-break: break-all; }
.q-copy { border: none; cursor: pointer; flex: none; background: var(--q-primary-soft); color: var(--q-primary);
    font-size: 11.5px; font-weight: 700; border-radius: 999px; padding: 4px 12px; font-family: inherit; }

/* ---------- 详情页 ---------- */
.q-detail__price { display: flex; align-items: baseline; gap: 8px; margin: 2px 0 10px; }
.q-detail__price .q-price { font-size: 24px; }
.q-detail__price span { font-size: 12px; color: var(--q-text-3); }
.q-desc { font-size: 13.5px; color: var(--q-text-2); white-space: pre-wrap; word-break: break-word; }
.q-buybar {
    position: fixed; left: 0; right: 0; bottom: 0; z-index: 60;
    background: rgba(255, 255, 255, .92); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
    border-top: 1px solid var(--q-line); padding: 10px 16px calc(10px + env(safe-area-inset-bottom));
}
.q-buybar__in { max-width: 680px; margin: 0 auto; display: flex; gap: 10px; align-items: center; }
.q-buybar__in .q-btn { flex: 1; }
.q-qty { display: flex; align-items: center; gap: 8px; }
.q-qty input { width: 74px; text-align: center; }

/* ---------- 收款码 ---------- */
.q-qr { text-align: center; padding: 6px 0 2px; }
.q-qr img { margin: 0 auto; max-width: 230px; border-radius: 14px; border: 1px solid var(--q-line); }
.q-qr p { font-size: 12px; color: var(--q-text-2); margin-top: 8px; }

/* ---------- 空状态 / 底部 ---------- */
.q-empty { text-align: center; color: var(--q-text-3); padding: 44px 0; font-size: 13px; }
.q-empty b { display: block; font-size: 34px; margin-bottom: 8px; font-weight: 400; }
.q-foot { text-align: center; color: var(--q-text-3); font-size: 11.5px; padding: 18px 0 6px; }

/* ---------- 底部 TabBar ---------- */
.q-tabbar {
    position: fixed; left: 0; right: 0; bottom: 0; z-index: 55;
    background: rgba(255, 255, 255, .92); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
    border-top: 1px solid var(--q-line);
    display: flex; justify-content: space-around;
    padding: 7px 0 calc(7px + env(safe-area-inset-bottom));
}
.q-tabbar a { display: flex; flex-direction: column; align-items: center; gap: 2px;
    font-size: 10.5px; color: var(--q-text-3); min-width: 64px; }
.q-tabbar a b { font-size: 19px; font-weight: 400; line-height: 1; }
.q-tabbar a.on { color: var(--q-primary); font-weight: 700; }

/* ---------- 用户头部 ---------- */
.q-me-head {
    background: var(--q-grad); border-radius: 20px; color: #fff;
    padding: 20px; margin-bottom: 14px; box-shadow: var(--q-shadow);
    display: flex; align-items: center; gap: 12px;
}
.q-avatar { width: 52px; height: 52px; border-radius: 50%; background: rgba(255,255,255,.22);
    border: 2px solid rgba(255,255,255,.5); display: flex; align-items: center; justify-content: center;
    font-size: 24px; flex: none; }
.q-me-head h2 { font-size: 17px; font-weight: 800; }
.q-me-head p { font-size: 12px; opacity: .92; }
.q-me-links a { display: flex; align-items: center; justify-content: space-between;
    background: var(--q-surface); border: 1px solid var(--q-line); border-radius: var(--q-radius-s);
    padding: 13px 15px; margin-bottom: 9px; font-size: 13.5px; font-weight: 600; color: var(--q-text); }
.q-me-links a i { font-style: normal; color: var(--q-text-3); }

/* ---------- 查询页 ---------- */
.q-search { display: flex; gap: 10px; }
.q-search input { flex: 1; }
@media (min-width: 560px) { .q-goods { grid-template-columns: repeat(3, 1fr); } }

/* ---------- 登录/注册独立卡片（q-authx） ---------- */
.q-authx { min-height: calc(100vh - 60px); display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 84px 18px 46px; position: relative; background: linear-gradient(180deg, var(--q-bg, #f6f4fb) 0%, #ffffff 90%); }
.q-authx__back { position: absolute; top: 16px; left: 16px; font-size: 13.5px; font-weight: 700; color: var(--q-text-2); text-decoration: none; padding: 8px 14px; border-radius: 999px; background: #ffffff; box-shadow: var(--q-shadow, 0 2px 10px rgba(43,35,80,.08)); }
.q-authx__card { width: 100%; max-width: 400px; background: #ffffff; border-radius: 20px; box-shadow: 0 18px 50px rgba(43,35,80,.12); padding: 30px 26px 22px; text-align: center; }
.q-authx__logo { display: inline-flex; align-items: center; justify-content: center; width: 58px; height: 58px; border-radius: 18px; background: linear-gradient(135deg, #8E7CF3, #6C5CE7); color: #fff; font-size: 26px; font-weight: 800; text-decoration: none; box-shadow: 0 10px 24px rgba(108,92,231,.35); }
.q-authx__site { font-size: 15px; font-weight: 800; color: var(--q-text, #2b2350); margin: 10px 0 4px; }
.q-authx__title { font-size: 14px; font-weight: 700; color: var(--q-text-2); margin: 14px 0 14px; text-align: left; }
.q-authx__card .q-field { text-align: left; }
.q-pwd { position: relative; }
.q-pwd input { padding-right: 44px !important; }
.q-pwd__eye { position: absolute; right: 6px; top: 50%; transform: translateY(-50%); border: none; background: transparent; font-size: 16px; cursor: pointer; padding: 6px 8px; border-radius: 8px; line-height: 1; }
.q-authx__btn { margin-top: 4px; }
.q-authx__row { display: flex; justify-content: space-between; align-items: center; margin-top: 14px; font-size: 13px; color: var(--q-text-2); }
.q-authx__row a { color: var(--q-primary, #6C5CE7); font-weight: 700; text-decoration: none; }
.q-authx__forgot { margin-top: 14px; padding: 12px 14px; border-radius: 12px; background: var(--q-primary-soft, #f1eefe); text-align: left; font-size: 13px; }
.q-authx__forgot b { display: block; margin-bottom: 4px; color: var(--q-text, #2b2350); }
.q-authx__forgot p { margin: 0 0 8px; color: var(--q-text-2, #6d6787); }
.q-authx__foot { margin-top: 22px; font-size: 12.5px; color: var(--q-text-3, #9a95b0); }

/* ---------- 客服悬浮球 ---------- */
.q-fab { position: fixed; right: 18px; bottom: calc(18px + env(safe-area-inset-bottom, 0px)); width: 52px; height: 52px; border-radius: 50%; background: linear-gradient(135deg, #8E7CF3, #6C5CE7); color: #fff; display: flex; align-items: center; justify-content: center; font-size: 22px; text-decoration: none; box-shadow: 0 12px 28px rgba(108,92,231,.45); z-index: 50; }
.q-fab:active { transform: scale(.94); }

/* ---------- 首页分类筛选 + 最新公告 ---------- */
.q-chips { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 14px; }
.q-chip { font-size: 12.5px; font-weight: 700; color: var(--q-text-2); background: #fff; border: 1.5px solid var(--q-line, #ECE8F8); padding: 7px 15px; border-radius: 999px; text-decoration: none; }
.q-chip.on { background: var(--q-primary); border-color: var(--q-primary); color: #fff; box-shadow: 0 6px 14px rgba(108,92,231,.28); }
.q-notice--live { background: linear-gradient(135deg, #F3F0FF, #FDF2FF); border-color: #E4DCFF; }
.q-notice--live b { color: #8E44EC; }
/* v1.4 易支付 */
.q-paybtns { display: flex; flex-direction: column; gap: 8px; }
.qa-radios { display: flex; flex-direction: column; gap: 10px; }
.qa-radio { display: grid; grid-template-columns: auto 1fr; gap: 2px 8px; align-items: center; border: 1px solid var(--qa-line, #E5E3EF);
  border-radius: 14px; padding: 12px 14px; cursor: pointer; transition: .15s; }
.qa-radio input { grid-row: span 2; align-self: center; }
.qa-radio span { font-size: 12px; color: var(--qa-text2, #7A768C); grid-column: 2; }
.qa-radio.on { border-color: #6C5CE7; background: #F8F7FE; }
.qa-checks { display: flex; gap: 16px; flex-wrap: wrap; }
.qa-checks label { display: flex; gap: 6px; align-items: center; font-size: 13px; font-weight: 600; color: var(--qa-text, #241F3A); cursor: pointer; }
/* ---------- v1.4.1 表单开关类控件（防缓存/防继承错乱，自洽布局） ---------- */
.q-red { color: var(--q-red, #E05B5B); }
.qa-radios { display: flex !important; flex-direction: column !important; gap: 10px; width: 100%; }
.qa-radio { display: grid !important; grid-template-columns: auto 1fr !important; column-gap: 10px; row-gap: 2px;
  align-items: center; text-align: left; width: 100%; box-sizing: border-box;
  border: 1.5px solid var(--q-line, #E5E3EF); border-radius: 14px; padding: 12px 14px; cursor: pointer; margin: 0; }
.qa-radio input[type="radio"] { grid-row: span 2; align-self: center; margin: 0; width: 16px; height: 16px; }
.qa-radio b { font-size: 13.5px; color: var(--q-text, #241F3A); font-weight: 700; }
.qa-radio span { grid-column: 2; font-size: 12px; color: var(--q-text-2, #7A768C); }
.qa-radio.on { border-color: var(--q-brand, #6C5CE7); background: #F8F7FE; }
.qa-checks { display: flex !important; flex-direction: row; flex-wrap: wrap; gap: 16px; width: 100%; }
.qa-checks label, .qa-check { display: flex !important; align-items: center; justify-content: flex-start !important;
  gap: 8px; font-size: 13px; font-weight: 500; color: var(--q-text, #241F3A); cursor: pointer;
  margin: 0 0 6px 0; text-align: left; line-height: 1.5; }
.qa-checks label input, .qa-check input { width: 16px; height: 16px; flex: none; margin: 0; }
.qa-checks label span, .qa-check span { display: inline; text-align: left; }
.q-paybtns { display: flex; flex-direction: column; gap: 8px; }
/* ---------- v1.5 媒体/图床 ---------- */
.qa-catcell { display: flex; align-items: center; gap: 8px; }
.qa-catcell img { width: 34px; height: 34px; object-fit: cover; border-radius: 8px; flex: none; }
.qa-catcell__ph { width: 34px; height: 34px; border-radius: 8px; background: #F2F0F9; display: inline-flex; align-items: center; justify-content: center; font-size: 15px; flex: none; }
.qam-thumbs { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 8px; }
.qam-thumb { display: flex; flex-direction: column; gap: 4px; align-items: center; }
.qam-thumb img { width: 92px; height: 92px; object-fit: cover; border-radius: 10px; border: 1px solid var(--q-line, #E5E3EF); }
.qam-del { display: flex; align-items: center; gap: 4px; font-size: 12px; color: var(--q-text-2, #7A768C); cursor: pointer; }
.qam-del input { margin: 0; }
.qam-video { width: 180px; max-width: 100%; border-radius: 10px; border: 1px solid var(--q-line, #E5E3EF); }
.qa-upload3 { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 8px; }
.qa-upload3 input[type="file"] { font-size: 12px; }
.q-gcard__cover--img { padding: 0; }
.q-gcard__cover--img img { width: 100%; height: 100%; object-fit: cover; border-radius: inherit; display: block; }
.q-gimgs { display: grid; grid-template-columns: repeat(auto-fill, minmax(110px, 1fr)); gap: 8px; margin-bottom: 10px; }
.q-gimgs--scroll { display: flex; overflow-x: auto; -webkit-overflow-scrolling: touch; padding-bottom: 4px; }
.q-gimgs--scroll .q-gimgs__item { flex: 0 0 auto; width: 150px; }
.q-gimgs__item img { width: 100%; aspect-ratio: 1 / 1; object-fit: cover; border-radius: 12px; display: block; }
.q-video { margin-bottom: 10px; border-radius: 14px; overflow: hidden; background: #000; }
.q-video video { width: 100%; max-height: 380px; display: block; }
.qam-thumbs { align-items: flex-start; margin-bottom: 12px; }
.qam-thumb { align-items: center; }
.qam-del { justify-content: center; white-space: nowrap; }
.qam-thumbs .qam-thumb + .qam-thumb { margin-left: 2px; }
.qam-thumbs { padding-bottom: 14px; }
.qam-del { height: 20px; }
