/* Product Page Styles */

.product-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--spacing-xl);
    margin-bottom: var(--spacing-xl);
}

/* Gallery */
.product-gallery {
    position: sticky;
    top: var(--spacing-md);
    height: fit-content;
}

.gallery-main {
    width: 100%;
    background: var(--bg-secondary);
    border-radius: var(--border-radius);
    overflow: hidden;
    margin-bottom: var(--spacing-md);
}

.gallery-main img {
    width: 100%;
    height: auto;
    display: block;
}

.gallery-thumbs {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(80px, 1fr));
    gap: var(--spacing-sm);
}

.gallery-thumb {
    width: 100%;
    height: 80px;
    object-fit: cover;
    border: 2px solid var(--border-color);
    border-radius: var(--border-radius-sm);
    cursor: pointer;
    transition: border-color var(--transition-speed);
}

.gallery-thumb:hover,
.gallery-thumb.active {
    border-color: var(--secondary-color);
}

.no-image {
    background: var(--bg-secondary);
    height: 400px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-light);
    font-size: var(--font-size-lg);
    border-radius: var(--border-radius);
}

/* Product Info */
.product-info h1 {
    font-size: 32px;
    margin-bottom: var(--spacing-md);
    color: var(--primary-color);
}

.product-price {
    font-size: 28px;
    font-weight: bold;
    color: var(--accent-color);
    margin-bottom: var(--spacing-lg);
}

.product-details {
    background: var(--bg-secondary);
    padding: var(--spacing-md);
    border-radius: var(--border-radius);
    margin-bottom: var(--spacing-lg);
}

.product-details table {
    width: 100%;
}

.product-details th {
    text-align: left;
    padding: var(--spacing-xs) 0;
    color: var(--text-light);
    font-weight: 500;
    width: 40%;
}

.product-details td {
    padding: var(--spacing-xs) 0;
}

.badge {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: var(--font-size-sm);
    font-weight: 500;
}

.badge-in_stock {
    background: #d4edda;
    color: #155724;
}

.badge-on_order {
    background: #fff3cd;
    color: #856404;
}

.badge-out_of_stock {
    background: #f8d7da;
    color: #721c24;
}

.product-description {
    margin-bottom: var(--spacing-lg);
}

.product-description h3 {
    margin-bottom: var(--spacing-sm);
}

.product-actions {
    display: flex;
    gap: var(--spacing-md);
    flex-wrap: wrap;
}

/* Reviews */
.reviews-section {
    border-top: 2px solid var(--border-color);
    padding-top: var(--spacing-lg);
}

.reviews-section h2 {
    margin-bottom: var(--spacing-md);
}

.reviews-list {
    display: flex;
    flex-direction: column;
    gap: var(--spacing-md);
}

.review-item {
    background: var(--bg-secondary);
    padding: var(--spacing-md);
    border-radius: var(--border-radius);
}

.review-header {
    display: flex;
    align-items: center;
    gap: var(--spacing-md);
    margin-bottom: var(--spacing-sm);
    flex-wrap: wrap;
}

.review-rating {
    color: #ffc107;
    font-size: 18px;
}

.review-date {
    color: var(--text-light);
    font-size: var(--font-size-sm);
    margin-left: auto;
}

.review-text {
    color: var(--text-color);
    line-height: 1.6;
}

/* Responsive */
@media (max-width: 768px) {
    .product-container {
        grid-template-columns: 1fr;
    }
    
    .product-gallery {
        position: static;
    }
    
    .gallery-thumbs {
        grid-template-columns: repeat(auto-fill, minmax(60px, 1fr));
    }
    
    .gallery-thumb {
        height: 60px;
    }
    
    .product-info h1 {
        font-size: 24px;
    }
    
    .product-price {
        font-size: 22px;
    }
    
    .product-actions {
        flex-direction: column;
    }
    
    .product-actions .btn {
        width: 100%;
    }
}
