.native-slider {
    position: relative;
    width: 100%;
    overflow: hidden; /* Cực kỳ quan trọng để ẩn các ảnh đang xếp hàng bên phải */
    aspect-ratio: 840/395;
}
@media (max-width: 767px) {
    .native-slider {
        margin: 0 -15px; width: calc(100% + 30px);
        aspect-ratio: 400/310; /* Giữ khung đúng tỷ lệ cho Mobile */
    }
}

.native-slider__wrapper {
    display: flex; /* Xếp các item thành một hàng ngang dài */
    width: 100%;
    height: 100%;
    transition: transform 0.5s cubic-bezier(0.45, 0, 0.55, 1); /* Hiệu ứng trượt mượt */
    will-change: transform; /* Báo trước cho trình duyệt tối ưu GPU */
}

.native-slider__item {
    flex: 0 0 100%; /* Mỗi ảnh chiếm đúng 100% chiều rộng khung nhìn */
    width: 100%;
    height: 100%;
}

.native-slider__item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

/* Các nút Nav và Dots giữ nguyên như cũ */
.slider-nav { position: absolute; top: 50%; transform: translateY(-50%); z-index: 5; background: rgba(0,0,0,0.2); border: none; color: #fff; padding: 15px; cursor: pointer; }
.prev { left: 0; } .next { right: 0; }
.slider-dots { position: absolute; bottom: 10px; width: 100%; text-align: center; z-index: 5; }
.dot { height: 10px; width: 10px; background: #bbb; border-radius: 50%; display: inline-block; margin: 0 4px; cursor: pointer; }
.dot.active { background: #fff; box-shadow: 0 0 3px rgba(0,0,0,0.5); }

@media (max-width: 767px) {
    .dot{
        height: 15px; width: 15px;
    }
}


/*BOGO*/
.native-carousel-wrapper {
    display: flex;
    overflow-x: auto;
    scroll-behavior: smooth;
    scroll-snap-type: x mandatory;
    scrollbar-width: none;
    gap: 10px; /* Khoảng cách giữa các sản phẩm */
    padding: 10px 0; /* Ẩn thanh scroll trên Firefox */
}

.native-carousel-wrapper::-webkit-scrollbar {
    display: none; /* Ẩn thanh scroll trên Chrome/Safari */
}
/* 1. Ép các cột item có chiều cao bằng nhau */
.native-carousel-wrapper {
    display: flex;
    align-items: stretch; /* Quan trọng: Kéo dài các item cho bằng đứa cao nhất */
}

.native-carousel-item {
    flex: 0 0 calc(25% - 8px);
    display: flex; /* Biến chính nó thành flex container */
    position: relative;
}
.native-carousel-item.native-carousel-item--horizontal{
    flex: 0 0 calc(33% - 6px);
}

/* 2. Ép Card sản phẩm bên trong lấp đầy chiều cao của cột */
.native-carousel-item .product-card {
    display: flex;
    flex-direction: column; /* Xếp nội dung theo chiều dọc */
    width: 100%;
    height: 100%; /* Lấp đầy cột */
    background: #fff;
    border: 1px solid #ebebeb;
    border-radius: 5px;
    overflow: hidden;
}
.native-carousel-item.native-carousel-item--horizontal .product-card{
    -webkit-box-orient: horizontal;
    -webkit-box-direction: normal;
    -ms-flex-direction: row;
    flex-direction: row !important;
}

/* 3. Đẩy phần Actions (Giá, Nút bấm) xuống đáy Card */
.native-carousel-item .product-card__info {
    flex-grow: 1; /* Chiếm hết không gian trống để đẩy phần dưới xuống */
    display: flex;
    flex-direction: column;
}

.native-carousel-item .product-card__info{
    flex-grow: unset !important;
}

.native-carousel-item .product-card__actions {
    background: #f9f9f9; /* Tùy chỉnh màu nền phần nút nếu muốn */
    padding: 10px;
}

.native-carousel-item .product-card__info {
    padding: 10px;
}
.native-carousel-item.native-carousel-item--horizontal .product-card .product-card__image{
    width: 120px;
    padding: 16px;
}
.native-carousel-item.native-carousel-item--horizontal .product-card .product-card__info{
    padding-left: 0;
    padding-right: 30px;
    padding-top: 14px;
    padding-bottom: 42px;
    width: 100%;
}
.native-carousel-item.native-carousel-item--horizontal .product-card .product-card__actions{
    position: absolute;
    bottom: 0;
    left: 120px;
    background-color: #FFF !important;
}
.block-posts-wrapper .post-card {
    display: flex;
    -webkit-box-orient: horizontal;
    -webkit-box-direction: normal;
    -ms-flex-direction: row;
    flex-direction: row;
    -webkit-box-align: start;
    -ms-flex-align: start;
    align-items: flex-start;
    flex: 0 0 calc(50% - 6px);
}
.block-posts-wrapper .post-card .post-card__image {
    margin-right: 22px;
}
.block-posts-wrapper .post-card .post-card__content {
    margin-top: 10px;
    font-size: 15px;
    line-height: 22px;
    height: 66px;
    overflow: hidden;
}
.block-posts-wrapper .post-card .post-card__name {
    margin-top: 10px;
    font-size: 16px;
    line-height: 20px;
    -webkit-box-ordinal-group: 0;
    -ms-flex-order: -1;
    order: -1;
    height: 40px;
    overflow: hidden;
}
.block-posts-wrapper .post-card .post-card__date {
    margin-top: 6px;
}

/* Tùy chỉnh vị trí nút bấm */
.block-bogo__arrows-list {
    position: absolute;
    top: -45px;
    right: 0;
    display: flex;
    gap: 5px;
    z-index: 10;
}
.native-carousel-item .product-card__actions .product-card__prices-sold{
    min-height: 59px;
}

.native-carousel-item .product-card__buttons, .block-products--bestsell .product-card__buttons, .block-products__list--bestsell .product-card__buttons {
    gap: 5px;
}
.native-carousel-item  .product-card__buttons .input-number, .block-products--bestsell .product-card__buttons .input-number {
    width: 30% !important;
}
.block-products__list--bestsell .product-card__buttons .input-number{
    width: 40% !important;
}
.block-products--bestsell .product-card__buttons>*:first-child{
    margin-right: 0 !important;
}
.native-carousel-item  .product-card__buttons .input-number .input-number__input, .block-products__list--bestsell .product-card__buttons .input-number .input-number__input, .block-products--bestsell .product-card__buttons .input-number{
   min-width: 75px !important;
}
.native-carousel-item .product-card__buttons .product-card__addtocart{
    padding: .375rem .8rem !important;
}
.native-carousel-item .product-card__buttons .product-card__addtocart:disabled{
    cursor: not-allowed !important;
    background: #e9ebee !important;
    border-color: #e9ebee !important;
    color: #6c757d !important;
    opacity: 1 !important;
}
.block-product-category-wrapper .native-carousel-item .product-card__buttons .product-card__addtocart, 
.block-product-freeship-wrapper .native-carousel-item .product-card__buttons .product-card__addtocart, 
.block-product-flashsale-wrapper .native-carousel-item .product-card__buttons .product-card__addtocart {
    padding: .375rem .7rem !important;
}
.block-products__list--bestsell .product-card__buttons .product-card__addtocart {
    padding: .375rem .3rem !important;
    font-size: .69rem !important;
    height: calc(1.5rem + 13px) !important;
}
.block-products-just-view-wrapper .saleoff{
    top: 35px;
    right: 0;
}
.native-carousel-item .product-card__name {
    min-height: 57px;
}
.block-brands-wrapper .block-brands__slider--container {
    display: flex;
    gap: 10px;
    overflow: hidden;
    overflow-x: auto;
    scroll-behavior: smooth;
    scroll-snap-type: x mandatory;
    scrollbar-width: none;
}
.block-brands-wrapper .block-brands__slider--container .block-brands__item {
    flex: 0 0 calc(25% - 8px);
}
@media (max-width: 767px) {
    .native-carousel-item {
        min-width: 47%;
    }
    .native-carousel-item .product-card__buttons, .block-products__list--bestsell .product-card__buttons{
        flex-direction: column;
    }
    .native-carousel-item  .product-card__buttons .input-number, .block-products__list--bestsell .product-card__buttons .input-number{
        width: 100% !important;
    }
    .block-product-category-wrapper .native-carousel-item{
        min-width: 47.4% !important;
    }
    .block-product-freeship-wrapper .native-carousel-item, .block-product-flashsale-wrapper .native-carousel-item{
        min-width: 48% !important;
    }
    .block-product-category-wrapper .native-carousel-wrapper{
        margin-left: -10px !important;
    }
    .block-product-category-wrapper .native-carousel-item .product-card__buttons .product-card__addtocart, .block-product-freeship-wrapper .native-carousel-item .product-card__buttons .product-card__addtocart, .block-product-flashsale-wrapper .native-carousel-item .product-card__buttons .product-card__addtocart{
        padding: .375rem .6rem !important;
    }
    .block-product-category-wrapper .native-carousel-item .product-card__name, .block-product-freeship-wrapper .native-carousel-item .product-card__name, .block-product-flashsale-wrapper .native-carousel-item .product-card__name {
        min-height: 75px !important;
    }
    .native-carousel-item .product-card__actions .product-card__prices-sold{
        min-height: 66px;
    }
    .product-card__buttons .product-card__addtocart{
        margin-left: 0 !important;
    }

    .block-products--bestsell .product-card__addtocart{
        height: calc(1.875rem + 8px) !important;
    }

    .block-products-just-view-wrapper .native-carousel-item.native-carousel-item--horizontal{
        flex: 0 0 calc(100% - 6px);
    }

    .block-posts-wrapper .post-card {
        -webkit-box-orient: vertical;
        -webkit-box-direction: normal;
        -ms-flex-direction: column;
        flex-direction: column;
        flex: 0 0 100%;
    }
}

.native-carousel-item .native-carousel-item__banner{
    width: 100%;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
}
.block-product-category-wrapper .native-carousel-item .product-card__buttons .product-card__addtocart{
    padding: .375rem .7rem !important;
}