/* WC Slick Product Gallery v2.2.1 */

/*
 * Selectors below double the leading class (e.g. `.wcsg-gallery.wcsg-gallery`)
 * to raise specificity above typical theme rules without resorting to
 * `!important`, which would otherwise force every future override
 * (including this plugin's own Pro add-on) into an !important arms race.
 */

.wcsg-gallery.wcsg-gallery {
	position: relative;
	display: flex;
	flex-wrap: wrap;
}

/* Prevent flash of unstyled stacked images before Swiper initialises */
.wcsg-main.wcsg-main:not(.swiper-initialized) .wcsg-slide:not(:first-child),
.wcsg-thumbs.wcsg-thumbs:not(.swiper-initialized) .wcsg-thumb:not(:first-child) {
	display: none;
}

.wcsg-main.wcsg-main {
	position: relative;
	width: 100%;
}

.wcsg-main.wcsg-main .wcsg-slide img {
	display: block;
	width: 100%;
	height: auto;
}

/* --------------------------------------------------------------------
 * Fixed height mode: constrain the stage, scale images down, center them
 * ------------------------------------------------------------------ */

.wcsg-height-fixed.wcsg-height-fixed .wcsg-main {
	height: var(--wcsg-height, 550px);
}

@media (max-width: 600px) {

	.wcsg-height-fixed.wcsg-height-fixed .wcsg-main {
		height: var(--wcsg-height-mobile, 400px);
	}
}

.wcsg-height-fixed.wcsg-height-fixed .wcsg-main .wcsg-slide-link {
	display: flex;
	align-items: center;
	justify-content: center;
	height: 100%;
}

.wcsg-height-fixed.wcsg-height-fixed .wcsg-main .wcsg-slide img {
	width: auto;
	height: auto;
	max-width: 100%;
	max-height: 100%;
	margin: 0 auto;
	object-fit: contain;
}

/* Auto height mode keeps the image full width, centered */
.wcsg-height-auto.wcsg-height-auto .wcsg-main .wcsg-slide img {
	margin: 0 auto;
}

.wcsg-slide-link.wcsg-slide-link {
	display: block;
	position: relative;
	overflow: hidden;
	outline: none;
	cursor: zoom-in;
}

/* --------------------------------------------------------------------
 * Badges (rendered by add-ons via the `wcsg_slide_badges` filter)
 * ------------------------------------------------------------------ */

.wcsg-slide.wcsg-slide {
	position: relative;
}

.wcsg-badges.wcsg-badges {
	position: absolute;
	top: 10px;
	left: 10px;
	z-index: 3;
	display: flex;
	flex-direction: column;
	gap: 4px;
	pointer-events: none;
}

.wcsg-badge.wcsg-badge {
	padding: 4px 10px;
	border-radius: 3px;
	background: #333;
	color: #fff;
	font-size: 12px;
	font-weight: 600;
	line-height: 1.4;
	text-transform: uppercase;
	letter-spacing: 0.02em;
	white-space: nowrap;
}

.wcsg-badge-sale.wcsg-badge-sale {
	background: #d63638;
}

.wcsg-badge-new.wcsg-badge-new {
	background: #2271b1;
}

.wcsg-badge-custom.wcsg-badge-custom {
	background: #2c3338;
}

/* --------------------------------------------------------------------
 * Hover zoom lens
 * ------------------------------------------------------------------ */

.wcsg-zoom-lens.wcsg-zoom-lens {
	position: absolute;
	inset: 0;
	background-repeat: no-repeat;
	background-position: center;
	opacity: 0;
	pointer-events: none;
	transition: opacity 0.15s ease;
}

.wcsg-slide-link.wcsg-zooming .wcsg-zoom-lens {
	opacity: 1;
}

/* --------------------------------------------------------------------
 * Arrows (self-contained, no Swiper navigation theme needed)
 * ------------------------------------------------------------------ */

.wcsg-arrow.wcsg-arrow {
	position: absolute;
	top: 50%;
	transform: translateY(-50%);
	z-index: 2;
	width: 40px;
	height: 40px;
	padding: 0;
	border: 0;
	border-radius: 50%;
	background-color: rgba(255, 255, 255, 0.85);
	box-shadow: 0 1px 4px rgba(0, 0, 0, 0.2);
	cursor: pointer;
	font-size: 0;
	line-height: 0;
	transition: background-color 0.2s ease, opacity 0.2s ease;
}

