/**
 * Product Behavior Swap v3.0 - Enhanced Styles
 * Comprehensive navigation prevention and visual feedback
 */

/* ==========================================================================
   Navigation Blocking (Backend Only - No Visual Indicators)
   ========================================================================== */

/* Navigation blocking is handled purely in JavaScript without visual indicators
   to avoid interfering with user experience while maintaining functionality */

/* ==========================================================================
   Enhanced Behavior Swapped Styles v3.0
   ========================================================================== */

.behavior-swapped-v3 {
    position: relative;
}

.behavior-swapped-v3 .product-link {
    cursor: zoom-in !important;
    position: relative;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    border-radius: 8px;
    overflow: hidden;
}

.behavior-swapped-v3 .product-link:hover {
    transform: scale(1.03);
    box-shadow: 0 8px 30px rgba(0,0,0,0.15);
}

.behavior-swapped-v3 .product-link::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(0, 123, 255, 0.1) 0%, rgba(0, 123, 255, 0.05) 100%);
    opacity: 0;
    transition: opacity 0.3s ease;
    pointer-events: none;
    border-radius: inherit;
    z-index: 1;
}

.behavior-swapped-v3 .product-link:hover::before {
    opacity: 1;
}

/* Enhanced hover hint */
.behavior-swapped-v3 .product-link::after {
    content: "👁️ Quick View";
    position: absolute;
    top: 12px;
    left: 12px;
    background: rgba(0, 0, 0, 0.9);
    color: white;
    padding: 10px 16px;
    border-radius: 10px;
    font-size: 13px;
    font-weight: 600;
    opacity: 0;
    transition: all 0.3s ease;
    pointer-events: none;
    z-index: 10;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.4);
    backdrop-filter: blur(8px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    transform: translateY(-5px);
}

.behavior-swapped-v3 .product-link:hover::after {
    opacity: 1;
    transform: translateY(0);
}

/* Product title enhancements */
.behavior-swapped-v3 .product-name,
.behavior-swapped-v3 .product-name a {
    cursor: zoom-in !important;
    transition: all 0.3s ease;
    position: relative;
    display: inline-block;
}

.behavior-swapped-v3 .product-name:hover,
.behavior-swapped-v3 .product-name a:hover {
    color: #0073aa !important;
    transform: translateX(3px);
}

/* Product title hover hint */
.behavior-swapped-v3 .product-name::after,
.behavior-swapped-v3 .product-name a::after {
    content: "👁️ Quick View";
    position: absolute;
    top: -35px;
    left: 50%;
    transform: translateX(-50%) translateY(-5px);
    background: rgba(0, 0, 0, 0.9);
    color: white;
    padding: 8px 14px;
    border-radius: 8px;
    font-size: 12px;
    font-weight: 600;
    opacity: 0;
    transition: all 0.3s ease;
    pointer-events: none;
    z-index: 10;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.4);
    backdrop-filter: blur(6px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    white-space: nowrap;
}

.behavior-swapped-v3 .product-name:hover::after,
.behavior-swapped-v3 .product-name a:hover::after {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
}

/* Ensure product title links don't show default browser tooltip */
.behavior-swapped-v3 .product-name a:hover {
    text-decoration: none !important;
}

/* Quick view button enhancements */
.behavior-swapped-v3 .ninetheme-quickview-btn {
    cursor: pointer !important;
    transition: all 0.3s ease;
    position: relative;
}

.behavior-swapped-v3 .ninetheme-quickview-btn:hover {
    transform: scale(1.08);
    background-color: rgba(34, 197, 94, 0.15);
    border-color: #22c55e;
}

.behavior-swapped-v3 .ninetheme-quickview-btn .ninetheme-hint {
    content: "View Product" !important;
}

.behavior-swapped-v3 .ninetheme-quickview-btn:hover::before {
    content: "🚀 Go to Product";
    position: absolute;
    top: -35px;
    left: 50%;
    transform: translateX(-50%);
    background: #22c55e;
    color: white;
    padding: 6px 12px;
    border-radius: 6px;
    font-size: 11px;
    font-weight: 600;
    white-space: nowrap;
    z-index: 1000;
    pointer-events: none;
}

