/* 产品详情页样式 */

/* 产品横幅 */
.product-banner {
    position: relative;
    width: 100%;
    height: 70vh;
    overflow: hidden;
    margin-bottom: 0;
    padding: 0 !important;
}

/* 覆盖通用section样式 */
.product-tabs,
.product-grid {
    padding: 0 !important;
}

.banner-content {
    position: relative;
    width: 100%;
    height: 100%;
}

.banner-content img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* 图片显示控制 */
.mobile-image {
    display: none;
}

@media (max-width: 768px) {
    .desktop-image {
        display: none;
    }
    
    .mobile-image {
        display: block;
    }
}

.banner-text {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    text-align: center;
    color: white;
    text-shadow: 0 2px 4px rgba(0,0,0,0.5);
    max-width: 80%;
}

.banner-text h2 {
    font-size: 3rem;
    font-weight: 300;
    margin-bottom: 20px;
    letter-spacing: 2px;
}

.banner-text p {
    font-size: 1.2rem;
    margin: 0;
    line-height: 1.6;
}

.featured-product {
    position: absolute;
    bottom: 20px;
    right: 20px;
    background-color: rgba(0,0,0,0.8);
    color: white;
    padding: 15px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    gap: 15px;
    max-width: 300px;
}

.featured-product .product-image img {
    width: 80px;
    height: 80px;
    object-fit: cover;
    border-radius: 4px;
}

.featured-product .product-info h3 {
    margin: 0 0 5px 0;
    font-size: 1rem;
    font-weight: 500;
}

.featured-product .product-info p {
    margin: 0;
    font-size: 1.1rem;
    font-weight: 600;
}

/* 产品标签切换 */
.product-tabs {
    background-color: #f9f9f9;
    padding: 20px 0;
    margin-top: 0;
    margin-bottom: 40px;
}

.tabs {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    display: flex;
    gap: 20px;
    border-bottom: 1px solid #e0e0e0;
}

.tab-btn {
    padding: 12px 24px;
    background-color: transparent;
    border: none;
    border-bottom: 3px solid transparent;
    font-size: 1rem;
    font-weight: 500;
    color: #666;
    cursor: pointer;
    transition: all 0.3s ease;
}

.tab-btn:hover {
    color: #333;
}

.tab-btn.active {
    color: #e63946;
    border-bottom-color: #e63946;
}

.tab-content {
    display: none;
}

.tab-content.active {
    display: block;
    animation: fadeIn 0.5s ease;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* 产品网格 */
.product-grid {
    padding: 40px 0;
    background-color: #fff;
}

.grid-header {
    max-width: 1200px;
    margin: 0 auto 30px;
    padding: 0 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.grid-header h3 {
    font-size: 1.5rem;
    font-weight: 400;
    color: #333;
    margin: 0;
}

.view-options {
    display: flex;
    align-items: center;
    gap: 10px;
}

.view-options span {
    font-size: 0.9rem;
    color: #666;
}

.view-options select {
    padding: 8px 12px;
    border: 1px solid #e0e0e0;
    border-radius: 4px;
    font-size: 0.9rem;
    background-color: #fff;
}

.product-list {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
}

/* 当只有一个产品时的样式 */
.product-list:has(.product-item:only-child) {
    max-width: 400px;
}

.product-item {
    background-color: #fff;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    overflow: hidden;
    transition: all 0.3s ease;
}

.product-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0,0,0,0.1);
}

.product-item .product-image {
    position: relative;
    padding-top: 100%;
    overflow: hidden;
}

.product-item .product-image img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.product-item:hover .product-image img {
    transform: scale(1.05);
}

.product-item .product-info {
    padding: 20px;
    text-align: center;
}

.product-item .product-info h4 {
    font-size: 1.1rem;
    font-weight: 500;
    color: #333;
    margin: 0 0 10px 0;
}

.product-item .product-info span {
    display: block;
    margin-top: 8px;
    font-size: 0.9rem;
    color: #666;
}

.product-item .product-info .amazon-link {
    display: inline-block;
    font-size: 1.2rem;
    font-weight: 600;
    color: #e63946;
    margin: 0;
    text-decoration: none;
    transition: all 0.3s ease;
}

.product-item .product-info .amazon-link:hover {
    color: #c1121f;
    text-decoration: underline;
    transform: translateY(-2px);
}

/* 响应式设计 */
@media (max-width: 768px) {
    .product-banner {
        height: 50vh;
    }
    
    .banner-text h2 {
        font-size: 2rem;
    }
    
    .banner-text p {
        font-size: 1rem;
    }
    
    .featured-product {
        position: relative;
        bottom: auto;
        right: auto;
        margin: 20px auto;
        max-width: 90%;
    }
    
    .filter-row {
        flex-direction: column;
        gap: 20px;
    }
    
    .grid-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }
    
    .product-list {
        grid-template-columns: 1fr;
    }
    
    /* 图片响应式设计 */
    .banner-content img {
        max-width: 100%;
        height: 100%;
        object-fit: cover;
    }
    
    .product-item .product-image img {
        max-width: 100%;
        height: 100%;
        object-fit: cover;
    }
}