/* ============================================
   MODERN QUICK VIEW - DESIGN 2025-2026
   Glassmorphism + Smooth Animations
   ============================================ */

/* ===== QUICK VIEW BUTTON ===== */
.js-element-popup {
    cursor: pointer;
    position: absolute;
    right: 0;
    top: 170px;
    left: 0;
    width: 170px;
    margin: auto;
    display: none;
    padding: 14px 20px;
    z-index: 999;
    
    /* Glassmorphism button */
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    color: #1a1a2e;
    font-weight: 600;
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    text-align: center;
    
    /* Modern rounded */
    border-radius: 50px;
    border: 1px solid rgba(255, 255, 255, 0.3);
    
    /* Soft shadow */
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.12);
    
    /* Smooth transitions */
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    transform: translateY(15px);
    opacity: 0;
}

.js-element-popup::before {
    content: "\f06e";
    font-family: "FontAwesome";
    margin-right: 10px;
    font-size: 14px;
    opacity: 0.8;
}

.products.products_list .js-element-popup {
    right: auto;
    left: 45px; 
    top: 105px;
}

.js-element-popup:hover {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #fff;
    box-shadow: 0 12px 40px rgba(102, 126, 234, 0.4);
    transform: translateY(-3px) scale(1.02);
    border-color: transparent;
}

.js-element-popup:active {
    transform: translateY(0) scale(0.98);
}

@media (min-width: 1200px) {
    .js-element:hover .js-element-popup {
        display: block;
        opacity: 1;
        transform: translateY(0);
        animation: slideUp 0.4s cubic-bezier(0.4, 0, 0.2, 1) forwards;
    }
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(15px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ============================================
   FANCYBOX POPUP - MODERN 2025 REDESIGN
   ============================================ */

/* Dark overlay with blur */
.fancybox-overlay {
    background: rgba(15, 15, 35, 0.85) !important;
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
}

/* Main popup container */
.fancybox-wrap {
    animation: popupFadeIn 0.5s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

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

/* Popup skin - glassmorphism card */
.fancybox-skin {
    background: rgba(255, 255, 255, 0.98) !important;
    border: none !important;
    border-radius: 24px !important;
    box-shadow: 
        0 25px 80px rgba(0, 0, 0, 0.25),
        0 10px 30px rgba(0, 0, 0, 0.1),
        inset 0 1px 0 rgba(255, 255, 255, 0.8) !important;
    overflow: hidden;
}

.fancybox-inner {
    border-radius: 24px !important;
    overflow: hidden !important;
}

/* Modern close button */
.fancybox-close {
    width: 44px !important;
    height: 44px !important;
    top: 16px !important;
    right: 16px !important;
    background: rgba(0, 0, 0, 0.06) !important;
    border-radius: 50% !important;
    transition: all 0.3s ease !important;
    opacity: 1 !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
}

.fancybox-close::before {
    content: "\f00d";
    font-family: "FontAwesome";
    font-size: 18px;
    color: #333;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
}

.fancybox-close:hover {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%) !important;
    transform: rotate(90deg) scale(1.1);
}

.fancybox-close:hover::before {
    color: #fff;
}

/* Navigation arrows - modern style */
.fancybox-nav {
    width: 60px !important;
}

.fancybox-nav span {
    visibility: visible !important;
    width: 50px !important;
    height: 50px !important;
    background: rgba(255, 255, 255, 0.95) !important;
    border-radius: 50% !important;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15) !important;
    transition: all 0.3s ease !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
}

.fancybox-prev span {
    left: -70px !important;
    background-position: unset !important;
}

.fancybox-next span {
    right: -70px !important;
    background-position: unset !important;
}

.fancybox-prev span::before,
.fancybox-next span::before {
    font-family: "FontAwesome";
    font-size: 20px;
    color: #333;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
}

.fancybox-prev span::before {
    content: "\f104";
}

.fancybox-next span::before {
    content: "\f105";
}

.fancybox-nav:hover span {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%) !important;
    transform: scale(1.15);
    box-shadow: 0 8px 30px rgba(102, 126, 234, 0.4) !important;
}

.fancybox-nav:hover span::before {
    color: #fff;
}

/* Loading spinner */
#fancybox-loading {
    background: transparent !important;
}

#fancybox-loading div {
    width: 50px !important;
    height: 50px !important;
    border: 3px solid rgba(102, 126, 234, 0.2) !important;
    border-top-color: #667eea !important;
    border-radius: 50% !important;
    animation: spin 0.8s linear infinite !important;
    background: none !important;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* ===== POPUP CONTENT STYLES ===== */
.fancybox-wrap .js-detail {
    padding: 30px;
}

/* Product title in popup */
.fancybox-wrap .js-detail .product-description__title {
    font-size: 26px;
    font-weight: 700;
    color: #1a1a2e;
    margin-bottom: 15px;
    line-height: 1.3;
}

