/* ==========================================================================
   Product Featured Video - Frontend Styles
   ========================================================================== */

/* Video Container */
.pfv-video-container {
    position: relative;
    width: 100%;
    max-width: 100%;
    overflow: hidden;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

/* Lightbox trigger should be clickable */
.pfv-video-container.pfv-lightbox-trigger {
    cursor: pointer;
}

/* Video without controls (but not autoplay) */
.pfv-video-container .pfv-video-element:not([controls]):not([autoplay]) {
    cursor: pointer;
}

/* Video without controls - show fullscreen hint on hover */
.pfv-video-container .pfv-video-element:not([controls]):not([autoplay]):hover::after {
    content: "Double-click for fullscreen";
    position: absolute;
    bottom: 10px;
    right: 10px;
    background: rgba(0, 0, 0, 0.7);
    color: white;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 12px;
    pointer-events: none;
    z-index: 10;
}

/* Disable double-click fullscreen when fullscreen is disabled */
.pfv-fullscreen-disabled {
    position: relative;
}

.pfv-fullscreen-disabled::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 9999;
    pointer-events: auto;
    background: transparent;
    cursor: default;
}

/* Video with fullscreen capability */
.pfv-video-container .pfv-video-element[allowfullscreen],
.pfv-video-container .pfv-video-element[webkitallowfullscreen],
.pfv-video-container .pfv-video-element[mozallowfullscreen] {
    transition: transform 0.2s ease;
}

.pfv-video-container .pfv-video-element[allowfullscreen]:hover,
.pfv-video-container .pfv-video-element[webkitallowfullscreen]:hover,
.pfv-video-container .pfv-video-element[mozallowfullscreen]:hover {
    transform: scale(1.02);
}

.pfv-video-container iframe,
.pfv-video-container video {
    width: 100%;
    height: auto;
}

/* Inline video styling - maintain same card size as featured images */
.pfv-inline-video {
    position: relative;
    width: 100%;
    height: auto; /* Let height be determined by aspect ratio */
    background: #000;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    aspect-ratio: 1 / 1; /* Maintain square aspect ratio like product images */
}

.pfv-inline-video .pfv-video-element {
    width: 100%;
    height: 100%;
    display: block;
    object-fit: cover;
    object-position: center;
}

.pfv-inline-video .pfv-video-iframe {
    width: 100%;
    height: 100%;
    display: block;
    border: none;
}

/* Ensure all video containers maintain same size as product images */
.pfv-video-container {
    position: relative;
    width: 100%;
    height: auto; /* Let height be determined by aspect ratio */
    background: #000;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    aspect-ratio: 1 / 1; /* Maintain square aspect ratio like product images */
}

.pfv-video-container video,
.pfv-video-container .pfv-video-element {
    width: 100%;
    height: 100%;
    display: block;
    object-fit: cover;
    object-position: center;
    min-height: 200px;
}

/* Hide WooCommerce product images when video replaces them */
.wc-block-components-product-image:has(.pfv-replace-image) img:not(.pfv-video-thumbnail):not(.pfv-video-element),
.wc-block-components-product-image:has(.pfv-replace-image) .wc-block-components-product-image__inner-container,
.wc-block-components-product-image:has(.pfv-shop-video-thumbnail.pfv-replace-image) img:not(.pfv-video-thumbnail):not(.pfv-video-element),
.wc-block-components-product-image:has(.pfv-shop-video-thumbnail.pfv-replace-image) .wc-block-components-product-image__inner-container {
    display: none !important;
    visibility: hidden !important;
    opacity: 0 !important;
    height: 0 !important;
    width: 0 !important;
    overflow: hidden !important;
    position: absolute !important;
}

/* Fallback for browsers without :has() support */
.pfv-replace-image ~ img:not(.pfv-video-thumbnail):not(.pfv-video-element),
.pfv-shop-video-thumbnail.pfv-replace-image ~ img:not(.pfv-video-thumbnail):not(.pfv-video-element),
.wc-block-components-product-image img:not(.pfv-video-thumbnail):not(.pfv-video-element):has(+ .pfv-replace-image) {
    display: none !important;
    visibility: hidden !important;
    opacity: 0 !important;
    height: 0 !important;
    width: 0 !important;
    overflow: hidden !important;
    position: absolute !important;
}

