/* 商品详情页面样式 */
.product-detail-container {
    max-width: 1200px;
    margin: 40px auto;
    padding: 0 20px;
}

/* 商品信息区域 */
.product-info-section {
    display: flex;
    gap: 40px;
    margin-bottom: 40px;
    background: #fff;
    padding: 40px;
    border-radius: 8px;
}

/* 商品图片区域 */
.product-gallery {
    flex: 0 0 400px;
    position: relative;
}

.main-image {
    position: relative;
    width: 100%;
    height: 400px;
    margin-bottom: 20px;
    border: 1px solid #EFEFEF;
    border-radius: 4px;
    overflow: visible;
}

.main-image img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.zoom-mask {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    cursor: crosshair;
    z-index: 1;
}

.zoom-lens {
    position: absolute;
    width: 200px;
    height: 200px;
    background: rgba(255, 255, 255, 0.4);
    border: 1px solid #ddd;
    cursor: crosshair;
    display: none;
    pointer-events: none;
    z-index: 2;
}

.zoom-result {
    position: absolute;
    top: 0;
    left: calc(100% + 20px);
    width: 400px;
    height: 400px;
    border: 1px solid #ddd;
    overflow: hidden;
    display: none;
    background-color: #fff;
    z-index: 2;
    background-repeat: no-repeat;
}

/* 响应式适配 */
@media (max-width: 1200px) {
    .zoom-result {
        width: 350px;
        height: 350px;
    }
}

@media (max-width: 991px) {
    .zoom-lens,
    .zoom-result {
        display: none !important;
    }
    
    .zoom-mask {
        cursor: default;
    }
}

.gallery-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 40px;
    height: 40px;
    background: rgba(255, 255, 255, 0.8);
    border: none;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    color: #666;
    transition: all 0.3s;
}

.gallery-nav.prev {
    left: 20px;
}

.gallery-nav.next {
    right: 20px;
}

.gallery-nav:hover {
    background: #fff;
    color: #B88E5C;
}

.thumbnail-list {
    position: relative;
    display: flex;
    align-items: center;
    gap: 10px;
}

.thumbnail-wrapper {
    display: flex;
    gap: 10px;
    overflow: hidden;
    margin: 0 40px;
    width: calc(100% - 80px);
}

.thumbnail-nav {
    position: absolute;
    width: 30px;
    height: 30px;
    background: #fff;
    border: 1px solid #EFEFEF;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #666;
}

.thumbnail-nav.prev {
    left: 0;
}

.thumbnail-nav.next {
    right: 0;
}

.thumbnail {
    width: 60px;
    height: 60px;
    flex-shrink: 0;
    border: 1px solid #EFEFEF;
    border-radius: 4px;
    cursor: pointer;
    overflow: hidden;
}

.thumbnail.active {
    border-color: #B88E5C;
}

.thumbnail img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* 商品信息区域 */
.product-info {
    flex: 1;
    max-width: 100%;
    box-sizing: border-box;
    padding: 0 20px;
}

.product-title {
    font-size: 24px;
    color: #333;
    margin-bottom: 20px;
}

.product-price {
    margin-bottom: 20px;
}

.price-label {
    font-size: 14px;
    color: #666;
}

.price-value {
    font-size: 24px;
    color: #B88E5C;
    font-weight: bold;
}

/* 数量控制 */
.product-quantity {
    display: flex;
    align-items: center;
    margin-bottom: 30px;
}

.quantity-label {
    font-size: 14px;
    color: #666;
    margin-right: 10px;
}

.quantity-control {
    display: flex;
    align-items: center;
    border: 1px solid #EFEFEF;
    border-radius: 4px;
}

.quantity-btn {
    width: 40px;
    height: 40px;
    border: none;
    background: transparent;
    cursor: pointer;
    font-size: 18px;
    color: #666;
}

