/* ===== 产品分类筛选器（横向布局） ===== */
.category-filter-section {
    background: #fff;
    border-radius: 0.25rem;
    overflow: hidden;
}

.filter-header {
    padding: 0.75rem 1.25rem;
    border-bottom: 2px solid #469682;
}

.current-category {
    font-size: 0.875rem;
    color: #666;
    font-weight: 500;
}

.product-count {
    font-size: 0.875rem;
    color: #666;
}

.filter-body {
    padding: 0;
}

.filter-row {
    display: flex;
    align-items: flex-start;
    padding: 0.875rem 1.25rem;
    border-bottom: 1px solid #f0f0f0;
}

.filter-row:last-child {
    border-bottom: none;
}

.filter-label {
    font-size: 0.875rem;
    color: #333;
    min-width: 60px;
    flex-shrink: 0;
}

.filter-options {
    display: flex;
    flex-wrap: wrap;
    gap: 1.5rem;
    flex: 1;
}

.filter-option {
    font-size: 0.875rem;
    color: #333;
    text-decoration: none;
    transition: color 0.2s;
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
}

/* 排序选项样式 */

.sort-option {
    display: flex;
    align-items: center;
    padding: 0.5rem 1rem;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.3s ease;
    color: #333;
    text-decoration: none;
    font-size: 0.875rem;
    word-break: keep-all;
}

.sort-option:hover {
    background-color: #f5f5f5;
}

.sort-option.active {
    color: #ff6a00;
    background-color: #fff;
    font-weight: 500;
}

.sort-option.active .arrow-up {
    fill: #ff6a00;
}

.sort-option.active .arrow-down {
    fill: #ff6a00;
}

.price-arrows {
    display: flex;
    flex-direction: column;
    align-items: center;
    margin-left: 0.25rem;
}

.arrow-up,
.arrow-down {
    transition: fill 0.2s ease;
    cursor: pointer;
}

.arrow-up:hover:not(.active-sort),
.arrow-down:hover:not(.active-sort) {
    fill: #ff6a00;
}

.sort-option.active .arrow-up,
.sort-option.active .arrow-down {
    fill: #ff6a00;
}

/* 价格排序激活时的特殊样式 */
.sort-option[data-sort="price"].active {
    position: relative;
}

/* SVG箭头颜色控制 */
.arrow-up.active-sort,
.arrow-down.active-sort {
    fill: #ff6a00 !important;
}

.arrow-up.inactive-sort,
.arrow-down.inactive-sort {
    fill: #666 !important;
}

/* 搜索框样式 */
.keyword-search {
    background-color: #f8f9fa;
}

.keyword-search input {
    outline: none;
    background-color: transparent;
    font-size: 0.875rem;
}
.keyword-search button {
    outline: none;
    border: none;
    background: #469682;
    color: white;
    font-size: 0.875rem;
    cursor: pointer;
    word-break: keep-all;
}

.filter-option:hover {
    color: #ff5b00;
}

.filter-option.active {
    color: #ff6a00;
    font-weight: 500;
}

.filter-option .count {
    color: #999;
    font-size: 0.8125rem;
}

.filter-option.active .count {
    color: #ff6a00;
}

/* 隐藏二级和三级分类行，默认不显示 */
/* .sub-filter,
.third-filter {
    display: none;
} */

.sub-filter.show,
.third-filter.show {
    display: flex;
}


/* Responsive (<=1200px) */
@media (max-width: 1200px) {
    .filter-options {
        gap: 1rem;
    }
}

/* Responsive (<=768px) */
@media (max-width: 768px) {
    .filter-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.5rem;
    }
    
    .filter-row {
        flex-direction: column;
        padding: 0.75rem 1rem;
    }
    
    .filter-label {
        min-width: auto;
        padding-bottom: 0.5rem;
        width: 100%;
    }
    
    .filter-options {
        gap: 0.75rem;
        width: 100%;
    }

}

