/* ========================================================
   CSS SLIDER ƯU ĐÃI ĐẶC QUYỀN (DÙNG VAR --PRIMARY-COLOR)
======================================================== */

/* 1. Khung bao ngoài */
.box-uu-dai-wrapper {
    position: relative;
}

.box-uu-dai-wrapper .slider {
    position: relative !important;
}

/* 2. Tiêu đề "ƯU ĐÃI ĐẶC QUYỀN" dùng màu chủ đạo */
.uu-dai-title {
    font-size: 27px;
    font-weight: 800;
    letter-spacing: 0.5px;
    margin-bottom: 10px;
    display: block;
	color: var(--primary-color);
}

/* 3. Tùy chỉnh Banner Bo góc */
.uu-dai-item .col-inner {
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.06);
    background: #ffffff;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.uu-dai-item:hover .col-inner {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.12);
}

.uu-dai-item img {
    width: 100%;
    height: auto;
    display: block;
    border-radius: 16px;
}

/* 4. Nút Next / Prev (Dùng --primary-color & Mặc định ẩn) */
.box-uu-dai-wrapper button.flickity-button.flickity-prev-next-button {
    width: 44px !important;
    height: 44px !important;
    background-color: var(--primary-color) !important; /* Đồng bộ màu chính của web */
    border: none !important;
    border-radius: 50% !important;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.25) !important;
    cursor: pointer;
    z-index: 20 !important;
    top: 50% !important;
    transform: translateY(-50%) !important;
    margin: 0 !important;
    padding: 0 !important;
    
    /* ẨN NÚT KHI BÌNH THƯỜNG */
    opacity: 0 !important;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease, transform 0.25s ease, filter 0.2s ease !important;
}

/* RÊ CHUỘT VÀO VÙNG BANNER THÌ NÚT HIỆN RA */
.box-uu-dai-wrapper:hover button.flickity-button.flickity-prev-next-button {
    opacity: 0.95 !important;
    visibility: visible;
}

/* Vị trí 2 bên mép banner */
.box-uu-dai-wrapper button.flickity-button.previous {
    left: 15px !important;
}
.box-uu-dai-wrapper button.flickity-button.next {
    right: 15px !important;
}

/* Ẩn mã SVG bị lỗi của Flatsome */
.box-uu-dai-wrapper button.flickity-button svg {
    display: none !important;
}

/* VẼ MŨI TÊN MÀU TRẮNG BẰNG CSS */
.box-uu-dai-wrapper button.flickity-button::after {
    content: '';
    display: block;
    width: 10px;
    height: 10px;
    border-top: 3px solid #ffffff;
    border-right: 3px solid #ffffff;
    position: absolute;
    top: 50%;
    left: 50%;
}

/* Mũi tên Previous (Trái) */
.box-uu-dai-wrapper button.flickity-button.previous::after {
    transform: translate(-35%, -50%) rotate(-135deg);
}

/* Mũi tên Next (Phải) */
.box-uu-dai-wrapper button.flickity-button.next::after {
    transform: translate(-65%, -50%) rotate(45deg);
}

/* Rê chuột vào nút: Tự động tối màu đi một chút */
.box-uu-dai-wrapper button.flickity-button:hover {
    filter: brightness(0.85); /* Tự làm sẫm màu primary mà không cần viết mã màu riêng */
    opacity: 1 !important;
    transform: translateY(-50%) scale(1.08) !important;
}

/* 5. Mobile (Điện thoại) */
@media (max-width: 549px) {
    /* Trên mobile luôn hiện nút vì không có chuột để rê */
    .box-uu-dai-wrapper button.flickity-button.flickity-prev-next-button {
        opacity: 0.9 !important;
        visibility: visible;
        width: 32px !important;
        height: 32px !important;
    }
    .box-uu-dai-wrapper button.flickity-button.previous { left: 8px !important; }
    .box-uu-dai-wrapper button.flickity-button.next { right: 8px !important; }
    
    .box-uu-dai-wrapper button.flickity-button::after {
        width: 8px;
        height: 8px;
        border-width: 2px;
    }
}





/* ============================================================
   CATEGORY PRODUCT SLIDER - FLATSOME
   Shortcode: [danh_muc_san_pham_cap_1]
   ============================================================ */


/* ============================================================
   1. KHỐI DANH MỤC
   ============================================================ */

.custom-category-slider-wrapper {
    width: 100%;
}

.category-block-item {
    position: relative;
    margin-bottom: 45px;
}


/* ============================================================
   2. TIÊU ĐỀ DANH MỤC + XEM TẤT CẢ
   ============================================================ */

.custom-cat-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 15px;

    margin-bottom: 15px;
}

.custom-cat-header .custom-cat-title {
    margin: 0 !important;
    color: var(--primary-color) !important;
    font-size: 22px;
    font-weight: 700;
    line-height: 1.25;

}

.custom-cat-header .custom-cat-view-all {
    flex-shrink: 0;

    color: #ff6600 !important;

    font-size: 14px;
    font-weight: 600;
    line-height: 1.3;

    text-decoration: none !important;
    white-space: nowrap;

    transition: opacity 0.2s ease;
}

.custom-cat-header .custom-cat-view-all:hover {
    color: #ff6600 !important;
    opacity: 0.75;
}


/* ============================================================
   3. SLIDER
   ============================================================ */

