/* =====================================================================
   KSI Product Gallery
   File: /inc/product-gallery/gallery.css
   Enqueued automatically by gallery-shortcode.php — only on Solutions posts.
   ===================================================================== */

.ksi-gallery {
    width: 100%;
}

.ksi-gallery__main {
    position: relative;
    width: 100%;
    background: linear-gradient(180deg, #f4f4f4 0%, #e2e2e2 100%);
    border-radius: 16px;
    overflow: hidden;
    box-sizing: border-box;
}

.ksi-gallery__main-img {
    display: block;
    width: 100%;
    height: auto;
    max-height: 680px;
    object-fit: contain;
    margin: 0 auto;
    border-radius: 20px;
    user-select: none;
    -webkit-user-drag: none;
    cursor: crosshair;
    touch-action: none;
}

/* ---------- Circular magnifier loupe ---------- */
.ksi-gallery__loupe {
    display: none;
    position: absolute;
    top: 0;
    left: 0;
    border-radius: 50%;
    border: 3px solid rgba(255, 255, 255, 0.9);
    box-shadow:
        0 0 0 1px rgba(0, 0, 0, 0.15),
        0 8px 20px rgba(0, 0, 0, 0.25);
    background-repeat: no-repeat;
    background-color: #fff;
    pointer-events: none; 
    z-index: 5;
}

/* ---------- Thumbnails (overlaid at the bottom of the main image) ---------- */
.ksi-gallery .ksi-gallery__thumbs {
    display: flex !important;
    justify-content: center !important;
    align-items: center !important;
    gap: 10px !important;
    position: absolute !important;
    bottom: 30px !important;
    left: 0 !important;
    right: 0 !important;
    margin: 0 !important;
    z-index: 6 !important;
}

/* Hardened against Elementor's global "Buttons" style (Site Settings > Buttons
   applies to plain <button> elements site-wide with high specificity). Every
   visual property is forced with !important and the selector is scoped for
   extra specificity. */
.ksi-gallery .ksi-gallery__thumb {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    padding: 0 !important;
    margin: 0 !important;
    border: 2px solid transparent !important;
    border-radius: 8px !important;
    overflow: hidden !important;
    background: transparent !important;
    cursor: pointer !important;
    width: 64px !important;
    height: 64px !important;
    min-width: 64px !important;
    line-height: 0 !important;
    box-shadow: none !important;
    outline: none !important;
    -webkit-appearance: none !important;
    appearance: none !important;
    text-transform: none !important;
    font-weight: 400 !important;
    transition: border-color 0.2s ease !important;
}

.ksi-gallery .ksi-gallery__thumb img {
    width: 100% !important;
    height: 100% !important;
    object-fit: cover !important;
    display: block !important;
    margin: 0 !important;
    pointer-events: none !important;
}

.ksi-gallery .ksi-gallery__thumb.is-active {
    border-color: #8a1f2d !important;
}

.ksi-gallery .ksi-gallery__thumb:hover {
    border-color: rgba(138, 31, 45, 0.5) !important;
}

@media (max-width: 880px) {
    .ksi-gallery .ksi-gallery__thumbs {
    bottom: 10px !important;
}
}
@media (max-width: 767px) {
    .ksi-gallery__main {
    background: unset;
    border-radius: 10px;
}
.ksi-gallery .ksi-gallery__thumbs {
    position: relative !important;
    bottom: 0px !important;
}
.ksi-gallery .ksi-gallery__thumb {
    width: 50px !important;
    height: 50px !important;
    min-width: 50px !important;
}
.ksi-gallery__main-img {
    padding-bottom: 10px;
}
}