﻿html, body {
    overflow-x: hidden;
    width: 100%;
    position: relative;
}
/* 确保所有容器不溢出 */
.product-detail-container,
.product-main,
.product-gallery,
.gallery-main {
    max-width: 100%;
    overflow-x: hidden;
}
/* 产品详情组件 */
.product-detail-section {
    padding: 40px 24px 80px;
    background-color: #ffffff;
}

.product-detail-container {
    max-width: 1336px;
    margin: 0 auto;
}

/* 面包屑 */
.breadcrumb {
    font-size: 14px;
    margin-bottom: 32px;
    color: #5f7a7c;
}

    .breadcrumb a {
        text-decoration: none;
        color: #5f7a7c;
        transition: color 0.2s;
    }

        .breadcrumb a:hover {
            color: #5e57cc;
        }

    .breadcrumb .current {
        color: #1e2f30;
        font-weight: 500;
    }

/* 主内容左右布局 */
.product-main {
    display: flex;
    gap: 60px;
    margin-bottom: 80px;
}

/* 图片画廊 */
.product-gallery {
    flex: 1;
    overflow-x: visible;
}

.gallery-main {
    width: 100%;
    aspect-ratio: 1 / 1;
    background-color: #f8f9fa;
    border-radius: 24px;
    overflow: hidden;
    margin-bottom: 16px;
}

    .gallery-main img {
        width: 100%;
        height: 100%;
        object-fit: cover;
    }

.gallery-thumbs {
    display: flex;
    gap: 12px;
    justify-content: center;
    overflow-x: auto; /* 允许水平滚动 */
    -webkit-overflow-scrolling: touch; /* 平滑滚动 */
    scrollbar-width: thin; /* 更细的滚动条 */
}
    .gallery-thumbs::-webkit-scrollbar {
        height: 4px;
    }

.thumb {
    width: 80px;
    height: 80px;
    object-fit: cover;
    border-radius: 12px;
    cursor: pointer;
    opacity: 0.6;
    transition: opacity 0.2s, border 0.2s;
    border: 2px solid transparent;
}

    .thumb.active {
        opacity: 1;
        border-color: #5e57cc;
    }

    .thumb:hover {
        opacity: 1;
    }

/* 右侧信息 */
.product-info {
    flex: 1;
}

.product-title {
    font-size: 32px;
    font-weight: 700;
    color: #1e2f30;
    margin-bottom: 12px;
}

.product-review-summary {
    align-items: center;
    color: #000;
    cursor: pointer;
    display: inline-flex;
    flex-wrap: wrap;
    gap: 8px;
    margin: -4px 0 18px -8px;
    padding: 4px 8px;
    border-radius: 5px;
    text-decoration: none;
    transition: background-color .18s ease, box-shadow .18s ease, transform .18s ease;
}

.product-review-summary:visited,
.product-review-summary:hover,
.product-review-summary:focus {
    color: #000;
    text-decoration: none;
}

.product-review-summary:hover {
    background-color: #fff7ea;
    box-shadow: 0 2px 7px rgba(70, 49, 16, .12);
    transform: translateY(-1px);
}

.product-review-summary:focus-visible {
    outline: 2px solid #f08804;
    outline-offset: 2px;
}

.product-review-stars {
    transform-origin: center;
    transition: transform .18s ease;
}

.product-review-summary:hover .product-review-stars {
    transform: scale(1.06);
}

.product-review-average {
    font-size: 16px;
    font-weight: 700;
}

.product-review-stars {
    color: #f08804;
    font-size: 19px;
    letter-spacing: 1px;
    line-height: 1;
}

.product-review-count {
    color: #526165;
    font-size: 14px;
}

.product-price {
    font-size: 28px;
    font-weight: 700;
    color: #5e57cc;
    margin-bottom: 24px;
}

.product-params {
    margin-bottom: 24px;
}

    .product-params h4 {
        font-size: 18px;
        font-weight: 600;
        margin-bottom: 12px;
        color: #1e2f30;
    }

    .product-params ul {
        list-style: none;
        padding: 0;
    }

    .product-params li {
        font-size: 14px;
        line-height: 1.6;
        margin-bottom: 6px;
        color: #2c3e3f;
    }

