/* ==================================================
   DNF SINGLE PRODUCT CLEAN LAYOUT
   ================================================== */

body.single-product .woocommerce-breadcrumb,
body.single-product nav.woocommerce-breadcrumb,
body.single-product .rank-math-breadcrumb,
body.single-product .yoast-breadcrumb {
    width: 100vw !important;
    max-width: none !important;
    margin-left: calc(50% - 50vw) !important;
    margin-right: calc(50% - 50vw) !important;
    padding: 12px 24px 8px !important;
    box-sizing: border-box !important;
    color: #4f9874 !important;
    font-size: 13.5px !important;
    line-height: 1.5 !important;
}

body.single-product .site-content,
body.single-product .content-area,
body.single-product .ast-container {
    padding-top: 0 !important;
}

body.single-product div.product {
    margin-top: 8px !important;
}

@media (min-width: 922px) {
    body.single-product div.product div.images,
    body.single-product div.product .woocommerce-product-gallery {
        width: 44% !important;
        max-width: 560px !important;
        margin-bottom: 26px !important;
    }

    body.single-product div.product div.summary {
        width: 52% !important;
        max-width: 800px !important;
        padding-top: 0 !important;
    }
}

body.single-product div.product div.images img,
body.single-product div.product .woocommerce-product-gallery img,
body.single-product .woocommerce-product-gallery__image img {
    max-height: 520px !important;
    width: 100% !important;
    height: auto !important;
    object-fit: contain !important;
}

body.single-product div.product .product_title {
    margin-bottom: 10px !important;
    color: #111111 !important;
    font-size: clamp(24px, 2vw, 34px) !important;
    font-weight: 750 !important;
    line-height: 1.18 !important;
    letter-spacing: -0.035em !important;
}

body.single-product div.product form.cart {
    display: flex !important;
    flex-wrap: wrap !important;
    align-items: stretch !important;
    gap: 12px 14px !important;
    margin-top: 18px !important;
    padding-top: 16px !important;
    border-top: 1px solid #111111 !important;
}

body.single-product div.product form.cart table.variations,
body.single-product div.product form.cart .variations {
    flex: 0 0 100% !important;
    width: 100% !important;
    margin-bottom: 12px !important;
}

body.single-product div.product form.cart div.quantity,
body.single-product div.product form.cart .quantity {
    width: 58px !important;
    flex: 0 0 58px !important;
    margin: 0 !important;
}

body.single-product div.product form.cart .quantity input.qty {
    width: 58px !important;
    height: 44px !important;
    border: 1px solid #222222 !important;
    text-align: center !important;
}

body.single-product div.product form.cart .single_add_to_cart_button,
body.single-product div.product form.cart .dnf-buy-now-button {
    height: 44px !important;
    min-height: 44px !important;
    padding: 0 26px !important;
    border-radius: 0 !important;
    font-size: 15px !important;
    font-weight: 750 !important;
    line-height: 44px !important;
    box-shadow: none !important;
}

body.single-product div.product form.cart .single_add_to_cart_button:not(.dnf-buy-now-button) {
    background: #111111 !important;
    border: 1px solid #111111 !important;
    color: #ffffff !important;
}

body.single-product div.product form.cart .single_add_to_cart_button:not(.dnf-buy-now-button):hover {
    background: #61aa85 !important;
    border-color: #61aa85 !important;
    color: #ffffff !important;
}

body.single-product div.product form.cart .dnf-buy-now-button {
    background: #61aa85 !important;
    border: 1px solid #61aa85 !important;
    color: #ffffff !important;
}

body.single-product div.product form.cart .dnf-buy-now-button:hover {
    background: #111111 !important;
    border-color: #111111 !important;
    color: #ffffff !important;
}

body.single-product .woocommerce-product-details__short-description {
    width: 100% !important;
    flex: 0 0 100% !important;
    margin: 18px 0 0 !important;
    padding: 16px 18px !important;
    background: #ffffff !important;
    border-left: 4px solid #61aa85 !important;
    color: #333333 !important;
    font-size: 15px !important;
    line-height: 1.72 !important;
}

/* Clean price */
.dnf-price-clean,
.price .dnf-price-clean {
    display: block !important;
    min-height: 48px !important;
    line-height: 1.3 !important;
}

.dnf-price-clean-regular,
.dnf-price-clean-regular *,
.dnf-price-clean-regular .amount,
.dnf-price-clean-regular bdi {
    display: block !important;
    color: #61aa85 !important;
    font-size: 16px !important;
    font-weight: 800 !important;
}

.dnf-price-clean.has-sale .dnf-price-clean-regular,
.dnf-price-clean.has-sale .dnf-price-clean-regular *,
.dnf-price-clean.has-sale .dnf-price-clean-regular del {
    color: #61aa85 !important;
    text-decoration: line-through !important;
    text-decoration-thickness: 1.4px !important;
    text-decoration-color: #61aa85 !important;
}

