/* 百家 Elementor 小部件样式 */

/* ========== 筛选器样式 ========== */
 
.baijia-filter-title {
    color: #E74C3C;
    font-size: 14px;
    font-weight: 600;
    letter-spacing: 1px;
    margin-bottom: 10px;
    text-transform: uppercase;
}

.baijia-filter-list {
    margin-bottom: 20px;
}

.baijia-filter-group {
    border-bottom: 1px solid #eee;
    padding: 12px 0;
}

.baijia-filter-group.no-divider {
    border-bottom: none;
}

.baijia-filter-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    cursor: pointer;
    user-select: none;
}

.baijia-filter-header .filter-label {
    font-size: 14px;
    color: #333;
}

.baijia-filter-header .filter-toggle {
    color: #000;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
}

.baijia-filter-group.active .filter-toggle {
    color: #999;
    transform: rotate(180deg);
}

.baijia-filter-options {
    padding-top: 12px;
}

.baijia-filter-option {
    display: flex;
    align-items: flex-start;
    padding: 6px 0;
    cursor: pointer;
    font-size: 13px;
    color: #666;
}

.baijia-filter-option input[type="checkbox"] {
    display: none;
}

.baijia-filter-option .checkmark {
    width: 20px;
    height: 20px;
    min-width: 20px;
    border: 2px solid #ccc;
    border-radius: 4px;
    margin-right: 12px;
    position: relative;
    transition: all 0.2s ease;
}

.baijia-filter-option input:checked + .checkmark {
    background-color: #333;
    border-color: #333;
}

.baijia-filter-option input:checked + .checkmark::after {
    content: '';
    position: absolute;
    left: 6px;
    top: 2px;
    width: 5px;
    height: 10px;
    border: solid white;
    border-width: 0 2px 2px 0;
    transform: rotate(45deg);
}

.baijia-filter-option .option-label {
    flex: 1;
}

