/**
 * Product Gallery
 * File: orvix-core/modules/product-gallery/product-gallery.css
 */

.orvix-pg {
	display: flex;
	flex-direction: column;
	gap: 10px;
}

/* Before Splide mounts, .splide__list is a horizontal flex row overflowing the
   viewport. Hide the extras so the layout does not flash. */
.orvix-pg .splide:not(.is-initialized) .splide__list {
	display: block;
}
.orvix-pg .splide:not(.is-initialized) .splide__slide + .splide__slide {
	display: none;
}

/* -- Main image -- */
/* Lightbox trigger: a <button> so it works with the keyboard; browser defaults
   are reset below. */
.orvix-pg__zoom {
	appearance: none;
	-webkit-appearance: none;
	display: block;
	width: 100%;
	padding: 0;
	margin: 0;
	border: 0;
	background: none;
	color: inherit;
	font: inherit;
	cursor: zoom-in;
}
.orvix-pg__zoom:focus-visible {
	outline: 2px solid #1a1a1a;
	outline-offset: -2px;
	border-radius: 10px;
}
.orvix-pg__main .splide__slide img {
	display: block;
	width: 100%;
	height: auto;
	border-radius: 10px;
}

/* -- Thumbnail strip -- */
.orvix-pg__thumbs .splide__slide {
	cursor: pointer;
	opacity: .55;
	border-radius: 6px;
	overflow: hidden;
	transition: opacity .2s ease;
}

.orvix-pg__thumbs .splide__slide img {
	display: block;
	width: 100%;
	height: 100%;
	object-fit: cover;
}

.orvix-pg__thumbs .splide__slide:hover {
	opacity: .85;
}

.orvix-pg__thumbs .splide__slide.is-active {
	opacity: 1;
	outline: 2px solid var(--bricks-color-red, #c8102e);
	outline-offset: -2px;
}

/* -- Arrows -- */
.orvix-pg .splide__arrow {
	background: rgba(0, 0, 0, .55);
	opacity: 1;
}

.orvix-pg .splide__arrow:hover:not(:disabled) {
	background: rgba(0, 0, 0, .78);
}

.orvix-pg .splide__arrow:disabled {
	opacity: .3;
}

.orvix-pg .splide__arrow svg {
	fill: #fff;
}

.orvix-pg__thumbs .splide__arrow {
	width: 26px;
	height: 26px;
}

.orvix-pg__thumbs .splide__arrow--prev {
	left: -4px;
}

.orvix-pg__thumbs .splide__arrow--next {
	right: -4px;
}

@media (max-width: 767px) {
	.orvix-pg {
		gap: 8px;
	}

	.orvix-pg__main .splide__slide img {
		border-radius: 8px;
	}
}
