/* ============================================================
   AZ Hair Lounge — Gallery (front end)
   All rules scoped under .azg to avoid theme / Elementor leakage
   ============================================================ */

.azg {
	--azg-gold: #d4af37;
	--azg-gold-soft: rgba(212, 175, 55, .38);
	--azg-bg: #070707;
	--azg-surface: #101010;
	--azg-text: #f5f1ea;
	--azg-muted: #9a9186;
	--azg-cols: 3;          /* desktop  — may be set inline */
	--azg-cols-tablet: 2;   /* tablet   — may be set inline */
	--azg-cols-mobile: 1;   /* mobile   — may be set inline */
	--azg-gap: 18px;
	--azg-gap-mobile: 10px;

	/* Resolved values. Never set inline, so media queries can win. */
	--azg-c: var(--azg-cols);
	--azg-g: var(--azg-gap);

	box-sizing: border-box;
	display: block;
	width: 100%;
	background: var(--azg-bg);
	color: var(--azg-text);
	padding: clamp(28px, 5vw, 64px) clamp(16px, 4vw, 48px);
	font-family: "Montserrat", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
	-webkit-font-smoothing: antialiased;
}

.azg *,
.azg *::before,
.azg *::after { box-sizing: border-box; }

.azg--light {
	--azg-bg: #faf8f5;
	--azg-surface: #ffffff;
	--azg-text: #14110d;
	--azg-muted: #6f665a;
	--azg-gold-soft: rgba(212, 175, 55, .55);
}

/* ---------------- heading ---------------- */

.azg .azg__head { text-align: center; margin: 0 auto clamp(24px, 4vw, 44px); max-width: 720px; }

.azg .azg__eyebrow {
	display: block;
	font-size: 11px; letter-spacing: 3.4px; text-transform: uppercase;
	color: var(--azg-gold); margin-bottom: 12px; font-weight: 500;
}

.azg .azg__title {
	font-family: "Cormorant Garamond", Georgia, serif;
	font-size: clamp(30px, 5vw, 52px);
	font-weight: 400; line-height: 1.12; letter-spacing: .5px;
	margin: 0; color: var(--azg-text);
}

.azg .azg__rule {
	display: block; width: 64px; height: 1px; margin: 18px auto 0;
	background: linear-gradient(90deg, transparent, var(--azg-gold), transparent);
}

/* ---------------- filter bar ---------------- */

.azg .azg__filters {
	display: flex; flex-wrap: wrap; justify-content: center;
	gap: 10px; margin: 0 0 clamp(22px, 3.5vw, 38px);
}

.azg .azg__pill {
	appearance: none;
	position: relative;
	font-family: inherit;
	font-size: 11px; font-weight: 500; letter-spacing: 1.8px; text-transform: uppercase;
	color: var(--azg-muted);
	background: transparent;
	border: 1px solid rgba(212, 175, 55, .22);
	border-radius: 2px;
	padding: 11px 22px;
	cursor: pointer;
	transition: color .32s ease, border-color .32s ease, background-color .32s ease, transform .32s ease;
	line-height: 1;
}

.azg .azg__pill:hover { color: var(--azg-text); border-color: var(--azg-gold-soft); }
.azg .azg__pill:focus-visible { outline: 2px solid var(--azg-gold); outline-offset: 2px; }

.azg .azg__pill.is-active {
	color: #0a0a0a;
	background: var(--azg-gold);
	border-color: var(--azg-gold);
}

/* ---------------- grid ---------------- */

.azg .azg__grid { width: 100%; }

/* masonry via CSS columns */
.azg--masonry .azg__grid {
	column-count: var(--azg-c);
	column-gap: var(--azg-g);
}
.azg--masonry .azg__item {
	break-inside: avoid;
	-webkit-column-break-inside: avoid;
	margin: 0 0 var(--azg-g);
	display: block;
}

/* equal tiles */
.azg--grid .azg__grid {
	display: grid;
	grid-template-columns: repeat(var(--azg-c), minmax(0, 1fr));
	gap: var(--azg-g);
}
.azg--grid .azg__item { margin: 0; }
.azg--grid .azg__frame { aspect-ratio: var(--azg-ratio-fixed, 4 / 5); }
.azg--grid .azg__frame img { height: 100%; }

/* ---------------- item ---------------- */

.azg .azg__item {
	opacity: 0;
	transform: translateY(22px);
	transition: opacity .7s cubic-bezier(.22,.61,.36,1), transform .7s cubic-bezier(.22,.61,.36,1);
}
.azg .azg__item.is-in { opacity: 1; transform: none; }
.azg .azg__item.is-hidden { display: none; }

