/* 设计令牌兜底：主题色由页面 <html> 内联样式覆盖，其余为静态令牌 */
:root {
    --primary-color: #2948DF;
    --primary-light: #EEF1FD;
    --primary-medium: #C5CAE9;
    --primary-dark: #1F35A8;
    --primary-hover: #4A66E8;
    --primary-text: #ffffff;
    --gradient-primary: linear-gradient(90deg, #2948DF, #4A66E8, #6B84F0);
    --text-color: #333333;
    --text-secondary: #666666;
    --text-muted: #999999;
    --border-color: #e5e5e5;
    --shadow-color: rgba(0, 0, 0, 0.08);
}

/* 移除所有圆角 */
.card,
.btn,
.alert,
.form-control,
.product-card,
.product-card .card-header,
.product-card .card-body {
    border-radius: 0 !important;
}

.menu-card {
    background: #fff;
    box-shadow: 0 1px 2px rgba(0, 0, 0, .04), 0 6px 20px rgba(0, 0, 0, .05);
    border: none;
    margin-bottom: 24px;
}

.nav-menu, .card-body {
    padding: 20px 22px;
}

body.nq .nav-section {
    margin-bottom: 12px;
}

body.nq .nav-section:last-child {
    margin-bottom: 0;
}

body.nq .nav-label {
    display: block;
    color: var(--text-muted);
    font-size: 12px;
    font-weight: 500;
    letter-spacing: .04em;
    margin: 0 0 8px;
}

body.nq .nav-tips {
    margin: 4px 0 14px;
    color: var(--text-muted);
    font-size: 12px;
    line-height: 1.7;
    padding-left: 0;
}

.nav-section + .nav-tips {
    margin-bottom: 12px;
}

/* 一级/二级导航：紧凑胶囊标签流式排列（不再等宽大卡片） */
.nav-menu .nav-pills {
    margin: 0;
    flex: 1;
    padding: 0;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.nav-menu .nav-pills > .nav-item {
    margin: 0;
    min-width: 0;
}

body.nq .nav-menu .nav-pills .nav-link {
    color: var(--text-color);
    display: inline-flex;
    align-items: center;
    height: 28px;
    padding: 0 13px;
    border-radius: 999px;
    font-size: 12.5px;
    line-height: 1;
    background: #f5f6f8;
    border: 1px solid transparent;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    transition: color .2s ease, background-color .2s ease, border-color .2s ease;
}

body.nq .nav-menu .nav-pills .nav-link:hover {
    color: var(--primary-color);
    background: var(--primary-light);
    border-color: rgba(var(--primary-rgb), 0.25);
}

body.nq .nav-menu .nav-pills .nav-link.active {
    background: var(--gradient-primary);
    color: var(--primary-text);
    border-color: transparent;
    box-shadow: 0 2px 6px rgba(var(--primary-rgb), 0.22);
}

/* 二级导航：细边框胶囊，视觉层级低于一级 */
.sub-nav {
    padding: 0;
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.sub-nav > .nav-item {
    margin: 0;
    min-width: 0;
}

body.nq .nav-menu .sub-nav .nav-link {
    font-size: 12px;
    display: inline-flex;
    align-items: center;
    height: 26px;
    padding: 0 11px;
    background: transparent;
    border: 1px solid var(--border-color, #e0e2e6);
    border-radius: 999px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    transition: color .2s ease, background-color .2s ease, border-color .2s ease;
}

body.nq .nav-menu .sub-nav .nav-link:hover {
    color: var(--primary-color);
    background: var(--primary-light);
    border-color: rgba(var(--primary-rgb), 0.35);
}

body.nq .nav-menu .sub-nav .nav-link.active {
    background: var(--gradient-primary);
    color: var(--primary-text);
    border-color: transparent;
    box-shadow: 0 2px 6px rgba(var(--primary-rgb), 0.2);
}

/* 产品卡片部分 */
.products-section {
    display: flex;
    align-items: flex-start;
}

.products-section .nav-label {
    padding-top: 15px;
}

.products-section .row {
    flex: 1;
    margin-right: 0;
    margin-left: 0;
}

.product-card {
    position: relative;
    height: auto;
    min-height: 100%;
    border: 1px solid #e8eaee;
    transition: border-color .2s ease, box-shadow .2s ease, transform .2s ease, background-color .2s ease;
    cursor: pointer;
    background: #fff;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

/* 选中态顶部色条 */
.product-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: var(--gradient-primary);
    transform: scaleX(0);
    transform-origin: left center;
    transition: transform .25s ease;
    z-index: 2;
}

.product-card.active::before {
    transform: scaleX(1);
}

/* 售罄徽标：贴卡片右上角，标题栏让出空间避免遮挡 */
.sold-out-badge {
    position: absolute;
    top: 5px;
    right: 5px;
    font-size: 42px;
    line-height: 1;
    z-index: 3;
    pointer-events: none;
}

.product-card.sold-out .card-header {
    padding-right: 58px;
}

/* 已售罄：禁用交互态 */
.product-card.sold-out {
    cursor: not-allowed;
    opacity: .6;
    background: #f7f8fa;
}

.product-card.sold-out:hover {
    border-color: #e8eaee;
    box-shadow: none;
    background: #f7f8fa;
    transform: none;
}

.product-card:hover {
    border-color: var(--primary-color);
    box-shadow: 0 6px 18px rgba(0, 0, 0, .08);
    transform: translateY(-2px);
}

.product-card.active {
    border-color: var(--primary-color);
    box-shadow: 0 6px 18px rgba(var(--primary-rgb), .16);
    transform: translateY(-2px);
}

.product-card .card-header {
    padding: 14px 16px;
    background: #f7f8fa;
    border-bottom: 1px solid #eef0f3;
    transition: background-color .25s ease, border-color .25s ease;
}

.product-card.active .card-header {
    background: var(--gradient-primary);
    border-bottom-color: transparent;
}

.product-card.active .product-info h5 {
    color: #fff;
}

.product-card.active .product-icon {
    color: #fff;
    opacity: 1;
}

.product-title {
    display: flex;
    align-items: flex-start;
    gap: 12px;
}

.product-icon {
    font-size: 24px;
    color: var(--primary-color);
    opacity: 0.8;
}

.product-info {
    flex: 1;
}

.product-info h5 {
    margin: 0;
    font-size: 16px;
    color: #333;
    font-weight: normal;
}

.product-card .card-body {
    padding: 16px;
    border-radius: 0 0 4px 4px;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.product-card .card-text {
    margin-bottom: 0;
    flex: 1;
}

.product-card pre {
    margin: 0;
    font-size: 13px;
    color: #666;
}

.desc-item {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 8px;
    margin-bottom: 8px;
    font-size: 13px;
    line-height: 1.5;
}

/* 标签不换行、不收缩：值较长时优先让值换行，避免「CPU型号」被挤成两行 */
.desc-label {
    color: #666;
    text-align: left;
    white-space: nowrap;
    flex: 0 0 auto;
}

.desc-value {
    color: #333;
    text-align: right;
    flex: 1 1 auto;
    min-width: 0;
    word-break: break-word;
}

.desc-text {
    font-size: 13px;
    color: #666;
    line-height: 1.5;
    margin-bottom: 8px;
}

/* 内嵌 HTML 的描述：去掉 <pre> 预格式化，按正常文档流渲染 */
.product-description.desc-html {
    white-space: normal;
}

.product-description.desc-html ul,
.product-description.desc-html ol {
    list-style: none;
    margin: 0;
    padding: 0;
}

/* 规格项：左标签 + 右取值；加 body 前缀确保稳定覆盖描述自带的同权重样式 */
body .product-description.desc-html .specs-list {
    margin: 0;
    padding: 0;
}

body .product-description.desc-html .spec-item {
    display: flex;
    align-items: center;
    margin-bottom: 8px;
    padding: 0;
    font-size: 13px;
    line-height: 1.5;
}

body .product-description.desc-html .spec-label {
    display: flex;
    align-items: center;
    color: #666;
    margin-right: 8px;
    min-width: 84px;
    flex-shrink: 0;
}

body .product-description.desc-html .spec-value {
    color: #333;
}

/* 描述自带图标（font-awesome，本地样式已提供字体） */
body .product-description.desc-html .spec-icon {
    width: 20px;
    margin-right: 6px;
    text-align: center;
    color: #bfbfbf;
}

body .product-description.desc-html .divider {
    display: inline-block;
    width: 1px;
    height: 12px;
    margin: 0 8px;
    background: #e2e8f0;
    vertical-align: middle;
}

/* 描述自带表格（如配置参数表） */
body .product-description.desc-html table {
    width: 100%;
    border-collapse: collapse;
}

body .product-description.desc-html td {
    padding: 4px 0;
    font-size: 13px;
    line-height: 1.5;
    color: #666;
    vertical-align: top;
}

body .product-description.desc-html td b {
    color: #333;
}

.color-999 {
    color: #999;
}

.col-sm-2-4 {
    position: relative;
    width: 100%;
    padding-right: 16px;
    padding-left: 0;
    margin-bottom: 16px;
}

/* 大屏幕显示5列 */
@media (min-width: 1400px) {
    .col-sm-2-4 {
        flex: 0 0 20%;
        max-width: 20%;
    }
}

/* 中等屏幕显示4列 */
@media (min-width: 1200px) and (max-width: 1399px) {
    .col-sm-2-4 {
        flex: 0 0 25%;
        max-width: 25%;
    }
}

/* 平板显示3列 */
@media (min-width: 768px) and (max-width: 1199px) {
    .col-sm-2-4 {
        flex: 0 0 33.333333%;
        max-width: 33.333333%;
    }
}

/* 手机显示2列 */
@media (min-width: 576px) and (max-width: 767px) {
    .col-sm-2-4 {
        flex: 0 0 50%;
        max-width: 50%;
        padding-right: 8px;
        padding-left: 8px;
    }
    
    .row {
        margin-right: -8px;
        margin-left: -8px;
    }
}

/* 小手机显示1列 */
@media (max-width: 575px) {
    .col-sm-2-4 {
        flex: 0 0 100%;
        max-width: 100%;
        padding-right: 0;
        padding-left: 0;
    }
}

/* 调整产品卡片在不同屏幕下的样式 */
@media (max-width: 1199px) {
    .product-card {
        height: auto;
    }
    
    .product-card .card-header {
        padding: 12px;
    }
    
    .product-card .card-body {
        padding: 12px;
    }
    
    .product-icon {
        font-size: 20px;
    }
    
    .product-info h5 {
        font-size: 14px;
    }
}

@media (max-width: 767px) {
    .product-card {
        height: auto;
        min-height: auto;
    }
    
    .product-card .card-header {
        padding: 10px;
    }
    
    .product-card .card-body {
        padding: 10px;
    }
    
    .product-icon {
        font-size: 18px;
    }
    
    .product-info h5 {
        font-size: 13px;
    }
    
    .product-description {
        font-size: 12px;
    }
}

/* 移动端售罄徽标：缩小并收紧标题栏留白 */
@media (max-width: 767px) {
    .sold-out-badge {
        top: 3px;
        right: 3px;
        font-size: 32px;
    }

    .product-card.sold-out .card-header {
        padding-right: 42px;
    }
}

/* 调整产品描述文本在移动端的显示 */
@media (max-width: 575px) {
    .product-card {
        margin-bottom: 10px;
    }
    
    .product-description {
        max-height: none;
        overflow-y: visible;
    }
}

/* 预格式化文本样式 */
.product-description,
.stock-text {
    white-space: pre-wrap;
    word-wrap: break-word;
}

/* 库存文字：弱化展示，区分充足/紧缺 */
.stock-text {
    margin-top: 8px !important;
    padding-top: 8px;
    border-top: 1px dashed #eef0f3;
    font-size: 12px !important;
    color: var(--text-muted) !important;
}

.product-card.active .stock-text {
    border-top-color: rgba(var(--primary-rgb), .15);
}

/* 配置按钮组样式 */
.config-section .btn-group-toggle {
    margin: 0;
    padding: 0;
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    width: auto;
}

/* 增加选择器优先级 */
.menu-card .card-body .config-section .btn-group-toggle label.btn.btn-primary.btn-sm {
    float: none;
    margin: 0 10px 10px 0 !important;
    color: #333 !important;
    padding: 6px 15px;
    border-radius: 0 !important;
    font-size: 14px;
    transition: all 0.3s;
    background: #f5f5f5 !important;
    border: none !important;
    position: relative;
    display: inline-flex;
    align-items: center;
    min-width: 75px !important;
    justify-content: center;
}

.menu-card .card-body .config-section .btn-group-toggle label.btn.btn-primary.btn-sm:hover {
    color: var(--primary-color) !important;
    background-color: var(--primary-light) !important;
}

.menu-card .card-body .config-section .btn-group-toggle label.btn.btn-primary.btn-sm.active {
    background: var(--primary-color) !important;
    background: var(--gradient-primary) !important;
    color: var(--primary-text) !important;
    box-shadow: 0 2px 6px rgba(63, 81, 181, 0.2);
}

/* 保持radio输入框的正确位置 */
.menu-card .card-body .config-section .btn-group-toggle .btn input[type="radio"] {
    position: absolute;
    clip: rect(0,0,0,0);
    pointer-events: none;
}

/* 配置按钮中的图标样式 */
.menu-card .card-body .config-section .btn-group-toggle .btn img {
    margin-right: 5px;
    vertical-align: middle;
    height: 20px;
}

/* 移除Bootstrap默认的按钮组样式 */
.btn-group-toggle {
    display: inline-flex !important;
    flex-wrap: wrap !important;
}

.btn-group-toggle > .btn {
    flex: 0 0 auto;
}

/* 周期选择按钮样式 */
.btn-custom-group {
    margin: 0;
    flex: 1;
    padding: 0;
    display: flex;
    flex-wrap: wrap;
}

.btn-custom-group .btn-custom {
    color: var(--text-color);
    padding: 6px 15px;
    border-radius: 0;
    font-size: 14px;
    transition: all 0.3s;
    margin-right: 10px;
    margin-bottom: 10px;
    background: #f5f5f5;
    min-width: 75px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: none;
}

.btn-custom-group .btn-custom:hover {
    color: var(--primary-color);
    background-color: var(--primary-light);
}

.btn-custom-group .btn-custom.active {
    background: var(--primary-color);
    background: var(--gradient-primary);
    color: var(--primary-text);
    box-shadow: 0 2px 6px rgba(63, 81, 181, 0.2);
    border: none;
}

/* 移除按钮组的边框合并样式 */
.btn-group > .btn-group:not(:last-child) > .btn, 
.btn-group > .btn:not(:last-child):not(.dropdown-toggle),
.btn-group > .btn-group:not(:first-child) > .btn, 
.btn-group > .btn:not(:first-child) {
    border-radius: 0 !important;
    margin-left: 0 !important;
}

.cycle-select-discount {
    display: inline-block;
    margin-left: 5px;
    padding: 2px 5px;
    font-size: 12px;
    color: #e64a19;
    background-color: rgba(230, 74, 25, 0.1);
    border-radius: 3px;
}

/* 选配组件样式 */
.range-group {
    display: flex;
    align-items: center;
    flex: 1;
}

.os-group {
    display: flex;
    flex-direction: column;
    flex: 1;
}

/* 输入组样式 */
.input-group {
    display: flex;
    flex: 1;
    align-items: center;
    gap: 8px;
    width: 100%;
}

.input-group .flex-grow-1 {
    flex: 1;
    min-width: 0; /* 防止input溢出 */
}

.input-group .form-control {
    width: 100%;
}

.input-group .btn-light {
    flex-shrink: 0;
    padding: 6px 12px;
    height: 36px;
    width: 36px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

/* 配置区域样式 */
.config-section { 
    padding: 10px 0; 
}

/* 配置按钮样式 */
.btn-primary.btn-sm { 
    margin-right: 10px; 
    transition: all 0.3s; 
}

.btn-primary.btn-sm:not(.active) { 
    background-color: #fff; 
    color: #2948DF; 
    border-color: #ddd; 
}

.btn-primary.btn-sm:hover:not(.active) { 
    border-color: #2948DF; 
}

.btn-primary.btn-sm.active { 
    background-color: #2948DF; 
    border-color: #2948DF; 
}

/* 配置范围输入样式 */
.configoption_range {
    -webkit-appearance: none;
    appearance: none;
    width: calc(100% - 100px);
    height: 4px;
    margin-right: 10px;
    background: #e9ecef;
    border-radius: 2px;
    outline: none;
    position: relative;
    top: 2px;
}

.configoption_range::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 16px;
    height: 16px;
    background: #fff;
    border: 2px solid var(--primary-color);
    border-radius: 50%;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 2px 4px rgba(63, 81, 181, 0.2);
    position: relative;
    top: -6px;
}

.configoption_range::-webkit-slider-runnable-track {
    height: 4px;
    background: linear-gradient(to right, var(--primary-color) 0%, var(--primary-color) var(--value-percent, 0%), #e9ecef var(--value-percent, 0%), #e9ecef 100%);
    border-radius: 2px;
}

.configoption_range_val {
    width: 80px;
    height: 32px;
    padding: 4px 8px;
    border: 1px solid #ced4da;
    border-radius: 0;
    font-size: 14px;
    color: #495057;
    text-align: center;
    transition: all 0.3s;
}

.configoption_range_val:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 2px var(--primary-light);
}

/* 确保range-group内的元素垂直居中对齐 */
.range-group {
    display: flex;
    align-items: center;
    flex: 1;
    gap: 10px;
}

.range-group .ml-2 {
    color: #666;
    font-size: 13px;
}

/* 表单控件样式 */
.form-control {
    display: block;
    width: 100%;
    padding: 0.47rem 0.75rem;
    font-size: 0.875rem;
    font-weight: 400;
    line-height: 1.5;
    color: #495057;
    background-color: #fff;
    background-clip: padding-box;
    border: 1px solid #ced4da;
    border-radius: 0.25rem;
    transition: border-color .15s ease-in-out,box-shadow .15s ease-in-out;
}

.input-group .form-control {
    flex: 1;
    margin-right: 10px;
    border-radius: 0;
}

.form-control:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 0.2rem var(--primary-light);
}

.form-control.is-invalid {
    border-color: #f46a6a;
    padding-right: calc(1.5em + 0.94rem);
    background-repeat: no-repeat;
    background-position: right calc(0.375em + 0.235rem) center;
    background-size: calc(0.75em + 0.47rem) calc(0.75em + 0.47rem);
}

/* 按钮样式 */
.btn-light {
    color: #495057;
    background-color: #f8f9fa;
    border-color: #f8f9fa;
    padding: 0.47rem 0.75rem;
    font-size: 0.875rem;
    transition: all 0.3s;
}

.input-group .btn-light {
    border: 1px solid #ced4da;
    background-color: #fff;
    color: var(--text-color);
    border-radius: 0;
}

.btn-light:hover {
    color: #495057;
    background-color: #e2e6ea;
    border-color: #dae0e5;
}

.input-group .btn-light:hover {
    border-color: var(--primary-color);
    color: var(--primary-color);
}

.ms-2 {
    margin-left: 0.5rem !important;
}

.position-relative {
    position: relative !important;
}

.flex-grow-1 {
    flex-grow: 1 !important;
}

/* 配置下拉菜单 */
.config-dropdown {
    position: relative;
    display: inline-block;
    min-width: 120px;
    width: auto;
}

.config-button {
    padding: 8px 16px;
    background-color: #f5f5f5;
    border: 1px solid #dee2e6;
    border-radius: 0;
    cursor: pointer;
    width: 100%;
    text-align: left;
    position: relative;
    color: #666;
    white-space: nowrap;
}

.config-button:hover {
    border-color: var(--primary-color);
}

.config-button:after {
    content: '';
    position: absolute;
    right: 10px;
    top: 50%;
    margin-top: -2px;
    border-width: 4px;
    border-style: solid;
    border-color: #666 transparent transparent transparent;
}

.config-menu {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    min-width: 100%;
    width: auto;
    white-space: nowrap;
    background: #fff;
    border: 1px solid #dee2e6;
    border-radius: 0;
    z-index: 1000;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.config-menu.show {
    display: block;
}

.config-item {
    padding: 8px 16px;
    cursor: pointer;
    transition: all 0.3s;
}

.config-item:hover {
    background-color: var(--primary-light);
    color: var(--primary-color);
}

.config-item[data-selected="true"] {
    background-color: var(--primary-light);
    color: var(--primary-color);
}

/* 配置面板样式 */
.config-panel {
    padding: 15px;
    background: #fff;
}

.config-panel-list {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 15px;
    padding: 0 15px;
}

.config-panel-item {
    display: flex;
    flex-direction: column;
    padding: 0;
    border: none;
}

.config-panel-label {
    width: auto;
    color: #999;
    font-size: 12px;
    margin-bottom: 4px;
}

.config-panel-value {
    color: #333;
    font-size: 14px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* 购物车面板样式 */
.cart-panel {
    padding: 15px;
    background: #fff;
}

.cart-panel-list {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 15px;
    padding: 0 15px;
}

.cart-panel-item {
    display: flex;
    flex-direction: column;
    padding: 0;
    border: none;
}

.cart-panel-label {
    width: auto;
    color: #999;
    font-size: 12px;
    margin-bottom: 4px;
}

.cart-panel-value {
    color: #333;
    font-size: 14px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* 面板标题样式 */
.panel-title {
    font-size: 16px;
    font-weight: 500;
    color: #333;
    margin: 0 0 15px;
    padding: 0 15px;
}

/* 面板内容区域样式 */
.panel-content {
    max-height: calc(70vh - 120px);
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
}

/* 面板动条样式 */
.panel-content::-webkit-scrollbar {
    width: 6px;
}

.panel-content::-webkit-scrollbar-thumb {
    background-color: #ddd;
    border-radius: 3px;
}

.panel-content::-webkit-scrollbar-track {
    background-color: #f5f5f5;
}

/* 操作系统选择器 */
.os-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
}

.os-button {
    position: relative;
    width: 140px;
    background: #fff;
    border: 1px solid #dee2e6;
    cursor: pointer;
    transition: all 0.3s;
}

.os-button:hover {
    border-color: var(--primary-color);
}

.os-button.active {
    border-color: var(--primary-color);
}

.os-main {
    display: flex;
    align-items: center;
    padding: 12px 16px;
    background: #f5f5f5;
    color: #666;
}

.os-icon {
    width: 20px;
    height: 20px;
    margin-right: 8px;
}

.os-name {
    font-size: 14px;
}

.os-version {
    width: 100%;
}

.version-button {
    width: 100%;
    padding: 8px 16px;
    background: #fff;
    border: none;
    border-top: 1px solid #dee2e6;
    text-align: left;
    position: relative;
    color: #666;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.version-button .button-text {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.version-arrow {
    border-width: 4px;
    border-style: solid;
    border-color: #666 transparent transparent transparent;
    margin-left: 8px;
    flex-shrink: 0;
}

.version-menu {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: #fff;
    border: 1px solid #dee2e6;
    border-top: none;
    z-index: 1000;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    max-height: 160px;
    overflow-y: auto;
    width: 100%;
}

.version-menu::-webkit-scrollbar {
    width: 6px;
}

.version-menu::-webkit-scrollbar-thumb {
    background-color: #ddd;
    border-radius: 3px;
}

.version-menu::-webkit-scrollbar-track {
    background-color: #f5f5f5;
}

.version-menu.show {
    display: block;
}

.version-item {
    padding: 8px 16px;
    cursor: pointer;
    transition: all 0.3s;
    min-height: 40px;
    display: flex;
    align-items: center;
    white-space: normal;
    word-break: break-all;
    line-height: 1.4;
}

.version-item:hover {
    background-color: var(--primary-light);
    color: var(--primary-color);
}

.version-item[data-selected="true"] {
    background-color: var(--primary-light);
    color: var(--primary-color);
}

/* 确保激活状态的产品卡片标题和操作系统标题背景色一致 */
.product-card.active .card-header,
.os-main {
    background: var(--primary-color);
    background: var(--gradient-primary);
}

.os-main {
    display: flex;
    align-items: center;
    padding: 12px 16px;
    background: #f5f5f5;
    color: #666;
}

.os-button.active .os-main {
    background: var(--primary-color);
    background: var(--gradient-primary);
    color: var(--primary-text);
}

/* 固定底部菜单样式 */
.fixed-bottom-menu {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: rgba(255, 255, 255, .96);
    backdrop-filter: saturate(180%) blur(8px);
    padding: 12px 0;
    border-top: 1px solid #eef0f3;
    box-shadow: 0 -4px 20px rgba(0, 0, 0, .06);
    z-index: 998;
}

.menu-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 24px;
}

.price-info {
    text-align: left;
    flex: 1;
}

.price-display {
    display: flex;
    align-items: center;
    gap: 4px;
    justify-content: flex-start;
}

.action-buttons {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-left: auto;
}

.price-action-group {
    display: flex;
    align-items: center;
    width: 100%;
    justify-content: space-between;
}

.fixed-bottom-menu .container {
    margin-right: -15px;
}

.price-display .label {
    color: #666;
}

.price-display .currency {
    color: rgb(255, 102, 0);
}

.price-display .amount {
    color: rgb(255, 102, 0);
    font-size: 20px;
    font-weight: bold;
}

.price-display .cycle {
    color: #666;
}

.price-notes {
    margin-left: 8px;
}

.note-line {
    color: #999;
    font-size: 10px;
    line-height: 1.2;
}

/* 底部面板样式 */
.bottom-sheet {
    position: fixed;
    bottom: 58px;
    left: 0;
    right: 0;
    background: #fff;
    border-radius: 0;
    z-index: 1050;
    transform: translateY(100%);
    opacity: 0;
    pointer-events: none;
}

.bottom-sheet.show {
    transform: none;
    opacity: 1;
    pointer-events: auto;
}

.bottom-sheet-body {
    max-height: calc(70vh - 120px);
    overflow-y: auto;
    padding: 15px 0;
    -webkit-overflow-scrolling: touch;
}

.bottom-sheet-backdrop {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 58px;
    background: rgba(0,0,0,0.5);
    z-index: 1040;
    opacity: 0;
    pointer-events: none;
}

.bottom-sheet-backdrop.show {
    opacity: 1;
    pointer-events: auto;
}

.bottom-sheet-header {
    padding: 15px;
    border-bottom: 1px solid #f5f5f5;
    text-align: center;
}

.bottom-sheet-header h5 {
    font-size: 16px;
    font-weight: 500;
    color: #333;
    margin: 0;
    display: inline-block;
}

/* 购物车样式 */
.cart-items {
    padding: 0 15px;
}

.cart-item-row {
    padding: 15px 0;
    border-bottom: 1px solid #f5f5f5;
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
}

.cart-item-info {
    flex: 1;
    margin-right: 20px;
}

.cart-item-name {
    font-size: 14px;
    font-weight: 500;
    margin-bottom: 8px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.cart-item-config-list {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 8px;
    margin-top: 8px;
}

.cart-item-config {
    font-size: 12px;
    color: #666;
    background: #f8f9fa;
    padding: 4px 8px;
    border-radius: 2px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.config-name {
    color: #999;
    margin-right: 4px;
}

.config-value {
    color: #333;
}

.cart-item-price {
    margin-left: 20px;
    white-space: nowrap;
}

.price-value {
    color: rgb(255, 102, 0);
    font-weight: 500;
}

.cart-total {
    margin-top: 15px;
    padding: 15px;
    border-top: 1px solid #eee;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.total-info {
    font-size: 14px;
    color: #666;
}

.total-price {
    font-size: 16px;
    font-weight: 500;
}

/* 空购物车样式 */
.empty-cart {
    height: 200px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.empty-cart i {
    font-size: 48px;
    color: #ddd;
    margin-bottom: 8px;
}

.empty-cart p {
    color: #999;
    margin: 0;
}

/* 删除按钮样式 */
.delete-btn {
    color: #999;
    cursor: pointer;
    padding: 4px 8px;
    transition: all 0.2s;
    border-radius: 4px;
}

.delete-btn:hover {
    color: #ff4d4f;
    background: rgba(255, 77, 79, 0.1);
}

/* 确认对话框样式 */
.confirm-dialog-backdrop {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0,0,0,0.5);
    z-index: 2000;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.2s;
}

.confirm-dialog {
    background: #fff;
    border-radius: 0;
    width: 300px;
    padding: 20px;
    transform: translateY(20px);
    transition: transform 0.2s;
}

.confirm-dialog-title {
    font-size: 16px;
    font-weight: 500;
    margin-bottom: 12px;
    color: #333;
}

.confirm-dialog-content {
    font-size: 14px;
    color: #666;
    margin-bottom: 20px;
}

.confirm-dialog-buttons {
    display: flex;
    justify-content: flex-end;
    gap: 12px;
}

.confirm-dialog-btn {
    padding: 6px 16px;
    border-radius: 4px;
    font-size: 14px;
    cursor: pointer;
    border: none;
    transition: all 0.2s;
}

.confirm-dialog-btn-cancel {
    background: #f5f5f5;
    color: #666;
}

.confirm-dialog-btn-cancel:hover {
    background: #e8e8e8;
}

.confirm-dialog-btn-confirm {
    background: #ff4d4f;
    color: #fff;
}

.confirm-dialog-btn-confirm:hover {
    background: #ff7875;
}

.confirm-dialog-backdrop.show {
    opacity: 1;
}

.confirm-dialog-backdrop.show .confirm-dialog {
    transform: translateY(0);
}

/* 响应式布局 */
@media (max-width: 768px) {
    /* 套餐选择部分移动端样式 */
    .products-section {
        flex-direction: column;
        width: 100%;
    }

    .products-section .nav-label {
        width: 100%;
        padding-top: 0;
        margin-bottom: 10px;
        font-weight: 500;
    }

    .products-section .row {
        width: 100%;
        margin: 0;
    }

    /* 其他移动端样式 */
    .nav-section {
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
    }

    .nav-label {
        margin-right: 0;
        margin-bottom: 8px;
        font-weight: 500;
    }

    .nav-section .nav-pills,
    .nav-section .btn-group-toggle,
    .nav-section .os-buttons,
    .nav-section .range-group {
        width: 100%;
    }

    /* 一级/二级分类标签：窄屏两列紧凑胶囊，避免遮挡与换行溢出 */
    .nav-menu .nav-pills,
    .sub-nav {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 6px;
        width: 100%;
    }

    .nav-menu .nav-pills .nav-link,
    .sub-nav .nav-link {
        display: flex;
        align-items: center;
        justify-content: center;
        text-align: center;
        width: 100%;
        min-height: 30px;
        padding: 6px 8px;
        line-height: 1.3;
        white-space: normal;
        word-break: break-word;
        -webkit-tap-highlight-color: transparent;
    }

    /* 移动端取消 hover 位移，避免触屏粘滞 */
    .product-card:hover {
        transform: none;
        box-shadow: 0 1px 2px rgba(0, 0, 0, .04);
    }

    .product-card.active {
        transform: none;
    }

    /* 标签下的说明文字与标签左对齐，避免错位 */
    .nav-section + .nav-tips,
    .nav-tips {
        padding-left: 0;
    }

    .nav-tips {
        padding-left: 0;
        margin-top: 8px;
        font-size: 12px;
    }

    .fixed-bottom-menu {
        position: fixed;
        left: 0;
        right: 0;
        bottom: 0;
        background: #fff;
        box-shadow: 0 -2px 10px rgba(0,0,0,0.1);
        z-index: 1000;
        padding: 10px 0;
    }

    .fixed-bottom-menu .menu-content {
        padding: 0 15px;
    }

    .fixed-bottom-menu .price-action-group {
        display: flex;
        align-items: center;
        justify-content: space-between;
        gap: 10px;
    }

    .fixed-bottom-menu .price-info {
        flex: 1;
    }

    .fixed-bottom-menu .price-display {
        display: flex;
        align-items: baseline;
        flex-wrap: wrap;
        gap: 2px;
    }

    .fixed-bottom-menu .label {
        font-size: 12px;
        color: #666;
    }

    .fixed-bottom-menu .currency {
        font-size: 14px;
        color: var(--primary-color);
    }

    .fixed-bottom-menu .amount {
        font-size: 20px;
        font-weight: bold;
        color: var(--primary-color);
    }

    .fixed-bottom-menu .cycle {
        font-size: 12px;
        color: #666;
    }

    .fixed-bottom-menu .price-notes {
        display: none;
    }

    .fixed-bottom-menu .action-buttons {
        display: flex;
        align-items: center;
    }

    .fixed-bottom-menu .btn-outline-primary {
        display: none;
    }

    .fixed-bottom-menu .btn-primary {
        padding: 8px 20px;
        font-size: 14px;
        white-space: nowrap;
    }

    .input-group {
        flex-wrap: nowrap;
        gap: 4px;
    }

    .input-group .form-control {
        font-size: 13px;
        padding: 6px 10px;
        height: 32px;
    }

    .input-group .btn-light {
        width: 28px;
        height: 28px;
        padding: 2px;
        min-width: 28px;
    }

    .input-group .btn-light i {
        font-size: 14px;
    }
}

@media (max-width: 576px) {
    .fixed-bottom-menu .menu-content {
        padding: 0 10px;
    }

    .fixed-bottom-menu .amount {
        font-size: 18px;
    }

    .fixed-bottom-menu .btn-primary {
        padding: 6px 15px;
        font-size: 13px;
    }

    .input-group .btn-light {
        width: 26px;
        height: 26px;
        min-width: 26px;
    }

    .input-group .btn-light i {
        font-size: 13px;
    }
}

/* 按钮基础样式 */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    height: 36px;
    font-size: 14px;
    padding: 0 16px;
    border-radius: 0;
    font-weight: 400;
}

.btn-outline-primary {
    color: var(--primary-color);
    border-color: var(--primary-color);
}

.btn-outline-primary:hover {
    color: var(--primary-text);
    background-color: var(--primary-color);
    border-color: var(--primary-color);
}

.btn-primary {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
    color: var(--primary-text) !important;
}

.btn-primary:hover,
.btn-primary:focus {
    background-color: var(--primary-dark);
    border-color: var(--primary-dark);
    color: var(--primary-text) !important;
}

/* nq 全局按钮样式会覆盖 .btn-primary，此处保证购物车主按钮配色正确 */
body.nq .btn-primary {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
    color: var(--primary-text);
}

body.nq .fixed-bottom-menu .action-buttons .btn-primary {
    background: var(--gradient-primary);
    color: var(--primary-text);
    border-color: transparent;
}

body.nq .btn-outline-primary {
    color: var(--primary-color);
    border-color: var(--primary-color);
    background-color: transparent;
}

/* 其他工具类 */
.me-2 {
    margin-right: 0.5rem !important;
}
.ms-2 {
    margin-left: 0.5rem !important;
}

.mb-0 {
    margin-bottom: 0 !important;
}

.position-relative {
    position: relative !important;
}

.flex-grow-1 {
    flex-grow: 1 !important;
}

.fixed-bottom-menu .action-buttons .btn-outline-primary {
    color: var(--text-color);
    background: #f5f5f5;
    border: none;
    padding: 6px 15px;
    font-size: 13px;
    border-radius: 0;
    transition: all 0.3s;
    margin: 0;
    min-width: auto;
}

.fixed-bottom-menu .action-buttons .btn-outline-primary:hover,
.fixed-bottom-menu .action-buttons .btn-outline-primary:focus {
    color: var(--primary-color);
    background-color: var(--primary-light);
    border: none;
}

.fixed-bottom-menu .action-buttons .btn-outline-primary:active {
    background-color: var(--primary-medium);
    color: var(--primary-color);
    border: none;
}

.fixed-bottom-menu .action-buttons .btn-primary {
    background: var(--primary-color);
    background: var(--gradient-primary);
    color: var(--primary-text);
    border: none;
    padding: 6px 15px;
    font-size: 13px;
    border-radius: 0;
    transition: all 0.3s;
    margin: 0;
    min-width: auto;
    box-shadow: 0 2px 6px rgba(63, 81, 181, 0.2);
}

.fixed-bottom-menu .action-buttons .btn-primary:hover,
.fixed-bottom-menu .action-buttons .btn-primary:focus {
    opacity: 0.9;
}

.fixed-bottom-menu .action-buttons .btn-primary:active {
    opacity: 0.8;
}

/* 局部刷新占位：骨架屏 */
.sk {
    position: relative;
    display: block;
    overflow: hidden;
    background: #eef0f5;
    border-radius: 2px;
}

.sk::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    transform: translateX(-100%);
    background: linear-gradient(90deg, rgba(255, 255, 255, 0) 0%, rgba(255, 255, 255, 0.7) 50%, rgba(255, 255, 255, 0) 100%);
    animation: sk-shimmer 1.2s ease-in-out infinite;
}

@keyframes sk-shimmer {
    100% {
        transform: translateX(100%);
    }
}

.sk-line {
    height: 12px;
    margin-bottom: 10px;
}

.sk-line:last-child {
    margin-bottom: 0;
}

.sk-icon {
    width: 20px;
    height: 20px;
    flex: 0 0 20px;
    margin-right: 8px;
}

.sk-w100 { width: 100%; }
.sk-w90  { width: 90%; }
.sk-w70  { width: 70%; }
.sk-w60  { width: 60%; }
.sk-w20  { width: 20%; }

/* 配置区骨架字段 */
.sk-field {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-bottom: 18px;
}

.sk-field:last-child {
    margin-bottom: 0;
}

.sk-block {
    flex: 1;
    height: 34px;
}

.sk-config {
    padding-top: 4px;
}

.sk-card {
    pointer-events: none;
}

.sk-card .product-title {
    display: flex;
    align-items: center;
}

/* 确保产品和配置区域可以正确显示骨架占位 */
.products-section,
.config-section {
    position: relative;
}

/* 侧边栏：购物车页（登录/未登录）均嵌入用户中心外壳，显示侧边栏；
   未登录显示访客菜单（首页/登录/注册/订购产品/新闻/帮助/资源下载 + 语言下拉）。
   仅隐藏旧版菜单收缩按钮。 */
.vertical-menu-btn {
    display: none !important;
}

/* ============================================================
   登录后内嵌用户中心（body.nq-cart-inline）
   ≥992px：侧边栏为固定 220px 停靠栏，内容区右移；
           列数断点按「可用宽度 = 视口 - 220px」右移，避免卡片被挤窄。
   ≤992px：不干预，由 adaptive.css 接管为抽屉（与会员中心一致）。
   ============================================================ */
@media (min-width: 992.02px) {
    body.nq-cart-inline .main-content {
        margin-left: 220px !important;
    }
}

/* 2 列 */
@media (min-width: 992.02px) and (max-width: 1159.98px) {
    body.nq-cart-inline .col-sm-2-4 {
        flex: 0 0 50%;
        max-width: 50%;
    }
}

/* 3 列 */
@media (min-width: 1160px) and (max-width: 1339.98px) {
    body.nq-cart-inline .col-sm-2-4 {
        flex: 0 0 33.333333%;
        max-width: 33.333333%;
    }
}

/* 4 列 */
@media (min-width: 1340px) and (max-width: 1559.98px) {
    body.nq-cart-inline .col-sm-2-4 {
        flex: 0 0 25%;
        max-width: 25%;
    }
}

/* 5 列 */
@media (min-width: 1560px) {
    body.nq-cart-inline .col-sm-2-4 {
        flex: 0 0 20%;
        max-width: 20%;
    }
}



/* 调整头部标题栏 */
.header-page-title-box {
    margin-left: 0 !important;
}

/* ============================================================
   购物车 · nq 主题视觉风格适配
   说明：仅统一「视觉表现」（配色/边框/圆角/字号/阴影/状态），
        不改变「布局与交互」——仍为顶部地域/线路节点标签切换 +
        套餐卡片网格 + 底部固定结算栏。
   设计令牌取自会员中心的 nq 设计系统（--nq-*）。
   ============================================================ */

/* ---------- 区块容器 ---------- */
body.nq .menu-card {
    background: var(--nq-bg-1);
    border: 1px solid var(--nq-border-1);
    border-radius: var(--nq-radius);
    box-shadow: var(--nq-shadow-1);
    margin-bottom: 16px;
}

body.nq .nav-menu,
body.nq .menu-card > .card-body {
    padding: 20px 24px;
}

/* ---------- 分组标题与说明 ---------- */

/* ---------- 一级/二级分类标签（紧凑胶囊，见上方 nav-menu 规则） ---------- */

body.nq .nav-menu .nav-link.active,
body.nq .nav-menu .sub-nav .nav-link.active {
    background: var(--nq-primary-light);
    color: var(--nq-primary);
    border-color: var(--nq-primary);
    box-shadow: none;
}

/* ---------- 套餐卡片 ---------- */
body.nq .product-card {
    background: var(--nq-bg-1);
    border: 1px solid var(--nq-border-1);
    border-radius: var(--nq-radius);
    transform: none;
    transition: border-color var(--nq-transition), box-shadow var(--nq-transition);
}

body.nq .product-card::before {
    display: none; /* nq 风格不使用顶部色条 */
}

body.nq .product-card:hover {
    border-color: var(--nq-border-3);
    box-shadow: var(--nq-shadow-2);
    transform: none;
}

body.nq .product-card.active {
    border-color: var(--nq-primary);
    box-shadow: var(--nq-shadow-2);
}

body.nq .product-card .card-header {
    background: var(--nq-fill-1);
    border-bottom: 1px solid var(--nq-border-1);
    padding: 14px 16px;
}

body.nq .product-card.active .card-header {
    background: var(--nq-primary-light);
    border-bottom-color: transparent;
}

body.nq .product-info h5 {
    color: var(--nq-text-1);
    font-size: var(--nq-font-md);
    font-weight: 600;
}

body.nq .product-card.active .product-info h5 {
    color: var(--nq-primary);
}

body.nq .product-icon {
    color: var(--nq-text-3);
    opacity: 1;
}

body.nq .product-card.active .product-icon {
    color: var(--nq-primary);
}

body.nq .product-card pre {
    color: var(--nq-text-2);
    font-size: var(--nq-font-sm);
}

body.nq .stock-text {
    color: var(--nq-text-4) !important;
    border-top: 1px dashed var(--nq-border-2);
}

/* 售罄卡片 */
body.nq .product-card.sold-out {
    background: var(--nq-fill-1);
    opacity: 1;
}

body.nq .product-card.sold-out:hover {
    border-color: var(--nq-border-1);
    box-shadow: none;
}

body.nq .sold-out-badge {
    color: var(--nq-text-4);
}

/* ---------- 配置项按钮组 ---------- */
body.nq .btn-custom-group .btn-custom,
body.nq .menu-card .card-body .config-section .btn-group-toggle label.btn.btn-primary.btn-sm {
    background: var(--nq-fill-2) !important;
    color: var(--nq-text-1) !important;
    border: 1px solid transparent !important;
    border-radius: 4px !important;
}

body.nq .btn-custom-group .btn-custom:hover,
body.nq .menu-card .card-body .config-section .btn-group-toggle label.btn.btn-primary.btn-sm:hover {
    background: var(--nq-fill-3) !important;
    color: var(--nq-text-1) !important;
}

body.nq .btn-custom-group .btn-custom.active,
body.nq .menu-card .card-body .config-section .btn-group-toggle label.btn.btn-primary.btn-sm.active {
    background: var(--nq-primary-light) !important;
    color: var(--nq-primary) !important;
    border-color: var(--nq-primary) !important;
    box-shadow: none;
}

/* ---------- 表单控件 ---------- */
body.nq .form-control {
    border: 1px solid var(--nq-border-2);
    border-radius: var(--nq-radius);
    color: var(--nq-text-1);
    font-size: var(--nq-font-md);
}

body.nq .form-control:focus {
    border-color: var(--nq-primary);
    box-shadow: 0 0 0 2px var(--nq-primary-light);
}

/* ---------- 按钮 ---------- */
body.nq .btn-primary {
    background-color: var(--nq-primary);
    border-color: var(--nq-primary);
    color: #fff;
    border-radius: var(--nq-radius);
}

body.nq .btn-primary:hover,
body.nq .btn-primary:focus {
    background-color: var(--nq-primary-hover);
    border-color: var(--nq-primary-hover);
    color: #fff;
}

body.nq .btn-outline-primary {
    background: var(--nq-bg-1);
    border-color: var(--nq-border-3);
    color: var(--nq-text-2);
    border-radius: var(--nq-radius);
}

body.nq .btn-outline-primary:hover {
    background: var(--nq-fill-1);
    border-color: var(--nq-primary);
    color: var(--nq-primary);
}

/* ---------- 底部固定结算栏 ---------- */
body.nq .fixed-bottom-menu {
    background: var(--nq-bg-1);
    backdrop-filter: none;
    border-top: 1px solid var(--nq-border-1);
    box-shadow: 0 -2px 8px rgba(0, 0, 0, .04);
}

body.nq .fixed-bottom-menu .price-display .label,
body.nq .fixed-bottom-menu .cycle {
    color: var(--nq-text-3);
}

body.nq .fixed-bottom-menu .amount,
body.nq .fixed-bottom-menu .currency {
    color: var(--nq-primary);
}

body.nq .fixed-bottom-menu .price-notes {
    color: var(--nq-text-4);
}

body.nq .fixed-bottom-menu .action-buttons .btn-primary {
    background: var(--nq-primary);
    color: #fff;
    border-color: var(--nq-primary);
}

body.nq .fixed-bottom-menu .action-buttons .btn-primary:hover {
    background: var(--nq-primary-hover);
    opacity: 1;
}

body.nq .fixed-bottom-menu .action-buttons .btn-outline-primary {
    background: var(--nq-bg-1);
    border-color: var(--nq-border-3);
    color: var(--nq-text-2);
}

body.nq .fixed-bottom-menu .action-buttons .btn-outline-primary:hover {
    border-color: var(--nq-primary);
    color: var(--nq-primary);
    background: var(--nq-bg-1);
}

/* ---------- 骨架屏（对齐 nq 填充色） ---------- */
body.nq .sk {
    background: var(--nq-fill-2);
    border-radius: var(--nq-radius);
}

/* ============================================================
   套餐卡片：右下角价格 + 底部立即购买按钮
   ============================================================ */

/* 卡片 body 改为纵向布局，价格贴底右对齐 */
body.nq .product-card .card-body {
    display: flex;
    flex-direction: column;
    flex: 1 1 auto;
}

/* 价格行：贴卡片右下角 */
body.nq .product-card .product-price-row {
    margin-top: auto;
    padding-top: 10px;
    display: flex;
    align-items: baseline;
    justify-content: flex-end;
    flex-wrap: wrap;
    gap: 3px;
    border-top: 1px dashed var(--nq-border-2);
}

body.nq .product-card .product-price {
    font-size: 18px;
    font-weight: 700;
    color: var(--nq-danger);
    line-height: 1.2;
    white-space: nowrap;
}

body.nq .product-card .product-price-unit {
    font-size: var(--nq-font-xs);
    color: var(--nq-text-3);
    font-weight: 400;
}

/* 折扣角标（如 8折） */
body.nq .product-card .product-price-badge {
    align-self: center;
    padding: 0 5px;
    height: 18px;
    line-height: 18px;
    font-size: 11px;
    font-weight: 600;
    color: #fff;
    background: var(--nq-danger);
    border-radius: 2px;
    white-space: nowrap;
}

/* 原价：划线弱化 */
body.nq .product-card .product-price-original {
    font-size: var(--nq-font-xs);
    font-weight: 400;
    color: var(--nq-text-4);
    text-decoration: line-through;
    white-space: nowrap;
}

/* 卡片底部按钮区：固定贴在卡片最下沿 */
body.nq .product-card .product-card-footer {
    flex: 0 0 auto;
    padding: 0 14px 14px;
}

body.nq .product-card .product-card-footer .btn {
    width: 100%;
    height: 34px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: var(--nq-font-md);
    font-weight: 500;
}

body.nq .product-card .product-buy-btn {
    color: #fff !important;
    text-decoration: none !important;
}

body.nq .product-card .product-buy-btn:hover {
    opacity: .88;
}

/* 售罄：按钮置灰不可点 */
body.nq .product-card .product-card-footer .btn.disabled {
    background: var(--nq-fill-3) !important;
    color: var(--nq-text-4) !important;
    pointer-events: none;
}

/* 售罄卡片价格弱化 */
body.nq .product-card.sold-out .product-price {
    color: var(--nq-text-4);
}

body.nq .product-card.sold-out .product-price-badge {
    background: var(--nq-text-4);
}

/* 卡片内边距微调，给底部按钮留出空间 */
body.nq .product-card .card-body {
    padding-bottom: 12px;
}

/* 移动端 */
@media (max-width: 767px) {
    body.nq .product-card .product-price {
        font-size: 16px;
    }
    body.nq .product-card .product-card-footer {
        padding: 0 10px 10px;
    }
    body.nq .product-card .product-card-footer .btn {
        height: 32px;
        font-size: var(--nq-font-sm);
    }
}

/* ============================================================
   顶部公告：全站通用优惠信息
   ============================================================ */
.nq-cart-promo {
    display: flex;
    align-items: center;
    gap: 12px;
    background: linear-gradient(135deg, #f0f7ff 0%, #e8f4f8 100%);
    border: 1px solid rgba(37, 99, 235, .15);
    border-left: 4px solid var(--nq-primary, #2563eb);
    border-radius: var(--nq-radius, 10px);
    padding: 12px 16px;
    margin-bottom: 16px;
    position: relative;
    overflow: hidden;
    opacity: 0;
    transform: translateY(14px);
}

.nq-cart-promo.is-in {
    animation: nq-promo-in .45s cubic-bezier(.22, 1, .36, 1) forwards;
}

@keyframes nq-promo-in {
    from { opacity: 0; transform: translateY(14px); }
    to { opacity: 1; transform: translateY(0); }
}

/* 光效扫过层：入场后周期性掠过 */
.nq-shine {
    position: absolute;
    top: 0;
    left: -60%;
    width: 40%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, .6), transparent);
    transform: skewX(-20deg);
    pointer-events: none;
    z-index: 1;
}

.nq-cart-promo.is-in .nq-shine {
    animation: nq-promo-shine 5s ease-in-out 0.6s infinite;
}

@keyframes nq-promo-shine {
    0% { left: -60%; }
    18% { left: 160%; }
    100% { left: 160%; }
}

.nq-cart-promo-icon {
    font-size: 32px;
    color: var(--nq-primary, #2563eb);
    line-height: 1;
    flex-shrink: 0;
    position: relative;
    z-index: 2;
}

.nq-cart-promo-text {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 3px;
    position: relative;
    z-index: 2;
    min-width: 0;
}

.nq-cart-promo-title {
    font-size: var(--nq-font-md, 14px);
    color: var(--nq-text-1, #0b1a33);
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 6px;
}

.nq-cart-promo-desc {
    font-size: var(--nq-font-xs, 12px);
    color: var(--nq-text-3, #64748b);
    line-height: 1.7;
}

.nq-promo-link {
    color: var(--nq-primary, #2563eb) !important;
    text-decoration: underline !important;
    font-weight: 600;
}

/* ─── 标签 ─── */
.nq-tag {
    display: inline-flex;
    align-items: center;
    gap: 3px;
    padding: 1px 7px;
    height: 20px;
    line-height: 20px;
    border-radius: 4px;
    font-size: 11px;
    font-weight: 700;
    white-space: nowrap;
    vertical-align: middle;
    cursor: default;
    user-select: none;
    transition: all .15s;
}

.nq-tag-coupon {
    background: #fef3c7;
    color: #92400e;
    border: 1px solid #fcd34d;
    cursor: pointer;
    position: relative;
}

.nq-tag-coupon:hover {
    background: #fde68a;
    transform: translateY(-1px);
    box-shadow: 0 2px 6px rgba(251, 191, 36, .3);
}

.nq-tag-coupon:active {
    transform: translateY(0);
}

.nq-tag-coupon::after {
    content: "📋";
    margin-left: 2px;
    font-size: 10px;
}

.nq-tag-qq {
    background: #e0f2fe;
    color: #075985 !important;
    border: 1px solid #7dd3fc;
    cursor: pointer;
    text-decoration: none !important;
}

.nq-tag-qq:hover {
    background: #bae6fd;
    text-decoration: none !important;
    transform: translateY(-1px);
}

/* ─── 复制成功提示 ─── */
.nq-copy-toast {
    position: fixed;
    top: 20px;
    left: 50%;
    transform: translateX(-50%) translateY(-20px);
    background: #065f46;
    color: #fff;
    padding: 8px 18px;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 600;
    z-index: 99999;
    opacity: 0;
    transition: all .25s;
    pointer-events: none;
    box-shadow: 0 4px 12px rgba(0, 0, 0, .15);
}

.nq-copy-toast.show {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
}

/* 移动端 */
@media (max-width: 767px) {
    .nq-cart-promo {
        padding: 10px 12px;
        gap: 8px;
        align-items: flex-start;
    }
    .nq-cart-promo-icon {
        font-size: 24px;
        margin-top: 2px;
    }
    .nq-cart-promo-desc {
        font-size: 12px;
        line-height: 1.65;
    }
}

/* ============================================================
   服务使用须知（搬自 nq 主题购物车底部提示卡片）
   ============================================================ */
.nq-cart-notice {
    margin-top: 24px;
    background: var(--nq-bg-1, #fff);
    border: 1px solid var(--nq-warning, #faad14);
    border-radius: var(--nq-radius, 8px);
    overflow: hidden;
}

.nq-cart-notice-header {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 10px 20px;
    font-size: var(--nq-font-md, 14px);
    font-weight: 500;
    color: var(--nq-warning, #faad14);
    background: var(--nq-warning-light, rgba(250, 173, 20, 0.1));
}

.nq-cart-notice-header i {
    font-size: 16px;
}

.nq-cart-notice-body {
    padding: 12px 20px;
    font-size: 14px;
    color: var(--nq-text-1, #1d2129);
    line-height: 1.8;
}

.nq-cart-notice-body a {
    color: var(--nq-primary);
}

/* 须知内容里的协议链接行（内容自带 nq-header-overview，这里兜底间距） */
.nq-cart-notice-body > div {
    margin-top: 8px;
}