.baijia-filter-apply {
    width: 100%;
    padding: 14px 20px;
    background-color: #1a1a1a;
    color: #fff;
    border: none;
    border-radius: 30px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

.baijia-filter-apply:hover {
    background-color: #333;
}

.baijia-filter-buttons {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-top: 15px;
}

.baijia-filter-clear {
    padding: 14px 20px;
    background-color: #fff;
    color: #333;
    border: 1px solid #ddd;
    border-radius: 30px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
}

.baijia-filter-clear:hover {
    background-color: #f5f5f5;
    border-color: #333;
}

/* ========== 筛选标签样式 ========== */
.baijia-filter-tags-widget {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    flex-wrap: wrap;
    gap: 15px;
    padding: 15px 0;
}

/* 移动端筛选按钮 - 默认隐藏 */
.baijia-mobile-filter-btn {
    display: none;
}

.baijia-tags-container {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
}

.baijia-tags-container:empty {
    display: none;
}

.baijia-filter-tag {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 16px;
    background-color: transparent;
    border: 1px solid #e0e0e0;
    border-radius: 20px;
    font-size: 13px;
    color: #333;
}

.baijia-filter-tag .tag-remove {
    cursor: pointer;
    font-size: 16px;
    color: #999;
    line-height: 1;
}

.baijia-filter-tag .tag-remove:hover {
    color: #333;
}

.baijia-clear-all {
    color: #666;
    text-decoration: underline;
    font-size: 13px;
}

.baijia-clear-all:hover {
    color: #333;
}

.baijia-sort-wrapper {
    display: flex;
    align-items: center;
    gap: 8px;
    position: relative;
}

.baijia-sort-wrapper .sort-label {
    font-size: 13px;
    color: #666;
}

.baijia-sort-dropdown {
    position: relative;
}

.baijia-sort-dropdown .sort-selected {
    display: flex;
    align-items: center;
    justify-content: space-between;
    cursor: pointer;
    font-size: 13px;
    font-weight: 500;
    color: #333;
}

.baijia-sort-dropdown .sort-arrow {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    border: 1px solid #000;
    background: transparent;
    transition: transform 0.2s;
}

.baijia-sort-dropdown.open .sort-arrow {
    transform: rotate(180deg);
}

.baijia-sort-dropdown .sort-arrow svg {
    width: 10px;
    height: 10px;
}

.baijia-sort-dropdown .sort-options {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    margin-top: 4px;
    min-width: 100%;
    background: #f5f5f5;
    border-radius: 4px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    list-style: none;
    padding: 4px 0;
    z-index: 100;
}

.baijia-sort-dropdown.open .sort-options {
    display: block;
}

.baijia-sort-dropdown .sort-option {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 1px 12px;
    cursor: pointer;
    transition: background 0.2s;
}

.baijia-sort-dropdown .sort-option .option-check {
    width: 16px;
    opacity: 0;
}

.baijia-sort-dropdown .sort-option .option-check svg {
    width: 16px;
    height: 16px;
    stroke: #333;
}

.baijia-sort-dropdown .sort-option.active .option-check {
    opacity: 1;
}

.baijia-sort-dropdown .sort-option:hover .option-check {
    opacity: 1;
}

.baijia-sort-dropdown .sort-options:hover .sort-option.active .option-check {
    opacity: 0;
}

.baijia-sort-dropdown .sort-options:hover .sort-option.active:hover .option-check {
    opacity: 1;
}

.baijia-sort-dropdown .sort-option .option-text {
    font-size: 13px;
    color: #333;
}

/* ========== 产品网格样式 ========== */
.baijia-product-grid-widget {
    width: 100%;
}

.baijia-product-grid {
    display: grid;
    gap: 20px;
}

.baijia-product-grid.columns-2 {
    grid-template-columns: repeat(2, 1fr);
}

.baijia-product-grid.columns-3 {
    grid-template-columns: repeat(3, 1fr);
}

.baijia-product-grid.columns-4 {
    grid-template-columns: repeat(4, 1fr);
}

.baijia-product-link {
    display: block;
    text-decoration: none;
    color: inherit;
}

.baijia-product-link:hover {
    text-decoration: none;
    color: inherit;
}

.baijia-product-item {
    position: relative;
    display: flex;
    flex-direction: column;
    background-color: #F1F1F1;
    border-radius: 10px;
    padding: 10px;
}

.baijia-product-compare {
    position: absolute;
    top: 10px;
    right: 10px;
    display: flex;
    align-items: center;
    gap: 5px;
    font-size: 12px;
    color: #666;
    cursor: pointer;
    z-index: 10;
    background: transparent;
    padding: 0;
    border-radius: 0;
    transition: all 0.2s ease;
}

.baijia-product-compare:hover {
    color: #333;
}

.baijia-product-compare.active {
    color: #333;
}

.baijia-product-compare .compare-icon svg {
    width: 14px;
    height: 14px;
    vertical-align: middle;
}

.baijia-product-compare .compare-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.baijia-product-image {
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.baijia-product-image img {
    max-width: 100%;
    max-height: 100%;
    width: auto;
    height: auto;
    object-fit: contain;
    transition: transform 0.3s ease;
}

.baijia-product-image:hover img {
    transform: scale(1.1);
}

.baijia-product-info {
    padding: 15px 0 0 0;
    margin-top: auto;
}

.baijia-product-title {
    font-size: 16px;
    font-weight: 600;
    color: #333;
    margin: 0 0 5px 0;
}

.baijia-product-category {
    font-size: 13px;
    color: #888;
    margin: 0;
}

.no-products {
    grid-column: 1 / -1;
    text-align: center;
    padding: 40px;
    color: #666;
}

/* ========== 分页样式 ========== */
.baijia-pagination {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 30px 0 10px;
}

.baijia-page-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 36px;
    height: 36px;
    padding: 0 10px;
    border: 1px solid #e0e0e0;
    border-radius: 4px;
    font-size: 14px;
    color: #333;
    cursor: pointer;
    transition: all 0.2s ease;
    user-select: none;
}

.baijia-page-btn:hover {
    background-color: #f5f5f5;
    border-color: #333;
}

.baijia-page-btn.active {
    background-color: #333;
    border-color: #333;
    color: #fff;
    cursor: default;
}

.baijia-page-prev,
.baijia-page-next {
    font-size: 20px;
    font-weight: 300;
}

.baijia-page-ellipsis {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 36px;
    height: 36px;
    font-size: 14px;
    color: #999;
    user-select: none;
}

/* ========== 产品对比器样式 - 底部吸附可展开 ========== */
.baijia-comparator {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: #2d2d2d;
    display: none;
    flex-direction: column;
    z-index: 9999;
    transition: all 0.4s ease;
}

.baijia-comparator.show {
    display: flex;
}

.baijia-comparator.expanded {
    top: 0;
}

.baijia-comparator.expanded .baijia-comparator-content {
    margin: 10px 10px 0 10px;
}

.baijia-comparator-bar {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 15px;
    padding: 12px 10px;
    background: #2d2d2d;
}

.baijia-comparator-content {
    flex: 1;
    overflow-y: auto;
    display: none;
    background: #fff;
    border-radius: 8px 8px 0 0;
}

/* 展开后的顶部标题栏 */
.comparator-header {
    display: flex;
    align-items: center;
    padding: 20px 80px;
    background: #fff;
    border-radius: 8px 8px 0 0;
}

.comparator-title {
    margin: 0;
    font-size: 50px;
    font-weight: bold;
    color: #333;
    flex: 1;
}

.comparator-header-right {
    display: flex;
    align-items: center;
    gap: 10px;
}

.clear-comparison-list {
    color: #00A0E9;
    cursor: pointer;
    font-size: 14px;
}

.clear-comparison-list:hover {
    text-decoration: underline;
}

.comparator-close {
    background: none;
    border: none;
    cursor: pointer;
    padding: 5px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.comparator-close svg {
    width: 24px;
    height: 24px;
    stroke: #21afec;
}

.comparator-close:hover svg {
    stroke: #333;
}

.comparator-body {
    padding: 20px 80px;
}

.baijia-comparator.expanded .baijia-comparator-content {
    display: block;
}

.baijia-comparator-content .baijia-loading {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 200px;
}

.baijia-comparator-list {
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 8px;
    margin: 0;
}

.baijia-comparator-item {
    position: relative;
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 3px 5px;
    background: #fff;
    border-radius: 6px;
    overflow: visible;
}

.baijia-comparator-item img {
    width: 44px;
    height: 44px;
    flex-shrink: 0;
    object-fit: contain;
    border-radius: 4px !important;
    background-color: #f5f5f5;
    padding: 2px;
    box-sizing: border-box;
}

.baijia-comparator-item .item-name {
    display: block;
    font-size: 13px;
    color: #333;
    white-space: normal;
    line-height: 1.3;
}

.baijia-comparator-item .item-remove {
    display: flex;
    align-items: center;
    justify-content: center;
    position: absolute;
    top: -6px;
    right: -6px;
    width: 20px;
    height: 20px;
    background: #999;
    color: #fff;
    border-radius: 50%;
    font-size: 14px;
    line-height: 1;
    cursor: pointer;
    transition: background 0.2s;
}

.baijia-comparator-item .item-remove:hover {
    background: #666;
}

.baijia-compare-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 12px 24px;
    background: #00a0b0;
    color: #fff;
    border: none;
    border-radius: 50px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    text-transform: uppercase;
    white-space: nowrap;
}

.baijia-compare-btn:hover {
    background: #008a99;
}

.baijia-compare-btn .compare-btn-text {
    display: block;
}

/* ========== 响应式设计 ========== */
@media (max-width: 992px) {
    .baijia-product-grid.columns-4 {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 768px) {
    .baijia-product-grid.columns-3,
    .baijia-product-grid.columns-4 {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .baijia-filter-tags-widget {
        flex-direction: row;
        align-items: center;
        justify-content: space-between;
    }
    
    /* 移动端显示筛选按钮 */
    .baijia-mobile-filter-btn {
        display: flex;
        align-items: center;
        justify-content: space-between;
        width: 100%;
        padding: 12px 15px;
        border: 1px solid #333;
        background: #fff;
        cursor: pointer;
        order: -1;
    }
    
    .baijia-mobile-filter-btn .mobile-filter-text {
        font-size: 14px;
        font-weight: 500;
        color: #333;
    }
    
    .baijia-mobile-filter-btn .mobile-filter-icon svg {
        width: 18px;
        height: 18px;
        stroke: #333;
    }
    
    /* 移动端隐藏标签 */
    .baijia-filter-tags-widget .baijia-tags-container,
    .baijia-filter-tags-widget .baijia-clear-all {
        display: none;
    }
}

@media (max-width: 480px) {
    .baijia-product-grid.columns-2,
    .baijia-product-grid.columns-3,
    .baijia-product-grid.columns-4 {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .baijia-product-grid .baijia-product-title {
        font-size: 12px;
    }
    
    .baijia-product-grid .baijia-product-category {
        font-size: 11px;
    }
}

/* ========== 移动端筛选侧边栏 ========== */
.baijia-filter-sidebar-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 99998;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

.baijia-filter-sidebar-overlay.active {
    opacity: 1;
    visibility: visible;
}

.baijia-filter-sidebar {
    position: fixed;
    top: 0;
    right: 0;
    width: 85%;
    max-width: 360px;
    height: 100%;
    background: #fff;
    z-index: 99999;
    transform: translateX(100%);
    transition: transform 0.3s ease;
    display: flex;
    flex-direction: column;
    box-shadow: -5px 0 20px rgba(0, 0, 0, 0.1);
}

.baijia-filter-sidebar.active {
    transform: translateX(0);
}

.filter-sidebar-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px;
    border-bottom: 1px solid #eee;
    flex-shrink: 0;
}

.filter-sidebar-header .sidebar-title {
    font-size: 18px;
    font-weight: 600;
    color: #333;
}

.filter-sidebar-header .sidebar-close {
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    border-radius: 50%;
    transition: background 0.2s ease;
}

.filter-sidebar-header .sidebar-close:hover {
    background: #f5f5f5;
}

.filter-sidebar-header .sidebar-close svg {
    width: 20px;
    height: 20px;
    stroke: #333;
}

.filter-sidebar-content {
    flex: 1;
    overflow-y: auto;
    padding: 20px;
    -webkit-overflow-scrolling: touch;
}

/* 侧边栏内的筛选器样式覆盖 */
.filter-sidebar-content .baijia-filter-widget {
    display: block !important;
}

.filter-sidebar-content .baijia-filter-group {
    margin-bottom: 0;
    border-bottom: 1px solid #eee;
}

.filter-sidebar-content .baijia-filter-header {
    padding: 15px 0;
}

.filter-sidebar-content .baijia-filter-options {
    padding-bottom: 15px;
}

.filter-sidebar-content .baijia-filter-apply,
.filter-sidebar-content .baijia-filter-clear {
    width: 100%;
    margin-top: 10px;
}

/* 防止页面滚动 */
body.filter-sidebar-open {
    overflow: hidden;
}

/* ========== 加载动画 ========== */
.baijia-loading {
    position: relative;
    pointer-events: none;
}

.baijia-loading::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(255,255,255,0.8);
    display: flex;
    align-items: center;
    justify-content: center;
}

.baijia-loading::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 30px;
    height: 30px;
    margin: -15px 0 0 -15px;
    border: 3px solid #f3f3f3;
    border-top: 3px solid #333;
    border-radius: 50%;
    animation: baijia-spin 1s linear infinite;
    z-index: 10;
}

@keyframes baijia-spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* ========== 对比弹窗样式 ========== */
body.modal-open {
    overflow: hidden;
}

.baijia-modal-loading {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0,0,0,0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 99999;
}

.baijia-modal-loading .spinner {
    width: 50px;
    height: 50px;
    border: 4px solid #fff;
    border-top-color: transparent;
    border-radius: 50%;
    animation: baijia-spin 1s linear infinite;
}

.baijia-compare-modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 99998;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

.baijia-compare-modal.active {
    opacity: 1;
    visibility: visible;
}

.baijia-compare-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0,0,0,0.6);
}

