/* Victor Scientific — product details page bundle.
 * Final product-page policy and interactions. Original module order is preserved so final gallery declarations remain the source of truth.
 * Loaded only on the named Product Details route.
 */

/* ===== Original module: vsc-product-no-motion.css ===== */
/* Product-page motion policy. Main gallery and primary purchase CTA remain
   stable. Related-product cards use their own native horizontal scroll and
   interaction styles in vsc-related-products.css. */
html,
body.product-refresh-page {
    scroll-behavior: auto !important;
}

/* Keep layout, thumbnails and video controls stable; do not blanket-disable
   the main product image's narrowly scoped interaction. */
body.product-refresh-page .product-gallery-column,
body.product-refresh-page .product-gallery-column > .details_slider,
body.product-refresh-page .product-gallery-column > .indicator_thumb,
body.product-refresh-page .product-gallery-column .indicator-item,
body.product-refresh-page .product-gallery-column .product-gallery-video-item,
body.product-refresh-page .product-gallery-column .product-gallery-video,
body.product-refresh-page .product-gallery-column .product-gallery-youtube-launch,
body.product-refresh-page .product-gallery-column .product-gallery-youtube {
    animation: none !important;
    transition: none !important;
}

body.product-refresh-page .single_product .add_cart_btn,
body.product-refresh-page .single_product .order_now_btn,
body.product-refresh-page .single_product .add_cart_btn::before,
body.product-refresh-page .single_product .add_cart_btn::after,
body.product-refresh-page .single_product .order_now_btn::before,
body.product-refresh-page .single_product .order_now_btn::after {
    animation: none !important;
    transition: none !important;
    transform: none !important;
    filter: none !important;
}

body.product-refresh-page .single_product .add_cart_btn:active,
body.product-refresh-page .single_product .order_now_btn:active {
    transform: none !important;
    opacity: 1 !important;
}

@media (hover: hover) and (pointer: fine) {
    body.product-refresh-page .single_product .add_cart_btn:hover,
    body.product-refresh-page .single_product .order_now_btn:hover {
        transform: none !important;
    }
}

/* Native scroll-snap gallery: one horizontal track, with no carousel plugin dependency. */
body.product-refresh-page .product-gallery-column > .details_slider.vsc-product-gallery {
    display: flex !important;
    flex-flow: row nowrap !important;
    width: 100% !important;
    height: clamp(390px, 42vw, 590px) !important;
    min-width: 0 !important;
    overflow-x: auto !important;
    overflow-y: hidden !important;
    scroll-snap-type: x mandatory !important;
    scroll-behavior: auto !important;
    overscroll-behavior-x: contain !important;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    touch-action: auto !important;
}
body.product-refresh-page .product-gallery-column > .details_slider.vsc-product-gallery::-webkit-scrollbar {
    display: none;
}
body.product-refresh-page .product-gallery-column .vsc-product-gallery > .dimage_item {
    display: flex !important;
    flex: 0 0 100% !important;
    width: 100% !important;
    min-width: 100% !important;
    height: 100% !important;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    scroll-snap-align: start;
    scroll-snap-stop: always;
    touch-action: auto !important;
}
body.product-refresh-page .product-gallery-column .product-gallery-video-item {
    height: 100% !important;
}
@media (max-width: 767.98px) {
    body.product-refresh-page .product-gallery-column > .details_slider.vsc-product-gallery {
        height: min(82vw, 390px) !important;
        min-height: 260px !important;
    }
}

/* ===== Original module: vsc-product-interactions.css ===== */
/* Victor Scientific — low-cost product image interactions.
   Desktop hover zoom is intentionally scoped to the main product image only. */

@keyframes vsc-product-image-enter {
    from { opacity: .94; transform: scale(.992); }
    to   { opacity: 1; transform: scale(1); }
}

body.product-refresh-page .product-gallery-column .dimage_item {
    position: relative;
    overflow: hidden;
    isolation: isolate;
}

