/* 产品详情页样式 - 修复微信弹窗位置 */
:root {
    --primary-color: #1a73e8;
    --secondary-color: #0d47a1;
    --accent-color: #4285f4;
    --text-color: #333;
    --light-bg: #f8f9fa;
    --border-color: #e0e0e0;
    --shadow: 0 10px 30px rgba(0, 0, 0, 0.08);
    --transition: all 0.3s ease;
}

.product-detail-section {
    padding: 80px 0 60px;
    background: linear-gradient(135deg, #f8f9fa 0%, #ffffff 100%);
    min-height: 100vh;
}

.product-detail {
    display: flex;
    gap: 40px;
    margin-bottom: 50px;
    background: #fff;
    border-radius: 12px;
    box-shadow: var(--shadow);
    padding: 30px;
    position: relative;
    overflow: visible;
}

.product-detail::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 4px;
    background: linear-gradient(90deg, var(--primary-color), var(--accent-color));
}

.product-images {
    flex: 1.2;
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.main-image {
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.12);
    transition: var(--transition);
    border: 1px solid var(--border-color);
}

.main-image:hover {
    transform: translateY(-5px);
}

.main-image img {
    width: 100%;
    height: auto;
    display: block;
    transition: transform 0.5s ease;
}

.main-image:hover img {
    transform: scale(1.02);
}

.image-thumbnails {
    position: relative;
    display: flex;
    align-items: center;
    background: #fafafa;
    border-radius: 8px;
    padding: 10px;
}

.thumbnails-container {
    display: flex;
    overflow-x: auto;
    gap: 12px;
    scroll-behavior: smooth;
    -ms-overflow-style: none;
    scrollbar-width: none;
    padding: 0 35px;
    flex: 1;
}

.thumbnails-container::-webkit-scrollbar {
    display: none;
}

.thumbnail {
    width: 75px;
    height: 75px;
    border-radius: 6px;
    overflow: hidden;
    cursor: pointer;
    opacity: 0.7;
    transition: var(--transition);
    flex-shrink: 0;
    position: relative;
    border: 2px solid var(--border-color);
    background: #fff;
    box-sizing: border-box;
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.08);
}

.thumbnail:hover {
    opacity: 1;
    transform: scale(1.05);
}

.thumbnail.active {
    opacity: 1;
    border: 2px solid var(--primary-color);
    box-shadow: 0 5px 15px rgba(26, 115, 232, 0.2);
}

.thumbnail::before {
    content: '';
    position: absolute;
    top: -4px;
    left: -4px;
    right: -4px;
    bottom: -4px;
    background: linear-gradient(45deg, 
        #ff0000, #ff7f00, #ffff00, #00ff00, 
        #0000ff, #4b0082, #9400d3, #ff0000);
    background-size: 400% 400%;
    border-radius: 8px;
    z-index: 0;
    opacity: 0;
    transition: opacity 0.3s;
    animation: rainbow-border 3s linear infinite;
}

.thumbnail:hover::before {
    opacity: 1;
}

.thumbnail.active::before {
    opacity: 1;
    background: linear-gradient(45deg, 
        var(--primary-color), 
        var(--accent-color), 
        var(--secondary-color), 
        var(--primary-color));
    animation: rainbow-border 2s linear infinite;
}

@keyframes rainbow-border {
    0% {
        background-position: 0% 50%;
        transform: rotate(0deg);
    }
    50% {
        background-position: 100% 50%;
    }
    100% {
        background-position: 0% 50%;
        transform: rotate(360deg);
    }
}

.thumbnail img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    position: relative;
    z-index: 1;
    border-radius: 4px;
    background: #fff;
    display: block;
}

.thumb-prev, .thumb-next {
    background-color: var(--primary-color);
    color: white;
    border: none;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    position: absolute;
    z-index: 10;
    transition: var(--transition);
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.15);
}

.thumb-prev:hover, .thumb-next:hover {
    background-color: var(--secondary-color);
    transform: scale(1.1);
}

.thumb-prev {
    left: 8px;
}

.thumb-next {
    right: 8px;
}

.product-info {
    flex: 1;
    position: relative;
    z-index: 1;
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.product-info h1 {
    font-size: 28px;
    color: var(--primary-color);
    margin-bottom: 10px;
    padding-bottom: 15px;
    border-bottom: 2px solid var(--accent-color);
    position: relative;
    font-weight: 700;
}

.product-info h1::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 60px;
    height: 2px;
    background: var(--primary-color);
}

.product-param, .product-price {
    margin-bottom: 0;
    padding: 18px;
    background: linear-gradient(135deg, #f8f9fa 0%, #ffffff 100%);
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
    border-left: 4px solid var(--primary-color);
    transition: var(--transition);
}

.product-param:hover, .product-price:hover {
    transform: translateY(-3px);
}

.product-param label, .product-price label {
    font-weight: 600;
    color: var(--primary-color);
    display: block;
    margin-bottom: 8px;
    font-size: 15px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.product-param label::before, .product-price label::before {
    content: '•';
    color: var(--accent-color);
    font-size: 20px;
}

.specifications {
    line-height: 1.6;
    color: #555;
    font-size: 14.5px;
}

.product-price {
    background: linear-gradient(135deg, #fff5f5 0%, #ffffff 100%);
    border-left: 4px solid #e74c3c;
}

.product-price .price {
    font-size: 26px;
    color: #e74c3c;
    font-weight: 700;
    text-shadow: 0 2px 4px rgba(231, 76, 60, 0.2);
}

.product-actions {
    margin-top: auto;
    display: flex;
    gap: 15px;
    flex-wrap: wrap;
    position: relative;
}

/* 修复立即购买按钮和微信弹窗样式 */
.buy-btn {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: white;
    border: none;
    padding: 14px 28px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 16px;
    font-weight: 600;
    transition: var(--transition);
    position: relative;
    overflow: visible;
    box-shadow: 0 5px 15px rgba(26, 115, 232, 0.3);
    flex: 1;
    min-width: 160px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    z-index: 10;
}

.buy-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
    transition: left 0.5s;
}

.buy-btn:hover::before {
    left: 100%;
}

.buy-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 20px rgba(26, 115, 232, 0.4);
}

.buy-btn:active {
    transform: translateY(-1px);
}

/* 微信弹窗样式 - 修复位置问题 */
.wechat-popup {
    position: absolute;
    top: auto;
    bottom: calc(100% + 15px);
    left: 50%;
    transform: translateX(-50%);
    background-color: white;
    padding: 20px;
    border-radius: 10px;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.15);
    text-align: center;
    display: none;
    z-index: 1000;
    border: 1px solid var(--border-color);
    animation: fadeIn 0.3s ease;
    min-width: 200px;
}