/* ==========================================================================
   Enhanced Click Feedback
   ========================================================================== */

.click-feedback-v3 {
    pointer-events: none !important;
    z-index: 100001 !important;
    animation: clickPulse 0.6s ease-out;
}

@keyframes clickPulse {
    0% {
        transform: translate(-50%, -50%) scale(1);
        opacity: 1;
        box-shadow: 0 0 0 0 rgba(0, 123, 255, 0.7);
    }
    70% {
        transform: translate(-50%, -50%) scale(2.5);
        opacity: 0.3;
        box-shadow: 0 0 0 20px rgba(0, 123, 255, 0);
    }
    100% {
        transform: translate(-50%, -50%) scale(3);
        opacity: 0;
        box-shadow: 0 0 0 0 rgba(0, 123, 255, 0);
    }
}

/* ==========================================================================
   Enhanced Custom Quick View Modal v3.0
   ========================================================================== */

.custom-quick-view-overlay-v3 {
    backdrop-filter: blur(8px);
    animation: fadeInV3 0.3s ease-out;
}

.custom-quick-view-modal-v3 {
    animation: slideUpV3 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
    box-shadow: 0 25px 80px rgba(0,0,0,0.3);
    border: 1px solid rgba(255,255,255,0.1);
}

.custom-quick-view-modal-v3::-webkit-scrollbar {
    width: 8px;
}

.custom-quick-view-modal-v3::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 4px;
}

.custom-quick-view-modal-v3::-webkit-scrollbar-thumb {
    background: #ccc;
    border-radius: 4px;
}

.custom-quick-view-modal-v3::-webkit-scrollbar-thumb:hover {
    background: #aaa;
}

@keyframes fadeInV3 {
    from {
        opacity: 0;
        backdrop-filter: blur(0px);
    }
    to {
        opacity: 1;
        backdrop-filter: blur(8px);
    }
}

@keyframes slideUpV3 {
    from {
        transform: translateY(50px) scale(0.9);
        opacity: 0;
    }
    to {
        transform: translateY(0) scale(1);
        opacity: 1;
    }
}

/* Custom quick view content styling */
.custom-quick-view-overlay-v3 .product-image {
    max-width: 100%;
    height: auto;
    margin: 0 auto 30px;
    border-radius: 12px;
    box-shadow: 0 8px 25px rgba(0,0,0,0.1);
}

.custom-quick-view-overlay-v3 h2 {
    margin-bottom: 20px;
    color: #1a1a1a;
    font-size: 28px;
    line-height: 1.3;
    font-weight: 700;
}

.custom-quick-view-overlay-v3 .product-price {
    margin-bottom: 25px;
    font-size: 24px;
    font-weight: 700;
    color: #22c55e;
}

.custom-quick-view-overlay-v3 .product-description {
    margin-bottom: 25px;
    text-align: left;
    color: #4a4a4a;
    line-height: 1.7;
    font-size: 16px;
}

.custom-quick-view-overlay-v3 .product-meta {
    margin-bottom: 30px;
    text-align: left;
    background: #f8f9fa;
    padding: 20px;
    border-radius: 10px;
    border-left: 4px solid #0073aa;
}

.custom-quick-view-overlay-v3 .product-meta p {
    margin: 8px 0;
    font-size: 14px;
    color: #555;
}

.custom-quick-view-overlay-v3 .product-meta strong {
    color: #1a1a1a;
    font-weight: 600;
}

