/**
 * 轻量级简约H5发卡网 — 视觉重构版
 * 设计语言：浅色底 + 靛紫渐变强调 + 大圆角 + 柔和层叠阴影
 * 说明：类名与 DOM 结构完全沿用原版，仅重写视觉层
 */

:root {
    --c-bg: #f6f7fb;
    --c-surface: #ffffff;
    --c-ink: #0f172a;
    --c-ink-2: #3d4a5c;
    --c-ink-3: #6b7a90;
    --c-line: #e8ebf3;
    --c-line-strong: #d8dde9;

    --c-brand: #6366f1;
    --c-brand-deep: #4f46e5;
    --c-brand-2: #8b5cf6;
    --c-brand-3: #a855f7;
    --c-brand-soft: #eef0ff;

    --c-ok: #10b981;
    --c-ok-soft: #e7f9f2;
    --c-warn: #f59e0b;
    --c-warn-soft: #fff7e6;
    --c-danger: #ef4444;
    --c-danger-soft: #fef0f0;

    --g-brand: linear-gradient(135deg, #6366f1 0%, #8b5cf6 55%, #a855f7 100%);
    --g-brand-soft: linear-gradient(135deg, #eef0ff 0%, #f6efff 100%);

    --r-sm: 10px;
    --r: 14px;
    --r-lg: 20px;
    --r-xl: 26px;

    --sh-1: 0 1px 2px rgba(15, 23, 42, 0.04), 0 1px 3px rgba(15, 23, 42, 0.03);
    --sh-2: 0 6px 20px -8px rgba(15, 23, 42, 0.12), 0 2px 6px rgba(15, 23, 42, 0.04);
    --sh-3: 0 18px 40px -18px rgba(79, 70, 229, 0.35), 0 6px 16px -8px rgba(15, 23, 42, 0.10);
    --sh-modal: 0 40px 80px -24px rgba(15, 23, 42, 0.30), 0 8px 24px -12px rgba(15, 23, 42, 0.12);

    --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    -webkit-text-size-adjust: 100%;
    scroll-behavior: smooth;
}

body {
    font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC",
        "Hiragino Sans GB", "Microsoft YaHei", Roboto, sans-serif;
    background-color: var(--c-bg);
    background-image:
        radial-gradient(1100px 520px at 50% -12%, rgba(99, 102, 241, 0.13), transparent 62%),
        radial-gradient(760px 420px at 100% 2%, rgba(168, 85, 247, 0.10), transparent 58%),
        radial-gradient(700px 400px at 0% 8%, rgba(56, 189, 248, 0.07), transparent 55%);
    background-attachment: fixed;
    background-repeat: no-repeat;
    color: var(--c-ink);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    min-height: 100vh;
}

body::before {
    content: "";
    position: fixed;
    inset: 0;
    pointer-events: none;
    background-image: linear-gradient(rgba(15, 23, 42, 0.022) 1px, transparent 1px),
        linear-gradient(90deg, rgba(15, 23, 42, 0.022) 1px, transparent 1px);
    background-size: 46px 46px;
    mask-image: radial-gradient(circle at 50% 0%, #000 0%, transparent 72%);
    -webkit-mask-image: radial-gradient(circle at 50% 0%, #000 0%, transparent 72%);
    z-index: 0;
}

.app {
    position: relative;
    z-index: 1;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

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

img {
    max-width: 100%;
    display: block;
}

a {
    color: var(--c-brand-deep);
    text-decoration: none;
}

/* ============ 头部 ============ */
.header {
    position: sticky;
    top: 0;
    z-index: 100;
    background: rgba(255, 255, 255, 0.82);
    backdrop-filter: saturate(180%) blur(18px);
    -webkit-backdrop-filter: saturate(180%) blur(18px);
    border-bottom: 1px solid rgba(15, 23, 42, 0.06);
}

.header-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    padding: 14px 0;
}

.logo {
    display: flex;
    align-items: center;
    gap: 10px;
    min-width: 0;
}

.logo::before {
    content: "";
    width: 32px;
    height: 32px;
    flex: 0 0 32px;
    border-radius: 10px;
    background: var(--g-brand);
    box-shadow: 0 6px 16px -6px rgba(99, 102, 241, 0.75);
    background-image: var(--g-brand);
    position: relative;
}

.logo h1 {
    font-size: 19px;
    font-weight: 800;
    letter-spacing: -0.02em;
    color: var(--c-ink);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.nav {
    display: flex;
    align-items: center;
    gap: 6px;
    background: rgba(15, 23, 42, 0.035);
    padding: 5px;
    border-radius: 999px;
}

.nav a {
    position: relative;
    padding: 8px 18px;
    border-radius: 999px;
    font-size: 14.5px;
    font-weight: 600;
    color: var(--c-ink-2);
    transition: color 0.22s var(--ease), background 0.22s var(--ease), box-shadow 0.22s var(--ease);
    white-space: nowrap;
}

.nav a:hover {
    color: var(--c-ink);
    background: rgba(255, 255, 255, 0.9);
}

.nav a.active {
    color: var(--c-brand-deep);
    background: #fff;
    box-shadow: var(--sh-1);
}

.mobile-menu-btn {
    display: none;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border: 1px solid var(--c-line);
    border-radius: 12px;
    background: #fff;
    color: var(--c-ink-2);
    cursor: pointer;
    transition: 0.2s var(--ease);
}

.mobile-menu-btn:hover {
    border-color: var(--c-line-strong);
    color: var(--c-ink);
}

/* ============ 公告 ============ */
.notice-bar {
    padding: 14px 0 0;
    background: transparent;
    border: none;
}

.notice-content {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 11px 18px;
    border-radius: var(--r);
    background: var(--g-brand-soft);
    border: 1px solid rgba(99, 102, 241, 0.16);
    box-shadow: var(--sh-1);
}

.notice-icon {
    flex: 0 0 auto;
    color: var(--c-brand-deep);
    opacity: 0.9;
}

.notice-text {
    font-size: 13.5px;
    text-wrap: pretty;
    font-weight: 500;
    color: #4338ca;
    letter-spacing: 0.01em;
}

/* ============ 主区域 ============ */
.main {
    flex: 1 0 auto;
    padding: 26px 0 56px;
}

/* ============ 分类 ============ */
.category-bar {
    margin-bottom: 22px;
}

.category-list {
    display: flex;
    flex-wrap: wrap;
    gap: 9px;
}

.cate-item {
    display: inline-flex;
    align-items: center;
    padding: 9px 20px;
    border-radius: 999px;
    background: #fff;
    border: 1px solid var(--c-line);
    color: var(--c-ink-2);
    font-size: 14px;
    font-weight: 600;
    box-shadow: var(--sh-1);
    transition: all 0.22s var(--ease);
}

.cate-item:hover {
    color: var(--c-brand-deep);
    border-color: rgba(99, 102, 241, 0.35);
    transform: translateY(-1px);
    box-shadow: var(--sh-2);
}

.cate-item.active {
    color: #fff;
    background: var(--g-brand);
    border-color: transparent;
    box-shadow: 0 10px 22px -10px rgba(99, 102, 241, 0.9);
}

/* ============ 商品网格 ============ */
.product-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 20px;
}

.product-card {
    position: relative;
    display: flex;
    flex-direction: column;
    gap: 14px;
    padding: 20px;
    border-radius: var(--r-lg);
    background: var(--c-surface);
    border: 1px solid var(--c-line);
    box-shadow: var(--sh-1);
    cursor: pointer;
    transition: transform 0.3s var(--ease), box-shadow 0.3s var(--ease), border-color 0.3s var(--ease);
    overflow: hidden;
}

.product-card::after {
    content: "";
    position: absolute;
    inset: 0;
    border-radius: inherit;
    padding: 1px;
    background: var(--g-brand);
    -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
    mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
    -webkit-mask-composite: xor;
    mask-composite: exclude;
    opacity: 0;
    transition: opacity 0.3s var(--ease);
    pointer-events: none;
}

.product-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--sh-3);
    border-color: transparent;
}

.product-card:hover::after {
    opacity: 1;
}

.product-header {
    display: flex;
    align-items: flex-start;
    gap: 13px;
}

.product-img {
    width: 60px;
    height: 60px;
    flex: 0 0 60px;
    border-radius: var(--r);
    object-fit: cover;
    background: var(--c-brand-soft);
    border: 1px solid var(--c-line);
    transition: transform 0.4s var(--ease);
}

.product-card:hover .product-img {
    transform: scale(1.06) rotate(-1.5deg);
}

.product-title-wrap {
    display: flex;
    flex-direction: column;
    gap: 7px;
    min-width: 0;
    flex: 1;
    min-height: 76px;
}

.product-title {
    font-size: 16px;
    font-weight: 700;
    line-height: 1.42;
    letter-spacing: -0.01em;
    color: var(--c-ink);
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    word-break: keep-all;
    overflow-wrap: anywhere;
    line-break: strict;
}

.product-badge {
    align-self: flex-start;
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 3px 10px;
    border-radius: 999px;
    font-size: 11.5px;
    font-weight: 700;
    letter-spacing: 0.02em;
}

.product-badge.out-stock {
    color: var(--c-danger);
    background: var(--c-danger-soft);
}

.product-badge.low-stock {
    color: #b45309;
    background: var(--c-warn-soft);
}

.product-desc {
    font-size: 13.5px;
    line-height: 1.65;
    color: var(--c-ink-2);
    text-wrap: pretty;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    min-height: 2.6em;
}

.product-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-top: auto;
    padding-top: 14px;
    border-top: 1px dashed var(--c-line);
}

.product-price {
    display: inline-flex;
    align-items: baseline;
    gap: 1px;
    line-height: 1;
}

.price-symbol {
    font-size: 15px;
    font-weight: 700;
    color: var(--c-brand-deep);
    transform: translateY(-1px);
}

.price-value {
    font-size: 26px;
    font-weight: 800;
    letter-spacing: -0.03em;
    font-variant-numeric: tabular-nums;
    background: var(--g-brand);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    color: var(--c-brand-deep);
}

.btn-buy {
    flex: 0 0 auto;
    min-width: 92px;
    padding: 10px 20px;
    border: none;
    border-radius: 999px;
    background: var(--g-brand);
    color: #fff;
    font-size: 14px;
    font-weight: 700;
    font-family: inherit;
    letter-spacing: 0.01em;
    cursor: pointer;
    box-shadow: 0 10px 20px -10px rgba(99, 102, 241, 0.95);
    transition: transform 0.2s var(--ease), box-shadow 0.2s var(--ease), filter 0.2s var(--ease);
}

.btn-buy:hover:not(.disabled):not(:disabled) {
    transform: translateY(-1px);
    filter: brightness(1.06);
    box-shadow: 0 14px 26px -10px rgba(99, 102, 241, 1);
}

.btn-buy:active:not(.disabled):not(:disabled) {
    transform: translateY(0);
}

.btn-buy.disabled,
.btn-buy:disabled {
    background: #eef0f5;
    color: var(--c-ink-3);
    box-shadow: none;
    cursor: not-allowed;
}

/* 售罄卡片弱化，避免高价数字与"不可购买"状态冲突 */
.product-card:has(.out-stock) {
    background: #fcfcfd;
}

.product-card:has(.out-stock) .price-value {
    background: none;
    -webkit-text-fill-color: var(--c-ink-3);
    color: var(--c-ink-3);
}

.product-card:has(.out-stock) .price-symbol {
    color: var(--c-ink-3);
}

.product-card:has(.out-stock) .product-img {
    filter: grayscale(0.75);
    opacity: 0.8;
}

/* ============ 按钮通用 ============ */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 11px 24px;
    border: 1px solid transparent;
    border-radius: 999px;
    font-size: 14.5px;
    font-weight: 700;
    font-family: inherit;
    line-height: 1.2;
    cursor: pointer;
    transition: all 0.22s var(--ease);
    text-align: center;
    white-space: nowrap;
}