.wcsg-arrow.wcsg-arrow::before {
	content: "";
	display: block;
	width: 10px;
	height: 10px;
	margin: 0 auto;
	border-top: 2px solid var(--wcsg-arrow-color, #333);
	border-right: 2px solid var(--wcsg-arrow-color, #333);
}

.wcsg-arrow.wcsg-arrow:hover,
.wcsg-arrow.wcsg-arrow:focus {
	background-color: #fff;
	outline: none;
}

.wcsg-arrow.wcsg-arrow:focus-visible {
	outline: 2px solid #333;
	outline-offset: 2px;
}

.wcsg-prev.wcsg-prev {
	left: 12px;
}

.wcsg-prev.wcsg-prev::before {
	transform: translateX(2px) rotate(-135deg);
}

.wcsg-next.wcsg-next {
	right: 12px;
}

.wcsg-next.wcsg-next::before {
	transform: translateX(-2px) rotate(45deg);
}

.wcsg-arrow.swiper-button-disabled {
	opacity: 0.35;
	cursor: default;
}

.wcsg-arrow.swiper-button-lock {
	display: none;
}

/* --------------------------------------------------------------------
 * Dots (self-contained; Swiper injects .swiper-pagination-bullet spans)
 * ------------------------------------------------------------------ */

.wcsg-dots.wcsg-dots {
	display: flex;
	justify-content: center;
	align-items: center;
	gap: 8px;
	position: absolute;
	bottom: 12px;
	left: 50%;
	transform: translateX(-50%);
	z-index: 9;
}

.wcsg-dots.wcsg-dots .swiper-pagination-bullet {
	width: 10px;
	height: 10px;
	margin: 0;
	background: #c9c9c9;
	opacity: 1;
	transition: background-color 0.2s ease, transform 0.2s ease;
}

.wcsg-dots.wcsg-dots .swiper-pagination-bullet:hover {
	background: #999;
}

.wcsg-dots.wcsg-dots .swiper-pagination-bullet-active {
	background: var(--wcsg-dot-color, #333);
	transform: scale(1.2);
}

/* --------------------------------------------------------------------
 * Thumbnails
 * ------------------------------------------------------------------ */

.wcsg-thumbs.wcsg-thumbs {
	position: relative;
	width: 100%;
	margin-top: 12px;
}

.wcsg-thumbs-has-arrows.wcsg-thumbs-has-arrows {
	padding: 0 34px;
}

.wcsg-thumb-arrow.wcsg-thumb-arrow {
	width: 28px;
	height: 28px;
}

.wcsg-thumb-arrow.wcsg-thumb-arrow::before {
	width: 8px;
	height: 8px;
}

.wcsg-thumb-prev.wcsg-thumb-prev {
	left: 0;
}

.wcsg-thumb-next.wcsg-thumb-next {
	right: 0;
}

.wcsg-thumbs.wcsg-thumbs .wcsg-thumb {
	padding: 0 5px;
	cursor: pointer;
}

.wcsg-thumbs.wcsg-thumbs .wcsg-thumb img {
	display: block;
	width: 100%;
	height: auto;
	border: 2px solid transparent;
	border-radius: 4px;
	opacity: 0.7;
	transition: opacity 0.2s ease, border-color 0.2s ease;
}

.wcsg-thumbs.wcsg-thumbs .wcsg-thumb:hover img {
	opacity: 1;
}

.wcsg-thumbs.wcsg-thumbs .swiper-slide-thumb-active img {
	opacity: 1;
	border-color: currentColor;
}

/* --------------------------------------------------------------------
 * Lightbox
 * ------------------------------------------------------------------ */

body.wcsg-lightbox-open {
	overflow: hidden;
}

.wcsg-lightbox.wcsg-lightbox {
	position: fixed;
	inset: 0;
	z-index: 100000;
	display: none;
	align-items: center;
	justify-content: center;
}

.wcsg-lightbox.is-open {
	display: flex;
}

.wcsg-lightbox-backdrop.wcsg-lightbox-backdrop {
	position: absolute;
	inset: 0;
	background: rgba(0, 0, 0, 0.9);
}

.wcsg-lightbox-figure.wcsg-lightbox-figure {
	position: relative;
	z-index: 1;
	margin: 0;
	max-width: 92vw;
	max-height: 88vh;
	overflow: hidden;
}

.wcsg-lightbox-image.wcsg-lightbox-image {
	display: block;
	max-width: 92vw;
	max-height: 88vh;
	width: auto;
	height: auto;
	cursor: zoom-in;
	transition: transform 0.2s ease;
}

.wcsg-lightbox-image.is-zoomed {
	transform: scale(2);
	cursor: zoom-out;
}

.wcsg-lightbox-close.wcsg-lightbox-close,
.wcsg-lightbox-prev.wcsg-lightbox-prev,
.wcsg-lightbox-next.wcsg-lightbox-next {
	position: absolute;
	z-index: 2;
	width: 48px;
	height: 48px;
	padding: 0;
	border: 0;
	border-radius: 50%;
	background-color: rgba(255, 255, 255, 0.9);
	box-shadow: 0 1px 6px rgba(0, 0, 0, 0.4);
	cursor: pointer;
	font-size: 0;
	line-height: 0;
	transition: background-color 0.2s ease;
}

.wcsg-lightbox-close.wcsg-lightbox-close:hover,
.wcsg-lightbox-prev.wcsg-lightbox-prev:hover,
.wcsg-lightbox-next.wcsg-lightbox-next:hover {
	background-color: #fff;
}

.wcsg-lightbox-close.wcsg-lightbox-close:focus-visible,
.wcsg-lightbox-prev.wcsg-lightbox-prev:focus-visible,
.wcsg-lightbox-next.wcsg-lightbox-next:focus-visible {
	outline: 2px solid #fff;
	outline-offset: 2px;
}

.wcsg-lightbox-close.wcsg-lightbox-close {
	top: 16px;
	right: 16px;
}

.wcsg-lightbox-close.wcsg-lightbox-close::before,
.wcsg-lightbox-close.wcsg-lightbox-close::after {
	content: "";
	position: absolute;
	top: 50%;
	left: 50%;
	width: 18px;
	height: 2px;
	background: #333;
}

.wcsg-lightbox-close.wcsg-lightbox-close::before {
	transform: translate(-50%, -50%) rotate(45deg);
}

.wcsg-lightbox-close.wcsg-lightbox-close::after {
	transform: translate(-50%, -50%) rotate(-45deg);
}

.wcsg-lightbox-prev.wcsg-lightbox-prev {
	left: 16px;
	top: 50%;
	transform: translateY(-50%);
}

.wcsg-lightbox-next.wcsg-lightbox-next {
	right: 16px;
	top: 50%;
	transform: translateY(-50%);
}

.wcsg-lightbox-prev.wcsg-lightbox-prev::before,
.wcsg-lightbox-next.wcsg-lightbox-next::before {
	content: "";
	display: block;
	width: 12px;
	height: 12px;
	margin: 0 auto;
	border-top: 2px solid var(--wcsg-arrow-color, #333);
	border-right: 2px solid var(--wcsg-arrow-color, #333);
}

.wcsg-lightbox-prev.wcsg-lightbox-prev::before {
	transform: translateX(2px) rotate(-135deg);
}

.wcsg-lightbox-next.wcsg-lightbox-next::before {
	transform: translateX(-2px) rotate(45deg);
}

.wcsg-lightbox-counter.wcsg-lightbox-counter {
	position: absolute;
	bottom: 16px;
	left: 50%;
	transform: translateX(-50%);
	z-index: 2;
	padding: 4px 12px;
	border-radius: 12px;
	background: rgba(0, 0, 0, 0.55);
	color: #fff;
	font-size: 13px;
	line-height: 1.4;
}

@media (max-width: 600px) {

	.wcsg-lightbox-close.wcsg-lightbox-close,
	.wcsg-lightbox-prev.wcsg-lightbox-prev,
	.wcsg-lightbox-next.wcsg-lightbox-next {
		width: 40px;
		height: 40px;
	}
}
