/**
 * PDP gallery — loaded after theme.css; mirrors input.css rules with higher cascade.
 */

.adealss-pdp-gallery {
	position: relative;
	width: 100%;
}

.adealss-pdp-gallery__thumbs {
	position: absolute;
	bottom: 12px;
	left: 50%;
	z-index: 10;
	display: flex;
	flex-wrap: nowrap;
	gap: 8px;
	margin: 0;
	padding: 6px 8px;
	list-style: none;
	overflow-x: auto;
	max-width: calc(100% - 1.5rem);
	transform: translateX(-50%);
	border-top: none;
	border-radius: 2px;
	background: #fff;
	box-shadow: 0 1px 4px rgba(0, 0, 0, 0.06);
	scrollbar-width: none;
}

.adealss-pdp-gallery__thumbs::-webkit-scrollbar {
	display: none;
}

.adealss-pdp-gallery__thumbs li {
	flex: 0 0 auto;
	margin: 0;
	padding: 0;
	list-style: none;
}

.adealss-pdp-gallery__thumbs button {
	display: block;
	margin: 0;
	padding: 0;
	border: 1px solid transparent;
	background: #fff;
	cursor: pointer;
	line-height: 0;
}

.adealss-pdp-gallery__thumbs img {
	display: block;
	width: 56px;
	height: 56px;
	object-fit: contain;
	mix-blend-mode: multiply;
	opacity: 0.65;
}

.adealss-pdp-gallery__thumbs .is-active button,
.adealss-pdp-gallery__thumbs button:hover {
	border-color: rgba(35, 31, 32, 0.4);
}

.adealss-pdp-gallery__thumbs .is-active img,
.adealss-pdp-gallery__thumbs button:hover img {
	opacity: 1;
}

.adealss-pdp-gallery__grid {
	display: grid;
	grid-template-columns: minmax(0, 1fr);
	gap: 6px;
	height: clamp(360px, 58vh, 560px);
	background: #f3f0eb;
}

.adealss-pdp-gallery__cell {
	position: relative;
	height: 100%;
	min-height: 0;
	margin: 0;
	overflow: hidden;
	background: #f3f0eb;
}

.adealss-pdp-gallery__cell[hidden] {
	display: none !important;
}

.adealss-pdp-gallery__link {
	position: absolute;
	inset: 0;
	display: flex;
	align-items: flex-end;
	justify-content: center;
	cursor: zoom-in;
	background: #f3f0eb;
}

.adealss-pdp-gallery__img {
	display: block !important;
	width: 100% !important;
	height: 100% !important;
	max-width: 100% !important;
	max-height: 100% !important;
	object-fit: contain !important;
	object-position: bottom center !important;
	mix-blend-mode: multiply;
}

.adealss-pdp-gallery__source {
	display: none !important;
}

@media (min-width: 768px) {
	.adealss-pdp-gallery__grid {
		grid-template-columns: repeat(2, minmax(0, 1fr));
		height: clamp(480px, 62vh, 720px);
		column-gap: 1px;
		background: rgba(0, 0, 0, 0.08);
	}

	.adealss-pdp-gallery.is-single .adealss-pdp-gallery__grid {
		grid-template-columns: minmax(0, 1fr);
		column-gap: 0;
		background: #f3f0eb;
	}

	.adealss-pdp-gallery.is-single .adealss-pdp-gallery__cell[data-pdp-slot='1'] {
		display: none !important;
	}
}

@media (max-width: 767px) {
	.adealss-pdp-gallery__cell[data-pdp-slot='1'] {
		display: none !important;
	}
}
