/**
 * 9rang Store: the home page sections below the fold.
 *
 * Shop by Category, the editorial collage, the Explore carousel, the Instagram
 * wall, the newsletter band, the full-bleed photographic bands, and the three
 * extra product-card variants those sections use.
 *
 * Split from signature.css only for size — it is the same design layer and
 * loads immediately after it. Figma nodes are named per block.
 *
 * @package ninerang
 */

/* ------------------------------------------------ 1. Split section heading */

.nr-section__head--split {
	flex-direction: column;
	align-items: center;
	gap: 10px;
	margin-bottom: 44px;
	text-align: center;
}

.nr-splitheading {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 14px;
	flex-wrap: wrap;
}

.nr-splitheading .nr-section__title,
.nr-splitheading__alt {
	margin: 0;
	font-family: var( --nr-font-heading );
	font-size: clamp( 24px, 3.4vw, 36px );
	font-weight: 700;
	line-height: 1.2;
	letter-spacing: 0;
	text-transform: uppercase;
}

.nr-splitheading__alt {
	color: var( --nr-heading-muted );
}

.nr-splitheading__rule {
	width: 2px;
	align-self: stretch;
	min-height: 1.1em;
	background: var( --nr-rule );
}

/* ---------------------------------- 2. Full-bleed bands (2159/2434/2446) */

.nr-band,
.nr-band__link {
	display: block;
}

.nr-band__image {
	width: 100%;
	height: auto;
}

/* -------------------------------------- 3. Shop by Category (561:2161) */

.nr-categories {
	background: var( --nr-surface );
	padding-block: 60px;
}

.nr-categories .nr-container {
	padding-inline: clamp( 16px, 5.5vw, 80px );
}

.nr-categories__head {
	margin-bottom: 40px;
	text-align: center;
}

.nr-categories .nr-section__title {
	margin: 0;
	font-size: clamp( 26px, 3.6vw, 40px );
	font-weight: 700;
	color: var( --nr-heading );
	text-transform: uppercase;
}

.nr-categories__row {
	display: grid;
	grid-template-columns: repeat( 6, minmax( 0, 1fr ) );
	gap: 24px;
	margin-bottom: 64px;
}

.nr-categories__link {
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 16px;
	height: 100%;
	padding-block: 16px;
	background: var( --nr-card-bg );
	transition: background 0.2s ease;
}

.nr-categories__link:hover {
	background: var( --nr-festival-bg );
}

.nr-categories__frame {
	display: block;
	width: 160px;
	max-width: 100%;
	aspect-ratio: 1 / 1;
	overflow: hidden;
	border: 1px solid var( --nr-border );
}

.nr-categories__image {
	width: 100%;
	height: 100%;
	object-fit: cover;
	transition: transform 0.5s ease;
}

.nr-categories__link:hover .nr-categories__image {
	transform: scale( 1.05 );
}

.nr-categories__name {
	color: var( --nr-ink );
	font-size: 16px;
	font-weight: 600;
	letter-spacing: 0.96px;
	text-align: center;
	text-transform: uppercase;
}

.nr-categories__feature {
	display: grid;
	grid-template-columns: minmax( 0, 680fr ) minmax( 0, 460fr );
	gap: 80px;
	align-items: stretch;
}

.nr-promo-panel {
	position: relative;
	display: flex;
	flex-direction: column;
	align-items: flex-start;
	justify-content: space-between;
	aspect-ratio: 1 / 1;
	padding: 20px;
	overflow: hidden;
}

.nr-promo-panel__image {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
	object-fit: cover;
}

/* A scrim keeps the white copy legible over whatever photograph is used. */
.nr-promo-panel::after {
	content: "";
	position: absolute;
	inset: 0;
	background: linear-gradient(
		to top,
		rgba( 0, 0, 0, 0.55 ) 0%,
		rgba( 0, 0, 0, 0.15 ) 45%,
		rgba( 0, 0, 0, 0 ) 70%
	);
}