/* ===== 产品详情页面 ===== */
.product-detail-wrapper {
    background: #fff;
    padding: 1.5rem;
    border-radius: 0.25rem;
}

/* ===== SKU 区域（筛选 + 规格表） ===== */
.sku-section {
    border: 1px solid #eee;
}

/* `.sku-filter-section` / `.sku-table-section` 当前仅用于结构拆分，无需单独样式 */

.sku-row .sku-label {
    width: 110px;
    padding-top: 0.25rem;
    font-size: 0.875rem;
}

.sku-section .btn {
    font-size: 0.875rem;
}

.sku-btn.active {
    border-color: #ff6a00;
    color: #ff6a00;
    background: #fff;
}

/* SKU 按钮 hover 与 active 保持一致 */
.sku-btn:hover {
    border-color: #ff6a00;
    color: #ff6a00;
    background: #fff;
}

/* SKU 区域按钮统一尺寸 */
.sku-section .btn {
    border-radius: 2px;
}

.sku-section .sku-btn.btn-sm {
    height: 32px;
    padding: 0 14px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
}

.sku-section .qty-btn {
    width: 32px;
    height: 32px;
    padding: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
}

.sku-section .qty-input.form-control-sm {
    height: 32px;
    padding-top: 0;
    padding-bottom: 0;
    line-height: 1;
}

.sku-footer .btn {
    height: 44px;
    padding-top: 0;
    padding-bottom: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}
.sku-footer .btn:active,.sku-footer .btn:focus {
    border: 1px solid #198754 !important;
}

/* 修复：全局 button:focus { border:none!important } 导致 outline 按钮点击后边框消失 */
.sku-section .btn-outline-secondary:focus,
.sku-section .btn-outline-secondary:focus-visible,
.sku-section .btn-outline-secondary:active,
.sku-section .btn-outline-secondary:active:focus,
.sku-section .btn-outline-success:focus,
.sku-section .btn-outline-success:focus-visible,
.sku-section .btn-outline-success:active,
.sku-section .btn-outline-success:active:focus {
    border: 1px solid currentColor !important;
    box-shadow: none !important;
}

.sku-section .sku-btn.active:focus,
.sku-section .sku-btn.active:focus-visible,
.sku-section .sku-btn.active:active,
.sku-section .sku-btn.active:active:focus {
    border: 1px solid #ff6a00 !important;
    color: #ff6a00 !important;
    box-shadow: none !important;
}

.sku-section .btn-success:focus,
.sku-section .btn-success:focus-visible,
.sku-section .btn-success:active,
.sku-section .btn-success:active:focus {
    border: 1px solid #198754 !important;
    box-shadow: none !important;
}

.sku-table-scroll {
    height: 420px;          /* 固定高度：纵向滚动 */
    overflow: auto;         /* 横向 + 纵向滚动 */
    border: 1px solid #eee;
    border-radius: 0.25rem;
    background: #fff;
}

/* 单售价（mode=0）无 SKU 列表时，避免规格区域留出大量空白 */
.mode-single-price .sku-table-scroll {
    height: auto !important;
    max-height: none !important;
    overflow: visible !important;
}

.mode-single-price .sku-pager {
    display: none !important;
}

.sku-table {
    min-width: 980px;       /* 触发横向滚动 */
    border-collapse: separate;
    border-spacing: 0;
    margin: 0;
    font-size: 0.875rem;
}

/* ===== 已选清单弹层（仅覆盖表格滚动区） ===== */

.sku-selected-overlay {
    position: absolute;
    inset: 0;
    z-index: 50;
    background: rgba(255, 255, 255, 0.98);
    border: 1px solid #e9e9e9;
    border-radius: 0.25rem;
}

.sku-selected-panel {
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
}

.sku-selected-header {
    padding: 0.75rem 1rem;
    border-bottom: 1px solid #eee;
}

.sku-selected-close {
    font-size: 24px;
    line-height: 1;
    color: #333;
    text-decoration: none;
}

