/* =========================================================
   CHỐNG THẤM BUTYL - PRODUCT / SHOP CSS
   File: butyl-product.css

   Dùng cho:
   - WooCommerce Product
   - Shop / Product Category
   - ACF Product Fields
========================================================= */


/* =========================================================
   1. PRODUCT GRID / SHOP
========================================================= */

.shop-container .products {
    row-gap: 20px;
}


/* =========================================================
   2. PRODUCT PAGE - BREADCRUMB RIÊNG
   Breadcrumb chung .group-breadcrumbs đã nằm ở butyl-global.css
========================================================= */

.product-breadcrumbs {
    font-size: 14px;
}

.product-breadcrumbs a {
    color: #5F6C72;
}

.product-breadcrumbs .last {
    color: #CC202B;
}


/* =========================================================
   3. PRODUCT TITLE / DESCRIPTION
========================================================= */

.custom-product .product-title {
    color: #000000;

    font-size: 22px;
}

.product-short-description {
    font-size: 14px;
}


/* =========================================================
   4. PRODUCT TAB
========================================================= */

.product-tabs {
    display: none;
}

.tab-panels {
    font-size: 14px;
}


/* =========================================================
   5. PRODUCT TYPE
========================================================= */

.type-content {
    padding-bottom: 12px;

    color: #CC202B;

    font-weight: 600;
}


/* =========================================================
   6. LEGACY SCOPE OF USE IMAGE
   Giữ cho các sản phẩm cũ đang dùng .scopeofuse-image
========================================================= */

.scopeofuse-image {
    display: flex;

    flex-wrap: wrap;
    justify-content: flex-start;

    gap: 8px;
}

.scopeofuse-image > div {
    display: flex;

    flex-direction: column;
    align-items: flex-start;

    width: 150px;
}

.scopeofuse-image > div img {
    height: 90px;
}

.scopeofuse-image > div p {
    font-size: 14px;
    font-weight: 600;

    overflow-wrap: anywhere;
}


/* =========================================================
   7. ACCORDION
========================================================= */

.accordion-content {
    font-size: 14px;
}

.accordion-title {
    padding: 0.6em 1.5em;

    background-color: rgba(0, 0, 0, 0.03);

    font-weight: 700;
}

.accordion .toggle {
    right: 0;
    left: auto;
}


/* Document / URL cards trong accordion */
.accordion-content-url {
    display: flex;

    flex-wrap: wrap;
    justify-content: space-between;

    gap: 16px;

    font-size: 14px;
}

.accordion-content-url:hover {
    cursor: pointer;
}

.accordion-content-url > div {
    display: flex;

    align-items: center;
    justify-content: space-between;

    width: calc(50% - 8px);

    padding: 16px;

    border: 1px solid rgba(55, 58, 64, 0.2);
    border-radius: 8px;

    font-weight: 700;
}

.accordion-content-url > div a {
    color: #CC202B;

    font-weight: 500;
}


/* =========================================================
   8. RELATED PRODUCTS
========================================================= */

.product-section-title {
    width: fit-content;

    margin: 0 0 32px;
    padding: 8px 16px;

    background-color: #CC202B;

    border-top-right-radius: 30px;
    border-bottom-right-radius: 30px;

    color: #ffffff;

    font-size: 14px;

    text-align: left;
}

.product-section {
    border-top: 0;
}


/* Product card */
.product-small .box {
    padding: 8px;

    background-color: #ffffff;

    border: 1.5px solid #CC202B;
    border-radius: 8px;
}

.product-small img {
    transition: transform 0.3s ease;
}

.product-small:hover img {
    transform: scale(1.05);
}

.product-small .box .box-text {
    padding: 0 12px;
}

.product-small .box .box-text .title-wrapper {
    color: #333333;

    font-size: 14px;
    font-weight: 600;

    text-align: center;
}

.product-small .category {
    padding-top: 4px;

    color: #CC202B;

    font-size: 12px;
    font-weight: 800;

    opacity: 1;
}

.product-small .title-wrapper {
    display: flex;

    flex-direction: column-reverse;
}

.product-small .product-title a {
    display: -webkit-box;

    overflow: hidden;

    color: #101828;

    font-size: 15px;

    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
}

.show-on-hover {
    display: none;
}


/* =========================================================
   9. HTN ACF PRODUCT FIELDS V4
========================================================= */


/* =========================================================
   9.1 GALLERY PHẠM VI SỬ DỤNG
   Desktop: 4 ảnh / hàng
   Tablet + Mobile: 2 ảnh / hàng
========================================================= */

.htn-scope-gallery {
    display: grid !important;

    grid-template-columns: repeat(4, minmax(0, 1fr)) !important;

    align-items: start !important;

    gap: 16px !important;

    width: 100% !important;
    max-width: 100% !important;

    margin: 20px 0 !important;
    padding: 0 !important;
}

