/**
 * KB Product Image Simple Widget
 * Simple product image with thumbnail gallery and COA lightbox
 */

.kbpb-product-image-simple {
    display: block;
    text-align: center;
}

/* Main image container */
.kbpb-simple-main-image {
    display: block;
    margin-bottom: 0;
}

.kbpb-product-image-simple img.kbpb-product-main-image {
    display: inline-block;
    height: auto;
    max-width: 100%;
    width: auto;
    border-radius: 8px;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    object-fit: contain;
}

.kbpb-product-image-simple a.kbpb-image-lightbox {
    display: inline-block;
    cursor: pointer;
}

.kbpb-product-image-simple a.kbpb-image-lightbox:hover img.kbpb-product-main-image {
    transform: scale(1.02);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.15);
}

/* ========================================
   Thumbnail Strip
   ======================================== */

.kbpb-simple-thumbnails {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 8px;
    margin-top: 12px;
    flex-wrap: wrap;
}

.kbpb-simple-thumbnail {
    position: relative;
    width: 70px !important;
    height: 70px !important;
    min-width: 70px !important;
    max-width: 70px !important;
    min-height: 70px !important;
    max-height: 70px !important;
    border-radius: 6px;
    overflow: hidden !important;
    cursor: pointer;
    border: 2px solid transparent;
    opacity: 0.65;
    transition: opacity 0.2s ease, border-color 0.2s ease, transform 0.2s ease;
    flex-shrink: 0;
    display: block;
}

.kbpb-simple-thumbnail img,
.kbpb-product-image-simple .kbpb-simple-thumbnail img {
    width: 100% !important;
    height: 100% !important;
    max-width: 100% !important;
    max-height: 100% !important;
    min-width: 100% !important;
    object-fit: cover !important;
    display: block !important;
    border-radius: 0 !important;
    border: none !important;
    margin: 0 !important;
    padding: 0 !important;
    transition: none !important;
    transform: none !important;
    box-shadow: none !important;
}

.kbpb-simple-thumbnail:hover {
    opacity: 1;
    transform: scale(1.05);
}

.kbpb-simple-thumbnail.active {
    opacity: 1;
    border-color: #E84B19;
}

/* ========================================
   COA Badge
   ======================================== */

.kbpb-coa-badge {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: rgba(0, 0, 0, 0.75);
    color: #fff;
    font-size: 9px;
    font-weight: 700;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    text-align: center;
    padding: 2px 0;
    line-height: 1;
    pointer-events: none;
    z-index: 2;
}

/* ========================================
   Lightbox Overlay
   ======================================== */

.kbpb-simple-lightbox-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.92);
    z-index: 99999;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: zoom-out;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.kbpb-simple-lightbox-overlay.visible {
    opacity: 1;
}

.kbpb-simple-lightbox-overlay img {
    max-width: 90% !important;
    max-height: 90vh !important;
    width: auto !important;
    height: auto !important;
    border-radius: 4px !important;
    box-shadow: 0 8px 40px rgba(0, 0, 0, 0.5) !important;
    object-fit: contain !important;
}

.kbpb-simple-lightbox-close {
    position: absolute;
    top: 20px;
    right: 24px;
    color: #fff;
    font-size: 32px;
    font-weight: 300;
    cursor: pointer;
    line-height: 1;
    opacity: 0.7;
    transition: opacity 0.2s ease;
    z-index: 100000;
    background: none;
    border: none;
    font-family: Arial, sans-serif;
}

.kbpb-simple-lightbox-close:hover {
    opacity: 1;
}

.kbpb-simple-lightbox-title {
    position: absolute;
    bottom: 20px;
    left: 0;
    right: 0;
    text-align: center;
    color: #fff;
    font-size: 14px;
    font-weight: 500;
    opacity: 0.8;
    pointer-events: none;
}

/* ========================================
   Responsive
   ======================================== */

@media (max-width: 768px) {
    .kbpb-simple-thumbnail {
        width: 55px !important;
        height: 55px !important;
        min-width: 55px !important;
        max-width: 55px !important;
        min-height: 55px !important;
        max-height: 55px !important;
    }

    .kbpb-simple-thumbnails {
        gap: 6px;
        margin-top: 10px;
    }

    .kbpb-coa-badge {
        font-size: 8px;
    }
}
