.ayn-gallery,
.ayn-gallery * {
	box-sizing: border-box;
}

.ayn-gallery {
	--ayn-gap: 8px;
	--ayn-radius: 16px;
	--ayn-height: clamp(320px, 54vw, 620px);
	--ayn-surface: #f6f7f7;
	--ayn-surface-strong: #ffffff;
	--ayn-line: rgba(15, 23, 42, 0.14);
	--ayn-text: #172033;
	--ayn-muted: #6b7280;
	--ayn-accent: #de6678;
	--ayn-accent-fg: #ffffff;
	--ayn-shadow: 0 12px 30px rgba(15, 23, 42, 0.16);
	width: 100%;
	max-width: 100%;
	color: var(--ayn-text);
}

.ayn-gallery a {
	color: inherit;
	text-decoration: none;
}

.ayn-gallery img,
.ayn-gallery__img,
.ayn-gallery__thumb-img {
	display: block;
	width: 100%;
	height: 100%;
	border: 0;
	object-fit: cover;
	object-position: center;
	background: var(--ayn-surface);
	box-shadow: none;
}

.ayn-gallery__desktop {
	position: relative;
	width: 100%;
	min-height: 240px;
	overflow: hidden;
	background: var(--ayn-surface);
}

.ayn-gallery__tile,
.ayn-carousel__slide,
.ayn-gallery-hero-link,
.ayn-gallery-strip-item,
.ayn-product__main,
.ayn-product__thumb {
	outline: 0;
}

.ayn-gallery__tile:focus-visible,
.ayn-carousel__slide:focus-visible,
.ayn-gallery-hero-link:focus-visible,
.ayn-gallery-strip-item:focus-visible,
.ayn-product__main:focus-visible,
.ayn-product__thumb:focus-visible,
.ayn-gallery__slide:focus-visible,
.ayn-gallery__thumb:focus-visible,
.ayn-gallery__seeall:focus-visible,
.ayn-lightbox__button:focus-visible {
	outline: 2px solid var(--ayn-accent);
	outline-offset: 3px;
}

.ayn-blur-up {
	filter: blur(12px);
	transform: scale(1.02);
	opacity: 0.92;
	transition: filter 420ms ease, transform 420ms ease, opacity 420ms ease;
}

.ayn-blur-up.is-loaded {
	filter: none;
	transform: none;
	opacity: 1;
}

.ayn-gallery__sources {
	display: none;
}

.ayn-gallery__mobile {
	display: none;
}

.ayn-gallery-placeholder {
	padding: 28px 20px;
	border: 1px dashed rgba(15, 23, 42, 0.24);
	border-radius: 10px;
	background: #fbfaf7;
	color: var(--ayn-muted);
	font-size: 14px;
	line-height: 1.45;
	text-align: center;
}

.ayn-gallery__seeall,
.ayn-gallery-seeall {
	position: absolute;
	right: 12px;
	bottom: 12px;
	z-index: 3;
	min-height: 42px;
	padding: 10px 14px;
	border: 1px solid var(--ayn-line);
	border-radius: 999px;
	background: var(--ayn-surface-strong);
	color: var(--ayn-text);
	box-shadow: var(--ayn-shadow);
	cursor: pointer;
	font: inherit;
	font-size: 13px;
	font-weight: 800;
	line-height: 1.25;
	transition: background 160ms ease, transform 160ms ease;
}

.ayn-gallery__seeall:hover,
.ayn-gallery-seeall:hover {
	background: #f8fafc;
	transform: translateY(-1px);
}

.ayn-gallery__more,
.ayn-tile-more {
	position: absolute;
	inset: 0;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 16px;
	background: rgba(0, 0, 0, 0.45);
	color: #ffffff;
	font-size: 18px;
	font-weight: 900;
	text-align: center;
}

