/* 产品详情Tab小部件样式 */

/* 主容器 */
.baijia-pdt-wrapper {
    width: 100%;
}

/* Tab头部 - 横线贯穿整个宽度 */
.baijia-pdt-tabs-header {
    border-bottom: 1px solid #e0e0e0;
    margin-bottom: 24px;
}

/* Tab导航 */
.baijia-pdt-tabs {
    display: flex;
}

/* 内容区域 - 左7右3布局 */
.baijia-pdt-body {
    display: flex;
    gap: 30px;
    align-items: stretch;
}

/* 左侧Tab内容 */
.baijia-pdt-left {
    flex: 7;
    min-width: 0;
}

/* 右侧详情区域 - 必须与左侧等高，sticky才能生效 */
.baijia-pdt-right {
    flex: 3;
    min-width: 0;
    align-self: stretch;
}


.baijia-pdt-tab {
    padding: 12px 24px;
    font-size: 16px;
    font-weight: 500;
    color: #666666;
    cursor: pointer;
    border-bottom: 2px solid transparent;
    margin-bottom: -1px;
    transition: color 0.3s ease, border-color 0.3s ease;
    user-select: none;
}

.baijia-pdt-tab:hover {
    color: #333333;
}

.baijia-pdt-tab.active {
    color: #000000;
    border-bottom-color: #000000;
}

/* Tab内容面板 */
.baijia-pdt-content {
    min-height: 200px;
}

.baijia-pdt-panel {
    display: none;
}

.baijia-pdt-panel.active {
    display: block;
}

/* 右侧卡片 */
.baijia-pdt-sidebar {
    background-color: #f8f8f8;
    border-radius: 12px;
    padding: 24px;
}

/* 产品信息 */
.baijia-pdt-product-info {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 20px;
    padding-bottom: 20px;
    border-bottom: 1px solid #e0e0e0;
}

.baijia-pdt-product-image {
    width: 48px;
    height: 48px;
    object-fit: cover;
    border-radius: 8px;
}

.baijia-pdt-product-title {
    font-size: 16px;
    font-weight: 600;
    color: #000000;
    flex: 1;
}

/* 履行方式 */
.baijia-pdt-fulfill {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    margin-bottom: 16px;
}

.baijia-pdt-fulfill-icon {
    width: 24px;
    height: 24px;
    flex-shrink: 0;
    color: #333333;
}

.baijia-pdt-fulfill-icon svg {
    width: 100%;
    height: 100%;
}

.baijia-pdt-fulfill-text {
    flex: 1;
}

.baijia-pdt-fulfill-title {
    font-size: 14px;
    font-weight: 600;
    color: #000000;
}

.baijia-pdt-fulfill-subtitle {
    font-size: 12px;
    color: #666666;
}

.baijia-pdt-fulfill-price {
    font-size: 18px;
    font-weight: 600;
    color: #000000;
}

/* 价格明细区域 */
.baijia-pdt-price-breakdown {
    background-color: #f0f0f0;
    border-radius: 8px;
    padding: 16px;
    margin-bottom: 20px;
}

