/**
 * 中赛照明 - 产品详情页样式
 */

.product-detail {
    padding: 140px 0 60px;
    background: var(--bg-primary);
    min-height: 100vh;
}

.product-detail-container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    box-sizing: border-box;
}

/* 面包屑导航 */
.breadcrumb {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 20px;
    font-size: 0.75rem;
}

.breadcrumb a {
    color: #999;
    text-decoration: none;
    transition: color 0.3s;
}

.breadcrumb a:hover {
    color: var(--gold);
}

.breadcrumb span {
    color: #ccc;
}

.breadcrumb .current {
    color: #666;
}

/* 产品顶部区域：图片 + 信息 */
.product-top-wrapper {
    display: grid;
    grid-template-columns: 500px 1fr;
    gap: 40px;
    margin-bottom: 40px;
    align-items: start;
}

/* 图片区域 */
.product-gallery-section {
    position: sticky;
    top: 80px;
}

.gallery-main {
    position: relative;
    background: var(--bg-card);
    border: 1px solid #e5e5e5;
    width: 500px;
    height: 500px;
    overflow: hidden;
}

.gallery-main img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    display: block;
}

.gallery-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 32px;
    height: 32px;
    background: rgba(0, 0, 0, 0.5);
    border: none;
    color: #fff;
    font-size: 12px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s;
    z-index: 10;
    opacity: 0;
}

.gallery-btn-left {
    left: 10px;
}

.gallery-btn-right {
    right: 10px;
}

.gallery-dots {
    position: absolute;
    bottom: 10px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 6px;
}

.gallery-dot {
    width: 6px;
    height: 6px;
    background: rgba(0, 0, 0, 0.3);
    border-radius: 50%;
    cursor: pointer;
    transition: all 0.3s;
}

.gallery-dot:hover {
    background: rgba(0, 0, 0, 0.5);
}

.gallery-dot.active {
    background: var(--gold);
    width: 18px;
    border-radius: 3px;
}

.gallery-main:hover .gallery-btn {
    opacity: 1;
}

.gallery-btn:hover {
    background: var(--gold);
}

/* 产品信息区域 */
.product-info-section {
    min-width: 0;
    padding-top: 0;
}

.product-title {
    font-size: 1.3rem;
    font-weight: 600;
    color: #333;
    margin-bottom: 8px;
    line-height: 1.4;
}

.product-model {
    font-size: 0.8rem;
    color: #999;
    margin-bottom: 16px;
    padding-bottom: 16px;
    border-bottom: 1px solid #eee;
}

.product-price-row {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 20px;
    padding: 14px;
    background: #fafafa;
    border: 1px solid #eee;
}

.price-label {
    font-size: 0.8rem;
    color: #666;
}

.product-price {
    font-size: 1.5rem;
    color: var(--gold);
    font-weight: 700;
}

.product-price .currency {
    font-size: 1rem;
}

/* SKU选项 */
.product-options {
    margin-bottom: 20px;
}

.option-group {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-start;
    margin-bottom: 14px;
}

.option-label {
    width: 75px;
    flex-shrink: 0;
    padding-top: 4px;
}

.option-name {
    font-size: 0.8rem;
    color: #333;
    font-weight: 500;
    white-space: nowrap;
}

.option-buttons {
    flex: 1;
    width: 100%;
}

.option-btn {
    display: inline-block;
    padding: 4px 12px;
    background: #fff;
    border: 1px solid #ddd;
    color: #333;
    font-size: 0.78rem;
    cursor: pointer;
    transition: all 0.3s;
    white-space: nowrap;
    max-width: 150px;
    overflow: hidden;
    text-overflow: ellipsis;
    vertical-align: top;
    margin-right: 8px;
    margin-bottom: 8px;
    border-radius: 2px;
}

.option-btn:hover {
    border-color: #999;
}

.option-btn.active {
    background: var(--gold);
    border-color: var(--gold);
    color: #fff;
}

.option-btn.disabled,
.option-btn:disabled {
    opacity: 0.4;
    cursor: not-allowed;
}

/* 数量选择 */
.product-quantity {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-bottom: 20px;
    padding: 14px 0;
    border-top: 1px solid #eee;
    border-bottom: 1px solid #eee;
}

.quantity-label {
    font-size: 0.8rem;
    color: #333;
    font-weight: 500;
}

.quantity-control {
    display: flex;
    align-items: center;
    border: 1px solid #ddd;
}

.qty-btn {
    width: 32px;
    height: 32px;
    background: #f5f5f5;
    border: none;
    color: #333;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.3s;
}