/* Classic mosaïque, same geometry as Ayn Booking classic. */
.ayn-gallery--mosaic .ayn-gallery-mosaic {
	display: grid;
	grid-template-columns: 2fr 1fr 1fr;
	grid-template-rows: 1fr 1fr;
	gap: var(--ayn-gap);
	border-radius: var(--ayn-radius);
	aspect-ratio: 16 / 9;
}

.ayn-gallery--mosaic .ayn-tile {
	position: relative;
	display: block;
	min-width: 0;
	min-height: 0;
	overflow: hidden;
	background: var(--ayn-surface);
}

.ayn-gallery--mosaic .ayn-tile--main {
	grid-column: 1 / 2;
	grid-row: 1 / 3;
}

.ayn-gallery--mosaic .ayn-tile--sub:nth-of-type(2) {
	grid-column: 2 / 3;
	grid-row: 1 / 2;
}

.ayn-gallery--mosaic .ayn-tile--sub:nth-of-type(3) {
	grid-column: 3 / 4;
	grid-row: 1 / 2;
}

.ayn-gallery--mosaic .ayn-tile--sub:nth-of-type(4) {
	grid-column: 2 / 3;
	grid-row: 2 / 3;
}

.ayn-gallery--mosaic .ayn-tile--sub:nth-of-type(5) {
	grid-column: 3 / 4;
	grid-row: 2 / 3;
}

.ayn-gallery--mosaic .ayn-tile-img,
.ayn-gallery--split .ayn-gallery-img {
	transition: transform 450ms cubic-bezier(0.16, 1, 0.3, 1), filter 300ms ease;
}

.ayn-gallery--mosaic .ayn-tile:hover .ayn-tile-img,
.ayn-gallery--split .ayn-gallery-tile:hover .ayn-gallery-img {
	transform: scale(1.04);
}

/* Ayn Booking split 50/50. */
.ayn-gallery--split .ayn-gallery-ayn-booking-grid {
	display: grid;
	grid-template-columns: 1fr 1fr;
	grid-template-rows: minmax(0, 1fr) minmax(0, 0.84fr);
	gap: 10px;
	border-radius: 18px;
	background: var(--ayn-surface);
}

.ayn-gallery--split .ayn-gallery-tile {
	position: relative;
	display: block;
	width: 100%;
	height: 100%;
	overflow: hidden;
	background: #eceef0;
}

.ayn-gallery--split .ayn-gallery-tile--main {
	grid-column: 1 / 2;
	grid-row: 1 / 3;
}

.ayn-gallery--split .ayn-gallery-tile--b1 {
	grid-column: 2 / 3;
	grid-row: 1 / 2;
	border-radius: 16px;
}

.ayn-gallery--split .ayn-gallery-b2 {
	grid-column: 2 / 3;
	grid-row: 2 / 3;
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 10px;
	min-height: 0;
}

.ayn-gallery--split .ayn-gallery-b2--single {
	grid-template-columns: 1fr;
}

.ayn-gallery--split .ayn-gallery-tile--b2 {
	aspect-ratio: 1 / 1;
}

/* Back-compat grid layout. */
.ayn-gallery--grid .ayn-gallery__desktop {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
	grid-auto-rows: minmax(160px, 1fr);
	gap: var(--ayn-gap);
	height: auto;
	min-height: 0;
	background: transparent;
}

.ayn-gallery__tile--grid {
	position: relative;
	display: block;
	aspect-ratio: 4 / 3;
	overflow: hidden;
	border-radius: var(--ayn-radius);
	background: var(--ayn-surface);
}

/* Apple panorama: central large panel with visible side previews. */
.ayn-gallery--panorama .ayn-carousel {
	display: block;
	height: auto;
	min-height: 0;
	overflow: hidden;
	background: #ffffff;
}

.ayn-gallery--panorama .ayn-carousel__viewport {
	width: 100%;
	overflow: hidden;
	background: #ffffff;
}

.ayn-gallery--panorama .ayn-carousel__track {
	display: flex;
	align-items: center;
	height: auto;
	gap: 0;
	transform: translate3d(0, 0, 0);
	will-change: transform;
}