.quantity-input {
    width: 60px;
    height: 40px;
    border: none;
    border-left: 1px solid #EFEFEF;
    border-right: 1px solid #EFEFEF;
    text-align: center;
    font-size: 14px;
}

/* 操作按钮 */
.product-actions {
    display: flex;
    gap: 20px;
}

.add-to-cart,
.buy-now {
    flex: 1;
    height: 50px;
    border: none;
    border-radius: 25px;
    font-size: 16px;
    cursor: pointer;
    transition: all 0.3s;
}

.add-to-cart {
    background: transparent;
    border: 1px solid #B88E5C;
    color: #B88E5C;
}

.buy-now {
    background: #B88E5C;
    color: #fff;
}

.add-to-cart:hover {
    background: rgba(184, 142, 92, 0.05);
}

.buy-now:hover {
    opacity: 0.9;
}

/* 商品详情区域 */
.product-detail-section {
    background: #fff;
    padding: 0;
    border-radius: 8px;
    overflow: hidden;
}

/* 选项卡样式 */
.detail-tabs {
    display: flex;
    border-bottom: 1px solid #EFEFEF;
}

.tab-item {
    padding: 20px 40px;
    font-size: 16px;
    color: #666;
    cursor: pointer;
    position: relative;
    transition: color 0.3s;
}

.tab-item.active {
    color: #B88E5C;
}

.tab-item.active::after {
    content: '';
    position: absolute;
    bottom: -1px;
    left: 0;
    width: 100%;
    height: 2px;
    background: #B88E5C;
}

/* 内容区域 */
.detail-content {
    padding: 40px;
}

.detail-images img {
    width: 100%;
    display: block;
    margin-bottom: 20px;
}

.detail-images img:last-child {
    margin-bottom: 0;
}

/* 响应式调整 */
@media (max-width: 768px) {
    .product-info-section {
        flex-direction: column;
        padding: 20px;
    }

    .product-gallery {
        flex: none;
        width: 100%;
    }

    .main-image {
        height: 300px;
    }

    .product-actions {
        flex-direction: column;
    }
}

/* 商品信息区域样式更新 */
.product-rating {
    margin-bottom: 20px;
    color: #B88E5C;
}

/* 价格盒子基础样式 */
.product-price-box {
    background: #B88E5C;
    color: #fff;
    padding: 20px;
    border-radius: 8px;
    margin-bottom: 30px;
    width: 100%;
    box-sizing: border-box;
    max-width: 100%;
}

.price-tag {
    font-size: 28px;
    font-weight: bold;
    margin-bottom: 10px;
    word-break: break-word;  /* 允许在任意字符间换行 */
}

.price-desc {
    font-size: 14px;
    line-height: 1.5;
}

.product-params {
    margin-bottom: 30px;
}

.param-item {
    display: flex;
    align-items: center;
    margin-bottom: 15px;
}

.param-label {
    color: #666;
    margin-right: 10px;
    min-width: 80px;
}

.strength-rating {
    color: #B88E5C;
}

.quantity-section {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.quantity-control {
    display: flex;
    align-items: center;
    border: 1px solid #EFEFEF;
    border-radius: 4px;
    width: fit-content;
}

.add-to-cart-btn {
    width: 160px;
    height: 40px;
    background: #B88E5C;
    color: #fff;
    border: none;
    border-radius: 20px;
    font-size: 16px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    transition: opacity 0.3s;
}

.add-to-cart-btn:hover {
    opacity: 0.9;
}

/* 猜你喜欢区域 */
.recommend-section {
    padding: 40px 20px;
    margin-top: 30px;
    background: #352312;
}

.recommend-title {
    font-size: 24px;
    color: #fff;
    text-align: center;
    margin-bottom: 30px;
    font-weight: normal;
}

.recommend-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
    max-width: 1200px;
    margin: 0 auto;
}

.recommend-item {
    background: #fff;
    border-radius: 8px;
    overflow: hidden;
}

