/* ===== index.php ===== */
.shop-hero { text-align: center; margin-bottom: 28px; }
.shop-hero h1 { font-size: clamp(32px, 5vw, 42px); font-weight: 700; letter-spacing: -0.5px; margin-bottom: 8px; }
.shop-hero p { color: var(--text-secondary); font-size: 15px; margin-bottom: 24px; }
.shop-search { max-width: 480px; margin: 0 auto; position: relative; }
.shop-search input {
    width: 100%; padding: 14px 20px 14px 44px; border-radius: 18px;
    border: 1px solid var(--glass-border); background: var(--card-bg);
    color: var(--text-color); font-size: 15px;
    outline: none; transition: background 0.2s ease, border-color 0.2s ease, opacity 0.2s ease, transform 0.2s ease; box-sizing: border-box;
}
.shop-search input:focus { border-color: var(--brand-blue); box-shadow: 0 0 0 3px rgba(0,113,227,0.1); }
@media (max-width: 768px) {
    .shop-search input { font-size: 16px; }
}
.shop-search::before {
    content: ""; position: absolute; left: 16px; top: 50%; transform: translateY(-50%);
    width: 16px; height: 16px; background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' stroke='%2386868b' stroke-width='2' viewBox='0 0 24 24'%3E%3Ccircle cx='11' cy='11' r='8'/%3E%3Cpath d='m21 21-4.35-4.35'/%3E%3C/svg%3E") center/contain no-repeat;
}

/* 分类 tabs：挂 .pill-tabs/.pill-tab 走 LZLiquid 液态激活（蓝字，非实心蓝底） */
.shop-cats.pill-tabs { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; margin: 20px 0 28px; position: relative; isolation: isolate; }
.shop-cat.pill-tab {
    padding: 7px 16px; border-radius: 980px; border: 1px solid var(--glass-border);
    background: var(--card-bg);
    color: var(--text-color); text-decoration: none; font-size: 13px; font-weight: 500;
    transition: background 0.2s ease, border-color 0.2s ease, color 0.2s ease, opacity 0.2s ease; white-space: nowrap;
}
.shop-cat.pill-tab:hover { border-color: var(--brand-blue); }
.shop-cats.pill-tabs:not(.lz-liquid) .shop-cat.pill-tab.active { background: rgba(0,113,227,0.12); color: var(--lz-active-ink, var(--brand-blue)); border-color: transparent; font-weight: 600; }
.shop-cats.pill-tabs.lz-liquid .shop-cat.pill-tab.active { background: transparent; border-color: transparent; color: var(--lz-active-ink, var(--brand-blue)); font-weight: 600; }
.shop-cat.pill-tab small { opacity: 0.6; margin-left: 4px; font-size: 11px; }
#shopCatExtra:not([hidden]) { display: contents; }
#shopCatToggle { cursor: pointer; font: inherit; }

.shop-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(var(--shop-min, 220px), 1fr));
    gap: var(--shop-gap, 18px);
    --shop-min: 220px; --shop-gap: 18px; --shop-pad: 14px;
    --shop-title: 15px; --shop-img-ratio: 4/3; --shop-desc-lines: 1;
}
/* 紧凑 */
.shop-grid.size-compact { --shop-min: 180px; --shop-gap: 14px; --shop-pad: 12px; --shop-title: 14px; --shop-img-ratio: 1/1; --shop-desc-lines: 0; }
/* 标准 */
.shop-grid.size-standard { --shop-min: 220px; --shop-gap: 18px; --shop-pad: 14px; --shop-title: 15px; --shop-img-ratio: 4/3; --shop-desc-lines: 1; }
/* 宽松 */
.shop-grid.size-comfortable { --shop-min: 280px; --shop-gap: 22px; --shop-pad: 18px; --shop-title: 16px; --shop-img-ratio: 4/3; --shop-desc-lines: 2; }
/* 瀑布流 */
.shop-grid.size-masonry {
    display: block;
    column-count: var(--shop-cols, 4);
    column-gap: var(--shop-gap, 16px);
    --shop-pad: 14px; --shop-title: 15px;
}
.shop-grid.size-masonry .shop-card { break-inside: avoid; margin-bottom: var(--shop-gap, 16px); display: inline-block; width: 100%; }
.shop-grid.size-masonry .shop-img-wrap { aspect-ratio: auto; }
.shop-grid.size-masonry .shop-img-wrap img { height: auto; object-fit: contain; }
/* 固定列数覆盖（非瀑布流） */
.shop-grid.cols-fixed { grid-template-columns: repeat(var(--shop-cols, 4), 1fr); }

.shop-card {
    background: var(--card-bg);
    border: 1px solid var(--glass-border); border-radius: 18px;
    overflow: hidden; cursor: pointer; transition: background 0.3s cubic-bezier(0.4,0,0.2,1), border-color 0.3s cubic-bezier(0.4,0,0.2,1), opacity 0.3s cubic-bezier(0.4,0,0.2,1), transform 0.3s cubic-bezier(0.4,0,0.2,1);
    display: flex; flex-direction: column; position: relative;
    color: inherit; text-decoration: none;
}
.shop-card:hover { transform: translateY(-4px); box-shadow: var(--hover-glow), 0 16px 32px rgba(0,0,0,0.10); }
.shop-card.sold-out { opacity: 0.72; }
.shop-card.sold-out:hover { transform: translateY(-2px); box-shadow: var(--card-shadow); }
.shop-card.sold-out .shop-img-wrap img { filter: grayscale(0.55); }
.shop-card.sold-out .shop-card-btn { background: var(--glass-border); color: var(--text-secondary); }
.shop-img-wrap { width: 100%; aspect-ratio: var(--shop-img-ratio, 4/3); overflow: hidden; background: var(--bg-color); position: relative; }
.shop-img-wrap img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.5s ease; }
.shop-card:hover:not(.sold-out) .shop-img-wrap img { transform: scale(1.05); }