.ayn-gallery--panorama .ayn-carousel__track.is-animated {
	transition: transform 460ms cubic-bezier(0.22, 1, 0.36, 1);
}

.ayn-gallery--panorama .ayn-carousel__slide {
	position: relative;
	flex: 0 0 clamp(320px, 62%, 1180px);
	display: block;
	overflow: hidden;
	opacity: 0.78;
	transition: opacity 260ms ease-out;
}

.ayn-gallery--panorama .ayn-carousel__slide.is-active {
	opacity: 1;
}

.ayn-gallery--panorama .ayn-carousel__slide.is-prev,
.ayn-gallery--panorama .ayn-carousel__slide.is-next {
	opacity: 0.9;
}

.ayn-gallery--panorama .ayn-carousel__img {
	height: auto;
	aspect-ratio: 3 / 2;
	object-fit: cover;
}

.ayn-gallery--panorama .ayn-carousel__nav {
	position: absolute;
	top: 50%;
	z-index: 4;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 56px;
	height: 56px;
	transform: translateY(-50%);
	border: 0;
	border-radius: 10px;
	background: var(--ayn-accent);
	color: var(--ayn-accent-fg);
	box-shadow: var(--ayn-shadow);
	cursor: pointer;
	font-size: 42px;
	font-weight: 500;
	line-height: 1;
	transition: filter 150ms ease, transform 150ms ease;
}

.ayn-gallery--panorama .ayn-carousel__nav:hover {
	filter: brightness(0.97);
}

.ayn-gallery--panorama .ayn-carousel__nav:active {
	transform: translateY(-50%) scale(0.96);
}

.ayn-gallery--panorama .ayn-carousel__nav:disabled {
	opacity: 0.45;
	cursor: default;
}

.ayn-gallery--panorama .ayn-carousel__nav--prev {
	left: 42px;
}

.ayn-gallery--panorama .ayn-carousel__nav--next {
	right: 42px;
}

.ayn-gallery--panorama .ayn-carousel__nav span {
	transform: translateY(-2px);
}

/* Hero + horizontal strip, same intent as Ayn Booking hero-sidebar-sticky. */
.ayn-gallery--hero-strip .ayn-hero {
	display: block;
	height: auto;
	min-height: 0;
	overflow: hidden;
	background: #ffffff;
}

.ayn-gallery--hero-strip .ayn-gallery-hero-main {
	position: relative;
	width: 100%;
	aspect-ratio: 16 / 9;
	overflow: hidden;
	background: var(--ayn-surface);
}

.ayn-gallery--hero-strip .ayn-gallery-hero-link {
	display: block;
	width: 100%;
	height: 100%;
}

.ayn-gallery--hero-strip .ayn-gallery-hero-img {
	transition: transform 600ms ease-out;
}

.ayn-gallery--hero-strip .ayn-gallery-hero-link:hover .ayn-gallery-hero-img {
	transform: scale(1.04);
}

.ayn-gallery--hero-strip .ayn-gallery-hero-strip {
	display: flex;
	gap: 4px;
	margin: 0;
	padding: 6px 4px 8px;
	overflow-x: auto;
	overflow-y: hidden;
	background: #ffffff;
	scrollbar-width: none;
}

.ayn-gallery--hero-strip .ayn-gallery-hero-strip::-webkit-scrollbar {
	display: none;
}

.ayn-gallery--hero-strip .ayn-gallery-strip-item {
	position: relative;
	flex: 0 0 110px;
	height: 70px;
	overflow: hidden;
	border: 1px solid rgba(0, 0, 0, 0.08);
	background: #ffffff;
}

.ayn-gallery--hero-strip .ayn-gallery-strip-img {
	opacity: 0.95;
	transition: opacity 200ms ease-out, transform 200ms ease-out;
}