.nr-promo-panel__tag,
.nr-promo-panel__body {
	position: relative;
	z-index: 2;
}

.nr-promo-panel__tag {
	display: inline-block;
	padding: 8px 16px;
	background: #c52727;
	color: #fff;
	font-size: 14px;
	font-weight: 700;
	letter-spacing: 2.1px;
	text-transform: uppercase;
}

.nr-promo-panel__body {
	display: flex;
	flex-direction: column;
	gap: 24px;
	width: 100%;
}

.nr-promo-panel__title {
	margin: 0;
	color: #fff;
	font-family: var( --nr-font-heading );
	font-size: clamp( 24px, 2.6vw, 36px );
	font-weight: 700;
	line-height: 1.2;
	text-transform: none;
}

.nr-promo-panel__text {
	margin: 0;
	max-width: 557px;
	color: #faf9f7;
	font-size: 16px;
	line-height: 1.5;
	opacity: 0.9;
}

.nr-promo-panel__cta {
	align-self: flex-start;
	padding: 14px 28px;
	background: #fff;
	color: var( --nr-ink );
	font-size: 14px;
	font-weight: 600;
	letter-spacing: 1.4px;
	text-transform: uppercase;
	transition: background 0.2s ease, color 0.2s ease;
}

.nr-promo-panel__cta:hover {
	background: var( --nr-ink );
	color: #fff;
}

/* ----------------------------------------- 4. Editorial collage (561:2435) */

.nr-collage__grid {
	display: grid;
	grid-template-columns: 399fr 399fr 638fr;
	align-items: stretch;
}

.nr-collage__col {
	position: relative;
	aspect-ratio: 399 / 850;
	overflow: hidden;
}

.nr-collage__col--wide {
	display: flex;
	flex-direction: column;
	justify-content: flex-end;
	gap: 44px;
	aspect-ratio: 638 / 850;
	padding: 60px 46px;
}

.nr-collage__image {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
	object-fit: cover;
}

.nr-collage__title {
	position: absolute;
	top: 37px;
	left: 0;
	right: 0;
	z-index: 2;
	margin: 0;
	color: var( --nr-ink );
	font-family: var( --nr-font-heading );
	font-size: clamp( 22px, 2.6vw, 36px );
	font-weight: 700;
	line-height: 1.2;
	text-align: center;
	text-transform: uppercase;
}

.nr-collage__panel {
	position: relative;
	z-index: 2;
	display: flex;
	flex-direction: column;
	gap: 44px;
	width: 100%;
}

.nr-collage__cta {
	display: flex;
	align-items: center;
	justify-content: center;
	height: 80px;
	padding-inline: 24px;
	background: #fff;
	color: var( --nr-ink );
	font-size: 20px;
	font-weight: 600;
	text-align: center;
	text-transform: uppercase;
	transition: background 0.2s ease, color 0.2s ease;
}

.nr-collage__cta:hover {
	background: var( --nr-ink );
	color: #fff;
}

.nr-collage__text {
	margin: 0;
	max-width: 453px;
	padding-inline: 8px;
	color: #fff;
	font-size: clamp( 15px, 1.5vw, 20px );
	line-height: 1.5;
	text-shadow: 0 1px 10px rgba( 0, 0, 0, 0.35 );
}

/* ------------------------------------- 5. Explore carousel (561:2563) */

.nr-explore {
	background: var( --nr-surface );
}

.nr-explore__head {
	margin-bottom: 40px;
	text-align: center;
}

.nr-explore .nr-section__title {
	margin: 0;
	font-size: clamp( 24px, 3.2vw, 36px );
	font-weight: 700;
	text-transform: uppercase;
}

/* A scroll-snapping rail rather than a scripted slider: native on touch, and
   the thin track in the design is the scrollbar itself. */
.nr-explore__rail {
	display: grid;
	grid-auto-flow: column;
	grid-auto-columns: minmax( 200px, calc( ( 100% - 4 * 16px ) / 5 ) );
	gap: 16px;
	padding-bottom: 24px;
	overflow-x: auto;
	scroll-snap-type: x mandatory;
	scrollbar-width: thin;
	scrollbar-color: var( --nr-ink ) var( --nr-border );
}

