/* =========================================================
   HP Lookbook — Frontend
   ========================================================= */

.hp-lookbook-wrap {
	position: relative;
	width: 100%;
}

/* ---------- Filters: minimalist horizontal text ---------- */

.hp-lookbook-filters {
	display: flex;
	flex-wrap: wrap;
	justify-content: center;
	gap: 8px 34px;
	list-style: none !important;
	margin: 0 0 40px !important;
	padding: 0 !important;
}

.hp-lookbook-filters li {
	list-style: none !important;
	margin: 0 !important;
	padding: 0 !important;
}

.hp-lookbook-filters .hp-filter {
	appearance: none;
	-webkit-appearance: none;
	background: transparent !important;
	border: 0 !important;
	border-radius: 0 !important;
	box-shadow: none !important;
	padding: 4px 0 !important;
	margin: 0;
	cursor: pointer;
	font-size: 13px;
	letter-spacing: 0.14em;
	text-transform: uppercase;
	color: #8a8a8a;
	line-height: 1.4;
	border-bottom: 1px solid transparent !important;
	transition: color 0.25s ease, border-color 0.25s ease;
}

.hp-lookbook-filters .hp-filter:hover,
.hp-lookbook-filters .hp-filter:focus-visible {
	color: #282828;
	outline: none;
}

.hp-lookbook-filters .hp-filter.is-active {
	color: #282828;
	border-bottom: 1px solid #282828 !important;
}

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

.hp-lookbook-grid {
	position: relative;
	width: 100%;
}

.hp-lookbook-grid.hp-is-fading {
	opacity: 0.35;
	transition: opacity 0.2s ease;
}

/* ---------- Entrance animation: soft fade up ---------- */

.hp-anim .hp-lookbook-item {
	opacity: 0;
	transform: translateY(28px);
	transition: opacity 0.65s cubic-bezier(0.22, 1, 0.36, 1),
				transform 0.65s cubic-bezier(0.22, 1, 0.36, 1);
	will-change: opacity, transform;
}

.hp-anim .hp-lookbook-item.hp-in {
	opacity: 1;
	transform: translateY(0);
}

@media (prefers-reduced-motion: reduce) {
	.hp-anim .hp-lookbook-item {
		transition: none;
		transform: none;
		opacity: 1;
	}
}

.hp-grid-sizer,
.hp-lookbook-item {
	width: calc((100% - 48px) / 3); /* 3 columns, 24px gutters */
}

.hp-gutter-sizer {
	width: 24px;
}

.hp-lookbook-item {
	position: relative;
	margin: 0 0 24px !important;
	padding: 0;
	cursor: pointer;
	overflow: hidden;
	float: left; /* pre-masonry fallback */
}

.hp-lookbook-item img {
	display: block;
	width: 100%;
	height: auto;
	margin: 0;
}

/* Hover overlay: title + short description */

.hp-item-overlay {
	position: absolute;
	left: 0;
	right: 0;
	bottom: 0;
	padding: 40px 18px 16px;
	background: linear-gradient(to top, rgba(0, 0, 0, 0.62), rgba(0, 0, 0, 0));
	color: #fff;
	opacity: 0;
	transform: translateY(8px);
	transition: opacity 0.3s ease, transform 0.3s ease;
	pointer-events: none;
	margin: 0;
}

.hp-lookbook-item:hover .hp-item-overlay,
.hp-lookbook-item:focus-visible .hp-item-overlay {
	opacity: 1;
	transform: translateY(0);
}

.hp-item-title {
	display: block;
	font-size: 15px;
	letter-spacing: 0.08em;
	text-transform: uppercase;
	margin-bottom: 4px;
	color: #fff;
}

.hp-item-desc {
	display: block;
	font-size: 13px;
	line-height: 1.5;
	color: rgba(255, 255, 255, 0.85);
}

.hp-lookbook-empty {
	width: 100%;
	text-align: center;
	padding: 40px 0;
	color: #8a8a8a;
}

/* ---------- Loading spinner ---------- */