/* 单价 */
.baijia-pdt-unit-price {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.baijia-pdt-unit-label {
    font-size: 14px;
    color: #333333;
}

.baijia-pdt-unit-value {
    font-size: 16px;
    font-weight: 600;
    color: #000000;
}

/* 批发价折扣 */
.baijia-pdt-bulk-order {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 8px;
    padding-top: 8px;
    border-top: 1px dashed #ddd;
}

.baijia-pdt-bulk-label {
    font-size: 13px;
    color: #666;
}

.baijia-pdt-bulk-value {
    font-size: 14px;
    font-weight: 500;
    color: #000;
}

/* 定制选项价格 */
.baijia-pdt-customization {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 8px;
    padding-top: 8px;
    border-top: 1px dashed #ddd;
}

.baijia-pdt-custom-label {
    font-size: 13px;
    color: #666;
}

.baijia-pdt-custom-value {
    font-size: 14px;
    font-weight: 500;
    color: #000;
}

/* 按钮 */
.baijia-pdt-buttons {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-bottom: 16px;
}

.baijia-pdt-btn {
    width: 100%;
    padding: 14px 24px;
    font-size: 14px;
    font-weight: 600;
    border-radius: 8px;
    cursor: pointer;
    transition: opacity 0.3s ease;
    text-align: center;
    border: none;
}

.baijia-pdt-btn:hover {
    opacity: 0.85;
}

.baijia-pdt-btn-primary {
    background-color: #000000;
    color: #ffffff;
}

.baijia-pdt-btn-secondary {
    background-color: #ffffff;
    color: #000000;
    border: 1px solid #e0e0e0;
}

/* 运费提示 */
.baijia-pdt-shipping-note {
    font-size: 12px;
    color: #888888;
    text-align: center;
}

/* 定制选项样式 */
.baijia-custom-option-group {
    margin-bottom: 24px;
}

.baijia-custom-option-title {
    font-size: 25px;
    font-weight: 600;
    color: #000;
    margin-bottom: 16px;
}

.baijia-custom-option-items {
    display: grid;
    grid-template-columns: repeat(var(--columns, 4), 1fr);
    gap: 10px;
}

.baijia-style-color {
    display: flex;
    flex-wrap: wrap;
    grid-template-columns: none;
}

.baijia-custom-option-item {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 16px;
    border: 1px solid #e0e0e0;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s ease;
    background: #fff;
    width: auto;
}

.baijia-custom-option-item:hover {
    border-color: #999;
}

.baijia-custom-option-item.selected {
    border-color: #000;
    background: #f8f8f8;
}

.baijia-option-label {
    font-size: 14px;
    color: #333;
    white-space: nowrap;
}

.baijia-option-price-adjust {
    font-size: 12px;
    color: #666;
    margin-left: 4px;
}

/* 图片按钮样式 */
.baijia-style-image .baijia-custom-option-item {
    flex-direction: column;
    padding: 8px;
    width: auto;
    min-width: 80px;
}

.baijia-option-image {
    width: 60px;
    height: 60px;
    border-radius: 4px;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
}

.baijia-option-image img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}

.baijia-style-image .baijia-option-label {
    font-size: 12px;
    text-align: center;
}

/* 颜色按钮样式 */
.baijia-style-color .baijia-custom-option-item {
    padding: 6px 12px;
}

.baijia-option-color {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    border: 2px solid #fff;
    box-shadow: 0 0 0 1px #ddd;
    flex-shrink: 0;
}

.baijia-style-color .baijia-custom-option-item.selected .baijia-option-color {
    box-shadow: 0 0 0 2px #000;
}

/* 颜色样式只显示色块 */
.baijia-style-color .baijia-custom-option-item {
    padding: 4px;
    border-radius: 50%;
    border: 2px solid transparent;
}

.baijia-style-color .baijia-custom-option-item.selected {
    border-color: #000;
    background: transparent;
}

/* 打印位置样式 */
.baijia-print-position-group {
    margin-bottom: 24px;
}

.baijia-block-title {
    font-size: 16px;
    font-weight: 400;
    color: #000;
    margin-bottom: 12px;
}

/* 技术选择区块 */
.baijia-technique-block {
    margin-bottom: 30px;
}

.baijia-technique-options {
    display: flex;
    flex-direction: column;
}

.baijia-technique-option {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 0;
    background: transparent;
    border: none;
    border-bottom: 1px solid #e8e8e8;
    border-radius: 0;
    cursor: pointer;
    transition: all 0.2s ease;
}

.baijia-technique-option:first-child {
    border-top: 1px solid #e8e8e8;
}

.baijia-technique-option:hover {
    background: transparent;
}

.baijia-technique-option.selected {
    background: transparent;
}

.baijia-technique-content {
    flex: 1;
}

.baijia-technique-name {
    font-size: 16px;
    font-weight: 400;
    color: #000;
    margin-bottom: 4px;
}

.baijia-technique-desc {
    font-size: 14px;
    color: #666;
    line-height: 1.5;
}

.baijia-technique-radio {
    flex-shrink: 0;
    margin-left: 16px;
}

.baijia-radio-circle {
    display: block;
    width: 20px;
    height: 20px;
    border: 2px solid #ccc;
    border-radius: 50%;
    position: relative;
    transition: all 0.2s ease;
}

