/* nx-sale-css */

        /* Khung bọc huy hiệu của theme: giữ lại vì nó đã nằm đúng góc ảnh, chỉ gỡ sạch kiểu dáng */
        .badge-container, .badge, .badge-inner, .callout {
            width: auto !important; height: auto !important; min-width: 0 !important; min-height: 0 !important;
            padding: 0 !important; margin: 0 !important; background: none !important;
            border: 0 !important; border-radius: 0 !important; box-shadow: none !important;
            line-height: normal !important; font-size: 0 !important;
        }
        .badge-container { position: absolute !important; top: 10px !important; left: 10px !important; z-index: 6; }
        .single-product .product-gallery .badge-container, .single-product .product-images .badge-container,
        .single-product .woocommerce-product-gallery .badge-container { display: none !important; }

        .nx-sale {
            position: absolute; top: 10px; left: 10px; z-index: 5;
            /* Chiều rộng tối thiểu + chữ số đều bề ngang: -5% và -50% ra cùng một cỡ huy hiệu */
            display: inline-flex; align-items: center; justify-content: center;
            min-width: 54px; padding: 4px 11px; border-radius: 999px;
            font-variant-numeric: tabular-nums; font-feature-settings: 'tnum' 1;
            /* Vàng đồng — cùng màu nút "Mua ngay", đồng bộ toàn web */
            background: linear-gradient(135deg,#B06D33 0%,#DDA26E 50%,#C67C3C 100%);
            color: #302319; font-size: 12px; font-weight: 800; line-height: 1.5;
            letter-spacing: .2px; white-space: nowrap; pointer-events: none;
            box-shadow: 0 3px 10px rgba(176, 109, 51, .35);
        }
        .badge-container .nx-sale, .badge-container .nx-oos,
        .badge .nx-sale, .badge .nx-oos, .callout .nx-sale, .callout .nx-oos {
            position: static !important; font-size: 12px !important;
        }

        .product-small .col-inner, li.product .col-inner,
        .product-small .box, li.product .box,
        .product-small .box-image, li.product .box-image, .nhatdx-hs-thumb { position: relative; }

        /* Nhãn Hết hàng trên ảnh — đủ rõ để nhận ra ngay, không quá rực */
        /* Hai nút trượt của dải "Sản phẩm liên quan" ở trang chi tiết: đổi từ khối chữ nhật dọc
           sang nút tròn giống dải sản phẩm ngoài trang chủ. */
        .nx-oos {
            position: absolute; top: 10px; left: 10px; z-index: 6;
            display: inline-flex; align-items: center; justify-content: center;
            min-width: 54px; padding: 4px 11px; border-radius: 999px;
            background: rgba(68, 55, 45, .88); color: #fff;
            font-size: 11.5px; font-weight: 700; letter-spacing: .3px;
            white-space: nowrap; pointer-events: none;
            box-shadow: 0 3px 10px rgba(53, 39, 28, .22);
        }
        /* Ảnh của sản phẩm hết hàng làm nhạt đi một chút */
        li.product.outofstock .box-image img,
        .product-small.outofstock .box-image img { opacity: .72; filter: grayscale(.25); }

        /* Nhãn hết hàng trên ảnh, dùng ở trang chủ và trang danh mục.
           Một dải chữ trắng nền xám đậm trong suốt nhẹ — đủ để nhận ra ngay mà không loè loẹt. */
        .product-small .box-image, li.product .box-image { position: relative; }
        .product-small.outofstock .box-image::after,
        li.product.outofstock .box-image::after {
            content: 'HẾT HÀNG'; position: absolute; left: 0; right: 0; bottom: 0; z-index: 4;
            padding: 7px 0; background: rgba(52, 42, 34, .82);
            color: #fff; font-size: 12px; font-weight: 800; letter-spacing: .6px; text-align: center;
        }
        .product-small.outofstock .box-image img,
        li.product.outofstock .box-image img { opacity: .72; }

        @media (max-width: 767px) {
            .nx-sale { top: 8px; left: 8px; padding: 3px 9px; font-size: 11px; }
            .nx-sale--single { top: 10px; left: 10px; padding: 4px 11px; font-size: 12px; }
        }