.shop-badge {
    position: absolute; top: 10px; left: 10px;
    background: rgba(0,0,0,0.7); color: #fff; padding: 3px 10px; border-radius: 980px; font-size: 11px; font-weight: 600;
    letter-spacing: 0.3px;
}
.shop-badge.sold { background: rgba(255,59,48,0.9); }

.shop-card-body { padding: var(--shop-pad, 14px); display: flex; flex-direction: column; flex: 1; }
.shop-card-cat {
    display: inline-block; font-size: 10px; color: var(--text-secondary);
    background: var(--glass-border); padding: 2px 8px; border-radius: 6px;
    margin-bottom: 6px; align-self: flex-start; text-transform: uppercase; letter-spacing: 0.5px;
}
.shop-card-title {
    font-size: var(--shop-title, 15px); font-weight: 700; margin-bottom: 6px; line-height: 1.3;
    display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical;
    overflow: hidden; word-break: break-word;
    min-height: calc(var(--shop-title, 15px) * 1.3 * 2);
}
.shop-card-desc {
    font-size: 12px; color: var(--text-secondary); line-height: 1.5; flex: 1; margin-bottom: 12px;
    display: -webkit-box; -webkit-line-clamp: var(--shop-desc-lines, 1); -webkit-box-orient: vertical; overflow: hidden;
}
.shop-grid.size-compact .shop-card-desc,
.shop-card-desc.hidden { display: none; }
/* 让 footer 始终贴底，避免可选元素（分类标签 / SKU 徽章）不一致时标题与价格行高低错位 */
.shop-card-footer { display: flex; justify-content: space-between; align-items: center; gap: 8px; margin-top: auto; }
/* 空徽章行 / 空分类位不占垂直空间 */
.shop-card-badges:empty { display: none; }
.shop-card-cat:empty { display: none; }
.shop-card-price { font-size: 17px; font-weight: 700; letter-spacing: -0.3px; }
.shop-grid.size-comfortable .shop-card-price { font-size: 20px; }
.shop-grid.size-compact .shop-card-price { font-size: 15px; }
.shop-card-btn {
    background: var(--brand-blue); color: #fff; border: none;
    padding: 6px 14px; border-radius: 980px; font-size: 12px; font-weight: 600;
    cursor: pointer; text-decoration: none; transition: background 0.2s ease, border-color 0.2s ease, opacity 0.2s ease, transform 0.2s ease; white-space: nowrap;
}
.shop-card-btn:hover { opacity: 0.85; transform: scale(1.03); }
.shop-card-btn.disabled {
    background: var(--glass-border); color: var(--text-secondary);
    cursor: not-allowed; pointer-events: none;
}

.shop-empty { text-align: center; padding: 80px 20px; color: var(--text-secondary); }
.shop-empty p:first-child { font-size: 32px; margin-bottom: 10px; }

/* Card shipping type & multi-sku badges */
.shop-card-badges { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 8px; }
.shop-card-badges .badge-ship {
    font-size: 10px; padding: 2px 8px; border-radius: 6px;
    background: rgba(0,113,227,0.1); color: var(--brand-blue);
    border: 1px solid rgba(0,113,227,0.2); font-weight: 500;
}
.shop-card-badges .badge-ship.virtual {
    background: rgba(142,142,147,0.14); color: var(--text-secondary);
    border-color: rgba(142,142,147,0.28);
}
.shop-card-badges .badge-sku {
    font-size: 10px; padding: 2px 8px; border-radius: 6px;
    background: rgba(255,149,0,0.1); color: #ff9500;
    border: 1px solid rgba(255,149,0,0.2); font-weight: 500;
}

@media (max-width: 600px) {
    .shop-grid { grid-template-columns: repeat(2, 1fr); gap: 12px; }
    .shop-card-body { padding: 12px; }
    .shop-card-title { font-size: 14px; }
    .shop-card-price { font-size: 16px; }
    .shop-card-btn { padding: 6px 14px; font-size: 12px; }
    .shop-card-badges { gap: 4px; }
    .shop-card-badges .badge-ship, .shop-card-badges .badge-sku { font-size: 9px; padding: 1px 6px; }
}

/* ===== detail.php ===== */
.det-breadcrumb { font-size: 13px; color: var(--text-secondary); margin-bottom: 16px; }
.det-breadcrumb a { color: var(--text-secondary); text-decoration: none; transition: color .2s; }
.det-breadcrumb a:hover { color: var(--brand-blue); }
.det-breadcrumb span.sep { margin: 0 6px; opacity: .5; }

.det-wrap {
    display: grid;
    grid-template-columns: 1.1fr 0.9fr;
    gap: 18px;
    align-items: start;
    margin-bottom: 18px;
}
.det-wrap.stacked { grid-template-columns: 1fr; max-width: 760px; margin-left: auto; margin-right: auto; }

