.t888-featured-categories-wrapper {
    text-align: center;
}

.t888-featured-header {
    margin-bottom: 40px;
}

.t888-featured-header .view-all-link {
    font-size: 1rem;
    line-height: 2rem;
    color: var(--primary-color);
    font-family: var(--font-playfair);
    padding-bottom: 10px;
    position: relative;
}

.t888-featured-header .view-all-link::after {
    content: "";
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 2px;
    background-color: var(--third-color);
    transition: transform 0.3s ease;
    opacity: 0.5;
}

.t888-featured-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
}

.t888-featured-box {
    transition: all 0.3s ease;
    position: relative;
}



.t888-featured-thumb {
    position: relative;
    transition: all 0.3s ease;
    overflow: hidden;
}

.t888-featured-thumb img {
    display: block;
    max-width: 100%;
    width: 100%;
    height: auto;
    max-height: 100%;
    object-fit: cover;
    aspect-ratio: 0.95;

}

.t888-featured-box:hover img {
    transform: scale(1.05);

}

.t888-featured-box:hover .t888-featured-title {
    color: var(--third-color);
}

.t888-featured-info {
    position: absolute;
    top: 50px;
    left: 50px;
    text-align: left;
}

.t888-featured-icon {
    position: absolute;
    top: 55px;
    right: 50px;
    text-align: right;
}

.t888-featured-title {
    font-size: 1.125rem;
    line-height: 2rem;
    font-weight: bold;
    color: var(--primary-color);
    font-family: var(--font-playfair);
    text-transform: uppercase;
}

.t888-featured-count {
    font-size: 0.875rem;
    line-height: 1.5rem;
    color: var(--ninth-color);
}

.t888-featured-icon i {
    font-size: 1.125rem;
    color: var(--primary-color);
}

.style2 .t888-featured-thumb {
    padding: 20px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.05);
    background: var(--secondary-color);
}

.style2 .t888-featured-thumb-inner {
    overflow: hidden;
    position: relative;
    transition: all 0.3s ease;
}

.style2 .t888-featured-thumb-inner::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: transparent;
    transition: all 0.3s ease;
}

.style2 .t888-featured-info {
    top: 70px;
    left: 70px;
}

.style2 .t888-featured-box:nth-child(even) .t888-featured-info {
    top: auto;
    bottom: 70px;
}

.style2 .t888-featured-info .t888-featured-title {
    font-size: 24px;
    margin-top: 0;
    margin-bottom: 8px;
    color: var(--secondary-color);
    line-height: 33px;
}

.style2 .t888-featured-info .t888-featured-count {
    font-size: 14px;
    line-height: 24px;
    color: var(--secondary-color);
    margin: 0 0 18px;
}

.style2 .t888-featured-button {
    display: inline-block;
    text-transform: uppercase;
    font-size: 14px;
    letter-spacing: 3px;
    color: var(--secondary-color);
    padding: 0 0 8px 0;
    border-bottom: 2px solid currentColor;
    transition: all 0.3s ease;
}

.style2 .t888-featured-button:hover {
    color: var(--third-color);
    border-bottom-color: var(--third-color);
}

.style2 .t888-featured-box:hover .t888-featured-thumb-inner::after {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.2);
    transition: all 0.3s ease;
}


.t888-featured-thumb-style3 img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    border-radius: 50%;
    transition: all 0.3s ease;
    transform: scale(1);

}

.t888-featured-thumb-style3 {
    border-radius: 50%;
    border: 1px solid transparent;
    transition: all 0.3s ease;
    margin-bottom: 20px;
}

.t888-featured-grid-style3 .t888-featured-box .t888-featured-thumb-style3 {
    transition: all 0.3s ease;
}

.t888-featured-grid-style3 .t888-featured-box .t888-featured-thumb-style3 img {
    transition: all 0.3s ease;
}

.t888-featured-grid-style3 .t888-featured-box:hover .t888-featured-thumb-style3 {
    border: 1px solid var(--third-color);
    padding: 5px;
}

.t888-featured-grid-style3 .t888-featured-box:hover .t888-featured-thumb-style3 img {
    transform: scale(1);
}

.t888-featured-grid-style3 {
    display: grid;
    gap: 48px;
}

.t888-featured-grid-style3.columns-2 {
    grid-template-columns: repeat(2, 1fr);
}

.t888-featured-grid-style3.columns-3 {
    grid-template-columns: repeat(3, 1fr);
}

.t888-featured-grid-style3.columns-4 {
    grid-template-columns: repeat(4, 1fr);
}

.t888-featured-grid-style3.columns-5 {
    grid-template-columns: repeat(5, 1fr);
}

.t888-featured-grid-style3.columns-6 {
    grid-template-columns: repeat(6, 1fr);
}

.t888-featured-info-style3 .t888-featured-title {
    margin-bottom: 4px;
}

