/* ========================================
   iOS 高级精致主题 - Premium iOS Style
   专为卡密交易系统设计，追求精致细腻的视觉体验
   ======================================== */

/* CSS 变量定义 */
:root {
    --ios-bg-primary: #f5f7fa;
    --ios-bg-card: rgba(255, 255, 255, 0.92);
    --ios-bg-sidebar: rgba(249, 250, 251, 0.95);
    --ios-text-primary: #1d1d1f;
    --ios-text-secondary: #6e6e73;
    --ios-accent-blue: #007aff;
    --ios-accent-deep: #0051d5;
    --ios-price-color: #ff9500;
    --ios-border: rgba(0, 0, 0, 0.06);
    --ios-shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.04), 0 1px 2px rgba(0, 0, 0, 0.02);
    --ios-shadow-md: 0 4px 6px rgba(0, 0, 0, 0.05), 0 2px 4px rgba(0, 0, 0, 0.03), 0 0 1px rgba(0, 0, 0, 0.02);
    --ios-shadow-lg: 0 10px 15px rgba(0, 0, 0, 0.06), 0 4px 6px rgba(0, 0, 0, 0.04), 0 0 1px rgba(0, 0, 0, 0.02);
    --ios-shadow-xl: 0 20px 25px rgba(0, 0, 0, 0.08), 0 8px 10px rgba(0, 0, 0, 0.05), 0 0 1px rgba(0, 0, 0, 0.02);
    --ios-hover-bg: rgba(0, 122, 255, 0.08);
}

/* 全局背景 - iOS 风格轻微色调叠加 */
body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(180deg, rgba(245, 247, 250, 0.15) 0%, rgba(255, 255, 255, 0.1) 100%);
    pointer-events: none;
    z-index: -1;
}

body {
    color: var(--ios-text-primary) !important;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* Header iOS 风格 */
header {
    background: rgba(255, 255, 255, 0.70) !important;
    backdrop-filter: saturate(180%) blur(20px) !important;
    -webkit-backdrop-filter: saturate(180%) blur(20px) !important;
    box-shadow: inset 0 -1px 0 0 rgba(0, 0, 0, 0.08), var(--ios-shadow-sm) !important;
    border-bottom: none;
    border-radius: 0;
    position: relative;
    z-index: 1000;
}

header .container ul li a {
    color: var(--ios-text-primary) !important;
    text-shadow: none !important;
    font-weight: 500;
    border-radius: 8px;
    padding: 6px 12px !important;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    letter-spacing: -0.01em;
}

header .container ul li a:hover {
    color: var(--ios-accent-blue) !important;
    background: var(--ios-hover-bg);
}

header .container .active a {
    color: var(--ios-accent-blue) !important;
    font-weight: 600;
    background: rgba(0, 122, 255, 0.12);
}

header .input-search,
header .input-search:focus {
    background: rgba(142, 142, 147, 0.12) !important;
    border: 1px solid transparent !important;
    color: var(--ios-text-primary) !important;
    border-radius: 10px !important;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    font-size: 15px;
}

header .input-search:focus {
    background: rgba(255, 255, 255, 0.95) !important;
    border-color: var(--ios-accent-blue) !important;
    box-shadow: 0 0 0 4px rgba(0, 122, 255, 0.1), var(--ios-shadow-md) !important;
}

header .input-search::placeholder {
    color: var(--ios-text-secondary) !important;
}

/* 公告卡片 iOS 风格 */
main .site-notice {
    background: rgba(255, 255, 255, 0.70) !important;
    backdrop-filter: saturate(180%) blur(20px) !important;
    -webkit-backdrop-filter: saturate(180%) blur(20px) !important;
    box-shadow: var(--ios-shadow-md) !important;
    border: 1px solid rgba(0, 0, 0, 0.04) !important;
    color: var(--ios-text-primary) !important;
    border-radius: 16px !important;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    z-index: 1;
}

main .site-notice.rounded {
    border-radius: 16px !important;
}

main .site-notice:hover {
    box-shadow: var(--ios-shadow-lg) !important;
    transform: translateY(-2px);
    border-color: rgba(0, 122, 255, 0.12) !important;
}

/* 分类卡片 iOS 风格 */
main .category {
    background: rgba(255, 255, 255, 0.68) !important;
    backdrop-filter: saturate(180%) blur(20px) !important;
    -webkit-backdrop-filter: saturate(180%) blur(20px) !important;
    box-shadow: var(--ios-shadow-md) !important;
    border: 1px solid rgba(0, 0, 0, 0.04) !important;
    border-radius: 16px !important;
    overflow: hidden;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

main .category:hover {
    box-shadow: var(--ios-shadow-lg) !important;
    border-color: rgba(0, 122, 255, 0.12) !important;
}

/* 登录/注册按钮 iOS 风格 */
.btn-ios-login,
.btn-ios-register {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 6px 14px;
    font-size: 14px;
    font-weight: 500;
    border-radius: 10px;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    text-decoration: none;
    letter-spacing: -0.01em;
}

.btn-ios-login {
    background: transparent;
    color: var(--ios-accent-blue) !important;
    border: 1.5px solid var(--ios-accent-blue);
}

.btn-ios-login:hover {
    background: var(--ios-hover-bg);
    transform: translateY(-1px);
}

.btn-ios-register {
    background: var(--ios-accent-blue);
    color: white !important;
    border: 1.5px solid var(--ios-accent-blue);
    margin-left: 6px;
}

.btn-ios-register:hover {
    background: var(--ios-accent-deep);
    border-color: var(--ios-accent-deep);
    transform: translateY(-1px);
    box-shadow: 0 2px 6px rgba(0, 122, 255, 0.3);
}

/* 侧边栏 iOS 风格 */
.category-sidebar-tree {
    flex: 0 0 280px;
    min-width: 280px;
    max-width: 280px;
    position: sticky;
    top: 20px;
    align-self: flex-start;
    max-height: calc(100vh - 120px);
    overflow-y: auto;
    overflow-x: hidden;
    padding: 20px 0;
    background: rgba(249, 250, 251, 0.72) !important;
    backdrop-filter: saturate(180%) blur(20px) !important;
    -webkit-backdrop-filter: saturate(180%) blur(20px) !important;
    box-shadow: inset -1px 0 0 0 rgba(0, 0, 0, 0.06), var(--ios-shadow-md) !important;
    border-right: none !important;
    border-radius: 16px !important;
}

/* 侧边栏滚动条 iOS 风格 */
.category-sidebar-tree::-webkit-scrollbar {
    width: 6px;
}

.category-sidebar-tree::-webkit-scrollbar-track {
    background: rgba(0, 0, 0, 0.02);
    border-radius: 3px;
}

.category-sidebar-tree::-webkit-scrollbar-thumb {
    background: rgba(0, 0, 0, 0.1);
    border-radius: 3px;
}

.category-sidebar-tree::-webkit-scrollbar-thumb:hover {
    background: rgba(0, 0, 0, 0.15);
}

.category-link-tree,
.category-label-tree {
    display: flex;
    align-items: center;
    position: relative;
    cursor: pointer;
    color: var(--ios-text-primary) !important;
    border-bottom: none !important;
    font-weight: 500;
    border-radius: 10px;
    margin: 3px 8px;
    padding: 10px 12px !important;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    letter-spacing: -0.01em;
    font-size: 15px;
    text-decoration: none;
}

/* 有子分类的条目，为展开箭头留出右侧空间 */
.category-label-tree {
    padding-right: 36px !important;
}

.category-link-tree:hover,
.category-label-tree:hover {
    background: var(--ios-hover-bg) !important;
    color: var(--ios-accent-blue) !important;
}

.category-link-tree.active,
.category-label-tree.active {
    background: rgba(0, 122, 255, 0.15) !important;
    color: var(--ios-accent-blue) !important;
    border-left: none !important;
    font-weight: 600;
    box-shadow: inset 0 0 0 1px rgba(0, 122, 255, 0.2);
}

/* 二级分类 iOS 风格 */
.category-children-tree {
    background: rgba(0, 0, 0, 0.03) !important;
    border-top: none;
    border-radius: 10px;
    margin: 0;
    padding: 0;
    box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.04);
    max-height: 0;
    overflow: hidden;
    opacity: 0;
    transition: max-height 0.3s cubic-bezier(0.4, 0, 0.2, 1),
                opacity 0.3s cubic-bezier(0.4, 0, 0.2, 1),
                margin 0.3s cubic-bezier(0.4, 0, 0.2, 1),
                padding 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.cat-toggle-tree:checked ~ .category-children-tree {
    max-height: 2000px;
    opacity: 1;
    margin: 0 8px 6px 8px;
    padding: 4px 0;
}

.category-child-link-tree {
    display: flex;
    align-items: center;
    color: var(--ios-text-secondary) !important;
    background: transparent;
    border-bottom: none !important;
    border-radius: 0;
    margin: 0;
    padding: 8px 12px 8px 28px !important;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    font-size: 14px;
    text-decoration: none;
    position: relative;
}

.category-child-link-tree i {
    margin-right: 6px;
    font-size: 12px;
}

.category-child-link-tree:hover {
    background: var(--ios-hover-bg) !important;
    color: var(--ios-accent-blue) !important;
}

.category-child-link-tree.active {
    background: rgba(0, 122, 255, 0.15) !important;
    color: var(--ios-accent-blue) !important;
    border-left: none !important;
    font-weight: 600;
    box-shadow: inset 0 0 0 1px rgba(0, 122, 255, 0.2);
}

/* Footer 清爽主题 */
footer {
    color: var(--fresh-text-secondary) !important;
}

footer a {
    color: var(--fresh-accent-blue) !important;
}

/* 滚动条清爽主题 */
.category-sidebar-tree::-webkit-scrollbar {
    width: 8px;
}

.category-sidebar-tree::-webkit-scrollbar-track {
    background: transparent;
}

.category-sidebar-tree::-webkit-scrollbar-thumb {
    background: linear-gradient(to bottom, #cbd5e1, #94a3b8);
    border-radius: 10px;
    transition: all 0.3s ease;
}

.category-sidebar-tree::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(to bottom, #94a3b8, #64748b);
}

/* 按钮 iOS 风格 */
.btn-primary {
    background: var(--ios-accent-blue) !important;
    border: none !important;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.12), 0 1px 3px rgba(0, 122, 255, 0.25) !important;
    font-weight: 600;
    border-radius: 12px !important;
    padding: 10px 20px !important;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    letter-spacing: -0.01em;
}

.btn-primary:hover {
    background: var(--ios-accent-deep) !important;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.14), 0 3px 8px rgba(0, 122, 255, 0.3) !important;
    transform: translateY(-1px);
}

.btn-primary:active {
    transform: translateY(0);
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.12) !important;
}

.btn-outline-primary {
    border-color: var(--ios-accent-blue) !important;
    color: var(--ios-accent-blue) !important;
    font-weight: 600;
    border-radius: 12px !important;
    border-width: 1.5px !important;
    padding: 10px 20px !important;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    letter-spacing: -0.01em;
}

.btn-outline-primary:hover {
    background: var(--ios-accent-blue) !important;
    color: white !important;
    transform: translateY(-1px);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.12), 0 2px 6px rgba(0, 122, 255, 0.3);
}

/* 下拉菜单 iOS 风格 */
.dropdown-menu {
    background: rgba(255, 255, 255, 0.80) !important;
    backdrop-filter: saturate(180%) blur(20px) !important;
    -webkit-backdrop-filter: saturate(180%) blur(20px) !important;
    border: 1px solid rgba(0, 0, 0, 0.06) !important;
    box-shadow: var(--ios-shadow-xl) !important;
    border-radius: 14px !important;
    padding: 6px !important;
    z-index: 1050 !important;
}

.dropdown-item {
    color: var(--ios-text-primary) !important;
    border-radius: 8px !important;
    padding: 8px 14px !important;
    margin: 2px 0 !important;
    transition: all 0.15s cubic-bezier(0.4, 0, 0.2, 1);
    font-size: 15px;
    letter-spacing: -0.01em;
}

.dropdown-item:hover {
    background: var(--ios-hover-bg) !important;
    color: var(--ios-accent-blue) !important;
}

.dropdown-divider {
    border-color: rgba(0, 0, 0, 0.06) !important;
    margin: 6px 8px !important;
}

/* 表格 iOS 风格 */
.table {
    color: var(--ios-text-primary) !important;
}