.custom-quick-view-overlay-v3 .button {
    display: inline-block;
    background: linear-gradient(135deg, #0073aa 0%, #005a87 100%);
    color: white;
    padding: 15px 35px;
    text-decoration: none;
    border-radius: 10px;
    font-weight: 600;
    font-size: 16px;
    transition: all 0.3s ease;
    border: none;
    cursor: pointer;
    box-shadow: 0 4px 15px rgba(0, 115, 170, 0.3);
}

.custom-quick-view-overlay-v3 .button:hover {
    background: linear-gradient(135deg, #005a87 0%, #004d6f 100%);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 115, 170, 0.4);
}

/* ==========================================================================
   Error Messages (Console Only)
   ========================================================================== */

/* Error messages are now only logged to console - no visual popups
   to avoid interfering with user experience while maintaining debugging */

/* ==========================================================================
   Debug Mode Enhancements
   ========================================================================== */

/* Debug borders for product elements */
.debug-mode .product-inner.type-11 {
    border: 3px solid #ff6b6b !important;
    box-shadow: 0 0 15px rgba(255, 107, 107, 0.3) !important;
    position: relative;
}

.debug-mode .product-inner.type-11::before {
    content: "DEBUG: Type 11 Product";
    position: absolute;
    top: -25px;
    left: 0;
    background: #ff6b6b;
    color: white;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 10px;
    font-weight: 600;
    z-index: 1000;
}

/* Event logging indicators */
.event-logged {
    position: relative;
}

.event-logged::after {
    content: "📡 Event Logged";
    position: absolute;
    top: -30px;
    right: 0;
    background: #17a2b8;
    color: white;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 10px;
    z-index: 10000;
    animation: fadeOut 2s forwards;
}

@keyframes fadeOut {
    0% { opacity: 1; }
    70% { opacity: 1; }
    100% { opacity: 0; }
}

/* ==========================================================================
   Mobile Responsive Enhancements
   ========================================================================== */

@media (max-width: 768px) {
    .behavior-swapped-v3 .product-link::after {
        font-size: 11px;
        padding: 8px 12px;
        top: 8px;
        left: 8px;
    }

    .behavior-swapped-v3 .product-link:hover {
        transform: none; /* Remove zoom effect on mobile */
    }

    /* Product title mobile adjustments */
    .behavior-swapped-v3 .product-name::after,
    .behavior-swapped-v3 .product-name a::after {
        font-size: 10px;
        padding: 6px 10px;
        top: -30px;
    }

    .behavior-swapped-v3 .product-name:hover,
    .behavior-swapped-v3 .product-name a:hover {
        transform: none; /* Remove slide effect on mobile */
    }

    .custom-quick-view-modal-v3 {
        margin: 10px;
        max-height: calc(100vh - 20px);
        padding: 20px;
    }

    .custom-quick-view-overlay-v3 h2 {
        font-size: 22px;
    }

    .custom-quick-view-overlay-v3 .product-price {
        font-size: 20px;
    }

    .click-feedback-v3 {
        max-width: 60px;
        max-height: 60px;
    }
}

@media (max-width: 480px) {
    .behavior-swapped-v3 .product-link::after {
        font-size: 10px;
        padding: 6px 10px;
    }

    .custom-quick-view-modal-v3 {
        margin: 5px;
        padding: 15px;
    }

    .custom-quick-view-overlay-v3 h2 {
        font-size: 20px;
    }
}

/* ==========================================================================
   Accessibility Enhancements
   ========================================================================== */

/* High contrast mode support */
@media (prefers-contrast: high) {
    .behavior-swapped-v3 .product-link::after {
        background: #000;
        color: #fff;
        border: 2px solid #fff;
    }

    .custom-quick-view-overlay-v3 {
        background: rgba(0, 0, 0, 0.95);
    }

    .custom-quick-view-modal-v3 {
        border: 2px solid #fff;
    }
}

/* Reduced motion support */
@media (prefers-reduced-motion: reduce) {
    .behavior-swapped-v3 .product-link,
    .behavior-swapped-v3 .product-link::before,
    .behavior-swapped-v3 .product-link::after,
    .behavior-swapped-v3 .ninetheme-quickview-btn,
    .click-feedback-v3,
    .custom-quick-view-overlay-v3,
    .custom-quick-view-modal-v3 {
        transition: none !important;
        animation: none !important;
    }

    .behavior-swapped-v3 .product-link:hover {
        transform: none;
    }
}

/* Focus indicators for keyboard navigation */
.behavior-swapped-v3 .product-link:focus,
.behavior-swapped-v3 .ninetheme-quickview-btn:focus {
    outline: 3px solid #0073aa;
    outline-offset: 2px;
    border-radius: 4px;
}

/* Print styles */
@media print {
    .behavior-swapped-v3 .product-link::after,
    .behavior-swapped-v3 .ninetheme-quickview-btn,
    .custom-quick-view-overlay-v3 {
        display: none !important;
    }
}