/* SAHXL PATCH V7 — only requested mobile/tablet/product transition fixes */
html.sahxl-woocommerce-products-loaded,
body.sahxl-woocommerce-products-loaded,
.sahxl-woocommerce-products-loaded{
  margin-top:0px !important;
}

@media (max-width:767px), (min-width:768px) and (max-width:1024px) and (orientation:portrait){
  html.sahxl-woocommerce-products-loaded,
  body.sahxl-collection-template.sahxl-woocommerce-products-loaded,
  body.sahxl-collection-template .sahxl-woocommerce-products-loaded,
  body.sahxl-collection-template .sahxl-collection,
  body.sahxl-collection-template .sahxl-product-grid{
    margin-top:0px !important;
  }
}

@media (max-width:1400px){
  body:not(.mobile-cart-open) #mobile-cart.mobile-cart,
  body:not(.mobile-cart-open) .mobile-cart.sahxl-linked-cart{
    opacity:0 !important;
    visibility:hidden !important;
    pointer-events:none !important;
  }
  body:not(.mobile-cart-open) #mobile-cart.mobile-cart .mobile-cart__panel,
  body:not(.mobile-cart-open) .mobile-cart.sahxl-linked-cart .mobile-cart__panel{
    transform:translateX(105%) !important;
  }
  body.mobile-cart-open #mobile-cart.mobile-cart,
  body.mobile-cart-open .mobile-cart.sahxl-linked-cart{
    opacity:1 !important;
    visibility:visible !important;
    pointer-events:auto !important;
    display:block !important;
  }
  body.mobile-cart-open #mobile-cart.mobile-cart .mobile-cart__panel,
  body.mobile-cart-open .mobile-cart.sahxl-linked-cart .mobile-cart__panel{
    transform:translateX(0) !important;
  }
}

@media (min-width:768px) and (max-width:1024px) and (orientation:portrait){
  body.sahxl-product-template{
    --codex-tablet-width:810px !important;
    --codex-tablet-scale:calc(100vw / 810) !important;
    overflow-y:auto !important;
    overflow-x:hidden !important;
    touch-action:pan-y !important;
    position:relative !important;
    min-height:calc(2600px * var(--codex-tablet-scale)) !important;
    height:auto !important;
    max-height:none !important;
  }
  body.sahxl-product-template .sahxl-desktop-artboard-stage{
    position:relative !important;
    display:block !important;
    width:100vw !important;
    min-width:100vw !important;
    max-width:100vw !important;
    height:calc(2600px * var(--codex-tablet-scale)) !important;
    min-height:calc(2600px * var(--codex-tablet-scale)) !important;
    max-height:none !important;
    overflow:visible !important;
    background:#000 !important;
  }
  body.sahxl-product-template .sahxl-desktop-artboard{
    position:relative !important;
    display:block !important;
    width:810px !important;
    min-width:810px !important;
    max-width:810px !important;
    min-height:2600px !important;
    height:2600px !important;
    margin:0 !important;
    padding:0 !important;
    overflow:visible !important;
    transform:scale(var(--codex-tablet-scale)) !important;
    transform-origin:top left !important;
    background:#000 !important;
  }
  body.sahxl-product-template .rains-detail-section{
    position:relative !important;
    top:auto !important;
    z-index:4 !important;
    display:block !important;
    width:810px !important;
    max-width:810px !important;
    min-height:0 !important;
    margin:558px 0 0 !important;
    padding:0 !important;
    background:#000 !important;
  }
  body.sahxl-product-template .rains-detail-inner{
    display:grid !important;
    grid-template-columns:488px 297px !important;
    gap:15px !important;
    align-items:start !important;
    width:810px !important;
    max-width:810px !important;
    margin:0 !important;
    padding:0 !important;
  }
  body.sahxl-product-template .rains-detail-media-mobile,
  body.sahxl-product-template .rains-detail-slider-mobile,
  body.sahxl-product-template .rains-detail-thumb-strip-mobile{
    display:none !important;
    visibility:hidden !important;
    pointer-events:none !important;
  }
  body.sahxl-product-template .rains-detail-media.rains-detail-media--desktop,
  body.sahxl-product-template .rains-detail-media--desktop{
    display:block !important;
    visibility:visible !important;
    width:488px !important;
    min-width:488px !important;
    max-width:488px !important;
    margin:0 !important;
    padding:0 !important;
  }
  body.sahxl-product-template .rains-detail-image-row{
    display:grid !important;
    grid-template-columns:repeat(2,242px) !important;
    gap:4px !important;
    width:488px !important;
    margin:0 0 4px !important;
  }
  body.sahxl-product-template .rains-detail-image{
    display:block !important;
    width:242px !important;
    height:348px !important;
    object-fit:cover !important;
    object-position:center !important;
  }
  body.sahxl-product-template .rains-side-panel{
    display:block !important;
    grid-column:2 !important;
    grid-row:1 !important;
    width:297px !important;
    max-width:297px !important;
    margin:0 !important;
    padding:20px 10px 0 0 !important;
    transform:none !important;
    background:#000 !important;
    color:#fff !important;
    box-sizing:border-box !important;
  }
}

