/* 基础样式重置 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'PingFang SC', 'Microsoft YaHei', sans-serif;
    line-height: 1.6;
    color: #333;
    background-color: #f8f9fa;
}

/* 商品详情主容器 */
.product-detail-main {
    padding-top: 100px;
    padding-bottom: 80px;
    background-color: #f8fafc;
}

.product-detail-container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* 面包屑导航 */
.product-breadcrumb {
    margin-bottom: 30px;
    padding: 15px 0;
    border-bottom: 1px solid #eef2f7;
}

.breadcrumb-list {
    display: flex;
    list-style: none;
    margin: 0;
    padding: 0;
    align-items: center;
}

.breadcrumb-item {
    display: flex;
    align-items: center;
}

.breadcrumb-item a {
    color: #666;
    text-decoration: none;
    font-size: 14px;
    transition: color 0.3s ease;
}

.breadcrumb-item a:hover {
    color: #2c7be5;
}

.breadcrumb-separator {
    margin: 0 10px;
    color: #ccc;
    font-size: 12px;
}

.breadcrumb-current {
    color: #2c7be5;
    font-weight: 500;
    font-size: 14px;
}

/* 商品主要内容区域 */
.product-detail-content {
    background: white;
    border-radius: 12px;
    padding: 40px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    overflow: hidden;
}

/* 主标题包装器 */
.product-title-wrapper {
    margin-bottom: 30px;
    padding-bottom: 20px;
    border-bottom: 1px solid #eef2f7;
}

.product-main-title {
    font-size: 36px;
    font-weight: 700;
    color: #2c3e50;
    line-height: 1.4;
    margin: 0;
}

/* 图片和商品信息左右排列容器 */
.product-content-container {
    display: flex;
    gap: 40px;
    margin-bottom: 40px;
    flex-wrap: wrap;
}

/* 商品图片区域 - 左侧 */
.product-image-section {
    flex: 1;
    min-width: 300px;
}

.product-main-image {
    width: 100%;
    height: 400px;
    border-radius: 10px;
    overflow: hidden;
    background: #f5f7fa;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 15px;
    position: relative;
}

.product-main-image img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    transition: all 0.3s ease;
    cursor: zoom-in;
}

/* 缩略图容器 */
.product-thumbnails {
    display: flex;
    gap: 10px;
    overflow-x: auto;
    padding: 10px 0;
}

.product-thumbnails::-webkit-scrollbar {
    height: 4px;
}

.product-thumbnails::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 2px;
}

.product-thumbnails::-webkit-scrollbar-thumb {
    background: #c1c1c1;
    border-radius: 2px;
}

.product-thumbnails::-webkit-scrollbar-thumb:hover {
    background: #a8a8a8;
}

.product-thumbnail {
    width: 80px;
    height: 80px;
    border-radius: 8px;
    overflow: hidden;
    border: 2px solid transparent;
    cursor: pointer;
    flex-shrink: 0;
    background: #f5f7fa;
    transition: all 0.3s ease;
    position: relative;
}

.product-thumbnail::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.1);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.product-thumbnail:hover::after {
    opacity: 1;
}

.product-thumbnail:hover {
    border-color: #2c7be5;
    transform: translateY(-2px);
}

.product-thumbnail.active {
    border-color: #2c7be5;
    box-shadow: 0 4px 12px rgba(44, 123, 229, 0.3);
}

.product-thumbnail.active::after {
    opacity: 0.3;
}

.product-thumbnail img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

/* 商品信息区域 - 右侧 */
.product-info-section {
    flex: 1;
    min-width: 300px;
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.product-header {
    border-bottom: 1px solid #eee;
    padding-bottom: 20px;
}

.product-meta-info {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 20px;
    color: #666;
    font-size: 14px;
    margin-bottom: 15px;
}

.meta-item {
    display: flex;
    align-items: center;
    gap: 5px;
}

.meta-icon {
    color: #2c7be5;
    margin-right: 8px;
    font-size: 16px;
}

/* 价格区域 - 简化显示 */
.product-price-section {
    background: #f8fafd;
    padding: 10px;
    border-radius: 10px;
    /* border-left: 4px solid #2c7be5; */
}

.price-display {
    font-size: 36px;
    font-weight: 700;
    color: #e74c3c;
}

/* 或者使用现有的 .discount-badge 类，但简化样式 */
.discount-badge {
    font-size: 36px;
    font-weight: bold;
    color: #e74c3c;
    display: inline-block;
}


.product-quantity-section {
    display: flex;
    align-items: center;
    gap: 15px;
}

.quantity-control {
    display: flex;
    align-items: center;
    border: 1px solid #ddd;
    border-radius: 6px;
    overflow: hidden;
}

.quantity-btn {
    width: 40px;
    height: 40px;
    background: #f8f9fa;
    border: none;
    font-size: 18px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
}

.quantity-btn:hover {
    background: #e9ecef;
}

.quantity-input {
    width: 60px;
    height: 40px;
    border: none;
    text-align: center;
    font-size: 16px;
    font-weight: 500;
}

.stock-status {
    font-size: 14px;
    color: #27ae60;
    font-weight: 500;
}

.product-action-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    margin-top: 10px;
}

