/**
 * Nossas Lojas layout.
 *
 * Gutters and type below are local to Page 04. They are not theme.json tokens.
 * The five approved frames are validation points. Sections grow with the copy.
 * The hero media slot keeps the approved heights. Desktop/tablet and mobile
 * use two different photographs. Final production use still needs editorial
 * and rights confirmation.
 */

.br-stores {
	--br-stores-gutter: 12px;
	--br-stores-gap: 24px;

	background: var(--wp--preset--color--surface-base);
	color: var(--wp--preset--color--text-primary);
}

.br-stores-hero__title,
.br-stores-hero__intro,
.br-stores-cta__title,
.br-stores-cta__body,
.br-stores-nav__label,
.br-stores-nav__link {
	overflow-wrap: anywhere;
}

.br-stores-hero {
	background: var(--wp--preset--color--surface-subtle);
	padding-bottom: 40px;
}

.br-stores-hero__content,
.br-stores-hero__copy {
	display: flex;
	flex-direction: column;
	align-items: flex-start;
	min-width: 0;
}

.br-stores-hero__content {
	gap: 16px;
}

.br-stores-hero__copy {
	gap: 16px;
	width: 100%;
}

.br-stores-hero__title {
	margin: 0;
	color: var(--wp--preset--color--brand-primary);
	font-family: var(--wp--preset--font-family--plus-jakarta-sans);
	font-size: 28px;
	font-weight: 700;
	letter-spacing: 0;
	line-height: 36px;
}

.br-stores-hero__intro {
	width: 100%;
	color: var(--wp--preset--color--text-secondary);
	font-size: 15px;
	font-weight: 400;
	line-height: 22px;
}

.br-stores-hero__intro p {
	margin: 0;
}

.br-stores-hero__intro p + p {
	margin-top: 12px;
}

.br-stores-hero__media {
	position: relative;
	overflow: hidden;
	height: 180px;
	margin-top: 20px;
	border-radius: var(--wp--custom--radius--xl);
	background: var(--wp--preset--color--surface-muted);
}

/* Production without an approved photograph keeps this muted frame. No broken image. */
.br-stores-hero__media--empty {
	background: var(--wp--preset--color--surface-muted);
}

.br-stores-hero__media picture {
	position: absolute;
	inset: 0;
	display: block;
}

.br-stores-hero__media img {
	display: block;
	width: 100%;
	height: 100%;
	object-fit: cover;
	object-position: center;
}

.br-stores-nav {
	padding-inline: var(--br-stores-gutter);
	border-bottom: 1px solid var(--wp--preset--color--border-default);
	background: var(--wp--preset--color--surface-base);
}

.br-stores-nav__inner {
	display: flex;
	flex-direction: column;
	align-items: flex-start;
	gap: 10px;
	padding: 24px 0 16px;
}

.br-stores-nav__label {
	margin: 0;
	color: var(--wp--preset--color--text-primary);
	font-size: 12px;
	font-weight: 600;
	letter-spacing: 0.5px;
	line-height: 15px;
}

.br-stores-nav__list {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
	width: 100%;
	margin: 0;
	padding: 0;
	list-style: none;
}

.br-stores-nav__link {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	height: 36px;
	min-height: 36px;
	padding: 0 14px;
	border-radius: var(--wp--custom--radius--full);
	background: var(--wp--preset--color--surface-muted);
	color: var(--wp--preset--color--text-primary);
	font-size: 13px;
	font-weight: 500;
	line-height: 16px;
	white-space: nowrap;
	text-decoration: none;
}

.br-stores-nav__link:hover {
	color: var(--wp--preset--color--text-primary);
}

.br-stores-nav__link:focus-visible {
	outline: 2px solid var(--wp--preset--color--brand-primary);
	outline-offset: 2px;
}

.br-stores-grid {
	background: var(--wp--preset--color--surface-base);
	padding: 16px var(--br-stores-gutter) 40px;
}

.br-stores-grid__notice {
	margin: 0 0 16px;
	max-width: 42rem;
	color: var(--wp--preset--color--text-secondary);
	font-size: var(--wp--custom--type--body-small--font-size);
	font-weight: var(--wp--custom--type--body-small--font-weight);
	line-height: var(--wp--custom--type--body-small--line-height);
}