.table th {
    color: var(--ios-accent-blue) !important;
    font-weight: 600;
    letter-spacing: -0.01em;
}

.table tr {
    border-color: rgba(0, 0, 0, 0.04) !important;
}

/* 半透明卡片 iOS 风格 */
.translucent {
    background: var(--ios-bg-card) !important;
    backdrop-filter: saturate(180%) blur(20px) !important;
    -webkit-backdrop-filter: saturate(180%) blur(20px) !important;
}

/* 悬停效果优化 */
.lev-animation:hover {
    box-shadow: var(--ios-shadow-lg) !important;
}

/* 价格和重点信息突出 */
.item-price {
    color: var(--ios-price-color) !important;
    font-weight: 700 !important;
}

/* 成功/库存状态颜色 */
.text-success {
    color: #34c759 !important;
}

/* 商品数量徽章 iOS 风格 */
.item-count-badge-tree {
    background: rgba(0, 122, 255, 0.12) !important;
    color: var(--ios-accent-blue) !important;
    font-weight: 600;
    border-radius: 10px !important;
    padding: 3px 9px !important;
    font-size: 13px !important;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.3);
    letter-spacing: -0.01em;
}

/* ========================================
   商品列表图标优化样式
   ======================================== */

/* 表头图标样式 */
.table thead th i {
    margin-right: 6px;
    color: var(--fresh-accent-blue);
    font-size: 16px;
}

/* 商品名称文本 */
.item-name-text {
    font-weight: 500;
}

/* 价格数值（移除图标，只保留样式） */
.price-value {
    font-weight: 700;
    font-size: 16px;
    color: var(--fresh-price-color);
}

/* 库存单元格 */
.stock-cell {
    color: #10b981 !important;
}

.stock-value {
    font-weight: 600;
    font-size: 15px;
    color: #10b981;
}

/* 批发图标 */
.wholesale-icon {
    margin-left: 6px;
    color: #f59e0b !important;
    font-size: 16px;
    animation: bounce-icon 1.5s ease-in-out infinite;
}

@keyframes bounce-icon {
    0%, 100% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(-3px);
    }
}

/* 购买按钮 iOS 风格 */
.btn-buy-it {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 6px 14px;
    background: var(--ios-accent-blue);
    color: white !important;
    text-decoration: none;
    border-radius: 18px;
    font-weight: 600;
    font-size: 13px;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.12), 0 1px 4px rgba(0, 122, 255, 0.2);
    letter-spacing: -0.01em;
}

.btn-buy-it:hover {
    transform: translateY(-1px) scale(1.02);
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.14), 0 3px 8px rgba(0, 122, 255, 0.3);
    background: var(--ios-accent-deep);
}

.btn-buy-it:active {
    transform: translateY(0) scale(1);
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.12);
}

.btn-buy-it i {
    font-size: 11px;
    animation: heart-beat 1.5s ease-in-out infinite;
}

@keyframes heart-beat {
    0%, 100% {
        transform: scale(1);
    }
    10%, 30% {
        transform: scale(1.1);
    }
    20%, 40% {
        transform: scale(1);
    }
}

/* 表格行悬停效果 iOS 风格 */
.item-content {
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.item-content:hover {
    background: rgba(0, 122, 255, 0.04) !important;
}

.item-content:hover .item-icon {
    transform: scale(1.08);
    box-shadow: 0 2px 8px rgba(0, 122, 255, 0.25);
}

.item-icon {
    width: 36px;
    height: 36px;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
}

/* 表格垂直对齐修复 */
.table td {
    vertical-align: middle !important;
    padding: 14px 12px !important;
}

.table thead th {
    padding: 12px 12px !important;
    background: rgba(0, 0, 0, 0.015);
    border-bottom: 1px solid rgba(0, 0, 0, 0.04) !important;
    font-size: 14px;
}

/* ======================================== */

/* Logo 和图标圆润优化 */
header .shop-logo {
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.2);
    transition: all 0.3s ease;
}

header .shop-logo:hover {
    transform: scale(1.05) rotate(5deg);
    box-shadow: 0 6px 16px rgba(59, 130, 246, 0.3);
}

/* ======================================== */

* {
    font-family: "微软雅黑", serif;
}

.site-notice img {
    max-width: 100%;
    border-radius: 4px;
}

.site-notice video {
    max-width: 100%;
}

.site-notice iframe {
    max-width: 100%;
}

header .input-search, header .input-search:focus {
    background-color: #ffffff1c;
    border: 1px solid rgba(255, 255, 255, 0.45);
}

header .container ul li a {
    font-size: 16px;
    text-shadow: 2px 2px 4px #a9c9fd;
}

.text-shadow {
    color: whitesmoke; /* 深灰色字体 */
    text-shadow: 2px 2px 4px #aaa, /* 第一层阴影，浅灰 */ -2px -2px 6px #555, /* 第二层阴影，深灰 */ 2px -2px 6px #333, /* 第三层阴影，更深灰 */ -2px 2px 8px #111; /* 第四层阴影，几乎黑色 */
}

header .shop-logo {
    width: 38px;
    height: 38px;
    border-radius: 50%;
}

.select2-container--bootstrap-5 .select2-selection {
    min-height: 2.1rem !important;
    display: flex !important;
    align-items: center !important;
    /* justify-content: center !important;*/
    padding: 0 2.25rem 0 .75rem;
    box-sizing: border-box !important;
    border-radius: 0 !important;
}


.select2-container .select2-selection--single {
    height: auto !important;
    padding: 0 2.25rem 0 .75rem !important;
}

.select2-container--bootstrap-5 .select2-selection--single .select2-selection__rendered {
    line-height: 1.05rem !important;
}

header .container .active a {
    color: #538ce9 !important;
}

main .site-notice p {
    margin-bottom: 0;
}

main .category .card-body {
    padding-bottom: 0;
}

main .category .category-icon {
    width: 24px;
    height: 24px;
    border-radius: 50%;
}

main .category .item-icon {
    width: 22px;
    height: 22px;
}

.nowrap {
    white-space: nowrap;
}


.lev-animation {
    transition: transform 0.2s ease-in-out;
}

.lev-animation:hover {
    transform: translateY(-5px);
    box-shadow: #57e3edba 0px 0px 20px 1px;
}


.font-animation {
    transition: transform 0.2s ease-in-out;
}

.font-animation:hover {
    transform: translateY(-2px);
}

main .category .item-content a {
    text-decoration: none;
}

main .category .item-content .item-price {
    color: #ff5000;
}


main .item-table {
    border-collapse: separate;
    border-spacing: 0 3px;
}

/* 商品条目单元格 iOS 风格 */
.item-content td {
    padding: 10px 12px !important;
}

main .category table tr:last-child td {
    border-bottom: none;
}

main .category table tr {
    border-bottom: 1px solid rgba(214, 212, 230, 0.23);
    background: transparent !important;
}

.table > :not(caption) > * > * {
    background: transparent !important;
}


.table-vcenter td, .table-vcenter th {
    vertical-align: middle;
}

.category table th {
    color: #859cfa;
    font-size: 15px;
    font-weight: normal;
}


.translucent {
    background-color: #ffffffc4 !important;
}

.border-bottom {
    border-bottom: 1px solid rgba(128, 128, 128, 0.06) !important;
}


.pay-icon-alipay {
    color: #1578ff;
}

.pay-icon-wxpay {
    color: #26b240;
}

.pay-icon-qqpay {
    color: #0099fe;
}

@media (max-width: 767.98px) {
    .pay-item:active {
        transform: scale(1.01);
    }
}

@media (min-width: 992px) {
    .pay-item:not(article) {
        transition: all 0.4s;
    }

    .pay-item:not(article):hover {
        transform: translateY(-4px);
    }
}


/**
支付功能
 */

.pay-container .layout-box {
    margin-bottom: 16px;
    margin-top: 10px;
}

.pay-container .layout-box .title {
    margin-bottom: 8px;
    color: #9e9c9c;
}

.pay-container .pay-list {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: flex-start; /* 确保列表项靠左对齐 */
    margin: 0 -10px;
}

.pay-container .pay-list .pay-item {
    display: inline-flex;
    align-items: center;
    cursor: pointer;
    padding: 8px 12px;
    margin: 6px 10px 6px 10px;
    border: none;
    border-radius: 0;
    background-color: #f9f9f96b !important;
    transition: all 0.3s ease;
    background-image: none;
    color: #4d7c83;
}

.pay-container .pay-list .pay-item img {
    width: 26px;
    height: 26px;
    margin-right: 6px;
}

.pay-container .pay-list .pay-item:hover, .pay-container .pay-list .pay-item:focus {
    border-color: #aca8ff;
    box-shadow: 0 2px 5px rgba(0, 123, 255, 0.2);
    background-color: #eef4fe;
}

.pay-container .pay-list .pay-current {
    background-color: #accdf1c2 !important;
    box-shadow: 0 2px 8px rgba(0, 123, 255, 0.3);
}

.pay-container button {
    width: 100%;
    padding: 8px;
    font-size: 16px;
    color: #fff;
    background-color: #007bff;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
    margin-top: 20px;
    margin-bottom: 8px;
}

.pay-container button:hover {
    background-color: #0056b3;
}


/* 语言切换按钮 iOS 风格 */
.language-select-theme {
    width: auto !important;
    position: relative;
    z-index: 1050;
}

.language-select-theme.select2-container {
    z-index: 1050 !important;
}

.language-select-theme.select2-container--open {
    z-index: 1060 !important;
}

.language-select-theme .select2-dropdown {
    background: rgba(255, 255, 255, 0.80) !important;
    backdrop-filter: saturate(180%) blur(20px) !important;
    -webkit-backdrop-filter: saturate(180%) blur(20px) !important;
    border: 1px solid rgba(0, 0, 0, 0.06) !important;
    box-shadow: var(--ios-shadow-xl) !important;
    border-radius: 12px !important;
    padding: 6px !important;
    margin-top: 4px !important;
    z-index: 9999 !important;
}

.select2-container--bootstrap-5.select2-container--open .select2-dropdown {
    z-index: 9999 !important;
}

.language-select-theme .select2-dropdown .select2-results__options:not(.select2-results__options--nested) {
    max-height: initial !important;
    overflow: hidden;
}

.language-select-theme .select2-results__option {
    color: var(--ios-text-primary) !important;
    border-radius: 8px !important;
    padding: 8px 12px !important;
    margin: 2px 0 !important;
    transition: all 0.15s cubic-bezier(0.4, 0, 0.2, 1);
    font-size: 14px;
    letter-spacing: -0.01em;
}

.language-select-theme .select2-results__option:hover,
.language-select-theme .select2-results__option--highlighted {
    background: var(--ios-hover-bg) !important;
    color: var(--ios-accent-blue) !important;
}

.language-select-theme .select2-results__option[aria-selected=true] {
    background: rgba(0, 122, 255, 0.12) !important;
    color: var(--ios-accent-blue) !important;
    font-weight: 600;
}

.language-select-theme.select2-container--open {
    width: 150px !important;
}

.language-select-theme.select2-container--focus .select2-selection,
.select2-container--bootstrap-5.select2-container--open .select2-selection {
    border-color: var(--ios-accent-blue) !important;
    box-shadow: 0 0 0 4px rgba(0, 122, 255, 0.1) !important;
}

.language-select-theme .select2-selection {
    background: rgba(142, 142, 147, 0.12) !important;
    border: 1px solid transparent !important;
    color: var(--ios-text-primary) !important;
    border-radius: 10px !important;
    padding: 6px 12px !important;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    font-size: 14px;
    min-height: 32px !important;
    display: flex !important;
    align-items: center !important;
}

.language-select-theme .select2-selection:hover {
    background: rgba(142, 142, 147, 0.18) !important;
}

.language-select-theme .select2-selection--single {
    background-image: none !important;
    display: flex !important;
    align-items: center !important;
}

.language-select-theme .select2-selection__arrow {
    position: relative !important;
    height: auto !important;
    right: 0 !important;
    top: 0 !important;
    width: 20px !important;
    margin-left: 8px !important;
    flex-shrink: 0 !important;
}

.language-select-theme .select2-selection__arrow b {
    border-color: var(--ios-text-secondary) transparent transparent transparent !important;
    border-style: solid !important;
    border-width: 5px 4px 0 4px !important;
    height: 0 !important;
    left: 50% !important;
    margin-left: -4px !important;
    margin-top: -2px !important;
    position: absolute !important;
    top: 50% !important;
    width: 0 !important;
}