.sku-selected-body {
    flex: 1;
    overflow: hidden;
}

.sku-selected-scroll {
    height: 100%;
    overflow: auto;
}

.sku-selected-table {
    font-size: 0.875rem;
    min-width: 980px;
}

.sku-selected-table thead th {
    position: sticky;
    top: 0;
    z-index: 2;
    background: #f7f7f7;
    border-bottom: 1px solid #e6e6e6;
    font-weight: 500;
    color: #666;
    white-space: nowrap;
}

.sku-selected-table td,
.sku-selected-table th {
    padding: 0.9rem 1rem;
    vertical-align: middle;
    border-bottom: 1px solid #f0f0f0;
    white-space: nowrap;
}

.sku-table thead th {
    position: sticky;
    top: 0;
    z-index: 5;
    background: #f7f7f7;
    border-bottom: 1px solid #e6e6e6;
    font-weight: 500;
    color: #666;
    white-space: nowrap;
}

.sku-table td,
.sku-table th {
    padding: 0.9rem 1rem;
    vertical-align: middle;
    border-bottom: 1px solid #f0f0f0;
    white-space: nowrap;
    background: white;
}

/* 左侧固定：型号列，固定宽度 200px，文字自动换行，右侧 + 下方阴影 */
.sticky-col-left {
    position: sticky;
    left: 0;
    z-index: 6;            /* 盖过普通单元格 */
    width: 240px;
    min-width: 240px;
    max-width: 240px;
    background: #fff;
    white-space: normal !important;
    word-break: break-word;
    box-shadow: 2px 0 8px rgba(0, 0, 0, 0.08) !important;
}

.sku-table thead .sticky-col-left {
    z-index: 8;            /* 盖过右侧 sticky 与表头 */
    background: #f7f7f7;
    width: 240px;
    min-width: 240px;
    max-width: 240px;
    white-space: normal !important;
    word-break: break-word;
    box-shadow: 2px 0 8px rgba(0, 0, 0, 0.08) !important;
}

/* 右侧固定列：价格/库存/进货数量 */
.sticky-col-right {
    position: sticky;
    z-index: 6;
    background: #fff;
}

.sku-table thead .sticky-col-right {
    z-index: 8;
    background: #f7f7f7;
}

/* 仅价格列左侧阴影 */
.sticky-col-right.sticky-right-price {
    box-shadow: -2px 0 8px rgba(0, 0, 0, 0.08);
}

.sku-table thead .sticky-col-right.sticky-right-price {
    box-shadow: -2px 0 8px rgba(0, 0, 0, 0.08);
}

/* 右侧 3 列的粘性偏移（从右往左叠加） */
.sticky-right-qty   { right: 0; min-width: 170px; }
.sticky-right-stock { right: 170px; min-width: 110px; text-align: center; }
.sticky-right-price { right: 280px; min-width: 110px; text-align: center; }

.qty-input {
    width: 56px;
    padding-left: 0;
    padding-right: 0;
}

.qty-btn {
    width: 32px;
    height: 32px;
    line-height: 1;
    padding: 0;
    border: 1px solid #ddd;
}
.qty-btn:active,.qty-btn:focus {
    border: 1px solid #ddd !important;
}