.btn-primary {
    background: var(--g-brand);
    color: #fff;
    box-shadow: 0 12px 24px -12px rgba(99, 102, 241, 0.95);
}

.btn-primary:hover {
    filter: brightness(1.07);
    transform: translateY(-1px);
    box-shadow: 0 16px 30px -12px rgba(99, 102, 241, 1);
}

.btn-secondary {
    background: #fff;
    color: var(--c-ink);
    border-color: var(--c-line-strong);
    box-shadow: var(--sh-1);
}

.btn-secondary:hover {
    border-color: var(--c-brand);
    color: var(--c-brand-deep);
    transform: translateY(-1px);
    box-shadow: var(--sh-2);
}

.btn-outline {
    background: transparent;
    color: var(--c-brand-deep);
    border-color: rgba(99, 102, 241, 0.4);
}

.btn-outline:hover {
    background: var(--c-brand-soft);
    border-color: var(--c-brand);
}

.btn-block {
    width: 100%;
    display: flex;
}

.btn-copy,
.btn-contact {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 7px 15px;
    border: 1px solid rgba(99, 102, 241, 0.32);
    border-radius: 999px;
    background: var(--c-brand-soft);
    color: var(--c-brand-deep);
    font-size: 12.5px;
    font-weight: 700;
    font-family: inherit;
    cursor: pointer;
    transition: all 0.2s var(--ease);
}

