/* 商品详情页样式 */

.page-header {
    height: 400px;
    background: linear-gradient(rgba(0,0,0,0.6), rgba(0,0,0,0.6)),
                linear-gradient(135deg, #d4a574 0%, #c49463 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.header-drone {
    position: absolute;
    left: 50px;
    top: 50%;
    transform: translateY(-50%);
    width: 200px;
    height: auto;
    opacity: 0.8;
}

.page-header h1 {
    font-size: 72px;
    font-weight: 700;
    color: #fff;
    letter-spacing: 3px;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.5);
}

/* 商品详情内容 */
.product-details {
    background: #fff;
    padding: 60px 0;
    color: #333;
}

.breadcrumb {
    margin-bottom: 40px;
    font-size: 14px;
    color: #666;
}

.breadcrumb a {
    color: #666;
    text-decoration: none;
}

.breadcrumb a:hover {
    color: #ff8c00;
}

/* 新的产品页面布局 */
.product-layout {
    display: grid;
    grid-template-columns: 2fr 400px;
    gap: 40px;
    margin-bottom: 60px;
}

/* 单列产品布局（不显示购物车总计） */
.product-layout-single {
    display: block;
    margin-bottom: 60px;
}

.product-main {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 40px;
}

.product-content {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 60px;
    margin-bottom: 60px;
}

/* 产品图片区域 */
.product-images {
    position: relative;
}

.sale-badge {
    position: absolute;
    top: 20px;
    left: 20px;
    background: #000;
    color: #fff;
    padding: 8px 15px;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    z-index: 10;
}

.main-image {
    position: relative;
    margin-bottom: 20px;
    background: #f8f9fa;
    border-radius: 8px;
    overflow: hidden;
}

.main-image img {
    width: 100%;
    height: 500px;
    object-fit: contain;
    transition: transform 0.3s ease;
}

.zoom-btn {
    position: absolute;
    top: 20px;
    right: 20px;
    background: rgba(0,0,0,0.7);
    color: #fff;
    border: none;
    padding: 10px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 16px;
    transition: background 0.3s ease;
}

.zoom-btn:hover {
    background: rgba(0,0,0,0.9);
}

/* 缩略图 */
.thumbnail-images {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    gap: 10px;
    margin-bottom: 30px;
}

.thumbnail {
    width: 100%;
    height: 80px;
    object-fit: contain;
    background: #f8f9fa;
    border: 2px solid transparent;
    border-radius: 4px;
    cursor: pointer;
    transition: border-color 0.3s ease;
}

.thumbnail:hover,
.thumbnail.active {
    border-color: #ff8c00;
}

/* 配件图片 */
.accessories-images {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 15px;
}

.accessories-images img {
    width: 100%;
    height: 120px;
    object-fit: contain;
    background: #f8f9fa;
    border-radius: 4px;
    padding: 10px;
}

/* 产品信息区域 */
.product-info h1 {
    font-size: 36px;
    font-weight: 700;
    color: #333;
    margin-bottom: 20px;
    line-height: 1.2;
}

.price-section {
    margin-bottom: 25px;
}

.original-price {
    color: #999;
    text-decoration: line-through;
    font-size: 24px;
    margin-right: 15px;
}

.current-price {
    color: #ff8c00;
    font-size: 32px;
    font-weight: 700;
}

.product-description {
    margin-bottom: 30px;
    line-height: 1.6;
    color: #666;
}

/* 评价概览 */
.product-rating-overview {
    border: 1px solid #eee;
    border-radius: 8px;
    padding: 15px;
    background: #f8f9fa;
}

/* 星级评分样式 */
.stars-display {
    display: inline-flex;
    align-items: center;
    gap: 2px;
}

.star {
    font-size: 18px;
    line-height: 1;
}

.star-filled {
    color: #ffc107;
}

.star-empty {
    color: #ddd;
}

/* 评价统计样式 */
.reviews-overview {
    background: #fff;
    border: 1px solid #eee;
    border-radius: 8px;
    padding: 30px;
}

.rating-summary {
    text-align: center;
}

.rating-breakdown {
    padding: 20px 0;
}

/* 评价列表样式 */
.reviews-list {
    background: #fff;
}

.review-item {
    background: #fff;
    transition: background 0.2s ease;
}

.review-item:hover {
    background: #fafafa;
}

/* 添加到购物车区域 */
.add-to-cart-section {
    margin-bottom: 30px;
}

.quantity-selector {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 1px solid #ddd;
    border-radius: 4px;
    overflow: hidden;
    width: auto;
    max-width: 140px;
    margin: 0 auto 20px auto;
    background: #fff;
}

.quantity-selector button {
    background: #f8f9fa;
    border: none;
    padding: 12px 14px;
    cursor: pointer;
    font-size: 18px;
    font-weight: 600;
    transition: background 0.3s ease;
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #333;
    flex: 0 0 44px;
}

.quantity-selector button:hover {
    background: #e9ecef;
}

.quantity-selector button:active {
    background: #dee2e6;
}

.quantity-selector input {
    border: none;
    padding: 12px 8px;
    width: 50px;
    text-align: center;
    font-size: 16px;
    outline: none;
    background: #fff;
    color: #333;
    font-weight: 600;
    height: 44px;
    flex: 0 0 50px;
}

.add-to-cart-btn {
    background: #ff8c00;
    color: #fff;
    border: none;
    padding: 15px 40px;
    font-size: 16px;
    font-weight: 600;
    text-transform: uppercase;
    cursor: pointer;
    border-radius: 4px;
    transition: all 0.3s ease;
    width: 100%;
    max-width: 300px;
    margin: 0 auto;
    display: block;
}