.recommend-image {
    width: 100%;
    position: relative;
    padding-top: 100%;  /* 1:1 比例 */
}

.recommend-image img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.recommend-info {
    padding: 15px;
}

.recommend-name {
    font-size: 14px;
    color: #333;
    margin-bottom: 10px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.recommend-price {
    color: #B88E5C;
    font-size: 16px;
    font-weight: 500;
}

/* 响应式布局 */
@media screen and (max-width: 1200px) {
    .recommend-grid {
        grid-template-columns: repeat(3, 1fr);
        padding: 0 15px;
    }
}

@media screen and (max-width: 768px) {
    .recommend-section {
        padding: 30px 15px;
    }

    .recommend-title {
        font-size: 20px;
        margin-bottom: 20px;
    }

    .recommend-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 15px;
    }

    .recommend-info {
        padding: 12px;
    }

    .recommend-name {
        font-size: 13px;
    }

    .recommend-price {
        font-size: 14px;
    }
}

@media screen and (max-width: 480px) {
    .recommend-section {
        padding: 20px 10px;
    }

    .recommend-title {
        font-size: 18px;
        margin-bottom: 15px;
    }

    .recommend-grid {
        gap: 10px;
    }

    .recommend-info {
        padding: 10px;
    }

    .recommend-name {
        font-size: 12px;
        margin-bottom: 8px;
    }

    .recommend-price {
        font-size: 13px;
    }
}

/* 放大镜相关样式 */
.magnifier-container {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

.magnifier-lens {
    position: absolute;
    width: 150px;
    height: 150px;
    border: 1px solid #ddd;
    background: rgba(255, 255, 255, 0.4);
    cursor: crosshair;
    display: none;
    pointer-events: none;
}

.magnifier-view {
    position: absolute;
    top: 0;
    right: -450px;
    width: 400px;
    height: 400px;
    background-repeat: no-repeat;
    border: 1px solid #ddd;
    display: none;
    z-index: 100;
    background-color: #fff;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

/* 响应式适配 */
@media (max-width: 1200px) {
    .magnifier-view {
        width: 350px;
        height: 350px;
        right: -380px;
    }
}

@media (max-width: 991px) {
    .product-gallery {
        margin: 0 auto;
    }

    .magnifier-lens,
    .magnifier-view {
        display: none !important;
    }
}

@media (max-width: 768px) {
    .product-gallery {
        flex: none;
        width: 100%;
    }

    .main-image {
        height: 300px;
    }
}

/* 暗色模式支持 */
@media (prefers-color-scheme: dark) {
    .magnifier-lens {
        background: rgba(255, 255, 255, 0.15);
        border-color: rgba(184, 142, 92, 0.8);
    }

    .magnifier-view {
        background-color: #1a1a1a;
        border-color: #333;
    }
}

/* 平板电脑适配 */
@media screen and (max-width: 1024px) {
    .product-info-section {
        padding: 20px;
        gap: 20px;
    }

    .product-info {
        padding: 0;
    }

    .product-price-box {
        padding: 15px;
        margin-bottom: 20px;
    }

    .price-tag {
        font-size: 20px;
        margin-bottom: 8px;
    }

    .price-desc {
        font-size: 13px;
        line-height: 1.4;
    }
}

@media (max-width: 768px) {
    .product-info-section {
        padding: 15px;
    }

    .product-info {
        width: 100%;
    }

    .product-price-box {
        padding: 12px;
        margin-bottom: 15px;
    }

    .price-tag {
        font-size: 18px;
        margin-bottom: 6px;
    }

    .price-desc {
        font-size: 12px;
        line-height: 1.3;
    }
}

/* 小屏幕手机适配 */
@media screen and (max-width: 480px) {
    .product-price-box {
        padding: 10px;
        margin-bottom: 15px;
    }

    .price-tag {
        font-size: 18px;
    }
} 
} 