.baijia-compare-content {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 60px;
    transform: translateY(100%);
    background: #fff;
    margin: 20px;
    border-radius: 8px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    transition: transform 0.4s ease;
}

.baijia-compare-modal.active .baijia-compare-content {
    transform: translateY(0);
}

.baijia-compare-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 24px 30px;
}

.baijia-compare-header h2 {
    margin: 0;
    font-size: 28px;
    font-weight: 600;
}

.baijia-compare-actions {
    display: flex;
    align-items: center;
    gap: 20px;
}

.clear-comparison-list {
    color: #00A0E9;
    text-decoration: none;
    font-size: 14px;
}

.clear-comparison-list:hover {
    text-decoration: underline;
}

.baijia-compare-close {
    font-size: 28px;
    cursor: pointer;
    color: #999;
    line-height: 1;
}

.baijia-compare-close:hover {
    color: #333;
}

.baijia-compare-body {
    padding: 30px;
    overflow-x: auto;
    overflow-y: auto;
    flex: 1;
}

.baijia-compare-table {
    width: 100%;
    border-collapse: collapse;
    table-layout: fixed;
}

.baijia-compare-table .compare-label {
    width: 350px;
}

.baijia-compare-table .compare-cell {
    width: calc((100% - 350px) / 4);
    padding-left: 40px !important;
    padding-right: 40px !important;
    text-align: left !important;
}

