/* KK Variation Gallery – front-end slider (matches the Tefillin page card style) */
.kkvg {
	--kkvg-accent: #a07a2c;
	--kkvg-bg: #f5f1ea;
	--kkvg-ratio: 1 / 1;
	position: relative;
	width: 100%;
	max-width: 100%;
	box-sizing: border-box;
}
.kkvg *, .kkvg *::before, .kkvg *::after { box-sizing: border-box; }

.kkvg__stage {
	position: relative;
	width: 100%;
	aspect-ratio: var(--kkvg-ratio);
	overflow: hidden;
	border-radius: 24px;
	background: var(--kkvg-bg);
	background-image: linear-gradient(180deg, rgba(255,255,255,.55) 0%, rgba(255,255,255,0) 55%, rgba(0,0,0,.025) 100%);
	box-shadow: 0 1px 2px rgba(0,0,0,.04), 0 12px 32px rgba(70,55,30,.08);
	touch-action: pan-y;
	outline: none;
	user-select: none;
	-webkit-user-select: none;
}
.kkvg__stage:focus-visible { box-shadow: 0 0 0 3px var(--kkvg-accent); }

.kkvg__track {
	display: flex;
	height: 100%;
	direction: ltr;
	transition: transform .45s cubic-bezier(.22,.61,.36,1), opacity .18s ease;
	will-change: transform;
}
.kkvg--switching .kkvg__track { opacity: 0; }

.kkvg__slide {
	flex: 0 0 100%;
	width: 100%;
	height: 100%;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 7% 7% 14%;
}
.kkvg__slide img {
	display: block;
	image-rendering: auto;
	max-width: 100% !important;
	max-height: 100% !important;
	width: auto !important;
	height: auto !important;
	object-fit: contain;
	margin: 0 auto;
	border-radius: 2px;
	box-shadow: 0 2px 10px rgba(0,0,0,.08);
	-webkit-user-drag: none;
	pointer-events: auto;
}
.kkvg:not(.kkvg--single) .kkvg__slide img { cursor: grab; }

