/*
 * Holland Industry product-page mobile/tablet containment repair
 * Build: HI-PDP-RESP-20261010-100
 * Scope: product pages only; desktop >= 992px is unchanged.
 */

@media (max-width: 991px) {
    html,
    body.product_page {
        width: 100% !important;
        max-width: 100% !important;
        overflow-x: hidden !important;
    }

    body.product_page .page-wrap,
    body.product_page main.mndvcls,
    body.product_page main.mndvcls > .container,
    body.product_page .row.outer_row,
    body.product_page .product_info_page,
    body.product_page .product_info_page > form,
    body.product_page .product-info-section,
    body.product_page .product-image-info,
    body.product_page .slider_product_card,
    body.product_page .additional_images2,
    body.product_page .product_right_content,
    body.product_page .product_right_block,
    body.product_page .short-description,
    body.product_page .description_block,
    body.product_page .mblgaiaTxt,
    body.product_page #giai-product-assistant {
        min-width: 0 !important;
        max-width: 100% !important;
        box-sizing: border-box !important;
    }

    /* Remove the nested Bootstrap row overhang that creates horizontal scroll. */
    body.product_page .product-info-section,
    body.product_page .product-image-info {
        width: 100% !important;
        margin-left: 0 !important;
        margin-right: 0 !important;
    }

    body.product_page .row.outer_row {
        width: 100% !important;
        margin-left: 0 !important;
        margin-right: 0 !important;
    }

    body.product_page .product-info-section > .col-lg-9,
    body.product_page .product-info-section > .product_right_content {
        width: 100% !important;
        max-width: 100% !important;
        margin-left: 0 !important;
        margin-right: 0 !important;
        box-sizing: border-box !important;
    }

    /* The old 350px/220px hard widths did not follow the usable viewport. */
    body.product_page #sync1 {
        float: none !important;
        width: 100% !important;
        max-width: 350px !important;
        margin-left: auto !important;
        margin-right: auto !important;
        box-sizing: border-box !important;
    }

    body.product_page #sync1.owl-carousel .owl-stage-outer,
    body.product_page .additional_images2 .owl-stage-outer {
        width: 100% !important;
        max-width: 100% !important;
        overflow: hidden !important;
        box-sizing: border-box !important;
    }

    body.product_page .additional_images2 img,
    body.product_page .description_block img,
    body.product_page .mbldescr1 img,
    body.product_page .description_block iframe,
    body.product_page .mbldescr1 iframe {
        max-width: 100% !important;
        height: auto !important;
    }

    body.product_page .description_block,
    body.product_page .mbldescr1,
    body.product_page .short-description {
        overflow-wrap: anywhere;
        word-break: normal;
    }

    body.product_page .description_block table,
    body.product_page .mbldescr1 table {
        width: 100% !important;
        max-width: 100% !important;
        table-layout: fixed !important;
        box-sizing: border-box !important;
    }

    body.product_page .description_block th,
    body.product_page .description_block td,
    body.product_page .mbldescr1 th,
    body.product_page .mbldescr1 td {
        min-width: 0 !important;
        overflow-wrap: anywhere !important;
        word-break: normal !important;
    }
}

