:root {
            --devvn-readmore-max-height: 800px;
            --devvn-readmore-button-bg: #887839;
            --devvn-readmore-button-color: #fff;
        }

        .single-product-page #tab-description {
            position: relative;
            overflow: visible;
        }

        .single-product-page #tab-description.fix_height {
            max-height: var(--devvn-readmore-max-height);
            overflow: hidden;
        }

        /*
         * Giữ nguyên cơ chế ẩn tab chưa active của Flatsome.
         */
        .single-product-page .tab-panels #tab-description.panel:not(.active) {
            height: 0 !important;
            overflow: hidden;
            padding-bottom: 0;
        }

        /*
         * Wrapper nút.
         */
        .devvn_readmore_flatsome {
            width: 100%;
            text-align: center;
            box-sizing: border-box;
        }

        /*
         * Khi nội dung đang thu gọn:
         * nút nằm ở đáy vùng max-height.
         */
        #tab-description.fix_height > .devvn_readmore_flatsome {
            position: absolute;
            right: 0;
            bottom: 0;
            left: 0;
            z-index: 20;
            background: #fff;
        }

        /*
         * Lớp gradient chỉ xuất hiện khi nội dung đang thu gọn.
         * pointer-events:none ngăn pseudo-element chặn thao tác touch.
         */
        #tab-description.fix_height > .devvn_readmore_flatsome::before {
            display: block;
            height: 55px;
            margin-top: -45px;
            content: "";
            pointer-events: none;
            background: linear-gradient(
                to bottom,
                rgba(255, 255, 255, 0) 0%,
                rgba(255, 255, 255, 1) 100%
            );
        }

        /*
         * Khi nội dung đã mở:
         * nút trở về luồng tài liệu bình thường.
         */
        #tab-description:not(.fix_height) > .devvn_readmore_flatsome {
            position: relative;
            z-index: 1;
            margin-top: 24px;
            background: transparent;
        }

        #tab-description:not(.fix_height) > .devvn_readmore_flatsome::before {
            display: none;
        }

        /*
         * Dùng button thay cho thẻ a để tránh:
         * - javascript:void(0)
         * - hành vi focus/click hai lần trên mobile
         * - điều hướng giả bằng href
         */
        .devvn_readmore_toggle {
            display: inline-flex;
            align-items: center;
            justify-content: center;
            gap: 6px;
            min-height: 40px;
            padding: 0 28px;
            border: 0;
            border-radius: 5px;
            outline: none;
            background-color: var(--devvn-readmore-button-bg);
            color: var(--devvn-readmore-button-color);
            font-family: inherit;
            font-size: 15px;
            font-weight: 700;
            line-height: 1.25;
            text-align: center;
            text-transform: uppercase;
            text-decoration: none;
            cursor: pointer;
            touch-action: manipulation;
            -webkit-appearance: none;
            appearance: none;
            box-sizing: border-box;
            -webkit-tap-highlight-color: transparent;
        }

        .devvn_readmore_toggle:hover,
        .devvn_readmore_toggle:focus {
            background-color: var(--devvn-readmore-button-bg);
            color: var(--devvn-readmore-button-color);
        }

        .devvn_readmore_toggle:focus-visible {
            outline: 2px solid currentColor;
            outline-offset: 3px;
        }

        .devvn_readmore_toggle i {
            flex: 0 0 auto;
            margin: 0;
            font-size: 20px;
            line-height: 1;
            pointer-events: none;
        }

        .devvn_readmore_toggle_label {
            pointer-events: none;
        }

        /*
         * JS dùng thuộc tính hidden trong quá trình kiểm tra.
         */
        .devvn_readmore_flatsome[hidden] {
            display: none !important;
        }

        @media (max-width: 849px) {
            .single-product-page #tab-description {
                margin-bottom: 12px;
            }

            #tab-description.fix_height > .devvn_readmore_flatsome::before {
                height: 48px;
                margin-top: -38px;
            }

            #tab-description:not(.fix_height) > .devvn_readmore_flatsome {
                margin-top: 18px;
            }

            .devvn_readmore_toggle {
                width: auto;
                max-width: calc(100% - 24px);
                min-height: 40px;
                padding: 10px 18px;
                font-size: 14px;
                line-height: 1.2;
            }

            .devvn_readmore_toggle i {
                font-size: 18px;
            }
        }

        @media (prefers-reduced-motion: reduce) {
            html:focus-within {
                scroll-behavior: auto;
            }
        }