.azg .azg__frame {
	position: relative;
	overflow: hidden;
	background: var(--azg-surface);
	border-radius: 2px;
	display: block;
}

.azg .azg__frame::after {
	content: "";
	position: absolute; inset: 10px;
	border: 1px solid rgba(212, 175, 55, .55);
	opacity: 0;
	transform: scale(1.03);
	transition: opacity .45s ease, transform .45s ease;
	pointer-events: none;
	z-index: 3;
}

.azg .azg__frame img {
	display: block;
	width: 100%;
	height: auto;
	object-fit: cover;
	transform: scale(1.001);
	transition: transform .9s cubic-bezier(.22,.61,.36,1), filter .6s ease;
}

.azg .azg__veil {
	position: absolute; inset: 0; z-index: 2;
	background: linear-gradient(to top, rgba(7,7,7,.72) 0%, rgba(7,7,7,.18) 42%, rgba(7,7,7,0) 70%);
	opacity: 0;
	transition: opacity .45s ease;
	pointer-events: none;
}

.azg .azg__tag {
	position: absolute; left: 22px; bottom: 22px; z-index: 4;
	font-size: 10px; letter-spacing: 2.2px; text-transform: uppercase;
	color: #f5f1ea;
	transform: translateY(10px);
	opacity: 0;
	transition: opacity .45s ease .05s, transform .45s ease .05s;
	pointer-events: none;
	text-shadow: 0 1px 6px rgba(0,0,0,.5);
}

.azg .azg__zoom {
	position: absolute; inset: 0; z-index: 5;
	width: 100%; height: 100%;
	background: transparent; border: 0; padding: 0;
	cursor: pointer;
}
.azg .azg__zoom span {
	position: absolute; top: 50%; left: 50%;
	width: 44px; height: 44px;
	margin: -22px 0 0 -22px;
	border: 1px solid var(--azg-gold);
	border-radius: 50%;
	opacity: 0;
	transform: scale(.72);
	transition: opacity .4s ease, transform .4s ease;
}
.azg .azg__zoom span::before,
.azg .azg__zoom span::after {
	content: "";
	position: absolute; top: 50%; left: 50%;
	background: var(--azg-gold);
}
.azg .azg__zoom span::before { width: 14px; height: 1px; margin: 0 0 0 -7px; }
.azg .azg__zoom span::after { width: 1px; height: 14px; margin: -7px 0 0 0; }
.azg .azg__zoom:focus-visible { outline: 2px solid var(--azg-gold); outline-offset: -6px; }

@media (hover: hover) {
	.azg .azg__frame:hover img { transform: scale(1.07); filter: brightness(.86); }
	.azg .azg__frame:hover::after { opacity: 1; transform: scale(1); }
	.azg .azg__frame:hover .azg__veil { opacity: 1; }
	.azg .azg__frame:hover .azg__tag { opacity: 1; transform: none; }
	.azg .azg__frame:hover .azg__zoom span { opacity: 1; transform: scale(1); }
}

.azg .azg__cap {
	margin: 10px 2px 0;
	font-size: 12px; letter-spacing: .4px; color: var(--azg-muted);
	line-height: 1.5;
}

/* ---------------- load more ---------------- */