.btn-cart {
    flex: 1;
    background: #f39c12;
    color: white;
    border: none;
    padding: 16px 24px;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.3s;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.btn-cart:hover {
    background: #e67e22;
}

.btn-buy {
    flex: 1;
    background: #2c7be5;
    color: white;
    border: none;
    padding: 16px 24px;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.3s;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.btn-buy:hover {
    background: #1c65c9;
}

.btn-favorite {
    width: 60px;
    background: white;
    border: 1px solid #ddd;
    border-radius: 8px;
    font-size: 24px;
    cursor: pointer;
    transition: all 0.3s;
    display: flex;
    align-items: center;
    justify-content: center;
}

.btn-favorite:hover {
    border-color: #e74c3c;
    color: #e74c3c;
}

.btn-favorite.active {
    border-color: #e74c3c;
    color: #e74c3c;
}

/* 商品描述区域 */
.product-description-section {
    margin-top: 30px;
    padding-top: 30px;
    border-top: 1px solid #eef2f7;
}

/* 选项卡容器 */
.product-tabs {
    margin-top: 20px;
}

.tab-headers {
    display: flex;
    border-bottom: 2px solid #f0f0f0;
    margin-bottom: 25px;
    overflow: hidden;
}

.tab-header {
    padding: 15px 30px;
    font-size: 16px;
    font-weight: 600;
    color: #666;
    cursor: pointer;
    transition: all 0.3s ease;
    white-space: nowrap;
    border-bottom: 3px solid transparent;
    margin-bottom: -2px;
    flex: 1;
    text-align: center;
}

.tab-header:hover {
    color: #2c7be5;
    background-color: #f8fafd;
}

.tab-header.active {
    color: #2c7be5;
    border-bottom-color: #2c7be5;
    background-color: #f0f7ff;
}

.tab-content {
    display: none;
    animation: fadeIn 0.5s ease;
    padding: 10px 0;
}

.tab-content.active {
    display: block;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.product-description {
    line-height: 1.8;
    font-size: 16px;
    color: #555;
}

/* 相关推荐 */
.related-products-section {
    margin-top: 60px;
    padding-top: 30px;
    border-top: 1px solid #eef2f7;
}

.section-title {
    font-size: 24px;
    font-weight: 700;
    color: #2c3e50;
    margin-bottom: 30px;
    position: relative;
    padding-bottom: 10px;
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 50px;
    height: 3px;
    background: #2c7be5;
    border-radius: 2px;
}

.related-products-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 25px;
    margin-top: 20px;
}

.related-product-item {
    background: white;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.08);
    transition: all 0.3s ease;
    text-decoration: none;
    color: inherit;
}

.related-product-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.15);
}

.related-product-image {
    height: 180px;
    overflow: hidden;
}

.related-product-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.related-product-item:hover .related-product-image img {
    transform: scale(1.05);
}

.related-product-content {
    padding: 20px;
}

.related-product-title {
    font-size: 16px;
    color: #2c3e50;
    margin-bottom: 10px;
    line-height: 1.4;
    font-weight: 600;
    height: 40px;
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    line-clamp: 2;
}

.related-product-price {
    color: #e74c3c;
    font-size: 18px;
    font-weight: 700;
}

/* 上一篇/下一篇导航 */
.product-navigation {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 20px;
    margin-top: 40px;
    border-top: 1px dashed #e0e0e0;
}

.nav-item {
    display: flex;
    align-items: center;
    padding: 12px 20px;
    background: white;
    border-radius: 8px;
    text-decoration: none;
    color: #333;
    transition: all 0.3s ease;
    max-width: 45%;
}

.nav-item:hover {
    background: #e8f2ff;
    color: #2c7be5;
    transform: translateX(-5px);
}

