/**
 * Qing Product Gallery styles.
 *
 * A self-contained slider showing a product's featured image + gallery
 * images. The track is a flex row of full-width slides; JS translates it.
 * Prev/next buttons sit absolutely on the left/right edges of the viewport.
 */

.qing-gnav {
	position: relative;
	width: 100%;
	max-width: 100%;
}

.qing-gnav__notice {
	padding: 24px;
	text-align: center;
	background: #f7f7f7;
	color: #555;
	border-radius: 4px;
}

/* ---- Viewport / track / slides --------------------------------------- */
.qing-gnav__viewport {
	position: relative;
	width: 100%;
	max-width: 100%;
	height: 500px;
	overflow: hidden;
	background-color: #f5f5f5;
}

/* ======================================================================
 * Height modes
 * ====================================================================== */

/* Fill: adapt to the parent container's width AND height. The whole chain
 * (Elementor widget wrapper -> container -> .qing-gnav -> viewport) is
 * stretched to 100% height so the gallery never exceeds the container you
 * set. Requires the parent column/container to have an explicit height. */
.elementor-widget-qing-gallery-nav:has(.qing-gnav--fill),
.elementor-widget-qing-gallery-nav:has(.qing-gnav--fill) > .elementor-widget-container {
	height: 100%;
}

.qing-gnav--fill,
.qing-gnav--fill .qing-gnav__viewport {
	height: 100%;
}

/* Ratio mode uses padding-bottom (set inline via control); slides overlay it. */
.qing-gnav--ratio .qing-gnav__viewport {
	height: 0;
}

.qing-gnav__track {
	position: absolute;
	inset: 0;
	display: flex;
	flex-wrap: nowrap;
	width: 100%;
	height: 100%;
	will-change: transform;
	transition: transform 0.45s ease;
}

.qing-gnav__slide {
	flex: 0 0 100%;
	width: 100%;
	height: 100%;
	min-width: 100%;
}

.qing-gnav__slide img,
img.qing-gnav__img {
	display: block;
	width: 100%;
	height: 100%;
	object-fit: cover;
	margin: 0;
}

/* ---- Buttons ---------------------------------------------------------- */
.qing-gnav__btn {
	position: absolute;
	top: 50%;
	transform: translateY(-50%);
	z-index: 5;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 48px;
	height: 48px;
	box-sizing: border-box;
	background-color: #fff;
	color: #111;
	cursor: pointer;
	border-radius: 0;
	transition: background-color 0.2s ease, color 0.2s ease, opacity 0.2s ease;
	user-select: none;
	-webkit-user-select: none;
	line-height: 0;
}

.qing-gnav__btn--prev {
	left: 12px;
}

.qing-gnav__btn--next {
	right: 12px;
}

.qing-gnav__btn:hover {
	background-color: #111;
	color: #fff;
}

.qing-gnav__btn:active {
	transform: translateY(-50%) scale(0.94);
}

.qing-gnav__btn:focus-visible {
	outline: 2px solid currentColor;
	outline-offset: 2px;
}

.qing-gnav__btn svg {
	width: 50%;
	height: 50%;
	display: block;
	fill: currentColor;
	pointer-events: none;
}

.qing-gnav__btn svg path {
	fill: currentColor;
}

.qing-gnav__btn i {
	pointer-events: none;
}

/* Disabled state (non-loop at an edge) */
.qing-gnav__btn.is-disabled {
	opacity: 0.35;
	pointer-events: none;
	cursor: default;
}