.add-to-cart-btn:hover {
    background: #e67e00;
    transform: translateY(-2px);
}

/* 产品元数据 */
.product-meta {
    border-top: 1px solid #eee;
    padding-top: 20px;
}

.product-meta p {
    margin-bottom: 10px;
    color: #666;
}

.product-meta a {
    color: #ff8c00;
    text-decoration: none;
}

.product-meta a:hover {
    text-decoration: underline;
}

/* 购物车总计侧边栏 */
.cart-summary {
    background: #f8f9fa;
    padding: 25px;
    border-radius: 8px;
    height: fit-content;
    position: sticky;
    top: 20px;
}

.cart-summary h3 {
    margin-bottom: 20px;
    font-size: 18px;
    font-weight: 600;
    text-align: center;
    color: #333;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.cart-item {
    margin-bottom: 15px;
    padding-bottom: 15px;
    border-bottom: 1px solid #eee;
}

.cart-item:last-child {
    border-bottom: none;
    margin-bottom: 0;
    padding-bottom: 0;
}

.cart-item img {
    width: 50px;
    height: 50px;
    object-fit: cover;
    margin-right: 15px;
}

.order-total {
    border-top: 2px solid #ddd;
    padding-top: 15px;
    margin-top: 15px;
    font-size: 18px;
    font-weight: 600;
}

/* 产品标签页 */
.product-tabs {
    background: #f8f9fa;
    padding: 60px 0;
}

.tab-navigation {
    border-bottom: 1px solid #ddd;
    margin-bottom: 40px;
    display: flex;
    gap: 0;
}

.tab-btn {
    background: none;
    border: none;
    padding: 15px 30px;
    font-size: 16px;
    font-weight: 600;
    color: #666;
    cursor: pointer;
    border-bottom: 3px solid transparent;
    transition: all 0.3s ease;
    border-radius: 0;
}

.tab-btn.active {
    color: #333;
    border-bottom-color: #ff8c00;
    background: #fff;
}

.tab-btn:hover {
    color: #333;
    background: #fff;
}

.tab-content {
    background: #fff;
    padding: 40px;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    color: #333;
}

.description-content {
    line-height: 1.2;
    white-space: pre-line;
}

.description-content p {
    margin-bottom: 4px;
    line-height: 1.3;
}

/* 商品描述中的图片样式 */
.description-content img {
    max-width: 200px;
    height: auto;
    margin: 10px;
    border-radius: 4px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.detailed-description {
    line-height: 1.2;
}

.detailed-description p {
    margin-bottom: 4px;
    line-height: 1.3;
    margin-top: 0;
}

/* 按钮样式 */
.btn {
    padding: 12px 30px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 16px;
    font-weight: 600;
    text-decoration: none;
    display: inline-block;
    text-align: center;
    transition: all 0.3s ease;
}

.btn-primary {
    background: #ff8c00;
    color: #fff;
}

.btn-primary:hover {
    background: #e67e00;
}

.btn-full {
    width: 100%;
}

/* 桌面版特殊样式 */
@media (min-width: 969px) {
    .add-to-cart-section {
        display: block;
        text-align: left;
    }

    .quantity-selector {
        margin: 0 0 20px 0;
        display: inline-flex;
    }

    .add-to-cart-btn {
        width: auto;
        max-width: none;
        margin: 0;
        min-width: 200px;
        display: inline-block;
    }
}

/* 响应式设计 */
@media (max-width: 968px) {
    .product-layout {
        grid-template-columns: 1fr;
        gap: 30px;
    }

    .product-layout-single {
        display: block;
    }

    .product-main {
        grid-template-columns: 1fr;
        gap: 30px;
    }

    .product-content {
        grid-template-columns: 1fr;
        gap: 40px;
    }

    .page-header h1 {
        font-size: 48px;
    }

    .header-drone {
        width: 150px;
        left: 20px;
    }

    .product-info h1 {
        text-align: center;
    }

    .price-section {
        text-align: center;
    }

    .product-description {
        text-align: center;
    }

    .add-to-cart-section {
        text-align: center;
    }

    .quantity-selector {
        margin: 0 auto 20px auto;
    }

    .add-to-cart-btn {
        width: 100%;
        max-width: 280px;
        margin: 0 auto;
        display: block;
    }

    .product-meta {
        text-align: center;
    }

    .cart-summary {
        margin: 30px auto 0 auto;
        max-width: 400px;
    }

    .reviews-overview {
        grid-template-columns: 1fr !important;
        gap: 20px !important;
    }

    .tab-navigation {
        flex-direction: column;
    }

    .tab-btn {
        width: 100%;
        text-align: center;
    }

    .tab-content {
        padding: 20px;
    }
}

@media (max-width: 576px) {
    .thumbnail-images {
        grid-template-columns: repeat(3, 1fr);
    }

    .accessories-images {
        grid-template-columns: repeat(2, 1fr);
    }

    .product-info h1 {
        font-size: 28px;
    }

    .current-price {
        font-size: 24px;
    }

    .original-price {
        font-size: 18px;
    }

    .quantity-selector {
        margin: 0 auto 15px auto;
        max-width: 120px;
        display: inline-flex;
    }

    .quantity-selector button {
        width: 36px;
        height: 36px;
        padding: 8px;
        font-size: 16px;
        flex: 0 0 36px;
    }

    .quantity-selector input {
        width: 48px;
        height: 36px;
        padding: 8px 4px;
        font-size: 14px;
        flex: 0 0 48px;
    }

    .tab-btn {
        padding: 12px 20px;
        font-size: 14px;
    }
}
