/*
 * Hotlock WooCommerce Single Product Final Layout Fix
 * Fixes product summary spacing and forces tabs + related products to full width.
 * 2026-06-21
 */

body.single-product.hotlock-wc-single-product-page .hotlock-wc-page,
body.single-product .hotlock-wc-page {
    padding: 46px 0 76px !important;
    background: #f4f6f9 !important;
}

body.single-product .hotlock-wc-container {
    width: min(1210px, calc(100vw - 72px)) !important;
    max-width: 1210px !important;
    margin-left: auto !important;
    margin-right: auto !important;
    box-sizing: border-box !important;
}

/* Scope the 2-column layout only to the main WooCommerce product wrapper.
   Related product cards also have product/type-product classes, so broad selectors break them. */
body.single-product .hotlock-wc-container > div.product.type-product,
body.single-product .hotlock-wc-container > div[id^="product-"].product.type-product {
    display: grid !important;
    grid-template-columns: minmax(0, 1.08fr) minmax(380px, .92fr) !important;
    gap: 34px !important;
    align-items: start !important;
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;
    margin: 0 !important;
    padding: 0 !important;
    background: transparent !important;
    border: 0 !important;
    box-shadow: none !important;
    overflow: visible !important;
    box-sizing: border-box !important;
}

body.single-product .hotlock-wc-container > div.product.type-product > div.images,
body.single-product .hotlock-wc-container > div[id^="product-"] > div.images,
body.single-product .woocommerce div.product > div.images,
body.single-product.woocommerce-page div.product > div.images {
    grid-column: 1 !important;
    grid-row: 1 !important;
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;
    float: none !important;
    margin: 0 !important;
    padding: 36px !important;
    min-height: 560px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    background: #ffffff !important;
    border: 1px solid rgba(17, 24, 39, .07) !important;
    border-radius: 24px !important;
    box-shadow: 0 22px 58px rgba(15, 23, 42, .07) !important;
    box-sizing: border-box !important;
    overflow: hidden !important;
}

body.single-product .hotlock-wc-container > div.product.type-product > div.summary,
body.single-product .hotlock-wc-container > div[id^="product-"] > div.summary,
body.single-product .woocommerce div.product > div.summary,
body.single-product.woocommerce-page div.product > div.summary {
    grid-column: 2 !important;
    grid-row: 1 !important;
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;
    float: none !important;
    margin: 0 !important;
    padding: 38px 38px 32px !important;
    background: linear-gradient(180deg, #ffffff 0%, #fbfcff 100%) !important;
    border: 1px solid rgba(17, 24, 39, .08) !important;
    border-radius: 24px !important;
    box-shadow: 0 22px 58px rgba(15, 23, 42, .08) !important;
    overflow: hidden !important;
    box-sizing: border-box !important;
}

body.single-product .woocommerce div.product > div.images .woocommerce-product-gallery,
body.single-product .woocommerce div.product > div.images .woocommerce-product-gallery__wrapper,
body.single-product .woocommerce div.product > div.images .woocommerce-product-gallery__image,
body.single-product .woocommerce div.product > div.images .woocommerce-product-gallery__image a {
    width: 100% !important;
    max-width: 100% !important;
    box-sizing: border-box !important;
}

body.single-product .woocommerce div.product > div.images img {
    display: block !important;
    width: 100% !important;
    max-width: 100% !important;
    max-height: 470px !important;
    object-fit: contain !important;
    margin: 0 auto !important;
}

body.single-product .woocommerce div.product > div.summary form.cart {
    margin: 0 0 26px !important;
    padding: 28px 30px !important;
    background: #f7f8fc !important;
    border: 1px solid rgba(17, 24, 39, .08) !important;
    border-radius: 20px !important;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, .7) !important;
    box-sizing: border-box !important;
}

body.single-product .woocommerce div.product > div.summary form.cart:not(.variations_form) {
    display: flex !important;
    align-items: center !important;
    gap: 16px !important;
    flex-wrap: wrap !important;
}

body.single-product .woocommerce div.product > div.summary .quantity .qty,
body.single-product.woocommerce-page div.product > div.summary .quantity .qty {
    width: 96px !important;
    min-width: 96px !important;
    height: 54px !important;
    border-radius: 12px !important;
    border: 1px solid rgba(17, 24, 39, .12) !important;
    background: #ffffff !important;
    color: #101426 !important;
    font-weight: 800 !important;
    text-align: center !important;
}

