/*!
 * Product Grid for Elementor - Frontend Styles
 * Version: 1.0.0
 */

/* Product Grid Container */
.pge-products-grid {
    display: flex;
    flex-wrap: wrap;
    margin: -10px;
    box-sizing: border-box;
}

.pge-product-item {
    padding: 10px;
    box-sizing: border-box;
}

.pge-columns-1 .pge-product-item { width: 100%; }
.pge-columns-2 .pge-product-item { width: 50%; }
.pge-columns-3 .pge-product-item { width: 33.333%; }
.pge-columns-4 .pge-product-item { width: 25%; }
.pge-columns-6 .pge-product-item { width: 16.666%; }

.pge-product-card {
    background: #fff;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    overflow: hidden;
    transition: all 0.3s ease;
    height: 100%;
    display: flex;
    flex-direction: column;
}

.pge-product-card:hover {
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    transform: translateY(-2px);
}

.pge-product-image {
    position: relative;
    overflow: hidden;
}

/* Hover Actions */
.pge-hover-actions {
    position: absolute;
    top: 10px;
    right: 10px;
    display: flex;
    flex-direction: column;
    gap: 8px;
    opacity: 0;
    transform: translateX(20px);
    transition: all 0.3s ease;
    z-index: 3;
}

.pge-product-card:hover .pge-hover-actions {
    opacity: 1;
    transform: translateX(0);
}

.pge-action-btn {
    width: 40px;
    height: 40px;
    border: none;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.9);
    color: #333;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

.pge-action-btn:hover {
    background: #fff;
    color: #ff6b6b;
    transform: scale(1.1);
}

.pge-action-btn.pge-wishlist:hover {
    color: #e74c3c;
}

.pge-action-btn.pge-quick-view:hover {
    color: #3498db;
}

.pge-action-btn.pge-compare:hover {
    color: #f39c12;
}

.pge-product-image img {
    width: 100%;
    height: 200px;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.pge-product-card:hover .pge-product-image img {
    transform: scale(1.05);
}

.pge-product-content {
    padding: 15px;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

.pge-product-title {
    margin: 0 0 10px 0;
    font-size: 16px;
    font-weight: 600;
    line-height: 1.4;
    flex-grow: 1;
}

.pge-product-title a {
    color: #333;
    text-decoration: none;
    transition: color 0.3s ease;
}

.pge-product-title a:hover {
    color: #0073aa;
}

.pge-product-price {
    margin: 10px 0;
    font-size: 18px;
    font-weight: bold;
    color: #333;
}

.pge-product-price .woocommerce-Price-amount {
    color: #e74c3c;
}

.pge-product-price del {
    color: #999;
    font-weight: normal;
    margin-right: 5px;
}

/* Product Rating */
.pge-product-rating {
    margin: 8px 0;
    font-size: 14px;
}

.pge-product-rating .star-rating {
    font-size: 14px;
}

/* Product Excerpt */
.pge-product-excerpt {
    margin: 10px 0;
    font-size: 14px;
    color: #666;
    line-height: 1.4;
}

.pge-product-actions {
    margin-top: auto;
}

.pge-product-actions .button,
.pge-product-actions .add_to_cart_button {
    width: 100%;
    padding: 10px;
    background: #0073aa;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    transition: background 0.3s ease;
    text-align: center;
    text-decoration: none;
    display: inline-block;
    font-size: 14px;
}

.pge-product-actions .button:hover,
.pge-product-actions .add_to_cart_button:hover {
    background: #005a87;
    color: white;
}

.pge-product-actions .added_to_cart {
    display: none;
}

/* Responsive Design */
@media (max-width: 768px) {
    .pge-columns-4 .pge-product-item,
    .pge-columns-6 .pge-product-item {
        width: 50%;
    }
    
    .pge-columns-3 .pge-product-item {
        width: 50%;
    }
}

@media (max-width: 480px) {
    .pge-products-grid .pge-product-item {
        width: 100% !important;
    }
    
    .pge-product-image img {
        height: 250px;
    }
}

/* Loading Animation */
.pge-products-grid.loading {
    opacity: 0.6;
    pointer-events: none;
}

/* Sale Badge */
.pge-product-image .onsale,
.pge-sale-badge {
    position: absolute;
    top: 10px;
    left: 10px;
    background: #e74c3c;
    color: white;
    padding: 5px 10px;
    border-radius: 3px;
    font-size: 12px;
    font-weight: bold;
    z-index: 2;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Out of Stock */
.pge-product-card.out-of-stock {
    opacity: 0.7;
}

.pge-product-card.out-of-stock .pge-product-image::after {
    content: 'Out of Stock';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: rgba(0, 0, 0, 0.8);
    color: white;
    padding: 10px 20px;
    border-radius: 4px;
    font-weight: bold;
}
/*
 No Products Message */
.pge-no-products {
    text-align: center;
    padding: 40px 20px;
    color: #666;
    font-size: 16px;
    background: #f9f9f9;
    border-radius: 8px;
    margin: 20px 0;
}

/* Accessibility Improvements */
.pge-product-title a:focus,
.pge-product-actions .button:focus,
.pge-product-actions .add_to_cart_button:focus {
    outline: 2px solid #0073aa;
    outline-offset: 2px;
}

/* High Contrast Mode Support */
@media (prefers-contrast: high) {
    .pge-product-card {
        border: 2px solid #000;
    }
    
    .pge-product-title a {
        color: #000;
    }
    
    .pge-product-actions .button,
    .pge-product-actions .add_to_cart_button {
        background: #000;
        color: #fff;
        border: 2px solid #000;
    }
}

/* Reduced Motion Support */
@media (prefers-reduced-motion: reduce) {
    .pge-product-card,
    .pge-product-image img,
    .pge-product-title a,
    .pge-product-actions .button,
    .pge-product-actions .add_to_cart_button {
        transition: none;
    }
    
    .pge-product-card:hover {
        transform: none;
    }
    
    .pge-product-card:hover .pge-product-image img {
        transform: none;
    }
}

/* Print Styles */
@media print {
    .pge-product-actions {
        display: none;
    }
    
    .pge-product-card {
        box-shadow: none;
        border: 1px solid #ccc;
    }
    
    .pge-product-image img {
        max-height: 150px;
    }
}

/* RTL Support */
.rtl .pge-sale-badge,
.rtl .pge-product-image .onsale {
    left: auto;
    right: 10px;
}

/* Performance Optimization */
.pge-product-image {
    contain: layout style paint;
}

.pge-product-card {
    will-change: transform, box-shadow;
}

/* Loading State */
.pge-products-grid.pge-loading {
    opacity: 0.6;
    pointer-events: none;
    position: relative;
}

.pge-products-grid.pge-loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 40px;
    height: 40px;
    margin: -20px 0 0 -20px;
    border: 3px solid #f3f3f3;
    border-top: 3px solid #0073aa;
    border-radius: 50%;
    animation: pge-spin 1s linear infinite;
}

@keyframes pge-spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}/* Quick Vie
w Modal */
.pge-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 9999;
}

