/* 产品详情页特有样式 */

.breadcrumb {
    padding: 15px 0;
    border-bottom: 1px solid #eee;
}

.breadcrumb a {
    color: #666;
    text-decoration: none;
    margin: 0 5px;
}

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

.breadcrumb span {
    color: #999;
    margin: 0 5px;
}

.product-detail {
    padding: 40px 0;
}

.product-detail-row {
    display: flex;
    gap: 40px;
    margin-bottom: 50px;
}

.product-images {
    /*flex: 1;*/
    flex: 0 0 50%;
    overflow: hidden; 
}

.product-main-image {
    margin-bottom: 20px;
    border: 1px solid #eee;
    border-radius: 8px;
    overflow: hidden;
    position: relative;
    height: 480px;
}

.product-main-image img {
    width: 100%;
    height: 100%;
    display: block;
    -o-object-fit: contain;
    object-fit: contain;
}

/* Loading样式 */
.loading-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(230, 230, 230, 0.8);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 10;
    transition: opacity 0.3s ease;
}

.loading-spinner {
    width: 40px;
    height: 40px;
    border: 4px solid #f3f3f3;
    border-top: 4px solid #666;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.product-thumbnails {
    display: flex;
    gap: 10px;
    overflow-x: auto;
    padding-bottom: 10px;
}

.product-thumbnail {
    flex: 0 0 auto;
    width: 100px;
    height: 100px;
    border: 1px solid #eee;
    border-radius: 4px;
    cursor: pointer;
    overflow: hidden;
    transition: border-color 0.3s ease;
}

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

.product-thumbnail img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.product-info {
    flex: 1;
}

.product-category {
    color: #999;
    font-size: 0.9rem;
    margin-bottom: 10px;
}

.product-title {
    font-size: 2.2rem;
    font-weight: bold;
    margin-bottom: 20px;
    color: #333;
}

.product-meta {
    display: flex;
    align-items: center;
    gap: 20px;
    margin-bottom: 20px;
}

.product-sku {
    color: #666;
}

.product-stock {
    color: #4CAF50;
    font-weight: bold;
}

.product-price {
    font-size: 1.8rem;
    font-weight: bold;
    color: #f44336;
    margin-bottom: 20px;
}

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

.product-actions {
    display: flex;
    gap: 30px;
    margin-bottom: 30px;
}

.product-actions .btn {
    flex: 1;
    padding: 12px 0;
    text-align: center;
    border: none;
    border-radius: 5px;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
    display: inline-block;
}

.product-actions .btn-primary {
    background-color: #000;
    color: #fff;
}

.product-actions .btn-primary:hover {
    background-color: #333;
}

.product-actions .btn-secondary {
    background-color: #f1f1f1;
    color: #333;
    border: 1px solid #ddd;
}

.product-actions .btn-secondary:hover {
    background-color: #e0e0e0;
}

.product-features {
    background-color: #f8f9fa;
    padding: 25px;
    border-radius: 8px;
    margin-bottom: 30px;
}

.product-features h3 {
    margin-bottom: 15px;
    color: #333;
    font-size: 1.3rem;
}

.product-features ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.product-features li {
    padding: 8px 0;
    border-bottom: 1px solid #eee;
    display: flex;
    align-items: flex-start;
}

.product-features li:last-child {
    border-bottom: none;
}

.feature-label {
    font-weight: bold;
    min-width: 120px;
    color: #333;
}

.feature-value {
    color: #666;
}

.product-specs {
    margin-bottom: 50px;
}

.section-title {
    font-size: 1.4rem;
    margin-bottom: 30px;
    color: #333;
    border-bottom: 2px solid #000;
    padding-bottom: 10px;
    display: inline-block;
}

.specs-table {
    width: 100%;
    border-collapse: collapse;
}

.specs-table th,
.specs-table td {
    padding: 12px 15px;
    border: 1px solid #eee;
    text-align: left;
}

.specs-table th {
    background-color: #f8f9fa;
    font-weight: bold;
    color: #333;
}

.specs-table tr:nth-child(even) {
    background-color: #f8f9fa;
}

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

.product-description h3 {
    color: #333;
    margin-top: 30px;
    margin-bottom: 15px;
    font-size: 1.4rem;
}

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

.product-description img {
    max-width: 100%;
    height: auto;
    margin: 20px 0;
    border-radius: 8px;
}

.related-products {
    margin-bottom: 50px;
}

.related-products-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
}

.related-product-item {
    background-color: #fff;
    border: 1px solid #eee;
    border-radius: 8px;
    overflow: hidden;
    transition: all 0.3s ease;
}

.related-product-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
}

.related-product-image {
    position: relative;
    padding-top: 100%;
    overflow: hidden;
}

.related-product-image img {
    position: absolute;
    top: 0;
    left: 0;
    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: 15px;
}

.related-product-name {
    font-weight: bold;
    margin-bottom: 10px;
    color: #333;
}

.related-product-name a {
    color: #333;
    text-decoration: none;
    transition: color 0.3s ease;
}

.related-product-name a:hover {
    color: #000;
}

.related-product-price {
    color: #f44336;
    font-weight: bold;
}

@media (max-width: 992px) {
    .product-detail-row {
        flex-direction: column;
    }
    
    .related-products-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 768px) {
    .product-actions {
        flex-direction: column;
    }
    
    .related-products-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 576px) {
    .related-products-grid {
        grid-template-columns: 1fr;
    }
}