.compare-empty-slot {
    height: 120px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #ccc;
    font-size: 24px;
}

.baijia-compare-table tr {
    border-bottom: 1px solid #f0f0f0;
}

.baijia-compare-table td {
    padding: 16px 20px;
    vertical-align: middle;
}

.compare-label {
    width: 300px;
    min-width: 300px;
    font-size: 13px;
    color: #636363;
    background: transparent;
    vertical-align: middle;
    text-align: left;
}

.compare-cell {
    text-align: center;
    font-size: 13px;
    color: #333;
    min-width: 200px;
}

.compare-row-images .compare-cell {
    padding: 30px 20px;
}

.compare-product-card {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
}

.compare-remove {
    position: absolute;
    top: 5px;
    right: 5px;
    width: 20px;
    height: 20px;
    background: transparent;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 25px;
    color: #999;
    z-index: 10;
}

.compare-remove:hover {
    background: transparent;
    color: #333;
}

.compare-product-image {
    position: relative;
    background: #F1F1F1;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 12px;
}

.compare-product-image img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}

.compare-product-title {
    font-size: 14px;
    font-weight: 600;
    color: #333;
    margin-bottom: 4px;
    text-align: left;
}

.compare-product-subtitle {
    font-size: 12px;
    color: #999;
    text-align: left;
}

.compare-row-section {
    background: #000;
}

.compare-row-section td {
    padding: 12px 20px;
}

.section-title {
    font-size: 16px;
    font-weight: 400;
    color: #fff;
}

.compare-row-attr {
    background: transparent;
}

.illumination-img {
    width: 100%;
    height: auto;
    object-fit: contain;
    border-radius: 8px;
}

@media (max-width: 768px) {
    .baijia-compare-content {
        width: 95%;
        max-height: 95vh;
    }
    
    .baijia-compare-header {
        padding: 16px 20px;
        flex-direction: column;
        gap: 10px;
    }
    
    .baijia-compare-header h2 {
        font-size: 20px;
    }
    
    .compare-label {
        width: 120px;
        min-width: 120px;
    }

    /* 对比弹窗 - 底部栏产品列表左右滑动 */
    .baijia-comparator-bar {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }

    .baijia-comparator-list {
        overflow-x: auto;
        overflow-y: visible;
        -webkit-overflow-scrolling: touch;
        flex-wrap: nowrap;
        scrollbar-width: none;
        -ms-overflow-style: none;
        padding: 8px 8px 2px 0;
    }

    .baijia-comparator-list::-webkit-scrollbar {
        display: none;
    }

    .baijia-comparator-item {
        flex-shrink: 0;
        min-width: 160px;
        max-width: 200px;
    }

    /* 对比弹窗 - 展开后标题栏适配 */
    .comparator-header {
        padding: 15px 15px;
        flex-wrap: wrap;
        gap: 10px;
    }

    .comparator-title {
        font-size: 22px;
        flex: 1 1 100%;
    }

    .comparator-header-right {
        width: 100%;
        justify-content: space-between;
    }

    /* 对比弹窗 - 表格区域左右滑动 */
    .comparator-body {
        padding: 10px 0;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }

    .baijia-comparator-content .baijia-compare-table {
        table-layout: auto;
        min-width: 600px;
    }

    .baijia-comparator-content .baijia-compare-table .compare-label {
        width: 100px;
        min-width: 100px;
        font-size: 12px;
        position: sticky;
        left: 0;
        background: #fff;
        z-index: 2;
    }

    .baijia-comparator-content .baijia-compare-table .compare-cell {
        min-width: 150px;
        padding-left: 10px !important;
        padding-right: 10px !important;
        font-size: 12px;
    }

    .baijia-comparator-content .compare-product-title {
        font-size: 12px;
    }

    .baijia-comparator-content .compare-product-subtitle {
        font-size: 11px;
    }

    .baijia-comparator.expanded .baijia-comparator-content {
        margin: 5px 0 0 0;
    }

    /* 对比按钮适配 */
    .baijia-compare-btn {
        padding: 10px 16px;
        font-size: 12px;
        flex-shrink: 0;
    }
}

