/**
 * Product Template CSS
 *
 * @package wp.plugin.svx
 * @version 1.0.0
 * @author SV Agency
 * @since 1.0.0
 *
 * Template-specific CSS for product styling
 * Loaded conditionally when product posts are present
 *
 * Usage:
 * This CSS file contains template-specific styling for the product template.
 * It should be loaded only when product posts are being displayed
 * to avoid CSS bloat on pages that don't need it.
 *
 * Dependencies:
 * - Requires svx-post.css to be loaded first for universal post styling
 *
 * CSS Class System:
 * - svx-product: Template-specific class for product styling
 *   * Contains all product-specific visual styling
 *   * Includes hover effects, product layout, and e-commerce styling
 *   * Married to product template's unique design requirements
 *
 * Last Updated: 2025-01-27
 */

.svx-product {
    background: #fff;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 10px rgba(0,0,0,0.08);
    transition: all 0.3s ease;
    height: 100%;
    display: flex;
    flex-direction: column;
    position: relative;
}

.svx-product:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(0,0,0,0.12);
}

.svx-product .product-image {
    position: relative;
    overflow: hidden;
    height: 250px;
}

.svx-product .product-thumbnail {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.svx-product:hover .product-thumbnail {
    transform: scale(1.05);
}

.svx-product .product-badge {
    position: absolute;
    top: 10px;
    left: 10px;
    z-index: 2;
    background: #e74c3c;
    color: white;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
}

.svx-product .badge-text {
    margin: 0;
}

.svx-product .product-tools {
    position: absolute;
    top: 10px;
    right: 10px;
    z-index: 2;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.svx-product:hover .product-tools {
    opacity: 1;
}

.svx-product .wishlist-button {
    background: rgba(255, 255, 255, 0.9);
    border: none;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.svx-product .wishlist-button:hover {
    background: var(--primary-color-1);
    color: white;
    transform: scale(1.1);
}

.svx-product .wishlist-button i {
    font-size: 1rem;
}

.svx-product .product-content {
    padding: 20px;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.svx-product .product-category {
    margin-bottom: 8px;
}

.svx-product .category-text {
    font-size: 0.8rem;
    color: var(--primary-color-1);
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin: 0;
}

.svx-product .product-title {
    margin-bottom: 12px;
}

.svx-product .product-name {
    margin: 0;
    font-size: 1.1rem;
    font-weight: 600;
    line-height: 1.4;
}

.svx-product .product-name a {
    color: #2c3e50;
    text-decoration: none;
    transition: color 0.3s ease;
}

.svx-product .product-name a:hover {
    color: var(--primary-color-1);
    text-decoration: none;
}

.svx-product .product-price {
    margin-bottom: 12px;
}

.svx-product .price {
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--primary-color-1);
}

.svx-product .product-meta {
    margin-bottom: 12px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.svx-product .product-sku {
    font-size: 0.8rem;
    color: #868e96;
    font-style: italic;
}

.svx-product .product-stock {
    font-size: 0.8rem;
    color: #27ae60;
    font-weight: 500;
}

.svx-product .product-rating {
    margin-bottom: 12px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.svx-product .stars {
    display: flex;
    gap: 2px;
}

.svx-product .stars i {
    color: #f39c12;
    font-size: 0.9rem;
}

.svx-product .rating-text {
    font-size: 0.8rem;
    color: #868e96;
}

.svx-product .product-excerpt {
    margin-bottom: 15px;
    flex: 1;
}

.svx-product .product-description {
    color: #6c757d;
    font-size: 0.9rem;
    line-height: 1.5;
    margin: 0;
}

.svx-product .product-actions {
    margin-top: auto;
}

.svx-product .product-link {
    color: var(--primary-color-1);
    text-decoration: none;
    font-weight: 500;
    font-size: 0.9rem;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 8px 16px;
    border: 2px solid var(--primary-color-1);
    border-radius: 4px;
    background: transparent;
}

.svx-product .product-link:hover {
    background: var(--primary-color-1);
    color: white;
    text-decoration: none;
    transform: translateY(-2px);
}

.svx-product .product-link i {
    font-size: 0.8rem;
}

/* Simplified product styling */
.svx-product-simple {
    height: 270px;
    position: relative;
    overflow: hidden;
}

.svx-product-simple .product-image {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
}

.svx-product-simple .product-thumbnail {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.svx-product-simple .product-content {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(transparent, rgba(0, 0, 0, 0.8));
    color: white;
    padding: 20px 15px 15px;
    transform: translateY(100%);
    transition: transform 0.3s ease;
    z-index: 2;
}

.svx-product-simple:hover .product-content {
    transform: translateY(0);
}

.svx-product-simple:hover .product-thumbnail {
    transform: scale(1.05);
}

.svx-product-simple .product-title {
    margin-bottom: 8px;
}

.svx-product-simple .product-name {
    font-size: 1rem;
    line-height: 1.3;
}

.svx-product-simple .product-name a {
    color: white;
    text-decoration: none;
}

.svx-product-simple .product-name a:hover {
    color: #f0f0f0;
    text-decoration: none;
}

.svx-product-simple .product-price {
    margin-bottom: 0;
}

.svx-product-simple .price {
    font-size: 1.1rem;
    color: #ffd700;
    font-weight: 700;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .svx-product .product-image {
        height: 200px;
    }
    
    .svx-product .product-content {
        padding: 15px;
    }
    
    .svx-product .product-name {
        font-size: 1rem;
    }
    
    .svx-product .price {
        font-size: 1.1rem;
    }
    
    .svx-product-simple {
        height: 250px;
    }
    
    .svx-product-simple .product-content {
        padding: 15px 12px 12px;
    }
    
    .svx-product-simple .product-name {
        font-size: 0.9rem;
    }
    
    .svx-product-simple .price {
        font-size: 1rem;
    }
}