/* Keep the image immediately in its final layout; only its pixels receive a
   short compositor-friendly entrance. No page-wide fade or layout animation. */
body.product-refresh-page .product-gallery-column .dimage_item img.block__pic {
    display: block;
    transform: scale(1);
    transform-origin: var(--vsc-zoom-x, 50%) var(--vsc-zoom-y, 50%);
    transition: transform 125ms cubic-bezier(.2, .72, .25, 1);
    cursor: zoom-in;
    will-change: auto;
}

body.product-refresh-page .product-gallery-column .vsc-product-gallery > .dimage_item:first-child img.block__pic {
    animation: vsc-product-image-enter 130ms cubic-bezier(.2, .72, .25, 1) both;
}

/* The pointer events are mouse-only in JavaScript. A width-only media query is
   deliberate: some desktop/touch laptops report a coarse primary pointer even
   while a real mouse is connected. !important protects the scale from older
   product-page transform resets. */
@media (min-width: 768px) {
    body.product-refresh-page .product-gallery-column .dimage_item.vsc-magnifier-active > img.block__pic {
        transform: scale(2.6) !important;
        transform-origin: var(--vsc-zoom-x, 50%) var(--vsc-zoom-y, 50%) !important;
        will-change: transform;
        cursor: zoom-in;
    }
}

/* Touch devices use tap-to-open full image viewer; no hover magnification. */
@media (max-width: 767.98px) {
    body.product-refresh-page .product-gallery-column .dimage_item img.block__pic {
        transform: none !important;
        transition: none !important;
        will-change: auto;
        cursor: zoom-in;
    }
}

/* Reduced-motion preference removes interpolation, not the requested direct
   desktop magnification. The scale appears immediately while the pointer rests. */
@media (prefers-reduced-motion: reduce) {
    body.product-refresh-page .product-gallery-column .dimage_item img.block__pic,
    body.product-refresh-page .product-gallery-column .vsc-product-gallery > .dimage_item:first-child img.block__pic {
        animation: none !important;
        transition: none !important;
    }
}
@media (min-width: 768px) and (prefers-reduced-motion: reduce) {
    body.product-refresh-page .product-gallery-column .dimage_item.vsc-magnifier-active > img.block__pic {
        transform: scale(2.6) !important;
    }
}

/* ===== Original module: vsc-related-products.css ===== */
/* Related products: one native scrolling implementation on product details.
   Preserves product card content, purchase forms and gallery behavior. */
