/* ProModeler — J2Commerce product detail page tweaks.
   Loaded by templates/yootheme_bare/html/com_j2commerce/uikit/view_notabs.php and view_sdesc.php */

/* Space between the gallery thumbnails and the testimonial carousel (plugin app_videodisplay).
   dev.promodeler.com/DS505BLHV at 1920px: 37px from the thumbnails to the HikaShop carousel. */
.j2c-product-detail-media > #j2commerce-videodisplay {
    margin-top: 40px;
}

/* Sticky product columns (menu option item_sticky_columns). YOOtheme's header is a 60px
   show-on-up sticky navbar: UIkit adds uk-sticky-fixed while it is on screen, so the sticky
   column drops below it only then, and sits 1rem from the viewport top while it is hidden. */
.j2c-product-detail-row.j2c-sticky-enabled > .is-sticky {
    transition: top 0.3s ease;
}

html:has(.tm-header .uk-sticky-fixed) .j2c-product-detail-row {
    --j2c-sticky-offset: calc(60px + 1rem);
}

/* Keep keyboard-focused and anchored content clear of the sticky header (WCAG 2.4.11). */
html {
    scroll-padding-top: calc(60px + 1rem);
}

@media (prefers-reduced-motion: reduce) {
    .j2c-product-detail-row.j2c-sticky-enabled > .is-sticky {
        transition: none;
    }
}