@media (min-width:768px) and (max-width:1200px) and (orientation:landscape){
  body.sahxl-product-template{
    overflow-y:auto !important;
    overflow-x:hidden !important;
    height:auto !important;
    max-height:none !important;
    touch-action:pan-y !important;
    overscroll-behavior:auto !important;
  }
  body.sahxl-product-template{
    position:relative !important;
  }
  body.sahxl-product-template:not(.mobile-drawer-open):not(.sahxl-mobile-drawer-lock){
    overflow-y:auto !important;
  }
  body.sahxl-product-template #mobile-drawer.mobile-drawer{
    position:fixed !important;
    inset:0 !important;
    display:block !important;
    opacity:0 !important;
    visibility:hidden !important;
    pointer-events:none !important;
    z-index:2147483639 !important;
  }
  body.sahxl-product-template #mobile-drawer.mobile-drawer.is-open,
  body.sahxl-product-template.mobile-drawer-open #mobile-drawer.mobile-drawer{
    opacity:1 !important;
    visibility:visible !important;
    pointer-events:auto !important;
  }
  body.sahxl-product-template #mobile-drawer.mobile-drawer.is-open .mobile-drawer__panel,
  body.sahxl-product-template.mobile-drawer-open #mobile-drawer.mobile-drawer .mobile-drawer__panel{
    transform:translate3d(0,0,0) !important;
  }
}

@media (max-width:1024px){
  body.sahxl-vip-access-template .sahxl-desktop-artboard-stage,
  body.sahxl-vip-access-template .sahxl-desktop-artboard,
  body.sahxl-vip-access-template .video-shell,
  body.sahxl-vip-access-template .room-pan-layer{
    left:0 !important;
    right:0 !important;
    width:100vw !important;
    min-width:100vw !important;
    max-width:100vw !important;
    margin-left:0 !important;
    margin-right:0 !important;
    transform:none !important;
    overflow:hidden !important;
  }
  body.sahxl-vip-access-template .video-bg,
  body.sahxl-vip-access-template .video-shell .room-pan-layer .video-bg{
    left:0 !important;
    right:0 !important;
    width:100vw !important;
    min-width:100vw !important;
    max-width:100vw !important;
    height:100dvh !important;
    min-height:100dvh !important;
    object-fit:cover !important;
    object-position:center center !important;
    transform:none !important;
  }
}

@media (max-width:767px) and (min-height:720px), (min-width:768px) and (max-width:1024px) and (orientation:portrait){
  .hotspot--far-left-table .hotspot__tooltip{
    white-space:nowrap !important;
  }
}


/* SAHXL PATCH V8 — requested mobile/tablet-only fixes */
@media (max-width: 767px){
  html.sahxl-woocommerce-products-loaded,
  html.sahxl-woocommerce-products-loaded body,
  body.sahxl-collection-template,
  body.sahxl-collection-template .sahxl-woocommerce-products-loaded{
    margin-top:0px !important;
  }
  body.sahxl-collection-template .mobile-drawer__content{
    top:43% !important;
  }
}