.htn-scope-gallery-item {
    display: block !important;

    width: 100% !important;
    max-width: 100% !important;

    padding: 10px !important;

    box-sizing: border-box !important;

    background: #EBE9E7 !important;

    border: 1px solid rgba(207, 32, 47, 0.18) !important;
    border-radius: 12px !important;

    overflow: hidden !important;

    text-align: center !important;

    transition:
        transform 0.2s ease,
        box-shadow 0.2s ease;
}

.htn-scope-gallery-item:hover {
    transform: translateY(-2px);

    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.08);
}

.htn-scope-gallery-item a {
    display: block !important;

    width: 100% !important;

    text-decoration: none !important;
}

.htn-scope-gallery-item img {
    display: block !important;

    width: 100% !important;
    max-width: 100% !important;

    height: auto !important;
    max-height: 170px !important;

    margin: 0 auto !important;

    border-radius: 8px !important;

    object-fit: contain !important;
}

.htn-scope-image-title {
    display: block !important;

    margin-top: 8px !important;

    color: #CF202F !important;

    font-size: 14px !important;
    font-weight: 600 !important;
    line-height: 1.35 !important;

    text-align: center !important;

    overflow-wrap: anywhere !important;
}


/* =========================================================
   9.2 DOCUMENT LIST
========================================================= */

.htn-documents-list {
    margin: 20px 0;

    background: #EBE9E7;

    border: 1px solid rgba(207, 32, 47, 0.22);
    border-radius: 12px;

    overflow: hidden;
}

.htn-document-item {
    margin: 0;
    padding: 0;

    border-bottom: 1px solid rgba(207, 32, 47, 0.16);
}

.htn-document-item:last-child {
    border-bottom: 0;
}

.htn-document-link,
.htn-document-name {
    display: block;

    padding: 14px 48px 14px 18px;

    color: #222;

    font-size: 15px;
    font-weight: 500;
    line-height: 1.55;

    overflow-wrap: anywhere;
}

.htn-document-link {
    position: relative;

    text-decoration: none !important;

    transition:
        color 0.2s ease,
        background-color 0.2s ease,
        padding-left 0.2s ease;
}

.htn-document-link::after {
    content: "↗";

    position: absolute;

    top: 50%;
    right: 18px;

    color: #CF202F;

    font-size: 18px;
    font-weight: 700;
    line-height: 1;

    transform: translateY(-50%);

    transition: transform 0.2s ease;
}

.htn-document-link:hover {
    padding-left: 22px;

    color: #CF202F;

    background: rgba(255, 255, 255, 0.55);
}

.htn-document-link:hover::after {
    transform: translate(2px, -2px);
}

.htn-document-link:focus-visible {
    color: #CF202F;

    background: rgba(255, 255, 255, 0.65);

    outline: 2px solid #CF202F;
    outline-offset: -2px;
}


/* =========================================================
   9.3 ACF TEXT / WYSIWYG
========================================================= */

.htn-acf-content {
    margin: 16px 0;

    color: #222;

    line-height: 1.7;
}

.htn-acf-content p {
    margin-top: 0;
    margin-bottom: 14px;
}

.htn-acf-content p:last-child {
    margin-bottom: 0;
}

.htn-acf-content ul,
.htn-acf-content ol {
    margin-top: 10px;
    margin-bottom: 14px;

    padding-left: 22px;
}

.htn-acf-content li {
    margin-bottom: 6px;
}

.htn-acf-content li:last-child {
    margin-bottom: 0;
}

.htn-acf-content strong,
.htn-acf-content b {
    color: #CF202F;

    font-weight: 700;
}

.htn-acf-content a {
    color: #CF202F;

    font-weight: 600;

    text-decoration: underline;
    text-underline-offset: 3px;
}

.htn-acf-content a:hover {
    color: #a91925;
}


/* =========================================================
   9.4 ACF TYPE
========================================================= */

.htn-acf-type {
    display: inline-block;

    margin: 10px 0;
    padding: 7px 14px;

    background: #EBE9E7;

    color: #CF202F;

    border: 1px solid rgba(207, 32, 47, 0.22);
    border-radius: 999px;

    font-weight: 600;
    line-height: 1.4;
}


/* =========================================================
   9.5 VIDEO
========================================================= */

.htn-acf-video {
    margin: 18px 0;
    padding: 10px;

    background: #EBE9E7;

    border: 1px solid rgba(207, 32, 47, 0.16);
    border-radius: 12px;

    overflow: hidden;
}

.htn-acf-video iframe {
    display: block;

    width: 100% !important;
    max-width: 100% !important;

    height: auto;

    aspect-ratio: 16 / 9;

    border: 0;
    border-radius: 10px;
}

