/**
 * Location page.
 *
 * Loaded only on the page with slug "location". Figma frame "Locations", 1512
 * wide. Uses the theme design tokens from main.css.
 *
 * 1. Hero
 * 2. Search + filter bar
 * 3. Store grid + cards
 * 4. Responsive
 */

/* -------------------------------------------------------------------------- */
/* 1. Hero                                                                     */
/* -------------------------------------------------------------------------- */

.lhero {
	position: relative;
	display: flex;
	align-items: center;
	min-height: clamp(300px, 24.47vw, 370px); /* header (~90px) + this ≈ the 457 design hero band */
	padding-block: clamp(48px, 5.29vw, 80px);
	background: var(--c-purple);
	color: var(--c-white);
	isolation: isolate;
}

.lhero__media {
	position: absolute;
	inset: 0;
	z-index: -1;
}

.lhero__media img,
.lhero__media video {
	width: 100%;
	height: 100%;
	object-fit: cover;
}

/* Purple-into-black wash, so the white copy always reads. */
.lhero__media::after {
	content: "";
	position: absolute;
	inset: 0;
	background: linear-gradient(180deg, rgb(102 75 186 / 45%) 0%, rgb(0 0 0 / 78%) 100%);
}

.lhero__inner {
	display: flex;
	flex-direction: column;
	align-items: flex-start;
	gap: 16px;
}

.lhero__eyebrow {
	margin: 0;
	font-size: clamp(16px, 1.587vw, 24px); /* 24 / 1512 */
	font-style: italic;
	font-weight: var(--fw-semibold);
	line-height: 1.2;
}

.lhero__title {
	margin: 0;
	font-size: clamp(34px, 4.7619vw, 72px); /* 72 / 1512 */
	font-weight: var(--fw-bold);
	letter-spacing: -0.02em;
	line-height: 1;
	text-transform: uppercase;
	text-wrap: balance;
}

.lhero__subtitle {
	max-width: 780px;
	margin: 0;
	font-size: 18px;
	font-weight: var(--fw-medium);
	line-height: 1.6;
}

/* -------------------------------------------------------------------------- */
/* 2. Search + filter bar                                                      */
/* -------------------------------------------------------------------------- */

.lbar {
	position: sticky;
	/* Comes to rest under the sticky site header rather than beneath it. */
	top: var(--header-h);
	z-index: 50;
	padding-block: 16px;
	background: var(--c-white);
	border-bottom: 1px solid var(--c-cream);
}

.lbar__inner {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
	align-items: center;
}

.lbar__search {
	flex: 1;
	min-width: 240px;
	margin: 0;
}

/* Pill input matching the design (1px #333 border, r1000). */
.lbar__input {
	width: 100%;
	min-height: 38px;
	padding: 8px 16px;
	border: 1px solid rgb(51 51 51 / 35%);
	border-radius: var(--radius-pill);
	background: var(--c-white);
	color: var(--c-charcoal);
	font-size: 14px;
	font-weight: var(--fw-medium);
	line-height: 1.6;
}

.lbar__input::placeholder {
	color: var(--c-grey);
	opacity: 1;
}

.lbar__input:focus {
	border-color: var(--c-purple);
	outline: none;
}

.lbar__filters {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
}

/* Outline pill by default, solid purple when active. */
.lbar__filter {
	display: inline-flex;
	align-items: center;
	padding: 8px 16px;
	border: 1px solid rgb(51 51 51 / 35%);
	border-radius: var(--radius-pill);
	background: transparent;
	color: var(--c-purple);
	font-size: 14px;
	font-weight: var(--fw-semibold);
	line-height: 1.6;
	text-transform: uppercase;
	white-space: nowrap;
	cursor: pointer;
	transition:
		background-color var(--duration) var(--ease),
		border-color var(--duration) var(--ease),
		color var(--duration) var(--ease);
}

.lbar__filter:hover {
	border-color: var(--c-purple);
}

.lbar__filter.is-active {
	border-color: var(--c-purple);
	background: var(--c-purple);
	color: var(--c-white);
}

/* -------------------------------------------------------------------------- */
/* 3. Store grid + cards                                                       */
/* -------------------------------------------------------------------------- */

.lstores {
	padding-block: clamp(48px, 6.35vw, 96px); /* 96 / 1512 */
}

/* 3 cards of 439px with 32px gaps: 439×3 + 32×2 = 1381 ≈ the 1380 column. */
.lgrid {
	display: grid;
	grid-template-columns: repeat(3, 1fr);
	gap: 32px;
	margin: 0;
	padding: 0;
	list-style: none;
	align-items: start;
}

.lcard {
	display: flex;
	flex-direction: column;
	overflow: hidden;
	border: 1px solid var(--c-cream);
	border-radius: 12px;
	background: var(--c-off-white);
}

/* JS hides a filtered-out card by adding [hidden]; keep it robust. */
.lcard[hidden] {
	display: none;
}

.lcard__media {
	position: relative;
	aspect-ratio: 439 / 270;
	overflow: hidden;
}

.lcard__media img {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
	object-fit: cover;
}

.lcard__body {
	display: flex;
	flex: 1;
	flex-direction: column;
	gap: 8px;
	padding: 16px;
}

.lcard__name {
	margin: 0;
	color: var(--c-charcoal);
	font-size: 24px;
	font-weight: var(--fw-bold);
	line-height: 1.2;
	text-transform: uppercase;
}

.lcard__meta {
	margin: 0;
	color: var(--c-grey);
	font-size: 14px;
	font-weight: var(--fw-medium);
	line-height: 1.6;
}

/* Service tags: transparent chips with a purple border (Figma fill is ~1%). */
.lcard__tags {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
	margin: 0;
	padding: 0;
	list-style: none;
}

.ltag {
	padding: 4px 8px;
	border: 1px solid var(--c-purple);
	border-radius: 4px;
	color: var(--c-charcoal);
	font-size: 12px;
	font-weight: var(--fw-medium);
	line-height: 1.4;
	text-transform: uppercase;
}

/* View-store: outline purple pill with a sliding arrow, pushed to the base. */
.lcard__view {
	display: inline-flex;
	gap: 4px;
	align-items: center;
	align-self: flex-start;
	margin-top: auto;
	padding: 6px 12px;
	border: 1px solid var(--c-purple);
	border-radius: var(--radius-pill);
	color: var(--c-purple);
	font-size: 14px;
	font-weight: var(--fw-semibold);
	line-height: 1.6;
	text-transform: uppercase;
	transition: background-color var(--duration) var(--ease), color var(--duration) var(--ease);
}

.lcard__view:hover {
	background: var(--c-purple);
	color: var(--c-white);
}

.lcard__view-icon {
	width: 20px;
	height: 20px;
	transition: transform var(--duration) var(--ease);
}

.lcard__view:hover .lcard__view-icon {
	transform: translateX(3px);
}

.lstores__empty {
	margin: 0;
	padding-block: 40px;
	color: var(--c-grey);
	font-size: 18px;
	text-align: center;
}

/* -------------------------------------------------------------------------- */
/* 4. Responsive                                                               */
/* -------------------------------------------------------------------------- */

@media (max-width: 1000px) {
	.lgrid {
		grid-template-columns: repeat(2, 1fr);
	}
}

@media (max-width: 780px) {
	.lbar__search {
		flex: 1 1 100%;
	}
}

@media (max-width: 600px) {
	.lgrid {
		grid-template-columns: 1fr;
	}
}