/* ===== 画廊 ===== */
.det-gallery {
    display: flex; flex-direction: column; gap: 8px;
    position: sticky; top: 80px;
}
.det-wrap.stacked .det-gallery { position: static; }
.det-main-img {
    background: var(--card-bg); border-radius: 16px; overflow: hidden; position: relative;
    border: 1px solid var(--glass-border);
    max-height: 420px; max-width: 420px;
}
.det-main-img .det-slide {
    position: absolute; inset: 0;
    opacity: 0; pointer-events: none; transition: opacity .35s ease;
}
.det-main-img .det-slide.active { opacity: 1; pointer-events: auto; }
.det-main-img .det-slide img {
    width: 100%; height: 100%; object-fit: contain; display: block; cursor: zoom-in;
}
.det-main-img .det-nav {
    position: absolute; top: 50%; transform: translateY(-50%);
    width: 40px; height: 40px; border-radius: 50%;
    background: rgba(0,0,0,0.3);
    display: flex; align-items: center; justify-content: center;
    color: #fff; cursor: pointer; transition: background 0.2s ease, border-color 0.2s ease, opacity 0.2s ease, transform 0.2s ease;
    border: none; font-size: 18px; opacity: 0; z-index: 2;
}
.det-main-img:hover .det-nav { opacity: 1; }
.det-main-img .det-nav:hover { background: rgba(0,0,0,0.55); }
.det-main-img .det-nav.prev { left: 10px; }
.det-main-img .det-nav.next { right: 10px; }
.det-main-img .det-counter {
    position: absolute; bottom: 10px; right: 10px;
    background: rgba(0,0,0,0.45); color: #fff; padding: 3px 10px; border-radius: 980px; font-size: 11px; font-weight: 500; z-index: 2;
}
.det-thumbs {
    display: flex; gap: 6px; overflow-x: auto; padding-bottom: 2px;
    scrollbar-width: thin;
}
.det-thumb {
    flex: 0 0 52px; width: 52px; height: 52px; border-radius: 8px;
    overflow: hidden; cursor: pointer; border: 2px solid transparent;
    background: var(--bg-color); transition: background 0.2s ease, border-color 0.2s ease, opacity 0.2s ease, transform 0.2s ease;
}
.det-thumb img { width: 100%; height: 100%; object-fit: cover; }
.det-thumb.active { border-color: var(--brand-blue); }
.det-thumb:hover { transform: translateY(-2px); }

