/* ---------------- Desktop (Default) ---------------- */
.owl-main .item img {
    width: auto;
    height: 100%;
    border-radius: 0;
    object-fit: contain;
    max-height: unset;
}




.owl-main .caption {
    text-align: center;
    margin-top: 6px;
    font-size: 0.9rem;
    color: #555;
}

.thumbs-wrapper {
    position: relative;
    display: flex;
    align-items: center;
    padding: 0px 46px;
}

.owl-thumbs {
    display: flex;
    gap: 8px;
    flex-wrap: nowrap;         /* ❌ ไม่ให้ขึ้นหลายแถว */
    overflow-x: auto;          /* ✅ เลื่อนได้แนวนอน */
    overflow-y: hidden;
    scroll-behavior: smooth;
    white-space: nowrap;
    height: 179px;             /* เท่ากับ .owl-thumb */
    scrollbar-width: none;     /* Firefox ซ่อน scrollbar */
    flex: 1;
}
.owl-thumbs::-webkit-scrollbar {
    display: none;             /* Chrome, Edge, Safari */
}

.owl-thumb {
    flex: 0 0 auto;            /* ❌ ไม่ให้ยืดเต็มแถว */
    width: auto;
    height: 179px;
    cursor: pointer;
    opacity: 0.7;
    border-radius: 0;
}
.owl-thumb img {
    height:100% !important; 
    width:auto !important; 
    max-width:100% !important;
    object-fit: contain !important;
    border-radius: 0 !important;
}

/* ปุ่มเลื่อน */
.thumbs-prev,
.thumbs-next {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background-color: #4f55a1;
    opacity: 0.5;
    color: #fff;
    border: none;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 20px;
    z-index: 2;
    transition: background-color 0.3s ease, opacity 0.3s ease, transform 0.3s ease;
}
.thumbs-prev { left: 5px; }
.thumbs-next { right: 5px; }

.thumbs-prev:hover,
.thumbs-next:hover {
    background-color: #5a61b2;
    opacity: 1;              
    transform: translateY(-50%) scale(1.1); 
}
.owl-thumb.active {
    outline: 2px solid #3b82f6;
    opacity: 1;
}

.owl-carousel.owl-main.owl-loaded.owl-drag{
    height: 100%;
}

.owl-stage-outer {
    height: 100%;
    background-color: #E6E8FF;
}



.owl-item .item{
    width: 100%;
    height: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
}

.owl-item {
    height: 557px;
}

@media (max-width:1024px) {
    .owl-item {
        height: 465px;
    }
}


@media (max-width:576px) {
    .owl-item {
        height: 357px;
    }
}

/* ---------------- Mobile (Responsive) ---------------- */
@media(max-width: 992px) {
    .owl-thumbs {
        height: 150px;
        gap: 4px; 
    }
    .owl-thumb {
        width: auto;
        height: 100%; 
    }
    .owl-main .caption {
        font-size: 0.8rem; /* ลดขนาดตัวอักษร caption */
    }
}
