.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-philosopher);
    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-philosopher);
    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;
}

@media (max-width: 1024px) {
    .style3 .t888-featured-header {
        margin-bottom: 25px;
    }

    .style2 .t888-featured-info {
        top: 50px;
        left: 50px;
    }

    .style2 .t888-featured-box:nth-child(even) .t888-featured-info {
        top: auto;
        bottom: 50px;
    }

    .style2 .t888-featured-grid {
        gap: 16px;
    }
}

@media (max-width: 991px) {
    .t888-featured-info {
        top: 30px;
        left: 30px;
    }

    .t888-featured-icon {
        top: 35px;
        right: 30px;
    }

    .style2 .t888-featured-info .t888-featured-title {
        font-size: 21px;
    }

    .style2 .t888-featured-info {
        top: 30px;
        left: 30px;
    }

    .style2 .t888-featured-box:nth-child(even) .t888-featured-info {
        top: auto;
        bottom: 30px;
    }

    .style2 .t888-featured-thumb {
        padding: 16px;
    }
}

@media (max-width: 767px) {
    .t888-featured-grid-style3 {
        gap: 25px;
    }

    .t888-featured-title {
        font-size: 1.125rem;
        line-height: 1.5rem;
    }
}

@media (max-width: 575px) {
    .t888-featured-grid {
        grid-template-columns: 1fr;
    }

    .t888-featured-grid-style3.columns-5,
    .t888-featured-grid-style3.columns-4,
    .t888-featured-grid-style3.columns-3,
    .t888-featured-grid-style3.columns-2,
    .t888-featured-grid-style3.columns-1 {
        grid-template-columns: 1fr;
    }

    .t888-featured-thumb-style3 {
        max-width: 200px;
        margin: 0px auto;
        margin-bottom: 20px;
    }

    .t888-featured-info {
        top: 50px;
        left: 50px;
    }

    .t888-featured-icon {
        top: 55px;
        right: 50px;
    }

    .e-con.e-flex:has(.t888-featured-grid) {
        --flex-wrap: nowrap !important;
    }

    .style2 .t888-featured-grid {
        gap: 30px;
    }

    .style2 .t888-featured-thumb {
        padding: 20px;
    }

    .style2 .t888-featured-info .t888-featured-title {
        font-size: 24px;
    }

    .style2 .t888-featured-info {
        top: 50px;
        left: 50px;
    }

    .style2 .t888-featured-box:nth-child(even) .t888-featured-info {
        top: auto;
        bottom: 50px;
    }
}

/* ============================================
   STYLE 4 — Mega Menu Grid (3x3)
   Black bg, white text, hover reveals image
   ============================================ */
.t888-cat-grid-wrapper {
    background-color: #000;
    width: 100%;
    padding: 40px 0 50px;
    text-align: center;
    /* background-image: linear-gradient(rgba(255, 255, 255, 0.12), rgba(255, 255, 255, 0.12)); */
    backdrop-filter: blur(8px);
    height: 100vh;
}

.t888-cat-grid-heading {
    color: #FFFF;
    font-size: 1.25rem;
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    margin-bottom: 48px;
    font-family: var(--font-philosopher);
}

.t888-cat-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 0;
}

.t888-cat-grid-item {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 220px;
    padding: 24px 16px;
    text-decoration: none;
    cursor: pointer;
    overflow: hidden;
    /* hide cell border */
    border: none;
}

/* Hidden image — shown on hover */
.t888-cat-grid-img {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.35s ease;
    pointer-events: none;
    z-index: 0;
}

.t888-cat-grid-img img {
    max-height: 90%;
    max-width: 60%;
    object-fit: contain;
    display: block;
    /* subtle drop-shadow so image pops on black */
    filter: drop-shadow(0 4px 20px rgba(255, 255, 255, 0.08));
    transition: transform 0.4s ease;
    transform: scale(0.9);
}