.pfv-video-container.pfv-replace-image {
    display: block !important;
    visibility: visible !important;
    opacity: 1 !important;
    width: 100% !important;
    height: 100% !important;
    position: relative !important;
    z-index: 1 !important;
}

.pfv-shop-video-thumbnail.pfv-replace-image {
    display: block !important;
    visibility: visible !important;
    opacity: 1 !important;
    width: 100% !important;
    height: 100% !important;
    position: relative !important;
    z-index: 1 !important;
}

.pfv-video-container.pfv-replace-image video,
.pfv-video-container.pfv-replace-image .pfv-video-element {
    display: block !important;
    visibility: visible !important;
    opacity: 1 !important;
    width: 100% !important;
    height: 100% !important;
    min-height: 200px !important;
    object-fit: cover !important;
    background: #000 !important;
    position: relative !important;
    z-index: 2 !important;
    /* Ensure video frame is visible, not poster */
    background-image: none !important;
}

/* Hide poster image if any */
.pfv-video-container.pfv-replace-image video::poster {
    display: none !important;
}

.pfv-video-container.pfv-replace-image iframe,
.pfv-video-container.pfv-replace-image .pfv-video-iframe {
    display: block !important;
    visibility: visible !important;
    opacity: 1 !important;
    width: 100% !important;
    height: 100% !important;
    min-height: 200px !important;
    border: none !important;
    position: relative !important;
    z-index: 2 !important;
}

/* Custom play button overlay for videos without controls */
.pfv-custom-play-button {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 10;
    cursor: pointer;
    width: 80px;
    height: 80px;
    background: rgba(0, 0, 0, 0.7);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    opacity: 1;
    visibility: visible;
}

.pfv-custom-play-button:hover {
    background: rgba(0, 0, 0, 0.9);
    transform: translate(-50%, -50%) scale(1.1);
}

.pfv-custom-play-button.hidden {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
}

.pfv-video-container.pfv-replace-image {
    position: relative;
}

/* Ensure product image link doesn't interfere */
.wc-block-components-product-image a:has(.pfv-replace-image) {
    display: block !important;
    width: 100% !important;
    height: 100% !important;
    position: relative !important;
}

/* Prevent product link navigation when clicking on video area */
/* Completely disable pointer events on link when it contains video */
.wc-block-components-product-image a:has(.pfv-replace-image) {
    pointer-events: none !important;
    cursor: default !important;
}

/* Re-enable pointer events only on video elements */
.wc-block-components-product-image a:has(.pfv-replace-image) .pfv-replace-image,
.wc-block-components-product-image a:has(.pfv-replace-image) .pfv-replace-image video,
.wc-block-components-product-image a:has(.pfv-replace-image) .pfv-replace-image iframe,
.wc-block-components-product-image a:has(.pfv-replace-image) .pfv-replace-image .pfv-video-container,
.wc-block-components-product-image a:has(.pfv-replace-image) .pfv-replace-image .pfv-custom-play-button {
    pointer-events: auto !important;
    cursor: pointer !important;
}

/* Fallback for browsers without :has() support */
.pfv-replace-image {
    pointer-events: auto !important;
}

.pfv-replace-image video,
.pfv-replace-image iframe,
.pfv-replace-image .pfv-video-container,
.pfv-replace-image .pfv-custom-play-button {
    pointer-events: auto !important;
    cursor: pointer !important;
}

/* Ensure videos without controls (but not autoplay) are visible */
.pfv-video-container .pfv-video-element:not([controls]):not([autoplay]) {
    background-color: #000;
    min-height: auto; /* Let aspect-ratio handle the sizing */
}

/* Video Button Styles */
.pfv-shop-video-button {
    margin: 10px 0;
    text-align: center;
}

.pfv-video-button {
    background-color: #0073aa;
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.3s ease;
    display: inline-block;
    text-decoration: none;
}

.pfv-video-button:hover {
    opacity: 0.9;
    transform: translateY(-1px);
}

