/* Media Protection CSS - Prevent Download and Right Click */

/* Disable text and image selection for product media */
.protected-media,
.protected-media img,
.protected-media video,
.product-card img,
.product-card video,
.media-display img,
.media-display video {
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    user-select: none;
    -webkit-user-drag: none;
    -khtml-user-drag: none;
    -moz-user-drag: none;
    -o-user-drag: none;
    user-drag: none;
    -webkit-touch-callout: none;
    -webkit-tap-highlight-color: transparent;
    pointer-events: none;
}

/* Image sizing to fit containers properly (without zoom blur restrictions) */
.protected-media img,
.product-card img,
.media-display img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
}

/* Allow pointer events for swiper navigation but protect media */
.swiper-button-next,
.swiper-button-prev,
.swiper-pagination,
.media-toggle-btn,
.product-card a,
.product-card button {
    pointer-events: auto !important;
    position: relative;
    z-index: 15;
}

/* NEW TOGGLE BUTTON STRUCTURE - Completely separate from media content */
.media-toggle-btn {
    z-index: 50 !important;
    pointer-events: auto !important;
    position: relative !important;
    cursor: pointer !important;
    user-select: none;
    -webkit-user-select: none;
}

/* Ensure SVG icons don't capture click events */
.media-toggle-btn svg {
    pointer-events: none !important;
}

/* Ensure swiper elements don't interfere with toggle buttons */
.swiper-button-next,
.swiper-button-prev {
    z-index: 10 !important;
}

.swiper-pagination {
    z-index: 10 !important;
}

/* Overlay protection for images and videos */
.media-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 10;
    background: transparent;
    pointer-events: none;
}

/* Disable context menu on media containers */
.protected-media {
    -webkit-context-menu: none;
    -moz-context-menu: none;
    context-menu: none;
}

/* Prevent dragging of images */
.protected-media img,
.product-card img,
.media-display img {
    -webkit-user-drag: none;
    -khtml-user-drag: none;
    -moz-user-drag: none;
    -o-user-drag: none;
    user-drag: none;
    pointer-events: none;
}

/* Prevent video download controls */
.protected-media video,
.product-card video,
.media-display video {
    -webkit-user-drag: none;
    -khtml-user-drag: none;
    -moz-user-drag: none;
    -o-user-drag: none;
    user-drag: none;
    pointer-events: none;
    controlsList: nodownload nofullscreen noremoteplayback;
    disablePictureInPicture: true;
}

/* Additional protection for video controls */
.protected-media video::-webkit-media-controls,
.product-card video::-webkit-media-controls,
.media-display video::-webkit-media-controls {
    display: none !important;
}

.protected-media video::-webkit-media-controls-enclosure,
.product-card video::-webkit-media-controls-enclosure,
.media-display video::-webkit-media-controls-enclosure {
    display: none !important;
}

/* Watermark overlay for extra protection */
.media-watermark {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) rotate(-45deg);
    opacity: 0.1;
    font-size: 24px;
    font-weight: bold;
    font-family: 'Dancing Script', 'Brush Script MT', cursive;
    color: white;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
    z-index: 5;
    pointer-events: none;
    user-select: none;
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    letter-spacing: 1px;
}

/* Responsive watermark for mobile */
@media (max-width: 768px) {
    .media-watermark {
        font-size: 16px;
        letter-spacing: 0.5px;
    }
}

@media (max-width: 480px) {
    .media-watermark {
        font-size: 12px;
        letter-spacing: 0.5px;
    }
}

/* Disable print styles for media */
@media print {
    .protected-media,
    .protected-media img,
    .protected-media video,
    .product-card img,
    .product-card video {
        display: none !important;
    }
}

/* Blur effect on screenshot attempt (iOS Safari) - DISABLED for better zoom UX */
/*
@media (-webkit-min-device-pixel-ratio: 2) {
    .protected-media:active,
    .product-card:active {
        filter: blur(10px);
    }
}
*/

/* Disable selection highlights */
.protected-media::selection,
.protected-media img::selection,
.protected-media video::selection,
.product-card img::selection,
.product-card video::selection,
.media-display img::selection,
.media-display video::selection {
    background: transparent;
}

.protected-media::-moz-selection,
.protected-media img::-moz-selection,
.protected-media video::-moz-selection,
.product-card img::-moz-selection,
.product-card video::-moz-selection,
.media-display img::-moz-selection,
.media-display video::-moz-selection {
    background: transparent;
}

/* Additional iOS Safari protection */
.protected-media,
.product-card {
    -webkit-touch-callout: none;
    -webkit-user-select: none;
    -khtml-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    user-select: none;
}

/* Prevent long press context menu on mobile */
.protected-media img,
.protected-media video,
.product-card img,
.product-card video,
.media-display img,
.media-display video {
    -webkit-touch-callout: none;
    -webkit-user-select: none;
    -khtml-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    user-select: none;
}

/* Hide video download button in Chrome */
.protected-media video::-webkit-media-controls-download-button,
.product-card video::-webkit-media-controls-download-button,
.media-display video::-webkit-media-controls-download-button {
    display: none !important;
}

/* Additional protection layer */
.media-protection-layer {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 2;
    background: linear-gradient(45deg, transparent 49%, rgba(255,255,255,0.01) 50%, transparent 51%);
    pointer-events: none;
}

/* Prevent video save as */
.protected-media video,
.product-card video,
.media-display video {
    -webkit-user-drag: none;
    -moz-user-drag: none;
    -o-user-drag: none;
    -ms-user-drag: none;
    user-drag: none;
}