/* Han AvMarket 1.2.1 - horizontal overflow hotfix */

/* Prevent page-level horizontal overflow without creating a new scroll container. */
html,
body{
    width:100%;
    max-width:100%;
    overflow-x:clip;
}

/* Accessible hidden text must not sit thousands of pixels outside the viewport. */
.screen-reader-text,
.hanav-skip-link{
    position:absolute!important;
    width:1px!important;
    height:1px!important;
    padding:0!important;
    margin:-1px!important;
    overflow:hidden!important;
    clip:rect(0,0,0,0)!important;
    clip-path:inset(50%)!important;
    white-space:nowrap!important;
    border:0!important;
    left:auto!important;
}
.hanav-skip-link:focus{
    width:auto!important;
    height:auto!important;
    margin:0!important;
    overflow:visible!important;
    clip:auto!important;
    clip-path:none!important;
    white-space:normal!important;
    left:18px!important;
    top:18px!important;
}

/* Generic media/content guards. */
.hanav-main,
.hanav-container,
.hanav-page-content,
.hanav-woocommerce-wrap,
.woocommerce,
.woocommerce-page{
    min-width:0;
    max-width:100%;
}
.hanav-page-content img,
.hanav-page-content svg,
.hanav-page-content video,
.hanav-page-content canvas,
.hanav-page-content iframe,
.woocommerce img,
.woocommerce svg,
.woocommerce video,
.woocommerce iframe{
    max-width:100%;
}
.hanav-page-content pre,
.hanav-page-content table{
    max-width:100%;
}
.hanav-page-content pre{
    overflow:auto;
    white-space:pre-wrap;
    overflow-wrap:anywhere;
}
.hanav-page-content p,
.hanav-page-content li,
.hanav-page-content a,
.woocommerce p,
.woocommerce td,
.woocommerce th{
    overflow-wrap:anywhere;
}

/* Product detail: keep every grid/flex child inside the content width. */
.single-product .hanav-woocommerce-wrap,
.single-product div.product,
.single-product div.product > *,
.single-product .woocommerce-product-gallery,
.single-product .woocommerce-product-gallery .flex-viewport,
.single-product .summary,
.single-product .woocommerce-tabs,
.single-product section.related,
.single-product section.upsells{
    min-width:0!important;
    max-width:100%!important;
}
.single-product div.product{
    width:100%!important;
}
.single-product .woocommerce-product-gallery .flex-viewport{
    overflow:hidden!important;
}
.single-product .woocommerce-product-gallery__image,
.single-product .woocommerce-product-gallery__image a,
.single-product .woocommerce-product-gallery__image img{
    max-width:100%!important;
}
.single-product .flex-control-thumbs{
    max-width:100%!important;
    overflow:hidden!important;
}
.single-product .flex-control-thumbs > li{
    min-width:0!important;
    max-width:100%!important;
}
.single-product .summary form.cart,
.single-product .summary .variations_form,
.single-product .summary .single_variation_wrap,
.single-product .summary .woocommerce-variation-add-to-cart{
    width:100%;
    max-width:100%;
    min-width:0;
}
.single-product .summary table.variations{
    width:100%!important;
    max-width:100%!important;
    table-layout:fixed;
}
.single-product .summary table.variations th,
.single-product .summary table.variations td{
    width:100%!important;
    max-width:100%!important;
}
.single-product .summary table.variations select,
.single-product .summary .select2-container{
    width:100%!important;
    max-width:100%!important;
    min-width:0!important;
}
.single-product div.product .woocommerce-tabs ul.tabs{
    max-width:100%;
}
.single-product .woocommerce-Tabs-panel,
.single-product .woocommerce-Tabs-panel > *{
    max-width:100%;
}
.single-product section.related ul.products,
.single-product section.upsells ul.products{
    width:100%!important;
    max-width:100%!important;
    min-width:0!important;
}

/* WooCommerce layouts: grids, tables and enhanced selects must not force body width. */
.woocommerce ul.products,
.woocommerce ul.products li.product,
.woocommerce-cart .woocommerce,
.woocommerce-cart .woocommerce-cart-form,
.woocommerce-cart .cart-collaterals,
.woocommerce-checkout form.checkout,
.woocommerce-checkout form.checkout > *,
.hanav-checkout-layout,
.hanav-checkout-layout > *,
.woocommerce-account .woocommerce,
.woocommerce-account .woocommerce-MyAccount-content{
    min-width:0!important;
    max-width:100%!important;
}
.woocommerce table.shop_table{
    max-width:100%!important;
}
.woocommerce .select2-container,
.woocommerce-page .select2-container{
    max-width:100%!important;
}

/* Shop/category hero fills the available page width without viewport-unit overflow. */
.hanav-shop-hero{
    width:calc(100% + 48px)!important;
    max-width:calc(100% + 48px)!important;
    margin-left:-24px!important;
    margin-right:-24px!important;
}

/* Fixed UI must use the actual containing block instead of 100vw (which can include scrollbar width). */
.hanav-sales-popup{
    width:min(350px,calc(100% - 40px))!important;
    max-width:calc(100% - 40px)!important;
}
.hanav-toast{
    max-width:calc(100% - 24px)!important;
}

@media (max-width:1100px){
    /* Switch product detail to one column before the desktop grid becomes too narrow. */
    .single-product div.product{
        grid-template-columns:minmax(0,1fr)!important;
        column-gap:0!important;
    }
    .single-product div.product > .woocommerce-product-gallery,
    .single-product div.product > .summary,
    .single-product div.product > .woocommerce-tabs,
    .single-product div.product > .related,
    .single-product div.product > .upsells,
    .single-product div.product > .hanav-trust-strip{
        grid-column:1!important;
        grid-row:auto!important;
    }
    .single-product .summary{
        margin-top:30px!important;
    }
}

@media (max-width:767px){
    .hanav-sales-popup{
        left:10px!important;
        right:10px!important;
        width:auto!important;
        max-width:none!important;
    }
    .hanav-toast{
        width:auto!important;
        max-width:calc(100% - 24px)!important;
    }
    .hanav-shop-hero{
        width:calc(100% + 24px)!important;
        max-width:calc(100% + 24px)!important;
        margin-left:-12px!important;
        margin-right:-12px!important;
    }
    .single-product .summary form.cart,
    .single-product .summary .woocommerce-variation-add-to-cart{
        min-width:0!important;
    }
    .single-product div.product .woocommerce-tabs ul.tabs{
        overflow-x:auto!important;
        overflow-y:hidden!important;
        -webkit-overflow-scrolling:touch;
        scrollbar-width:none;
    }
    .single-product div.product .woocommerce-tabs ul.tabs::-webkit-scrollbar{
        display:none;
    }
    .woocommerce-cart .woocommerce-cart-form{
        overflow-x:clip;
    }
}