/* 让右侧固定列在滚动时更清晰 */
.sticky-col-right.sticky-right-qty { background: #fff; }
.sticky-col-right.sticky-right-stock { background: #fff; }
.sticky-col-right.sticky-right-price { background: #fff; }

/* 表格中的价格统一使用主题橙色 #ff6a00 */
.sticky-right-price,.sku-selected-table td.text-danger {
    color: #ff6a00 !important;
}

@media (max-width: 768px) {
    .sku-row .sku-label { width: 90px; }
    .sku-table-scroll { height: 360px; }
    .sku-table { min-width: 900px; }
}

.object-fit-contain {
    object-fit: contain;
}

/* 产品图片轮播区域 */
.product-gallery {
    width: 340px;
}

.main-image-wrapper {
    border: 1px solid #e8e8e8;
    border-radius: 0.25rem;
    overflow: hidden;
    background: #fff;
}

.main-image {
    background: #fff;
}

.main-image img {
    max-width: 100%;
    max-height: 100%;
}

/* 缩略图轮播 */
.thumbnail-gallery {
    margin-top: 1rem;
}

.thumbnail-swiper {
    padding: 0 2.5rem;
}

.thumbnail-swiper .swiper-slide {
    width: auto;
    padding: 0;
}

.thumbnail-item {
    border: 2px solid transparent;
    border-radius: 0.25rem;
    overflow: hidden;
    cursor: pointer;
    transition: all 0.3s ease;
    background: #fff;
}

.thumbnail-item:hover {
    border-color: #469682;
}

.thumbnail-item.active {
    border-color: #469682;
}

.thumbnail-item img {
    max-width: 100%;
    max-height: 100%;
}

/* 缩略图导航箭头 */
.thumbnail-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 32px;
    height: 32px;
    background: #fff;
    border: 1px solid #e8e8e8;
    border-radius: 50%;
    cursor: pointer;
    z-index: 10;
    transition: all 0.3s ease;
    color: #666;
}

.thumbnail-nav:hover {
    background: #469682;
    border-color: #469682;
    color: #fff;
}

.thumbnail-nav.prev {
    left: 0;
}

.thumbnail-nav.next {
    right: 0;
}

.thumbnail-nav svg {
    width: 16px;
    height: 16px;
}

.thumbnail-nav.disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.thumbnail-nav.disabled:hover {
    background: #fff;
    border-color: #e8e8e8;
    color: #666;
}

/* 产品详情信息区域 */
.product-title {
    font-size: 1.5rem;
    font-weight: 700;
    color: #333;
    margin-bottom: 0.75rem;
    line-height: 1.4;
}

.product-sales {
    font-size: 0.875rem;
    color: #666;
}

.sales-text {
    color: #666;
}

.sales-count {
    color: #333;
    font-weight: 500;
}

/* 价格区间 */
.product-price {
    font-size: 1rem;
}

.price-label {
    color: #666;
    font-size: 0.875rem;
    margin-right: 0.5rem;
}

.price-range {
    color: #ff6a00;
    font-size: 1.5rem;
    font-weight: 600;
}


/* 服务承诺 */
.product-service {
    font-size: 0.875rem;
}

.service-label {
    color: #666;
}

.service-content {
    color: #333;
    flex: 1;
}

.mobile-sku{
    font-size: 0.875rem;
}
.mobile-sku-content{
    padding: 0.25rem 0.5rem;
    background: #ddd;
    font-size: 0.875rem;
}

.logistics-label {
    color: #666;
}

.logistics-route {
    color: #333;
}

.from-location,
.to-location {
    color: #333;
}

.arrow-icon {
    color: #999;
    margin: 0 0.25rem;
}

.logistics-details {
    color: #666;
}

.shipping-fee,
.shipping-time {
    color: #666;
}

.more-link {
    color: #469682;
    text-decoration: none;
    cursor: pointer;
}

.more-link:hover {
    text-decoration: underline;
}

/* 产品属性表格 */
.product-attributes {
    margin-top: 1.5rem;
    background: #f5f5f5;
    border-radius: 0.25rem;
    padding: 1rem;
    gap: 0.5rem;
}
.product-attributes li{
    width: calc((100% - 2rem) / 5);
}

.product-attributes li .attr-label {
    color: #666;
    font-size: 0.875rem;
}

.product-attributes li .attr-value {
    color: #333;
    font-size: 0.875rem;
}

/*产品详情aside begin*/
.product-detail_aside .title{
    font-size: 1rem;
    color: #469682;
    font-weight: bold;
    border-bottom: 1px solid #ddd;
    padding-bottom: 0.75rem;
}
.hot_products{
    width: 16rem;
}
.hot_products .product-grid-item{
    width: 100%;
}
.product_detail{
    flex: 1 1 0;
    width: 0;
}
.pro_detail_content{
    width: 100%;
}
.pro_detail_content img{
    display: block;
    max-width: 100%;
}
/*产品详情aside end*/

/* 响应式设计 */
@media (max-width: 992px) {
    .product-gallery {
        width: 100%;
        max-width: 450px;
        margin: 0 auto;
    }
}

@media (max-width: 768px) {
    .main-image-wrapper {
        border: none;
        border-radius:0;
    }
    .product-detail-wrapper {
        padding: 0;
    }
    
    .product-gallery {
        width: 100%;
    }
    
    .thumbnail-swiper {
        padding: 0 2rem;
    }
    
    .thumbnail-nav {
        width: 28px;
        height: 28px;
    }
    
    .thumbnail-nav svg {
        width: 14px;
        height: 14px;
    }
    
    .product-title {
        font-size: 1.25rem;
    }
    
    .price-range {
        font-size: 1.25rem;
    }
    .product-attributes{
        margin-top: 0;
        gap: 1rem;
    }

    .product-attributes li {
        width: calc((100% - 2rem) / 2);
    }
    .hot_products{
        order: 2;
        width: 100%;
    }
    .hot_products .product-grid-item{
        width: calc((100% - 1rem) / 2);
    }
    .pro_detail_content{
        order: 1;
    }
    
}

/* ===== 移动端底部固定导航 ===== */
.mobile-product-bottom {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    background: #fff;
    padding: 8px 12px;
    box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.08);
    border-top: 1px solid #eee;
}

.product-bottom-left {
    gap: 1rem;
}

.product-bottom-item {
    text-decoration: none;
    color: #666;
    padding: 0 0.25rem;
}

.product-bottom-item:hover,
.product-bottom-item:active {
    color: #333;
}

.product-bottom-icon {
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.product-bottom-icon img {
    max-width: 100%;
    max-height: 100%;
}

.product-bottom-text {
    font-size: 12px;
    margin-top: 2px;
}

.product-bottom-right {
    gap: 10px;
}

.product-bottom-right .btn {
    height: 40px;
    padding: 0 0.75rem;
    font-size: 14px;
    border-radius: 20px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.btn-add-cart {
    background: #fff;
    border: 1px solid #469682 !important;
    color: #469682;
}

.btn-add-cart:hover,
.btn-add-cart:active,
.btn-add-cart:focus {
    background: #fff5f0;
    border: 1px solid #469682 !important;
    color: #469682;
}

.btn-buy-now {
    background: #469682;
    border: 1px solid #469682 !important;
    color: #fff;
}

.btn-buy-now:hover,
.btn-buy-now:active,
.btn-buy-now:focus {
    background: #e55d00;
    border: 1px solid #e55d00 !important;
    color: #fff;
}

/* ===== 移动端 SKU 选择弹层 ===== */
.mobile-sku-modal {
    position: fixed;
    inset: 0;
    z-index: 2000;
}

.mobile-sku-mask {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.5);
}

.mobile-sku-panel {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: #fff;
    border-radius: 12px 12px 0 0;
    max-height: 85vh;
    display: flex;
    flex-direction: column;
    animation: slideUp 0.3s ease;
}

@keyframes slideUp {
    from { transform: translateY(100%); }
    to { transform: translateY(0); }
}

/* 价格信息 + 关闭 */
.mobile-sku-header {
    padding: 16px;
    border-bottom: 1px solid #f5f5f5;
}

.mobile-sku-price {
    font-size: 14px;
    color: #333;
}

.mobile-sku-price .price-symbol {
    color: #ff6a00;
    font-size: 14px;
}

.mobile-sku-price .price-min,
.mobile-sku-price .price-max {
    color: #ff6a00;
    font-size: 22px;
    font-weight: 600;
}

.mobile-sku-price .price-sep {
    color: #ff6a00;
    margin: 0 4px;
}

.mobile-sku-price .price-unit {
    color: #999;
    font-size: 13px;
    margin-left: 10px;
}

.mobile-sku-close {
    width: 28px;
    height: 28px;
    border: none;
    background: none;
    font-size: 24px;
    color: #999;
    line-height: 1;
    cursor: pointer;
    padding: 0;
}

/* SKU 列表区域 */
.mobile-sku-body {
    flex: 1;
    overflow-y: auto;
    padding: 0 16px;
}

.mobile-sku-title {
    font-size: 14px;
    font-weight: 500;
    color: #333;
    padding: 12px 0;
    border-bottom: 1px solid #f5f5f5;
}

.mobile-sku-list {
    max-height: 45vh;
    overflow-y: auto;
}

.mobile-sku-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 0;
    border-bottom: 1px solid #f5f5f5;
}

.mobile-sku-item:last-child {
    border-bottom: none;
}

.mobile-sku-item-info {
    flex: 1;
}

.mobile-sku-item-name {
    font-size: 14px;
    color: #333;
    font-weight: 500;
    margin-bottom: 4px;
}

.mobile-sku-item-meta {
    font-size: 13px;
    color: #999;
}

.mobile-sku-item-meta .item-price {
    color: #ff6a00;
    margin-right: 8px;
}

/* SKU 数量控制 */
.mobile-sku-item-qty {
    display: flex;
    align-items: center;
    gap: 8px;
}

.mobile-sku-item-qty .qty-btn,.mobile-sku-item-qty .qty-btn:active,.mobile-sku-item-qty .qty-btn:focus {
    width: 28px;
    height: 28px;
    border: 1px solid #ddd !important;
    background: #fff;
    border-radius: 4px;
    font-size: 18px;
    line-height: 1;
    color: #666;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
}

.mobile-sku-item-qty .qty-btn:active {
    background: #f5f5f5;
}

.mobile-sku-item-qty .qty-input {
    width: 40px;
    height: 28px;
    border: none;
    text-align: center;
    font-size: 14px;
    color: #333;
    background: transparent;
}

/* 底部固定区域 */
.mobile-sku-footer {
    padding: 0.75rem 1rem;
    padding-bottom: calc(12px + env(safe-area-inset-bottom));
    border-top: 1px solid #eee;
    background: #fff;
}

.mobile-sku-summary {
    font-size: 0.875rem;
    color: #666;
    margin-bottom: 8px;
}

.mobile-sku-confirm {
    width: 100%;
    height: 44px;
    background: #469682;
    border: none !important;
    border-radius: 22px;
    color: #fff;
    font-size: 16px;
    font-weight: 500;
}

.mobile-sku-confirm:active,
.mobile-sku-confirm:focus {
    background: #e55d00;
    border: none !important;
    color: #fff;
}

/* 规格入口的双按钮 */
.mobile-sku-btns {
    display: flex;
    gap: 12px;
}

.mobile-sku-btns .btn {
    flex: 1;
    height: 44px;
    border-radius: 22px;
    font-size: 15px;
    font-weight: 500;
}

.btn-add-cart-modal {
    background: #fff;
    border: 1px solid #469682 !important;
    color: #469682;
}

.btn-add-cart-modal:hover,
.btn-add-cart-modal:active,
.btn-add-cart-modal:focus {
    background: #fff5f0;
    border: 1px solid #469682 !important;
    color: #469682;
}

.btn-buy-now-modal {
    background: #469682;
    border: 1px solid #469682 !important;
    color: #fff;
}

.btn-buy-now-modal:hover,
.btn-buy-now-modal:active,
.btn-buy-now-modal:focus {
    background: #e55d00;
    border: 1px solid #e55d00 !important;
    color: #fff;
}

/* 移动端规格触发样式 */
.mobile-sku-content {
    color: #333;
    cursor: pointer;
}