/* Product Page Styles */

.product-page {
    max-width: 1200px;
    margin: 0 auto;
}

.product-layout {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 50px;
    align-items: start;
}

@media (max-width: 768px) {
    .product-layout {
        grid-template-columns: 1fr;
        gap: 30px;
    }
    
    .product-images {
        width: 100%;
        max-width: 100%;
        overflow: hidden;
    }
    
    .product-images .main-image {
        padding: 10px;
        max-width: 100%;
        box-sizing: border-box;
    }
    
    .product-images .main-image img {
        width: 100%;
        max-width: 100%;
        height: auto;
        max-height: 350px;
    }
}

.product-images .main-image {
    background: #f8f9fa;
    border-radius: 16px;
    padding: 20px;
    margin-bottom: 15px;
}

.product-images .main-image img {
    width: 100%;
    height: auto;
    max-height: 500px;
    object-fit: contain;
    border-radius: 12px;
}

.thumbnail-images {
    display: flex;
    gap: 10px;
    overflow-x: auto;
    padding: 5px 0;
}

.thumbnail-images img {
    width: 80px;
    height: 80px;
    object-fit: cover;
    border-radius: 8px;
    cursor: pointer;
    border: 2px solid transparent;
    transition: border-color 0.3s;
}

.thumbnail-images img:hover,
.thumbnail-images img.active {
    border-color: #007bff;
}

.product-details h1 {
    font-size: 1.8rem;
    color: #333;
    margin-bottom: 15px;
    line-height: 1.3;
}

.source-badge {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 15px;
    font-size: 0.75rem;
    font-weight: bold;
    color: white;
    margin-bottom: 15px;
}

.rating-section {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 20px;
}

.stars {
    color: #ffc107;
}

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

.current-price {
    font-size: 2.5rem;
    font-weight: bold;
    color: #e74c3c;
}

.original-price {
    font-size: 1.2rem;
    color: #999;
    text-decoration: line-through;
    margin-left: 10px;
}

.discount-badge {
    display: inline-block;
    background: #e74c3c;
    color: white;
    padding: 4px 10px;
    border-radius: 4px;
    font-size: 0.85rem;
    font-weight: bold;
    margin-left: 10px;
}

.buy-button {
    display: block;
    width: 100%;
    padding: 18px 30px;
    font-size: 1.1rem;
    font-weight: bold;
    color: white;
    text-align: center;
    text-decoration: none;
    border-radius: 12px;
    margin-bottom: 20px;
    transition: transform 0.2s, box-shadow 0.2s;
}

.buy-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(0,0,0,0.2);
}

.buy-button.amazon {
    background: linear-gradient(135deg, #ff9900, #ffb347);
}

.buy-button.aliexpress {
    background: linear-gradient(135deg, #e62e04, #ff6b4a);
}

.buy-button.default {
    background: linear-gradient(135deg, #667eea, #764ba2);
}

.product-features {
    background: #f8f9fa;
    border-radius: 12px;
    padding: 20px;
    margin-top: 20px;
}

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

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

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

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

.product-features li i {
    color: #28a745;
}

/* Breadcrumb */
.breadcrumb {
    margin-bottom: 30px;
    font-size: 14px;
    color: #666;
}

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

.breadcrumb a:hover {
    text-decoration: underline;
}

/* Loading spinner */
.loading-spinner {
    text-align: center;
    padding: 100px 0;
}

.loading-spinner i {
    font-size: 3rem;
    color: #007bff;
}

/* Error message */
.error-message {
    text-align: center;
    padding: 100px 20px;
}

.error-message i {
    font-size: 4rem;
    color: #dc3545;
    margin-bottom: 20px;
}

.error-message h2 {
    color: #333;
    margin-bottom: 10px;
}

.error-message p {
    color: #666;
    margin-bottom: 30px;
}

/* Related Products */
.related-products {
    margin-top: 60px;
    padding-top: 40px;
    border-top: 1px solid #eee;
}

.related-products h2 {
    font-size: 1.5rem;
    margin-bottom: 30px;
    text-align: center;
}

.related-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 20px;
}