.htn-acf-video video {
    display: block;

    width: 100%;
    max-width: 100%;

    height: auto;

    border-radius: 10px;
}


/* =========================================================
   9.6 PRODUCT TABLE - V4

   Đây là phiên bản .my-table được chọn làm chuẩn.
   Không giữ bộ .my-table cũ song song.
========================================================= */

.my-table {
    width: 100%;

    margin: 20px 0;

    background: #EBE9E7;

    border: 1px solid rgba(207, 32, 47, 0.22);

    border-collapse: collapse;
}

.my-table caption {
    padding: 10px;

    color: #CF202F;

    font-weight: 700;
    line-height: 1.5;

    text-align: left;
}

.my-table th,
.my-table td {
    padding: 12px 14px;

    border: 1px solid rgba(207, 32, 47, 0.18);

    line-height: 1.55;

    text-align: left;
    vertical-align: top;
}

.my-table th {
    background: rgba(255, 255, 255, 0.48);

    color: #CF202F;

    font-weight: 700;
}

.my-table td {
    color: #222;

    font-weight: 400;
}

.my-table tbody tr:nth-child(even) td {
    background: rgba(255, 255, 255, 0.24);
}


/* =========================================================
   9.7 REPEATER / ARRAY FALLBACK
========================================================= */

.htn-acf-item {
    margin-bottom: 10px;
}

.htn-acf-item:last-child {
    margin-bottom: 0;
}

.htn-acf-sub-item {
    margin-bottom: 6px;
}

.htn-acf-sub-item:last-child {
    margin-bottom: 0;
}


/* =========================================================
   10. SHOP / PRODUCT CATEGORY
========================================================= */

.category-page-row {
    padding-bottom: 52px;
}

.shop-page-title .page-title-inner {
    flex-direction: row-reverse;
}

.shop-page-title .page-title-inner .woocommerce-breadcrumb {
    display: none;
}

.woocommerce-ordering .orderby {
    background-color: #CC202B;

    color: #ffffff;

    font-weight: 700;

    text-align: center;
}

.woocommerce-ordering svg {
    fill: #ffffff !important;
}


/* =========================================================
   11. TABLET
========================================================= */

@media screen and (max-width: 768px) {

    .htn-scope-gallery {
        grid-template-columns:
            repeat(2, minmax(0, 1fr)) !important;

        gap: 12px !important;
    }

    .htn-scope-gallery-item {
        padding: 9px !important;
    }

    .htn-scope-gallery-item img {
        max-height: 150px !important;
    }

    .htn-document-link,
    .htn-document-name {
        padding-top: 13px;
        padding-bottom: 13px;
    }

    .my-table th,
    .my-table td {
        padding: 11px 12px;
    }

}


/* =========================================================
   12. MOBILE
========================================================= */

@media screen and (max-width: 480px) {

    .htn-scope-gallery {
        grid-template-columns:
            repeat(2, minmax(0, 1fr)) !important;

        gap: 10px !important;
    }

    .htn-scope-gallery-item {
        padding: 8px !important;

        border-radius: 9px !important;
    }

    .htn-scope-gallery-item img {
        max-height: 130px !important;

        border-radius: 6px !important;
    }

    .htn-scope-image-title {
        font-size: 13px !important;
    }


    /* Documents */
    .htn-documents-list {
        margin: 16px 0;

        border-radius: 9px;
    }

    .htn-document-link,
    .htn-document-name {
        padding: 12px 42px 12px 14px;

        font-size: 14px;
        line-height: 1.5;
    }

    .htn-document-link:hover {
        padding-left: 17px;
    }

    .htn-document-link::after {
        right: 14px;

        font-size: 17px;
    }


    /* Content */
    .htn-acf-content {
        line-height: 1.65;
    }

    .htn-acf-content ul,
    .htn-acf-content ol {
        padding-left: 20px;
    }


    /* Video */
    .htn-acf-video {
        padding: 7px;

        border-radius: 9px;
    }

    .htn-acf-video iframe,
    .htn-acf-video video {
        border-radius: 7px;
    }


    /* Table */
    .my-table {
        display: block;

        max-width: 100%;

        overflow-x: auto;

        -webkit-overflow-scrolling: touch;
    }

    .my-table th,
    .my-table td {
        min-width: 130px;

        padding: 10px;

        font-size: 14px;
        line-height: 1.5;
    }


    /* Accordion cards */
    .accordion-content-url > div {
        width: 100%;
    }

}


/* =========================================================
   13. REDUCED MOTION
========================================================= */

@media (prefers-reduced-motion: reduce) {

    .product-small img,
    .htn-scope-gallery-item,
    .htn-document-link,
    .htn-document-link::after {
        transition: none !important;
    }

    .product-small:hover img,
    .htn-scope-gallery-item:hover {
        transform: none;
    }

}