.nr-explore__rail > * {
	scroll-snap-align: start;
}

.nr-explore__rail::-webkit-scrollbar {
	height: 2px;
}

.nr-explore__rail::-webkit-scrollbar-track {
	background: var( --nr-border );
}

.nr-explore__rail::-webkit-scrollbar-thumb {
	background: var( --nr-ink );
}

/* ---------------------------------------- 6. Instagram wall (561:2615) */

.nr-insta {
	background: var( --nr-surface );
}

.nr-insta__head {
	margin-bottom: 36px;
	text-align: center;
}

.nr-insta__eyebrow {
	margin: 0 0 6px;
	color: var( --nr-accent );
	font-size: 13px;
	font-weight: 600;
	letter-spacing: 1.2px;
	text-transform: uppercase;
}

.nr-insta .nr-section__title {
	margin: 0;
	font-size: clamp( 24px, 3.2vw, 36px );
	font-weight: 700;
	text-transform: uppercase;
}

.nr-insta__grid {
	display: grid;
	grid-template-columns: repeat( 4, minmax( 0, 1fr ) );
	gap: 20px;
}

.nr-instapost {
	display: flex;
	flex-direction: column;
	overflow: hidden;
	background: var( --nr-surface );
	border-radius: 24px;
	box-shadow: 0 8px 16px rgba( 0, 0, 0, 0.06 );
}

.nr-instapost__media {
	position: relative;
	aspect-ratio: 1 / 1;
	overflow: hidden;
}

.nr-instapost__image {
	width: 100%;
	height: 100%;
	object-fit: cover;
}

.nr-instapost__tag {
	position: absolute;
	left: 14px;
	right: 14px;
	bottom: 12px;
	display: flex;
	align-items: center;
	gap: 10px;
	padding: 2px;
	background: var( --nr-card-bg );
	border: 2px solid #fff;
}

.nr-instapost__tag-image {
	flex: none;
	width: 56px;
	height: 56px;
	object-fit: cover;
}

.nr-instapost__tag-body {
	display: flex;
	flex: 1;
	flex-direction: column;
	gap: 4px;
	min-width: 0;
	padding-right: 8px;
}

.nr-instapost__tag-name {
	overflow: hidden;
	color: var( --nr-ink );
	font-size: 14px;
	font-weight: 500;
	line-height: 18px;
	text-overflow: ellipsis;
	white-space: nowrap;
}

.nr-instapost__tag-row {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 10px;
	color: var( --nr-ink );
	font-size: 14px;
	font-weight: 600;
}

.nr-instapost__tag-buy {
	text-decoration: underline;
}

.nr-instapost__bar {
	display: flex;
	align-items: center;
	justify-content: space-between;
	padding: 12px 14px 20px;
}

.nr-instapost__bar img {
	flex: none;
}

/* ------------------------------------------ 7. Newsletter (561:2692) */

.nr-newsband {
	background: var( --nr-surface );
	border-block: 1px solid #e8d9d0;
}

.nr-newsband__inner {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 32px;
	padding-block: 64px;
	padding-inline: clamp( 16px, 5.5vw, 80px );
}

.nr-newsband__copy {
	max-width: 480px;
}

.nr-newsband__title {
	margin: 0 0 8px;
	color: var( --nr-ink );
	font-family: var( --nr-font-heading );
	font-size: clamp( 20px, 2.4vw, 28px );
	font-weight: 400;
	text-transform: uppercase;
}

.nr-newsband__text {
	margin: 0;
	color: var( --nr-muted );
	font-size: 13px;
	line-height: 1.4;
}

.nr-newsband__form {
	display: flex;
	flex: none;
	align-items: stretch;
	gap: 12px;
}