.baijia-technique-option.selected .baijia-radio-circle {
    border-color: #000;
}

.baijia-technique-option.selected .baijia-radio-circle::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 10px;
    height: 10px;
    background: #000;
    border-radius: 50%;
}

/* 位置选择区块 */
.baijia-position-block {
    margin-bottom: 20px;
}

.baijia-position-options {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 12px;
}

.baijia-position-option {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 20px 16px;
    background: #fff;
    border: 1px solid #e8e8e8;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s ease;
    text-align: center;
}

.baijia-position-option:hover {
    border-color: #ccc;
}

.baijia-position-option.selected {
    border-color: #000;
    background: #fafafa;
}

.baijia-position-name {
    font-size: 14px;
    font-weight: 500;
    color: #000;
    margin-bottom: 4px;
}

.baijia-position-price {
    font-size: 12px;
    color: #666;
}

@media (max-width: 768px) {
    .baijia-position-options {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .baijia-custom-option-items {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* 批发价样式 */
.baijia-wholesale-price-group {
    margin-bottom: 24px;
}

.baijia-price-tiers {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 15px;
}

.baijia-price-tier {
    display: flex;
    flex-direction: column;
    padding: 16px 20px;
    background: #fff;
    border: 2px solid #e8e8e8;
    cursor: pointer;
    transition: all 0.2s ease;
    border-radius: 8px;
}


.baijia-price-tier:hover {
    border-color: #ccc;
    z-index: 1;
}

.baijia-price-tier.selected {
    border-color: #000;
    border-width: 2px;
    z-index: 2;
    border-radius: 8px;
}

.baijia-tier-qty {
    font-size: 14px;
    color: #666;
    margin-bottom: 8px;
}

.baijia-tier-price {
    font-size: 18px;
    font-weight: 600;
    color: #000;
}

@media (max-width: 768px) {
    .baijia-price-tiers {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* 物流时效样式 */
.baijia-shipping-group {
    margin-bottom: 24px;
}

.baijia-shipping-notice {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 6px 7px;
    background: #fff0ba;
    border-radius: 6px;
    margin-bottom: 16px;
    font-size: 13px;
    color: #000000;
    border-radius: 8px;
}

.baijia-notice-icon {
    color: #f59e0b;
    font-size: 14px;
}

.baijia-shipping-options {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.baijia-shipping-option {
    display: flex;
    align-items: center;
    padding: 16px 20px;
    background: #fff;
    border: 2px solid #e8e8e8;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.baijia-shipping-option.selected {
    border-color: #000;
}

.baijia-shipping-radio {
    flex-shrink: 0;
    width: 20px;
    height: 20px;
    border: 2px solid #ccc;
    border-radius: 50%;
    margin-right: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.baijia-shipping-option.selected .baijia-shipping-radio {
    border-color: #000;
}

.baijia-radio-dot {
    display: none;
    width: 10px;
    height: 10px;
    background: #000;
    border-radius: 50%;
}

.baijia-shipping-option.selected .baijia-radio-dot {
    display: block;
}

.baijia-shipping-info {
    flex: 1;
}

.baijia-shipping-name {
    font-size: 16px;
    font-weight: 500;
    color: #000;
    margin-bottom: 4px;
}

.baijia-shipping-time {
    font-size: 14px;
    color: #999;
}

.baijia-shipping-price {
    text-align: right;
}

.baijia-shipping-base {
    font-size: 16px;
    font-weight: 600;
    color: #000;
    margin-bottom: 4px;
}

.baijia-shipping-additional {
    font-size: 13px;
    color: #999;
}

/* 运输详情底部栏 */
.baijia-shipping-details {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    background: #f0f0f0;
    padding: 16px 20px;
    margin-top: 16px;
    border-radius: 8px;
}

.baijia-detail-item {
    text-align: left;
}

.baijia-detail-label {
    font-size: 13px;
    color: #666;
    margin-bottom: 6px;
}

.baijia-detail-value {
    font-size: 15px;
    font-weight: 600;
    color: #000;
}

.baijia-detail-note {
    font-size: 12px;
    color: #999;
    cursor: help;
    margin-left: 4px;
}

@media (max-width: 768px) {
    .baijia-shipping-details {
        grid-template-columns: repeat(2, 1fr);
        gap: 16px;
    }
    
    /* 手机端物流选项布局 */
    .baijia-shipping-option {
        flex-wrap: wrap;
        position: relative;
        padding: 16px;
    }
    
    .baijia-shipping-radio {
        position: absolute;
        right: 16px;
        top: 16px;
        margin-right: 0;
    }
    
    .baijia-shipping-info {
        width: 100%;
        margin-bottom: 12px;
        padding-right: 40px;
    }
    
    .baijia-shipping-price {
        width: 100%;
        display: flex;
        justify-content: space-between;
        align-items: center;
        text-align: left;
    }
    
    .baijia-shipping-base {
        margin-bottom: 0;
    }
}

/* 变体选项样式覆盖 */
.baijia-pdt-customize .variations {
    width: 100%;
}

.baijia-pdt-customize .variations tr {
    display: flex;
    flex-direction: column;
    margin-bottom: 16px;
}

.baijia-pdt-customize .variations td.label {
    font-weight: 600;
    margin-bottom: 8px;
    font-size: 25px;
}

.baijia-pdt-customize .variations td.value select {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    font-size: 14px;
}

/* 变体按钮样式 - 仅按钮类型一行8个，统一宽度 */
.baijia-pdt-customize .button-variable-items-wrapper {
    display: grid !important;
    grid-template-columns: repeat(8, 1fr) !important;
    gap: 8px !important;
}

.baijia-pdt-customize .button-variable-items-wrapper .button-variable-item {
    width: 100% !important;
    min-width: unset !important;
    margin: 0 !important;
    padding: 8px 4px !important;
    height: auto !important;
    border: 2px solid #e8e8e8 !important;
    border-radius: 8px !important;
    font-size: 14px !important;
    font-weight: 600 !important;
    box-shadow: none !important;
}

.baijia-pdt-customize .button-variable-items-wrapper .button-variable-item.selected {
    border-color: #000 !important;
}

/* 手机端变体按钮一排3个 */
@media (max-width: 768px) {
    .baijia-pdt-customize .button-variable-items-wrapper {
        grid-template-columns: repeat(3, 1fr) !important;
    }
}

/* 隐藏清除按钮和库存信息 */
.baijia-pdt-customize .reset_variations,
.baijia-pdt-customize .woocommerce-variation-availability {
    display: none !important;
}

/* 响应式 */
@media (max-width: 991px) {
    .baijia-pdt-body {
        flex-direction: column;
    }
    
    .baijia-pdt-left {
        width: 100%!important;
    }
    
    .baijia-pdt-right {
        display: none;
    }
    
    .baijia-pdt-sidebar {
        position: static;
    }
}

@media (max-width: 576px) {
    .baijia-pdt-tab {
        padding: 10px 16px;
        font-size: 14px;
    }
    
    .baijia-pdt-sidebar {
        padding: 16px;
    }
    
    .baijia-pdt-btn {
        padding: 12px 20px;
    }
}

/* 加入购物车成功提示 */
.baijia-cart-notice {
    position: fixed;
    top: 100px;
    right: 20px;
    background: #fff;
    border: 1px solid #e0e0e0;
    padding: 16px 20px;
    z-index: 9999;
    display: flex;
    align-items: center;
    gap: 12px;
    max-width: 400px;
    animation: baijiaSlideIn 0.3s ease;
}

.baijia-cart-notice-icon {
    color: #4caf50;
    font-size: 20px;
}

.baijia-cart-notice-text {
    flex: 1;
    font-size: 14px;
    color: #333;
}

.baijia-cart-notice-link {
    color: #333;
    text-decoration: underline;
    font-weight: 500;
}

.baijia-cart-notice-close {
    background: none;
    border: none;
    cursor: pointer;
    font-size: 18px;
    color: #999;
    padding: 0;
    line-height: 1;
}

.baijia-cart-notice-close:hover {
    color: #333;
}

@keyframes baijiaSlideIn {
    from {
        opacity: 0;
        transform: translateX(20px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}