.language-select-theme .select2-selection__rendered {
    color: var(--ios-text-primary) !important;
    font-weight: 500;
    letter-spacing: -0.01em;
    padding: 0 !important;
    line-height: 20px !important;
    flex: 1 !important;
    display: block !important;
}

.language-select-theme .select2-selection__rendered .table-item-name {
    color: var(--ios-text-primary) !important;
}


@media (min-width: 768px) {
    .w-pc {
        min-width: 100px;
    }
}


/* ========================================
   树形菜单布局样式 - ShuishangyouqiTree
   ======================================== */

/* 主布局容器 - 左右两列 */
.main-layout-container {
    display: flex;
    gap: 20px;
    align-items: flex-start;
}

/* 分类菜单容器 */
.category-menu-tree {
    display: flex;
    flex-direction: column;
    gap: 0;
    padding-top: 8px;
}

/* 分类项容器 */
.category-item-tree {
    position: relative;
}

/* 隐藏的 checkbox（用于控制折叠） */
.cat-toggle-tree {
    display: none;
}

/* 分类文字 */
.category-text-tree {
    flex: 1;
    font-family: "微软雅黑", sans-serif;
    letter-spacing: 0.5px;
}

/* 商品数量徽章 */
.item-count-badge-tree {
    margin-left: auto;
    padding: 2px 8px;
    background: rgba(90, 127, 196, 0.15);
    border-radius: 12px;
    font-size: 11px;
    color: #5a7fc4;
    font-weight: 600;
}

.category-link-tree.active .item-count-badge-tree,
.category-label-tree.active .item-count-badge-tree,
.category-child-link-tree.active .item-count-badge-tree {
    background: rgba(90, 127, 196, 0.3);
}

/* 推荐商品特殊样式 */
.recommend-item .category-link-tree {
    background: rgba(255, 245, 230, 0.5);
    color: #c99a1f;
    font-weight: 600;
}

.recommend-item .category-link-tree:hover {
    background: rgba(255, 237, 210, 0.8);
    color: #b88a1b;
}

.recommend-item .category-link-tree.active {
    background: rgba(255, 220, 180, 0.9);
    color: #a67a16;
}

/* 右侧商品区域 */
.product-area-tree {
    flex: 1;
    min-width: 0;
}

/* 响应式布局 */
@media (max-width: 768px) {
    .main-layout-container {
        flex-direction: column;
    }

    .category-sidebar-tree {
        position: static;
        flex: 1 1 auto;
        max-width: 100%;
        width: 100%;
        max-height: 400px;
    }

    .product-area-tree {
        width: 100%;
    }

    /* 移动端商品列表优化 - 精美卡片式布局 */
    .item-table {
        display: block;
    }

    .item-table thead,
    .item-table tbody,
    .item-table tr {
        display: block;
    }

    /* 表头在移动端隐藏 */
    .item-table thead {
        display: none;
    }

    /* 每个商品变成精美卡片 */
    .item-table tbody tr {
        display: block;
        padding: 14px;
        margin-bottom: 12px;
        background: rgba(255, 255, 255, 0.7);
        border-radius: 14px;
        border: 1px solid rgba(0, 0, 0, 0.04);
        box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
        transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    }

    .item-table tbody tr:hover {
        background: rgba(0, 122, 255, 0.05);
        border-color: rgba(0, 122, 255, 0.15);
        box-shadow: 0 4px 12px rgba(0, 122, 255, 0.12);
        transform: translateY(-2px);
    }

    .item-table tbody tr td {
        display: block;
        padding: 0 !important;
        border: none !important;
    }

    /* 商品信息区域（图片+名称） */
    .item-table tbody tr td:first-child {
        margin-bottom: 12px;
        padding-bottom: 12px !important;
        border-bottom: 1px solid rgba(0, 0, 0, 0.04) !important;
    }

    .item-link-simple {
        display: flex !important;
        align-items: center;
        gap: 12px;
    }

    .item-icon {
        width: 50px !important;
        height: 50px !important;
        flex-shrink: 0;
    }

    .item-name-text {
        font-size: 15px;
        font-weight: 500;
        line-height: 1.4;
    }

    /* 底部信息区域 - 使用固定宽度确保对齐 */
    .item-table tbody tr td:not(:first-child) {
        display: inline-block;
        vertical-align: top;
        padding: 0 !important;
    }

    /* 价格区域 - 固定宽度 */
    .item-table tbody tr td:nth-child(2) {
        width: 35%;
    }

    /* 价格样式 - 左侧 */
    .item-table .item-price {
        display: flex;
        flex-direction: column;
        align-items: flex-start;
        justify-content: center;
        padding: 8px 0;
    }

    .item-table .item-price::before {
        content: '价格';
        display: block;
        font-size: 12px;
        font-weight: 500;
        color: var(--ios-text-secondary);
        margin-bottom: 4px;
    }

    .price-value {
        font-size: 18px;
        font-weight: 700;
        color: var(--ios-price-color);
        letter-spacing: -0.5px;
        font-variant-numeric: tabular-nums;
    }

    /* 库存区域 - 固定宽度 */
    .item-table tbody tr td:nth-child(3) {
        width: 28%;
    }

    /* 库存样式 - 中间 */
    .item-table .stock-cell {
        display: flex;
        flex-direction: column;
        align-items: flex-start;
        justify-content: center;
        padding: 8px 0;
        margin: 0;
    }

    .item-table .stock-cell::before {
        content: '库存';
        display: block;
        font-size: 12px;
        font-weight: 500;
        color: var(--ios-text-secondary);
        margin-bottom: 4px;
    }

    .stock-value {
        font-size: 16px;
        font-weight: 600;
        letter-spacing: -0.5px;
        font-variant-numeric: tabular-nums;
    }

    /* 购买按钮区域 - 自适应剩余宽度 */
    .item-table tbody tr td:last-child {
        width: auto;
        float: right;
        display: flex;
        align-items: center;
        justify-content: flex-end;
        height: 100%;
        padding-top: 8px !important;
    }

    .btn-buy-it {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        gap: 4px;
        padding: 8px 16px;
        font-size: 14px;
        font-weight: 600;
        min-width: 85px;
        border-radius: 18px;
        box-shadow: 0 2px 8px rgba(0, 122, 255, 0.25);
    }

    .btn-buy-it i {
        font-size: 11px;
    }

    .btn-buy-it:active {
        transform: scale(0.95);
    }

    /* 隐藏PC端的最小宽度限制 */
    .item-table .w-pc {
        min-width: auto !important;
    }

    .item-table .nowrap {
        white-space: normal;
    }

    /* 底部信息容器 - 使用flexbox居中对齐 */
    .item-table tbody tr::after {
        content: '';
        display: table;
        clear: both;
    }
}

@media (max-width: 576px) {
    .category-sidebar-tree {
        padding: 15px 0;
        max-height: 350px;
    }

    .category-link-tree,
    .category-label-tree {
        padding: 10px;
        font-size: 13px;
    }

    .category-icon-tree {
        width: 20px;
        height: 20px;
        margin-right: 8px;
    }

    .category-child-link-tree {
        padding: 8px 10px 8px 25px;
        font-size: 12px;
    }
}

@media print {
    .category-sidebar-tree {
        display: none;
    }

    .product-area-tree {
        width: 100%;
    }
}

/* ========================================
   iOS 风格细节优化
   ======================================== */

/* 滚动条 iOS 风格 */
.category-sidebar-tree::-webkit-scrollbar {
    width: 6px;
}

.category-sidebar-tree::-webkit-scrollbar-track {
    background: transparent;
}

.category-sidebar-tree::-webkit-scrollbar-thumb {
    background: rgba(0, 0, 0, 0.15);
    border-radius: 10px;
    transition: all 0.2s;
}

.category-sidebar-tree::-webkit-scrollbar-thumb:hover {
    background: rgba(0, 0, 0, 0.25);
}

/* Logo 和图标 iOS 风格 */
header .shop-logo {
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1), 0 1px 4px rgba(0, 122, 255, 0.15);
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

header .shop-logo:hover {
    transform: scale(1.05);
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.12), 0 2px 8px rgba(0, 122, 255, 0.2);
}

/* Header 用户下拉按钮 iOS 风格 */
header .dropdown {
    position: relative;
    z-index: 1050;
}

header .dropdown-toggle {
    border-radius: 20px;
    padding: 4px 10px 4px 4px;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

header .dropdown-toggle:hover {
    background: rgba(0, 0, 0, 0.04);
}

header .dropdown-toggle span {
    font-size: 14px;
    margin-left: 6px;
}

/* 分类图标 iOS 风格 */
.category-icon-tree {
    width: 24px;
    height: 24px;
    margin-right: 10px;
    border-radius: 10px !important;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.category-link-tree:hover .category-icon-tree,
.category-label-tree:hover .category-icon-tree {
    transform: scale(1.05);
    box-shadow: 0 2px 6px rgba(0, 122, 255, 0.2);
}

/* 展开图标旋转动画 */
.expand-icon-tree {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    transition: transform 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    font-size: 13px;
    color: var(--ios-text-secondary);
}

.cat-toggle-tree:checked ~ .category-label-tree .expand-icon-tree {
    transform: translateY(-50%) rotate(90deg);
    color: var(--ios-accent-blue);
}

/* Footer：完全透明，不加底色也不加背景模糊，文字直接叠在背景图上（靠 .text-shadow 保证可读） */
footer {
    color: var(--ios-text-secondary) !important;
    border-radius: 0;
    margin-top: 32px;
}

footer a {
    color: var(--ios-accent-blue) !important;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    text-decoration: none;
}

footer a:hover {
    color: var(--ios-accent-deep) !important;
}

/* 价格数值 iOS 风格 */
.price-value {
    font-weight: 700;
    font-size: 16px;
    color: var(--ios-price-color);
    letter-spacing: -0.02em;
}

/* 库存单元格 iOS 风格 */
.stock-cell {
    color: #34c759 !important;
}

.stock-value {
    font-weight: 600;
    font-size: 15px;
    color: #34c759;
    letter-spacing: -0.01em;
}

/* 批发图标 */
.wholesale-icon {
    margin-left: 5px;
    color: var(--ios-price-color) !important;
    font-size: 15px;
    animation: bounce-icon 1.5s ease-in-out infinite;
}

@keyframes bounce-icon {
    0%, 100% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(-2px);
    }
}

/* 商品名称链接 iOS 风格 */
.item-link-simple {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    text-decoration: none;
    color: var(--ios-text-primary) !important;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    letter-spacing: -0.01em;
}

.item-link-simple:hover {
    color: var(--ios-accent-blue) !important;
}

/* 商品名称文本 */
.item-name-text {
    font-weight: 500;
    font-size: 15px;
}

/* 表头图标样式 */
.table thead th i {
    margin-right: 5px;
    color: var(--ios-accent-blue);
    font-size: 15px;
}

/* 修复 Base.css 中缺少 .d-show 定义的问题 */
/* Base.css 只定义了 .d-hide{display:none}，但没有 .d-show，导致两个按钮同时显示 */

/* 通用的显示/隐藏类定义 */
.d-show {
    display: block !important;
}

.d-hide {
    display: none !important;
}

/* 针对 shop-checkout-btn 的特殊处理（需要 flex 布局） */
.shop-checkout-btn.d-show {
    display: flex !important;
}

.shop-checkout-btn.d-hide {
    display: none !important;
}

/* ========================================
   首页分类异步加载：右侧商品区局部遮罩
   由 Category.js 在请求期间给 .product-area-tree 加 is-loading 类，
   遮罩只覆盖右侧商品区，左侧分类菜单仍可继续点击；
   旧列表半透明保留在遮罩下方，避免切换时白屏闪烁。
   ======================================== */
.product-area-tree {
    position: relative;
}

.product-area-tree .shop-item-loading {
    position: absolute;
    inset: 0;
    z-index: 5;
    display: flex;
    flex-direction: column;
    align-items: center;
    /* 顶部对齐 + 内部 sticky，长列表下转圈始终停在视口中部而不是整块区域的几何中心 */
    justify-content: flex-start;
    background: rgba(255, 255, 255, 0.45);
    backdrop-filter: blur(1.5px);
    -webkit-backdrop-filter: blur(1.5px);
    border-radius: 16px;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.15s ease;
}

.product-area-tree.is-loading .shop-item-loading {
    opacity: 1;
    pointer-events: auto;
}

.product-area-tree .shop-item-loading .shop-item-loading-box {
    position: sticky;
    top: 42vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.6rem;
    padding: 1rem 1.5rem;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.85);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.08);
}