/* ========== 时间轴样式 ========== */
.baijia-timeline-wrapper {
    position: relative;
    overflow: hidden;
}

.baijia-timeline-widget {
    padding: 40px 0;
    overflow-x: auto;
    overflow-y: hidden;
    scrollbar-width: none;
    -ms-overflow-style: none;
    cursor: grab;
    user-select: none;
}

.baijia-timeline-widget::-webkit-scrollbar {
    display: none;
}

.baijia-timeline-widget.dragging {
    cursor: grabbing;
}

.timeline-fade {
    position: absolute;
    top: 0;
    right: 0;
    bottom: 0;
    width: 100px;
    background: linear-gradient(to left, var(--timeline-fade-color, #fff), transparent);
    pointer-events: none;
    z-index: 10;
}

.timeline-nav-buttons {
    position: relative;
    display: flex;
    gap: 10px;
    z-index: 20;
    margin-top: 20px;
}

.timeline-nav-btn {
    width: 50px;
    height: 50px;
    border: 1px solid #e0e0e0;
    border-radius: 25px;
    background-color: #ffffff;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.timeline-nav-btn svg {
    width: 20px;
    height: 20px;
    stroke: #333333;
    transition: stroke 0.3s ease;
}

.timeline-nav-btn:hover {
    background-color: #0099cc;
    border-color: #0099cc;
}

.timeline-nav-btn:hover svg {
    stroke: #ffffff;
}

.timeline-nav-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.timeline-nav-btn:disabled:hover {
    background-color: #ffffff;
    border-color: #e0e0e0;
}

.timeline-nav-btn:disabled:hover svg {
    stroke: #333333;
}

.timeline-container {
    position: relative;
    min-width: max-content;
}

.timeline-line {
    position: absolute;
    top: 30px;
    left: 0;
    right: 0;
    height: 2px;
    background-color: #e0e0e0;
}

.timeline-years {
    display: flex;
    gap: 30px;
}

.timeline-year-group {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    flex-shrink: 0;
}

.timeline-items {
    display: flex;
    gap: 20px;
}

.timeline-items .timeline-item {
    width: calc((100vw - 200px) / 3);
    max-width: 470px;
}

.timeline-year-marker {
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 20px;
    position: relative;
    z-index: 2;
    cursor: pointer;
}

.timeline-dot {
    width: 111px;
    height: 111px;
    border-radius: 50%;
    background-color: transparent;
    border: 2px solid #999;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    transition: all 0.3s ease;
}

.timeline-dot:hover {
    transform: none;
}

.timeline-year-text {
    font-size: 16px;
    font-weight: 600;
    color: #999;
    transition: color 0.3s ease;
}

/* 选中状态 */
.timeline-year-group.active .timeline-dot {
    background-color: #0099cc;
    border: 2px solid #0099cc;
}

.timeline-year-group.active .timeline-year-text {
    color: #fff;
}

.timeline-item {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.timeline-item-image {
    width: 100%;
    aspect-ratio: 1;
    background: none !important;
    background-color: transparent !important;
    border-radius: 10px;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 10px;
}

.baijia-timeline-widget .timeline-item-image img,
.elementor .baijia-timeline-widget .timeline-item-image img {
    width: 100%;
    height: 100% !important;
    object-fit: cover;
    border-radius: 10px;
}

.timeline-item-title {
    font-size: 13px;
    color: #333;
    text-align: center;
}

/* ========== 手风琴图片堆叠样式 ========== */
.baijia-accordion-stack-widget {
    padding: 40px 0;
}

.accordion-stack-container {
    display: flex;
    align-items: flex-start;
    gap: 60px;
}

.accordion-stack-image {
    position: relative;
    width: 45%;
    flex-shrink: 0;
    overflow: visible;
}

.accordion-stack-image-inner {
    position: relative;
    width: 100%;
    height: 400px; /* 默认高度，Elementor可覆盖 */
}

.accordion-stack-img {
    width: 100%;
    height: 400px; /* 默认高度，Elementor可覆盖 */
    object-fit: cover !important;
    object-position: center center !important;
    display: block;
    border-radius: 10px;
    box-shadow: 0 10px 40px rgba(0,0,0,0.2);
    position: absolute;
    top: 0;
    left: 0;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transform: translateY(100vh);
    transition: transform 0.6s cubic-bezier(0.25, 0.1, 0.25, 1), opacity 0.3s ease, visibility 0.3s ease;
}

/* 第一张图片默认显示 */
.accordion-stack-img:first-child {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
    z-index: 1;
}

/* 已显示的图片（堆叠中） - 缩小并向下偏移形成堆叠效果 */
.accordion-stack-img.stacked {
    opacity: 1;
    visibility: visible;
    pointer-events: none;
    transform: translateY(20px) scale(0.95);
    transform-origin: center bottom;
}

/* 当前激活的图片（最顶层） */
.accordion-stack-img.active {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
    transform: translateY(0);
}

/* 从屏幕底部上滑进入动画 */
@keyframes slideInFromScreenBottom {
    from {
        transform: translateY(100vh);
        opacity: 1;
        visibility: visible;
    }
    to {
        transform: translateY(0);
        opacity: 1;
        visibility: visible;
    }
}

.accordion-stack-img.slide-in {
    visibility: visible;
    opacity: 1;
    animation: slideInFromScreenBottom 0.6s cubic-bezier(0.25, 0.1, 0.25, 1) forwards;
}

/* 往屏幕底部滑出动画 */
@keyframes slideOutToScreenBottom {
    from {
        transform: translateY(0);
        opacity: 1;
    }
    to {
        transform: translateY(100vh);
        opacity: 1;
    }
}

.accordion-stack-img.slide-out {
    animation: slideOutToScreenBottom 0.6s cubic-bezier(0.25, 0.1, 0.25, 1) forwards;
}

.accordion-stack-content {
    flex: 1;
}

.accordion-stack-main-title {
    font-size: 36px;
    font-weight: 700;
    color: #333;
    margin-bottom: 20px;
}

.accordion-stack-main-desc {
    font-size: 16px;
    color: #666;
    line-height: 1.6;
    margin-bottom: 30px;
}

.accordion-items {
    display: flex;
    flex-direction: column;
}

.accordion-item {
    border-top: 1px solid #eee;
    padding: 20px 0;
    cursor: pointer;
    transition: all 0.3s ease;
}

.accordion-item:last-child {
    border-bottom: 1px solid #eee;
}

.accordion-item-header {
    display: flex;
    align-items: center;
    gap: 15px;
}

.accordion-item-number {
    font-size: 14px;
    color: #999;
    font-weight: 500;
    transition: color 0.3s ease;
}

.accordion-item.active .accordion-item-number {
    color: #0099cc;
}

.accordion-item-title {
    font-size: 16px;
    font-weight: 600;
    color: #333;
    transition: color 0.3s ease;
}

.accordion-item.active .accordion-item-title {
    color: #0099cc;
}

.accordion-item-body {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.4s ease, padding 0.4s ease;
    padding-left: 45px;
}

.accordion-item.active .accordion-item-body {
    max-height: 300px;
    padding-top: 15px;
}

.accordion-item-description {
    font-size: 14px;
    color: #666;
    line-height: 1.7;
    margin: 0;
}

/* 手机端轮播 - 桌面端隐藏 */
.accordion-mobile-slider {
    display: none;
}

/* 手风琴图片堆叠 - 手机端：隐藏堆叠，显示轮播 */
@media (max-width: 768px) {
    /* 隐藏桌面堆叠结构 */
    .accordion-stack-container {
        display: none !important;
    }

    /* 显示手机端轮播 */
    .accordion-mobile-slider {
        display: block;
    }

    /* 主标题区域（可选显示） */
    .accordion-mobile-header {
        margin-bottom: 20px;
    }

    .accordion-mobile-main-title {
        font-size: 24px;
        font-weight: 700;
        color: #333;
        margin-bottom: 10px;
        line-height: 1.3;
    }

    .accordion-mobile-main-desc {
        font-size: 14px;
        color: #666;
        line-height: 1.6;
    }

    /* 幻灯片容器 */
    .accordion-mobile-slides-wrap {
        position: relative;
    }

    /* 每一张幻灯片：默认隐藏 */
    .accordion-mobile-slide {
        display: none;
        flex-direction: column;
    }

    /* 当前激活的幻灯片 - 渐显 + 微上移 */
    .accordion-mobile-slide.active {
        display: flex;
        animation: accordionSlideFadeIn 0.45s ease forwards;
    }

    @keyframes accordionSlideFadeIn {
        from {
            opacity: 0;
            transform: translateY(10px);
        }
        to {
            opacity: 1;
            transform: translateY(0);
        }
    }

    /* 文字区域 */
    .accordion-mobile-text {
        order: 2;
        padding-top: 16px;
        padding-bottom: 0;
    }

    .accordion-mobile-item-title {
        font-size: 20px;
        font-weight: 700;
        color: #333;
        margin-bottom: 10px;
        line-height: 1.3;
    }

    .accordion-mobile-item-desc {
        font-size: 14px;
        color: #666;
        line-height: 1.6;
        margin-bottom: 16px;
    }

    /* 进度条 */
    .accordion-mobile-progress {
        width: 100%;
        height: 3px;
        background: #e0e0e0;
        border-radius: 2px;
        overflow: hidden;
        margin-bottom: 16px;
    }

    .accordion-mobile-progress-fill {
        height: 100%;
        width: 0%;
        background: #0099cc;
        border-radius: 2px;
        transform-origin: left center;
    }

    /* 切换按钮区 */
    .accordion-mobile-nav {
        display: flex;
        gap: 10px;
    }

    .acc-nav-btn {
        width: 40px;
        height: 40px;
        border: 1.5px solid #333;
        background: transparent;
        border-radius: 50%;
        display: flex;
        align-items: center;
        justify-content: center;
        cursor: pointer;
        transition: background 0.2s ease, border-color 0.2s ease;
        padding: 0;
        flex-shrink: 0;
    }

    .acc-nav-btn:hover {
        background: #333;
    }

    .acc-nav-btn:hover svg {
        stroke: #fff;
    }

    .acc-nav-btn svg {
        width: 16px;
        height: 16px;
        stroke: #333;
        display: block;
        transition: stroke 0.2s ease;
    }

    /* 图片区域 */
    .accordion-mobile-img-wrap {
        order: 1;
        width: 100%;
    }

    .accordion-mobile-img-wrap img {
        width: 100%;
        height: 260px;
        object-fit: cover;
        display: block;
        border-radius: 8px;
    }
}

@media (max-width: 768px) {
    .timeline-years {
        gap: 40px;
    }
    
    .timeline-items.count-1 .timeline-item,
    .timeline-items.count-2 .timeline-item,
    .timeline-items.count-3 .timeline-item {
        width: 120px;
    }
}

/* ========== 购物车图标小部件样式 ========== */
.baijia-cart-icon-widget {
    display: inline-block;
}

.baijia-cart-icon-wrapper {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    cursor: pointer;
    transition: all 0.3s ease;
}

.baijia-cart-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.3s ease;
}

.baijia-cart-icon svg {
    width: 24px;
    height: 24px;
    fill: #333;
    transition: fill 0.3s ease;
}

.baijia-cart-icon-wrapper:hover .baijia-cart-icon svg {
    fill: #0099cc;
}

.baijia-cart-count {
    position: absolute;
    top: -8px;
    right: -8px;
    min-width: 18px;
    height: 18px;
    line-height: 18px;
    padding: 0 5px;
    background-color: #e74c3c;
    color: #fff;
    font-size: 11px;
    font-weight: 600;
    text-align: center;
    border-radius: 50px;
    box-sizing: border-box;
    transition: all 0.3s ease;
}

.baijia-cart-count.hidden {
    display: none;
}

/* 购物车图标弹跳动画 */
@keyframes cartBounce {
    0%, 100% {
        transform: scale(1);
    }
    25% {
        transform: scale(1.3);
    }
    50% {
        transform: scale(0.9);
    }
    75% {
        transform: scale(1.15);
    }
}

.baijia-cart-icon-wrapper.cart-bounce {
    animation: cartBounce 0.6s ease;
}

.baijia-cart-icon-wrapper.cart-bounce .baijia-cart-count {
    animation: cartBounce 0.6s ease;
}

/* 添加到购物车按钮加载状态 */
form.cart button[type="submit"].loading,
form.cart .single_add_to_cart_button.loading,
.baijia-loading-btn {
    position: relative;
    color: transparent !important;
    pointer-events: none;
}

form.cart button[type="submit"].loading::after,
form.cart .single_add_to_cart_button.loading::after,
.baijia-loading-btn::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 20px;
    height: 20px;
    margin: -10px 0 0 -10px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-top-color: #fff;
    border-radius: 50%;
    animation: baijia-spin 0.8s linear infinite;
}

/* Toast 提示样式 */
.baijia-cart-toast {
    position: fixed;
    top: 30px;
    right: 30px;
    display: flex;
    flex-direction: column;
    background-color: rgb(9, 177, 240);
    color: #fff;
    border-radius: 12px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.25);
    z-index: 999999;
    transform: translateX(120%);
    transition: transform 0.3s ease;
    min-width: 280px;
    overflow: hidden;
    padding: 15px;
}