/* Category name */
.t888-cat-grid-name {
    position: relative;
    z-index: 1;
    color: #FFFF;
    font-size: 40px;
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    font-family: var(--font-philosopher);
    transition: opacity 0.3s ease, transform 0.3s ease;
    text-align: center;
}

/* SHOP label — hidden until hover */
.t888-cat-grid-shop {
    position: absolute;
    top: 12px;
    right: 14px;
    z-index: 2;
    color: #fff;
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    border: 1px solid rgba(255, 255, 255, 0.55);
    padding: 3px 10px;
    opacity: 0;
    transform: translateY(-4px);
    transition: opacity 0.3s ease, transform 0.3s ease;
}

/* ---- HOVER STATE ---- */
.t888-cat-grid-item:hover .t888-cat-grid-img {
    opacity: 0.8;
    /* Ảnh hiện mờ để chữ nổi lên trên */
}

.t888-cat-grid-item:hover .t888-cat-grid-img img {
    transform: scale(1);
}

.t888-cat-grid-item:hover .t888-cat-grid-name {
    opacity: 1;
    /* Chữ vẫn rõ ràng khi hover */
    color: #D6B46A;
    /* Đổi màu để nổi bật hơn */
    transition: opacity 0.3s ease, transform 0.3s ease, color 0.3s ease;
}

.t888-cat-grid-item:hover .t888-cat-grid-shop {
    opacity: 1;
    transform: translateY(0);
}

/* Responsive */
@media (max-width: 767px) {
    .t888-cat-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 480px) {
    .t888-cat-grid {
        grid-template-columns: 1fr;
    }

    .t888-cat-grid-item {
        min-height: 120px;
    }
}

/* ============================================
   STYLE 5 — Categories Grid Card (Flexible Alignment)
   ============================================ */
.t888-featured-categories-wrapper.style5 {
    width: 100%;
}

.t888-featured-grid-style5 {
    display: grid;
    gap: 20px;
    margin: 40px 0;
    width: 100%;
}

.t888-featured-grid-style5.columns-2 {
    grid-template-columns: repeat(2, 1fr);
}

.t888-featured-grid-style5.columns-3 {
    grid-template-columns: repeat(3, 1fr);
}

.t888-featured-grid-style5.columns-4 {
    grid-template-columns: repeat(4, 1fr);
}

.t888-featured-grid-style5.columns-5 {
    grid-template-columns: repeat(5, 1fr);
}

.t888-featured-grid-style5.columns-6 {
    grid-template-columns: repeat(6, 1fr);
}

.t888-featured-item-style5 {
    position: relative;
    overflow: hidden;
    border-radius: 12px;
    width: 100%;
    aspect-ratio: 1;
}

.t888-featured-item-style5.zengaz-active {
    overflow: visible;
}

.t888-featured-image {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center;
    transition: transform 0.5s ease;
}

.t888-featured-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.4);
    transition: background 0.3s ease;
}

.t888-featured-content {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 15px;
    z-index: 2;
}

.t888-featured-item-style5 .t888-featured-title {
    color: #fff !important;
    font-size: 1.25rem !important;
    font-weight: 700 !important;
    margin: 0 !important;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.5);
    text-align: center;
    transition: transform 0.3s ease;
}

@media (min-width: 1200px) {
    .t888-featured-item-style5 .t888-featured-title {
        font-size: 1.5rem !important;
    }
}

/* Hover effects — chỉ áp dụng cho category KHÔNG có hiệu ứng đặc biệt */
.t888-featured-item-style5:not(.zengaz-active):hover .t888-featured-image {
    transform: scale(1.1);
}

.t888-featured-item-style5:hover .t888-featured-overlay {
    background: rgba(0, 0, 0, 0.5);
}

.t888-featured-item-style5:not(.zengaz-active):hover .t888-featured-title {
    transform: scale(1.05);
}

