/**
 * Storex Theme - YITH Quick View Integration Styles
 * Custom styles for YITH WooCommerce Quick View plugin
 */

/* Quick View Button Styles */
.storex-quick-view-wrapper {
    margin-top: 10px;
    text-align: center;
}

.storex-quick-view-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 20px;
    background: linear-gradient(135deg, #007cba 0%, #005a87 100%);
    color: white;
    text-decoration: none;
    border-radius: 25px;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.3s ease;
    border: none;
    cursor: pointer;
    position: relative;
    overflow: hidden;
}

.storex-quick-view-btn::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;
}

.storex-quick-view-btn:hover::before {
    left: 100%;
}

.storex-quick-view-btn:hover {
    background: linear-gradient(135deg, #005a87 0%, #003d5c 100%);
    color: white;
    text-decoration: none;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0, 124, 186, 0.4);
}

.storex-quick-view-btn:active {
    transform: translateY(0);
}

.storex-quick-view-btn i {
    font-size: 16px;
}

/* Loading State */
.storex-quick-view-btn.loading {
    opacity: 0.7;
    pointer-events: none;
}

.storex-quick-view-btn.loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 16px;
    height: 16px;
    margin: -8px 0 0 -8px;
    border: 2px solid rgba(255,255,255,0.3);
    border-top: 2px solid white;
    border-radius: 50%;
    animation: storex-spin 1s linear infinite;
}

/* Shortcode Button Styles */
.storex-quick-view-shortcode-wrapper {
    display: inline-block;
    margin: 10px 0;
}

.storex-quick-view-shortcode-btn {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 12px 24px;
    background: linear-gradient(135deg, #28a745 0%, #1e7e34 100%);
    color: white;
    text-decoration: none;
    border-radius: 30px;
    font-size: 16px;
    font-weight: 600;
    transition: all 0.3s ease;
    border: none;
    cursor: pointer;
    position: relative;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(40, 167, 69, 0.3);
}

.storex-quick-view-shortcode-btn::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;
}

.storex-quick-view-shortcode-btn:hover::before {
    left: 100%;
}