.product-area-tree .shop-item-loading .spinner-border {
    width: 1.75rem;
    height: 1.75rem;
    border-width: 0.2em;
    color: var(--bs-primary, #0d6efd);
}

.product-area-tree .shop-item-loading .shop-item-loading-text {
    font-size: 0.8rem;
    color: #6c757d;
    letter-spacing: 0.02em;
}


/* ========================================
   首页商品列表："加载更多"栏
   表格下方居中一行：按钮 + "已显示 x / 总数"计数；
   加载中按钮禁用并显示小转圈，全部加载完后按钮隐藏、计数改为"已全部显示"。
   ======================================== */
.shop-item-more {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 14px;
    padding: 16px 0 6px;
    flex-wrap: wrap;
}

.shop-item-more .btn-load-more {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 7px 20px;
    border: 0;
    border-radius: 18px;
    background: var(--ios-accent-blue, #007aff);
    color: #fff;
    font-weight: 600;
    font-size: 13px;
    letter-spacing: -0.01em;
    cursor: pointer;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.12), 0 1px 4px rgba(0, 122, 255, 0.2);
}

.shop-item-more .btn-load-more:hover:not(:disabled) {
    transform: translateY(-1px) scale(1.02);
    background: var(--ios-accent-deep, #0062cc);
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.14), 0 3px 8px rgba(0, 122, 255, 0.3);
}

.shop-item-more .btn-load-more:disabled {
    opacity: 0.7;
    cursor: default;
}

.shop-item-more .btn-load-more .spinner-border {
    width: 0.9rem;
    height: 0.9rem;
    border-width: 0.15em;
}

.shop-item-more .btn-load-more i {
    font-size: 11px;
}

.shop-item-more .shop-item-more-count {
    font-size: 12px;
    color: #8e8e93;
}

.shop-item-more .shop-item-more-count b {
    font-weight: 600;
    color: #3a3a3c;
}


/* ========================================
   商品详情页（Item.html）—— 与首页统一的 iOS 毛玻璃风格
   说明：
   1. 全部规则限定在 .item-page-tree 作用域内，只作用于详情页，购物车/结算页不受影响；
   2. 本文件前面"商品页面"一节的旧规则（渐变 SKU、橙色按钮等）仍保留，这里通过更高优先级覆盖，
      等购物车、结算页也改完后再统一清理；
   3. .item-amount 内的价格 span 由 item.js 写入固定的行内样式（#ff5000 / 26px），只能用 !important 覆盖；
   4. .item-image-main 的高度在 PC 端由 item.js 按右侧信息区高度写入行内 height，这里不强制高度。
   ======================================== */

/* 面包屑 */
.item-page-tree .item-breadcrumb-tree {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 12px;
    padding: 0 4px;
    font-size: 13px;
    color: var(--ios-text-secondary);
    min-width: 0;
}

.item-page-tree .item-breadcrumb-tree a {
    flex-shrink: 0;
    color: var(--ios-accent-blue);
    text-decoration: none;
    font-weight: 500;
}

.item-page-tree .item-breadcrumb-tree a:hover {
    color: var(--ios-accent-deep);
}

.item-page-tree .item-breadcrumb-tree > .bi-chevron-right {
    font-size: 11px;
    flex-shrink: 0;
}

/* 面包屑分类链接：最宽 8 个字，超出省略；空间不够时也可收缩，但至少保留 3 个字宽，
   保证两级分类名都很长时整行也不会撑出卡片（手机上会出现横向滚动） */
.item-page-tree .item-breadcrumb-tree a.item-breadcrumb-cate {
    flex-shrink: 1;
    min-width: 3em;
    max-width: 8em;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.item-page-tree .item-breadcrumb-current {
    /* 收缩权重远大于分类链接：窄屏时先省略商品名（下方大标题里已完整显示），商品名缩到底后分类才开始收缩 */
    flex-shrink: 1000;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    min-width: 0;
}

/* 卡片容器：与首页公告、商品列表卡片一致（半透明白 + 毛玻璃 + 16px 圆角） */
.item-page-tree .item-card-tree {
    background: rgba(255, 255, 255, 0.72) !important;
    backdrop-filter: saturate(180%) blur(20px) !important;
    -webkit-backdrop-filter: saturate(180%) blur(20px) !important;
    border: 1px solid rgba(0, 0, 0, 0.04);
    border-radius: 16px;
    box-shadow: var(--ios-shadow-md);
    padding: 24px;
    transition: box-shadow 0.3s cubic-bezier(0.4, 0, 0.2, 1), border-color 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.item-page-tree .item-card-tree:hover {
    box-shadow: var(--ios-shadow-lg);
    border-color: rgba(0, 122, 255, 0.12);
}

/* ---------- 左侧图片区 ---------- */
/* 商品图多为 logo/图标类小图，用 contain + 浅灰底，避免 cover 裁掉内容 */
.item-page-tree .item-image-main {
    height: 260px;
    padding: 0 !important;
    background: rgba(142, 142, 147, 0.08);
    border: 1px solid rgba(0, 0, 0, 0.04);
    border-radius: 14px;
    box-shadow: none;
    overflow: hidden;
}

/* .img-link 在 Base.css（OneUI）里有定位/行内块等设定，这里还原成默认，避免主图外框错位 */
.item-page-tree .item-image-main .img-link {
    display: revert !important;
}

.item-page-tree .item-image-show {
    width: 100%;
    height: 100%;
    object-fit: contain;
    object-position: center;
    border-radius: 14px;
    cursor: pointer;
}

/* 缩略图条：横向排列不换行，超出部分由 item.js 按鼠标移动/触摸拖动滚动 */
.item-page-tree .item-image-list {
    display: flex;
    position: relative;
    overflow: hidden;
    white-space: nowrap;
    gap: 8px;
    margin-top: 10px;
    padding: 2px;
    background: transparent;
    border-radius: 0;
}

/* 只有一张图时缩略图条没有意义，直接隐藏（不支持 :has 的旧浏览器会照常显示，无副作用） */
.item-page-tree .item-image-list:not(:has(.item-image-sku-mini:nth-child(2))) {
    display: none;
}

.item-page-tree .item-image-list .item-image-sku-mini {
    display: inline-block;
    flex: 0 0 auto;
    cursor: pointer;
    margin: 0 !important;
    border: 2px solid transparent;
    border-radius: 10px;
    box-shadow: var(--ios-shadow-sm);
    overflow: hidden;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.item-page-tree .item-image-list .item-image-sku-mini:hover {
    transform: translateY(-2px);
    border-color: rgba(0, 122, 255, 0.35);
}

.item-page-tree .item-image-list .item-image-sku-mini.image-active {
    border-color: var(--ios-accent-blue);
}

.item-page-tree .item-image-list img {
    width: 56px;
    height: 56px;
    border-radius: 8px;
    object-fit: contain;
    background: rgba(142, 142, 147, 0.08);
}

/* ---------- 右侧：标题与价格 ---------- */
.item-page-tree .item-title-content {
    display: block;
    background: transparent;
    border-radius: 0;
    padding: 0 0 16px 0;
    border-bottom: 1px solid rgba(0, 0, 0, 0.06);
}

.item-page-tree .item-title-text {
    margin: 0 0 12px 0;
    font-size: 20px;
    font-weight: 600;
    line-height: 1.45;
    color: var(--ios-text-primary);
    letter-spacing: -0.01em;
    word-break: break-word;
}

/* 价格条：浅橙底圆角块，呼应首页价格列的橙色 */
.item-page-tree .item-price-row {
    display: flex;
    align-items: baseline;
    gap: 12px;
    padding: 10px 16px;
    background: rgba(255, 149, 0, 0.08);
    border-radius: 12px;
}

.item-page-tree .item-price-label {
    font-size: 13px;
    color: var(--ios-text-secondary);
    flex-shrink: 0;
}

.item-page-tree .item-amount {
    color: var(--ios-price-color) !important;
    font-size: 15px;
    font-weight: 600;
    font-variant-numeric: tabular-nums;
}

.item-page-tree .item-amount span {
    color: var(--ios-price-color) !important;
    font-size: 28px !important;
    font-weight: 700;
    letter-spacing: -0.02em;
    margin-left: 2px;
}

/* ---------- 右侧：规格 / 控件 / 数量表单 ---------- */
.item-page-tree .item-controls {
    margin-top: 0;
    padding: 12px 0 0 0;
    border-radius: 0;
}

.item-page-tree .item-controls .table {
    margin-bottom: 16px;
}

.item-page-tree .item-controls .table tr {
    border-style: hidden !important;
}

.item-page-tree .item-controls .table td {
    padding: 10px 0 !important;
    border: none !important;
}

/* 左侧字段名列：固定宽度且不换行，修复原来"宝贝类/型"被折成两行的问题 */
.item-page-tree .item-controls .table td.sku-cate-td {
    width: 88px;
    white-space: nowrap;
    vertical-align: top !important;
    padding: 18px 12px 0 0 !important;
}

.item-page-tree .sku-cate-td .cate-name {
    font-size: 14px;
    font-weight: 500;
    color: var(--ios-text-secondary);
}

/* 规格选项：白底描边圆角块，选中态为蓝色描边 + 浅蓝底（与首页分类选中态一致） */
.item-page-tree .sku-wrapper {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.item-page-tree .sku-wrapper .sku-item {
    display: flex;
    align-items: center;
    flex: 0 1 auto;
    cursor: pointer;
    margin: 0 !important;
    padding: 8px 14px;
    background: rgba(255, 255, 255, 0.9) !important;
    border: 1.5px solid rgba(0, 0, 0, 0.08);
    border-radius: 10px;
    box-shadow: var(--ios-shadow-sm);
    color: var(--ios-text-primary);
    font-size: 14px;
    line-height: 1.4;
    animation: none;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.item-page-tree .sku-wrapper .sku-item:hover {
    transform: translateY(-1px);
    border-color: rgba(0, 122, 255, 0.35);
    box-shadow: var(--ios-shadow-md);
}

.item-page-tree .sku-wrapper .sku-item.sku-current {
    background: rgba(0, 122, 255, 0.10) !important;
    border-color: var(--ios-accent-blue);
    color: var(--ios-accent-blue);
    font-weight: 600;
}

.item-page-tree .sku-wrapper .sku-item .sku-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 6px;
}

.item-page-tree .sku-wrapper .sku-item .sku-icon img {
    width: 22px;
    height: 22px;
    object-fit: contain;
    border-radius: 6px;
    box-shadow: none;
}

/* 商品自定义控件（item.js 插入的 tr.item-widget）的输入框/下拉框 */
.item-page-tree .item-controls .form-control,
.item-page-tree .item-controls .form-select {
    background-color: rgba(142, 142, 147, 0.10);
    border: 1px solid transparent;
    border-radius: 10px;
    padding: 9px 14px;
    font-size: 14px;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.item-page-tree .item-controls .form-control:focus,
.item-page-tree .item-controls .form-select:focus {
    background-color: #fff;
    border-color: var(--ios-accent-blue);
    box-shadow: 0 0 0 4px rgba(0, 122, 255, 0.1);
}

.item-page-tree .item-controls .table .item-widget td.sku-cate-td {
    padding-top: 20px !important;
}

.item-page-tree .item-controls .form-check {
    min-height: inherit;
    margin-top: 10px;
    margin-bottom: 0;
    font-size: 14px;
}

/* 数量行：输入框 + 批发标签 + 库存标签，各自独立圆角块 */
.item-page-tree .item-controls .table td.sku-quantity-wrapper {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px;
    padding: 10px 0 !important;
    background: transparent;
    border-radius: 0;
    box-shadow: none;
}

.item-page-tree .sku-quantity-wrapper .quantity-input {
    width: 120px;
    height: 40px;
    padding: 0 14px;
    font-size: 15px;
    font-weight: 600;
    line-height: 1.5;
    color: var(--ios-text-primary);
    background: rgba(142, 142, 147, 0.10);
    border: 1px solid transparent;
    border-radius: 10px;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    -webkit-appearance: none;
    appearance: none;
    -moz-appearance: textfield;
}

.item-page-tree .sku-quantity-wrapper .quantity-input:focus {
    outline: none;
    background: #fff;
    border-color: var(--ios-accent-blue);
    box-shadow: 0 0 0 4px rgba(0, 122, 255, 0.1);
}

.item-page-tree .sku-quantity-wrapper .sku-stock,
.item-page-tree .sku-quantity-wrapper .sku-wholesale {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    height: 30px;
    padding: 0 12px;
    border: none;
    border-radius: 15px;
    font-size: 13px;
    font-weight: 600;
    letter-spacing: -0.01em;
}

/* 库存标签：前缀文字用伪元素补上（item.js 切换规格时只重写数字本身），颜色随有货/无货切换 */
.item-page-tree .sku-quantity-wrapper .sku-stock::before {
    content: '库存';
    font-weight: 500;
    opacity: 0.75;
}

.item-page-tree .sku-quantity-wrapper .sku-stock.bg-lime-green {
    background: rgba(52, 199, 89, 0.12);
    color: #248a3d;
}

.item-page-tree .sku-quantity-wrapper .sku-stock.bg-light-gray {
    background: rgba(142, 142, 147, 0.14);
    color: var(--ios-text-secondary);
}

.item-page-tree .sku-quantity-wrapper .sku-wholesale {
    background: rgba(255, 149, 0, 0.12);
    color: #c76a00;
    cursor: help;
}

/* ---------- 购买按钮：与首页"购买"按钮同色系的大号胶囊 ---------- */
/* 显隐由 .d-show / .d-hide（本文件"修复 Base.css 缺少 .d-show"一节，!important）控制，这里只给默认 flex */
.item-page-tree .shop-checkout-btn {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}

.item-page-tree .shop-checkout-btn .checkout-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    width: auto;
    min-width: 150px;
    height: 46px;
    padding: 0 28px;
    border: none;
    border-radius: 23px;
    outline: none;
    cursor: pointer;
    font-size: 15px;
    font-weight: 600;
    letter-spacing: -0.01em;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.item-page-tree .shop-checkout-btn .btn-buy-now {
    background: var(--ios-accent-blue);
    color: #fff;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.12), 0 4px 12px rgba(0, 122, 255, 0.28);
}

.item-page-tree .shop-checkout-btn .btn-buy-now:hover {
    background: var(--ios-accent-deep);
    transform: translateY(-1px);
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.14), 0 6px 16px rgba(0, 122, 255, 0.32);
}

.item-page-tree .shop-checkout-btn .btn-add-cart {
    background: rgba(0, 122, 255, 0.10);
    color: var(--ios-accent-blue);
    box-shadow: inset 0 0 0 1.5px rgba(0, 122, 255, 0.25);
}

.item-page-tree .shop-checkout-btn .btn-add-cart:hover {
    background: rgba(0, 122, 255, 0.16);
    transform: translateY(-1px);
}

.item-page-tree .shop-checkout-btn .checkout-btn:active {
    transform: scale(0.97);
}

.item-page-tree .shop-checkout-btn .btn-buy-now[disabled] {
    opacity: 0.6;
    cursor: default;
}

.item-page-tree .shop-checkout-btn .btn-no-stock {
    background: rgba(142, 142, 147, 0.16);
    color: var(--ios-text-secondary);
    box-shadow: none;
    cursor: not-allowed;
}

/* ---------- 宝贝详情卡片 ---------- */
.item-page-tree .item-detail-header-tree {
    display: flex;
    align-items: center;
    gap: 8px;
    margin: -4px 0 16px 0;
    padding-bottom: 12px;
    border-bottom: 1px solid rgba(0, 0, 0, 0.06);
    font-size: 15px;
    font-weight: 600;
    color: var(--ios-accent-blue);
    letter-spacing: -0.01em;
}

.item-page-tree .item-detail-header-tree i {
    font-size: 16px;
}

/* 商品属性：浅灰圆角键值表 */
.item-page-tree .item-attr-table-tree {
    margin-bottom: 16px;
    background: rgba(142, 142, 147, 0.06);
    border-radius: 12px;
    overflow: hidden;
}

.item-page-tree .item-attr-table-tree td {
    padding: 10px 16px !important;
    font-size: 14px;
    border-bottom: 1px solid rgba(0, 0, 0, 0.04) !important;
}

.item-page-tree .item-attr-table-tree tr:last-child td {
    border-bottom: none !important;
}

.item-page-tree .item-attr-table-tree .item-attr-name {
    width: 25%;
    color: var(--ios-text-secondary);
    white-space: nowrap;
}

.item-page-tree .item-attr-table-tree .sku-attr-value {
    word-break: break-word;
    overflow-wrap: break-word;
}

.item-page-tree .introduce-content {
    font-size: 15px;
    line-height: 1.75;
    color: var(--ios-text-primary);
    word-break: break-word;
}

/* 商品介绍是后台富文本，图片/视频/iframe 不能超出卡片 */
.item-page-tree .introduce-content img,
.item-page-tree .introduce-content video,
.item-page-tree .introduce-content iframe {
    max-width: 100%;
}

.item-page-tree .introduce-content img {
    border-radius: 10px;
}

/* ---------- 移动端 ---------- */
@media (max-width: 767.98px) {
    .item-page-tree .item-card-tree {
        padding: 16px;
    }

    .item-page-tree .item-image-main {
        height: 200px;
    }

    .item-page-tree .item-title-text {
        font-size: 17px;
    }

    /* 手机上字段名列太占宽，改为"字段名在上、内容在下"的堆叠布局；
       控件行（tr.item-widget）同样是 tr/td 结构，一并生效 */
    .item-page-tree .item-controls .table,
    .item-page-tree .item-controls .table tbody,
    .item-page-tree .item-controls .table tr,
    .item-page-tree .item-controls .table td {
        display: block;
        width: 100%;
    }

    .item-page-tree .item-controls .table td.sku-cate-td,
    .item-page-tree .item-controls .table .item-widget td.sku-cate-td {
        width: 100%;
        padding: 10px 0 0 0 !important;
    }

    .item-page-tree .item-controls .table td.sku-quantity-wrapper {
        display: flex;
    }

    .item-page-tree .sku-quantity-wrapper .quantity-input {
        width: 90px;
    }

    /* 两个按钮平分整行，便于拇指点击 */
    .item-page-tree .shop-checkout-btn .checkout-btn {
        flex: 1 1 0;
        min-width: 0;
        padding: 0 12px;
    }

    .item-page-tree .item-attr-table-tree .item-attr-name {
        width: 35%;
    }

    /* 富文本里的媒体常带固定 height 属性，手机上按宽度等比缩放 */
    .item-page-tree .introduce-content img,
    .item-page-tree .introduce-content video,
    .item-page-tree .introduce-content iframe {
        height: auto !important;
    }
}


/* ========================================
   购物车页（Cart.html）—— 与首页统一的 iOS 毛玻璃风格
   说明：
   1. 全部规则限定在 .cart-page-tree 作用域内；
   2. 前面"购物车"一节的旧规则（.quantity-change、悬停才出现的 .cart-widget-edit 等）仍保留，这里覆盖；
   3. 行布局用 CSS Grid：PC 端一行横排（删除/图/信息/单价/数量/金额），手机端信息占整行、单价数量金额折到下一行。
   ======================================== */

/* 卡片容器：与首页、详情页卡片一致 */
.cart-page-tree .cart-card-tree {
    background: rgba(255, 255, 255, 0.72) !important;
    backdrop-filter: saturate(180%) blur(20px) !important;
    -webkit-backdrop-filter: saturate(180%) blur(20px) !important;
    border: 1px solid rgba(0, 0, 0, 0.04);
    border-radius: 16px;
    box-shadow: var(--ios-shadow-md);
}

/* 左列表 + 右摘要 */
.cart-page-tree .cart-layout-tree {
    display: flex;
    gap: 20px;
    align-items: flex-start;
}

.cart-page-tree .cart-list-tree {
    flex: 1;
    min-width: 0;
    padding: 8px 20px;
}

/* ---------- 表头：列宽与下方商品行完全一致 ---------- */
.cart-page-tree .cart-list-head-tree {
    display: grid;
    grid-template-columns: 28px 64px minmax(0, 1fr) 90px 124px 100px;
    grid-template-areas: "del thumb info price qty amount";
    align-items: center;
    column-gap: 16px;
    padding: 12px 0;
    border-bottom: 1px solid rgba(0, 0, 0, 0.08);
    font-size: 13px;
    font-weight: 600;
    color: var(--ios-text-secondary);
}

/* cart.js 删除商品只移除该行、不刷新页面，全部删完后表头会孤零零留着，此时隐藏 */
.cart-page-tree .cart-list-tree:not(:has(.cart-item-tree)) .cart-list-head-tree {
    display: none;
}

/* "商品信息"横跨缩略图与名称两列，与图片左边缘对齐 */
.cart-page-tree .cart-head-product {
    grid-column: thumb-start / info-end;
}

.cart-page-tree .cart-head-price {
    grid-area: price;
    text-align: center;
}

.cart-page-tree .cart-head-qty {
    grid-area: qty;
    text-align: center;
}

.cart-page-tree .cart-head-amount {
    grid-area: amount;
    text-align: right;
}

/* ---------- 商品行 ---------- */
.cart-page-tree .cart-item-tree {
    display: grid;
    grid-template-columns: 28px 64px minmax(0, 1fr) 90px 124px 100px;
    grid-template-areas: "del thumb info price qty amount";
    align-items: center;
    column-gap: 16px;
    padding: 18px 0;
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
}

.cart-page-tree .cart-item-tree:last-child {
    border-bottom: none;
}

.cart-page-tree .cart-item-del-cell {
    grid-area: del;
}

.cart-page-tree .cart-item-thumb {
    grid-area: thumb;
}

.cart-page-tree .cart-item-info {
    grid-area: info;
    min-width: 0;
}

.cart-page-tree .cart-item-price {
    grid-area: price;
    text-align: center;
}

.cart-page-tree .cart-item-quantity {
    grid-area: qty;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.cart-page-tree .cart-item-amount {
    grid-area: amount;
    text-align: right;
}

/* 行内链接统一去掉下划线（全局有 a 标签下划线规则会盖过来） */
.cart-page-tree .cart-item-tree a {
    text-decoration: none !important;
}

/* 删除按钮：灰色圆形，悬停变红 */
.cart-page-tree .cart-item-del {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    color: var(--ios-text-secondary);
    background: rgba(142, 142, 147, 0.10);
    font-size: 12px;
    text-decoration: none;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.cart-page-tree .cart-item-del:hover {
    color: #fff;
    background: #ff3b30;
}

.cart-page-tree .cart-item-thumb img {
    width: 64px;
    height: 64px;
    object-fit: contain;
    border-radius: 12px;
    background: rgba(142, 142, 147, 0.08);
    box-shadow: var(--ios-shadow-sm);
}

.cart-page-tree .cart-item-name {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    font-size: 15px;
    font-weight: 600;
    line-height: 1.45;
    color: var(--ios-text-primary);
    text-decoration: none;
    word-break: break-word;
}

.cart-page-tree .cart-item-name:hover {
    color: var(--ios-accent-blue);
}

.cart-page-tree .cart-item-sku {
    display: inline-block;
    max-width: 100%;
    margin-top: 6px;
    padding: 2px 10px;
    border-radius: 8px;
    background: rgba(0, 122, 255, 0.08);
    color: var(--ios-accent-blue);
    font-size: 12px;
    font-weight: 500;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* 备注信息：小标签 + 常显的"修改"链接（原来要悬停才出现，手机上点不到） */
.cart-page-tree .cart-widgets {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 6px;
    margin-top: 8px;
    padding: 0;
    border: none;
}

.cart-page-tree .cart-widgets:hover {
    border: none;
}

.cart-page-tree .cart-widget {
    margin: 0 !important;
    padding: 2px 10px;
    border-radius: 8px;
    background: rgba(142, 142, 147, 0.10);
    font-size: 12px;
    color: var(--ios-text-primary);
    word-break: break-all;
}

.cart-page-tree .cart-widget-title {
    color: var(--ios-text-secondary);
}

.cart-page-tree .cart-widgets .cart-widget-edit {
    position: static;
    visibility: visible;
    margin: 0;
    padding: 2px 6px;
    background: transparent;
    box-shadow: none;
    color: var(--ios-accent-blue);
    font-size: 12px;
    font-weight: 500;
    text-decoration: none;
    cursor: pointer;
}

.cart-page-tree .cart-widgets .cart-widget-edit:hover {
    color: var(--ios-accent-deep);
}

/* 手机端"单价/数量/金额"的小标题，PC 端隐藏 */
.cart-page-tree .cart-item-label {
    display: none;
    font-size: 12px;
    color: var(--ios-text-secondary);
    margin-bottom: 4px;
}

.cart-page-tree .cart-item-price div {
    font-size: 14px;
    color: var(--ios-text-secondary);
    font-variant-numeric: tabular-nums;
}

.cart-page-tree .cart-item-amount div {
    font-size: 16px;
    font-weight: 700;
    color: var(--ios-price-color);
    font-variant-numeric: tabular-nums;
}

/* 数量步进器：灰底圆角条，两侧圆形按钮 */
.cart-page-tree .quantity-change {
    display: inline-flex;
    align-items: center;
    width: auto;
    height: 36px;
    padding: 3px;
    border: none;
    border-radius: 18px;
    background: rgba(142, 142, 147, 0.12);
}

.cart-page-tree .quantity-change button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 30px;
    height: 30px;
    padding: 0;
    border: none !important;
    border-radius: 50% !important;
    background: #fff;
    color: var(--ios-accent-blue);
    font-size: 16px;
    line-height: 1;
    cursor: pointer;
    box-shadow: var(--ios-shadow-sm);
    transition: all 0.15s cubic-bezier(0.4, 0, 0.2, 1);
}

.cart-page-tree .quantity-change button:hover {
    background: var(--ios-accent-blue);
    color: #fff;
}

.cart-page-tree .quantity-change button:active {
    transform: scale(0.9);
}

.cart-page-tree .quantity-change input[type="text"] {
    display: block;
    width: 44px;
    height: 30px;
    margin: 0;
    padding: 0;
    outline: none;
    border: none !important;
    background: transparent;
    color: var(--ios-text-primary);
    font-size: 15px;
    font-weight: 600;
    line-height: 30px;
    text-align: center;
    font-variant-numeric: tabular-nums;
}

/* ---------- 右侧结算摘要 ---------- */
.cart-page-tree .cart-summary-tree {
    flex: 0 0 300px;
    position: sticky;
    top: 20px;
    padding: 20px;
}

.cart-page-tree .cart-summary-title {
    margin-bottom: 14px;
    font-size: 16px;
    font-weight: 600;
    color: var(--ios-text-primary);
}

.cart-page-tree .cart-summary-total {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    margin: 10px 0 18px 0;
    padding-top: 14px;
    border-top: 1px solid rgba(0, 0, 0, 0.06);
    font-size: 15px;
    font-weight: 600;
}

.cart-page-tree .cart-total-amount {
    font-size: 26px;
    font-weight: 700;
    color: var(--ios-price-color);
    letter-spacing: -0.02em;
    font-variant-numeric: tabular-nums;
}

.cart-page-tree .btn-cart-bill,
.cart-page-tree .btn-cart-clear {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    width: 100%;
    margin: 0;
    padding: 0 16px;
    border: none;
    border-radius: 23px;
    font-weight: 600;
    letter-spacing: -0.01em;
    opacity: 1;
    cursor: pointer;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.cart-page-tree .btn-cart-bill {
    height: 46px;
    font-size: 15px;
    background: var(--ios-accent-blue);
    color: #fff;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.12), 0 4px 12px rgba(0, 122, 255, 0.28);
}

.cart-page-tree .btn-cart-bill:hover {
    opacity: 1;
    background: var(--ios-accent-deep);
    transform: translateY(-1px);
}

.cart-page-tree .btn-cart-bill[disabled] {
    opacity: 0.6;
    transform: none;
}

/* 清空按钮做成低调的文字按钮，避免误触 */
.cart-page-tree .btn-cart-clear {
    height: 38px;
    margin-top: 8px;
    font-size: 13px;
    background: transparent;
    color: var(--ios-text-secondary);
}

.cart-page-tree .btn-cart-clear:hover {
    opacity: 1;
    color: #ff3b30;
    background: rgba(255, 59, 48, 0.08);
}

/* ---------- 空购物车 ---------- */
.cart-page-tree .cart-empty-tree {
    padding: 56px 20px;
    text-align: center;
}

.cart-page-tree .cart-empty-tree > i {
    font-size: 56px;
    color: rgba(142, 142, 147, 0.5);
}

.cart-page-tree .cart-empty-tree p {
    margin: 14px 0 22px 0;
    font-size: 15px;
    color: var(--ios-text-secondary);
}

.cart-page-tree .cart-empty-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 10px 26px;
    border-radius: 22px;
    background: var(--ios-accent-blue);
    color: #fff;
    font-weight: 600;
    text-decoration: none !important;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.12), 0 4px 12px rgba(0, 122, 255, 0.28);
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.cart-page-tree .cart-empty-btn:hover {
    color: #fff;
    background: var(--ios-accent-deep);
    transform: translateY(-1px);
}

/* ---------- 平板：摘要移到列表下方 ---------- */
@media (max-width: 991.98px) {
    .cart-page-tree .cart-layout-tree {
        flex-direction: column;
        align-items: stretch;
    }

    .cart-page-tree .cart-summary-tree {
        flex: 1 1 auto;
        position: static;
    }
}

/* ---------- 手机：每个商品变成两行 ---------- */
@media (max-width: 767.98px) {
    .cart-page-tree .cart-list-tree {
        padding: 4px 14px;
    }

    /* 手机端每行自带"单价/数量/金额"小标题，表头隐藏 */
    .cart-page-tree .cart-list-head-tree {
        display: none;
    }

    /* 第一行：图 + 信息 + 删除；第二行：单价 / 数量 / 金额 */
    .cart-page-tree .cart-item-tree {
        grid-template-columns: 56px minmax(0, 1fr) auto auto;
        grid-template-areas:
            "thumb info info del"
            "price price qty amount";
        column-gap: 12px;
        row-gap: 12px;
        padding: 14px 0;
    }

    .cart-page-tree .cart-item-del-cell {
        align-self: start;
    }

    .cart-page-tree .cart-item-thumb {
        align-self: start;
    }

    .cart-page-tree .cart-item-thumb img {
        width: 56px;
        height: 56px;
    }

    .cart-page-tree .cart-item-name {
        font-size: 14px;
    }

    .cart-page-tree .cart-item-label {
        display: block;
    }

    .cart-page-tree .cart-item-price {
        text-align: left;
    }
}


/* ========================================
   结算页（Checkout.html）—— 与首页统一的 iOS 毛玻璃风格
   说明：
   1. 全部规则限定在 .checkout-page-tree 作用域内；
   2. 前面"checkout""支付功能"两节的旧规则（.pay-item 半透明方块、.btn-pay-now 蓝灰方块等）仍保留，这里覆盖；
      旧规则里 .pay-item / .pay-current 的背景带 !important，所以这里对应属性也必须 !important；
   3. 布局：左侧订单明细 + 右侧支付面板（PC 吸顶），平板及以下上下排列。
   ======================================== */

/* 卡片容器 */
.checkout-page-tree .checkout-card-tree {
    background: rgba(255, 255, 255, 0.72) !important;
    backdrop-filter: saturate(180%) blur(20px) !important;
    -webkit-backdrop-filter: saturate(180%) blur(20px) !important;
    border: 1px solid rgba(0, 0, 0, 0.04);
    border-radius: 16px;
    box-shadow: var(--ios-shadow-md);
    padding: 20px;
}

.checkout-page-tree .checkout-card-title {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 12px;
    font-size: 15px;
    font-weight: 600;
    color: var(--ios-text-primary);
    letter-spacing: -0.01em;
}

.checkout-page-tree .checkout-card-title > i {
    color: var(--ios-accent-blue);
    font-size: 16px;
}

/* 左明细 + 右支付 */
.checkout-page-tree .checkout-layout-tree {
    display: flex;
    gap: 20px;
    align-items: flex-start;
}

.checkout-page-tree .checkout-items-tree {
    flex: 1;
    min-width: 0;
}

.checkout-page-tree .checkout-side-tree {
    flex: 0 0 340px;
    position: sticky;
    top: 20px;
}

.checkout-page-tree .checkout-side-tree:empty {
    display: none;
}

/* ---------- 订单明细表 ---------- */
/* 固定表格布局：否则 nowrap 的规格标签会把中间列撑宽，手机上出现横向滚动；
   列宽由第一行决定（缩略图列、金额列给定宽度，中间列自适应） */
.checkout-page-tree .checkout-table-tree {
    width: 100%;
    margin-bottom: 0;
    table-layout: fixed;
}

/* 去掉 Bootstrap .table 在 tbody/单元格上的默认边框，只保留下面单独设置的行分隔线 */
.checkout-page-tree .checkout-table-tree tbody {
    border-style: none;
}

.checkout-page-tree .checkout-table-tree td {
    border-top-style: none;
    padding: 14px 0 !important;
    border-bottom: 1px solid rgba(0, 0, 0, 0.05) !important;
}

.checkout-page-tree .checkout-table-tree tr:last-child td {
    border-bottom: none !important;
}

.checkout-page-tree .checkout-table-tree td.checkout-thumb {
    width: 64px;
    padding-right: 14px !important;
}

.checkout-page-tree .checkout-thumb img {
    display: block;
    width: 52px;
    height: 52px;
    object-fit: contain;
    border-radius: 12px;
    background: rgba(142, 142, 147, 0.08);
    box-shadow: var(--ios-shadow-sm);
}

.checkout-page-tree .checkout-info {
    min-width: 0;
}

.checkout-page-tree .checkout-name {
    font-size: 14px;
    font-weight: 600;
    line-height: 1.45;
    color: var(--ios-text-primary);
    word-break: break-word;
}

.checkout-page-tree .checkout-sku {
    display: inline-block;
    max-width: 100%;
    margin-top: 4px;
    padding: 1px 8px;
    border-radius: 7px;
    background: rgba(0, 122, 255, 0.08);
    color: var(--ios-accent-blue);
    font-size: 12px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    vertical-align: middle;
}

.checkout-page-tree .checkout-qty {
    display: inline-block;
    margin: 4px 0 0 6px;
    font-size: 13px;
    color: var(--ios-text-secondary);
    font-variant-numeric: tabular-nums;
    vertical-align: middle;
}

.checkout-page-tree .checkout-note {
    margin-top: 2px;
    font-size: 12px;
    color: var(--ios-text-secondary);
}

.checkout-page-tree .checkout-table-tree td.checkout-amount {
    width: 110px;
    padding-left: 12px !important;
    text-align: right;
    white-space: nowrap;
    font-size: 15px;
    font-weight: 600;
    color: var(--ios-text-primary);
    font-variant-numeric: tabular-nums;
}

/* 应付金额行 */
.checkout-page-tree .checkout-total-tree,
.checkout-page-tree .checkout-summary-total {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    font-size: 15px;
    font-weight: 600;
    color: var(--ios-text-primary);
}

.checkout-page-tree .checkout-total-tree {
    margin-top: 6px;
    padding: 14px 16px;
    border-radius: 12px;
    background: rgba(255, 149, 0, 0.08);
}

.checkout-page-tree .checkout-total-amount {
    font-size: 24px;
    font-weight: 700;
    color: var(--ios-price-color);
    letter-spacing: -0.02em;
    font-variant-numeric: tabular-nums;
}

/* ---------- 支付方式 ---------- */
.checkout-page-tree .pay-container {
    margin-bottom: 18px;
}

.checkout-page-tree .wallet-balance {
    margin-left: auto;
    font-size: 14px;
    font-weight: 600;
    color: #248a3d;
}

/* 支付方式：一行一个的可选条目，选中后蓝框 + 右侧对勾 */
.checkout-page-tree .pay-container .pay-list {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 8px;
    margin: 0;
}

.checkout-page-tree .pay-container .pay-list .pay-item {
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 0;
    padding: 10px 14px;
    border: 1.5px solid rgba(0, 0, 0, 0.06);
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.9) !important;
    color: var(--ios-text-primary);
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    box-shadow: var(--ios-shadow-sm);
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.checkout-page-tree .pay-container .pay-list .pay-item:hover {
    transform: none;
    border-color: rgba(0, 122, 255, 0.35);
    box-shadow: var(--ios-shadow-md);
}

.checkout-page-tree .pay-container .pay-list .pay-item.pay-current {
    border-color: var(--ios-accent-blue);
    background: rgba(0, 122, 255, 0.08) !important;
    color: var(--ios-accent-blue);
    font-weight: 600;
    box-shadow: 0 0 0 3px rgba(0, 122, 255, 0.10);
}

.checkout-page-tree .pay-method-icon img {
    display: block;
    width: 26px;
    height: 26px;
    object-fit: contain;
    border-radius: 6px;
}

.checkout-page-tree .pay-item .pay-check {
    margin-left: auto;
    font-size: 18px;
    color: var(--ios-accent-blue);
    opacity: 0;
    transform: scale(0.6);
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.checkout-page-tree .pay-item.pay-current .pay-check {
    opacity: 1;
    transform: scale(1);
}

.checkout-page-tree .checkout-summary-total {
    margin-bottom: 16px;
    padding-top: 14px;
    border-top: 1px solid rgba(0, 0, 0, 0.06);
}

/* ---------- 付款 / 取消按钮 ---------- */
.checkout-page-tree .shop-checkout-pay-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin: 0;
}

.checkout-page-tree .btn-pay-now,
.checkout-page-tree .btn-cancel-order {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    width: 100%;
    padding: 0 20px;
    border: none;
    border-radius: 23px;
    font-weight: 600;
    letter-spacing: -0.01em;
    cursor: pointer;
    box-shadow: none;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.checkout-page-tree .btn-pay-now {
    height: 46px;
    font-size: 15px;
    background-color: var(--ios-accent-blue);
    color: #fff;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.12), 0 4px 12px rgba(0, 122, 255, 0.28);
}

.checkout-page-tree .btn-pay-now:hover:not([disabled]) {
    background-color: var(--ios-accent-deep);
    transform: translateY(-1px);
}

/* 未选择支付方式时的禁用态 */
.checkout-page-tree .btn-pay-now[disabled] {
    background-color: rgba(142, 142, 147, 0.18);
    color: var(--ios-text-secondary);
    box-shadow: none;
    cursor: not-allowed;
}

.checkout-page-tree .btn-cancel-order {
    height: 38px;
    font-size: 13px;
    background-color: transparent;
    color: var(--ios-text-secondary);
}

.checkout-page-tree .btn-cancel-order:hover {
    color: #ff3b30;
    background-color: rgba(255, 59, 48, 0.08);
}

.checkout-page-tree .btn-pay-now svg,
.checkout-page-tree .btn-cancel-order svg {
    width: 1em;
    height: 1em;
}

/* ---------- 支付中：倒计时 + 二维码 ---------- */
.checkout-page-tree .render-pay .pay-title {
    justify-content: center;
    flex-wrap: wrap;
    gap: 2px;
    font-size: 14px;
    color: var(--ios-text-primary);
}

.checkout-page-tree .render-pay .pay-title > i {
    margin-right: 4px;
}

.checkout-page-tree .render-pay .pay-title .hour,
.checkout-page-tree .render-pay .pay-title .minute,
.checkout-page-tree .render-pay .pay-title .second {
    margin: 0 1px;
    font-weight: 700;
    color: #ff3b30;
    font-variant-numeric: tabular-nums;
}

.checkout-page-tree .render-pay .card-body {
    padding: 8px 0 0 0;
}

.checkout-page-tree .render-pay .loading {
    display: block;
    padding: 30px 0;
    font-size: 14px;
    color: var(--ios-text-secondary);
}

/* 支付方式标识（checkout.js 写入 iconfont 图标 + 名称，颜色由 .pay-icon-alipay 等类决定） */
.checkout-page-tree .render-pay .pay-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 4px auto 16px auto;
    font-size: 20px;
    font-weight: bold;
    text-shadow: none;
}

.checkout-page-tree .render-pay .pay-icon svg {
    vertical-align: middle;
    width: 1.1em;
    height: 1.1em;
}

.checkout-page-tree .render-qrcode {
    width: 216px;
    height: 216px;
    margin: 0 auto 8px auto;
    padding: 8px;
    border: none;
    overflow: hidden;
    border-radius: 16px;
    background: #fff;
    box-shadow: var(--ios-shadow-md);
}

/* ---------- 已取消 ---------- */
.checkout-page-tree .checkout-cancelled-tree {
    padding: 36px 20px;
    text-align: center;
}

.checkout-page-tree .checkout-cancelled-tree > i {
    font-size: 44px;
    color: rgba(142, 142, 147, 0.6);
}

.checkout-page-tree .checkout-cancelled-tree p {
    margin: 10px 0 18px 0;
    font-size: 16px;
    font-weight: 600;
    color: var(--ios-text-secondary);
}

.checkout-page-tree .checkout-back-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 9px 24px;
    border-radius: 22px;
    background: var(--ios-accent-blue);
    color: #fff;
    font-weight: 600;
    text-decoration: none !important;
}

.checkout-page-tree .checkout-back-btn:hover {
    color: #fff;
    background: var(--ios-accent-deep);
}

/* ---------- 平板及以下：上下排列 ---------- */
@media (max-width: 991.98px) {
    .checkout-page-tree .checkout-layout-tree {
        flex-direction: column;
        align-items: stretch;
    }

    .checkout-page-tree .checkout-side-tree {
        flex: 1 1 auto;
        position: static;
    }

    /* 支付中：倒计时和二维码提到订单明细前面，手机上无需下滑就能扫码（不支持 :has 的浏览器保持原顺序） */
    .checkout-page-tree .checkout-side-tree:has(.render-pay) {
        order: -1;
    }
}

@media (max-width: 767.98px) {
    .checkout-page-tree .checkout-card-tree {
        padding: 16px;
    }

    .checkout-page-tree .checkout-table-tree td.checkout-thumb {
        width: 52px;
        padding-right: 10px !important;
    }

    .checkout-page-tree .checkout-thumb img {
        width: 42px;
        height: 42px;
    }

    .checkout-page-tree .checkout-table-tree td.checkout-amount {
        width: 86px;
        font-size: 14px;
    }

    .checkout-page-tree .checkout-total-amount {
        font-size: 22px;
    }
}


/* ========================================
   订单查询页（Search.html）—— 与首页统一的 iOS 毛玻璃风格
   说明：全部规则限定在 .search-page-tree 作用域内；
   物品行用 flex 布局：PC 一行（商品 / 状态数量金额售后 / 操作按钮），手机自动折成三段。
   ======================================== */

/* 卡片容器 */
.search-page-tree .search-card-tree {
    margin-bottom: 16px;
    padding: 20px;
    background: rgba(255, 255, 255, 0.72) !important;
    backdrop-filter: saturate(180%) blur(20px) !important;
    -webkit-backdrop-filter: saturate(180%) blur(20px) !important;
    border: 1px solid rgba(0, 0, 0, 0.04);
    border-radius: 16px;
    box-shadow: var(--ios-shadow-md);
}

.search-page-tree .search-card-title {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 6px;
    font-size: 15px;
    font-weight: 600;
    color: var(--ios-text-primary);
}

.search-page-tree .search-card-title > i {
    color: var(--ios-accent-blue);
    font-size: 16px;
}

/* 通用小标题（字段名） */
.search-page-tree .search-label {
    display: block;
    margin-bottom: 4px;
    font-size: 12px;
    color: var(--ios-text-secondary);
}

/* ---------- 查询框：一整条胶囊，左图标 + 输入框 + 右侧按钮 ---------- */
.search-page-tree .search-box-tree {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 8px 8px 18px;
    border-radius: 28px;
}

.search-page-tree .search-box-icon {
    font-size: 18px;
    color: var(--ios-text-secondary);
}

.search-page-tree .search-order-keyword {
    flex: 1;
    min-width: 0;
    height: 40px;
    padding: 0;
    border: none;
    outline: none;
    background: transparent;
    color: var(--ios-text-primary);
    font-size: 16px;
    font-variant-numeric: tabular-nums;
}

.search-page-tree .search-order-keyword::placeholder {
    color: var(--ios-text-secondary);
}

.search-page-tree .search-box-tree:focus-within {
    border-color: var(--ios-accent-blue);
    box-shadow: 0 0 0 4px rgba(0, 122, 255, 0.10), var(--ios-shadow-md);
}

.search-page-tree .search-order-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    height: 42px;
    padding: 0 22px;
    border: none;
    border-radius: 21px;
    background: var(--ios-accent-blue);
    color: #fff;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.12), 0 4px 12px rgba(0, 122, 255, 0.28);
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.search-page-tree .search-order-btn:hover {
    background: var(--ios-accent-deep);
}

.search-page-tree .search-order-btn:active {
    transform: scale(0.96);
}

/* ---------- 游客提醒 ---------- */
.search-page-tree .search-guest-tip {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    margin-bottom: 16px;
    padding: 14px 44px 14px 16px;
    border: 1px solid rgba(255, 149, 0, 0.25);
    border-radius: 14px;
    /* 提醒条直接叠在站点背景图上，底色必须足够不透明并加模糊，否则文字会和背景纹理混在一起 */
    background: rgba(255, 245, 230, 0.88);
    backdrop-filter: saturate(180%) blur(20px);
    -webkit-backdrop-filter: saturate(180%) blur(20px);
    box-shadow: var(--ios-shadow-sm);
    color: #8a4b00;
    font-size: 14px;
    line-height: 1.6;
}

.search-page-tree .search-guest-tip > i {
    font-size: 20px;
    color: var(--ios-price-color);
}

.search-page-tree .search-guest-tip-title {
    font-weight: 600;
    color: #8a4b00;
}

.search-page-tree .search-guest-tip .alert-link {
    color: var(--ios-accent-blue);
}

.search-page-tree .search-guest-tip .btn-close {
    padding: 18px 16px;
    font-size: 12px;
}

/* ---------- 订单概要 ---------- */
.search-page-tree .search-summary-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
    padding-bottom: 14px;
    margin-bottom: 14px;
    border-bottom: 1px solid rgba(0, 0, 0, 0.06);
}

.search-page-tree .search-trade-no-value {
    font-size: 18px;
    font-weight: 700;
    color: var(--ios-text-primary);
    letter-spacing: 0.01em;
    font-variant-numeric: tabular-nums;
    word-break: break-all;
}

/* 订单状态：order_status() 输出的是带行内颜色的 <status> 标签，这里只套一个圆角底 */
.search-page-tree .search-order-status {
    flex-shrink: 0;
    padding: 4px 14px;
    border-radius: 14px;
    background: rgba(142, 142, 147, 0.12);
    font-size: 13px;
    font-weight: 600;
}

.search-page-tree .search-summary-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 14px;
    font-size: 14px;
    color: var(--ios-text-primary);
}

.search-page-tree .search-summary-amount {
    font-size: 18px;
    font-weight: 700;
    color: var(--ios-price-color);
    font-variant-numeric: tabular-nums;
}

.search-page-tree .search-pay-type {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-weight: 500;
}

.search-page-tree .search-pay-type img {
    width: 18px;
    height: 18px;
    object-fit: contain;
}

/* ---------- 物品行 ---------- */
.search-page-tree .search-item-tree {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 14px 24px;
    padding: 16px 0;
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
}

.search-page-tree .search-item-tree:last-child {
    border-bottom: none;
    padding-bottom: 0;
}

.search-page-tree .search-item-main {
    display: flex;
    align-items: center;
    gap: 12px;
    flex: 1 1 280px;
    min-width: 0;
}

.search-page-tree .search-item-logo {
    flex-shrink: 0;
    width: 52px;
    height: 52px;
    object-fit: contain;
    border-radius: 12px;
    background: rgba(142, 142, 147, 0.08);
    box-shadow: var(--ios-shadow-sm);
}

.search-page-tree .search-item-text {
    min-width: 0;
}

.search-page-tree .search-item-name {
    font-size: 15px;
    font-weight: 600;
    line-height: 1.45;
    color: var(--ios-text-primary);
    word-break: break-word;
}

.search-page-tree .search-item-sku {
    display: inline-block;
    max-width: 100%;
    margin-top: 4px;
    padding: 1px 8px;
    border-radius: 7px;
    background: rgba(0, 122, 255, 0.08);
    color: var(--ios-accent-blue);
    font-size: 12px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.search-page-tree .search-item-meta {
    display: flex;
    gap: 24px;
    font-size: 14px;
    color: var(--ios-text-primary);
}

/* 固定最小宽度，让多行物品的"状态/数量/金额/售后"上下对齐 */
.search-page-tree .search-item-meta > div {
    white-space: nowrap;
    min-width: 56px;
}

.search-page-tree .search-item-meta > div:first-child {
    min-width: 84px;
}

.search-page-tree .search-item-meta > div:nth-child(3) {
    min-width: 80px;
}

.search-page-tree .search-item-meta > div:nth-child(4) {
    min-width: 120px;
}

.search-page-tree .search-item-qty {
    font-weight: 600;
    font-variant-numeric: tabular-nums;
}

.search-page-tree .search-item-amount {
    font-weight: 700;
    color: var(--ios-price-color);
    font-variant-numeric: tabular-nums;
}

.search-page-tree .after-sale-countdown {
    font-size: 13px;
    font-weight: 500;
    color: #248a3d;
    font-variant-numeric: tabular-nums;
}

/* order_item_status() 输出的圆角徽标：当前主题的 Bootstrap 里没有 bg-*-light，
   且"已收货/正在维权/已退款"等用的是 text-white，在浅色底上看不清，这里按底色统一配色（覆盖 text-white 需 !important） */
.search-page-tree .search-item-meta .rounded-pill {
    padding: 2px 10px !important;
    font-size: 12px !important;
}

.search-page-tree .search-item-meta .bg-success-light {
    background: rgba(52, 199, 89, 0.14) !important;
    color: #248a3d !important;
}

.search-page-tree .search-item-meta .bg-warning-light {
    background: rgba(255, 149, 0, 0.14) !important;
    color: #c76a00 !important;
}

.search-page-tree .search-item-meta .bg-danger-light {
    background: rgba(255, 59, 48, 0.12) !important;
    color: #d70015 !important;
}

.search-page-tree .search-item-meta .bg-primary-light {
    background: rgba(0, 122, 255, 0.12) !important;
    color: var(--ios-accent-blue) !important;
}

/* 操作按钮 */
.search-page-tree .search-item-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-left: auto;
}

/* 没有任何按钮（未支付/已退款）时不占位（不支持 :has 的浏览器只是多一块空白） */
.search-page-tree .search-item-actions:not(:has(*)) {
    display: none;
}

.search-page-tree .search-btn {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    height: 34px;
    padding: 0 14px;
    border: none;
    border-radius: 17px;
    background: rgba(0, 122, 255, 0.10);
    color: var(--ios-accent-blue);
    font-size: 13px;
    font-weight: 600;
    text-decoration: none !important;
    white-space: nowrap;
    cursor: pointer;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.search-page-tree .search-btn:hover {
    background: rgba(0, 122, 255, 0.18);
    color: var(--ios-accent-blue);
}

.search-page-tree .search-btn:active {
    transform: scale(0.96);
}

.search-page-tree .search-btn-primary {
    background: var(--ios-accent-blue);
    color: #fff;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.12), 0 3px 8px rgba(0, 122, 255, 0.25);
}

.search-page-tree .search-btn-primary:hover {
    background: var(--ios-accent-deep);
    color: #fff;
}

/* 宽屏：改用网格，三段各占固定列，保证每个物品行的"状态/数量/金额/售后"和按钮都上下对齐
   （各行按钮数量不同，flex 布局下会把中间一段挤得左右错位） */
/* 只在列表里至少有一行带按钮（已支付）时启用；未支付时没有按钮列，保持 flex，不留空白。
   不支持 :has 的浏览器退回 flex 布局，只是对齐稍差 */
@media (min-width: 992px) {
    .search-page-tree .search-items-tree:has(.search-item-actions > *) .search-item-tree {
        display: grid;
        /* 按钮列宽按"查看 / 复制 / 下载"三个按钮留（约 232px），去掉"申请售后"后由 340px 收窄 */
        grid-template-columns: minmax(0, 1fr) auto 250px;
        gap: 24px;
    }

    .search-page-tree .search-items-tree:has(.search-item-actions > *) .search-item-actions {
        display: flex;
        justify-content: flex-end;
        margin-left: 0;
    }
}

/* ---------- 购买后提示 ---------- */
.search-page-tree .order-notice-summary {
    margin-bottom: 8px;
    font-size: 14px;
    color: var(--ios-text-secondary);
}

.search-page-tree .order-notice-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-top: 8px;
}

.search-page-tree .order-notice-item {
    padding: 10px 14px;
    border-radius: 12px;
    background: rgba(142, 142, 147, 0.08);
    font-size: 14px;
    line-height: 1.65;
    word-break: break-word;
}

.search-page-tree .order-notice-item img,
.search-page-tree .order-notice-item video,
.search-page-tree .order-notice-item iframe {
    max-width: 100%;
    height: auto;
}

/* ---------- 无订单 ---------- */
.search-page-tree .search-empty-tree {
    padding: 48px 20px;
    text-align: center;
}

.search-page-tree .search-empty-tree > i {
    font-size: 52px;
    color: rgba(142, 142, 147, 0.5);
}

.search-page-tree .search-empty-tree p {
    margin: 10px 0 0 0;
    font-size: 15px;
    color: var(--ios-text-secondary);
}

/* ---------- 手机 ---------- */
@media (max-width: 767.98px) {
    .search-page-tree .search-card-tree {
        padding: 16px;
    }

    .search-page-tree .search-box-tree {
        padding: 6px 6px 6px 14px;
    }

    /* 手机上查询按钮只留图标，给输入框腾出宽度 */
    .search-page-tree .search-order-btn {
        padding: 0 16px;
    }

    .search-page-tree .search-order-btn span {
        display: none;
    }

    .search-page-tree .search-summary-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .search-page-tree .search-trade-no-value {
        font-size: 15px;
    }

    .search-page-tree .search-item-main {
        flex-basis: 100%;
    }

    .search-page-tree .search-item-meta {
        flex-basis: 100%;
        flex-wrap: wrap;
        gap: 12px 20px;
    }

    .search-page-tree .search-item-actions {
        flex-basis: 100%;
        margin-left: 0;
    }
}


/* ========================================
   订单查询页"查看"卡密弹窗
   说明：
   1. 弹窗由公共脚本 treasure.js 调用 component.popup（layui 弹层）生成，挂在 body 下而不在 .search-page-tree 内，
      所以用 body:has(.search-page-tree) 限定只作用于订单查询页，不影响购物车等页面的其他弹窗；
      不支持 :has 的浏览器保持原样式；
   2. treasure.js 给卡密文本框写了行内 !important 的白色背景和无边框，样式表无法覆盖，
      因此用 background-image 叠一层浅灰底、box-shadow 画内边框来实现输入框效果；
   3. 窄屏下弹窗尺寸有两种错误情况，都用 !important 覆盖 layui 的行内样式（行内未带 !important，可以覆盖）：
      - 真手机、平板：component.js 按 UA 判断非 PC 时把弹窗设为 100% × 100% 全屏，而卡密文本框固定 200px 高，
        下半屏大片空白；CSS 无法读取 UA，所以除了按宽度（992px 以下）外，再按"主要输入方式是触屏"（pointer: coarse）
        命中宽度 992px 以上的安卓平板横屏；
      - 电脑浏览器窗口较窄时：仍按 580px 计算 left，左右溢出、关闭按钮不可见。
      统一改为左右各留 16px、高度随内容、上下居中的卡片（top/bottom 置 0 + margin:auto + fit-content 实现居中，
      不用 transform，避免与 layui 的弹出动画冲突）；内容过高时在内容区内滚动。
   ======================================== */
body:has(.search-page-tree) .component-popup {
    border-radius: 20px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.18), 0 2px 8px rgba(0, 0, 0, 0.08);
}

/* 标题栏：白底 + 细分隔线；原来的绿色商品名 + 红色规格改为主文字色 + 次要文字色 */
body:has(.search-page-tree) .component-popup .layui-layer-title {
    background: #fff;
    border-bottom: 1px solid rgba(0, 0, 0, 0.06);
    border-radius: 20px 20px 0 0;
    font-size: 15px;
    color: var(--ios-text-secondary);
}

body:has(.search-page-tree) .component-popup .layui-layer-title .text-success {
    color: var(--ios-text-primary) !important;
    font-weight: 600;
}

body:has(.search-page-tree) .component-popup .layui-layer-title .text-danger {
    color: var(--ios-text-secondary) !important;
}

/* 卡密区：四周留白，文本框做成浅灰圆角输入框，等宽字体便于核对 */
body:has(.search-page-tree) .component-popup .block-treasure {
    padding: 16px 20px;
}

body:has(.search-page-tree) .component-popup .block-treasure textarea {
    padding: 12px 14px;
    border-radius: 12px;
    background-image: linear-gradient(rgba(142, 142, 147, 0.10), rgba(142, 142, 147, 0.10));
    box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.06);
    font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
    font-size: 14px;
    line-height: 1.75;
    color: var(--ios-text-primary);
}

/* 商品留言（如兑换地址、使用说明）：补回左右内边距，去掉虚线分隔，改为小号次要文字 */
body:has(.search-page-tree) .component-popup .block-message .handover-line {
    display: none;
}

body:has(.search-page-tree) .component-popup .leave-message {
    padding: 0 20px 20px !important;
    border-radius: 0;
    font-size: 13px;
    line-height: 1.7;
    color: var(--ios-text-secondary);
    word-break: break-word;
}

body:has(.search-page-tree) .component-popup .leave-message p {
    margin: 0;
}

/* 自定义渲染的卡密（商品开启了渲染模式时输出 HTML 而不是文本框）：同样留出内边距 */
body:has(.search-page-tree) .component-popup .block-custom {
    padding: 16px 20px;
}

@media (max-width: 991.98px), (pointer: coarse) {
    body:has(.search-page-tree) .component-popup {
        top: 0 !important;
        bottom: 0 !important;
        left: 0 !important;
        right: 0 !important;
        width: calc(100vw - 32px) !important;
        max-width: 580px;
        height: -moz-fit-content !important;
        height: fit-content !important;
        margin: auto !important;
    }

    /* 全屏模式下 layui 给内容区写了固定像素高度，改为随内容，超出屏幕时内容区内滚动 */
    body:has(.search-page-tree) .component-popup .layui-layer-content {
        height: auto !important;
        max-height: calc(100vh - 140px);
        overflow-y: auto !important;
    }
}

@media (max-width: 767.98px) {
    body:has(.search-page-tree) .component-popup .layui-layer-title {
        font-size: 14px;
    }

    body:has(.search-page-tree) .component-popup .block-treasure {
        padding: 14px 16px;
    }

    body:has(.search-page-tree) .component-popup .leave-message {
        padding: 0 16px 16px !important;
    }
}


/* ========================================
   卡片外的面包屑：加半透明毛玻璃底
   面包屑不在卡片里，直接叠在站点背景图上；背景图颜色复杂时灰色小字几乎看不清，
   因此与首页公告、分类卡片保持同样的半透明白底 + 模糊，宽度随内容收缩，不占满整行。
   （购物车、结算、订单查询页原有的页面标题行已去掉）
   ======================================== */
.item-page-tree .item-breadcrumb-tree {
    display: flex;
    width: fit-content;
    max-width: 100%;
    padding: 8px 16px;
    border: 1px solid rgba(0, 0, 0, 0.04);
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.72);
    backdrop-filter: saturate(180%) blur(20px);
    -webkit-backdrop-filter: saturate(180%) blur(20px);
    box-shadow: var(--ios-shadow-sm);
}

/* 面包屑字号小，内边距相应收紧 */
.item-page-tree .item-breadcrumb-tree {
    padding: 6px 14px;
    border-radius: 12px;
}

/* 首页 / 分类页标题：作为下方卡片的表头，与卡片连成一体 */
.shop-heading-tree {
    margin: 0;
    padding: 14px 20px 12px;
    font-size: 18px;
    font-weight: 700;
    line-height: 1.4;
    color: var(--ios-text-primary);
    border-bottom: 1px solid rgba(0, 0, 0, 0.06);
    border-radius: 16px 16px 0 0;
    background: rgba(255, 255, 255, 0.68);
    backdrop-filter: saturate(180%) blur(20px);
    -webkit-backdrop-filter: saturate(180%) blur(20px);
    overflow-wrap: anywhere;
}

/* 主题卡片的圆角带 !important，这里要同样覆盖 */
.shop-heading-tree ~ .card {
    border-top: 0 !important;
    border-top-left-radius: 0 !important;
    border-top-right-radius: 0 !important;
    box-shadow: none;
}

/* 卡片悬停上浮会压住标题造成错位，整块不再上浮 */
.shop-heading-tree ~ .card:hover {
    transform: none;
    box-shadow: none !important;
}

.shop-heading-tree ~ .card > .card-body {
    border-top-left-radius: 0 !important;
    border-top-right-radius: 0 !important;
}