.pge-modal-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
}

.pge-modal-container {
    position: relative;
    max-width: 800px;
    margin: 50px auto;
    background: #fff;
    border-radius: 8px;
    max-height: 90vh;
    overflow-y: auto;
}

.pge-modal-content {
    padding: 30px;
}

.pge-modal-close {
    position: absolute;
    top: 15px;
    right: 20px;
    background: none;
    border: none;
    font-size: 30px;
    cursor: pointer;
    color: #999;
    z-index: 10;
}

.pge-modal-close:hover {
    color: #333;
}

.pge-loading {
    text-align: center;
    padding: 40px;
    font-size: 16px;
    color: #666;
}

.pge-loading i {
    margin-right: 10px;
    color: #0073aa;
}

/* Action Button States */
.pge-action-btn.loading {
    opacity: 0.6;
    pointer-events: none;
}

.pge-action-btn.loading::after {
    content: '';
    position: absolute;
    width: 16px;
    height: 16px;
    border: 2px solid #ccc;
    border-top: 2px solid #333;
    border-radius: 50%;
    animation: pge-spin 1s linear infinite;
}

.pge-action-btn.added {
    background: #27ae60;
    color: #fff;
}

.pge-action-btn.added:hover {
    background: #219a52;
}

/* Notifications */
.pge-notification {
    position: fixed;
    top: 20px;
    right: 20px;
    padding: 15px 20px;
    border-radius: 4px;
    color: #fff;
    font-weight: 500;
    z-index: 10000;
    transform: translateX(100%);
    transition: transform 0.3s ease;
    max-width: 300px;
}

.pge-notification.show {
    transform: translateX(0);
}

.pge-notification.pge-success {
    background: #27ae60;
}

.pge-notification.pge-error {
    background: #e74c3c;
}

.pge-notification.pge-info {
    background: #3498db;
}

/* Enhanced Product Card Animations */
.pge-product-card {
    transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
}

.pge-product-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}

/* Image Zoom Effect */
.pge-product-image {
    overflow: hidden;
}

.pge-product-image img {
    transition: transform 0.5s ease;
}

.pge-product-card:hover .pge-product-image img {
    transform: scale(1.08);
}

