/* ==========================================================================
   SLIDER SPECTRA CUSTOM - HIỂN THỊ CHUẨN 3 THẺ (ẢNH LIỀN KHỐI)
   ========================================================================== */

/* --- 1. KHUNG TỔNG --- */
.wt-spectra-slider {
    position: relative !important;
    width: 100% !important;
    max-width: 1350px !important; 
    margin: 0 auto !important;
    padding: 0 80px !important; 
    box-sizing: border-box !important;
    overflow: hidden !important; 
}

/* --- 2. KHUNG TRƯỢT NGANG --- */
.wt-track-container,
.wt-track-container > .uagb-container-inner-blocks {
    display: flex !important;
    flex-wrap: nowrap !important;
    justify-content: flex-start !important; 
    align-items: stretch !important;
    overflow-x: auto !important; 
    gap: 30px !important; 
    scroll-behavior: smooth !important;
    scroll-snap-type: x mandatory !important; 
    margin: 0 !important;
    padding: 0 !important;
    width: 100% !important; 
    -ms-overflow-style: none; 
    scrollbar-width: none; 
}

.wt-track-container::-webkit-scrollbar,
.wt-track-container > .uagb-container-inner-blocks::-webkit-scrollbar {
    display: none !important;
}

/* --- 3. THẺ SẢN PHẨM (ẢNH) --- */
.wt-slide-card {
    flex: 0 0 calc((100% - 60px) / 3) !important; 
    width: calc((100% - 60px) / 3) !important;
    min-width: calc((100% - 60px) / 3) !important;
    max-width: calc((100% - 60px) / 3) !important;
    margin: 0 !important; 
    padding: 0 !important;
    overflow: hidden !important; 
    box-sizing: border-box !important;
    scroll-snap-align: start !important; 
    border-radius: 0 !important; 
}

/* --- 4. ẢNH BÊN TRONG & HIỆU ỨNG ZOOM --- */
.wt-slide-card figure,
.wt-slide-card .wp-block-image,
.wt-slide-card .uagb-image {
    margin: 0 !important;
    padding: 0 !important;
    width: 100% !important;
    height: 100% !important;
    overflow: hidden !important; 
    line-height: 0 !important;
}

.wt-slide-card img {
    width: 100% !important;
    height: auto !important; 
    object-fit: cover !important; 
    display: block !important;
    transition: transform 0.4s ease-in-out !important; 
    will-change: transform; 
}

.wt-slide-card:hover img {
    transform: scale(1.05) !important; 
}

/* --- 5. NÚT MŨI TÊN --- */
.wt-btn-prev, 
.wt-btn-next {
    position: absolute !important;
    top: 50% !important; 
    transform: translateY(-50%) !important; 
    z-index: 99 !important;
    width: 40px !important; 
    height: 40px !important;
    background-color: #ffffff !important; 
    border-radius: 50% !important; 
    border: 1px solid #e0e0e0 !important; 
    box-shadow: 0 2px 5px rgba(0,0,0,0.05) !important; 
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    margin: 0 !important;
    padding: 0 !important;
    cursor: pointer;
    transition: opacity 0.3s ease, background-color 0.3s ease !important;
}

.wt-btn-prev *, 
.wt-btn-next * {
    background: transparent !important;
    border: none !important;
    box-shadow: none !important;
    padding: 0 !important;
    margin: 0 !important;
}

.wt-btn-prev svg, 
.wt-btn-next svg {
    width: 16px !important;
    height: 16px !important;
    fill: #333333 !important;
}

.wt-btn-prev { left: -50px !important; }
.wt-btn-next { right: -50px !important; }

.wt-btn-hidden {
    opacity: 0 !important;
    pointer-events: none !important;
}

/* --- 6. TÙY CHỈNH RIÊNG CHO SHOWROOM SLIDER --- */
.showroom-slider {
    margin-bottom: 40px !important;
}

.showroom-slider .wt-slide-card img {
    height: 440px !important; 
}

/* ==========================================================================
   7. RESPONSIVE CHO SLIDER (TABLET & MOBILE)
   ========================================================================== */

/* --- TABLET (Màn hình dưới 1024px) -> Hiển thị 2 thẻ --- */
@media (max-width: 1024px) {
    .wt-spectra-slider {
        padding: 0 60px !important; /* Giảm padding hai bên */
    }
    .wt-slide-card {
        /* 100% trừ đi 1 khoảng gap 30px, chia 2 cột */
        flex: 0 0 calc((100% - 30px) / 2) !important; 
        width: calc((100% - 30px) / 2) !important;
        min-width: calc((100% - 30px) / 2) !important;
        max-width: calc((100% - 30px) / 2) !important;
    }
    
    /* Điều chỉnh lại vị trí nút cho Tablet */
    .wt-btn-prev { left: 10px !important; }
    .wt-btn-next { right: 10px !important; }
}

/* --- MOBILE (Màn hình dưới 767px) -> Hiển thị 1 thẻ --- */
@media (max-width: 767px) {
    .wt-spectra-slider {
        padding: 0 15px !important; /* Mở rộng tối đa diện tích trên mobile */
    }
    .wt-track-container,
    .wt-track-container > .uagb-container-inner-blocks {
        gap: 15px !important; /* Giảm khoảng cách gap cho gọn */
    }
    .wt-slide-card {
        flex: 0 0 100% !important; /* Ép hiển thị 1 thẻ full màn */
        width: 100% !important;
        min-width: 100% !important;
        max-width: 100% !important;
    }
    
    /* Chỉnh lại chiều cao ảnh để không bị quá dài trên mobile */
    .wt-slide-card img {
        height: 480px !important;
    }
    .showroom-slider .wt-slide-card img {
        height: 300px !important;
    }

    /* Thu nhỏ nút và đẩy vào nằm bên trong ảnh */
    .wt-btn-prev, 
    .wt-btn-next {
        width: 34px !important;
        height: 34px !important;
    }
    .wt-btn-prev { left: 20px !important; }
    .wt-btn-next { right: 20px !important; }
}