/* Responsive */
@media (max-width: 1024px) {
    .t888-featured-grid-style5 {
        grid-template-columns: repeat(3, 1fr) !important;
    }
}

@media (max-width: 767px) {
    .t888-featured-grid-style5 {
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 15px;
    }
}

@media (max-width: 480px) {
    .t888-featured-grid-style5 {
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 10px;
    }
}

/* ==========================================================================
   STYLE 5 — Zengaz & Fade hover modes
   ========================================================================== */

/* ── Zengaz: reset the image wrapper so it's transparent ── */
.t888-featured-item-style5 .t888-featured-image.zengaz-mode {
    background: transparent !important;
    background-image: none !important;
}

/* ── Zengaz: make the stack fill the entire category item ── */
.t888-featured-item-style5 .t888-featured-image.zengaz-mode .zengaz-product-stack {
    position: absolute !important;
    top: 0 !important;
    left: 0 !important;
    width: 100% !important;
    height: 100% !important;
    padding-top: 0 !important;
}

/* ── Zengaz: hover triggers (mirror grid-product-item:hover rules) ── */
.t888-featured-item-style5:hover .zengaz-product-stack {
    animation: zengaz-stack-shake 1s ease-in-out;
    animation-delay: .2s;
    transform-origin: 50% 80%;
}

/* Default cap open */
.t888-featured-item-style5:hover .zengaz-product-stack .layer-cap {
    transform: translateX(calc(var(--cap-translate-x, -34.5%) + var(--cap-x, 0%)))
               scale(var(--cap-scale, 1))
               rotate(var(--cap-rotate, -126deg)) !important;
}

/* has-custom-cap variant */
.t888-featured-item-style5:hover .zengaz-product-stack.has-custom-cap .layer-cap {
    transform: translateX(calc(-32% + var(--cap-x, 0%)))
               scale(var(--cap-scale, 1))
               rotate(var(--cap-rotate, -126deg))
               translate(var(--cap-hx, 0px), var(--cap-hy, 0px)) !important;
}

/* cap-style-3 variant */
.t888-featured-item-style5:hover .zengaz-product-stack.cap-style-3 .layer-cap {
    transform: translateX(calc(-50% + var(--cap-x, 0%) - 20px))
               rotate(-30deg)
               scale(var(--cap-scale, 1)) !important;
    transform-origin: center !important;
}

/* Flame appear */
.t888-featured-item-style5:hover .zengaz-product-stack .layer-flame {
    opacity: 1;
    transform: translateX(calc(-50% + var(--flame-x, 0%)))
               translateY(var(--flame-translate-y, -35%))
               scale(1.1) !important;
    transition-delay: 1.5s !important;
}

/* no-wave-animation: flame appears immediately */
.t888-featured-item-style5:hover .zengaz-product-stack.no-wave-animation .layer-flame {
    transition-delay: 0s !important;
}

/* ── Zengaz: category title positioned at bottom ── */
.t888-featured-item-style5.zengaz-active .t888-featured-content {
    align-items: center;
    padding-bottom: 12px;
    z-index: 10;
}

.t888-featured-item-style5.zengaz-active .t888-featured-title {
    background: rgba(0, 0, 0, 0.55);
    padding: 4px 10px;
    border-radius: 4px;
    font-size: 1rem !important;
}

/* ── Fade mode ── */
.t888-featured-image.fade-mode {
    background: transparent !important;
    background-image: none !important;
    overflow: hidden;
}

.t888-featured-image.fade-mode .cat-primary-img,
.t888-featured-image.fade-mode .cat-hover-img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: opacity 0.4s ease;
}

.t888-featured-image.fade-mode .cat-hover-img {
    opacity: 0;
}

.t888-featured-item-style5:hover .t888-featured-image.fade-mode.has-hover .cat-hover-img {
    opacity: 1;
}

.t888-featured-item-style5:hover .t888-featured-image.fade-mode.has-hover .cat-primary-img {
    opacity: 0;
}