.dnf-price-clean-sale,
.dnf-price-clean-sale *,
.dnf-price-clean-sale .amount,
.dnf-price-clean-sale bdi {
    display: block !important;
    color: #f87474 !important;
    font-size: 17px !important;
    font-weight: 850 !important;
    text-decoration: none !important;
}

@media (max-width: 921px) {
    body.single-product .woocommerce-breadcrumb,
    body.single-product nav.woocommerce-breadcrumb,
    body.single-product .rank-math-breadcrumb,
    body.single-product .yoast-breadcrumb {
        width: 100% !important;
        margin-left: 0 !important;
        margin-right: 0 !important;
        padding-left: 16px !important;
        padding-right: 16px !important;
    }

    body.single-product div.product div.images,
    body.single-product div.product .woocommerce-product-gallery,
    body.single-product div.product div.summary {
        width: 100% !important;
        max-width: none !important;
    }

    body.single-product div.product div.images img,
    body.single-product div.product .woocommerce-product-gallery img {
        max-height: 460px !important;
    }
}


/* DNF_PRICE_CLEAN_NO_SPLIT_OVERRIDE_START */
body.single-product .dnf-price-clean {
    display: flex !important;
    flex-direction: column !important;
    align-items: flex-start !important;
    gap: 2px !important;
    width: 100% !important;
}

body.single-product .dnf-price-clean-regular,
body.single-product .dnf-price-clean-sale {
    display: block !important;
    width: 100% !important;
    white-space: nowrap !important;
}

body.single-product .dnf-price-clean-regular *,
body.single-product .dnf-price-clean-sale * {
    display: inline !important;
    width: auto !important;
    white-space: nowrap !important;
}
/* DNF_PRICE_CLEAN_NO_SPLIT_OVERRIDE_END */


/* DNF_SINGLE_PRODUCT_TIGHT_LAYOUT_START */

/*
 * Kéo block thông tin / giá sát hình ảnh hơn.
 * Chỉ áp dụng desktop, không phá mobile.
 */
@media (min-width: 1025px) {
    body.single-product div.product {
        display: grid !important;
        grid-template-columns: minmax(540px, 38%) minmax(0, 1fr) !important;
        column-gap: 18px !important;
        row-gap: 24px !important;
        align-items: start !important;
    }

    body.single-product div.product div.images,
    body.single-product div.product .woocommerce-product-gallery {
        grid-column: 1 !important;
        float: none !important;
        width: 100% !important;
        max-width: 660px !important;
        margin: 0 !important;
        padding: 0 !important;
        justify-self: start !important;
    }

    body.single-product div.product div.summary,
    body.single-product div.product .summary.entry-summary {
        grid-column: 2 !important;
        float: none !important;
        width: 100% !important;
        max-width: none !important;
        margin: 0 !important;
        padding: 0 !important;
        align-self: start !important;
        transform: none !important;
        position: relative !important;
        left: 0 !important;
    }

    body.single-product div.product .summary .product_title,
    body.single-product div.product .summary .price,
    body.single-product div.product .summary .woocommerce-variation-price,
    body.single-product div.product .summary form.cart,
    body.single-product div.product .summary .woocommerce-product-details__short-description {
        width: 100% !important;
        max-width: none !important;
    }

    body.single-product .woocommerce-product-gallery__wrapper {
        margin: 0 !important;
        padding: 0 !important;
    }

    body.single-product .woocommerce-product-gallery .woocommerce-product-gallery__image img {
        width: 100% !important;
        height: auto !important;
        object-fit: contain !important;
    }

    body.single-product div.product .woocommerce-tabs,
    body.single-product div.product .dnf-sp-related-products,
    body.single-product div.product section.related.products,
    body.single-product div.product .related.products {
        grid-column: 1 / -1 !important;
        width: 100% !important;
    }
}

/*
 * Màn rất rộng: giữ ảnh gọn, block thông tin sát hơn.
 */
@media (min-width: 1440px) {
    body.single-product div.product {
        grid-template-columns: minmax(600px, 37%) minmax(0, 1fr) !important;
        column-gap: 18px !important;
    }

    body.single-product div.product div.images,
    body.single-product div.product .woocommerce-product-gallery {
        max-width: 640px !important;
    }
}

/*
 * Mobile/tablet giữ 1 cột bình thường.
 */
@media (max-width: 1024px) {
    body.single-product div.product {
        display: block !important;
    }

    body.single-product div.product div.images,
    body.single-product div.product .woocommerce-product-gallery,
    body.single-product div.product div.summary,
    body.single-product div.product .summary.entry-summary {
        width: 100% !important;
        max-width: 100% !important;
        margin: 0 0 20px 0 !important;
        padding: 0 !important;
    }
}

/* DNF_SINGLE_PRODUCT_TIGHT_LAYOUT_END */
