/**
 * Product Image - common widget CSS.
 *
 * Structural layout, hover effects, sale badge and the shared lightbox. Colours /
 * borders are driven by Elementor controls and the per-style sheets.
 *
 * @package captain-widgets-kit
 * @since   1.3.0
 */

.captwiki-pi {
	display: flex;
}

.captwiki-pi__frame {
	position: relative;
	display: inline-block;
	max-width: 100%;
	line-height: 0;
}

.captwiki-pi__link {
	display: block;
	padding: 0;
	margin: 0;
	border: none;
	background: none;
	cursor: pointer;
	line-height: 0;
}

.captwiki-pi__img {
	display: block;
	width: 100%;
	height: auto;
	transition: transform 0.4s ease, filter 0.4s ease;
}

/* ----------------------------------------------------------- Hover effects */
.captwiki-pi__frame {
	overflow: hidden;
}

.captwiki-pi--hover-zoom:hover .captwiki-pi__img {
	transform: scale( 1.08 );
}

.captwiki-pi--hover-zoom-out .captwiki-pi__img {
	transform: scale( 1.08 );
}

.captwiki-pi--hover-zoom-out:hover .captwiki-pi__img {
	transform: scale( 1 );
}

.captwiki-pi--hover-grayscale .captwiki-pi__img {
	filter: grayscale( 100% );
}

.captwiki-pi--hover-grayscale:hover .captwiki-pi__img {
	filter: grayscale( 0 );
}

.captwiki-pi--hover-lift {
	transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.captwiki-pi--hover-lift:hover .captwiki-pi__frame {
	transform: translateY( -6px );
}

/* ----------------------------------------------------------- Sale badge */
.captwiki-pi__sale {
	position: absolute;
	top: 14px;
	left: 14px;
	z-index: 2;
	display: inline-flex;
	align-items: center;
	padding: 5px 12px;
	border-radius: 4px;
	background: #e02b2b;
	color: #fff;
	font-size: 12px;
	font-weight: 700;
	line-height: 1.2;
	text-transform: uppercase;
	letter-spacing: 0.03em;
}

/* ----------------------------------------------------------- Lightbox */
.captwiki-pi-lightbox {
	position: fixed;
	inset: 0;
	z-index: 100000;
	display: none;
	align-items: center;
	justify-content: center;
	background: rgba( 0, 0, 0, 0.88 );
}

.captwiki-pi-lightbox.is-open {
	display: flex;
}

.captwiki-pi-lightbox__img {
	max-width: 86vw;
	max-height: 86vh;
	border-radius: 4px;
	box-shadow: 0 20px 60px rgba( 0, 0, 0, 0.5 );
}

.captwiki-pi-lightbox__close {
	position: absolute;
	top: 22px;
	right: 26px;
	width: 44px;
	height: 44px;
	border: none;
	border-radius: 50%;
	background: rgba( 255, 255, 255, 0.12 );
	color: #fff;
	font-size: 26px;
	line-height: 1;
	cursor: pointer;
	transition: background-color 0.2s ease;
}

.captwiki-pi-lightbox__close:hover {
	background: rgba( 255, 255, 255, 0.25 );
}

body.captwiki-pi-lightbox-open {
	overflow: hidden;
}

/* ----------------------------------------------------------- Editor notice */
.captwiki-pi--notice {
	display: block;
	padding: 16px 18px;
	border: 1px dashed #c3c4c7;
	border-radius: 6px;
	background: #f6f7f7;
	color: #50575e;
	text-align: center;
	font-size: 13px;
}

.captwiki-pi--notice p {
	margin: 0;
}