@media (max-width: 767px) {
    /* One 10px master gutter from the viewport edge through the whole PDP. */
    body.product_page main.mndvcls > .container {
        padding-left: 10px !important;
        padding-right: 10px !important;
    }

    body.product_page .row.outer_row,
    body.product_page .product_info_page,
    body.product_page .product-info-section > .col-lg-9,
    body.product_page .product-info-section > .product_right_content,
    body.product_page .product-image-info > .col-sm-6,
    body.product_page .product-image-info > .col-xs-12 {
        padding-left: 0 !important;
        padding-right: 0 !important;
    }

    /* Mobile Hero Reordering: Product Image above highlight bullets */
    body.product_page .product-image-info {
        display: flex !important;
        flex-direction: column !important;
    }
    body.product_page .product-image-info:before,
    body.product_page .product-image-info:after {
        display: none !important;
        content: none !important;
    }
    body.product_page .product-image-info > .col-sm-6:first-of-type,
    body.product_page .product-image-info > .col-xs-12:not(.amazoncompr):not(.productPriceDv) {
        order: 1 !important;
        width: 100% !important;
        min-width: 0 !important;
    }
    body.product_page .product-image-info > .productPriceDv {
        order: 2 !important;
        width: 100% !important;
        min-width: 0 !important;
    }
    body.product_page .product-image-info > .amazoncompr {
        order: 3 !important;
        width: 100% !important;
        min-width: 0 !important;
        margin-top: 15px !important;
    }

    /* Thumbnail Alignment */
    body.product_page #sync2 {
        margin: 0 auto !important;
        display: flex !important;
        justify-content: center !important;
        max-width: 100% !important;
    }
    body.product_page #sync2.owl-carousel .owl-stage-outer {
        margin: 0 auto !important;
    }

    /* Pricing & Shipping formatting */
    body.product_page .summ_price {
        display: flex !important;
        flex-wrap: wrap !important;
        align-items: baseline !important;
        gap: 6px !important;
    }
    body.product_page .summ_price .new_price_card_product {
        font-size: 22px !important;
        font-weight: 800 !important;
        color: #b12704 !important;
    }
    body.product_page .summ_price .shipping_price {
        font-size: 13px !important;
        color: #555 !important;
        font-weight: 400 !important;
        display: block !important;
        width: 100% !important;
        margin-top: 2px !important;
    }
    body.product_page .stock-block.custcls {
        margin: 6px 0 10px 0 !important;
        display: block !important;
    }
    body.product_page .stock-block.custcls .label-success {
        font-size: 12px !important;
        padding: 4px 8px !important;
        border-radius: 4px !important;
        font-weight: 600 !important;
        display: inline-block !important;
    }

    /* Clean mobile card containers with side padding */
    body.product_page .descptnnt.mbldescr,
    body.product_page .description_block.mbldescr1,
    body.product_page .short-description.custShrtDsrc {
        width: 100% !important;
        max-width: 100% !important;
        margin-left: 0 !important;
        margin-right: 0 !important;
        padding: 14px !important;
        background: #fff !important;
        border: 1px solid #e5e7eb !important;
        border-radius: 8px !important;
        margin-bottom: 15px !important;
        box-sizing: border-box !important;
    }

    body.product_page .description_block h3 {
        font-size: 15px !important;
        font-weight: 700 !important;
        color: #1f2937 !important;
        margin-top: 18px !important;
        margin-bottom: 8px !important;
        padding-bottom: 6px !important;
        border-bottom: 1px solid #f3f4f6 !important;
    }
    body.product_page .description_block h3:first-child {
        margin-top: 0 !important;
    }

    /* FBT Bundle: Clean horizontal scroll on mobile prevents awkward 2-and-1 wrap */
    body.product_page .fbt-row {
        display: flex !important;
        flex-wrap: nowrap !important;
        overflow-x: auto !important;
        -webkit-overflow-scrolling: touch !important;
        padding-bottom: 12px !important;
        gap: 8px !important;
        align-items: center !important;
        scrollbar-width: thin !important;
    }
    body.product_page .fbt-item {
        flex: 0 0 92px !important;
        max-width: 92px !important;
        min-width: 88px !important;
    }
    body.product_page .fbt-item img {
        max-width: 75px !important;
        max-height: 75px !important;
    }
    body.product_page .fbt-item-title {
        font-size: 10.5px !important;
        line-height: 1.2 !important;
    }
    body.product_page .fbt-plus {
        margin: 0 2px !important;
        font-size: 18px !important;
        flex-shrink: 0 !important;
    }
    body.product_page .fbt-actions {
        padding-left: 0 !important;
        border-left: none !important;
        border-top: 1px solid #eee !important;
        padding-top: 12px !important;
        width: 100% !important;
        clear: both !important;
    }

    /* Keep the complete free-shipping message visible above the fixed header. */
    body.product_page .test.cssclsOrdstste {
        position: fixed !important;
        top: 0 !important;
        left: 0 !important;
        right: 0 !important;
        width: 100% !important;
        height: auto !important;
        min-height: 24px !important;
        margin: 0 !important;
        padding: 4px 10px !important;
        box-sizing: border-box !important;
        font-size: 10px !important;
        line-height: 14px !important;
        white-space: normal !important;
        text-align: center !important;
        overflow: visible !important;
        z-index: 1102 !important;
    }

    body.product_page .test.cssclsOrdstste a {
        display: inline !important;
        padding: 0 4px !important;
        font-size: inherit !important;
        line-height: inherit !important;
        text-decoration: underline !important;
    }

    body.product_page header.mbb.cssclsOrdstste,
    body.product_page header.mbb.cssclsOrdstste .add_nav .navbar-default,
    body.product_page header.mbb.cssclsOrdstste .navbar-header {
        top: 24px !important;
    }

    /* Header (24px notice + about 84px navigation) stays clear of page/sticky content. */
    body.product_page main.mndvcls,
    body.product_page main.mndvcls.cssclsOrdstste,
    body.product_page main.mndvcls.cssclsOrdstste:not(.cssclsOrdststembl) {
        margin-top: 132px !important;
    }

    body.product_page main.mndvcls .fixed_prodouct_block.fixed,
    body.product_page .productPriceDv .fixed_prodouct_block.fixed,
    body.product_page .productPriceDv .fixed_prodouct_block.fixed_prodouct_block-mbl.fixed {
        top: 108px !important;
        left: 0 !important;
        right: 0 !important;
        width: 100% !important;
        max-width: 100% !important;
        margin: 0 !important;
        padding-left: 10px !important;
        padding-right: 10px !important;
        box-sizing: border-box !important;
    }

    body.product_page .mobile_menu {
        top: 108px !important;
        height: calc(100vh - 108px) !important;
    }
}

