﻿
/* ========== BANNER CAROUSEL - FULL WIDTH, FIT VIEWPORT ========== */
.banner-carousel {
    width: 100%;
    height: 100vh;
    max-height: 100vh;
    position: relative;
    overflow: hidden;
    background: #f5f5f5;
    user-select: none;
    cursor: grab;
    display: flex;
    flex-direction: column;
}

.banner-carousel:active {
    cursor: grabbing;
}

.banner-wrapper {
    width: 100%;
    flex: 1;
    min-height: 0;
    position: relative;
    overflow: hidden;
}

.banner-slide {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    transition: opacity 1s ease-in-out;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.banner-slide.active {
    opacity: 1;
}

.banner-image-wrapper {
    width: 100%;
    height: 80vh;
    max-height: 800px;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #000;
    flex-shrink: 0;
}

.banner-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.banner-slide-link {
    display: flex;
    flex-direction: column;
    width: 100%;
    height: 100%;
    text-decoration: none;
    color: inherit;
    position: relative;
    z-index: 1;
    cursor: pointer;
}

.banner-content-wrapper {
    width: 100%;
    background: #f8f6f3;
    padding: 20px 30px 60px 30px;
    box-sizing: border-box;
    position: relative;
    z-index: 1;
    flex-shrink: 0;
    overflow-y: auto;
    min-height: 0;
}

.banner-content {
    max-width: 1200px;
    margin: 0 auto;
    text-align: center;
}

.banner-title {
    font-size: 2rem;
    font-weight: 700;
    color: #8B0000;
    margin-bottom: 10px;
    line-height: 1.3;
}

.banner-description {
    font-size: 1rem;
    color: #555;
    line-height: 1.6;
    margin: 0;
}

.banner-dots {
    position: absolute;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 12px;
    z-index: 100;
    pointer-events: auto;
}

.banner-dot {
    width: 14px;
    height: 14px;
    background: rgba(255, 255, 255, 0.7);
    border-radius: 50%;
    border: 2px solid rgba(255, 255, 255, 0.5);
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    z-index: 101;
    pointer-events: auto;
}

.banner-dot:hover {
    background: rgba(255, 255, 255, 0.9);
    transform: scale(1.15);
}

.banner-dot.active {
    background: #fbbf24;
    border-color: rgba(255, 255, 255, 0.9);
    box-shadow: 0 0 12px rgba(251, 191, 36, 0.8);
    transform: scale(1.25);
}

.banner-dot::after {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: 50%;
    border: 2px solid rgba(251, 191, 36, 0.6);
    transform: scale(0.5);
    opacity: 0;
    transition: all 0.4s ease;
}

.banner-dot:active::after {
    transform: scale(2);
    opacity: 1;
}

/* ========== RESPONSIVE ========== */
/*@media (max-width: 992px) {
    .banner-carousel {
        height: 100vh;
        max-height: 100vh;
    }

    .banner-image-wrapper {
        height: 55vh;
        max-height: 450px;
    }

    .banner-content-wrapper {
        padding: 15px 20px 55px 20px;
    }

    .banner-title {
        font-size: 1.5rem;
        margin-bottom: 8px;
    }

    .banner-description {
        font-size: 0.9rem;
    }
}

@media (max-width: 768px) {
    .banner-carousel {
        height: auto;
        max-height: none;
        min-height: auto;
        overflow: visible;
        cursor: default;
    }

    .banner-carousel:active {
        cursor: default;
    }

    .banner-slide-link {
        cursor: default;
        touch-action: pan-y;
    }

    .banner-image-wrapper {
        height: 300px;
        max-height: 300px;
    }

    .banner-content-wrapper {
        padding: 12px 15px 50px 15px;
    }

    .banner-title {
        font-size: 1.3rem;
        margin-bottom: 6px;
    }

    .banner-description {
        font-size: 0.85rem;
        line-height: 1.4;
    }

    .banner-dots {
        bottom: 15px;
    }

    .banner-dot {
        width: 12px;
        height: 12px;
    }
}

@media (max-width: 576px) {
    .banner-carousel {
        height: auto;
        max-height: none;
        min-height: auto;
        overflow: visible;
        cursor: default;
    }

    .banner-carousel:active {
        cursor: default;
    }

    .banner-slide-link {
        cursor: default;
        touch-action: pan-y;
    }

    .banner-image-wrapper {
        height: 250px;
        max-height: 250px;
    }

    .banner-content-wrapper {
        padding: 10px 12px 45px 12px;
    }

    .banner-title {
        font-size: 1.1rem;
        margin-bottom: 5px;
    }

    .banner-description {
        font-size: 0.8rem;
        line-height: 1.3;
    }

    .banner-dots {
        bottom: 12px;
        gap: 10px;
    }

    .banner-dot {
        width: 10px;
        height: 10px;
    }
}

*/

/* --- GRID SẢN PHẨM --- */
.isotope-grid {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    gap: 20px;
}

.grid-item {
    flex: 1 1 calc(20% - 20px); /* ✅ 5 cột trên PC */
    max-width: calc(20% - 20px);
    box-sizing: border-box;
}

/* Laptop: 4 cột */
@media (max-width: 1400px) {
    .grid-item {
        flex: 1 1 calc(25% - 20px);
        max-width: calc(25% - 20px);
    }
}

/* Tablet: 3 cột */
@media (max-width: 991px) {
    .grid-item {
        flex: 1 1 calc(33.33% - 20px);
        max-width: calc(33.33% - 20px);
    }
}

/* Mobile: 2 cột */
@media (max-width: 575px) {
    .grid-item {
        flex: 1 1 calc(50% - 20px);
        max-width: calc(50% - 20px);
    }
}


.product {
    width: 100%;
    text-align: center;
    transition: transform 0.3s ease;
    background: #fff;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
    display: flex;
    flex-direction: column;
    height: 100%;
}

    .product:hover {
        transform: translateY(-6px);
        box-shadow: 0 6px 15px rgba(0,0,0,0.1);
    }

/* --- KHUNG ẢNH (Không cố định chiều cao, tự động điều chỉnh) --- */
.product-thumb {
    position: relative;
    overflow: hidden;
    background: #f8f8f8;
    display: flex;
    align-items: center;
    justify-content: center;
    /* Loại bỏ chiều cao cố định để ảnh tự điều chỉnh */
}

    /* --- ẢNH HIỂN THỊ KÍCH THƯỚC THẬT (Tối đa là 100% chiều rộng cột) --- */
    .product-thumb img {
        /* Đảm bảo ảnh không vượt quá chiều rộng của cột */
        max-width: 100%;
        /* Tự động tính chiều cao theo tỷ lệ gốc */
        height: auto;
        border-radius: 0;
        transition: transform 0.3s ease;
    }

    /* --- HIỆU ỨNG HOVER ẢNH THỨ HAI --- */
    .product-thumb .image-hover {
        position: absolute;
        top: 0;
        left: 0;
        opacity: 0;
        transition: opacity 0.3s ease;
        /* Áp dụng lại các quy tắc kích thước để khớp với ảnh chính */
        max-width: 100%;
        height: auto;
    }

    .product-thumb:hover img.image-hover {
        opacity: 1;
    }

/* --- TÊN & GIÁ --- */
.product-info {
    padding: 15px 10px;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
}

.product-title {
    font-size: 16px;
    font-weight: 600;
    color: #333;
    margin-bottom: 8px;
}

    .product-title a {
        color: inherit;
        text-decoration: none;
    }

        .product-title a:hover {
            color: #b8895e;
        }

.product-price {
    font-size: 15px;
    font-weight: bold;
    color: #b8895e;
}

/* --- NÚT TIM YÊU THÍCH --- */
.add-to-wishlist {
    position: absolute;
    top: 10px;
    right: 10px;
    color: #fff;
    background: rgba(0, 0, 0, 0.4);
    border-radius: 50%;
    padding: 8px;
    transition: background 0.3s ease;
}

    .add-to-wishlist:hover {
        background: #b8895e;
    }

.learts-mb-30 {
    margin-bottom: 25px !important;
}

/* --- RESPONSIVE --- */
@media (max-width: 991px) {
    .grid-item {
        flex: 1 1 calc(33.33% - 20px); /* 3 items per row */
        max-width: calc(33.33% - 20px);
    }
}

@media (max-width: 575px) {
    .grid-item {
        flex: 1 1 calc(50% - 20px); /* 2 items per row */
        max-width: calc(50% - 20px);
    }
}





/*SHOW SP THEO DẠNG MASONRY*/
.masonry-grid-container {
    column-count: 5;
    column-gap: 10px;
    margin: 0;
    padding: 0;
    width: 100%;
}


.masonry-grid-item {
    display: inline-block;
    width: 100%;
    break-inside: avoid;
}



/* Màn hình Laptop/Desktop vừa (Max 1400px): 4 Cột */
@media (max-width: 1400px) {
    .masonry-grid-container {
        column-count: 4;
    }
}

/* Tablets ngang/Laptop nhỏ (Max 992px): 3 Cột */
@media (max-width: 992px) {
    .masonry-grid-container {
        column-count: 3;
    }
}

/* Mobile ngang/Tablets dọc (Max 768px): 2 Cột */
@media (max-width: 768px) {
    .masonry-grid-container {
        column-count: 2;
    }
}

/* Mobile dọc (Max 576px): 1 Cột */
@media (max-width: 576px) {
    .masonry-grid-container {
        column-count: 1;
        column-gap: 0;
    }
}

/* ========== Dots (Pagination Indicators) ========== */
.dots {
    position: absolute;
    bottom: 25px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 10px;
    z-index: 10;
}

.dot {
    width: 10px;
    height: 10px;
    background: rgba(255, 255, 255, 0.5);
    border-radius: 50%;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
}

    /* Hiệu ứng hover và active */
    .dot:hover {
        background: rgba(255, 255, 255, 0.8);
        transform: scale(1.15);
    }

    /* Active dot — có viền sáng & bóng nhẹ */
    .dot.active {
        background: #fbbf24; /* Màu amber vàng */
        box-shadow: 0 0 10px rgba(251, 191, 36, 0.8);
        transform: scale(1.2);
    }

    /* Thêm hiệu ứng gợn sóng khi click */
    .dot::after {
        content: '';
        position: absolute;
        inset: 0;
        border-radius: 50%;
        border: 2px solid rgba(251, 191, 36, 0.5);
        transform: scale(0.5);
        opacity: 0;
        transition: all 0.4s ease;
    }

    .dot:active::after {
        transform: scale(2);
        opacity: 1;
    }
/* ✅ MOBILE FIX: hiển thị 1 cột duy nhất */
@media (max-width: 768px) {
    .masonry-grid-container {
        column-count: 1 !important;
        column-gap: 0 !important;
    }

    .masonry-grid-item {
        width: 100% !important;
        display: block !important;
        margin-bottom: 20px !important;
    }

        .masonry-grid-item img {
            width: 100% !important;
            height: auto !important;
            display: block;
            border-radius: 8px;
        }

    .portfolio {
        width: 100% !important;
        box-shadow: 0 2px 8px rgba(0,0,0,0.08);
        border-radius: 10px;
        overflow: hidden;
        background: #fff;
    }

        .portfolio .content {
            padding: 12px;
            text-align: center;
        }

        .portfolio .title {
            font-size: 1rem;
            margin-top: 5px;
        }
}
/* ===== FADE-IN ANIMATION CHO SẢN PHẨM ===== */
.fade-item {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}

    .fade-item.fade-visible {
        opacity: 1;
        transform: translateY(0);
    }
/* ============================
   📌 FIX RESPONSIVE BANNER
   ============================ */

@media (max-width: 768px) {

    /* Banner không cố định chiều cao nữa */
    .banner {
        width: 100%;
        height: auto !important;
        box-shadow: none;
    }

    /* Slide chuyển về layout dọc */
    .slide {
        position: relative;
        flex-direction: column !important;
        width: 100%;
        height: auto !important;
    }

    /* Ảnh chiếm full chiều ngang, tự cao theo tỷ lệ */
    .image-container {
        width: 100% !important;
        height: auto !important;
    }

        .image-container img {
            width: 100% !important;
            height: auto !important;
            object-fit: cover;
            display: block;
            border-radius: 0 !important;
        }

    /* Text block xuống dưới */
    .text-container {
        width: 100% !important;
        height: auto !important;
        padding: 20px;
        border-radius: 0 !important;
        background: rgba(255,255,255,0.95);
    }

    /* Tiêu đề */
    .title {
        font-size: 1.4rem !important;
        line-height: 1.3 !important;
    }

    /* Subtitle */
    .sub-title {
        font-size: 0.9rem !important;
    }

    /* Nút */
    .btn {
        font-size: 0.9rem !important;
        padding: 10px 20px !important;
    }

    /* Dots hạ xuống dưới slide */
    .dots {
        bottom: 10px !important;
    }
}
/* ============================
   📌 FIX RESPONSIVE BANNER MOBILE
   ============================ */
@media (max-width: 768px) {

    /* Banner phải giữ chiều cao cố định */
    .banner {
        width: 100%;
        height: 600px !important; /* 👈 GIỮ 600px hoặc bạn muốn 500px / 650px */
        overflow: hidden;
        position: relative;
    }

    /* Slide VẪN PHẢI ABSOLUTE để chồng lên nhau */
    .slide {
        position: absolute !important;
        top: 0;
        left: 0;
        width: 100%;
        height: 100% !important; /* 👈 luôn full banner */
        flex-direction: column !important;
    }

    @media (max-width: 768px) {

        .image-container {
            width: 100% !important;
            height: auto !important;
            flex: 1 1 auto;
        }

            .image-container img {
                width: 100% !important;
                height: auto !important;
                object-fit: cover !important;
                display: block;
            }
    }


    /* Phần text */
    .text-container {
        width: 100% !important;
        height: 40% !important; /* Text chiếm 40% */
        padding: 20px;
        border-radius: 0 !important;
        background: rgba(255,255,255,0.95);
        text-align: center;
    }

    .title {
        font-size: 1.4rem !important;
    }

    .sub-title {
        font-size: 0.9rem !important;
    }

    .btn {
        font-size: 0.9rem !important;
        padding: 10px 20px !important;
    }

    .dots {
        bottom: 12px !important;
    }
}
    /* Màu chữ đỏ */
    .portfolio .content,
    .portfolio .content h4,
    .portfolio .content p,
    .portfolio .content a {
        color: black !important;
        text-shadow: none !important; /* bỏ bóng chữ */
    }

    .portfolio {
        position: relative;
        overflow: hidden;
        background: #fff; /* nền trắng */
    }

        /* Ảnh */
        .portfolio .thumbnail {
            position: relative;
            z-index: 1;
        }

            .portfolio .thumbnail img {
                width: 100%;
                display: block;
                transition: opacity 0.4s ease, transform 0.4s ease;
            }

            /* Overlay đổi thành trắng nhạt */
            .portfolio .thumbnail::before {
                content: "";
                position: absolute;
                inset: 0;
                background-color: rgba(255,255,255,0.0);
                opacity: 0;
                transition: opacity 0.4s ease, background-color 0.4s ease;
                z-index: 2;
            }

        /* Hover: phủ lớp trắng nhẹ */
        .portfolio:hover .thumbnail::before {
            background-color: rgba(255,255,255,0.75);
            opacity: 1;
        }

        .portfolio:hover .thumbnail img {
            opacity: 0.8;
            transform: scale(1.03);
        }

        /* Nội dung chữ */
        .portfolio .content {
            position: absolute;
            top: 50%;
            left: 50%;
            transform: translate(-50%, -50%);
            z-index: 3;
            text-align: center;
            width: 80%;
            max-width: 90%;
            line-height: 1.6;
            opacity: 0;
            transition: opacity 0.4s ease, transform 0.4s ease;
            pointer-events: none;
        }

        .portfolio:hover .content {
            opacity: 1;
            transform: translate(-50%, -50%) scale(1.02);
        }

        /* Nút xem thêm */
        .portfolio .read-more-btn {
            display: inline-block;
            margin-top: 10px;
            padding: 8px 24px;
            color: black;
            font-size: 14px;
            font-weight: 600;
            border-radius: 25px;
            transition: all 0.3s ease;
            pointer-events: none;
            opacity: 0;
            transform: translateY(10px);
        }

        .portfolio:hover .read-more-btn {
            opacity: 1;
            transform: translateY(0);
        }

        /* SKU tag (không nền) */
        .portfolio .sku-tag {
            position: absolute;
            bottom: 20px;
            left: 50%;
            transform: translateX(-50%) translateY(10px);
            color: black;
            font-size: 14px;
            font-weight: 600;
            padding: 6px 0; /* gọn hơn vì không có nền */
            min-width: 250px;
            text-align: center;
            border-radius: 0; /* bỏ bo góc */
            background: none !important; /* không nền */
            box-shadow: none !important; /* không bóng */
            z-index: 4;
            opacity: 0;
            transition: opacity 0.4s ease 0.1s, transform 0.3s ease 0.1s;
        }

        .portfolio:hover .sku-tag {
            opacity: 1;
            transform: translateX(-50%) translateY(0);
            background: none !important;
        }


        /* Hover link sáng hơn */
        .portfolio .content a:hover {
            color: #c40000 !important;
        }
        /* Hiệu ứng xuất hiện mượt */
.fade-item {
    opacity: 0;
    transform: translateY(20px) scale(0.98);
    transition: opacity 0.6s cubic-bezier(.25,.46,.45,.94),
                transform 0.6s cubic-bezier(.25,.46,.45,.94);
    will-change: opacity, transform;
}

.fade-item.fade-visible {
    opacity: 1;
    transform: translateY(0) scale(1);
}

/* Stagger nhẹ nhàng */
.masonry-grid-item {
    transition-delay: 0.05s;
}


/* Hiệu ứng hover mềm hơn */
.portfolio .thumbnail img {
    transition: transform 0.6s cubic-bezier(0.22, 1, 0.36, 1), opacity 0.4s ease;
}

.portfolio .thumbnail img {
    transition: transform 0.5s ease, opacity 0.4s ease;
}

.portfolio:hover .thumbnail img {
    transform: scale(1.015);
    opacity: 0.92;
}

@media (max-width: 768px) {
    .portfolio .content,
    .portfolio .read-more-btn,
    .portfolio .sku-tag {
        pointer-events: auto !important;
    }
}
.skeleton {
    background: #eee;
    border-radius: 6px;
    width: 100%;
    height: 380px; /* gần bằng chiều cao trung bình */
    animation: pulse 1.2s ease-in-out infinite;
}

@keyframes pulse {
    0% { opacity: .6; }
    50% { opacity: 1; }
    100% { opacity: .6; }
}

  .skeleton {
    background: #f2f2f2;
    width: 100%;
    border-radius: 6px;
    animation: skeleton-loading 1.2s infinite linear;
}

@keyframes skeleton-loading {
    0% { opacity: .6; }
    50% { opacity: .3; }
    100% { opacity: .6; }
}

.lazy-fade {
    opacity: 0;
    transition: opacity .5s ease;
}

.lazy-loaded {
    opacity: 1;
}

    /* Fade-in ảnh mới load */
    .lazy-image {
        opacity: 0;
        transform: scale(0.97);
        transition: opacity 0.8s ease-out, transform 0.8s ease-out;
    }

        .lazy-image.loaded {
            opacity: 1;
            transform: scale(1);
        }
.section-title-wrapper {
    text-align: center;
    margin-top: 50px;
    font-family: Marcellus",Arial,Helvetica,sans-serif;
}

.section-title {
    font-size: 40px;
    font-weight: 700;
    letter-spacing: 2px;
    color: #222;
    text-transform: uppercase;
    margin-bottom: 15px;
}
/* ✅ Mobile (≤ 576px) */
@media (max-width: 576px) {
    .section-title {
        font-size: 20px; /* giảm xuống tùy ý */
        letter-spacing: 1px;
    }
}

/* ✅ Tablet (≤ 768px) */
@media (max-width: 768px) {
    .section-title {
        font-size: 25px;
    }
}

.section-divider {
    width: 100px;
    height: 4px;
    background-color: #b46a32; /* màu nâu đồng hoặc màu chủ đạo của web */
    border-radius: 2px;
}