/* Arrow buttons – reset theme/Elementor button styles */
.kkvg button.kkvg__nav {
	position: absolute;
	top: 50%;
	transform: translateY(-50%);
	z-index: 3;
	display: flex;
	align-items: center;
	justify-content: center;
	width: 46px;
	height: 40px;
	min-height: 0;
	margin: 0;
	padding: 0;
	border: 0;
	border-radius: 6px;
	background: rgba(213,207,193,.8);
	color: #3a3a3a;
	box-shadow: none;
	line-height: 1;
	cursor: pointer;
	transition: background .2s, color .2s;
}
.kkvg button.kkvg__nav:hover,
.kkvg button.kkvg__nav:focus-visible { background: var(--kkvg-accent); color: #fff; outline: none; }
.kkvg .kkvg__nav--prev { left: 12px; }
.kkvg .kkvg__nav--next { right: 12px; }

/* Pager */
.kkvg__pager {
	position: absolute;
	left: 0;
	right: 0;
	bottom: 18px;
	z-index: 3;
	display: flex;
	flex-wrap: wrap;
	justify-content: center;
	gap: 6px;
	padding: 0 12px;
}
.kkvg button.kkvg__pill {
	margin: 0;
	padding: 4px 20px;
	min-height: 0;
	border: 0;
	border-radius: 999px;
	background: #e9e5dc;
	color: #8b8678;
	box-shadow: none;
	font-size: 11px;
	font-weight: 700;
	line-height: 1.4;
	letter-spacing: .1em;
	text-transform: uppercase;
	cursor: pointer;
	transition: background .2s, color .2s;
}
.kkvg button.kkvg__pill:hover { color: #5a5548; }
.kkvg button.kkvg__pill.is-active { background: var(--kkvg-accent); color: #fff; }

.kkvg button.kkvg__dot {
	width: 9px;
	height: 9px;
	min-height: 0;
	margin: 0;
	padding: 0;
	border: 0;
	border-radius: 50%;
	background: rgba(0,0,0,.18);
	box-shadow: none;
	cursor: pointer;
	transition: background .2s, transform .2s;
}
.kkvg button.kkvg__dot.is-active { background: var(--kkvg-accent); transform: scale(1.25); }

.kkvg--single .kkvg__nav,
.kkvg--single .kkvg__pager { display: none !important; }
.kkvg--single .kkvg__slide { padding-bottom: 7%; }

/* Pager hidden (thumbnails replace dots) – give the image more room */
.kkvg--no-pager .kkvg__slide { padding-bottom: 7%; }

/* Thumbnail strip – like the original WooCommerce gallery */
.kkvg__thumbs {
	display: grid;
	grid-template-columns: repeat(var(--kkvg-thumb-cols), minmax(0, 1fr));
	gap: 12px;
	margin-top: 14px;
}
.kkvg__thumbs:empty { display: none; }
.kkvg { --kkvg-thumb-cols: 4; }
.kkvg .kkvg__thumbs { grid-template-columns: repeat(var(--kkvg-thumb-cols), minmax(0, 1fr)); }
.kkvg button.kkvg__thumb {
	display: block;
	width: 100%;
	aspect-ratio: 1 / 1;
	margin: 0;
	padding: 0;
	min-height: 0;
	border: 0;
	border-radius: 0;
	background: transparent;
	box-shadow: none;
	cursor: pointer;
	opacity: .5;
	transition: opacity .2s ease;
}
/* Override theme / Elementor button hover & focus colours (the brown background) */
.kkvg button.kkvg__thumb,
.kkvg button.kkvg__thumb:hover,
.kkvg button.kkvg__thumb:focus,
.kkvg button.kkvg__thumb:focus-visible,
.kkvg button.kkvg__thumb:active,
.kkvg button.kkvg__thumb.is-active {
	background: transparent !important;
	background-color: transparent !important;
	border: 0 !important;
	box-shadow: none !important;
	outline: none !important;
	color: inherit !important;
}
.kkvg button.kkvg__thumb:hover,
.kkvg button.kkvg__thumb:focus-visible,
.kkvg button.kkvg__thumb.is-active { opacity: 1; }
.kkvg button.kkvg__thumb:focus-visible img { outline: 2px solid var(--kkvg-accent); outline-offset: 2px; }
.kkvg .kkvg__thumb img {
	display: block;
	width: 100% !important;
	height: 100% !important;
	object-fit: contain;
	margin: 0;
	-webkit-user-drag: none;
}

@media (max-width: 767px) {
	.kkvg__thumbs { gap: 8px; margin-top: 10px; }
	.kkvg__stage { border-radius: 16px; }
	.kkvg button.kkvg__nav { width: 38px; height: 34px; }
	.kkvg .kkvg__nav--prev { left: 8px; }
	.kkvg .kkvg__nav--next { right: 8px; }
	.kkvg__pager { bottom: 12px; }
}

@media (prefers-reduced-motion: reduce) {
	.kkvg__track { transition: none; }
}

/* Lightbox */
.kkvg-lb {
	position: fixed;
	inset: 0;
	z-index: 999999;
	display: none;
	align-items: center;
	justify-content: center;
	background: rgba(22,20,16,.92);
}
.kkvg-lb.is-open { display: flex; }
.kkvg-lb__img {
	max-width: 90vw;
	max-height: 88vh;
	width: auto;
	height: auto;
	object-fit: contain;
	background: #fff;
	box-shadow: 0 10px 40px rgba(0,0,0,.4);
}
.kkvg-lb button {
	position: absolute;
	margin: 0;
	padding: 0;
	min-height: 0;
	border: 0;
	border-radius: 50%;
	background: rgba(255,255,255,.12);
	color: #fff;
	box-shadow: none;
	cursor: pointer;
	font-size: 32px;
	line-height: 1;
	width: 48px;
	height: 48px;
	display: flex;
	align-items: center;
	justify-content: center;
}
.kkvg-lb button:hover { background: rgba(255,255,255,.25); }
.kkvg-lb__close { top: 16px; right: 16px; }
.kkvg-lb__nav--prev { left: 16px; top: 50%; transform: translateY(-50%); }
.kkvg-lb__nav--next { right: 16px; top: 50%; transform: translateY(-50%); }
.kkvg-lb--single .kkvg-lb__nav { display: none; }
html.kkvg-lb-lock { overflow: hidden; }