.btn-copy:hover,
.btn-contact:hover {
    background: var(--c-brand);
    border-color: var(--c-brand);
    color: #fff;
    transform: translateY(-1px);
}

/* ============ 弹窗 ============ */
.modal {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 1000;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.modal.active {
    display: flex;
}

.modal-overlay {
    position: absolute;
    inset: 0;
    background: rgba(15, 23, 42, 0.42);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    animation: fadeIn 0.24s var(--ease);
}

.modal-container {
    position: relative;
    width: 100%;
    max-width: 480px;
    max-height: 88vh;
    display: flex;
    flex-direction: column;
    background: var(--c-surface);
    border-radius: var(--r-xl);
    box-shadow: var(--sh-modal);
    border: 1px solid rgba(255, 255, 255, 0.7);
    overflow: hidden;
    animation: modalIn 0.32s var(--ease);
}

.modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 20px 24px;
    border-bottom: 1px solid var(--c-line);
}

.modal-header h3 {
    font-size: 17px;
    font-weight: 800;
    letter-spacing: -0.01em;
    color: var(--c-ink);
}

.modal-close {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border: none;
    border-radius: 50%;
    background: rgba(15, 23, 42, 0.05);
    color: var(--c-ink-2);
    font-size: 22px;
    line-height: 1;
    cursor: pointer;
    transition: all 0.2s var(--ease);
}