.nr-newsband__form input[type="email"] {
	width: 346px;
	max-width: 100%;
	padding: 16px;
	border: 1px solid var( --nr-muted );
	border-radius: 0;
	background: var( --nr-card-bg );
	color: var( --nr-ink );
	font-size: 16px;
}

.nr-newsband__submit {
	width: 150px;
	padding: 16px 32px;
	background: var( --nr-ink );
	color: #fff8f3;
	font-size: 16px;
	font-weight: 500;
	text-transform: uppercase;
	transition: background 0.2s ease;
}

.nr-newsband__submit:hover {
	background: var( --nr-primary );
}

/* ================================== 8. Card variants used by these rows */

/* ------------------------------------------- 8.1 Trending (561:2455) */

.nr-card--trending {
	padding: 12px;
	background: var( --nr-card-bg );
}

.nr-card--trending .nr-card__media {
	position: relative;
	width: 100%;
	max-width: none;
	aspect-ratio: 286 / 440;
	overflow: hidden;
	background: var( --nr-card-image-bg );
}

.nr-card--trending .nr-card__image {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
	object-fit: cover;
}

.nr-badge--trending {
	position: absolute;
	top: 12px;
	left: 12px;
	z-index: 3;
	padding: 5px 10px;
	background: var( --nr-primary );
	color: #fff;
	font-size: 12px;
	font-weight: 700;
	letter-spacing: 1.2px;
}

.nr-card--trending .nr-card__body {
	display: flex;
	flex-direction: column;
	gap: 8px;
	padding-top: 16px;
}

.nr-card--trending .nr-card__title {
	margin: 0;
	overflow: hidden;
	color: var( --nr-heading );
	font-size: 16px;
	font-weight: 500;
	line-height: 22px;
	text-overflow: ellipsis;
	text-transform: none;
	white-space: nowrap;
}

.nr-card--trending .nr-card__pricerow {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 8px;
}

.nr-card--trending .nr-card__now,
.nr-card--trending .nr-card__now .amount {
	color: var( --nr-primary );
	font-size: 18px;
	font-weight: 700;
}

.nr-card--trending .nr-card__was,
.nr-card--trending .nr-card__was .amount {
	color: #9e9a93;
	font-size: 14px;
	font-weight: 400;
	text-decoration: line-through;
}

.nr-card--trending .nr-card__off {
	padding: 2px 6px;
	border-radius: 4px;
	background: #fff0f0;
	color: var( --nr-primary );
	font-size: 12px;
	font-weight: 600;
}

.nr-card--trending .nr-card__ratingrow {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 10px;
	padding-top: 4px;
}

.nr-card--trending .nr-stars svg {
	width: 17px;
	height: 17px;
}

.nr-card--trending .nr-card__reviews {
	color: #9e9a93;
	font-size: 12px;
}

.nr-card--trending .nr-button--cart {
	position: static;
	display: flex;
	width: 100%;
	height: 40px;
	border-radius: 0;
	background: var( --nr-ink );
	color: #fff;
	font-size: 16px;
	font-weight: 500;
	letter-spacing: 0.32px;
	opacity: 1;
	transform: none;
	text-transform: uppercase;
}

.nr-card--trending .nr-button--cart:hover {
	background: var( --nr-primary );
	transform: none;
}

/* -------------------------------------------- 8.2 Compact (561:2575) */

.nr-card--compact {
	gap: 12px;
	padding: 0;
	background: var( --nr-surface );
}

.nr-card--compact .nr-card__media {
	position: relative;
	width: 100%;
	max-width: none;
	aspect-ratio: 247 / 500;
	overflow: hidden;
	border-radius: 0;
}

.nr-card--compact .nr-card__image {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
	object-fit: cover;
}

.nr-card--compact .nr-card__body {
	display: flex;
	flex-direction: column;
	gap: 6px;
	padding: 12px 4px 0;
}

.nr-card--compact .nr-card__title {
	margin: 0;
	overflow: hidden;
	color: #707070;
	font-size: 16px;
	font-weight: 500;
	text-overflow: ellipsis;
	text-transform: uppercase;
	white-space: nowrap;
}

