/* =========================================
   1. WRAPPER & TABS – DESKTOP
   ========================================= */

.lee-tabbed-content {
    max-width: 130rem;
    margin: 32px auto 56px;
    padding: 0 0 24px;
    background: #f5f7f9;
    box-sizing: border-box;
}

/* Thanh tabs dưới slider */
.lee-tabs-nav {
    display: inline-flex;
    justify-content: center;
    gap: 16px;
    list-style: none;
    padding: 0;
    margin: 22px auto 0;
    width: 100%;
}

.lee-tabs-nav .lee-tab a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 10px 20px;
    border-radius: 999px;
    font-size: large;
    font-weight: 600;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    text-decoration: none;
    border: 1px solid #d0d7e2;
    color: #111827;
    background: #ffffff;
    box-shadow: 0 0 0 rgba(0,0,0,0);
    transition:
        color 0.18s ease,
        background-color 0.18s ease,
        box-shadow 0.18s ease,
        transform 0.18s ease;
}

.lee-tabs-nav .lee-tab.is-active a {
    background: #1756c3;
    border-color: #1756c3;
    color: #ffffff;
    box-shadow: 0 10px 20px rgba(23, 86, 195, 0.35);
}

.lee-tabs-nav .lee-tab a:hover {
    transform: translateY(-1px);
}

.lee-tabs-nav-bottom {
    margin-top: 1.75rem;
}

/* =========================================
   2. TAB PANELS + ANIMATION
   ========================================= */

.lee-tab-panels {
    position: relative;
}

/* panel ẩn */
.lee-tab-panel {
    opacity: 0;
    transform: translateY(10px);
    pointer-events: none;
    height: 0;
    overflow: hidden;
    transition:
        opacity 0.22s ease-out,
        transform 0.22s ease-out;
}

/* panel đang active: fade-in + trượt lên nhẹ */
.lee-tab-panel.is-active {
    opacity: 1;
    transform: translateY(0);
    pointer-events: auto;
    height: auto;
}

/* panel rời đi – dùng khi JS gắn .is-leaving */
.lee-tab-panel.is-leaving {
    opacity: 0;
    transform: translateY(-6px);
    pointer-events: none;
}

/* =========================================
   3. SLIDER – LAYOUT 3–2–1 CARD
   ========================================= */

.lee-pages-slider {
    margin: 18px 24px 10px;
}

/* cell = card */
.lee-pages-slider .lee-page-card {
    width: calc(100% / 3 - 24px);  /* 3 card / view desktop */
    margin: 0 12px 32px;
    box-sizing: border-box;
}

/* tablet: 2 card */
@media (max-width: 1200px) {
    .lee-pages-slider .lee-page-card {
        width: calc(100% / 2 - 24px);
    }
}

/* mobile: 1 card (width xử lý thêm ở phần mobile phía dưới) */


/* =========================================
   4. CARD STYLE (DESKTOP/TABLET)
   ========================================= */

.lee-page-card {
    aspect-ratio: 1 / 1;
    min-height: 300px;
    position: relative;
    overflow: hidden;
    background: #ffffff;
    border: 1px solid #e5e7eb;
    transition: transform 0.22s ease, box-shadow 0.22s ease;
}

.lee-page-card > a {
    display: block;
    text-decoration: none;
    color: inherit;
}

.lee-page-card:hover {
    transform: translateY(-8px);
}

/* Ảnh */
.lee-page-thumb {
    position: relative;
}

.lee-page-thumb img {
    display: block;
    margin: auto;
    width: 68%;
    height: auto;
    aspect-ratio: 3 / 3;
    object-fit: contain;
    transition: transform 0.30s ease;
}

.lee-page-card:hover .lee-page-thumb img {
    transform: scale(1.05);
}

/* Logo góc trái trên mỗi card */
.lee-card-logo {
    position: absolute;
    top: 5%;
    left: 5%;
    z-index: 3;
    pointer-events: none;
}

.lee-card-logo img {
    display: block;
    max-width: 20%;
    height: auto;
    filter: drop-shadow(0 6px 12px rgba(15,23,42,0.3));
}