.custom-category-slider-wrapper .slider-wrapper {
    position: relative;
}

.custom-category-slider-wrapper .flickity-viewport {
    overflow: hidden;
}


/* ============================================================
   4. NÚT PREVIOUS / NEXT
   ============================================================ */

.custom-category-slider-wrapper .flickity-prev-next-button {
    position: absolute !important;

    top: 42% !important;

    width: 40px !important;
    height: 40px !important;

    padding: 0 !important;
    margin: 0 !important;

    background: var(--primary-color) !important;

    border: none !important;
    border-radius: 50% !important;

    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.2) !important;

    opacity: 1 !important;
    visibility: visible !important;

    z-index: 20 !important;

    transform: translateY(-50%) !important;

    transition:
        transform 0.2s ease,
        filter 0.2s ease,
        opacity 0.2s ease !important;

    cursor: pointer;
}


/* ============================================================
   5. VỊ TRÍ NÚT TRÁI / PHẢI
   ============================================================ */

.custom-category-slider-wrapper
.flickity-prev-next-button.previous {
    left: -10px !important;
}

.custom-category-slider-wrapper
.flickity-prev-next-button.next {
    right: -10px !important;
}


/* ============================================================
   6. ẨN ICON SVG MẶC ĐỊNH CỦA FLICKITY
   Tránh lỗi mất / lệch icon trên Flatsome
   ============================================================ */

.custom-category-slider-wrapper
.flickity-prev-next-button svg,
.custom-category-slider-wrapper
.flickity-prev-next-button .flickity-button-icon {
    display: none !important;
}


/* ============================================================
   7. TẠO MŨI TÊN BẰNG CSS
   ============================================================ */

.custom-category-slider-wrapper
.flickity-prev-next-button::before {
    content: "";

    position: absolute;

    top: 50%;
    left: 50%;

    width: 9px;
    height: 9px;

    border-top: 2px solid #ffffff;
    border-right: 2px solid #ffffff;
}


/* Mũi tên trái */
.custom-category-slider-wrapper
.flickity-prev-next-button.previous::before {
    transform: translate(-35%, -50%) rotate(-135deg);
}


/* Mũi tên phải */
.custom-category-slider-wrapper
.flickity-prev-next-button.next::before {
    transform: translate(-65%, -50%) rotate(45deg);
}


/* ============================================================
   8. HOVER
   ============================================================ */

.custom-category-slider-wrapper
.flickity-prev-next-button:hover {
    background: var(--primary-color) !important;

    filter: brightness(1.08);

    transform: translateY(-50%) scale(1.08) !important;
}


/* ============================================================
   9. BUTTON DISABLED
   Khi không còn sản phẩm để lướt
   ============================================================ */

.custom-category-slider-wrapper
.flickity-prev-next-button:disabled {
    opacity: 0.3 !important;
    cursor: default !important;
}

.custom-category-slider-wrapper
.flickity-prev-next-button:disabled:hover {
    filter: none !important;

    transform: translateY(-50%) !important;
}


/* ============================================================
   10. FIX NÚT KHÔNG BỊ CẮT
   ============================================================ */

.custom-category-slider-wrapper .row-slider {
    position: relative;
}

.custom-category-slider-wrapper .flickity-slider {
    position: absolute;
}


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

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

    .category-block-item {
        margin-bottom: 35px;
    }

    .custom-cat-header {
        margin-bottom: 12px;
    }

    .custom-cat-header .custom-cat-title {
        font-size: 18px;
    }

    .custom-cat-header .custom-cat-view-all {
        font-size: 13px;
    }

    .custom-category-slider-wrapper
    .flickity-prev-next-button {
        width: 36px !important;
        height: 36px !important;

        top: 42% !important;
    }

    .custom-category-slider-wrapper
    .flickity-prev-next-button.previous {
        left: -7px !important;
    }

    .custom-category-slider-wrapper
    .flickity-prev-next-button.next {
        right: -7px !important;
    }

    .custom-category-slider-wrapper
    .flickity-prev-next-button::before {
        width: 8px;
        height: 8px;

        border-width: 2px;
    }
}


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

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

    .category-block-item {
        margin-bottom: 30px;
    }

    .custom-cat-header {
        gap: 10px;
        margin-bottom: 10px;
    }

    .custom-cat-header .custom-cat-title ,
	.custom-cat-title,
	.uu-dai-title{
        font-size: 22px !important;
        line-height: 1.3;
    }

    .custom-cat-header .custom-cat-view-all {
        font-size: 12px;
    }

    .custom-category-slider-wrapper
    .flickity-prev-next-button {
        width: 32px !important;
        height: 32px !important;

        top: 40% !important;
    }

    .custom-category-slider-wrapper
    .flickity-prev-next-button.previous {
        left: -4px !important;
    }

    .custom-category-slider-wrapper
    .flickity-prev-next-button.next {
        right: -4px !important;
    }

    .custom-category-slider-wrapper
    .flickity-prev-next-button::before {
        width: 7px;
        height: 7px;

        border-width: 2px;
    }
	
	.slide-uu-dai,
	.thuong-hieu-homepage,
	.title-thuong-hieu{
		padding: 0 10px 30px !important
	}
}


.image-slide img {
	border-radius: 20px
}

@media(max-width: 549px){
	.image-slide img {
		border-radius: 10px
	}
}