.nr-card--compact .nr-card__meta {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 10px;
}

.nr-card--compact .nr-card__price,
.nr-card--compact .nr-card__price .price {
	display: flex;
	align-items: baseline;
	gap: 6px;
	color: var( --nr-ink );
	font-size: 20px;
	font-weight: 600;
}

.nr-card--compact .nr-card__price del,
.nr-card--compact .nr-card__price del .amount {
	color: var( --nr-compare );
	font-size: 14px;
	font-weight: 400;
	text-decoration: line-through;
}

.nr-card--compact .nr-card__price ins {
	text-decoration: none;
}

.nr-bagbtn {
	display: inline-flex;
	flex: none;
	align-items: center;
	justify-content: center;
	width: 36px;
	height: 36px;
	background: var( --nr-ink );
	color: #fff;
	transition: background 0.2s ease;
}

.nr-bagbtn:hover {
	background: var( --nr-primary );
	color: #fff;
}

.nr-bagbtn.is-disabled {
	opacity: 0.45;
	pointer-events: none;
}

/* The wishlist control is a hover affordance on this card. */
.nr-card--compact .nr-card__tools {
	top: 12px;
	right: 12px;
	opacity: 0;
	transform: none;
}

.nr-card--compact:hover .nr-card__tools,
.nr-card--compact:focus-within .nr-card__tools {
	opacity: 1;
}

/* -------------------------------------------- 8.3 Feature (561:2200) */

.nr-card--feature {
	display: flex;
	flex-direction: column;
	height: 100%;
	padding: 0;
	background: var( --nr-surface );
}

.nr-card--feature .nr-card__media {
	position: relative;
	flex: 1;
	width: 100%;
	max-width: none;
	min-height: 380px;
	aspect-ratio: auto;
	overflow: hidden;
	background: var( --nr-card-image-bg );
}

.nr-card--feature .nr-card__image {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
	object-fit: cover;
}

.nr-badge--discount {
	position: absolute;
	top: 16px;
	left: 16px;
	z-index: 3;
	padding: 6px 12px;
	background: var( --nr-ink );
	color: #fff;
	font-size: 12px;
	font-weight: 700;
	letter-spacing: 0.96px;
	text-transform: uppercase;
}

.nr-card--feature .nr-card__tools {
	top: 12px;
	right: 12px;
	opacity: 1;
	transform: none;
}

.nr-card--feature .nr-card__body {
	display: flex;
	flex-direction: column;
	gap: 8px;
	padding: 16px 12px;
}

.nr-card--feature .nr-card__metatop {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 10px;
}

.nr-card--feature .nr-card__eyebrow {
	color: #6e6860;
	font-size: 12px;
	font-weight: 600;
	letter-spacing: 1.2px;
	text-transform: uppercase;
}

.nr-card--feature .nr-card__rating {
	display: inline-flex;
	align-items: center;
	gap: 4px;
}

.nr-card--feature .nr-card__reviews {
	color: var( --nr-ink );
	font-size: 13px;
	font-weight: 500;
}

.nr-card--feature .nr-card__title {
	margin: 0;
	overflow: hidden;
	color: var( --nr-ink );
	font-size: clamp( 18px, 1.8vw, 22px );
	font-weight: 500;
	line-height: 1.2;
	text-overflow: ellipsis;
	text-transform: none;
	white-space: nowrap;
}

.nr-card--feature .nr-card__price,
.nr-card--feature .nr-card__price .price {
	display: flex;
	align-items: baseline;
	gap: 12px;
	color: var( --nr-ink );
	font-size: clamp( 20px, 2vw, 24px );
	font-weight: 500;
}

.nr-card--feature .nr-card__price del,
.nr-card--feature .nr-card__price del .amount {
	color: #a39d95;
	font-size: 16px;
	font-weight: 400;
	text-decoration: line-through;
}

.nr-card--feature .nr-card__price ins {
	text-decoration: none;
}