.baijia-cart-toast.show {
    transform: translateX(0);
}

.baijia-cart-toast.error {
    background-color: #e74c3c;
}

.baijia-cart-toast .toast-main {
    display: flex;
    align-items: flex-start;
    gap: 50px;
}

.baijia-cart-toast .toast-image-wrap {
    background-color: #fff;
    border-radius: 8px;
    padding: 12px;
    flex-shrink: 0;
}

.baijia-cart-toast .toast-image {
    width: 100px;
    height: 100px;
    object-fit: contain;
    display: block;
}

.baijia-cart-toast .toast-content {
    display: flex;
    flex-direction: column;
    gap: 6px;
    flex: 1;
        max-width: 124px;
}

.baijia-cart-toast .toast-title {
    font-weight: 600;
    font-size: 20px;
    color: #fff;
    line-height: 1.3;
}

.baijia-cart-toast .toast-qty {
    display: inline-block;
    background-color: transparent;
    color: #fff;
    font-size: 12px;
    font-weight: 500;
    padding: 0px 17px;
    border: 1px solid #fff;
    border-radius: 4px;
    width: fit-content;
}

.baijia-cart-toast .toast-message {
    font-size: 18px;
    color: #fff;
    margin-top: 2px;
    line-height: 1.4;
}

.baijia-cart-toast .toast-view-cart {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    background-color: #000;
    color: #fff;
    padding: 10px 20px;
    margin-top: 15px;
    font-size: 14px;
    font-weight: 600;
    text-decoration: none;
    border-radius: 6px;
    transition: background-color 0.2s;
}