/* Prevent hover video from triggering when hovering on Watch Video button */
/* When replace_image is disabled, button hover should not trigger image hover video */
.pfv-shop-video-button,
.pfv-video-button {
    pointer-events: auto !important;
}

/* Button hover is handled by JavaScript to prevent triggering image hover */

.pfv-video-button:active {
    transform: translateY(0);
}

/* Video Thumbnail */
.pfv-video-thumbnail {
    width: 100%;
    height: 100%;
    display: block;
    cursor: pointer;
    transition: opacity 0.3s ease;
    object-fit: cover;
    object-position: center;
}

.pfv-video-thumbnail:hover {
    opacity: 0.9;
}

/* Play Overlay */
.pfv-play-overlay {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: rgba(0, 0, 0, 0.7);
    border-radius: 50%;
    width: 80px;
    height: 80px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: background 0.3s ease, transform 0.2s ease;
    z-index: 3;
    pointer-events: auto;
}

.pfv-play-overlay:hover {
    background: rgba(0, 0, 0, 0.8);
    transform: translate(-50%, -50%) scale(1.05);
}

.pfv-play-icon {
    color: #fff;
    font-size: 24px;
    margin-left: 4px;
}

/* Lightbox */
.pfv-lightbox {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 9999;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 20px;
    box-sizing: border-box;
}

.pfv-lightbox.active {
    display: flex;
}

.pfv-lightbox-content {
    position: relative;
    height: auto;
    max-height: 90vh;
    border-radius: 8px;
    overflow: visible;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
    display: flex;
    flex-direction: column;
    margin: 0 auto;
}