.ayn-gallery--hero-strip .ayn-gallery-strip-item:hover .ayn-gallery-strip-img {
	opacity: 1;
	transform: scale(1.03);
}

/* Product / e-commerce layout from the supplied reference. */
.ayn-gallery--product .ayn-product {
	display: flex;
	flex-direction: column;
	gap: clamp(18px, 3vw, 38px);
	height: auto;
	min-height: 0;
	overflow: visible;
	background: transparent;
}

.ayn-gallery--product .ayn-product__main {
	position: relative;
	display: block;
	width: 100%;
	aspect-ratio: 1 / 1;
	overflow: hidden;
	background: #f5f5f3;
}

.ayn-gallery--product .ayn-product__main-img {
	object-fit: contain;
	padding: 0;
}

.ayn-gallery--product .ayn-product__thumbs {
	display: grid;
	grid-template-columns: repeat(var(--ayn-product-thumbs, 5), minmax(0, 1fr));
	gap: clamp(12px, 3vw, 40px);
	width: 100%;
}

.ayn-gallery--product .ayn-product__thumb {
	position: relative;
	display: block;
	aspect-ratio: 1 / 1;
	overflow: hidden;
	border: 2px solid transparent;
	background: #f5f5f3;
	opacity: 1;
	cursor: pointer;
	transition: border-color 160ms ease;
}

.ayn-gallery--product .ayn-product__thumb.is-active {
	border-color: #111d3a;
}

.ayn-gallery--product .ayn-product__thumb-img {
	object-fit: contain;
	transition: transform 200ms ease, filter 200ms ease;
}

.ayn-gallery--product .ayn-product__thumb:hover .ayn-product__thumb-img {
	transform: scale(1.018);
}

.ayn-gallery--product .ayn-product__more {
	position: absolute;
	left: 50%;
	top: 50%;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-width: 94px;
	min-height: 48px;
	padding: 10px 18px;
	transform: translate(-50%, -50%);
	border-radius: 14px;
	background: #ffffff;
	color: #111d3a;
	box-shadow: 0 10px 28px rgba(15, 23, 42, 0.2);
	font-size: clamp(15px, 1.5vw, 21px);
	font-weight: 800;
	line-height: 1;
	white-space: nowrap;
}

.ayn-gallery--product .ayn-product__thumb.has-more .ayn-product__thumb-img {
	filter: brightness(0.58);
}

/* Mobile shared carousel. */
@media (max-width: 767px) {
	.ayn-gallery__desktop,
	.ayn-carousel,
	.ayn-hero,
	.ayn-product {
		display: none !important;
	}

	.ayn-gallery__mobile {
		display: block;
	}

	.ayn-gallery__viewport {
		position: relative;
		overflow: hidden;
		border-radius: min(var(--ayn-radius), 12px);
		background: var(--ayn-surface);
	}

	.ayn-gallery__track {
		display: flex;
		overflow-x: auto;
		scroll-snap-type: x mandatory;
		scrollbar-width: none;
		-webkit-overflow-scrolling: touch;
	}

	.ayn-gallery__track::-webkit-scrollbar {
		display: none;
	}

	.ayn-gallery__slide {
		flex: 0 0 100%;
		display: block;
		aspect-ratio: 4 / 3;
		scroll-snap-align: center;
		background: var(--ayn-surface);
	}

	.ayn-gallery__dots {
		position: absolute;
		left: 50%;
		bottom: 12px;
		display: flex;
		max-width: calc(100% - 32px);
		gap: 7px;
		justify-content: center;
		padding: 8px 10px;
		border: 1px solid rgba(255, 255, 255, 0.42);
		border-radius: 999px;
		background: rgba(255, 255, 255, 0.86);
		transform: translateX(-50%);
	}

	.ayn-gallery__dot {
		width: 7px;
		height: 7px;
		padding: 0;
		border: 0;
		border-radius: 50%;
		background: rgba(15, 23, 42, 0.28);
		cursor: pointer;
	}

	.ayn-gallery__dot.is-active {
		background: var(--ayn-text);
	}

	.ayn-gallery__dot:nth-child(n+8) {
		display: none;
	}

	.ayn-gallery__thumbs {
		display: flex;
		gap: 8px;
		margin-top: 10px;
		padding: 2px 0;
		overflow-x: auto;
		scroll-snap-type: x mandatory;
		scrollbar-width: none;
		-webkit-overflow-scrolling: touch;
	}

	.ayn-gallery__thumbs::-webkit-scrollbar {
		display: none;
	}

	.ayn-gallery__thumb {
		flex: 0 0 auto;
		width: 72px;
		height: 54px;
		overflow: hidden;
		border: 1px solid transparent;
		border-radius: 7px;
		background: var(--ayn-surface);
		opacity: 0.62;
		scroll-snap-align: start;
		transition: opacity 160ms ease, border-color 160ms ease;
	}

	.ayn-gallery__thumb.is-active {
		border-color: var(--ayn-text);
		opacity: 1;
	}
}

