/* NOTE: PRODUCT GALLERY (inc/new/sections/product-gallery.php) */

.kmd-product-gallery {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.kmd-product-gallery__main {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    aspect-ratio: 4 / 3;
    overflow: hidden;
    background: var(--kmd-white);
}

.kmd-product-gallery__main img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.kmd-product-gallery__badges {
    position: absolute;
    top: 0;
    left: 0;
    z-index: 1;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
}

.kmd-badge {
    padding: 4px 10px;
    color: var(--kmd-white);
    font-size: 13px;
    font-weight: 700;
    text-transform: uppercase;
}

.kmd-badge--limited {
    background: #9E171D;
}

.kmd-badge--preorder {
    background: #008DC9;
}

.kmd-badge--discount {
    background: #DED622;
    color: var(--kmd-black);
}

.kmd-product-gallery__thumbs {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 8px;
}

.kmd-product-gallery__thumb {
    position: relative;
    display: block;
    aspect-ratio: 1 / 1;
    overflow: hidden;
    background: #F3EFE9;
}

.kmd-product-gallery__thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform .3s;
}

.kmd-product-gallery__thumb:hover img {
    transform: scale(1.05);
}

.kmd-product-gallery__more::after {
    content: "";
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, .55);
}

.kmd-product-gallery__more span {
    position: absolute;
    inset: 0;
    z-index: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--kmd-white);
    font-size: 14px;
    font-weight: 700;
}

/* on dark sections the product photos are the dark background versions (kmd_dark_bg_image()), so the frame
   takes the section background, as the white one does for the white background photos */
.kmd-section--dark .kmd-product-gallery__main {
    background: transparent;
}
