/* ================================================================
   ALLINSKIN ELEMENTS - PRODUCT GALLERY
   ================================================================ */

.custom-product-gallery {
	display: grid;
	grid-template-columns: 104px minmax(0, 1fr);
	gap: 24px;
	align-items: start;
	width: 100%;
}

.custom-product-gallery__thumbs {
	display: grid;
	gap: 12px;
}

.custom-product-gallery__thumb {
	position: relative;
	width: 104px;
	aspect-ratio: 3 / 4;
	padding: 0 !important;
	border: 1px solid transparent;
	background: transparent !important;
	background-color: transparent !important;
	cursor: pointer;
	overflow: hidden;
	transition: border-color 0.25s ease;
	appearance: none;
	-webkit-appearance: none;
}

.custom-product-gallery__thumb.is-active {
	border-color: #7b4a2f;
	background: transparent !important;
	background-color: transparent !important;
}

.custom-product-gallery__thumb:hover,
.custom-product-gallery__thumb:focus,
.custom-product-gallery__thumb:active {
	border-color: #7b4a2f;
	background: transparent !important;
	background-color: transparent !important;
}

.custom-product-gallery__thumb img,
.custom-product-gallery__thumb-composite {
	display: block;
	width: 100%;
	height: 100%;
}

.custom-product-gallery__thumb img {
	position: absolute;
	inset: 0;
	width: 100% !important;
	max-width: none !important;
	height: 100% !important;
	object-fit: cover !important;
	object-position: center;
}

.custom-product-gallery__thumb-composite {
	position: relative;
}

.custom-product-gallery__thumb-image {
	position: absolute;
	inset: 0;
}

.custom-product-gallery__thumb-image--back {
	z-index: 1;
}

.custom-product-gallery__thumb-image--front {
	z-index: 2;
}

.custom-product-gallery__stage {
	position: relative;
	width: 100%;
	min-height: 320px;
}

.custom-product-gallery .custom-product-gallery__wishlist {
	align-items: center !important;
	appearance: none;
	-webkit-appearance: none;
	background: rgba(255, 255, 255, 0.82) !important;
	border: 1px solid rgba(123, 74, 47, 0.24) !important;
	border-radius: 999px !important;
	box-shadow: 0 10px 28px rgba(61, 52, 46, 0.08) !important;
	box-sizing: border-box;
	cursor: pointer;
	display: inline-flex !important;
	height: 52px;
	justify-content: center !important;
	padding: 0 !important;
	position: absolute;
	right: 18px;
	text-decoration: none !important;
	top: 18px;
	transition: background-color 0.25s ease, border-color 0.25s ease, transform 0.25s ease;
	width: 52px;
	z-index: 6;
}

.custom-product-gallery .custom-product-gallery__wishlist:hover,
.custom-product-gallery .custom-product-gallery__wishlist:focus-visible {
	background: #fff !important;
	border-color: rgba(123, 74, 47, 0.58) !important;
	outline: none;
	transform: translateY(-1px);
}

.custom-product-gallery__wishlist-icon {
	display: block;
	height: 24px;
	position: relative;
	width: 24px;
}

.custom-product-gallery__wishlist-icon::before,
.custom-product-gallery__wishlist-icon::after {
	background-color: #7b4a2f;
	content: "";
	inset: 0;
	mask: url("https://allinskin.pl/wp-content/uploads/2026/05/wishlist.svg") center / contain no-repeat;
	-webkit-mask: url("https://allinskin.pl/wp-content/uploads/2026/05/wishlist.svg") center / contain no-repeat;
	position: absolute;
	transition: opacity 0.25s ease, transform 0.32s ease;
}

.custom-product-gallery__wishlist-icon::before {
	opacity: 0.78;
}

.custom-product-gallery__wishlist-icon::after {
	background-color: #7b4a2f;
	opacity: 0;
	transform: scale(0.35);
}

.custom-product-gallery__wishlist.is-loved,
.custom-product-gallery__wishlist.loved {
	background: rgba(123, 74, 47, 0.1) !important;
	border-color: rgba(123, 74, 47, 0.5) !important;
}

.custom-product-gallery__wishlist.is-loved .custom-product-gallery__wishlist-icon::before,
.custom-product-gallery__wishlist.loved .custom-product-gallery__wishlist-icon::before {
	opacity: 0.18;
	transform: scale(0.92);
}

.custom-product-gallery__wishlist.is-loved .custom-product-gallery__wishlist-icon::after,
.custom-product-gallery__wishlist.loved .custom-product-gallery__wishlist-icon::after {
	opacity: 1;
	transform: scale(1);
}

.custom-product-gallery__wishlist.is-popping .custom-product-gallery__wishlist-icon {
	animation: allinskin-wishlist-pop 0.48s cubic-bezier(0.2, 1.35, 0.35, 1);
}

.custom-product-gallery__composite {
	position: relative;
	display: none;
	width: 100%;
}

.custom-product-gallery__composite.is-visible {
	display: block;
}

.custom-product-gallery__composite,
.custom-product-gallery__image,
.custom-product-gallery__single {
	animation-duration: 0.38s;
	animation-fill-mode: both;
	animation-timing-function: ease;
}

.custom-product-gallery__image,
.custom-product-gallery__single {
	display: block;
	width: 100%;
	height: auto;
}

.custom-product-gallery__image--back {
	position: relative;
	z-index: 1;
}

.custom-product-gallery__image--front {
	position: absolute;
	inset: 0;
	z-index: 2;
}

.custom-product-gallery__single[hidden] {
	display: none;
}

.custom-product-gallery__composite.is-fading,
.custom-product-gallery__single.is-fading {
	animation-name: allinskin-gallery-fade-in;
}

@keyframes allinskin-gallery-fade-in {
	from {
		opacity: 0;
		transform: translateY(6px);
	}

	to {
		opacity: 1;
		transform: translateY(0);
	}
}

@keyframes allinskin-wishlist-pop {
	0% {
		transform: scale(1);
	}

	42% {
		transform: scale(1.28);
	}

	100% {
		transform: scale(1);
	}
}

@media (max-width: 767px) {
	.custom-product-gallery {
		grid-template-columns: 1fr;
	}

	.custom-product-gallery__thumbs {
		display: flex;
		gap: 10px;
		overflow-x: auto;
		order: 2;
	}

	.custom-product-gallery__thumb {
		flex: 0 0 78px;
		width: 78px;
	}

	.custom-product-gallery .custom-product-gallery__wishlist {
		height: 46px;
		right: 12px;
		top: 12px;
		width: 46px;
	}

	.custom-product-gallery__wishlist-icon {
		height: 22px;
		width: 22px;
	}
}