/* Price Animation */
.pge-product-price {
    transition: color 0.3s ease;
}

.pge-product-card:hover .pge-product-price {
    color: #e74c3c;
}

/* Button Hover Effects */
.pge-product-actions .button {
    position: relative;
    overflow: hidden;
    transition: all 0.3s ease;
}

.pge-product-actions .button::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
    transition: left 0.5s ease;
}

.pge-product-actions .button:hover::before {
    left: 100%;
}

/* Responsive Hover Actions */
@media (max-width: 768px) {
    .pge-hover-actions {
        opacity: 1;
        transform: translateX(0);
        position: static;
        flex-direction: row;
        justify-content: center;
        margin-top: 10px;
        background: none;
    }
    
    .pge-action-btn {
        position: relative;
        margin: 0 5px;
    }
}

/* Loading Animation for Images */
.pge-product-image img.lazy {
    opacity: 0;
    transition: opacity 0.3s ease;
}

.pge-product-image img.lazy.loaded {
    opacity: 1;
}

/* Sale Badge Enhanced */
.pge-sale-badge {
    animation: pge-pulse 2s infinite;
}

@keyframes pge-pulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.05); }
    100% { transform: scale(1); }
}

/* Dark Mode Support */
@media (prefers-color-scheme: dark) {
    .pge-product-card {
        background: #2c3e50;
        color: #ecf0f1;
        border-color: #34495e;
    }
    
    .pge-product-title a {
        color: #ecf0f1;
    }
    
    .pge-product-title a:hover {
        color: #3498db;
    }
    
    .pge-modal-container {
        background: #2c3e50;
        color: #ecf0f1;
    }
}/* Q
uick View Content */
.pge-quick-view-content {
    display: flex;
    gap: 30px;
    align-items: flex-start;
}

.pge-quick-view-image {
    flex: 0 0 300px;
}

.pge-quick-view-image img {
    width: 100%;
    height: auto;
    border-radius: 8px;
}

.pge-quick-view-details {
    flex: 1;
}

.pge-quick-view-details h2 {
    margin: 0 0 15px 0;
    font-size: 24px;
    color: #333;
}

.pge-quick-view-price {
    font-size: 20px;
    font-weight: bold;
    margin: 15px 0;
    color: #e74c3c;
}

.pge-quick-view-description {
    margin: 20px 0;
    color: #666;
    line-height: 1.6;
}

.pge-quick-view-actions {
    margin-top: 25px;
}

.pge-quick-view-actions .cart {
    display: flex;
    gap: 10px;
    align-items: center;
}

.pge-quick-view-actions .quantity {
    margin-right: 10px;
}

.pge-quick-view-actions .single_add_to_cart_button {
    padding: 12px 25px;
    background: #0073aa;
    color: #fff;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 16px;
    transition: background 0.3s ease;
}

.pge-quick-view-actions .single_add_to_cart_button:hover {
    background: #005a87;
}

/* Responsive Quick View */
@media (max-width: 768px) {
    .pge-modal-container {
        margin: 20px;
        max-height: 95vh;
    }
    
    .pge-modal-content {
        padding: 20px;
    }
    
    .pge-quick-view-content {
        flex-direction: column;
        gap: 20px;
    }
    
    .pge-quick-view-image {
        flex: none;
    }
    
    .pge-quick-view-actions .cart {
        flex-direction: column;
        align-items: stretch;
    }
    
    .pge-quick-view-actions .quantity {
        margin-right: 0;
        margin-bottom: 10px;
    }
}

/* Enhanced Animations */
@keyframes pge-fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.pge-product-card {
    animation: pge-fadeInUp 0.6s ease forwards;
}

.pge-product-item:nth-child(1) .pge-product-card { animation-delay: 0.1s; }
.pge-product-item:nth-child(2) .pge-product-card { animation-delay: 0.2s; }
.pge-product-item:nth-child(3) .pge-product-card { animation-delay: 0.3s; }
.pge-product-item:nth-child(4) .pge-product-card { animation-delay: 0.4s; }
.pge-product-item:nth-child(5) .pge-product-card { animation-delay: 0.5s; }
.pge-product-item:nth-child(6) .pge-product-card { animation-delay: 0.6s; }

/* Wishlist and Compare Counters */
.pge-wishlist-counter,
.pge-compare-counter {
    position: fixed;
    top: 100px;
    right: 20px;
    background: #333;
    color: #fff;
    padding: 10px 15px;
    border-radius: 25px;
    font-size: 14px;
    z-index: 1000;
    display: none;
}

.pge-wishlist-counter.has-items,
.pge-compare-counter.has-items {
    display: block;
}

.pge-compare-counter {
    top: 150px;
    background: #f39c12;
}