/* x032 主题 - 商品详情样式 */

/* ========== 商品详情布局 ========== */
.goods-detail {
    padding: 60px 0;
}

.goods-detail-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 50px;
}

/* 图片展示 */
.goods-gallery {
    position: relative;
}

.goods-main-image {
    position: relative;
    padding-top: 100%;
    background: var(--bg);
    border-radius: var(--radius-lg);
    overflow: hidden;
    margin-bottom: 15px;
}

.goods-main-image img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.goods-thumbnails {
    display: flex;
    gap: 10px;
}

.goods-thumbnail {
    width: 80px;
    height: 80px;
    padding: 5px;
    background: var(--bg);
    border: 2px solid transparent;
    border-radius: var(--radius);
    cursor: pointer;
    transition: all 0.3s;
}

.goods-thumbnail.active,
.goods-thumbnail:hover {
    border-color: var(--accent);
}

.goods-thumbnail img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: var(--radius);
}

/* 商品信息 */
.goods-info h1 {
    font-size: 28px;
    color: var(--text);
    margin-bottom: 15px;
    line-height: 1.4;
}

.goods-meta {
    display: flex;
    gap: 20px;
    margin-bottom: 20px;
    padding-bottom: 20px;
    border-bottom: 1px solid var(--border);
}

.goods-model {
    font-size: 14px;
    color: var(--text-muted);
}

.goods-stock {
    font-size: 14px;
    color: var(--success);
}

.goods-price-box {
    background: var(--bg);
    padding: 20px;
    border-radius: var(--radius-lg);
    margin-bottom: 25px;
}

.goods-price {
    font-size: 32px;
    font-weight: 700;
    color: var(--primary);
}

.goods-price small {
    font-size: 16px;
    font-weight: 400;
    color: var(--text-muted);
}

.goods-price-original {
    font-size: 18px;
    color: var(--text-light);
    text-decoration: line-through;
    margin-left: 10px;
}

.goods-description {
    margin-bottom: 25px;
}

.goods-description h3 {
    font-size: 16px;
    color: var(--text);
    margin-bottom: 10px;
}

.goods-description p {
    color: var(--text-muted);
    line-height: 1.8;
}

/* 规格选择 */
.goods-specs {
    margin-bottom: 25px;
}

.goods-specs h3 {
    font-size: 16px;
    color: var(--text);
    margin-bottom: 15px;
}

.spec-options {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.spec-option {
    padding: 10px 20px;
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    cursor: pointer;
    transition: all 0.3s;
}

.spec-option.active,
.spec-option:hover {
    border-color: var(--accent);
    background: rgba(0, 176, 255, 0.1);
    color: var(--accent);
}

/* 数量选择 */
.quantity-selector {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 25px;
}

.quantity-selector label {
    font-size: 16px;
    color: var(--text);
}

.quantity-input {
    display: flex;
    align-items: center;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    overflow: hidden;
}

.quantity-btn {
    width: 40px;
    height: 40px;
    background: var(--bg);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s;
}

.quantity-btn:hover {
    background: var(--accent);
    color: var(--white);
}

.quantity-input input {
    width: 60px;
    height: 40px;
    text-align: center;
    border: none;
    font-size: 16px;
}

/* 购买按钮 */
.goods-actions {
    display: flex;
    gap: 15px;
    margin-bottom: 30px;
}

.btn-add-cart {
    flex: 1;
    padding: 14px 30px;
    background: var(--accent);
    color: var(--white);
    border-radius: var(--radius);
    font-size: 16px;
    font-weight: 600;
    transition: all 0.3s;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.btn-add-cart:hover {
    background: var(--accent-hover);
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(0, 176, 255, 0.4);
}

.btn-wishlist {
    width: 50px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background: var(--white);
    color: var(--text-muted);
    transition: all 0.3s;
}

.btn-wishlist:hover {
    border-color: var(--accent);
    color: var(--accent);
}

/* 商品详情Tabs */
.goods-tabs {
    margin-top: 60px;
}

.tabs-nav {
    display: flex;
    border-bottom: 2px solid var(--border);
    margin-bottom: 30px;
}

.tab-btn {
    padding: 15px 30px;
    font-size: 16px;
    color: var(--text-muted);
    background: transparent;
    border: none;
    cursor: pointer;
    position: relative;
    transition: all 0.3s;
}

.tab-btn.active,
.tab-btn:hover {
    color: var(--primary);
}

.tab-btn.active::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 100%;
    height: 2px;
    background: var(--accent);
}

.tab-content {
    display: none;
}

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

.tab-content h3 {
    font-size: 18px;
    color: var(--text);
    margin-bottom: 15px;
}

.tab-content p {
    color: var(--text-muted);
    line-height: 1.8;
    margin-bottom: 15px;
}

.specs-table {
    width: 100%;
    border-collapse: collapse;
}

.specs-table tr {
    border-bottom: 1px solid var(--border);
}

.specs-table th {
    padding: 12px 15px;
    background: var(--bg);
    text-align: left;
    font-weight: 600;
    color: var(--text);
    width: 30%;
}

.specs-table td {
    padding: 12px 15px;
    color: var(--text-muted);
}

/* 评价区域 */
.reviews-list {
    margin-top: 30px;
}

.review-item {
    padding: 20px;
    background: var(--bg);
    border-radius: var(--radius-lg);
    margin-bottom: 15px;
}

.review-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
}

.review-author {
    font-weight: 600;
    color: var(--text);
}

.review-date {
    font-size: 13px;
    color: var(--text-light);
}

.review-stars {
    color: #ffc107;
    margin-bottom: 10px;
}

.review-content {
    color: var(--text-muted);
    line-height: 1.6;
}

/* 相关商品 */
.related-products {
    margin-top: 60px;
}

.related-products h2 {
    font-size: 28px;
    color: var(--primary);
    margin-bottom: 30px;
}

.related-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 25px;
}

@media (max-width: 992px) {
    .goods-detail-grid {
        grid-template-columns: 1fr;
    }
    .related-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 576px) {
    .related-grid {
        grid-template-columns: 1fr;
    }
    .tabs-nav {
        flex-wrap: wrap;
    }
    .tab-btn {
        padding: 10px 20px;
        font-size: 14px;
    }
}