.style3 .t888-featured-header {
    display: inline-flex;
    margin-bottom: 50px;
}

.style3 .t888-featured-header .view-all-link {
    font-size: 1.5rem;
    font-weight: bold;
    text-transform: uppercase;
    color: var(--primary-color);
    padding: 9.5px 19px;
    border: 2px solid var(--primary-color);
}

.style3 .t888-featured-header .view-all-link::after {
    content: none;
}

/* style 4 featured-categories  */
.featured-cat-home2 .t888-featured-grid-style4 {
    gap: 30px !important;
}

.style4 .t888-featured-grid-style4 {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 60px;
}

.style4 .t888-featured-card-style4 {
    position: relative;
    display: block;
    overflow: hidden;
    text-decoration: none;
    color: inherit;
}

.style4 .t888-featured-media-style4 {
    position: relative;
    padding-top: 145%;
    overflow: hidden;
}

.style4 .t888-featured-media-style4 img {
    position: absolute;
    inset: 0;
    width: 300px ;
    height: 450px;
    object-fit: cover;
    transform: scale(1.02);
    transition: transform 0.4s ease;
    margin-left: 20px;
}

.style4 .t888-featured-content-style4 {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    pointer-events: none;
    transform: translateY(-65px)
}

.style4 .t888-featured-subtitle-style4 {
    letter-spacing: 0.2em;
    text-transform: uppercase;
    font-size: 13px;
    list-style: 16px;
    margin-bottom: 45px;
    color: #fff;
}

.style4 .t888-featured-heading-style4 {
    font-size: 48px;
    line-height: 72px;
    font-weight: 700;
    color: #fff;
    margin: 0px;
}


.style4 .t888-featured-card-style4:hover .t888-featured-media-style4 img {
    transform: scale(1.06);
}

.style4 .t888-featured-header .view-all-link {
    font-size: 36px;
    font-weight: bold;
    line-height: 48px;
}

.style4 .t888-featured-header .view-all-link::after {
    content: none;
}


@media (max-width: 768px) {

    .featured-cat-home2,
    .featured-cat-home2 .t888-featured-categories-wrapper,
    .featured-cat-home2 .t888-featured-grid-style4 {
        margin: 0 auto !important;
        padding: 0 !important;
        left: 0 !important;
        right: 0 !important;
        transform: none !important;
        width: 100% !important;
        max-width: 100% !important;
    }

    /* Đảm bảo text "OUR PRODUCTS" & "Shop Categories" nằm giữa */
    .featured-cat-home2 .t888-featured-header {
        text-align: center !important;
        justify-content: center !important;
        align-items: center !important;
        width: 100%;
    }

    /* Loại bỏ dư khoảng cách nếu có */
    .featured-cat-home2 .elementor-widget-container {
        padding-left: 0 !important;
        padding-right: 0 !important;
    }   

    /* Dàn lại layout thành dạng scroll ngang */
    .style4 .t888-featured-grid-style4 {
        display: flex !important;
        overflow-x: auto;
        overflow-y: visible !important;
        scroll-snap-type: x mandatory;
        -webkit-overflow-scrolling: touch;
        padding: 0 16px;
        gap: 1 !important; /* Tắt gap để kiểm soát chính xác bằng margin */
    }

    .style4 .t888-featured-grid-style4::-webkit-scrollbar {
        display: none;
    }

    /* Mỗi item chiếm gần hết màn hình */
    .style4 .t888-featured-box-style4 {
        flex: 0 0 70%;
        scroll-snap-align: center;
        margin-right: -30px; /* ← khoảng cách giữa các col = 10px */
        margin-bottom: 30px;
    }

    /* Bỏ margin ở item cuối cùng */
    .style4 .t888-featured-box-style4:last-child {
        margin-right: 0 !important;
    }

    /* Giảm text size & bố cục cho mobile */
    .style4 .t888-featured-heading-style4 {
        font-size: 28px;
        line-height: 40px;
    }

    .style4 .t888-featured-subtitle-style4 {
        font-size: 12px;
        margin-bottom: 20px;
    }

    /* Ảnh thấp hơn một chút để cân đối */
    .style4 .t888-featured-media-style4 {
        padding-top: 120% !important;
    }

    .style4 .t888-featured-media-style4 img {
        margin-left: 0 !important;
        /* width: 100%; */
        height: auto;
        object-fit: cover;
    }

    /* Tắt hover trên mobile */
    .style4 .t888-featured-card-style4:hover .t888-featured-media-style4 img {
        transform: none !important;
    }

    .t888-featured-categories-wrapper.style4 {
        margin-bottom: 60px;
    }

    .featured-cat-home2,
    .elementor-widget-t888-featured-categories {
        transform: none !important;
        z-index: auto !important;
    }

    .elementor-widget-t888-testimonial {
        position: relative;
        z-index: 1;
    }
}