.qty-btn:hover {
    background: #eee;
}

.qty-btn:disabled {
    opacity: 0.4;
    cursor: not-allowed;
}

.qty-input {
    width: 50px;
    height: 32px;
    background: #fff;
    border: none;
    border-left: 1px solid #ddd;
    border-right: 1px solid #ddd;
    color: #333;
    text-align: center;
    font-size: 0.85rem;
}

.stock-status {
    font-size: 0.75rem;
    color: #999;
    margin-left: auto;
}

/* 操作按钮 */
.product-actions {
    display: flex;
    gap: 12px;
    margin-bottom: 16px;
}

.btn-add-cart {
    flex: 1;
    padding: 12px 20px;
    background: var(--gold);
    border: none;
    color: #fff;
    font-size: 0.9rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.btn-add-cart:hover {
    background: var(--gold-dark);
}

.btn-buy-now {
    flex: 1;
    padding: 12px 20px;
    background: #fff;
    border: 1px solid var(--gold);
    color: var(--gold);
    font-size: 0.9rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s;
}

.btn-buy-now:hover {
    background: var(--gold);
    color: #fff;
}

/* 详情区域 */
.product-detail-section {
    display: grid;
    grid-template-columns: 1fr 280px;
    gap: 30px;
    align-items: start;
}

/* Tabs */
.product-tabs {
    min-width: 0;
}

.tab-buttons {
    display: flex;
    border-bottom: 2px solid #eee;
    margin-bottom: 24px;
}

.tab-btn {
    padding: 12px 24px;
    background: transparent;
    border: none;
    border-bottom: 2px solid transparent;
    color: #999;
    font-size: 0.9rem;
    cursor: pointer;
    transition: all 0.3s;
    margin-bottom: -2px;
}

.tab-btn:hover {
    color: #333;
}

.tab-btn.active {
    color: var(--gold);
    border-bottom-color: var(--gold);
    font-weight: 500;
}

.tab-content {
    display: none;
}

.tab-content.active {
    display: block;
}

.detail-images {
    display: block;
}

.detail-images img {
    max-width: 100%;
    height: auto;
    display: block;
    margin: 0 auto;
}

/* 确保富文本内容不被全局样式影响 */
.detail-images p,
.detail-images span,
.detail-images font,
.detail-images div {
    max-width: 100%;
}

/* 规格参数 */
.spec-table {
    width: 100%;
    border-collapse: collapse;
    border-top: 1px solid #eee;
    border-left: 1px solid #eee;
}

.spec-table tr {
    border-bottom: 1px solid #eee;
    border-right: 1px solid #eee;
    display: grid;
    grid-template-columns: repeat(4, 1fr);
}

.spec-table th,
.spec-table td {
    padding: 10px 12px;
    text-align: left;
}

.spec-table th {
    background: #fafafa;
    color: #666;
    font-weight: 400;
    font-size: 0.78rem;
}

.spec-table td {
    color: #333;
    font-size: 0.78rem;
    border-left: 1px solid #eee;
}

/* IES下载 */
.ies-section {
    padding: 20px 24px;
    background: #fafafa;
    border: 1px solid #eee;
    text-align: center;
}

.ies-section h4 {
    color: #333;
    margin-bottom: 6px;
    font-size: 0.95rem;
}

.ies-section p {
    color: #999;
    margin-bottom: 12px;
    font-size: 0.8rem;
}

.btn-download {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 20px;
    background: #333;
    color: #fff;
    font-size: 0.8rem;
    cursor: pointer;
    transition: all 0.25s ease;
}

.btn-download:hover {
    background: #555;
}

.btn-download.disabled,
.btn-download[aria-disabled="true"] {
    opacity: 0.4;
    cursor: not-allowed;
}

/* 右侧推荐 */
.product-sidebar {
    position: sticky;
    top: 80px;
    background: #fff;
    border: 1px solid #eee;
    padding: 16px;
}

.sidebar-title {
    font-size: 0.9rem;
    font-weight: 600;
    color: #333;
    padding-bottom: 12px;
    margin-bottom: 12px;
    border-bottom: 1px solid #eee;
    display: flex;
    align-items: center;
    gap: 8px;
}

.sidebar-title i {
    color: var(--gold);
}

.related-products-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.related-product-item {
    display: flex;
    gap: 12px;
    padding: 10px;
    background: #fafafa;
    border: 1px solid transparent;
    transition: all 0.3s;
    text-decoration: none;
}

.related-product-item:hover {
    border-color: var(--gold);
    background: #fff;
}

.related-product-img {
    width: 65px;
    height: 65px;
    flex-shrink: 0;
    overflow: hidden;
    background: #fff;
}

.related-product-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.related-product-info {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.related-product-name {
    font-size: 0.85rem;
    color: #333;
    font-weight: 500;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.related-product-model {
    font-size: 0.75rem;
    color: #999;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.related-product-price {
    font-size: 0.85rem;
    color: var(--primary);
    font-weight: 600;
}
    object-fit: cover;
}

.related-product-info {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.related-product-name {
    font-size: 0.8rem;
    color: #333;
    margin-bottom: 4px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    line-height: 1.3;
}

.related-product-model {
    font-size: 0.7rem;
    color: #999;
    margin-bottom: 6px;
}

.related-product-price {
    font-size: 0.85rem;
    color: var(--gold);
    font-weight: 600;
}

/* 响应式布局 */
@media (max-width: 1200px) {
    .product-detail-container {
        padding: 0 20px;
    }
    
    .product-top-wrapper {
        grid-template-columns: 420px 1fr;
        gap: 24px;
    }
    
    .gallery-main {
        width: 100%;
        max-width: 420px;
        height: auto;
        aspect-ratio: 1;
    }
    
    .product-detail-section {
        grid-template-columns: 1fr 240px;
        gap: 20px;
    }
}

@media (max-width: 992px) {
    .product-detail-container {
        padding: 0 20px;
    }
    
    .product-top-wrapper {
        grid-template-columns: 1fr 1fr;
        gap: 20px;
    }
    
    .gallery-main {
        width: 100%;
        height: auto;
        aspect-ratio: 1;
    }
    
    .product-detail-section {
        grid-template-columns: 1fr;
        gap: 24px;
    }
    
    .product-gallery-section {
        position: static;
    }
    
    .product-sidebar {
        position: static;
    }
    
    .related-products-list {
        display: grid;
        grid-template-columns: repeat(3, 1fr);
        gap: 12px;
    }
}

@media (max-width: 768px) {
    .product-detail {
        padding: 120px 0 40px;
    }
    
    .product-top-wrapper {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    
    .gallery-main {
        width: 100%;
        max-width: 500px;
        height: auto;
        aspect-ratio: 1;
        margin: 0 auto;
    }
    
    .product-info-section {
        padding: 0;
    }
    
    .related-products-list {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .option-label {
        width: 70px;
    }
}

@media (max-width: 576px) {
    .product-detail-container {
        padding: 0 15px;
        overflow: hidden;
    }

    .product-detail {
        padding: 120px 0 30px;
    }

    .product-sidebar {
        overflow: hidden;
    }

    .related-products-list {
        grid-template-columns: 1fr 1fr;
        gap: 8px;
        overflow-x: auto;
    }

    .related-product-item {
        min-width: 0;
        flex-shrink: 0;
    }
    
    .breadcrumb {
        font-size: 0.7rem;
        margin-bottom: 14px;
        gap: 6px;
    }
    
    .gallery-main {
        width: 100%;
        height: auto;
        aspect-ratio: 1;
    }
    
    .product-title {
        font-size: 1.1rem;
    }
    
    .product-model {
        font-size: 0.75rem;
    }
    
    .product-price {
        font-size: 1.2rem;
    }
    
    .product-price-row {
        padding: 10px;
    }
    
    .tab-buttons {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }
    
    .tab-btn {
        padding: 10px 16px;
        font-size: 0.85rem;
        white-space: nowrap;
    }
    
    .product-actions {
        flex-direction: column;
        gap: 10px;
    }
    
    .btn-add-cart,
    .btn-buy-now {
        width: 100%;
    }
    
    .option-group {
        margin-bottom: 12px;
    }

    .option-label {
        width: 60px;
    }

    .option-name {
        font-size: 0.75rem;
    }

    .option-btn {
        padding: 3px 8px;
        font-size: 0.72rem;
        max-width: 120px;
    }
    
    .product-quantity {
        flex-wrap: wrap;
        gap: 10px;
    }
    
    .stock-status {
        margin-left: 0;
        width: 100%;
    }
    
    .related-products-list {
        grid-template-columns: 1fr 1fr;
        gap: 8px;
    }
    
    .related-product-img {
        width: 50px;
        height: 50px;
    }
    
    .related-product-name {
        font-size: 0.72rem;
    }
    
    .spec-table {
        grid-template-columns: 1fr 1fr;
    }
    
    .spec-table th,
    .spec-table td {
        padding: 8px 10px;
        font-size: 0.72rem;
    }
}
