/* Container for the entire slider */
.cbis-slider-container {
    position: relative;
    max-width: 800px;
    margin: auto;
    text-align: center;
}

/* Main large image */
.cbis-main-image img {
    width: 100%;
    height: auto;
    display: block;
    margin-bottom: 15px; /* Spacing below the main image */
    aspect-ratio: 16 / 9; /* Ensures the main image keeps a consistent ratio */
    object-fit: cover; /* Ensures the image covers the area without stretching */
}

/* THUMBNAILS CONTAINER: Uses Flexbox for a clean, equal-sized grid layout */
.cbis-thumbnails {
    display: flex !important; /* Force Flexbox */
    justify-content: center; /* Center the entire row of thumbnails */
    gap: 10px; /* Space between each thumbnail */
    flex-wrap: wrap; /* Allows thumbnails to wrap to the next line if needed */
    margin-bottom: 20px;
    min-height: 90px; /* Set a minimum height to prevent vertical shifting */
}

/* Individual Thumbnail Images (FORCED GRID FIX) */
.cbis-thumbnails img {
    /* FORCING EQUAL SQUARE SIZE */
    width: 80px !important;  
    height: 80px !important; 
    aspect-ratio: 1 / 1 !important; 
    object-fit: cover !important; /* Ensure the image fills the square without stretching */

    /* Interactive styles */
    margin: 0; 
    cursor: pointer;
    opacity: 0.6;
    transition: all 0.3s;
}

/* Active/Selected Thumbnail */
.cbis-thumbnails img.active {
    opacity: 1;
    border: 3px solid #0073AA; /* Highlight the currently selected thumbnail */
    transform: scale(1.05);
}

/* Navigation Arrows (FIXED POSITION AND STABILITY) */
.cbis-prev, .cbis-next {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(0,0,0,0.5);
    color: white;
    border: none;
    font-size: 24px;
    padding: 5px 10px;
    cursor: pointer;
    z-index: 10;
    
    /* FIX: Prevent arrow shift on click/focus */
    outline: none !important; 
    box-shadow: none !important;
    user-select: none;
    width: 40px; /* Fixed width */
    height: 50px; /* Fixed height */
    line-height: 40px; /* Center the arrow vertically */
    text-align: center;
}

.cbis-prev { left: 0; }
.cbis-next { right: 0; }