/* Price styling */
.fancybox-wrap .js-detail .prices__val {
    font-size: 32px !important;
    font-weight: 700;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.fancybox-wrap .js-detail .prices__val.prices__val_cool {
    font-size: 38px !important;
}

.fancybox-wrap .js-detail .prices__val_old {
    color: #999 !important;
    font-size: 18px !important;
    text-decoration: line-through;
}

/* Add to cart button in popup */
.fancybox-wrap .js-detail .btn2,
.fancybox-wrap .js-detail .product-buyblock__addcart .btn {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%) !important;
    border: none !important;
    color: #fff !important;
    padding: 15px 35px !important;
    border-radius: 50px !important;
    font-weight: 600 !important;
    font-size: 14px !important;
    text-transform: uppercase !important;
    letter-spacing: 1px !important;
    transition: all 0.3s ease !important;
    box-shadow: 0 8px 25px rgba(102, 126, 234, 0.35) !important;
}

.fancybox-wrap .js-detail .btn2:hover,
.fancybox-wrap .js-detail .product-buyblock__addcart .btn:hover {
    transform: translateY(-3px) !important;
    box-shadow: 0 12px 35px rgba(102, 126, 234, 0.5) !important;
}

/* Quantity selector styling */
.fancybox-wrap .js-detail .counter {
    border-radius: 12px !important;
    overflow: hidden;
    border: 2px solid #eee !important;
}

.fancybox-wrap .js-detail .counter__btn {
    background: #f8f9fa !important;
    border: none !important;
    width: 40px !important;
    height: 40px !important;
    transition: all 0.2s ease !important;
}

.fancybox-wrap .js-detail .counter__btn:hover {
    background: #667eea !important;
    color: #fff !important;
}

/* Size/color selectors */
.fancybox-wrap .js-detail .razmers__item,
.fancybox-wrap .js-detail .colors__item {
    border-radius: 10px !important;
    transition: all 0.3s ease !important;
}

.fancybox-wrap .js-detail .razmers__item:hover,
.fancybox-wrap .js-detail .colors__item:hover {
    transform: scale(1.05);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.fancybox-wrap .js-detail .razmers__item.active {
    border-color: #667eea !important;
    box-shadow: 0 0 0 2px rgba(102, 126, 234, 0.3) !important;
}

/* Hide unnecessary elements */
.fancybox-wrap .js-detail .product-box,
.fancybox-wrap .js-detail .product-announce,
.fancybox-wrap .js-detail .nav-tabs,
.fancybox-wrap .js-detail .product-social,
.fancybox-wrap .js-detail .product-delivery,
.fancybox-wrap .js-detail .product-east,
.fancybox-wrap .js-detail .product-buyblock__buy1click,
.fancybox-wrap .js-detail .product-detail-carousel__bottom {
    display: none;
}

.fancybox-wrap .js-detail .product-description .products__prices {
    padding-top: 0;
}

.fancybox-wrap .js-detail .product-buyblock {
    max-width: 330px;
    margin-left: 10px;
}

.fancybox-wrap .js-detail .product-buyblock__addcart {
    float: left;
    max-width: 210px;
    margin-top: 13px;
}

.fancybox-wrap .js-detail .dropdown-menu {
    top: auto;
    bottom: 100%;
    margin-bottom: 2px;
    border-radius: 12px !important;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.15) !important;
}

.fancybox-wrap .js-detail .characteristics-list__item {
    line-height: 10px;
}

.fancybox-wrap .js-detail .razmers {
    padding: 0 0 10px 10px;
}

.fancybox-wrap .js-detail .tabs {
    margin-top: 0;
}

.fancybox-wrap .js-detail .prices__values {
    margin-top: -10px;
    line-height: 25px;
}

.fancybox-wrap .js-detail .prices__title {
    display: none;
}

/* Image gallery in popup */
.fancybox-wrap .js-detail .product-detail-carousel {
    border-radius: 16px;
    overflow: hidden;
}

.fancybox-wrap .js-detail .product-detail-carousel img {
    border-radius: 16px;
}

/* Scrollbar styling */
.fancybox-inner::-webkit-scrollbar {
    width: 6px;
}

.fancybox-inner::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 3px;
}

.fancybox-inner::-webkit-scrollbar-thumb {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 3px;
}

/* ===== POPUP NAVIGATION ARROWS (old style backup) ===== */
.js-popup-prev:before,
.js-popup-next:before {
    font-family: "FontAwesome";
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    color: #fff;
    font-size: 60px;
    z-index: 999;
    text-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
    transition: all 0.3s ease;
}

.js-popup-prev:hover:before,
.js-popup-next:hover:before {
    transform: translateY(-50%) scale(1.2);
}

.js-popup-prev:before {
    content: "\f104";
    left: -80px;
}

.js-popup-next:before {
    content: "\f105";
    right: -80px;
}

/* ===== MOBILE RESPONSIVE ===== */
@media (max-width: 768px) {
    .fancybox-skin {
        border-radius: 20px !important;
    }
    
    .fancybox-close {
        width: 38px !important;
        height: 38px !important;
        top: 12px !important;
        right: 12px !important;
    }
    
    .fancybox-nav span {
        width: 40px !important;
        height: 40px !important;
    }
    
    .fancybox-prev span {
        left: -50px !important;
    }
    
    .fancybox-next span {
        right: -50px !important;
    }
}