.hp-lookbook-loading {
	text-align: center;
	padding: 20px 0;
}

.hp-spinner {
	display: inline-block;
	width: 26px;
	height: 26px;
	border: 2px solid rgba(0, 0, 0, 0.15);
	border-top-color: #282828;
	border-radius: 50%;
	animation: hp-spin 0.7s linear infinite;
}

@keyframes hp-spin {
	to { transform: rotate(360deg); }
}

/* ---------- Modal ---------- */

.hp-lookbook-modal {
	position: fixed;
	inset: 0;
	/* Above Salient's #header-outer (which sits around 9999–10000) */
	z-index: 100100 !important;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 40px 60px;
	/* Sleek transition: visibility + opacity instead of display toggling */
	visibility: hidden;
	opacity: 0;
	pointer-events: none;
	transition: opacity 0.35s ease, visibility 0s linear 0.35s;
}

.hp-lookbook-modal.is-open {
	visibility: visible;
	opacity: 1;
	pointer-events: auto;
	transition: opacity 0.35s ease;
}

.hp-modal-overlay {
	position: absolute;
	inset: 0;
	background: rgba(0, 0, 0, 0.65);
	cursor: pointer;
}

.hp-modal-box {
	position: relative;
	background: #fff;
	width: 90%;
	max-width: 90%;
	max-height: calc(100vh - 80px);
	overflow: hidden;
	box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
	opacity: 0;
	transform: translateY(24px) scale(0.985);
	transition: opacity 0.4s cubic-bezier(0.22, 1, 0.36, 1), transform 0.4s cubic-bezier(0.22, 1, 0.36, 1);
}

.hp-lookbook-modal.is-open .hp-modal-box {
	opacity: 1;
	transform: translateY(0) scale(1);
}

.hp-modal-content {
	max-height: calc(100vh - 80px);
	overflow: hidden;
	display: flex;
	align-items: center;
	justify-content: center;
	min-height: 240px;
}

.hp-modal-inner {
	display: flex;
	width: 100%;
	max-height: calc(100vh - 80px);
}

/* Left column ~70% */
.hp-modal-image {
	flex: 0 0 70%;
	max-width: 70%;
	background: #f0efed;
	display: flex;
	align-items: center;
	justify-content: center;
	overflow: hidden;
}

/*
 * The wrapper shrink-wraps the image at its natural aspect ratio.
 * Pins are positioned with percentages relative to this wrapper,
 * so they land on the exact same spot of the photo at every size.
 */
.hp-modal-img-wrap {
	position: relative;
	display: inline-block;
	line-height: 0;
	max-width: 100%;
}

.hp-modal-img-wrap img {
	display: block;
	max-width: 100%;
	max-height: calc(100vh - 80px);
	width: auto;
	height: auto;
	margin: 0;
}

/* ---------- Image pins ---------- */

/*
 * Horizontal frosted-glass pill: [dot][label].
 * Anchored so the DOT sits exactly on the saved coordinate
 * (10px margin + 2.5px half-dot = 12.5px offset).
 * .hp-pin-flip mirrors the pill for pins near the right edge.
 */
.hp-image-pin {
	position: absolute;
	transform: translate(-12.5px, -50%);
	z-index: 3;
	display: flex;
	flex-direction: row;
	align-items: center;
	background: rgba(235, 233, 229, 0.11); /* #EBE9E51C */
	border-radius: 10px;
	-webkit-backdrop-filter: blur(16px);
	backdrop-filter: blur(16px);
	pointer-events: none;
	line-height: 1;
}

.hp-image-pin.hp-pin-flip {
	flex-direction: row-reverse;
	transform: translate(calc(-100% + 12.5px), -50%);
}

.hp-image-pin .hp-pin-dot {
	width: 5px;
	height: 5px;
	border-radius: 50%;
	background: #fff;
	margin-left: 10px;
	box-shadow: none;
	flex: 0 0 auto;
}

.hp-image-pin.hp-pin-flip .hp-pin-dot {
	margin-left: 0;
	margin-right: 10px;
}