.azg .azg__more-wrap { text-align: center; margin-top: clamp(26px, 4vw, 44px); }
.azg .azg__more {
	font-family: inherit;
	font-size: 11px; letter-spacing: 2.4px; text-transform: uppercase; font-weight: 500;
	color: var(--azg-gold);
	background: transparent;
	border: 1px solid var(--azg-gold);
	padding: 15px 42px;
	border-radius: 2px;
	cursor: pointer;
	transition: background-color .35s ease, color .35s ease;
}
.azg .azg__more:hover { background: var(--azg-gold); color: #0a0a0a; }
.azg .azg__more[hidden] { display: none; }

.azg .azg__none {
	text-align: center; color: var(--azg-muted);
	font-size: 13px; letter-spacing: 1px; padding: 40px 0 10px; margin: 0;
}
.azg .azg__none[hidden] { display: none; }


/* ---------------- slider ---------------- */

.azg--slider .azg__slider { position: relative; }

.azg--slider .azg__viewport {
	overflow: hidden;
	margin: 0 -2px;   /* let the focus ring breathe without clipping */
	padding: 0 2px;
}

.azg--slider .azg__grid {
	display: flex;
	gap: var(--azg-g);
	overflow-x: auto;
	overflow-y: hidden;
	scroll-snap-type: x mandatory;
	scroll-behavior: smooth;
	-webkit-overflow-scrolling: touch;
	scrollbar-width: none;
	-ms-overflow-style: none;
	padding-bottom: 2px;
}
.azg--slider .azg__grid::-webkit-scrollbar { display: none; }

.azg--slider .azg__item {
	flex: 0 0 calc((100% - (var(--azg-c) - 1) * var(--azg-g)) / var(--azg-c));
	max-width: calc((100% - (var(--azg-c) - 1) * var(--azg-g)) / var(--azg-c));
	margin: 0;
	scroll-snap-align: start;
}
.azg--slider .azg__frame { aspect-ratio: var(--azg-ratio-fixed, 4 / 5); }
.azg--slider .azg__frame img { height: 100%; }

/* Older iOS Safari has no aspect-ratio — fall back to a padding box */
@supports not (aspect-ratio: 1 / 1) {
	.azg--slider .azg__frame,
	.azg--grid .azg__frame { height: 0; padding-bottom: 125%; }
	.azg--slider .azg__frame img,
	.azg--grid .azg__frame img { position: absolute; top: 0; left: 0; height: 100%; }
}

/* arrows */
.azg--slider .azg__nav {
	position: absolute;
	top: 50%;
	transform: translateY(-50%);
	z-index: 6;
	width: 52px;
	height: 52px;
	display: flex;
	align-items: center;
	justify-content: center;
	background: rgba(7, 7, 7, .72);
	border: 1px solid var(--azg-gold-soft);
	color: var(--azg-gold);
	border-radius: 50%;
	cursor: pointer;
	padding: 0;
	transition: background-color .3s ease, color .3s ease, opacity .3s ease, border-color .3s ease;
}
.azg--light .azg__nav { background: rgba(255, 255, 255, .9); }
.azg--slider .azg__nav svg { width: 18px; height: 18px; }
.azg--slider .azg__nav:hover { background: var(--azg-gold); color: #070707; border-color: var(--azg-gold); }
.azg--slider .azg__nav:focus-visible { outline: 2px solid var(--azg-gold); outline-offset: 3px; }
.azg--slider .azg__nav--prev { left: 10px; }
.azg--slider .azg__nav--next { right: 10px; }
.azg--slider .azg__nav[disabled] { opacity: 0; pointer-events: none; }

/* dots */
.azg--slider .azg__dots {
	display: flex;
	justify-content: center;
	align-items: center;
	gap: 9px;
	margin-top: 22px;
}
.azg--slider .azg__dot {
	width: 7px;
	height: 7px;
	padding: 0;
	border-radius: 50%;
	border: 1px solid var(--azg-gold-soft);
	background: transparent;
	cursor: pointer;
	transition: width .35s ease, background-color .35s ease, border-color .35s ease;
}
.azg--slider .azg__dot.is-active {
	width: 22px;
	border-radius: 4px;
	background: var(--azg-gold);
	border-color: var(--azg-gold);
}
.azg--slider .azg__dot:focus-visible { outline: 2px solid var(--azg-gold); outline-offset: 3px; }

/* slider items are revealed by JS, not scroll position */
.azg--slider .azg__item { opacity: 1; transform: none; }

@media (max-width: 640px) {
	.azg--slider .azg__nav { width: 40px; height: 40px; }
	.azg--slider .azg__nav--prev { left: 4px; }
	.azg--slider .azg__nav--next { right: 4px; }
	.azg--slider .azg__dots { margin-top: 16px; }
}

@media (prefers-reduced-motion: reduce) {
	.azg--slider .azg__grid { scroll-behavior: auto; }
}

/* ---------------- lightbox ---------------- */

.azg-lb {
	position: fixed; inset: 0; z-index: 999999;
	display: flex; align-items: center; justify-content: center;
	background: rgba(5, 5, 5, .96);
	opacity: 0;
	visibility: hidden;
	transition: opacity .35s ease, visibility .35s;
	font-family: "Montserrat", sans-serif;
	-webkit-backdrop-filter: blur(4px);
	backdrop-filter: blur(4px);
}
.azg-lb.is-open { opacity: 1; visibility: visible; }

.azg-lb__stage {
	position: relative;
	max-width: min(1180px, 92vw);
	max-height: 84vh;
	display: flex; flex-direction: column; align-items: center;
}

.azg-lb__img {
	max-width: 100%;
	max-height: 78vh;
	width: auto; height: auto;
	display: block;
	border-radius: 2px;
	box-shadow: 0 30px 80px rgba(0, 0, 0, .7);
	opacity: 0;
	transform: scale(.985);
	transition: opacity .38s ease, transform .38s ease;
}
.azg-lb__img.is-ready { opacity: 1; transform: none; }

.azg-lb__meta {
	margin-top: 16px; text-align: center; max-width: 640px;
	color: #cfc7ba; font-size: 12px; letter-spacing: .6px; line-height: 1.6;
}
.azg-lb__label {
	display: block; color: #d4af37;
	font-size: 10px; letter-spacing: 2.6px; text-transform: uppercase; margin-bottom: 6px;
}

.azg-lb__btn {
	position: absolute;
	background: transparent;
	border: 1px solid rgba(212, 175, 55, .38);
	color: #d4af37;
	width: 50px; height: 50px;
	border-radius: 50%;
	cursor: pointer;
	display: flex; align-items: center; justify-content: center;
	transition: background-color .28s ease, color .28s ease, border-color .28s ease;
	z-index: 2;
}
.azg-lb__btn:hover { background: #d4af37; color: #070707; border-color: #d4af37; }
.azg-lb__btn:focus-visible { outline: 2px solid #d4af37; outline-offset: 3px; }
.azg-lb__btn svg { width: 17px; height: 17px; fill: none; stroke: currentColor; stroke-width: 1.6; }

.azg-lb__close { top: 24px; right: 24px; position: fixed; }
.azg-lb__prev { left: max(16px, 3vw); top: 50%; margin-top: -25px; position: fixed; }
.azg-lb__next { right: max(16px, 3vw); top: 50%; margin-top: -25px; position: fixed; }

.azg-lb__count {
	position: fixed; bottom: 26px; left: 50%; transform: translateX(-50%);
	color: #8d8478; font-size: 11px; letter-spacing: 2.4px;
}
.azg-lb__count b { color: #d4af37; font-weight: 500; }

/* ---------------- responsive ---------------- */

@media (max-width: 1024px) {
	.azg {
		--azg-c: var(--azg-cols-tablet);
		padding-left: clamp(14px, 4vw, 32px);
		padding-right: clamp(14px, 4vw, 32px);
	}
}

@media (max-width: 640px) {
	.azg {
		--azg-c: var(--azg-cols-mobile);
		--azg-g: var(--azg-gap-mobile);
		padding: 26px 14px 34px;
	}

	.azg .azg__head { margin-bottom: 20px; }
	.azg .azg__eyebrow { font-size: 10px; letter-spacing: 2.6px; }

	/* Filters scroll sideways instead of stacking into a tall block */
	.azg .azg__filters {
		flex-wrap: nowrap;
		justify-content: flex-start;
		overflow-x: auto;
		overflow-y: hidden;
		-webkit-overflow-scrolling: touch;
		scroll-snap-type: x proximity;
		margin-left: -14px;
		margin-right: -14px;
		padding: 2px 14px 10px;
		scrollbar-width: none;
	}
	.azg .azg__filters::-webkit-scrollbar { display: none; }
	.azg .azg__pill {
		flex: 0 0 auto;
		scroll-snap-align: start;
		padding: 11px 18px;
		font-size: 10px;
		letter-spacing: 1.4px;
	}

	/* Touch has no hover — keep the label and framing permanently visible */
	.azg .azg__veil { opacity: 1; }
	.azg .azg__tag { opacity: 1; transform: none; left: 14px; bottom: 13px; font-size: 9px; }
	.azg .azg__zoom span { display: none; }
	.azg .azg__cap { font-size: 11px; }

	/* Single column deserves a taller, editorial crop */
	.azg--grid.azg--m1 .azg__frame { aspect-ratio: 4 / 5; }

	.azg .azg__more { width: 100%; padding: 16px 20px; }

	.azg-lb__btn { width: 40px; height: 40px; }
	.azg-lb__close { top: 14px; right: 14px; }
	.azg-lb__prev { left: 8px; }
	.azg-lb__next { right: 8px; }
	.azg-lb__img { max-height: 70vh; }
	.azg-lb__meta { padding: 0 16px; font-size: 11px; }
	.azg-lb__count { bottom: 16px; }
}

@media (prefers-reduced-motion: reduce) {
	.azg .azg__item,
	.azg .azg__frame img,
	.azg .azg__veil,
	.azg .azg__tag,
	.azg-lb,
	.azg-lb__img { transition: none !important; }
	.azg .azg__item { opacity: 1; transform: none; }
}