/* Overlay dưới */
.lee-page-text {
	font-size: calc(var(--wp--preset--font-size--small) - 2px);
    background: linear-gradient(
        0deg,
        rgb(228 171 107 / 13%) 0%,
        rgb(245 171 53 / 8%) 35%,
        rgb(245 171 53 / 0%) 100%
    );
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    padding: 14px 16px 16px;
    color: #ffffff;
}

/* Tên sản phẩm (trên) */
.lee-page-title {
    margin: 0 46px 4px 0;
    font-size: x-large;
    font-weight: 700;
    color: #000000;
    text-transform: none;
    letter-spacing: 0;
    line-height: 1.35;
}

/* Mô tả (dưới) – 2 dòng */
.lee-page-desc,
.lee-page-category {
    margin: 0;
    font-size: medium;
    line-height: 1.5;
    color: rgb(102 102 102);
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* Tag mũi tên chéo góc phải trên */
.lee-page-arrow-tag {
    position: absolute;
    top: 3%;
    right: 3%;
    width: 28px;
    height: 28px;
    border-radius: 999px;
    background: #ffffff;
    box-shadow: 0 10px 22px rgba(15, 23, 42, 0.45);
}

.lee-page-arrow-tag::before {
    content: "";
    position: absolute;
    inset: 0;
    margin: auto;
    width: 12px;
    height: 12px;
    left: -8px;
    border-radius: 2px;
    border: 2px solid #111827;
    border-left: none;
    border-bottom: none;
    transform: rotate(45deg) translate(1px, -1px);
}

/* Bóng dưới card */
.lee-page-card::after {
    content: "";
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    bottom: -12px;
    width: 64%;
    height: 14px;
    background: radial-gradient(
        ellipse at center,
        rgba(15,23,42,0.22) 0%,
        rgba(15,23,42,0) 70%
    );
}

/* =========================================
   5. FLICKITY ARROWS – DESKTOP
   ========================================= */

.lee-pages-slider .flickity-button {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    padding: 0;
    margin: 0;
    border: none;
    box-sizing: border-box;
    display: flex;
    align-items: center;
    justify-content: center;

    width: 40px;
    height: 60px;
    background: transparent;
    border-radius: 4px;
    box-shadow: none;

    opacity: 0;
    pointer-events: none;

    transition:
        opacity 0.22s ease,
        transform 0.22s ease,
        background 0.18s ease,
        box-shadow 0.18s ease,
        border-radius 0.18s ease;
}

/* Vị trí – sát card, không bay ra ngoài */
.lee-pages-slider .flickity-prev-next-button.previous {
    left: 12px;
}

.lee-pages-slider .flickity-prev-next-button.next {
    right: 12px;
}

/* Hover vào slider → hiện nút */
.lee-pages-slider:hover .flickity-button {
    opacity: 1;
    pointer-events: auto;
    background: rgba(0,0,0,0.06);
}

/* Hover nút */
.lee-pages-slider:hover .flickity-button:hover {
    background: rgba(0,0,0,0.10);
}

/* Icon */
.lee-pages-slider .flickity-button-icon {
    width: 16px !important;
    height: 16px !important;
    fill: #333;
    margin: auto !important;
    position: static !important;
}

/* disable */
.lee-pages-slider .flickity-button:disabled {
    opacity: 0;
    pointer-events: none;
}

/* loader state */
.lee-pages-slider.lee-slider-loading {
    opacity: 0;
}

.lee-pages-slider.lee-slider-ready {
    opacity: 1;
    transition: opacity .25s ease;
}

/* =========================================
   6. MOBILE TUNE (≤ 768px)
   ========================================= */
@media (max-width: 768px) {

    /* Wrapper gọn lại */
    .lee-tabbed-content {
        margin: 24px 0 40px;
        padding: 0 12px 20px;
        background: #f5f7f9;
        border-radius: 0;
    }

    /* Tabs: dùng flex-wrap, tự xuống dòng theo width */
    .lee-tabs-nav {
        display: flex;
        flex-wrap: wrap;          /* CHÍNH: không còn scroll, tự chia hàng */
        justify-content: flex-start;
        gap: 10px;
        padding: 10px 8px 0;
        margin: 12px 0 8px;
        width: 100%;
        overflow-x: visible;
    }

    .lee-tabs-nav .lee-tab {
        flex: 0 0 auto;           /* pill theo nội dung */
    }

    .lee-tabs-nav .lee-tab a {
        padding: 7px 16px;
        font-size: 12px;
        white-space: nowrap;
    }

    /* Slider: full width, 1 card */
    .lee-pages-slider {
        margin: 16px 0 8px;
    }

    .lee-pages-slider .lee-page-card {
        width: 100%;
        margin: 0 0 24px;
        border-radius: 16px;
        box-shadow: 0 14px 28px rgba(15,23,42,0.12);
    }

 

    .lee-card-logo img {
        max-width: 48px;
    }

    /* Text KHÔNG overlay nữa: đưa xuống dưới ảnh */
    .lee-page-text {
        position: relative;
        background: #ffffff;
        padding: 14px 16px 16px;
        color: #111827;
        display: block;
        height: auto;
        min-height: 90px; /* GIỮ KHÔNG GIAN CHO TITLE + MÔ TẢ */
    }

    .lee-page-title {
		font-size: calc(var(--wp--preset--font-size--medium) - 2px);
        margin-bottom: 6px;
        line-height: 1.3;
        color: #000;
        font-weight: 700;
        display: block;
    }

    .lee-page-desc,
    .lee-page-category {
        display: -webkit-box;
        -webkit-line-clamp: 3; /* hiển thị mô tả SEO */
        -webkit-box-orient: vertical;
        overflow: hidden;
        font-size: calc(var(--wp--preset--font-size--small) - 2px);
        line-height: 1.45;
        color: #4b5563;
        max-height: 56px; /* tránh bị tràn */
    }

    /* Tag mũi tên chuyển lên góc phải như app */
    .lee-page-arrow-tag {
        top: 14px;
        right: 14px;
        bottom: auto;
        width: 30px;
        height: 30px;
        background: #ffffff;
        box-shadow: 0 8px 20px rgba(15,23,42,0.35);
    }

    .lee-page-card::after {
        bottom: -8px;
        width: 70%;
        height: 10px;
    }

    /* Ẩn nút prev/next – mobile vuốt là đủ */
    .lee-pages-slider .flickity-button {
        display: none !important;
    }
	 .lee-page-card {
        aspect-ratio: auto;
        min-height: 0;
        border-radius: 16px;
        box-shadow: 0 14px 28px rgba(15,23,42,0.12);
    }


    /* TEXT KHÔNG OVERLAY NỮA – ĐẶT DƯỚI ẢNH */
    .lee-page-text {
        position: static;          /* hoặc position: relative; */
        left: auto;
        right: auto;
        bottom: auto;
        padding: 12px 14px 14px;
        background: #ffffff;       /* nền trắng như card trên */
        color: #111827;
        border-radius: 0 0 16px 16px;
    }

    .lee-page-title {
        margin: 0 0 4px;
        font-weight: 700;
        color: #000000;
        line-height: 1.35;
    }

    .lee-page-desc,
    .lee-page-category {
        margin: 0;
        font-size: 13px;
        line-height: 1.5;
        color: #4b5563;
        display: -webkit-box;
        -webkit-line-clamp: 3;
        -webkit-box-orient: vertical;
        overflow: hidden;
    }

    /* Tag mũi tên góc phải trên */
    .lee-page-arrow-tag {
        top: 14px;
        right: 14px;
        bottom: auto;
        width: 30px;
        height: 30px;
    }

    /* Ẩn mũi tên Flickity trên mobile, vuốt là đủ */
    .lee-pages-slider .flickity-button {
        display: none !important;
    }
}

.lee-pages-slider .flickity-viewport {
    overflow: visible;
}