@media (min-width:768px) and (max-width:1200px) and (orientation:landscape){
  body.sahxl-collection-template .sahxl-product-grid,
  body.sahxl-collection-template .products,
  body.sahxl-collection-template ul.products{
    grid-template-columns:repeat(4,minmax(0px,1fr)) !important;
    gap:10px !important;
  }
  body.sahxl-collection-template .sahxl-header-only,
  body.sahxl-collection-template .archive-hero,
  body.sahxl-collection-template .sahxl-collection-hero,
  body.sahxl-collection-template .sahxl-header-only .background-video,
  body.sahxl-collection-template .sahxl-header-only video.background-video{
    width:100vw !important;
    min-width:100vw !important;
    max-width:100vw !important;
    left:0 !important;
    right:auto !important;
    margin-left:0 !important;
    margin-right:0 !important;
  }
  body.sahxl-collection-template .sahxl-header-only .background-video,
  body.sahxl-collection-template .sahxl-header-only video.background-video{
    object-fit:cover !important;
    object-position:center center !important;
  }
}

@media (min-width:768px) and (max-width:1024px) and (orientation:portrait){
  html.codex-tablet-portrait-mobile,
  html.codex-tablet-portrait-mobile body.sahxl-product-template,
  body.sahxl-product-template.codex-tablet-portrait-mobile{
    overflow-x:hidden !important;
    overflow-y:auto !important;
    height:auto !important;
    max-height:none !important;
    touch-action:pan-y !important;
  }
  html.codex-tablet-portrait-mobile body.sahxl-product-template .sahxl-mobile-hero-flow-spacer,
  html.codex-tablet-portrait-mobile body.sahxl-product-template .rains-detail-media-mobile,
  html.codex-tablet-portrait-mobile body.sahxl-product-template .rains-detail-slider-mobile,
  html.codex-tablet-portrait-mobile body.sahxl-product-template .rains-detail-thumb-strip-mobile{
    display:none !important;
    visibility:hidden !important;
    pointer-events:none !important;
    height:0 !important;
    min-height:0 !important;
    max-height:0 !important;
  }
  html.codex-tablet-portrait-mobile body.sahxl-product-template .sahxl-mobile-hero-added-video,
  html.codex-tablet-portrait-mobile body.sahxl-product-template .sahxl-hero-bg-img{
    display:none !important;
    visibility:hidden !important;
    opacity:0 !important;
  }
  html.codex-tablet-portrait-mobile body.sahxl-product-template .sahxl-product-bg-img-desktop,
  html.codex-tablet-portrait-mobile body.sahxl-product-template .sahxl-desktop-hero-added-video{
    display:block !important;
    visibility:visible !important;
    opacity:1 !important;
  }
  html.codex-tablet-portrait-mobile body.sahxl-product-template .sahxl-desktop-artboard-stage{
    --codex-desktop-artboard-width:1440px !important;
    --codex-desktop-artboard-height:3400px !important;
    --codex-desktop-artboard-scale:calc(100vw / 1440) !important;
    position:relative !important;
    display:block !important;
    width:100vw !important;
    min-width:100vw !important;
    max-width:100vw !important;
    height:calc(3400px * var(--codex-desktop-artboard-scale)) !important;
    min-height:calc(3400px * var(--codex-desktop-artboard-scale)) !important;
    max-height:none !important;
    overflow:visible !important;
    background:#000 !important;
  }
  html.codex-tablet-portrait-mobile body.sahxl-product-template .sahxl-desktop-artboard{
    position:absolute !important;
    top:0 !important;
    left:0 !important;
    display:block !important;
    width:1440px !important;
    min-width:1440px !important;
    max-width:1440px !important;
    height:3400px !important;
    min-height:3400px !important;
    margin:0 !important;
    padding:0 !important;
    overflow:visible !important;
    transform:scale(var(--codex-desktop-artboard-scale)) !important;
    transform-origin:top left !important;
    background:#000 !important;
  }
  html.codex-tablet-portrait-mobile body.sahxl-product-template .rains-detail-section{
    position:relative !important;
    display:block !important;
    width:1440px !important;
    max-width:1440px !important;
    margin:0 !important;
    padding-top:80px !important;
    background:#000 !important;
  }
  html.codex-tablet-portrait-mobile body.sahxl-product-template .rains-detail-inner{
    display:grid !important;
    grid-template-columns:repeat(5,minmax(0,1fr)) !important;
    gap:10px !important;
    width:1440px !important;
    max-width:1440px !important;
    margin:0 !important;
  }
  html.codex-tablet-portrait-mobile body.sahxl-product-template .rains-detail-media.rains-detail-media--desktop{
    display:block !important;
    visibility:visible !important;
    opacity:1 !important;
    width:835px !important;
    min-width:835px !important;
    max-width:835px !important;
    grid-column:1 / span 4 !important;
  }
  html.codex-tablet-portrait-mobile body.sahxl-product-template .rains-side-panel{
    display:block !important;
    visibility:visible !important;
    opacity:1 !important;
    grid-column:5 !important;
    grid-row:1 !important;
    width:auto !important;
    max-width:none !important;
    margin-left:0 !important;
    transform:none !important;
  }
}


