/* ROOT */
.cpg {
    width: 100%;
}

/* MAIN IMAGE */
.cpg__main {
    position: relative;
    width: 100%;
    aspect-ratio: 1 / 1;
    overflow: hidden;
    background: transparent;
}

.cpg__main-image {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.25s ease;
}

.cpg__main-image.is-active {
    opacity: 1;
    visibility: visible;
}

/* NAV */
.cpg__nav {
    position: relative;
    margin-top: 14px;
    padding: 0;
}

/* THUMBS */
.cpg__thumbs {
    display: flex;
    gap: 10px;
    width: 100%;
    overflow-x: auto;
    scroll-behavior: smooth;
    scrollbar-width: none;
}

.cpg__thumbs::-webkit-scrollbar {
    display: none;
}

/* THUMB */
.cpg__thumb {
    position: relative;
    flex: 0 0 calc((100% - 20px) / 3);
    aspect-ratio: 1 / 1;
    overflow: hidden;
    cursor: pointer;
    background: transparent;
	display: flex;
	justify-content: center;
	align-items: center;
}

.cpg--static .cpg__thumb {
    flex: 1 1 auto;
    max-width: none;
}

.cpg__thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    pointer-events: none;
}

/* ACTIVE THUMB OVERLAY */
.cpg__thumb::after {
    content: "";
    position: absolute;
    inset: 0;
    background: rgba(165, 165, 165, 0.45);
    opacity: 0;
    transition: opacity 0.2s ease;
    pointer-events: none;
}

.cpg__thumb.is-active::after {
    opacity: 1;
}

/* ARROWS OVER THUMBS */
.cpg__arrow {
    position: absolute;
    top: 0;
    bottom: 0;
    z-index: 10;

    width: 42px;
    height: 100%;

    cursor: pointer;

    display: flex;
    align-items: center;
    justify-content: center;

    opacity: 0.75;
    transition: opacity 0.2s ease, background 0.2s ease;
}

.cpg__arrow--prev {
    left: 0;
    background: linear-gradient(
        to right,
        rgba(245, 245, 245, 0.85),
        rgba(245, 245, 245, 0.45),
        rgba(245, 245, 245, 0)
    );
}

.cpg__arrow--next {
    right: 0;
    background: linear-gradient(
        to left,
        rgba(245, 245, 245, 0.85),
        rgba(245, 245, 245, 0.45),
        rgba(245, 245, 245, 0)
    );
}

.cpg__arrow:hover {
    opacity: 0.95;
}

.cpg__arrow--prev:hover {
    background: linear-gradient(
        to right,
        rgba(245, 245, 245, 0.9),
        rgba(245, 245, 245, 0.65),
        rgba(245, 245, 245, 0.15)
    );
}

.cpg__arrow--next:hover {
    background: linear-gradient(
        to left,
        rgba(245, 245, 245, 0.9),
        rgba(245, 245, 245, 0.65),
        rgba(245, 245, 245, 0.15)
    );
}

/* SVG */
.cpg__arrow svg {
    width: 22px;
    height: 42px;
    pointer-events: none;
}

.cpg__arrow path {
    fill: none;
    stroke: #111;
    stroke-width: 1.15;
    stroke-linecap: round;
    stroke-linejoin: round;
    transform: scaleY(1.45);
    transform-origin: center;
    transition: stroke 0.2s ease, transform 0.2s ease;
}

.cpg__arrow:hover path {
    stroke: #000;
    transform: scaleY(1.85);
}