.baijia-cart-toast .toast-view-cart:hover {
    background-color: #222;
}

.baijia-cart-toast .toast-view-cart svg {
    fill: #fff;
}

/* 响应式 */
@media (max-width: 768px) {
    .baijia-cart-toast {
        top: auto;
        bottom: 20px;
        right: 20px;
        left: 20px;
        transform: translateY(120%);
    }
    
    .baijia-cart-toast.show {
        transform: translateY(0);
    }
    
    .baijia-cart-toast .toast-message,
    .baijia-cart-toast .toast-title {
        white-space: normal;
    }
}

/* ========== Illumination 图片灯箱样式 ========== */
.illumination-img {
    cursor: pointer;
    max-width: 100px;
    transition: opacity 0.2s ease;
    border-radius: 8px !important;
}

.baijia-compare-table .compare-cell img {
    border-radius: 8px !important;
}

.illumination-img:hover {
    opacity: 0.8;
}

.baijia-lightbox {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 100000;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

.baijia-lightbox.active {
    opacity: 1;
    visibility: visible;
}

.lightbox-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0,0,0,0.9);
}

.lightbox-content {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    display: flex;
    align-items: center;
    justify-content: center;
    max-width: 90%;
    max-height: 90%;
}

.lightbox-image {
    max-width: 100%;
    max-height: 80vh;
    object-fit: contain;
}