.hp-image-pin .hp-pin-label {
	color: #fff;
	background: transparent;
	box-shadow: none;
	font-size: 11px;
	letter-spacing: 0.08em;
	text-transform: uppercase;
	padding: 6px 10px;
	white-space: nowrap;
	max-width: 200px;
	overflow: hidden;
	text-overflow: ellipsis;
}

/* Linked pins (product page or custom URL) */
a.hp-image-pin {
	pointer-events: auto;
	cursor: pointer;
	text-decoration: none !important;
	box-shadow: none !important;
	border-bottom: 0 !important;
}

a.hp-image-pin:hover .hp-pin-label,
a.hp-image-pin:focus-visible .hp-pin-label {
	text-decoration: underline;
	text-underline-offset: 2px;
}

/* Dark text variant for light photos */
.hp-image-pin.hp-pin-dark .hp-pin-dot {
	background: #282828;
}

.hp-image-pin.hp-pin-dark .hp-pin-label {
	color: #282828;
}

/* Right column ~30% */
.hp-modal-side {
	flex: 1 1 30%;
	max-width: 30%;
	display: flex;
	flex-direction: column;
	padding: 46px 30px 24px;
	overflow-y: auto;
	-webkit-overflow-scrolling: touch;
}

.hp-modal-heading {
	font-size: 14px;
	letter-spacing: 0.18em;
	text-transform: uppercase;
	color: #8a8a8a;
	margin: 0 0 26px;
	text-align: center;
	font-weight: 400;
	line-height: 1;
}

.hp-modal-tiles {
	flex: 1 1 auto;
}

.hp-modal-tile {
	margin-bottom: 30px;
	text-align: center;
}

.hp-modal-tile-img img {
	display: inline-block;
	max-width: 120px;
	height: auto;
	margin: 0 0 8px;
}

.hp-modal-tile-link {
	display: block;
	text-decoration: none !important;
	color: inherit !important;
	box-shadow: none !important;
	border-bottom: 0 !important;
}

.hp-modal-tile-link:hover .hp-modal-tile-name,
.hp-modal-tile-link:focus-visible .hp-modal-tile-name {
	text-decoration: underline;
	text-underline-offset: 3px;
}

.hp-modal-tile-name {
	font-size: 14px;
	letter-spacing: 0.04em;
	color: #282828;
	margin: 0 0 2px;
	line-height: 1.3;
}

.hp-modal-tile-details {
	font-size: 13px;
	line-height: 1.45;
	color: #8a8a8a;
	margin: 0 !important;
	white-space: pre-line;
}

/* Share row */

.hp-modal-share {
	margin-top: auto;
	padding-top: 20px;
	border-top: 1px solid #ececec;
	text-align: center;
}

.hp-share-label {
	display: block;
	font-size: 11px;
	letter-spacing: 0.16em;
	text-transform: uppercase;
	color: #8a8a8a;
	margin-bottom: 10px;
}

.hp-share-buttons {
	display: flex;
	justify-content: center;
	gap: 14px;
}

.hp-share-btn {
	appearance: none;
	-webkit-appearance: none;
	background: transparent !important;
	border: 1px solid #dcdcdc !important;
	border-radius: 50% !important;
	width: 38px;
	height: 38px;
	padding: 0 !important;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	color: #555 !important;
	cursor: pointer;
	transition: border-color 0.2s ease, color 0.2s ease;
	box-shadow: none !important;
	text-decoration: none !important;
}

.hp-share-btn:hover,
.hp-share-btn:focus-visible {
	border-color: #282828 !important;
	color: #282828 !important;
	outline: none;
}

.hp-share-btn svg {
	width: 17px;
	height: 17px;
}

/* Close + nav arrows */