@media (max-width: 991px) {
	.ayn-gallery--panorama .ayn-carousel__nav--prev {
		left: 18px;
	}

	.ayn-gallery--panorama .ayn-carousel__nav--next {
		right: 18px;
	}

	.ayn-gallery--product .ayn-product__thumbs {
		grid-template-columns: repeat(4, minmax(0, 1fr));
		gap: 12px;
	}
}

@media (prefers-reduced-motion: reduce) {
	.ayn-gallery *,
	.ayn-blur-up {
		transition: none !important;
	}

	.ayn-blur-up {
		filter: none;
		transform: none;
		opacity: 1;
	}
}

.ayn-lightbox {
	position: fixed;
	inset: 0;
	z-index: 999999;
	display: none;
	background: rgba(12, 11, 10, 0.92);
	color: #ffffff;
}

.ayn-lightbox.is-open {
	display: block;
}

.ayn-lightbox__stage {
	position: absolute;
	inset: 56px 72px;
	display: flex;
	align-items: center;
	justify-content: center;
}

.ayn-lightbox__img {
	display: block;
	max-width: 100%;
	max-height: 100%;
	width: auto;
	height: auto;
	object-fit: contain;
	box-shadow: 0 12px 40px rgba(0, 0, 0, 0.28);
}

.ayn-lightbox__button {
	position: absolute;
	z-index: 2;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 44px;
	height: 44px;
	border: 1px solid rgba(255, 255, 255, 0.2);
	border-radius: 8px;
	background: rgba(255, 255, 255, 0.1);
	color: #ffffff;
	cursor: pointer;
	font-size: 24px;
	line-height: 1;
	transition: background 160ms ease, border-color 160ms ease;
}

.ayn-lightbox__button:hover {
	background: rgba(255, 255, 255, 0.18);
	border-color: rgba(255, 255, 255, 0.32);
}

.ayn-lightbox__close {
	top: 18px;
	right: 18px;
}

.ayn-lightbox__prev {
	top: 50%;
	left: 18px;
	transform: translateY(-50%);
}

.ayn-lightbox__next {
	top: 50%;
	right: 18px;
	transform: translateY(-50%);
}

.ayn-lightbox__counter {
	position: absolute;
	left: 18px;
	bottom: 18px;
	color: rgba(255, 255, 255, 0.78);
	font-size: 13px;
	font-variant-numeric: tabular-nums;
}

@media (max-width: 767px) {
	.ayn-lightbox__stage {
		inset: 64px 12px 72px;
	}

	.ayn-lightbox__prev,
	.ayn-lightbox__next {
		top: auto;
		bottom: 14px;
		transform: none;
	}

	.ayn-lightbox__prev {
		left: 14px;
	}

	.ayn-lightbox__next {
		right: 14px;
	}

	.ayn-lightbox__counter {
		left: 50%;
		bottom: 27px;
		transform: translateX(-50%);
	}
}