/* SAHXL PATCH V9 — desktop-only requested fixes */
@media (min-width:1201px){
  .top-cta{
    min-height:47px !important;
    min-width:228px !important;
  }
  body.sahxl-product-template .sahxl-you-may-like-section{
    width:100% !important;
    max-width:none !important;
  }
  body.sahxl-product-template .sahxl-you-may-like-section .sahxl-you-may-like__grid{
    display:grid !important;
    grid-template-columns:repeat(4,minmax(0,1fr)) !important;
    flex-wrap:unset !important;
    overflow-x:visible !important;
    overflow-y:visible !important;
    width:100% !important;
    max-width:none !important;
    gap:10px !important;
  }
  body.sahxl-product-template .sahxl-you-may-like-section .sahxl-product-card{
    flex:0 1 auto !important;
    width:auto !important;
    min-width:0 !important;
    max-width:none !important;
  }
}


/* SAHXL PATCH V10 — mobile-only requested cleanup/fixes */
@media (max-width: 767px){
  html.sahxl-woocommerce-products-loaded,
  html.sahxl-woocommerce-products-loaded body,
  body.sahxl-collection-template,
  body.sahxl-collection-template .sahxl-woocommerce-products-loaded,
  html.sahxl-page-transition-ready,
  body.sahxl-page-transition-ready,
  .sahxl-page-transition-ready{
    margin-top:0px !important;
  }
  .mobile-drawer__content,
  .mobile-drawer.is-open .mobile-drawer__content,
  body.mobile-menu-open .mobile-drawer__content,
  body.sahxl-mobile-drawer-lock .mobile-drawer__content{
    top:43% !important;
  }
  .mobile-bag__badge,
  .sahxl-header-only .mobile-bag__badge,
  a.mobile-bag .mobile-bag__badge,
  button.mobile-bag .mobile-bag__badge{
    display:none !important;
    visibility:hidden !important;
    opacity:0 !important;
    pointer-events:none !important;
  }
  body.sahxl-new-music-template .request-form{
    display:none !important;
    visibility:hidden !important;
    opacity:0 !important;
    pointer-events:none !important;
    height:0 !important;
    min-height:0 !important;
    max-height:0 !important;
    margin:0 !important;
    padding:0 !important;
    overflow:hidden !important;
  }
  body.sahxl-vip-access-template .wc-facebook-pixel-event-placeholder,
  body.sahxl-homepage-template .wc-facebook-pixel-event-placeholder{
    display:none !important;
    visibility:hidden !important;
    opacity:0 !important;
    pointer-events:none !important;
    height:0 !important;
    width:0 !important;
    overflow:hidden !important;
  }
}


/* v11 desktop-only product page top CTA sizing */
@media (min-width:1025px){
  html body.sahxl-product-template .top-cta,
  html body.single-product .top-cta,
  body.sahxl-product-template .top-cta,
  body.single-product .top-cta{
    min-height:47px !important;
    min-width:228px !important;
  }
}