.nav-item.nav-next:hover {
    transform: translateX(5px);
}

.nav-icon {
    margin: 0 10px;
    font-size: 20px;
}

.nav-text {
    flex: 1;
}

.nav-title {
    font-size: 14px;
    font-weight: 600;
}

.nav-product-name {
    font-weight: 600;
    font-size: 16px;
}

/* 返回顶部按钮 */
.back-to-top {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 50px;
    height: 50px;
    background: #2c7be5;
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    z-index: 1000;
    box-shadow: 0 5px 15px rgba(44, 123, 229, 0.3);
}

.back-to-top.visible {
    opacity: 1;
    visibility: visible;
}

.back-to-top:hover {
    background: #1c65c9;
    transform: translateY(-5px);
}

/* 响应式调整 */
@media (max-width: 992px) {
    .product-main-title {
        font-size: 32px;
    }

    .product-detail-content {
        padding: 30px;
    }

    .product-content-container {
        gap: 30px;
    }

    .product-main-image {
        height: 350px;
    }
}

@media (max-width: 768px) {
    .product-detail-main {
        padding-top: 80px;
        padding-bottom: 60px;
    }

    .product-detail-container {
        padding: 0 15px;
    }

    .product-main-title {
        font-size: 28px;
    }

    .product-detail-content {
        padding: 20px;
    }

    .product-content-container {
        flex-direction: column;
        gap: 30px;
    }

    .product-image-section,
    .product-info-section {
        width: 100%;
    }

    .product-main-image {
        height: 300px;
    }

    .discount-badge {
        font-size: 22px;
        padding: 6px 14px;
    }

    .product-action-buttons {
        flex-direction: column;
    }

    .btn-cart,
    .btn-buy {
        width: 100%;
    }

    .related-products-grid {
        grid-template-columns: 1fr;
    }

    .product-navigation {
        flex-direction: column;
        gap: 15px;
    }

    .nav-item {
        max-width: 100%;
        width: 100%;
    }

    .product-meta-info {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }

    /* 移动端选项卡调整 */
    .tab-headers {
        flex-wrap: wrap;
    }

    .tab-header {
        padding: 12px 15px;
        font-size: 15px;
        min-width: 120px;
    }

    /* 移动端缩略图调整 */
    .product-thumbnail {
        width: 70px;
        height: 70px;
    }
}

@media (max-width: 576px) {
    .product-main-title {
        font-size: 24px;
    }

    .product-main-image {
        height: 250px;
    }

    .back-to-top {
        bottom: 20px;
        right: 20px;
        width: 45px;
        height: 45px;
    }

    .tab-header {
        padding: 10px 12px;
        font-size: 14px;
        min-width: 100px;
    }

    .discount-badge {
        font-size: 20px;
        padding: 5px 12px;
    }

    .product-thumbnail {
        width: 60px;
        height: 60px;
    }

    .product-detail-content {
        padding: 15px;
    }
}



/* 联系方式部分样式 - 极简紧凑版 */
.contact-section {
    margin-top: 8px;
    padding: 8px;
    background: #f8fafd;
    border-radius: 6px;
    border: 1px solid #e0e8f5;
}

.contact-title {
    font-size: 15px;
    font-weight: 600;
    color: #2c3e50;
    margin-bottom: 6px;
    padding-bottom: 4px;
    border-bottom: 1px dashed #d0d8e8;
}

.contact-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 4px 8px;
    /* 行间距4px，列间距8px */
}

.contact-item {
    display: flex;
    align-items: center;
    gap: 4px;
    padding: 0;
}

.contact-icon {
    width: 24px;
    height: 24px;
    min-width: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #3498db;
    color: white;
    border-radius: 4px;
    font-size: 12px;
}

.contact-content {
    flex: 1;
    min-width: 0;
}

.contact-label {
    color: #7f8c8d;
    font-size: 11px;
    font-weight: 500;
    line-height: 1.1;
}

.contact-value {
    color: #2c3e50;
    font-weight: 400;
    font-size: 12px;
    line-height: 1.1;
}

.contact-link {
    color: #2c7be5;
    text-decoration: none;
    font-size: 12px;
}

.contact-link:hover {
    color: #1c65c9;
    text-decoration: underline;
}

/* 响应式调整 */
@media (max-width: 768px) {
    .contact-grid {
        grid-template-columns: 1fr;
        gap: 3px;
    }

    .contact-section {
        padding: 6px;
    }
}