.nr-card--feature .nr-button--cart {
	position: static;
	display: flex;
	width: 100%;
	height: 48px;
	margin-top: 4px;
	border-radius: 0;
	background: var( --nr-ink );
	color: #fff;
	font-size: 16px;
	font-weight: 600;
	letter-spacing: 0.32px;
	opacity: 1;
	transform: none;
	text-transform: uppercase;
}

.nr-card--feature .nr-button--cart:hover {
	background: var( --nr-primary );
	transform: none;
}

/* ============================================== 9. Breakpoints */

@media ( max-width: 1024px ) {
	.nr-categories__row {
		grid-template-columns: repeat( 3, minmax( 0, 1fr ) );
	}

	.nr-categories__feature {
		grid-template-columns: minmax( 0, 1fr );
		gap: 32px;
	}

	.nr-collage__grid {
		grid-template-columns: 1fr 1fr;
	}

	.nr-collage__col--wide {
		grid-column: 1 / -1;
		aspect-ratio: 16 / 11;
	}

	.nr-insta__grid {
		grid-template-columns: repeat( 2, minmax( 0, 1fr ) );
	}

	.nr-explore__rail {
		grid-auto-columns: minmax( 190px, calc( ( 100% - 3 * 16px ) / 3.5 ) );
	}

	.nr-newsband__inner {
		flex-direction: column;
		align-items: flex-start;
		gap: 24px;
	}
}

@media ( max-width: 782px ) {
	.nr-categories {
		padding-block: 40px;
	}

	.nr-categories__row {
		grid-template-columns: repeat( 2, minmax( 0, 1fr ) );
		gap: 12px;
		margin-bottom: 40px;
	}

	.nr-categories__frame {
		width: 120px;
	}

	.nr-categories__name {
		font-size: 13px;
		letter-spacing: 0.6px;
	}

	.nr-promo-panel {
		aspect-ratio: 4 / 5;
		padding: 16px;
	}

	.nr-promo-panel__body {
		gap: 16px;
	}

	.nr-collage__grid {
		grid-template-columns: 1fr;
	}

	.nr-collage__col,
	.nr-collage__col--wide {
		aspect-ratio: 3 / 4;
	}

	.nr-collage__col--wide {
		gap: 24px;
		padding: 40px 20px;
	}

	.nr-collage__panel {
		gap: 20px;
	}

	.nr-collage__cta {
		height: 56px;
		font-size: 15px;
	}

	.nr-explore__rail {
		grid-auto-columns: minmax( 160px, 44vw );
		gap: 12px;
	}

	.nr-insta__grid {
		grid-template-columns: repeat( 2, minmax( 0, 1fr ) );
		gap: 12px;
	}

	.nr-instapost {
		border-radius: 16px;
	}

	.nr-instapost__tag {
		left: 8px;
		right: 8px;
		bottom: 8px;
		gap: 8px;
	}

	.nr-instapost__tag-image {
		width: 40px;
		height: 40px;
	}

	.nr-instapost__tag-name,
	.nr-instapost__tag-row {
		font-size: 12px;
	}

	.nr-newsband__form {
		width: 100%;
		flex-direction: column;
	}

	.nr-newsband__form input[type="email"],
	.nr-newsband__submit {
		width: 100%;
	}

	.nr-card--trending .nr-card__pricerow {
		gap: 6px;
	}

	.nr-card--trending .nr-stars svg {
		width: 14px;
		height: 14px;
	}
}

@media ( max-width: 480px ) {
	.nr-insta__grid {
		grid-template-columns: minmax( 0, 1fr );
	}
}

/* ------------------------------------------------------- 10. Price order */

/* WooCommerce prints the struck-through price before the current one. Every
   card in the design leads with the price the shopper actually pays, so the
   two are reordered visually rather than by rebuilding the price markup. */
.nr-card__price ins,
.nr-card__price .woocommerce-Price-amount:not( del .woocommerce-Price-amount ) {
	order: 1;
}

.nr-card__price del {
	order: 2;
}