.storex-quick-view-shortcode-btn:hover {
    background: linear-gradient(135deg, #1e7e34 0%, #155724 100%);
    color: white;
    text-decoration: none;
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(40, 167, 69, 0.5);
}

.storex-quick-view-shortcode-btn:active {
    transform: translateY(-1px);
}

/* Button Style Variations */
.storex-quick-view-shortcode-btn.storex-quick-view-primary {
    background: linear-gradient(135deg, #007cba 0%, #005a87 100%);
    box-shadow: 0 4px 15px rgba(0, 124, 186, 0.3);
}

.storex-quick-view-shortcode-btn.storex-quick-view-primary:hover {
    background: linear-gradient(135deg, #005a87 0%, #003d5c 100%);
    box-shadow: 0 8px 25px rgba(0, 124, 186, 0.5);
}

.storex-quick-view-shortcode-btn.storex-quick-view-secondary {
    background: linear-gradient(135deg, #6c757d 0%, #545b62 100%);
    box-shadow: 0 4px 15px rgba(108, 117, 125, 0.3);
}

.storex-quick-view-shortcode-btn.storex-quick-view-secondary:hover {
    background: linear-gradient(135deg, #545b62 0%, #3d4043 100%);
    box-shadow: 0 8px 25px rgba(108, 117, 125, 0.5);
}

/* Custom Modal Styles */
.storex-custom-modal .yith-wcqv-main {
    border-radius: 15px;
    box-shadow: 0 20px 60px rgba(0,0,0,0.3);
    border: 1px solid rgba(255,255,255,0.1);
    backdrop-filter: blur(10px);
}

.storex-custom-modal .yith-wcqv-overlay {
    background: rgba(0,0,0,0.7);
    backdrop-filter: blur(5px);
}

.storex-custom-modal .storex-custom-close {
    position: absolute;
    top: 20px;
    right: 20px;
    background: rgba(248, 249, 250, 0.9);
    border: none;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 1001;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
}

.storex-custom-modal .storex-custom-close:hover {
    background: rgba(233, 236, 239, 0.95);
    transform: scale(1.1) rotate(90deg);
    box-shadow: 0 5px 15px rgba(0,0,0,0.2);
}

.storex-custom-modal .storex-custom-close i {
    font-size: 16px;
    color: #6c757d;
    transition: color 0.3s ease;
}

.storex-custom-modal .storex-custom-close:hover i {
    color: #dc3545;
}

/* Quick View Content Styling */
.storex-quick-view-content {
    padding: 20px;
}

.storex-quick-view-content .product_title {
    color: #333;
    font-size: 24px;
    font-weight: 600;
    margin-bottom: 15px;
}

.storex-quick-view-content .price {
    font-size: 20px;
    font-weight: 700;
    color: #28a745;
    margin-bottom: 20px;
}

.storex-quick-view-content .woocommerce-product-rating {
    margin-bottom: 20px;
}

.storex-quick-view-content .woocommerce-product-details__short-description {
    margin-bottom: 20px;
    line-height: 1.6;
    color: #666;
}

.storex-quick-view-content .cart {
    margin-top: 20px;
}

.storex-quick-view-content .single_add_to_cart_button {
    background: linear-gradient(135deg, #28a745 0%, #1e7e34 100%);
    border: none;
    padding: 12px 30px;
    border-radius: 25px;
    font-weight: 600;
    transition: all 0.3s ease;
}

.storex-quick-view-content .single_add_to_cart_button:hover {
    background: linear-gradient(135deg, #1e7e34 0%, #155724 100%);
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(40, 167, 69, 0.4);
}

.storex-quick-view-content .single_add_to_cart_button.loading {
    opacity: 0.7;
    pointer-events: none;
    cursor: not-allowed;
    visibility: visible !important;
    display: inline-block !important;
}

.storex-quick-view-content .single_add_to_cart_button.success {
    background: linear-gradient(135deg, #28a745 0%, #1e7e34 100%);
    animation: storex-success-pulse 0.5s ease-out;
}

/* Quick View Notification Styles */
.quick-view-notification {
    position: fixed;
    top: 20px;
    right: 20px;
    padding: 15px 20px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 500;
    z-index: 10000;
    opacity: 0;
    transform: translateX(400px);
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
    max-width: 350px;
    word-wrap: break-word;
}

.quick-view-notification.show {
    opacity: 1;
    transform: translateX(0);
}

.quick-view-notification-success {
    background: linear-gradient(135deg, #28a745 0%, #1e7e34 100%);
    color: white;
    border-left: 4px solid #155724;
}

.quick-view-notification-error {
    background: linear-gradient(135deg, #dc3545 0%, #c82333 100%);
    color: white;
    border-left: 4px solid #bd2130;
}

.yith-wcqv-main .quick-view-notification {
    position: relative;
    top: auto;
    right: auto;
    margin-bottom: 15px;
    transform: translateY(-20px);
}

.yith-wcqv-main .quick-view-notification.show {
    transform: translateY(0);
}

@keyframes storex-success-pulse {
    0% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.05);
    }
    100% {
        transform: scale(1);
    }
}

/* Animation Keyframes */
@keyframes storex-spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

@keyframes storex-fadeIn {
    from {
        opacity: 0;
        transform: scale(0.9);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

.storex-custom-modal .yith-wcqv-main {
    animation: storex-fadeIn 0.3s ease-out;
}

/* Responsive Design */
@media (max-width: 768px) {
    .storex-quick-view-btn,
    .storex-quick-view-shortcode-btn {
        padding: 8px 16px;
        font-size: 14px;
    }
    
    .storex-quick-view-shortcode-btn {
        padding: 10px 20px;
        font-size: 15px;
    }
    
    .storex-custom-modal .storex-custom-close {
        top: 15px;
        right: 15px;
        width: 35px;
        height: 35px;
    }
    
    .storex-custom-modal .storex-custom-close i {
        font-size: 14px;
    }
    
    .storex-quick-view-content {
        padding: 15px;
    }
    
    .storex-quick-view-content .product_title {
        font-size: 20px;
    }
    
    .storex-quick-view-content .price {
        font-size: 18px;
    }
}

@media (max-width: 480px) {
    .storex-quick-view-btn {
        padding: 6px 12px;
        font-size: 12px;
    }
    
    .storex-quick-view-shortcode-btn {
        padding: 8px 16px;
        font-size: 14px;
    }
    
    .storex-quick-view-content .product_title {
        font-size: 18px;
    }
    
    .storex-quick-view-content .price {
        font-size: 16px;
    }
}

/* Integration with Theme Colors */
.theme-color-primary .storex-quick-view-btn {
    background: linear-gradient(135deg, var(--primary-color, #007cba) 0%, var(--primary-dark, #005a87) 100%);
}

.theme-color-primary .storex-quick-view-btn:hover {
    background: linear-gradient(135deg, var(--primary-dark, #005a87) 0%, var(--primary-darker, #003d5c) 100%);
}

/* Dark Mode Support */
@media (prefers-color-scheme: dark) {
    .storex-quick-view-content .product_title {
        color: #fff;
    }
    
    .storex-quick-view-content .woocommerce-product-details__short-description {
        color: #ccc;
    }
    
    .storex-custom-modal .storex-custom-close {
        background: rgba(33, 37, 41, 0.9);
    }
    
    .storex-custom-modal .storex-custom-close:hover {
        background: rgba(52, 58, 64, 0.95);
    }
    
    .storex-custom-modal .storex-custom-close i {
        color: #adb5bd;
    }
}