/* ===== 信息侧栏 ===== */
.det-info {
    background: var(--card-bg);
    border: 1px solid var(--glass-border); border-radius: 16px;
    padding: 18px 20px;
}
.det-info h1 {
    font-size: 19px; font-weight: 700; margin: 0 0 8px;
    line-height: 1.3; letter-spacing: -0.3px;
}
.det-meta-row { display: flex; flex-wrap: wrap; gap: 5px; margin-bottom: 10px; }
.det-tag {
    display: inline-flex; align-items: center;
    font-size: 10px; padding: 4px 10px; border-radius: 980px;
    background: rgba(0,113,227,.08); color: var(--brand-blue); font-weight: 600;
}
.det-shipping {
    display: inline-flex; align-items: center; gap: 4px; padding: 4px 10px;
    border-radius: 980px; font-size: 11px; font-weight: 600;
}
.det-shipping.virtual { background: rgba(142,142,147,.14); color: var(--text-secondary); }
.det-shipping.physical { background: rgba(52,199,89,.1); color: #34c759; }

.det-price-block {
    background: rgba(0,113,227,0.05);
    border-radius: 12px; padding: 12px 14px; margin-bottom: 14px;
    border: 1px solid rgba(0,113,227,0.12);
}
.det-price {
    font-size: 26px; font-weight: 700; color: var(--brand-blue);
    letter-spacing: -0.5px; line-height: 1;
}
.det-price .currency { font-size: 15px; margin-right: 2px; opacity: .85; }
.det-price-suffix { font-size: 12px; color: var(--text-secondary); margin-left: 6px; font-weight: 500; }
.det-price-meta {
    margin-top: 6px; font-size: 11px; color: var(--text-secondary);
    display: flex; gap: 12px;
}
.det-price-meta span.lowstock { color: #ff9500; font-weight: 600; }
.det-price-meta span.soldout { color: #ff3b30; font-weight: 600; }

/* SKU */
.det-sku { margin-bottom: 12px; }
.det-sku-group { margin-bottom: 10px; }
.det-sku-label {
    font-size: 11px; font-weight: 600; color: var(--text-secondary);
    text-transform: uppercase; letter-spacing: .5px; margin-bottom: 5px;
}
.det-sku-label .selected { color: var(--text-color); text-transform: none; letter-spacing: 0; margin-left: 6px; font-weight: 500; }
.det-sku-opts { display: flex; flex-wrap: wrap; gap: 6px; }
.det-sku-btn {
    padding: 6px 14px; border-radius: 10px; border: 1px solid var(--glass-border);
    background: var(--bg-color); color: var(--text-color);
    font-size: 13px; font-weight: 500; cursor: pointer;
    transition: background 0.2s ease, border-color 0.2s ease, opacity 0.2s ease, transform 0.2s ease; user-select: none;
}
.det-sku-btn:hover:not(.active):not(.disabled) {
    border-color: var(--brand-blue); color: var(--brand-blue);
}
.det-sku-btn.active {
    background: var(--brand-blue); color: #fff; border-color: var(--brand-blue);
}
.det-sku-btn.disabled {
    opacity: .4; cursor: not-allowed; text-decoration: line-through;
}

/* Qty */
.det-qty-row { display: flex; align-items: center; gap: 10px; margin-bottom: 14px; }
.det-qty-label { font-size: 12px; color: var(--text-secondary); }
.det-qty-ctrl { display: flex; align-items: center; gap: 0; border: 1px solid var(--glass-border); border-radius: 8px; overflow: hidden; }
.det-qty-ctrl button {
    width: 32px; height: 32px; border: none; background: var(--bg-color);
    color: var(--text-color); cursor: pointer; font-size: 16px; font-weight: 600;
    transition: background 0.2s ease, border-color 0.2s ease, opacity 0.2s ease, transform 0.2s ease;
}
.det-qty-ctrl button:hover:not(:disabled) { background: var(--glass-border); }
.det-qty-ctrl button:disabled { opacity: .4; cursor: not-allowed; }
.det-qty-ctrl input {
    width: 48px; height: 32px; border: none; background: transparent;
    color: var(--text-color); text-align: center; font-size: 13px; font-weight: 600;
    outline: none;
    border-left: 1px solid var(--glass-border); border-right: 1px solid var(--glass-border);
    -webkit-appearance: none; -moz-appearance: textfield; appearance: none;
}
.det-qty-ctrl input::-webkit-outer-spin-button,
.det-qty-ctrl input::-webkit-inner-spin-button {
    -webkit-appearance: none; margin: 0;
}
.det-qty-stock { font-size: 12px; color: var(--text-secondary); }

/* Buy CTA */
.det-cta-row { display: flex; gap: 8px; }
.det-buy-btn {
    flex: 1; padding: 11px 18px; border-radius: 14px; border: none;
    background: var(--brand-blue); color: #fff;
    font-size: 14px; font-weight: 600; cursor: pointer;
    transition: background 0.2s ease, border-color 0.2s ease, opacity 0.2s ease, transform 0.2s ease; text-decoration: none; text-align: center;
    display: flex; align-items: center; justify-content: center; gap: 6px;
}
.det-buy-btn:hover:not(:disabled) { opacity: .9; transform: scale(1.01); }
.det-buy-btn:disabled, .det-buy-btn.disabled {
    background: var(--glass-border); color: var(--text-secondary);
    cursor: not-allowed; pointer-events: none;
}
.det-buy-secondary {
    width: 44px; height: 44px; border-radius: 14px;
    background: var(--bg-color); border: 1px solid var(--glass-border);
    color: var(--text-color); cursor: pointer; transition: background 0.2s ease, border-color 0.2s ease, opacity 0.2s ease, transform 0.2s ease;
    display: flex; align-items: center; justify-content: center;
    font-size: 18px;
}
.det-buy-secondary:hover { border-color: var(--brand-blue); color: var(--brand-blue); }

.det-login-tip {
    margin-top: 10px; padding: 8px 12px; border-radius: 8px;
    background: rgba(255,149,0,.08); color: #ff9500; font-size: 11px; text-align: center;
}
.det-login-tip a { color: #ff9500; font-weight: 600; }

.det-desc { white-space: pre-wrap; color: var(--text-color); line-height: 1.7; font-size: 14px; opacity: .85; margin-top: 18px; padding-top: 18px; border-top: 1px solid var(--glass-border); }

/* ===== Tabs ===== */
.det-tabs-wrap {
    background: var(--card-bg);
    border: 1px solid var(--glass-border); border-radius: 20px;
    overflow: hidden;
}
.det-tabs {
    display: flex; border-bottom: 1px solid var(--glass-border);
    padding: 0 14px;
}
.det-tab {
    padding: 12px 14px; border: none; background: transparent;
    color: var(--text-secondary); font-size: 13px; font-weight: 600;
    cursor: pointer; transition: background 0.2s ease, border-color 0.2s ease, opacity 0.2s ease, transform 0.2s ease;
    border-bottom: 2px solid transparent;
    margin-bottom: -1px;
}
.det-tab.active { color: var(--brand-blue); border-bottom-color: var(--brand-blue); }
.det-tab:hover:not(.active) { color: var(--text-color); }
.det-tab-pane { display: none; padding: 18px 20px; }
.det-tab-pane.active { display: block; }
.det-tab-pane.html-render { line-height: 1.8; font-size: 14px; color: var(--text-color); }
.det-tab-pane.html-render img { width: auto; max-width: 100%; height: auto; border-radius: 12px; margin: 10px 0; }
.det-tab-pane.html-render p { margin: 10px 0; }
.det-tab-pane.html-render h1, .det-tab-pane.html-render h2, .det-tab-pane.html-render h3 { margin: 14px 0 8px; font-weight: 600; }
.det-tab-pane.html-render ul, .det-tab-pane.html-render ol { padding-left: 24px; margin: 10px 0; }
.det-tab-pane.html-render blockquote {
    border-left: 3px solid var(--brand-blue);
    padding: 4px 14px; margin: 12px 0;
    background: rgba(0,113,227,0.04); color: var(--text-secondary);
}

.det-spec-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.det-spec-table th, .det-spec-table td {
    padding: 10px 10px; text-align: left;
    border-bottom: 1px solid var(--glass-border);
    vertical-align: top;
}
.det-spec-table th { color: var(--text-secondary); font-weight: 500; width: 110px; }
.det-spec-table tr:last-child th, .det-spec-table tr:last-child td { border-bottom: none; }

/* ===== Image lightbox ===== */
#detLightbox {
    display: none; position: fixed; inset: 0; z-index: 10001;
    background: rgba(0,0,0,0.9); align-items: center; justify-content: center;
    padding: 20px; cursor: zoom-out;
}
#detLightbox.active { display: flex; }
#detLightbox img { max-width: 100%; max-height: 95vh; border-radius: 18px; }
#detLightbox .lb-close {
    position: absolute; top: 20px; right: 20px;
    width: 40px; height: 40px; border-radius: 50%;
    background: rgba(255,255,255,0.15); color: #fff;
    border: none; font-size: 22px; cursor: pointer;
    display: flex; align-items: center; justify-content: center;
}

/* ===== Mobile sticky bottom buy bar ===== */
.det-mobile-bar { display: none; }

@media (max-width: 900px) {
    .det-wrap { grid-template-columns: 1fr; }
    .det-gallery { position: static; }
    .det-main-img { max-width: 100%; max-height: 360px; }
}
@media (max-width: 600px) {
    .det-info { padding: 14px 16px; border-radius: 14px; }
    .det-info h1 { font-size: 17px; }
    .det-price { font-size: 22px; }
    .det-tabs { padding: 0 8px; overflow-x: auto; }
    .det-tab { padding: 10px 10px; font-size: 12px; white-space: nowrap; }
    .det-tab-pane { padding: 14px 16px; }
    .det-main-img { max-height: 280px; }

    .det-cta-row { display: none; }
    .det-mobile-bar {
        display: flex; position: fixed; bottom: 0; left: 0; right: 0;
        background: var(--nav-bg);
        border-top: 1px solid var(--glass-border);
        padding: 12px 14px; gap: 10px; z-index: 10000;
        padding-bottom: calc(12px + env(safe-area-inset-bottom));
        align-items: center;
    }
    .det-mobile-bar .det-mobile-price {
        flex: 0 0 auto; padding: 0 6px;
        font-size: 18px; font-weight: 700; color: var(--brand-blue);
    }
    .det-mobile-bar .det-buy-btn { flex: 1; padding: 14px; font-size: 15px; }
    main.lz-main { padding-bottom: 100px; }
}

/* ===== buy.php ===== */
.cf-breadcrumb { font-size: 13px; color: var(--text-secondary); margin-bottom: 18px; }
.cf-breadcrumb a { color: var(--text-secondary); text-decoration: none; }
.cf-breadcrumb a:hover { color: var(--brand-blue); }
.cf-breadcrumb .sep { margin: 0 6px; opacity: .5; }

.cf-wrap { max-width: 720px; margin: 0 auto; }

/* 顶部商品摘要条 */
.cf-summary {
    background: var(--card-bg);
    border: 1px solid var(--glass-border); border-radius: 20px;
    padding: 18px; display: flex; gap: 16px; align-items: center;
    margin-bottom: 18px;
}
.cf-summary-img {
    width: 88px; height: 88px; border-radius: 18px; overflow: hidden;
    background: var(--bg-color); flex-shrink: 0; border: 1px solid var(--glass-border);
}
.cf-summary-img img { width: 100%; height: 100%; object-fit: cover; }
.cf-summary-info { flex: 1; min-width: 0; }
.cf-summary-info h2 {
    font-size: 16px; font-weight: 600; margin: 0 0 6px;
    overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.cf-summary-attrs {
    display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 6px;
}
.cf-summary-attrs span {
    font-size: 11px; padding: 2px 8px; border-radius: 6px;
    background: var(--glass-border); color: var(--text-secondary);
}
.cf-summary-price {
    font-size: 16px; font-weight: 700; color: var(--brand-blue);
}
.cf-summary-qty {
    font-size: 13px; color: var(--text-secondary); margin-left: 6px;
}
.cf-summary-link {
    color: var(--text-secondary); text-decoration: none; font-size: 12px;
}
.cf-summary-link:hover { color: var(--brand-blue); }

.cf-card {
    background: var(--card-bg);
    border: 1px solid var(--glass-border); border-radius: 20px;
    padding: 22px; margin-bottom: 18px;
}
.cf-card h3 {
    font-size: 15px; font-weight: 600; margin: 0 0 14px;
    display: flex; align-items: center; gap: 8px;
}
.cf-card h3 .req { color: #ff3b30; font-size: 13px; }

.cf-flash {
    background: rgba(255,59,48,.1); color: #ff3b30;
    padding: 12px 16px; border-radius: 12px; margin-bottom: 16px; font-size: 13px;
}

.cf-redirect-card {
    text-align: center; padding: 50px 30px;
}
.cf-redirect-card a {
    display: inline-block; padding: 14px 28px; border-radius: 12px;
    background: var(--brand-blue); color: #fff; text-decoration: none;
    font-size: 15px; font-weight: 600; margin-top: 16px;
}

/* 表单 */
.cf-form label { display: block; font-size: 12px; font-weight: 600; color: var(--text-secondary); text-transform: uppercase; letter-spacing: .5px; margin-bottom: 6px; }
.cf-form input[type="email"], .cf-form input[type="text"], .cf-form input[type="number"], .cf-form input[type="file"], .cf-form textarea {
    width: 100%; padding: 12px 14px; border-radius: 12px; border: 1px solid var(--glass-border);
    background: var(--bg-color); color: var(--text-color); font-size: 14px; outline: none;
    margin-bottom: 14px; box-sizing: border-box; font-family: inherit;
}
.cf-form input:focus, .cf-form textarea:focus { border-color: var(--brand-blue); }
.cf-form textarea { resize: vertical; min-height: 70px; }

/* 支付方式 tabs */
.pay-tabs { display: flex; gap: 6px; margin-bottom: 14px; flex-wrap: wrap; }
.pay-tab {
    padding: 8px 16px; border-radius: 10px; border: 1px solid var(--glass-border);
    background: var(--bg-color); color: var(--text-color); font-size: 13px; font-weight: 600;
    cursor: pointer; transition: background 0.2s ease, border-color 0.2s ease, opacity 0.2s ease, transform 0.2s ease;
}
.pay-tab.active { background: var(--brand-blue); color: #fff; border-color: var(--brand-blue); }
.pay-tab:hover:not(.active) { border-color: var(--brand-blue); color: var(--brand-blue); }
.pay-content { display: none; }
.pay-content.active { display: block; }
.pay-no-method { text-align: center; padding: 20px 10px; color: var(--text-secondary); font-size: 14px; }

.cf-qr { text-align: center; padding: 10px 0; }
.cf-qr img { width: 180px; height: 180px; border-radius: 18px; border: 1px solid var(--glass-border); background: var(--card-bg); padding: 8px; }
.cf-qr p { font-size: 12px; color: var(--text-secondary); margin-top: 10px; }
.cf-qr p span.cmt { font-weight: 600; color: var(--text-color); font-family: monospace; }

.bank-card {
    background: var(--bg-color); border: 1px solid var(--glass-border); border-radius: 18px;
    padding: 18px;
}
.bank-card .bank-row { display: flex; justify-content: space-between; align-items: center; margin-bottom: 12px; }
.bank-card .bank-row:last-child { margin-bottom: 0; }
.bank-card .bank-label { font-size: 12px; color: var(--text-secondary); margin-bottom: 2px; }
.bank-card .bank-value { font-size: 14px; font-weight: 600; color: var(--text-color); font-family: monospace; }
.bank-card .copy-btn {
    padding: 4px 10px; border-radius: 6px; border: 1px solid var(--glass-border);
    background: var(--bg-color); color: var(--brand-blue); font-size: 11px; font-weight: 600;
    cursor: pointer; transition: background 0.2s ease, border-color 0.2s ease, opacity 0.2s ease, transform 0.2s ease;
}
.bank-card .copy-btn:hover { background: rgba(0,113,227,.08); }

/* Total + submit */
.cf-total-bar {
    background: var(--card-bg);
    border: 1px solid var(--glass-border); border-radius: 20px;
    padding: 22px; margin-top: 18px;
}
.cf-total-row {
    display: flex; justify-content: space-between; align-items: center;
    padding: 6px 0; font-size: 14px; color: var(--text-secondary);
}
.cf-total-row.grand {
    padding: 14px 0 6px; border-top: 1px solid var(--glass-border); margin-top: 10px;
    font-size: 16px; color: var(--text-color); font-weight: 600;
}
.cf-total-row.grand b { font-size: 26px; color: var(--brand-blue); letter-spacing: -.5px; }

.cf-submit {
    width: 100%; padding: 16px; border-radius: 18px; border: none;
    background: var(--brand-blue); color: #fff; font-size: 16px; font-weight: 600;
    cursor: pointer; transition: background 0.2s ease, border-color 0.2s ease, opacity 0.2s ease, transform 0.2s ease; margin-top: 16px;
    display: flex; align-items: center; justify-content: center;
}
.cf-submit:hover:not(:disabled) { opacity: .9; transform: scale(1.01); }
.cf-submit:disabled { opacity: .6; cursor: not-allowed; }
.cf-spinner {
    display: inline-block; width: 14px; height: 14px;
    border: 2px solid rgba(255,255,255,.3); border-top-color: #fff;
    border-radius: 50%; animation: spin .8s linear infinite;
    margin-right: 8px;
}
@keyframes spin { to { transform: rotate(360deg); } }

.cf-hint {
    background: rgba(0,113,227,.06); border-radius: 10px; padding: 12px 14px;
    font-size: 12px; color: var(--text-secondary); line-height: 1.6;
}

.file-hint { font-size: 11px; color: var(--text-secondary); margin-top: -8px; margin-bottom: 12px; }

/* 地址确认 modal */
.addr-modal-overlay {
    display: none; position: fixed; inset: 0; background: rgba(0,0,0,.5);
    z-index: 9999;
    align-items: center; justify-content: center;
}
.addr-modal-overlay.show { display: flex; }
.addr-modal {
    background: var(--card-bg); border: 1px solid var(--glass-border); border-radius: 20px;
    padding: 28px; max-width: 400px; width: 90%; }
.addr-modal h4 { font-size: 18px; font-weight: 700; margin: 0 0 14px; }
.addr-modal .addr-detail { background: var(--bg-color); border-radius: 12px; padding: 16px; margin-bottom: 20px; font-size: 14px; line-height: 1.8; }
.addr-modal .addr-item { display: flex; gap: 8px; }
.addr-modal .addr-label { color: var(--text-secondary); white-space: nowrap; }
.addr-modal .addr-btns { display: flex; gap: 10px; }
.addr-modal button {
    flex: 1; padding: 13px; border-radius: 11px; border: none;
    font-size: 14px; font-weight: 600; cursor: pointer; transition: background 0.2s ease, border-color 0.2s ease, opacity 0.2s ease, transform 0.2s ease;
}
.addr-btn-cancel { background: var(--bg-color); color: var(--text-color); border: 1px solid var(--glass-border); }
.addr-btn-confirm { background: var(--brand-blue); color: #fff; }

.login-card {
    text-align: center; padding: 40px 20px;
}
.login-card p { color: var(--text-secondary); font-size: 14px; margin-bottom: 20px; }
.login-card a {
    display: inline-block; padding: 14px 30px; border-radius: 12px;
    background: var(--brand-blue); color: #fff; font-size: 15px; font-weight: 600;
    text-decoration: none;
}

@media (max-width: 600px) {
    .cf-summary { padding: 14px; gap: 12px; }
    .cf-summary-img { width: 70px; height: 70px; }
    .cf-summary-info h2 { font-size: 14px; }
    .cf-card { padding: 18px; }
    .cf-total-bar { padding: 18px; }
}

/* ===== user.php ===== */
.user-header {
    background: var(--card-bg);
    border: 1px solid var(--glass-border); border-radius: 20px;
    padding: 28px; margin-bottom: 24px;
    display: flex; align-items: center; gap: 18px;
}
.user-avatar {
    width: 64px; height: 64px; border-radius: 50%; object-fit: cover;
    border: 2px solid var(--glass-border); overflow: hidden; flex-shrink: 0;
}
.user-avatar .preset-avatar-art {
    width: 100%; height: 100%; display: block; border-radius: 50%;
}
.user-name { font-size: 20px; font-weight: 700; margin-bottom: 4px; }
.user-meta { font-size: 13px; color: var(--text-secondary); }

.order-card {
    background: var(--card-bg);
    border: 1px solid var(--glass-border); border-radius: 20px; padding: 24px;
}
.order-card h3 { font-size: 18px; font-weight: 700; margin: 0 0 18px; display: flex; align-items: center; justify-content: space-between; }
.order-card h3 a { font-size: 13px; color: var(--text-secondary); text-decoration: none; font-weight: normal; }
.order-card h3 a:hover { color: var(--brand-blue); }

.order-table { width: 100%; border-collapse: collapse; font-size: 14px; }
.order-table th {
    text-align: left; padding: 10px 12px; font-size: 12px; color: var(--text-secondary);
    font-weight: 600; text-transform: uppercase; letter-spacing: 0.5px;
    border-bottom: 1px solid var(--glass-border);
}
.order-table td { padding: 14px 12px; border-bottom: 1px solid var(--glass-border); vertical-align: top; }
.order-table tr:last-child td { border-bottom: none; }
.order-table tr.clickable { cursor: pointer; transition: background 0.15s; }
.order-table tr.clickable:hover td { background: rgba(0,113,227,0.04); }
.order-id { font-family: monospace; font-size: 12px; color: var(--text-secondary); }
.order-status {
    display: inline-block; padding: 4px 12px; border-radius: 20px;
    font-size: 12px; font-weight: 600;
}
.status-wait { background: rgba(255,149,0,0.12); color: #ff9500; }
.status-ship { background: rgba(52,199,89,0.12); color: #34c759; }
.status-done { background: rgba(0,113,227,0.12); color: var(--brand-blue); }
.status-refund { background: rgba(142,142,147,0.15); color: var(--text-secondary); }

/* 详情卡 */
.detail-grid {
    display: grid; grid-template-columns: 1.4fr 1fr; gap: 20px; margin-bottom: 18px;
}
.detail-section {
    background: rgba(0,0,0,0.02); border: 1px solid var(--glass-border);
    border-radius: 18px; padding: 18px;
}
[data-theme="dark"] .detail-section { background: rgba(255,255,255,0.03); }
.detail-section h4 { font-size: 12px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.5px; color: var(--text-secondary); margin: 0 0 12px; }
.detail-row { display: flex; justify-content: space-between; gap: 12px; padding: 8px 0; font-size: 14px; }
.detail-row:not(:last-child) { border-bottom: 1px dashed var(--glass-border); }
.detail-row .k { color: var(--text-secondary); flex-shrink: 0; }
.detail-row .v { text-align: right; word-break: break-all; }
.detail-screenshot {
    margin-top: 10px; border-radius: 12px; overflow: hidden;
    border: 1px solid var(--glass-border); aspect-ratio: 4/3; background: var(--bg-color);
    display: flex; align-items: center; justify-content: center;
}
.detail-screenshot img { width: 100%; height: 100%; object-fit: cover; cursor: zoom-in; }
.detail-screenshot.empty { color: var(--text-secondary); font-size: 13px; }
.detail-tracking {
    background: rgba(52,199,89,0.06); border: 1px solid rgba(52,199,89,0.2);
    border-radius: 12px; padding: 14px; margin-bottom: 14px; font-size: 13px;
}
.detail-tracking strong { color: #34c759; }
.detail-back {
    display: inline-flex; align-items: center; gap: 4px; color: var(--text-secondary);
    text-decoration: none; font-size: 13px; margin-bottom: 16px;
}
.detail-back:hover { color: var(--brand-blue); }

/* 履约进度条 */
.order-progress {
    background: rgba(0,113,227,0.04); border: 1px solid var(--glass-border);
    border-radius: 16px; padding: 24px 20px; margin-bottom: 20px;
    position: relative;
}
[data-theme="dark"] .order-progress { background: rgba(255,255,255,0.02); }
.order-progress.closed { background: rgba(142,142,147,0.08); }
.order-progress.closed .progress-steps { opacity: 0.45; filter: grayscale(0.6); }
.order-progress .closed-banner {
    text-align: center; color: var(--text-secondary); font-size: 14px;
    margin-bottom: 10px; font-weight: 600;
}
.progress-steps {
    display: flex; align-items: flex-start; justify-content: space-between;
    position: relative; padding: 0 6px;
}
.progress-steps::before {
    content: ""; position: absolute; left: 10%; right: 10%; top: 13px; height: 2px;
    background: var(--glass-border); z-index: 0;
}
.progress-steps .step-line-done {
    position: absolute; left: 10%; top: 13px; height: 2px;
    background: linear-gradient(90deg, #34c759 0%, #34c759 100%);
    z-index: 1; transition: width 0.4s ease;
}
.progress-step {
    flex: 1; display: flex; flex-direction: column; align-items: center; gap: 6px;
    position: relative; z-index: 2; min-width: 0;
}
.progress-dot {
    width: 28px; height: 28px; border-radius: 50%;
    border: 2px solid var(--glass-border); background: var(--bg-color);
    display: flex; align-items: center; justify-content: center;
    font-size: 14px; color: var(--text-secondary);
    transition: background 0.3s ease, border-color 0.3s ease, opacity 0.3s ease, transform 0.3s ease;
}
.progress-step.done .progress-dot {
    background: #34c759; border-color: #34c759; color: #fff;
}
.progress-step.current .progress-dot {
    background: var(--brand-blue); border-color: var(--brand-blue); color: #fff;
    box-shadow: 0 0 0 4px rgba(0,113,227,0.18);
    animation: pulse-dot 1.8s infinite;
}
@keyframes pulse-dot {
    0%, 100% { box-shadow: 0 0 0 4px rgba(0,113,227,0.18); }
    50% { box-shadow: 0 0 0 8px rgba(0,113,227,0.08); }
}
@media (prefers-reduced-motion: reduce) {
    .progress-step.current .progress-dot { animation: none; }
}
.progress-step .step-label { font-size: 13px; font-weight: 600; color: var(--text-color); text-align: center; }
.progress-step.current .step-label { color: var(--brand-blue); }
.progress-step.done .step-label { color: var(--text-secondary); }
.progress-step .step-time { font-size: 11px; color: var(--text-secondary); text-align: center; font-family: monospace; }
.progress-actions { display: flex; justify-content: center; gap: 12px; margin-top: 20px; padding-top: 16px; border-top: 1px dashed var(--glass-border); }
.btn-confirm-receipt {
    background: var(--brand-blue); color: #fff; border: none;
    padding: 10px 24px; border-radius: 10px; font-size: 14px; font-weight: 600;
    cursor: pointer; transition: background 0.2s ease, border-color 0.2s ease, opacity 0.2s ease, transform 0.2s ease;
}
.btn-confirm-receipt:hover { opacity: 0.9; transform: scale(1.02); }
.btn-confirm-receipt:disabled { opacity: 0.5; cursor: not-allowed; }

.row-progress-mini {
    display: inline-flex; align-items: center; gap: 3px; margin-top: 4px;
}
.row-progress-mini .mini-dot {
    width: 8px; height: 8px; border-radius: 50%; background: var(--glass-border);
}
.row-progress-mini .mini-dot.done { background: #34c759; }
.row-progress-mini .mini-dot.current { background: var(--brand-blue); }
.row-progress-mini .mini-bar { width: 14px; height: 2px; background: var(--glass-border); }
.row-progress-mini .mini-bar.done { background: #34c759; }

@media (max-width: 600px) {
    .order-progress { padding: 18px 12px; }
    .progress-step .step-label { font-size: 11px; }
    .progress-step .step-time { font-size: 10px; }
    .progress-dot { width: 24px; height: 24px; font-size: 12px; }
    .progress-steps::before, .progress-steps .step-line-done { top: 11px; }
}

.login-card {
    max-width: 380px; margin: 80px auto; text-align: center;
    background: var(--card-bg);
    border: 1px solid var(--glass-border); border-radius: 24px; padding: 50px 30px;
}
.login-card h2 { font-size: 22px; font-weight: 700; margin-bottom: 8px; }
.login-card p { color: var(--text-secondary); font-size: 14px; margin-bottom: 24px; }
.login-card a {
    display: block; padding: 16px; border-radius: 18px;
    background: var(--brand-blue); color: #fff; font-size: 16px; font-weight: 600;
    text-decoration: none; transition: background 0.2s ease, border-color 0.2s ease, opacity 0.2s ease, transform 0.2s ease;
}
.login-card a:hover { opacity: 0.9; }

.empty-state { text-align: center; padding: 50px 20px; color: var(--text-secondary); }
.empty-state p:first-child { font-size: 36px; margin-bottom: 10px; }

.support-link {
    text-align: center; margin-top: 40px; padding-top: 20px;
    border-top: 1px solid var(--glass-border);
}
.support-link a { color: var(--text-secondary); text-decoration: none; font-size: 13px; }
.support-link a:hover { color: var(--brand-blue); }

/* 截图放大 */
#imgViewer {
    display: none; position: fixed; inset: 0; z-index: 10000;
    background: rgba(0,0,0,0.85); align-items: center; justify-content: center;
    padding: 20px; cursor: zoom-out;
}
#imgViewer.active { display: flex; }
#imgViewer img { max-width: 100%; max-height: 100%; border-radius: 18px; }

@media (max-width: 800px) {
    .detail-grid { grid-template-columns: 1fr; }
}
@media (max-width: 600px) {
    .user-header { flex-direction: column; text-align: center; }
    .order-table { font-size: 13px; }
    .order-table th:nth-child(3), .order-table td:nth-child(3) { display: none; }
}

/* ===== address book (buy.php) ===== */
.shop-addr-list { display:flex; flex-direction:column; gap:8px; margin-bottom:14px; }
.shop-addr-empty { margin:0; font-size:12px; color:var(--text-secondary); }
.shop-addr-card {
  text-align:left; width:100%; cursor:pointer;
  background:var(--bg-color); border:1px solid var(--glass-border); border-radius:12px;
  padding:12px 14px; color:var(--text-color);
  transition:border-color .2s ease, background .2s ease;
}
.shop-addr-card:hover { border-color:var(--brand-blue); }
.shop-addr-card.active { border-color:var(--brand-blue); background:rgba(0,113,227,.06); }
.shop-addr-card__top { font-size:13px; margin-bottom:4px; display:flex; align-items:center; gap:8px; flex-wrap:wrap; }
.shop-addr-card__addr { font-size:12px; color:var(--text-secondary); line-height:1.5; }
.shop-addr-card__acts { margin-top:8px; display:flex; gap:12px; font-size:12px; color:var(--brand-blue); }
.shop-addr-card__acts .danger { color:#ff3b30; }
.shop-addr-def {
  font-size:10px; font-weight:600; padding:2px 8px; border-radius:980px;
  background:rgba(0,113,227,.12); color:var(--brand-blue);
}
.shop-addr-save {
  display:flex; align-items:center; gap:8px; margin-top:10px; font-size:12px; color:var(--text-secondary);
}
.shop-buy-again {
  display:inline-flex; align-items:center; gap:4px; margin-top:10px;
  padding:8px 14px; border-radius:980px; font-size:13px; font-weight:600;
  background:var(--brand-blue); color:#fff; text-decoration:none;
}
.shop-buy-again:hover { opacity:.9; }
.shop-buy-again--ghost {
  background:transparent; color:var(--brand-blue); border:1px solid var(--glass-border);
}