.wechat-popup.active {
    display: block;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateX(-50%) translateY(10px); }
    to { opacity: 1; transform: translateX(-50%) translateY(0); }
}

.wechat-popup img {
    width: 250px;
    height: 250px;
    margin-bottom: 10px;
    border-radius: 5px;
    display: block;
}

.wechat-popup p {
    margin: 0;
    font-size: 14px;
    color: #666;
    font-weight: 500;
}

.contact-btn {
    background: linear-gradient(135deg, #2ecc71, #27ae60);
    color: white;
    border: none;
    padding: 14px 28px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 16px;
    font-weight: 600;
    transition: var(--transition);
    box-shadow: 0 5px 15px rgba(46, 204, 113, 0.3);
    flex: 1;
    min-width: 160px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.contact-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 20px rgba(46, 204, 113, 0.4);
}

.product-description {
    border-top: 1px solid #eee;
    padding-top: 35px;
    background: #fff;
    border-radius: 12px;
    box-shadow: var(--shadow);
    padding: 30px;
    position: relative;
    overflow: hidden;
}

.product-description::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 4px;
    background: linear-gradient(90deg, var(--accent-color), var(--primary-color));
}

.product-description h2 {
    font-size: 22px;
    color: var(--primary-color);
    margin-bottom: 20px;
    padding-bottom: 12px;
    border-bottom: 1px dashed var(--border-color);
    position: relative;
    font-weight: 700;
}

.product-description h2::after {
    content: '';
    position: absolute;
    bottom: -1px;
    left: 0;
    width: 40px;
    height: 2px;
    background: var(--primary-color);
}

.description-content {
    line-height: 1.8;
    font-size: 15px;
    color: #555;
}

.description-content p {
    margin-bottom: 15px;
}

/* 响应式设计 */
@media (max-width: 992px) {
    .product-detail {
        flex-direction: column;
        gap: 30px;
        padding: 25px;
    }
    
    .product-images {
        flex: none;
    }
    
    .product-info h1 {
        font-size: 24px;
    }
    
    .product-actions {
        flex-direction: column;
    }
    
    .buy-btn, .contact-btn {
        min-width: 100%;
    }
}

@media (max-width: 768px) {
    .product-detail-section {
        padding: 70px 0 40px;
    }
    
    .product-detail, .product-description {
        padding: 20px;
        border-radius: 10px;
    }
    
    .product-info h1 {
        font-size: 22px;
    }
    
    .thumbnails-container {
        padding: 0 30px;
        gap: 10px;
    }
    
    .thumbnail {
        width: 65px;
        height: 65px;
    }
    
    .product-param, .product-price {
        padding: 15px;
    }
    
    .product-price .price {
        font-size: 22px;
    }
    
    .buy-btn, .contact-btn {
        padding: 12px 20px;
        font-size: 15px;
    }
    
    /* 移动端调整微信弹窗位置 */
    .wechat-popup {
        bottom: calc(100% + 10px);
        left: 50%;
        transform: translateX(-50%);
    }
}

/* 添加一些微妙的动画效果 */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.product-detail, .product-description {
    animation: fadeInUp 0.6s ease;
}

.product-description {
    animation-delay: 0.2s;
    animation-fill-mode: both;
}

/* 添加额外的美化元素 */
.product-detail::after {
    content: '';
    position: absolute;
    top: 20px;
    right: 20px;
    width: 80px;
    height: 80px;
    background: linear-gradient(135deg, rgba(26, 115, 232, 0.1) 0%, rgba(66, 133, 244, 0.05) 100%);
    border-radius: 50%;
    z-index: 0;
}

.product-description::after {
    content: '';
    position: absolute;
    bottom: 20px;
    right: 20px;
    width: 60px;
    height: 60px;
    background: linear-gradient(135deg, rgba(66, 133, 244, 0.1) 0%, rgba(26, 115, 232, 0.05) 100%);
    border-radius: 50%;
    z-index: 0;
}

/* 优化按钮的图标样式 */
.buy-btn svg, .contact-btn svg {
    transition: var(--transition);
}

.buy-btn:hover svg, .contact-btn:hover svg {
    transform: scale(1.1);
}

/* 为价格添加脉冲动画 */
.product-price .price {
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.05);
    }
    100% {
        transform: scale(1);
    }
}

/* 无障碍性改进 */
.buy-btn:focus, .contact-btn:focus, .thumbnail:focus {
    outline: 2px solid var(--accent-color);
    outline-offset: 2px;
}