/* SAHXL PATCH V12 — mobile-only requested fixes only */
@media (max-width: 767px){
  html.sahxl-woocommerce-products-loaded,
  body.sahxl-woocommerce-products-loaded,
  body.sahxl-collection-template,
  body.sahxl-collection-template.sahxl-woocommerce-products-loaded,
  body.sahxl-collection-template .sahxl-woocommerce-products-loaded,
  html.sahxl-page-transition-ready,
  body.sahxl-page-transition-ready,
  .sahxl-page-transition-ready{
    margin-top:0px !important;
  }

  body.sahxl-collection-template .mobile-drawer__content,
  body.sahxl-collection-template .mobile-drawer.is-open .mobile-drawer__content,
  body.sahxl-collection-template.mobile-menu-open .mobile-drawer__content,
  body.sahxl-collection-template.sahxl-mobile-drawer-lock .mobile-drawer__content{
    top:43% !important;
  }

  body.sahxl-new-music-template .request-form{
    display:block !important;
    visibility:visible !important;
    opacity:1 !important;
    height:auto !important;
    min-height:0 !important;
    max-height:none !important;
    pointer-events:auto !important;
    overflow:visible !important;
  }

  body.sahxl-vip-access-template .wc-facebook-pixel-event-placeholder,
  body.sahxl-vip-access-template .sahxl-screen-overlay-videos,
  body.sahxl-vip-access-template .sahxl-desktop-artboard .sahxl-screen-overlay-videos,
  body.sahxl-vip-access-template .mobile-bag__badge,
  .mobile-bag__badge{
    display:none !important;
    visibility:hidden !important;
    opacity:0 !important;
    pointer-events:none !important;
  }
}


/* SAHXL PATCH V13 — mobile-only requested fixes, no desktop changes */
@media (max-width: 767px){
  html.sahxl-woocommerce-products-loaded,
  body.sahxl-woocommerce-products-loaded,
  body.sahxl-collection-template,
  body.sahxl-collection-template.sahxl-woocommerce-products-loaded,
  body.sahxl-collection-template .sahxl-woocommerce-products-loaded,
  html.sahxl-page-transition-ready,
  body.sahxl-page-transition-ready,
  .sahxl-page-transition-ready{
    margin-top:0px !important;
  }

  body.sahxl-collection-template #mobile-drawer .mobile-drawer__content,
  body.sahxl-collection-template #mobile-drawer.is-open .mobile-drawer__content,
  body.sahxl-collection-template .mobile-drawer.is-open .mobile-drawer__content,
  body.sahxl-collection-template.mobile-menu-open #mobile-drawer .mobile-drawer__content,
  body.sahxl-collection-template.sahxl-mobile-drawer-lock #mobile-drawer .mobile-drawer__content{
    --drawer-menu-top:43% !important;
    top:43% !important;
  }

  body.sahxl-new-music-template .request-form__inner{
    padding-right:20px !important;
    padding-left:20px !important;
    padding-bottom:20px !important;
    box-sizing:border-box !important;
  }

  body.sahxl-vip-access-template .wc-facebook-pixel-event-placeholder,
  body.sahxl-vip-access-template .sahxl-screen-overlay-videos,
  body.sahxl-vip-access-template .sahxl-desktop-artboard .sahxl-screen-overlay-videos,
  body.sahxl-vip-access-template .mobile-bag__badge{
    display:none !important;
    visibility:hidden !important;
    opacity:0 !important;
    pointer-events:none !important;
    width:0 !important;
    height:0 !important;
    min-width:0 !important;
    min-height:0 !important;
    max-width:0 !important;
    max-height:0 !important;
    overflow:hidden !important;
  }

  body.sahxl-product-template .mobile-menu,
  body.sahxl-product-template .sahxl-header-only .mobile-menu,
  body.single-product .mobile-menu,
  body.single-product .sahxl-header-only .mobile-menu{
    display:block !important;
    visibility:visible !important;
    opacity:1 !important;
    pointer-events:auto !important;
  }
}