.modal-close:hover {
    background: var(--c-danger-soft);
    color: var(--c-danger);
    transform: rotate(90deg);
}

.modal-body {
    padding: 22px 24px;
    overflow-y: auto;
    overscroll-behavior: contain;
}

.modal-footer {
    display: flex;
    gap: 10px;
    padding: 16px 24px 22px;
    border-top: 1px solid var(--c-line);
    background: #fbfcfe;
}

.modal-footer .btn {
    flex: 1;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes modalIn {
    from {
        opacity: 0;
        transform: translateY(14px) scale(0.97);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

/* ============ 表单 ============ */
.form-group {
    margin-bottom: 17px;
}

.form-group label {
    display: block;
    margin-bottom: 7px;
    font-size: 13.5px;
    font-weight: 600;
    color: var(--c-ink-2);
    letter-spacing: 0.01em;
}

.form-group input[type="text"],
.form-group input[type="email"],
.form-group input[type="password"],
.form-group input[type="number"],
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 12px 15px;
    border: 1px solid var(--c-line-strong);
    border-radius: var(--r);
    background: #fbfcfe;
    color: var(--c-ink);
    font-size: 14.5px;
    font-family: inherit;
    transition: all 0.2s var(--ease);
    outline: none;
}

.form-group input::placeholder,
.form-group textarea::placeholder {
    color: var(--c-ink-3);
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    background: #fff;
    border-color: var(--c-brand);
    box-shadow: 0 0 0 4px rgba(99, 102, 241, 0.13);
}

.required {
    color: var(--c-danger);
    font-weight: 700;
}

.text-muted {
    font-size: 13.5px;
    color: var(--c-ink-3);
}

/* ============ 订单查询 / 通用页面卡 ============ */
.page-card {
    max-width: 620px;
    margin: 0 auto;
    padding: 32px;
    border-radius: var(--r-xl);
    background: var(--c-surface);
    border: 1px solid var(--c-line);
    box-shadow: var(--sh-2);
}

.page-title {
    margin-bottom: 24px;
    text-align: center;
}

.page-title h2 {
    font-size: 23px;
    font-weight: 800;
    letter-spacing: -0.025em;
    color: var(--c-ink);
    margin-bottom: 7px;
}

.page-title p {
    font-size: 13.5px;
    color: var(--c-ink-2);
}

.query-form {
    margin-bottom: 6px;
}

.empty-state {
    padding: 26px 20px;
    margin-top: 18px;
    border-radius: var(--r-lg);
    background: #fbfcfe;
    border: 1px dashed var(--c-line-strong);
    text-align: center;
}

.empty-state p {
    font-size: 14px;
    color: var(--c-ink-2);
}

.order-result {
    margin-top: 26px;
    padding: 22px;
    border-radius: var(--r-lg);
    background: var(--g-brand-soft);
    border: 1px solid rgba(99, 102, 241, 0.16);
}

.order-result h3 {
    margin-bottom: 15px;
    font-size: 16px;
    font-weight: 800;
    color: var(--c-ink);
}

.order-info {
    display: flex;
    flex-direction: column;
    gap: 11px;
}

.info-row {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    font-size: 14px;
    line-height: 1.6;
}

.info-label {
    flex: 0 0 88px;
    color: var(--c-ink-2);
    font-weight: 600;
}

.info-value {
    flex: 1;
    min-width: 0;
    color: var(--c-ink);
    font-weight: 600;
    word-break: break-all;
}

.status-badge {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 3px 11px;
    border-radius: 999px;
    font-size: 12.5px;
    font-weight: 700;
    flex: 0 0 auto;
}

.status-badge.status-success {
    color: #047857;
    background: var(--c-ok-soft);
}

.status-badge.status-pending {
    color: #b45309;
    background: var(--c-warn-soft);
}

.card-info-box {
    position: relative;
    flex: 1;
    min-width: 0;
    padding: 15px 16px;
    border-radius: var(--r);
    background: #0f172a;
    border: 1px solid #1e293b;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.06);
}

.card-info-title {
    margin-bottom: 9px;
    font-size: 11.5px;
    font-weight: 700;
    letter-spacing: 0.09em;
    text-transform: uppercase;
    color: #94a3b8;
}

.card-info-box pre,
.card-content {
    margin: 0 0 12px;
    font-family: "SFMono-Regular", "JetBrains Mono", Consolas, "Liberation Mono", monospace;
    font-size: 13px;
    line-height: 1.72;
    color: #a5f3fc;
    white-space: pre-wrap;
    word-break: break-all;
}

.card-info-box .btn-copy {
    background: rgba(99, 102, 241, 0.18);
    border-color: rgba(129, 140, 248, 0.45);
    color: #c7d2fe;
}

.card-info-box .btn-copy:hover {
    background: var(--c-brand);
    border-color: var(--c-brand);
    color: #fff;
}

/* ============ 支付成功页 ============ */
.success-card {
    max-width: 580px;
    text-align: center;
    padding: 38px 32px;
}

.success-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 76px;
    height: 76px;
    margin: 0 auto 18px;
    border-radius: 50%;
    background: var(--g-brand);
    color: #fff;
    box-shadow: 0 18px 36px -14px rgba(99, 102, 241, 0.85);
    animation: popIn 0.45s var(--ease);
}

@keyframes popIn {
    0% {
        opacity: 0;
        transform: scale(0.6);
    }
    60% {
        transform: scale(1.06);
    }
    100% {
        opacity: 1;
        transform: scale(1);
    }
}

.success-card h2 {
    font-size: 23px;
    font-weight: 800;
    letter-spacing: -0.025em;
    margin-bottom: 6px;
}

.success-card > p {
    font-size: 14px;
    color: var(--c-ink-2);
    margin-bottom: 24px;
}

.success-card .card-info-box {
    text-align: left;
    margin-bottom: 20px;
}

.order-detail {
    padding: 18px 20px;
    margin-bottom: 22px;
    border-radius: var(--r-lg);
    background: #fbfcfe;
    border: 1px solid var(--c-line);
    text-align: left;
}

.order-detail p {
    display: flex;
    gap: 8px;
    font-size: 13.5px;
    line-height: 2;
    color: var(--c-ink-2);
}

.order-detail p strong {
    flex: 0 0 62px;
    color: var(--c-ink);
    font-weight: 700;
}

.action-buttons {
    display: flex;
    gap: 11px;
    justify-content: center;
    flex-wrap: wrap;
}

.action-buttons .btn {
    flex: 1;
    min-width: 140px;
}

/* ============ 联系客服 ============ */
.contact-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.contact-item {
    display: flex;
    align-items: flex-start;
    gap: 14px;
    padding: 16px 18px;
    border-radius: var(--r-lg);
    background: #fbfcfe;
    border: 1px solid var(--c-line);
    transition: all 0.24s var(--ease);
}

.contact-item:hover {
    background: #fff;
    border-color: rgba(99, 102, 241, 0.3);
    box-shadow: var(--sh-2);
    transform: translateY(-2px);
}

.contact-icon {
    flex: 0 0 42px;
    width: 42px;
    height: 42px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: var(--r);
    background: #fff;
    border: 1px solid var(--c-line);
    overflow: hidden;
}

.contact-icon img {
    width: 26px;
    height: 26px;
    object-fit: contain;
}

.contact-content {
    flex: 1;
    min-width: 0;
}

.contact-name {
    font-size: 13.5px;
    font-weight: 700;
    color: var(--c-ink);
    margin-bottom: 4px;
}

.contact-value {
    font-size: 13.5px;
    line-height: 1.65;
    color: var(--c-ink-2);
    word-break: break-all;
}

.contact-copy {
    align-self: center;
    flex: 0 0 auto;
    padding: 7px 15px;
    border: 1px solid rgba(99, 102, 241, 0.32);
    border-radius: 999px;
    background: var(--c-brand-soft);
    color: var(--c-brand-deep);
    font-size: 12.5px;
    font-weight: 700;
    font-family: inherit;
    cursor: pointer;
    transition: all 0.2s var(--ease);
}

.contact-copy:hover {
    background: var(--c-brand);
    border-color: var(--c-brand);
    color: #fff;
}

.contact-info {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

/* ============ 支付方式卡片 ============ */
.pay-cards {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.pay-card {
    position: relative;
    display: block;
    cursor: pointer;
}

.pay-card input[type="radio"] {
    position: absolute;
    opacity: 0;
    width: 0;
    height: 0;
    pointer-events: none;
}

.pay-card-content {
    display: flex;
    align-items: center;
    gap: 13px;
    padding: 13px 16px;
    border-radius: var(--r);
    background: #fbfcfe;
    border: 1.5px solid var(--c-line-strong);
    transition: all 0.22s var(--ease);
}

.pay-card:hover .pay-card-content {
    border-color: rgba(99, 102, 241, 0.45);
    background: #fff;
}

.pay-card input:checked + .pay-card-content {
    border-color: var(--c-brand);
    background: var(--c-brand-soft);
    box-shadow: 0 0 0 4px rgba(99, 102, 241, 0.10);
}

.pay-card-icon {
    flex: 0 0 34px;
    width: 34px;
    height: 34px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 9px;
    background: #fff;
    border: 1px solid var(--c-line);
    overflow: hidden;
}

.pay-card-icon img {
    width: 22px;
    height: 22px;
    object-fit: contain;
}

.pay-card-info {
    flex: 1;
    min-width: 0;
}

.pay-card-name {
    font-size: 14px;
    font-weight: 700;
    color: var(--c-ink);
}

.pay-card-desc {
    font-size: 12px;
    color: var(--c-ink-3);
    margin-top: 1px;
}

.pay-card-check {
    flex: 0 0 22px;
    width: 22px;
    height: 22px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    border: 1.5px solid var(--c-line-strong);
    background: #fff;
    transition: all 0.22s var(--ease);
}

.check-mark {
    font-size: 12px;
    font-weight: 800;
    color: #fff;
    opacity: 0;
    transform: scale(0.5);
    transition: all 0.22s var(--ease);
}

.pay-card input:checked + .pay-card-content .pay-card-check {
    background: var(--g-brand);
    border-color: transparent;
}

.pay-card input:checked + .pay-card-content .check-mark {
    opacity: 1;
    transform: scale(1);
}

.pay-option,
.pay-type-group {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

/* 购买弹窗里的商品信息条 */
.product-info {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 13px 16px;
    margin-bottom: 20px;
    border-radius: var(--r);
    background: var(--g-brand-soft);
    border: 1px solid rgba(99, 102, 241, 0.18);
}

.product-info .product-name {
    font-size: 14px;
    font-weight: 700;
    color: var(--c-ink);
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.product-info .product-price {
    flex: 0 0 auto;
    font-size: 19px;
    font-weight: 800;
    letter-spacing: -0.02em;
    color: var(--c-brand-deep);
    font-variant-numeric: tabular-nums;
}

/* ============ 商品详情弹窗 ============ */
.detail-modal-img {
    width: 100%;
    max-height: 230px;
    object-fit: cover;
    border-radius: var(--r-lg);
    border: 1px solid var(--c-line);
    margin-bottom: 16px;
    background: var(--c-brand-soft);
}

.detail-info-row {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 9px 0;
    border-bottom: 1px dashed var(--c-line);
    font-size: 14px;
    line-height: 1.6;
}

.detail-info-row:last-child {
    border-bottom: none;
}

.detail-label {
    flex: 0 0 76px;
    color: var(--c-ink-2);
    font-weight: 600;
}

.detail-value {
    flex: 1;
    min-width: 0;
    color: var(--c-ink);
    font-weight: 600;
    word-break: break-word;
}

.com {
    color: var(--c-ink-3);
    font-size: 12.5px;
}

/* ============ 加载动画 ============ */
.loading-overlay {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 2000;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 16px;
    background: rgba(246, 247, 251, 0.86);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
}

.loading-overlay.active {
    display: flex;
}

.loading-spinner {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    border: 3px solid rgba(99, 102, 241, 0.16);
    border-top-color: var(--c-brand);
    border-right-color: var(--c-brand-2);
    animation: spin 0.75s linear infinite;
}

.loading-overlay p {
    font-size: 13.5px;
    font-weight: 600;
    color: var(--c-ink-2);
    letter-spacing: 0.02em;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* ============ 底部 ============ */
.footer {
    flex: 0 0 auto;
    padding: 26px 0 34px;
    border-top: 1px solid rgba(15, 23, 42, 0.06);
    background: rgba(255, 255, 255, 0.55);
}

.footer p {
    font-size: 12.5px;
    color: var(--c-ink-3);
    text-align: center;
    letter-spacing: 0.01em;
}

/* ============ 响应式 ============ */
@media (max-width: 860px) {
    .nav {
        position: absolute;
        top: calc(100% + 10px);
        right: 16px;
        left: 16px;
        flex-direction: column;
        align-items: stretch;
        gap: 4px;
        padding: 10px;
        border-radius: var(--r-lg);
        background: rgba(255, 255, 255, 0.97);
        backdrop-filter: blur(20px);
        -webkit-backdrop-filter: blur(20px);
        border: 1px solid var(--c-line);
        box-shadow: var(--sh-modal);
        display: none;
    }

    .nav.active {
        display: flex;
        animation: modalIn 0.24s var(--ease);
    }

    .nav a {
        padding: 11px 16px;
        border-radius: var(--r-sm);
        text-align: left;
    }

    .nav a.active {
        box-shadow: none;
    }

    .mobile-menu-btn {
        display: inline-flex;
    }

    .header-content {
        position: relative;
    }
}

@media (max-width: 640px) {
    .container {
        padding: 0 16px;
    }

    .main {
        padding: 20px 0 40px;
    }

    .logo h1 {
        font-size: 17px;
    }

    .product-grid {
        grid-template-columns: 1fr;
        gap: 14px;
    }

    .product-card {
        padding: 16px;
        border-radius: var(--r-lg);
    }

    .page-card {
        padding: 24px 20px;
        border-radius: var(--r-lg);
    }

    .page-title h2 {
        font-size: 20px;
    }

    .price-value {
        font-size: 23px;
    }

    .modal {
        padding: 12px;
    }

    .modal-container {
        max-height: 92vh;
        border-radius: var(--r-lg);
    }

    .modal-header,
    .modal-body {
        padding-left: 18px;
        padding-right: 18px;
    }

    .modal-footer {
        padding: 14px 18px 18px;
    }

    .info-label {
        flex-basis: 76px;
        font-size: 13px;
    }

    .info-value {
        font-size: 13px;
    }

    .contact-item {
        flex-wrap: wrap;
        padding: 14px;
    }

    .contact-copy {
        width: 100%;
    }

    .action-buttons .btn {
        min-width: 0;
    }

    .success-card {
        padding: 30px 20px;
    }

    .notice-content {
        padding: 10px 14px;
    }

    .notice-text {
        font-size: 12.5px;
    }
}

@media (max-width: 380px) {
    .cate-item {
        padding: 8px 15px;
        font-size: 13px;
    }

    .btn-buy {
        padding: 9px 16px;
        font-size: 13px;
    }
}

/* 减少动效偏好 */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}