.br-stores-grid__list {
	display: grid;
	grid-template-columns: minmax(0, 1fr);
	gap: var(--br-stores-gap);
	align-items: start;
}

.br-stores-grid__item {
	min-width: 0;
	scroll-margin-top: 0;
}

.br-stores-grid__item:focus {
	outline: none;
}

.br-stores-grid__item:focus .br-store-card {
	outline: 2px solid var(--wp--preset--color--brand-primary);
	outline-offset: 4px;
}

.br-stores .br-store-card__media:not(:has(img, picture)) {
	display: none;
}

.br-stores .br-store-card--detailed {
	width: 100%;
	max-width: none;
}

.br-stores .br-store-card--detailed .br-store-card__media {
	aspect-ratio: 16 / 9;
	max-height: none;
}

.br-stores .br-store-card__description,
.br-stores .br-store-card__meta-text {
	white-space: pre-line;
}

.br-stores-cta {
	background: var(--wp--preset--color--surface-subtle);
	padding: 56px var(--br-stores-gutter);
}

.br-stores-cta__inner {
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 12px;
	text-align: center;
}

.br-stores-cta__title {
	margin: 0;
	color: var(--wp--preset--color--brand-primary);
	font-family: var(--wp--preset--font-family--plus-jakarta-sans);
	font-size: 24px;
	font-weight: 700;
	line-height: 30px;
}

.br-stores-cta__body {
	max-width: 640px;
	margin: 0;
	color: var(--wp--preset--color--text-secondary);
	font-size: 16px;
	font-weight: 400;
	line-height: 24px;
	white-space: pre-line;
}

.br-stores-cta .br-button {
	width: 100%;
	margin-top: 12px;
}

@media (min-width: 390px) {

	.br-stores {
		--br-stores-gutter: 20px;
	}
}

@media (min-width: 768px) {

	.br-stores {
		--br-stores-gutter: 40px;
		--br-stores-gap: 32px;
	}

	.br-stores-hero {
		padding-bottom: 96px;
	}

	.br-stores-hero__title {
		font-size: 48px;
		font-weight: 700;
		letter-spacing: -1px;
		line-height: 56px;
	}

	.br-stores-hero__intro {
		font-size: 18px;
		line-height: 28px;
	}

	.br-stores-hero__intro p + p {
		margin-top: 16px;
	}

	.br-stores-hero__media {
		height: 480px;
		margin-top: 40px;
	}

	.br-stores-nav__inner {
		padding-top: 20px;
		padding-bottom: 20px;
	}

	.br-stores-nav__label {
		font-size: 15px;
		font-weight: 600;
		letter-spacing: 0;
		line-height: 19px;
	}

	.br-stores-nav__link {
		height: 34px;
		min-height: 34px;
		padding: 0 16px;
		font-size: 14px;
		font-weight: 500;
		line-height: 18px;
	}

	.br-stores-grid {
		padding-top: 64px;
		padding-bottom: 96px;
	}

	.br-stores-cta {
		padding-top: 96px;
		padding-bottom: 96px;
	}

	.br-stores-cta__inner {
		gap: 24px;
	}

	.br-stores-cta__title {
		color: var(--wp--preset--color--text-primary);
		font-size: 28px;
		font-weight: 600;
		line-height: 36px;
	}

	.br-stores-cta .br-button {
		width: auto;
		margin-top: 0;
	}
}

@media (min-width: 1024px) {

	.br-stores {
		--br-stores-gutter: 48px;
	}

	.br-stores-nav__inner {
		flex-direction: row;
		flex-wrap: wrap;
		align-items: center;
		gap: 12px 32px;
	}

	.br-stores-nav__list {
		width: auto;
		gap: 12px;
	}

	.br-stores-grid__list {
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}

	.br-stores-hero__media {
		width: calc(100% + (2 * var(--br-stores-gutter)));
		margin-right: calc(var(--br-stores-gutter) * -1);
		margin-left: calc(var(--br-stores-gutter) * -1);
		border-radius: 0;
	}
}

@media (min-width: 1440px) {

	.br-stores {
		--br-stores-gutter: 80px;
	}

	.br-stores-hero__media {
		width: auto;
		margin-right: 0;
		margin-left: 0;
		border-radius: var(--wp--custom--radius--xl);
	}
}
