/* Force Enable Swiper Mouse Drag - HIGHEST PRIORITY */
/* This file MUST load AFTER all other flash-sale CSS files */

/* Force pointer events on ALL Swiper elements */
.swiper,
.swiper *,
.swiper-wrapper,
.swiper-wrapper *,
.swiper-slide,
.swiper-slide *,
div[class*="swiper"],
div[class*="swiper"] *,
section[class*="flash-sale"] .swiper,
section[class*="flash-sale"] .swiper *,
section[class*="flash-sale"] .swiper-wrapper,
section[class*="flash-sale"] .swiper-wrapper *,
section[class*="flash-sale"] .swiper-slide,
section[class*="flash-sale"] .swiper-slide *,
.flash-sale-carousel-container,
.flash-sale-carousel-container *,
.flash-sale-carousel-container .swiper,
.flash-sale-carousel-container .swiper *,
.flash-sale-carousel-container .swiper-wrapper,
.flash-sale-carousel-container .swiper-wrapper * {
    pointer-events: auto !important;
}

/* Force grab cursor on wrapper */
/* FIXED: Changed touch-action from pan-y to manipulation for horizontal swipe */
.swiper-wrapper,
section[class*="flash-sale"] .swiper-wrapper,
.flash-sale-carousel-container .swiper-wrapper {
    cursor: grab !important;
    user-select: none !important;
    -webkit-user-select: none !important;
    -moz-user-select: none !important;
    -ms-user-select: none !important;
    touch-action: manipulation !important;
    -webkit-touch-callout: none !important;
}

/* When dragging */
.swiper-wrapper:active,
section[class*="flash-sale"] .swiper-wrapper:active,
.flash-sale-carousel-container .swiper-wrapper:active {
    cursor: grabbing !important;
}

/* Ensure flash sale cards don't block events */
.flash-sale-card,
.flash-sale-card *,
.swiper-slide .flash-sale-card,
.swiper-slide .flash-sale-card * {
    pointer-events: auto !important;
}

/* But keep decorative overlays non-interactive */
.flash-sale-card .fs-img-link::after,
.fs-bg-image::after,
.fs-watermark-preview {
    pointer-events: none !important;
}

/* Navigation buttons should remain clickable */
.swiper-button-next,
.swiper-button-prev,
.swiper-pagination,
.flash-sale-nav-btn {
    pointer-events: auto !important;
    cursor: pointer !important;
}
/* =============================================
   CRITICAL: FORCE SWIPER TO WORK
   - Enable transform on swiper-wrapper
   - Enable transitions for autoplay
   - Override any blocking CSS
   ============================================= */

/* Flash Sale Swiper MUST have proper transform capability */
.flash-sale-carousel-container .swiper-wrapper,
.flash-sale-section .swiper-wrapper,
section[class*="flash-sale"] .swiper-wrapper {
    display: flex !important;
    flex-direction: row !important;
    flex-wrap: nowrap !important;
    /* DO NOT SET transform here - let Swiper.js control it */
    transition-property: transform !important;
    transition-timing-function: ease !important;
    /* Override any transform: none that might be set */
}

/* Force Flash Sale Swiper container to work */
.flash-sale-carousel-container .swiper,
.flash-sale-section .swiper,
section[class*="flash-sale"] .swiper {
    overflow: hidden !important;
    position: relative !important;
    width: 100% !important;
}

/* Force slides to be in a row */
.flash-sale-carousel-container .swiper-slide,
.flash-sale-section .swiper-slide,
section[class*="flash-sale"] .swiper-slide {
    flex-shrink: 0 !important;
    position: relative !important;
}

/* =============================================
   CRITICAL FIX: MOUSE DRAG SUPPORT
   - Prevent card content from capturing mouse events during drag
   - Allow click events to pass through normally
   ============================================= */

/* When Swiper is grabbing (dragging), disable pointer-events on cards */
.swiper-wrapper.swiper-pointer-events .flash-sale-card,
.swiper-wrapper.swiper-pointer-events .flash-sale-card * {
    pointer-events: none !important;
}

/* Re-enable pointer events when NOT dragging (for clicks) */
.swiper-slide .flash-sale-card,
.flash-sale-carousel-container .flash-sale-card {
    pointer-events: auto;
}

/* Links and buttons ALWAYS clickable */
.flash-sale-card a,
.flash-sale-card button,
.flash-sale-card .btn,
.flash-sale-card [role="button"] {
    pointer-events: auto !important;
}

/* =============================================
   CRITICAL: Swiper Navigation Buttons MUST WORK
   - High z-index to stay above everything
   - pointer-events: auto to receive clicks
   - cursor: pointer for visual feedback
   ============================================= */
.flash-sale-carousel-container .swiper-button-next,
.flash-sale-carousel-container .swiper-button-prev,
.flash-sale-section .swiper-button-next,
.flash-sale-section .swiper-button-prev,
section[class*="flash-sale"] .swiper-button-next,
section[class*="flash-sale"] .swiper-button-prev,
.swiper-button-next,
.swiper-button-prev {
    display: flex !important;
    opacity: 1 !important;
    visibility: visible !important;
    z-index: 9999 !important;
    pointer-events: auto !important;
    cursor: pointer !important;
    position: absolute !important;
}

/* Ensure navigation buttons are NOT hidden when disabled */
.swiper-button-next.swiper-button-disabled,
.swiper-button-prev.swiper-button-disabled {
    opacity: 0.35 !important;
    pointer-events: auto !important; /* Still clickable but visually disabled */
    cursor: not-allowed !important;
}