.product-colors, .product-sizes {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 20px;
    flex-wrap: wrap;
}

.color-label, .size-label {
    font-weight: 600;
    font-size: 14px;
    color: #1e2f30;
}

.color-circle {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s;
}

    .color-circle.active {
        box-shadow: 0 0 0 2px #fff, 0 0 0 3px #5e57cc;
    }

    .color-circle:hover {
        transform: scale(1.1);
    }

.size-option {
    padding: 6px 16px;
    border: 1px solid #ddd;
    border-radius: 30px;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.2s;
}

    .size-option.active {
        background-color: #5e57cc;
        color: white;
        border-color: #5e57cc;
    }

.product-buttons {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 16px;
    margin: 24px 0 16px;
}

.buy-btn {
    box-sizing: border-box;
    display: block;
    padding: 14px 32px;
    background-color: #ff9900;
    color: white;
    text-decoration: none;
    font-weight: 700;
    border-radius: 40px;
    transition: background 0.2s;
    text-align: center;
    width: 100%;
    white-space: nowrap; /* 防止文字换行，保持美观 */
}

    .buy-btn.amazon-us {
        background-color: #ff9900;
    }

    .buy-btn.amazon-uk {
        background-color: #ff9900;
    }

    .buy-btn.amazon-de {
        background-color: #ff9900;
    }

    .buy-btn:hover {
        background-color: #e68900;
    }

.product-note {
    font-size: 13px;
    color: #5f7a7c;
    margin-top: 12px;
}

/* A+ 内容 */
.product-aplus {
    margin-top: 40px;
    border-top: 1px solid #eef2f4;
    padding-top: 48px;
}
.product-aplus,
.aplus-content {
    overflow: visible;
}

.aplus-title {
    font-size: 24px;
    font-weight: 700;
    text-align: center;
    margin-bottom: 32px;
    color: #1e2f30;
}

.aplus-grid {
    display: flex;
    flex-direction: column;
    gap: 0;
}

    .aplus-grid img {
        width: 100%;
        height: auto;
        display: block;
        border-radius: 0; /* 移除圆角 */
        box-shadow: none; /* 如需移除阴影也可去掉，但用户未明确要求，保留 */
    }
.aplus-content img {
    border-radius: 5px;
    max-width: 100%;
    height: auto;
    display: block;
}
/* 响应式 */
@media (max-width: 767px) {
    .product-detail-section {
        padding: 20px 16px 60px;
    }

    .product-main {
        flex-direction: column;
        gap: 32px;
    }

    .product-title {
        font-size: 24px;
    }

    .product-price {
        font-size: 24px;
    }

    .thumb {
        width: 60px;
        height: 60px;
    }

    .product-buttons {
        grid-template-columns: 1fr;
    }

    .buy-btn {
        width: 100%;
    }

    .aplus-grid {
        grid-template-columns: 1fr;
    }
    .product-aplus {
        margin-left: -16px; /* 与父容器的 padding 值保持一致，一般为 16px */
        margin-right: -16px;
        overflow-x: hidden; /* 防止水平溢出 */
    }
    .aplus-content {
        padding: 0 16px;
        word-break: break-word;
        overflow-wrap: break-word;
        max-width: 100%;
    }
        /* 新增：确保 A+ 区域内的图片自适应且不变形 */
        .aplus-content img {
            max-width: 100% !important;
            height: auto !important;
            display: block;
            margin: 0 auto;
        }

    .aplus-grid img {
        width: 100%;
        border-radius: 0;
    }
}


/* 为颜色链接添加样式，避免默认下划线 */
.color-circle-link {
    text-decoration: none;
    display: inline-block;
    margin-right: 8px;
}

.color-circle {
    display: inline-block;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    cursor: pointer;
    transition: transform 0.2s;
    box-shadow: 0 1px 3px rgba(0,0,0,0.2);
}

    .color-circle:hover {
        transform: scale(1.1);
    }

    .color-circle.active {
        box-shadow: 0 0 0 2px white, 0 0 0 4px #5e57cc;
    }

.product-buttons .buy-btn:hover {
    color: #5e57cc !important;
}
