/**
 * PhotoSwipe Navigation Arrows Fix
 * Forces navigation arrows to be visible on all devices
 */

/* Force ALL PhotoSwipe arrows to be visible - both original and custom */
.pswp__button--arrow--left,
.pswp__button--arrow--right,
.pswp .pswp__button--arrow--left,
.pswp .pswp__button--arrow--right,
button.pswp__button--arrow--left,
button.pswp__button--arrow--right {
    display: flex !important;
    visibility: visible !important;
    opacity: 0.75 !important;
    position: absolute !important;
    width: 50px !important;
    height: 50px !important;
    background: rgba(255, 255, 255, 0.1) !important;
    border: 1px solid rgba(255, 255, 255, 0.3) !important;
    border-radius: 50% !important;
    cursor: pointer !important;
    z-index: 9999 !important;
    transition: all 0.3s ease !important;
    align-items: center !important;
    justify-content: center !important;
}

/* Force arrows to show on touch devices */
.pswp--touch .pswp__button--arrow--left,
.pswp--touch .pswp__button--arrow--right,
.pswp--touch button.pswp__button--arrow--left,
.pswp--touch button.pswp__button--arrow--right {
    visibility: visible !important;
    display: flex !important;
}

/* Add simple arrow symbols using ::after */
.pswp__button--arrow--left::after {
    content: "<" !important;
    display: block !important;
    font-size: 24px !important;
    color: white !important;
    font-weight: normal !important;
    line-height: 1 !important;
}

.pswp__button--arrow--right::after {
    content: ">" !important;
    display: block !important;
    font-size: 24px !important;
    color: white !important;
    font-weight: normal !important;
    line-height: 1 !important;
}

/* Hide all other arrow elements to prevent duplicates */
.pswp__button--arrow--left i,
.pswp__button--arrow--right i,
.pswp__button--arrow--left svg,
.pswp__button--arrow--right svg,
.pswp__button--arrow--left::before,
.pswp__button--arrow--right::before {
    display: none !important;
}

/* Hover effects */
.pswp__button--arrow--left:hover,
.pswp__button--arrow--right:hover {
    opacity: 1 !important;
    background: rgba(255, 255, 255, 0.2) !important;
    border-color: rgba(255, 255, 255, 0.5) !important;
}

/* Position arrows */
.pswp__button--arrow--left {
    left: 30px !important;
    top: 50% !important;
    transform: translateY(-50%) !important;
    margin-top: 0 !important;
}

.pswp__button--arrow--right {
    right: 30px !important;
    top: 50% !important;
    transform: translateY(-50%) !important;
    margin-top: 0 !important;
}

/* Mobile adjustments */
@media (max-width: 768px) {
    .pswp__button--arrow--left,
    .pswp__button--arrow--right {
        width: 45px !important;
        height: 45px !important;
    }
    
    .pswp__button--arrow--left::after,
    .pswp__button--arrow--right::after {
        font-size: 25px !important;
    }
    
    .pswp__button--arrow--left {
        left: 15px !important;
    }
    
    .pswp__button--arrow--right {
        right: 15px !important;
    }
}

/* PhotoSwipe background transparency fix */
.pswp__bg {
    background-color: rgba(0, 0, 0, 0.8) !important;
    backdrop-filter: blur(10px) !important;
    -webkit-backdrop-filter: blur(10px) !important;
}

/* JetWoo PhotoSwipe background */
.jet-woo-product-gallery-pswp .pswp__bg {
    background-color: rgba(0, 0, 0, 0.8) !important;
    backdrop-filter: blur(10px) !important;
    -webkit-backdrop-filter: blur(10px) !important;
}

/* Fix PhotoSwipe animation - unified smooth transitions */
.pswp__container {
    transition: none !important; /* Remove conflicting transitions */
}

.pswp__container,
.pswp__item,
.pswp__img {
    -webkit-backface-visibility: hidden !important;
    backface-visibility: hidden !important;
    transform: translate3d(0, 0, 0) !important;
}

/* Smooth slide transitions */
.pswp__container {
    -webkit-transition: -webkit-transform 333ms cubic-bezier(0.4, 0, 0.22, 1) !important;
    transition: transform 333ms cubic-bezier(0.4, 0, 0.22, 1) !important;
}

/* Image fade transitions */
.pswp__item {
    opacity: 1 !important;
}

.pswp__img {
    -webkit-transition: opacity 0.15s ease !important;
    transition: opacity 0.15s ease !important;
    opacity: 1 !important;
}

.pswp__item--loading .pswp__img {
    opacity: 0.3 !important;
}

/* Prevent animation jank */
.pswp--animate_opacity,
.pswp__bg,
.pswp__caption,
.pswp__top-bar,
.pswp--has_mouse .pswp__button--arrow--left,
.pswp--has_mouse .pswp__button--arrow--right {
    -webkit-transition: opacity 333ms cubic-bezier(0.4, 0, 0.22, 1) !important;
    transition: opacity 333ms cubic-bezier(0.4, 0, 0.22, 1) !important;
}

/* Smooth backdrop */
.pswp__bg {
    transition: opacity 400ms ease !important;
}

/* Optimize arrow responsiveness */
.pswp__button--arrow--left,
.pswp__button--arrow--right {
    transition: opacity 200ms ease, background 200ms ease !important;
    pointer-events: auto !important;
}

/* Hardware acceleration for container */
.pswp__container {
    transform-style: preserve-3d !important;
    -webkit-transform-style: preserve-3d !important;
}

/* Prevent text selection during swipe */
.pswp--dragging * {
    user-select: none !important;
    -webkit-user-select: none !important;
}

/* PhotoSwipe fallback (keep existing PhotoSwipe styles as backup) */
.pswp .pswp__ui .pswp__button--arrow--left,
.pswp .pswp__ui .pswp__button--arrow--right,
.pswp--touch .pswp__ui .pswp__button--arrow--left,
.pswp--touch .pswp__ui .pswp__button--arrow--right {
    visibility: visible !important;
    display: block !important;
    opacity: 0.8 !important;
    position: absolute !important;
    width: 44px !important;
    height: 44px !important;
    background: none !important;
    border: none !important;
    cursor: pointer !important;
    z-index: 1500 !important;
}