body.product-refresh-page .related-product-section .vsc-related-heading-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    width: 100%;
}
body.product-refresh-page .related-product-section .vsc-related-heading-row h2 {
    margin-bottom: 0;
}
body.product-refresh-page .related-product-section .vsc-related-controls {
    display: flex;
    flex: 0 0 auto;
    gap: 8px;
}
body.product-refresh-page .related-product-section .vsc-related-arrow {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    padding: 0;
    border: 1px solid var(--site-primary-line, #d7e1ed);
    border-radius: 50%;
    background: #fff;
    color: var(--site-primary, #0b3b82);
    font-size: 26px;
    line-height: 1;
    cursor: pointer;
    transition: background-color 160ms ease, border-color 160ms ease,
                color 160ms ease, transform 160ms ease;
}
body.product-refresh-page .related-product-section .vsc-related-arrow:hover:not(:disabled) {
    background: var(--site-primary, #0b3b82);
    border-color: var(--site-primary, #0b3b82);
    color: #fff;
    transform: translateY(-1px);
}
body.product-refresh-page .related-product-section .vsc-related-arrow:disabled {
    opacity: .35;
    cursor: default;
}
body.product-refresh-page .related-product-section .vsc-related-track {
    --vsc-related-columns: 5;
    --vsc-related-gap: 12px;
    display: grid;
    grid-auto-flow: column;
    grid-auto-columns: calc((100% - (var(--vsc-related-columns) - 1) * var(--vsc-related-gap)) / var(--vsc-related-columns));
    align-items: stretch;
    gap: var(--vsc-related-gap);
    width: 100%;
    min-width: 0;
    margin: 0;
    padding: 8px 2px 15px;
    box-sizing: border-box;
    overflow-x: auto;
    overflow-y: hidden;
    overscroll-behavior-x: contain;
    scroll-snap-type: none; /* Natural momentum: a swipe can pass multiple products. */
    scroll-behavior: smooth;
    -webkit-overflow-scrolling: touch;
    touch-action: pan-x pan-y;
    scrollbar-width: thin;
    scrollbar-color: #cbd5e1 transparent;
    -webkit-tap-highlight-color: transparent;
}
body.product-refresh-page .related-product-section .vsc-related-track::-webkit-scrollbar {
    height: 5px;
}
body.product-refresh-page .related-product-section .vsc-related-track::-webkit-scrollbar-thumb {
    background: #cbd5e1;
    border-radius: 999px;
}
body.product-refresh-page .related-product-section .vsc-related-track.is-dragging {
    scroll-behavior: auto;
    cursor: grabbing;
    user-select: none;
    -webkit-user-select: none;
}
body.product-refresh-page .related-product-section .vsc-related-track > .product_item {
    width: auto;
    min-width: 0;
    max-width: none;
    height: auto;
    margin: 0 0 8px !important;
    position: relative;
    z-index: auto;
    transform: translate3d(0,0,0);
    transition: transform 180ms cubic-bezier(.22,.68,.18,1),
                box-shadow 180ms cubic-bezier(.22,.68,.18,1),
                border-color 180ms ease !important;
}
body.product-refresh-page .related-product-section .vsc-related-track .pro_img img {
    transition: transform 220ms cubic-bezier(.22,.68,.18,1) !important;
    transform: scale(1);
    -webkit-user-drag: none;
    user-select: none;
}
@media (hover: hover) and (pointer: fine) {
    body.product-refresh-page .related-product-section .vsc-related-track > .product_item:hover {
        transform: translate3d(0,-4px,0);
        border-color: var(--site-primary-line, #b9cde3);
        box-shadow: 0 13px 30px rgba(27,35,50,.11);
    }
    body.product-refresh-page .related-product-section .vsc-related-track > .product_item:hover .pro_img img {
        transform: scale(1.02);
    }
}
@media (hover: none) {
    body.product-refresh-page .related-product-section .vsc-related-track > .product_item:active {
        transform: scale(.99);
    }
}
@media (max-width: 1199.98px) {
    body.product-refresh-page .related-product-section .vsc-related-track { --vsc-related-columns: 4; }
}
@media (max-width: 991.98px) {
    body.product-refresh-page .related-product-section .vsc-related-track { --vsc-related-columns: 3; }
}
@media (max-width: 575.98px) {
    body.product-refresh-page .related-product-section .vsc-related-track {
        --vsc-related-columns: 2;
        --vsc-related-gap: 9px;
        padding-bottom: 13px;
    }
    body.product-refresh-page .related-product-section .vsc-related-arrow {
        width: 32px;
        height: 32px;
        font-size: 24px;
    }
}
@media (prefers-reduced-motion: reduce) {
    body.product-refresh-page .related-product-section .vsc-related-track {
        scroll-behavior: auto;
    }
    body.product-refresh-page .related-product-section .vsc-related-track > .product_item,
    body.product-refresh-page .related-product-section .vsc-related-track .pro_img img,
    body.product-refresh-page .related-product-section .vsc-related-arrow {
        animation: none !important;
        transition: none !important;
    }
    body.product-refresh-page .related-product-section .vsc-related-track > .product_item:hover,
    body.product-refresh-page .related-product-section .vsc-related-track > .product_item:hover .pro_img img {
        transform: none;
    }
}