.pfv-lightbox-close {
    position: absolute;
    top: -40px;
    right: 0;
    background: #fff;
    border: none;
    color: #000;
    font-size: 24px;
    line-height: 1;
    width: 40px;
    height: 40px;
    cursor: pointer;
    z-index: 10000;
    border-radius: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: opacity 0.3s ease, transform 0.2s ease;
    font-weight: 400;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

.pfv-lightbox-close:hover {
    opacity: 0.8;
    transform: scale(1.05);
}

.pfv-lightbox-content iframe,
.pfv-lightbox-content video {
    width: 100%;
    border: none;
    display: block;
}

/* Responsive video sizing */
.pfv-lightbox-content iframe {
    aspect-ratio: 16 / 9;
    height: auto;
    min-height: 450px;
    width: 100%;
    display: block;
}

.pfv-lightbox-content video {
    height: auto;
    max-height: 80vh;
    min-height: 450px;
    width: 100%;
    object-fit: contain;
    display: block;
}

/* Shop Page Styles */
.pfv-shop-video-thumbnail {
    position: relative;
    display: inline-block;
    width: 100%;
    cursor: pointer;
    overflow: hidden;
    border-radius: 4px;
    transition: transform 0.2s ease;
    aspect-ratio: 1 / 1; /* Ensure consistent square aspect ratio */
}

.pfv-shop-video-thumbnail:hover {
    transform: scale(1.02);
}

/* NEW: Image with Video Overlay Styles */
.pfv-shop-image-with-video {
    position: relative !important;
    display: inline-block;
    width: 100%;
    overflow: hidden;
    border-radius: 4px;
    transition: transform 0.2s ease;
    aspect-ratio: 1 / 1; /* Ensure consistent square aspect ratio */
    z-index: 1;
    background: transparent;
}

/* Ensure no white background shows when hover is disabled */
.pfv-shop-image-with-video[data-play-on-hover="no"] {
    background: transparent !important;
}

.pfv-shop-image-with-video[data-play-on-hover="no"]:hover {
    background: transparent !important;
}

.pfv-shop-image-with-video:hover {
    transform: scale(1.02);
}

/* Ensure parent link doesn't interfere */
.pfv-shop-image-with-video a,
.pfv-shop-image-with-video > a {
    position: relative;
    display: block;
    width: 100%;
    height: 100%;
    z-index: 1;
}

.pfv-hover-video-overlay {
    position: absolute !important;
    top: 0 !important;
    left: 0 !important;
    width: 100% !important;
    height: 100% !important;
    opacity: 0;
    transition: opacity 0.3s ease;
    pointer-events: none;
    z-index: 100 !important;
    background: #000;
    display: none !important;
    align-items: center;
    justify-content: center;
    visibility: hidden;
}

/* Only show overlay when hovering AND play-on-hover is enabled */
.pfv-shop-image-with-video[data-play-on-hover="yes"]:hover .pfv-hover-video-overlay,
.pfv-shop-image-with-video[data-play-on-hover="yes"].pfv-video-hovering .pfv-hover-video-overlay {
    opacity: 1 !important;
    visibility: visible !important;
    pointer-events: auto !important;
    z-index: 1000 !important;
    display: flex !important;
}

/* Ensure overlay is never visible when hover is disabled */
.pfv-shop-image-with-video[data-play-on-hover="no"] .pfv-hover-video-overlay,
.pfv-shop-image-with-video[data-play-on-hover="no"]:hover .pfv-hover-video-overlay {
    display: none !important;
    visibility: hidden !important;
    opacity: 0 !important;
    pointer-events: none !important;
}

/* Hide image when hovering - only when hover is enabled */
.pfv-shop-image-with-video[data-play-on-hover="yes"]:hover img,
.pfv-shop-image-with-video[data-play-on-hover="yes"].pfv-video-hovering img,
.pfv-shop-image-with-video[data-play-on-hover="yes"]:hover a img,
.pfv-shop-image-with-video[data-play-on-hover="yes"].pfv-video-hovering a img {
    opacity: 0 !important;
    visibility: hidden !important;
    z-index: 0 !important;
}

/* Ensure image stays visible when hover is disabled */
.pfv-shop-image-with-video[data-play-on-hover="no"] img,
.pfv-shop-image-with-video[data-play-on-hover="no"]:hover img,
.pfv-shop-image-with-video[data-play-on-hover="no"] a img,
.pfv-shop-image-with-video[data-play-on-hover="no"]:hover a img {
    opacity: 1 !important;
    visibility: visible !important;
}

.pfv-hover-video-overlay video,
.pfv-hover-video-overlay iframe {
    width: 100% !important;
    height: 100% !important;
    object-fit: cover;
    border: none;
    display: block !important;
    visibility: visible !important;
    opacity: 1 !important;
    z-index: 1001 !important;
    position: relative;
}

/* Price hiding for image-with-video functionality - only for products with videos */
.pfv-shop-image-with-video .woocommerce-loop-product__price,
.pfv-shop-image-with-video .price,
.pfv-shop-image-with-video .woocommerce-Price-amount {
    transition: opacity 0.3s ease;
}

/* Price hiding for video thumbnail functionality - only for products with videos */
.pfv-shop-video-thumbnail .woocommerce-loop-product__price,
.pfv-shop-video-thumbnail .price,
.pfv-shop-video-thumbnail .woocommerce-Price-amount {
    transition: opacity 0.3s ease;
}

.pfv-shop-video-thumbnail .pfv-video-thumbnail {
    width: 100%;
    height: 100%;
    display: block;
    transition: opacity 0.3s ease, transform 0.2s ease;
    object-fit: cover;
    object-position: center;
}

.pfv-shop-video-thumbnail .pfv-hover-video {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 100%;
    height: 100%;
    object-fit: cover;
    z-index: 2;
    transition: opacity 0.3s ease;
}

.pfv-shop-video-button {
    margin: 10px 0;
    text-align: center;
}

.pfv-video-button {
    background: #0073aa;
    color: #fff;
    border: none;
    padding: 10px 20px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    transition: background 0.3s ease;
}

.pfv-video-button:hover {
    background: #005a87;
}

/* Gallery Videos */
.pfv-gallery-videos {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin: 20px 0;
}

.pfv-gallery-video-item {
    position: relative;
    flex: 0 0 calc(25% - 10px);
    cursor: pointer;
    border-radius: 4px;
    overflow: hidden;
    transition: transform 0.3s ease;
    height: 200px; /* Fixed height for gallery items */
    display: flex;
    align-items: center;
    justify-content: center;
}

.pfv-gallery-video-item:hover {
    transform: scale(1.05);
}

.pfv-gallery-video-thumbnail {
    width: 100%;
    height: 100%;
    display: block;
    object-fit: cover;
    object-position: center;
}

/* Product Detail Page Gallery Video Integration */
.woocommerce-product-gallery__image.pfv-gallery-featured-video,
.woocommerce-product-gallery__image.pfv-gallery-video-item {
    position: relative;
    width: 100%;
    display: block !important;
    opacity: 1 !important;
}

.woocommerce-product-gallery__image.pfv-gallery-featured-video .pfv-video-wrapper,
.woocommerce-product-gallery__image.pfv-gallery-video-item .pfv-video-wrapper {
    position: relative;
    width: 100%;
    height: 100%;
    display: block;
}

/* Video wrapper - use default gallery height */
.pfv-video-wrapper {
    position: relative;
    width: 100%;
    height: 100%;
}

.pfv-video-wrapper iframe {
    width: 100%;
    height: 100%;
    min-height: 400px;
    border: none;
    display: block;
}

.pfv-video-wrapper video {
    width: 100%;
    height: auto;
    max-height: 100%;
    border: none;
    display: block;
}

/* Ensure videos match gallery image container height */
.woocommerce-product-gallery__image.pfv-gallery-featured-video,
.woocommerce-product-gallery__image.pfv-gallery-video-item {
    height: 100%;
}

.woocommerce-product-gallery__image.pfv-gallery-featured-video .pfv-video-wrapper,
.woocommerce-product-gallery__image.pfv-gallery-video-item .pfv-video-wrapper {
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.woocommerce-product-gallery__image.pfv-gallery-featured-video .pfv-gallery-video-iframe,
.woocommerce-product-gallery__image.pfv-gallery-featured-video .pfv-gallery-video-element,
.woocommerce-product-gallery__image.pfv-gallery-video-item .pfv-gallery-video-iframe,
.woocommerce-product-gallery__image.pfv-gallery-video-item .pfv-gallery-video-element {
    width: 100%;
    border: none;
    display: block;
}

.woocommerce-product-gallery__image.pfv-gallery-featured-video .pfv-gallery-video-iframe,
.woocommerce-product-gallery__image.pfv-gallery-video-item .pfv-gallery-video-iframe {
    height: 100%;
    min-height: 400px;
}

.woocommerce-product-gallery__image.pfv-gallery-featured-video .pfv-gallery-video-element,
.woocommerce-product-gallery__image.pfv-gallery-video-item .pfv-gallery-video-element {
    height: auto;
    max-height: 100%;
    object-fit: contain;
    min-height: 200px;
    background: #000;
    display: block !important;
    visibility: visible !important;
    opacity: 1 !important;
}

/* Ensure videos are visible in gallery slider */
.woocommerce-product-gallery__wrapper .pfv-gallery-featured-video,
.woocommerce-product-gallery__wrapper .pfv-gallery-video-item {
    display: block !important;
    visibility: visible !important;
    opacity: 1 !important;
}

/* Make sure videos work in flexslider */
.woocommerce-product-gallery .flex-viewport .pfv-gallery-featured-video,
.woocommerce-product-gallery .flex-viewport .pfv-gallery-video-item {
    display: block !important;
    visibility: visible !important;
    opacity: 1 !important;
}

.woocommerce-product-gallery .flex-viewport .pfv-gallery-featured-video .pfv-gallery-video-element,
.woocommerce-product-gallery .flex-viewport .pfv-gallery-video-item .pfv-gallery-video-element {
    display: block !important;
    visibility: visible !important;
    opacity: 1 !important;
}

.woocommerce-product-gallery .flex-viewport .pfv-gallery-video-iframe,
.woocommerce-product-gallery .flex-viewport .pfv-gallery-video-element {
    width: 100%;
    height: auto;
    display: block !important;
    visibility: visible !important;
    opacity: 1 !important;
    min-height: 200px;
    background: #000;
}

/* Allow flex-viewport to expand when video has controls and autoplay */
.woocommerce-product-gallery .flex-viewport:has(video[controls][autoplay]),
.woocommerce-product-gallery .flex-viewport:has(.pfv-gallery-video-element[controls][autoplay]),
.woocommerce-product-gallery .flex-viewport:has(iframe.pfv-gallery-video-iframe) {
    height: 230px !important;
}

/* Video thumbnails in navigation */
.flex-control-nav .pfv-thumbnail-video {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    cursor: pointer;
}

.flex-control-nav li {
    position: relative;
}

.flex-control-nav li video.pfv-thumbnail-video {
    pointer-events: auto;
}

/* Ensure videos in main area are visible when active */
.flex-active-slide .pfv-gallery-video-element,
.flex-active-slide .pfv-gallery-video-iframe {
    display: block !important;
    visibility: visible !important;
    opacity: 1 !important;
    width: 100% !important;
    height: auto !important;
}

.flex-active-slide .pfv-video-wrapper {
    display: block !important;
    visibility: visible !important;
    opacity: 1 !important;
}

/* Smooth transitions for video updates */
.pfv-video-wrapper {
    transition: opacity 0.3s ease;
}

.woocommerce-product-gallery__image.pfv-gallery-featured-video .pfv-video-wrapper {
    transition: opacity 0.3s ease;
}

/* Variation Video Container */
.pfv-variation-video-container {
    margin: 20px 0;
}

/* Responsive Design */
@media (max-width: 768px) {
    .pfv-gallery-video-item {
        flex: 0 0 calc(50% - 10px);
    }
    
    .pfv-play-overlay {
        width: 60px;
        height: 60px;
    }
    
    .pfv-play-icon {
        font-size: 18px;
    }
    
    .pfv-lightbox {
        padding: 10px;
    }
    
    .pfv-lightbox-content {
        width: 95%;
        max-width: 95%;
        max-height: 95vh;
    }
    
    .pfv-lightbox-content iframe,
    .pfv-lightbox-content video {
        min-height: 300px;
    }
    
    .pfv-lightbox-close {
        top: -45px;
        right: 0;
        width: 40px;
        height: 40px;
        font-size: 22px;
    }
}

@media (max-width: 480px) {
    .pfv-gallery-video-item {
        flex: 0 0 100%;
    }
    
    .pfv-play-overlay {
        width: 50px;
        height: 50px;
    }
    
    .pfv-play-icon {
        font-size: 16px;
    }
}

/* Loading States */
.pfv-loading {
    position: relative;
}

.pfv-loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 40px;
    height: 40px;
    border: 4px solid #f3f3f3;
    border-top: 4px solid #0073aa;
    border-radius: 50%;
    animation: pfv-spin 1s linear infinite;
}

@keyframes pfv-spin {
    0% { transform: translate(-50%, -50%) rotate(0deg); }
    100% { transform: translate(-50%, -50%) rotate(360deg); }
}

/* Error States */
.pfv-error {
    background: #f8d7da;
    color: #721c24;
    padding: 15px;
    border-radius: 4px;
    margin: 20px 0;
    border: 1px solid #f5c6cb;
}

/* Accessibility */
.pfv-video-container:focus,
.pfv-play-overlay:focus,
.pfv-video-button:focus {
    outline: 2px solid #0073aa;
    outline-offset: 2px;
}

/* Smooth transitions for video thumbnails */
.pfv-shop-video-thumbnail {
    transition: opacity 0.3s ease;
}

/* WooCommerce Product Images - Ensure consistent sizing */
.pfv-shop-video-thumbnail,
.pfv-shop-image-with-video {
    margin: 0 !important;
    padding: 0 !important;
    display: block;
}

/* Remove margin from product images when using video plugin */
ul.products li.product img,
ul.products .wc-block-grid_product img,
.wc-block-grid_products li.product img,
.wc-block-grid_products .wc-block-grid_product img {
    margin: 0 !important;
}



/* Print Styles */
@media print {
    .pfv-video-container,
    .pfv-shop-video-thumbnail,
    .pfv-shop-video-button,
    .pfv-gallery-videos {
        display: none !important;
    }
}