.lightbox-close {
    position: fixed;
    top: 20px;
    right: 20px;
    width: 44px;
    height: 44px;
    background: transparent;
    border: none;
    color: #fff;
    font-size: 32px;
    cursor: pointer;
    z-index: 10;
}

.lightbox-close:hover {
    color: #ccc;
}

.lightbox-prev,
.lightbox-next {
    position: fixed;
    top: 50%;
    transform: translateY(-50%);
    width: 50px;
    height: 50px;
    background: rgba(255,255,255,0.1);
    border: none;
    color: #fff;
    font-size: 36px;
    cursor: pointer;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.lightbox-prev {
    left: 20px;
}

.lightbox-next {
    right: 20px;
}

.lightbox-prev:hover,
.lightbox-next:hover {
    background: rgba(255,255,255,0.2);
}

.lightbox-counter {
    position: fixed;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    color: #fff;
    font-size: 14px;
}

/* ========== 切换小部件样式 ========== */
.baijia-switch-widget {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.baijia-switch-main {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: #f5f5f5;
    border-radius: 12px;
    overflow: hidden;

}

.baijia-switch-main-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: opacity 0.3s ease;
}

.baijia-switch-toggle {
    position: absolute;
    top: 15px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    align-items: center;
    gap: 0;
    background-color: #fff;
    border-radius: 25px;
    padding: 8px 0;
    z-index: 10;
}

.baijia-switch-toggle-btn {
    padding: 6px 20px;
    border: none;
    background: transparent;
    color: #999;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    border-radius: 0;
    transition: all 0.3s ease;
}

.baijia-switch-toggle-divider {
    width: 1px;
    height: 20px;
    background-color: #333;
    flex-shrink: 0;
}

.baijia-switch-toggle-btn.active {
    background: none !important;
    background-color: transparent !important;
    color: #09B1F0;
}

.baijia-switch-thumbs-wrapper {
    position: relative;
    display: flex;
    align-items: center;
    gap: 10px;
}

.baijia-switch-nav {
    flex-shrink: 0;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: #333;
    transition: color 0.2s;
    z-index: 10;
}

.baijia-switch-nav:hover {
    color: #09B1F0;
}

.baijia-switch-nav svg {
    width: 24px;
    height: 24px;
}

.baijia-switch-thumbs {
    flex: 1;
    overflow: hidden;
}

.baijia-switch-thumbs-gradient {
    position: absolute;
    top: 0;
    bottom: 0;
    width: 60px;
    z-index: 5;
    pointer-events: none;
}

.baijia-switch-thumbs-gradient.left {
    left: 0;
    background: linear-gradient(to right, rgba(255,255,255,1) 0%, rgba(255,255,255,0) 100%);
}

.baijia-switch-thumbs-gradient.right {
    right: 0;
    background: linear-gradient(to left, rgba(255,255,255,1) 0%, rgba(255,255,255,0) 100%);
}

.baijia-switch-thumbs {
    overflow: hidden;
}

.baijia-switch-thumb-item {
    display: flex;
    align-items: center;
    gap: 0;
    padding: 10px;
    background-color: #f0f0f0;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.baijia-switch-thumb-item.active {
    background-color: #09B1F0;
}

.baijia-switch-thumb-image {
    width: 50%;
    height: 100%;
    flex-shrink: 0;
    border-radius: 6px;
    overflow: hidden;
    background: #fff;
}

.baijia-switch-thumb-image img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.baijia-switch-thumb-title {
    width: 50%;
    padding-left: 10px;
    font-size: 14px;
    font-weight: 500;
    color: #333;
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

.baijia-switch-thumb-item.active .baijia-switch-thumb-title {
    color: #fff;
}

@media (max-width: 768px) {
    .baijia-switch-main {
        height: 280px;
    }
    
    .baijia-switch-toggle-btn {
        padding: 6px 15px;
        font-size: 12px;
    }
    
    .baijia-switch-thumb-item {
        flex-direction: column;
        height: auto;
    }
    
    .baijia-switch-thumb-image {
        width: 100%;
        height: 60px;
    }
    
    .baijia-switch-thumb-title {
        width: 100%;
        padding-left: 0;
        padding-top: 8px;
        font-size: 11px;
        text-align: center;
        -webkit-line-clamp: 2;
    }
}

/* ========== WooCommerce 变体表格手机端适配 ========== */
@media (max-width: 768px) {
    table.variations {
        width: 100%;
        table-layout: fixed;
    }
    
    table.variations tr {
        display: flex;
        flex-direction: row;
        align-items: flex-start;
        margin-bottom: 5px;
    }
    
    .variations_form table.variations tr th,
    .variations_form table.variations tr td {
        padding: 4px 0;
    }
    
    table.variations th.label {
        width: 30%;
        flex-shrink: 0;
        text-align: left;
        font-size: 12px;
        word-wrap: break-word;
        overflow-wrap: break-word;
    }
    
    table.variations th.label label {
        font-size: 12px;
    }
    
    table.variations td.value {
        width: 70%;
    }
    
    table.variations select {
        width: 100%;
        max-width: 100%;
        font-size: 12px;
        padding: 6px 8px;
        box-sizing: border-box;
    }
    
    table.variations .reset_variations {
        display: inline-block;
        margin-top: 6px;
        font-size: 11px;
    }
    
    .variations_form .quantity .qty {
        width: 36px;
    }
}
