/* 商品详情页面样式 - 惠多多 */

/* 面包屑导航 */
.breadcrumb {
    background: #f8f9fa;
    padding: 15px 0;
    border-bottom: 1px solid #e9ecef;
}

.breadcrumb ol {
    display: flex;
    list-style: none;
    margin: 0;
    padding: 0;
    align-items: center;
}

.breadcrumb li {
    display: flex;
    align-items: center;
}

.breadcrumb li:not(:last-child)::after {
    content: '/';
    margin: 0 10px;
    color: #7f8c8d;
}

.breadcrumb a {
    color: #7f8c8d;
    text-decoration: none;
    transition: color 0.3s ease;
}

.breadcrumb a:hover {
    color: #ff6b6b;
}

.breadcrumb .active {
    color: #2c3e50;
    font-weight: 500;
}

/* 商品详情布局 */
.product-detail {
    padding: 30px 0;
}

.product-layout {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 50px;
    margin-bottom: 50px;
}

/* 商品图片 */
.product-gallery {
    background: white;
    border-radius: 12px;
    padding: 20px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
}

.main-image {
    width: 100%;
    height: 400px;
    border-radius: 8px;
    overflow: hidden;
    background: #f8f9fa;
    display: flex;
    align-items: center;
    justify-content: center;
}

.main-image img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}

/* 商品信息 */
.product-info {
    background: white;
    border-radius: 12px;
    padding: 30px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
}

.product-title {
    font-size: 28px;
    font-weight: 700;
    color: #2c3e50;
    margin-bottom: 20px;
    line-height: 1.4;
}

.product-rating {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 25px;
    padding-bottom: 20px;
    border-bottom: 1px solid #e9ecef;
}

.stars {
    display: flex;
    gap: 3px;
}

.stars i {
    color: #ddd;
    font-size: 18px;
}

.stars i.active {
    color: #f39c12;
}

.rating-text {
    font-weight: 600;
    color: #2c3e50;
}

.review-count {
    color: #7f8c8d;
    font-size: 14px;
}

.product-price {
    margin-bottom: 25px;
}

.current-price {
    font-size: 32px;
    font-weight: 700;
    color: #e74c3c;
    margin-right: 15px;
}

.original-price {
    font-size: 18px;
    color: #7f8c8d;
    text-decoration: line-through;
    margin-right: 15px;
}

.discount {
    background: #e74c3c;
    color: white;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 14px;
    font-weight: 500;
}

.product-features {
    display: flex;
    gap: 20px;
    margin-bottom: 30px;
    padding: 20px;
    background: #f8f9fa;
    border-radius: 8px;
}

.feature-item {
    display: flex;
    align-items: center;
    gap: 8px;
    color: #7f8c8d;
    font-size: 14px;
}

.feature-item i {
    color: #ff6b6b;
    font-size: 16px;
}

/* 商品操作 */
.product-actions {
    border-top: 1px solid #e9ecef;
    padding-top: 25px;
}

.quantity-selector {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 25px;
}

.quantity-selector label {
    font-weight: 500;
    color: #2c3e50;
}

.quantity-controls {
    display: flex;
    align-items: center;
    border: 2px solid #e9ecef;
    border-radius: 6px;
    overflow: hidden;
}

.quantity-btn {
    width: 40px;
    height: 40px;
    border: none;
    background: #f8f9fa;
    color: #7f8c8d;
    cursor: pointer;
    font-size: 18px;
    font-weight: 600;
    transition: all 0.3s ease;
}

.quantity-btn:hover {
    background: #e9ecef;
    color: #2c3e50;
}

.quantity-controls input {
    width: 60px;
    height: 40px;
    border: none;
    text-align: center;
    font-size: 16px;
    font-weight: 500;
    color: #2c3e50;
}

.stock-info {
    color: #7f8c8d;
    font-size: 14px;
}

.action-buttons {
    display: flex;
    gap: 15px;
    align-items: center;
}

.btn-large {
    padding: 15px 30px;
    font-size: 16px;
    font-weight: 600;
}

.action-buttons .btn-icon {
    width: 50px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
}

/* 商品标签页 */
.product-tabs {
    background: white;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    overflow: hidden;
}

.tab-nav {
    display: flex;
    border-bottom: 1px solid #e9ecef;
}

.tab-btn {
    flex: 1;
    padding: 20px;
    border: none;
    background: white;
    color: #7f8c8d;
    font-size: 16px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    border-bottom: 3px solid transparent;
}

.tab-btn:hover {
    background: #f8f9fa;
    color: #2c3e50;
}

.tab-btn.active {
    color: #ff6b6b;
    border-bottom-color: #ff6b6b;
    background: #f8f9fa;
}

.tab-content {
    padding: 30px;
}

.tab-pane {
    display: none;
}

.tab-pane.active {
    display: block;
}

.tab-pane h3 {
    font-size: 20px;
    font-weight: 600;
    color: #2c3e50;
    margin-bottom: 20px;
}

.tab-pane p {
    color: #7f8c8d;
    line-height: 1.6;
    margin-bottom: 15px;
}

.tab-pane ul {
    list-style: none;
    padding: 0;
}

.tab-pane li {
    padding: 8px 0;
    color: #7f8c8d;
    border-bottom: 1px solid #f1f3f4;
}

.tab-pane li:last-child {
    border-bottom: none;
}

.tab-pane li::before {
    content: '✓';
    color: #27ae60;
    font-weight: bold;
    margin-right: 10px;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .product-layout {
        grid-template-columns: 1fr;
        gap: 30px;
    }
    
    .product-title {
        font-size: 24px;
    }
    
    .current-price {
        font-size: 28px;
    }
    
    .product-features {
        flex-direction: column;
        gap: 10px;
    }
    
    .action-buttons {
        flex-direction: column;
        align-items: stretch;
    }
    
    .tab-nav {
        flex-direction: column;
    }
    
    .tab-btn {
        text-align: left;
        border-bottom: 1px solid #e9ecef;
        border-right: none;
    }
    
    .tab-btn.active {
        border-bottom-color: #e9ecef;
        border-left: 3px solid #ff6b6b;
    }
}

@media (max-width: 480px) {
    .product-detail {
        padding: 20px 0;
    }
    
    .product-info {
        padding: 20px;
    }
    
    .product-title {
        font-size: 20px;
    }
    
    .current-price {
        font-size: 24px;
    }
    
    .main-image {
        height: 300px;
    }
    
    .quantity-selector {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }
    
    .tab-content {
        padding: 20px;
    }
}

/* 动画效果 */
.product-gallery,
.product-info,
.product-tabs {
    animation: slideInUp 0.6s ease-out;
}

@keyframes slideInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* 加载状态 */
.btn.loading {
    position: relative;
    color: transparent;
}

.btn.loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 20px;
    height: 20px;
    border: 2px solid transparent;
    border-top: 2px solid currentColor;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: translate(-50%, -50%) rotate(0deg); }
    100% { transform: translate(-50%, -50%) rotate(360deg); }
}