.hp-modal-close {
	position: absolute;
	top: 12px;
	right: 12px;
	z-index: 5;
	appearance: none;
	background: rgba(255, 255, 255, 0.9) !important;
	border: 0 !important;
	border-radius: 50% !important;
	width: 38px;
	height: 38px;
	padding: 0 !important;
	display: flex;
	align-items: center;
	justify-content: center;
	cursor: pointer;
	color: #282828 !important;
	box-shadow: 0 1px 4px rgba(0, 0, 0, 0.15) !important;
}

.hp-modal-close svg {
	width: 18px;
	height: 18px;
}

.hp-modal-nav {
	position: relative;
	z-index: 5;
	appearance: none;
	background: transparent !important;
	border: 0 !important;
	padding: 10px !important;
	cursor: pointer;
	color: #fff !important;
	box-shadow: none !important;
	flex: 0 0 auto;
	transition: opacity 0.2s ease, transform 0.2s ease;
}

.hp-modal-nav svg {
	width: 34px;
	height: 34px;
}

.hp-modal-nav:hover {
	transform: scale(1.1);
}

.hp-modal-nav[disabled] {
	opacity: 0.25;
	cursor: default;
	transform: none;
}

/* Lock page scroll while modal is open.
   position:fixed is applied so Salient / iOS Safari can't scroll behind
   the overlay; the JS stores and restores the scroll offset. */
html.hp-modal-open,
body.hp-modal-open {
	overflow: hidden !important;
}

body.hp-modal-open {
	position: fixed;
	width: 100%;
	left: 0;
	right: 0;
}

/* ---------- Responsive ---------- */

@media (max-width: 1024px) {
	.hp-grid-sizer,
	.hp-lookbook-item {
		width: calc((100% - 24px) / 2); /* 2 columns */
	}

	.hp-lookbook-modal {
		padding: 24px 54px;
	}
}

@media (max-width: 690px) {
	.hp-grid-sizer,
	.hp-lookbook-item {
		width: 100%; /* 1 column */
	}

	.hp-lookbook-filters {
		gap: 6px 22px;
		margin-bottom: 28px !important;
	}

	.hp-lookbook-modal {
		padding: 0;
	}

	.hp-modal-box,
	.hp-modal-content,
	.hp-modal-inner {
		max-height: 100vh;
		max-height: 100dvh;
		height: 100vh;
		height: 100dvh;
	}

	.hp-modal-box {
		max-width: 100%;
	}

	.hp-modal-inner {
		flex-direction: column;
		overflow-y: auto;
		-webkit-overflow-scrolling: touch;
	}

	.hp-modal-image,
	.hp-modal-side {
		flex: 0 0 auto;
		max-width: 100%;
	}

	.hp-modal-image {
		width: 100%;
	}

	.hp-modal-img-wrap img {
		max-height: 55vh;
	}

	.hp-image-pin .hp-pin-label {
		font-size: 9px;
		padding: 5px 8px;
		max-width: 130px;
	}

	.hp-image-pin .hp-pin-dot {
		margin-left: 8px;
	}

	.hp-image-pin.hp-pin-flip .hp-pin-dot {
		margin-left: 0;
		margin-right: 8px;
	}

	.hp-modal-side {
		padding: 30px 20px 90px;
		overflow: visible;
	}

	/* Arrows float over the image on mobile */
	.hp-modal-nav {
		position: fixed;
		top: 50%;
		transform: translateY(-50%);
		color: #282828 !important;
		background: rgba(255, 255, 255, 0.85) !important;
		border-radius: 50% !important;
		width: 42px;
		height: 42px;
		padding: 0 !important;
		display: flex;
		align-items: center;
		justify-content: center;
		box-shadow: 0 1px 5px rgba(0, 0, 0, 0.2) !important;
	}

	.hp-modal-nav:hover {
		transform: translateY(-50%);
	}

	.hp-modal-prev { left: 8px; }
	.hp-modal-next { right: 8px; }

	.hp-modal-nav svg {
		width: 24px;
		height: 24px;
	}

	/* On touch devices show the overlay text by default (no hover) */
	@media (hover: none) {
		.hp-item-overlay {
			opacity: 1;
			transform: translateY(0);
		}
	}
}
