/* Swiper container */
.swiper {
    width: 100%;
    max-width: 450px;
    height: 55px;
    border-radius: 5px;
    overflow: hidden; /* Chặn ảnh tràn */
    position: relative;
    background-color: #f0f0f0;
    box-sizing: border-box;
}

/* Wrapper chứa các slide */
.swiper-wrapper {
    height: 100%;
    display: flex;
    transition-timing-function: ease;
}

/* Mỗi slide */
.swiper-slide {
    flex-shrink: 0;
    width: 100% !important;
    height: 100%;
    position: relative;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    box-sizing: border-box;
    line-height: 1; /* Ngăn khoảng trắng thừa */
}

/* Link bọc ảnh */
.swiper-slide > a {
    display: block;
    height: 100%;
    width: 100%;
    vertical-align: middle; /* Ngăn ảnh bị đẩy theo baseline */
    cursor: pointer;
}

/* Ảnh trong slide */
.swiper-slide > a > img,
.swiper-slide > img {
    width: 100%;
    height: 100%;
    max-height: 100%;
    display: block;
    object-fit: contain;      /* Hiển thị vừa vặn khung */
    object-position: center;
    border-radius: 5px;
    line-height: 1;
    box-sizing: border-box;
    cursor: pointer;
}

/* Nút điều hướng */
.swiper-button-next,
.swiper-button-prev {
    width: 32px;
    height: 32px;
    background-color: rgba(255, 255, 255, 0.85);
    border-radius: 50%;
    border: 1px solid #ccc;
    top: 50%;
    transform: translateY(-50%);
    position: absolute;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    z-index: 10;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.15);
}

.swiper:hover .swiper-button-next,
.swiper:hover .swiper-button-prev {
    visibility: visible;
    opacity: 1;
}

.swiper-button-next { right: 5px; }
.swiper-button-prev { left: 5px; }

.swiper-button-next svg,
.swiper-button-prev svg {
    width: 14px;
    height: 14px;
}

.swiper-button-next:hover,
.swiper-button-prev:hover {
    background-color: #fff;
    border-color: #888;
}

/* Pagination */
.swiper-pagination {
    bottom: 5px;
    position: absolute;
    width: 100%;
    text-align: center;
}

.swiper-pagination .swiper-pagination-bullet {
    width: 12px;
    height: 4px;
    border-radius: 4px;
    background-color: #999;
    opacity: 0.6;
    margin: 0 3px;
}

.swiper-pagination .swiper-pagination-bullet-active {
    background-color: #000;
    opacity: 1;
}