body.single-product .woocommerce div.product > div.summary form.cart .single_add_to_cart_button,
body.single-product.woocommerce div.product > div.summary form.cart .single_add_to_cart_button,
body.single-product.woocommerce-page div.product > div.summary form.cart .single_add_to_cart_button {
    min-width: 220px !important;
    height: 54px !important;
    border-radius: 13px !important;
    background: linear-gradient(135deg, #ffda57 0%, #ffc20f 100%) !important;
    color: #101426 !important;
    box-shadow: 0 14px 30px rgba(255, 194, 15, .24) !important;
    font-size: 13px !important;
    font-weight: 900 !important;
    letter-spacing: .02em !important;
}

/* Tabs must be below both top columns, not in the left column. */
body.single-product .hotlock-wc-container > div.product.type-product > .woocommerce-tabs,
body.single-product .hotlock-wc-container > div[id^="product-"] > .woocommerce-tabs,
body.single-product .woocommerce div.product > .woocommerce-tabs,
body.single-product.woocommerce-page div.product > .woocommerce-tabs {
    grid-column: 1 / -1 !important;
    grid-row: auto !important;
    order: 20 !important;
    display: block !important;
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;
    float: none !important;
    clear: both !important;
    margin: 42px 0 0 !important;
    padding: 0 !important;
    background: #ffffff !important;
    border: 1px solid rgba(17, 24, 39, .08) !important;
    border-radius: 24px !important;
    box-shadow: 0 18px 48px rgba(15, 23, 42, .07) !important;
    overflow: hidden !important;
    box-sizing: border-box !important;
}

body.single-product .woocommerce div.product > .woocommerce-tabs ul.tabs {
    padding: 24px 28px 0 !important;
    margin: 0 !important;
    background: #ffffff !important;
}

body.single-product .woocommerce div.product > .woocommerce-tabs .panel {
    padding: 34px 38px 38px !important;
    margin: 0 !important;
    box-sizing: border-box !important;
}

/* Related/upsell products must be below Description and full width. */
body.single-product .hotlock-wc-container > div.product.type-product > .related.products,
body.single-product .hotlock-wc-container > div[id^="product-"] > .related.products,
body.single-product .woocommerce div.product > .related.products,
body.single-product.woocommerce-page div.product > .related.products,
body.single-product .hotlock-wc-container > div.product.type-product > .up-sells.products,
body.single-product .woocommerce div.product > .up-sells.products {
    grid-column: 1 / -1 !important;
    grid-row: auto !important;
    order: 30 !important;
    display: block !important;
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;
    float: none !important;
    clear: both !important;
    margin: 42px 0 0 !important;
    box-sizing: border-box !important;
}

body.single-product .related.products.hotlock-related-products-slider {
    position: relative !important;
    display: block !important;
    padding: 30px !important;
    background: #ffffff !important;
    border: 1px solid rgba(17, 24, 39, .08) !important;
    border-radius: 24px !important;
    box-shadow: 0 18px 48px rgba(15, 23, 42, .07) !important;
    overflow: hidden !important;
}

body.single-product .related.products.hotlock-related-products-slider > h2 {
    margin: 0 0 24px !important;
    padding: 0 116px 0 0 !important;
    color: #101426 !important;
    font-size: 30px !important;
    line-height: 1.18 !important;
    font-weight: 900 !important;
    letter-spacing: -.02em !important;
}

body.single-product .related.products.hotlock-related-products-slider .hotlock-related-slider-controls {
    position: absolute !important;
    top: 28px !important;
    right: 30px !important;
    z-index: 5 !important;
    display: flex !important;
    gap: 10px !important;
}

body.single-product .related.products.hotlock-related-products-slider .hotlock-related-slider-controls.is-hidden {
    display: none !important;
}

body.single-product .related.products.hotlock-related-products-slider .hotlock-related-slider-btn {
    width: 42px !important;
    height: 42px !important;
    min-width: 42px !important;
    min-height: 42px !important;
    padding: 0 !important;
    border: 1px solid rgba(17, 24, 39, .09) !important;
    border-radius: 999px !important;
    background: #ffffff !important;
    color: #101426 !important;
    box-shadow: 0 12px 24px rgba(15, 23, 42, .1) !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    cursor: pointer !important;
}

body.single-product .related.products.hotlock-related-products-slider .hotlock-related-slider-btn:hover:not(:disabled) {
    background: #ffc20f !important;
    border-color: #ffc20f !important;
    color: #101426 !important;
}

body.single-product .related.products.hotlock-related-products-slider .hotlock-related-slider-btn:disabled {
    opacity: .45 !important;
    cursor: default !important;
}

body.single-product .related.products.hotlock-related-products-slider .hotlock-related-slider-viewport {
    display: block !important;
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;
    overflow-x: auto !important;
    overflow-y: hidden !important;
    padding: 2px 2px 12px !important;
    margin: 0 !important;
    box-sizing: border-box !important;
    scroll-snap-type: x mandatory !important;
    scrollbar-width: none !important;
}

body.single-product .related.products.hotlock-related-products-slider .hotlock-related-slider-viewport::-webkit-scrollbar {
    display: none !important;
}

body.single-product .related.products.hotlock-related-products-slider ul.products.hotlock-related-slider-list,
body.single-product.woocommerce .related.products.hotlock-related-products-slider ul.products.hotlock-related-slider-list,
body.single-product.woocommerce-page .related.products.hotlock-related-products-slider ul.products.hotlock-related-slider-list {
    display: flex !important;
    flex-wrap: nowrap !important;
    align-items: stretch !important;
    gap: 26px !important;
    width: max-content !important;
    max-width: none !important;
    min-width: 100% !important;
    margin: 0 !important;
    padding: 0 !important;
    list-style: none !important;
    grid-template-columns: none !important;
    overflow: visible !important;
    box-sizing: border-box !important;
}

body.single-product .related.products.hotlock-related-products-slider ul.products.hotlock-related-slider-list::before,
body.single-product .related.products.hotlock-related-products-slider ul.products.hotlock-related-slider-list::after {
    display: none !important;
    content: none !important;
}

body.single-product .related.products.hotlock-related-products-slider ul.products.hotlock-related-slider-list > li.product,
body.single-product.woocommerce .related.products.hotlock-related-products-slider ul.products.hotlock-related-slider-list > li.product,
body.single-product.woocommerce-page .related.products.hotlock-related-products-slider ul.products.hotlock-related-slider-list > li.product,
body.single-product .related.products.hotlock-related-products-slider ul.products.hotlock-related-slider-list > li.product.type-product {
    position: relative !important;
    display: flex !important;
    flex-direction: column !important;
    flex: 0 0 calc((1210px - 78px) / 4) !important;
    width: calc((1210px - 78px) / 4) !important;
    max-width: calc((1210px - 78px) / 4) !important;
    min-width: 260px !important;
    height: auto !important;
    min-height: 100% !important;
    margin: 0 !important;
    padding: 18px 18px 22px !important;
    float: none !important;
    clear: none !important;
    background: #ffffff !important;
    border: 1px solid rgba(17, 24, 39, .08) !important;
    border-radius: 20px !important;
    box-shadow: 0 12px 34px rgba(15, 23, 42, .07) !important;
    overflow: hidden !important;
    text-align: left !important;
    scroll-snap-align: start !important;
    grid-template-columns: none !important;
    grid-column: auto !important;
    gap: 0 !important;
    box-sizing: border-box !important;
}

body.single-product .related.products.hotlock-related-products-slider ul.products.hotlock-related-slider-list > li.product:hover {
    transform: translateY(-3px) !important;
    border-color: rgba(255, 194, 15, .45) !important;
    box-shadow: 0 18px 46px rgba(15, 23, 42, .11) !important;
}

body.single-product .related.products.hotlock-related-products-slider li.product > a,
body.single-product .related.products.hotlock-related-products-slider li.product .woocommerce-LoopProduct-link,
body.single-product .related.products.hotlock-related-products-slider li.product .post_featured,
body.single-product .related.products.hotlock-related-products-slider li.product .post_data,
body.single-product .related.products.hotlock-related-products-slider li.product .post_data .post_header {
    display: block !important;
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;
    height: auto !important;
    box-sizing: border-box !important;
}

body.single-product .related.products.hotlock-related-products-slider li.product .post_data {
    display: flex !important;
    flex-direction: column !important;
    flex: 1 1 auto !important;
    padding: 0 !important;
    margin: 0 !important;
}

body.single-product .related.products.hotlock-related-products-slider li.product img,
body.single-product .related.products.hotlock-related-products-slider ul.products li.product a img {
    display: block !important;
    width: 100% !important;
    height: 210px !important;
    margin: 0 0 16px !important;
    border-radius: 16px !important;
    object-fit: cover !important;
    background: #f3f5f8 !important;
}

body.single-product .related.products.hotlock-related-products-slider li.product .woocommerce-loop-product__title,
body.single-product .related.products.hotlock-related-products-slider li.product h2,
body.single-product .related.products.hotlock-related-products-slider li.product h3,
body.single-product .related.products.hotlock-related-products-slider li.product .post_header h3 {
    display: block !important;
    width: 100% !important;
    max-width: 100% !important;
    margin: 0 0 10px !important;
    padding: 0 !important;
    color: #101426 !important;
    font-size: 18px !important;
    line-height: 1.28 !important;
    font-weight: 900 !important;
    letter-spacing: 0 !important;
    text-align: left !important;
    white-space: normal !important;
    word-break: normal !important;
    overflow-wrap: normal !important;
    hyphens: none !important;
    writing-mode: horizontal-tb !important;
    text-orientation: mixed !important;
}

body.single-product .related.products.hotlock-related-products-slider li.product .price {
    display: block !important;
    width: 100% !important;
    max-width: 100% !important;
    margin: 0 0 16px !important;
    color: #4b005e !important;
    font-size: 17px !important;
    line-height: 1.25 !important;
    font-weight: 900 !important;
    white-space: normal !important;
    word-break: normal !important;
    overflow-wrap: normal !important;
    writing-mode: horizontal-tb !important;
}

body.single-product .related.products.hotlock-related-products-slider li.product .button,
body.single-product.woocommerce .related.products.hotlock-related-products-slider li.product .button,
body.single-product.woocommerce-page .related.products.hotlock-related-products-slider li.product .button {
    position: relative !important;
    top: auto !important;
    right: auto !important;
    bottom: auto !important;
    left: auto !important;
    transform: none !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    align-self: flex-start !important;
    width: auto !important;
    max-width: 100% !important;
    min-width: 0 !important;
    min-height: 44px !important;
    margin: auto 0 0 !important;
    padding: 0 18px !important;
    border-radius: 12px !important;
    background: linear-gradient(135deg, #ffd64f 0%, #ffc20f 100%) !important;
    color: #101426 !important;
    box-shadow: 0 12px 24px rgba(255, 194, 15, .22) !important;
    font-size: 12px !important;
    line-height: 1 !important;
    font-weight: 900 !important;
    letter-spacing: .04em !important;
    text-transform: uppercase !important;
    text-decoration: none !important;
    white-space: nowrap !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
}

body.single-product .related.products.hotlock-related-products-slider li.product .button:hover {
    background: #4b005e !important;
    color: #ffffff !important;
    transform: translateY(-1px) !important;
}

@media (max-width: 1180px) {
    body.single-product .hotlock-wc-container {
        width: min(100% - 48px, 1040px) !important;
    }
    body.single-product .hotlock-wc-container > div.product.type-product,
    body.single-product .hotlock-wc-container > div[id^="product-"].product.type-product {
        grid-template-columns: 1fr !important;
        gap: 26px !important;
    }
    body.single-product .hotlock-wc-container > div.product.type-product > div.images,
    body.single-product .hotlock-wc-container > div.product.type-product > div.summary,
    body.single-product .woocommerce div.product > div.images,
    body.single-product .woocommerce div.product > div.summary {
        grid-column: 1 / -1 !important;
        grid-row: auto !important;
    }
    body.single-product .woocommerce div.product > div.images {
        min-height: auto !important;
        padding: 30px !important;
    }
    body.single-product .woocommerce div.product > div.images img {
        max-height: 520px !important;
    }
    body.single-product .woocommerce div.product > div.summary {
        padding: 32px !important;
    }
    body.single-product .related.products.hotlock-related-products-slider ul.products.hotlock-related-slider-list > li.product,
    body.single-product.woocommerce .related.products.hotlock-related-products-slider ul.products.hotlock-related-slider-list > li.product,
    body.single-product.woocommerce-page .related.products.hotlock-related-products-slider ul.products.hotlock-related-slider-list > li.product {
        flex-basis: calc((1040px - 52px) / 3) !important;
        width: calc((1040px - 52px) / 3) !important;
        max-width: calc((1040px - 52px) / 3) !important;
    }
}

@media (max-width: 760px) {
    body.single-product .hotlock-wc-container {
        width: calc(100vw - 28px) !important;
    }
    body.single-product .woocommerce div.product > div.images,
    body.single-product .woocommerce div.product > div.summary {
        padding: 22px !important;
        border-radius: 20px !important;
    }
    body.single-product .woocommerce div.product > div.summary form.cart,
    body.single-product .woocommerce div.product > div.summary form.cart:not(.variations_form) {
        display: grid !important;
        grid-template-columns: 1fr !important;
        gap: 12px !important;
        padding: 18px !important;
        border-radius: 16px !important;
    }
    body.single-product .woocommerce div.product > div.summary .quantity .qty,
    body.single-product .woocommerce div.product > div.summary form.cart .single_add_to_cart_button {
        width: 100% !important;
        min-width: 100% !important;
    }
    body.single-product .woocommerce div.product > .woocommerce-tabs .panel {
        padding: 26px 22px 30px !important;
    }
    body.single-product .related.products.hotlock-related-products-slider {
        padding: 22px !important;
        border-radius: 20px !important;
    }
    body.single-product .related.products.hotlock-related-products-slider > h2 {
        padding: 0 !important;
        margin-bottom: 70px !important;
        font-size: 25px !important;
    }
    body.single-product .related.products.hotlock-related-products-slider .hotlock-related-slider-controls {
        top: 70px !important;
        right: auto !important;
        left: 22px !important;
    }
    body.single-product .related.products.hotlock-related-products-slider ul.products.hotlock-related-slider-list {
        gap: 18px !important;
    }
    body.single-product .related.products.hotlock-related-products-slider ul.products.hotlock-related-slider-list > li.product,
    body.single-product.woocommerce .related.products.hotlock-related-products-slider ul.products.hotlock-related-slider-list > li.product,
    body.single-product.woocommerce-page .related.products.hotlock-related-products-slider ul.products.hotlock-related-slider-list > li.product {
        flex-basis: min(320px, calc(100vw - 72px)) !important;
        width: min(320px, calc(100vw - 72px)) !important;
        max-width: min(320px, calc(100vw - 72px)) !important;
        min-width: min(320px, calc(100vw - 72px)) !important;
    }
    body.single-product .related.products.hotlock-related-products-slider li.product img,
    body.single-product .related.products.hotlock-related-products-slider ul.products li.product a img {
        height: 180px !important;
    }
}

body.rtl.single-product .related.products.hotlock-related-products-slider > h2,
html[dir="rtl"] body.single-product .related.products.hotlock-related-products-slider > h2 {
    padding-right: 0 !important;
    padding-left: 116px !important;
    text-align: right !important;
}

body.rtl.single-product .related.products.hotlock-related-products-slider .hotlock-related-slider-controls,
html[dir="rtl"] body.single-product .related.products.hotlock-related-products-slider .hotlock-related-slider-controls {
    right: auto !important;
    left: 30px !important;
}

/* 2026-06-21 - Final fix for stretched WooCommerce tabs on single product.
   Theme JS wraps .woocommerce-tabs inside .trx-stretch-width and injects inline
   left/width/padding values. After converting the single-product layout to CSS grid,
   those inline values become wrong and the tabs occupy only part of the available width.
   Reset the stretch helper on product pages and let the wrapper span the full grid. */
body.single-product .woocommerce div.product > .trx-stretch-width-wrap,
body.single-product.woocommerce-page div.product > .trx-stretch-width-wrap {
    grid-column: 1 / -1 !important;
    grid-row: auto !important;
    order: 20 !important;
    display: block !important;
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;
    float: none !important;
    clear: both !important;
    margin: 42px 0 0 !important;
    padding: 0 !important;
    box-sizing: border-box !important;
}

body.single-product .woocommerce div.product > .trx-stretch-width-wrap > .trx-stretch-width,
body.single-product.woocommerce-page div.product > .trx-stretch-width-wrap > .trx-stretch-width {
    position: relative !important;
    left: 0 !important;
    right: auto !important;
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;
    padding-left: 0 !important;
    padding-right: 0 !important;
    margin: 0 !important;
    transform: none !important;
    box-sizing: border-box !important;
}

body.single-product .woocommerce div.product > .trx-stretch-width-wrap > .trx-stretch-width > .woocommerce-tabs,
body.single-product.woocommerce-page div.product > .trx-stretch-width-wrap > .trx-stretch-width > .woocommerce-tabs {
    display: block !important;
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;
    margin: 0 !important;
    box-sizing: border-box !important;
}

body.single-product .woocommerce div.product > .trx-stretch-width-wrap > .trx-stretch-width-original,
body.single-product.woocommerce-page div.product > .trx-stretch-width-wrap > .trx-stretch-width-original {
    display: none !important;
}

@media (max-width: 760px) {
    body.single-product .woocommerce div.product > .trx-stretch-width-wrap,
    body.single-product.woocommerce-page div.product > .trx-stretch-width-wrap {
        margin-top: 28px !important;
    }
}
