/* Homepage rhythm: Journal is the visual reference for width, spacing and
 * card density. Everything here is scoped to the homepage only. */
body.home {
	--thukura-home-shell: min(1376px, calc(100% - 9.5%));
}

body.home .thukura-service-strip,
body.home .thukura-collection-section,
body.home .thukura-section.thukura-product-section,
body.home .thukura-routine-builder,
body.home .thukura-editorial-section {
	width: var(--thukura-home-shell);
	margin-inline: auto;
}

body.home .thukura-home-resources .thukura-shell,
body.home .thukura-category-showcase > .thukura-shell,
body.home .thukura-concierge-inner,
body.home .thukura-brand-wrap,
body.home .thukura-cta-inner {
	width: var(--thukura-home-shell);
}

body.home .thukura-category-showcase > .thukura-shell {
  margin-inline: auto;
}

body.home .thukura-product-photo { height: 230px; }
body.home .thukura-category-showcase { padding-block: 2.5rem; }
body.home .thukura-category-showcase__department { padding: 1rem; }
body.home .thukura-category-showcase__photo { aspect-ratio: 1.32; }
body.home .thukura-home-resources { padding-block: 3rem; }
body.home .thukura-home-resource-card,
body.home .thukura-home-resource-card__preview { min-height: 220px; }
body.home .thukura-routine-builder { padding-block: 56px 64px; }
body.home .thukura-routine-heading { margin-bottom: 28px; }
body.home .thukura-routine-heading h2 { font-size: clamp(32px, 3.5vw, 48px); }
body.home .thukura-routine-card { min-height: 240px; padding: 20px 18px 22px; }
body.home .thukura-routine-icon { margin: 22px 0 12px; font-size: 34px; }
body.home .thukura-routine-card strong { font-size: 22px; }
body.home .thukura-concierge-inner { padding-block: 64px 70px; }

@media (max-width: 900px) {
	body.home { --thukura-home-shell: calc(100% - 48px); }
}

@media (max-width: 700px) {
	body.home { --thukura-home-shell: calc(100% - 32px); }
	body.home .thukura-product-photo { height: 190px; }
	body.home .thukura-category-showcase { padding-block: 2rem; }
	body.home .thukura-category-showcase__photo { aspect-ratio: 1.2; }
	body.home .thukura-home-resources { padding-block: 2.5rem; }
	body.home .thukura-home-resource-card,
	body.home .thukura-home-resource-card__preview { min-height: 200px; }
	body.home .thukura-routine-builder { padding-block: 48px 56px; }
	body.home .thukura-routine-card { min-height: 230px; }
	body.home .thukura-concierge-inner { padding-block: 52px 60px; }
}

/* Give each homepage card its own shrinkable content and footer rows.
 * The shared badge's max-content/nowrap sizing must not dictate card width. */
body.home .thukura-product-grid,
body.home .thukura-category-showcase__grid {
	align-items: stretch;
}

body.home .thukura-product-card > *,
body.home .thukura-category-showcase__card > * {
	min-width: 0;
	max-width: 100%;
	box-sizing: border-box;
}

body.home .thukura-product-brand,
body.home .thukura-category-showcase__brand {
	min-height: 2.6em;
	line-height: 1.3;
	overflow-wrap: anywhere;
}

body.home .thukura-product-name,
body.home .thukura-category-showcase__card h3 {
	line-height: 1.45;
	overflow-wrap: anywhere;
}

body.home .thukura-product-bottom,
body.home .thukura-category-showcase__bottom {
	display: grid;
	grid-template-columns: minmax(0, 1fr);
	grid-template-rows: minmax(2.8em, auto) minmax(36px, auto);
	grid-auto-rows: auto;
	align-items: start;
	justify-content: stretch;
	gap: .35rem;
	width: 100%;
	min-width: 0;
}

body.home .thukura-product-bottom .thukura-product-price,
body.home .thukura-category-showcase__price {
	display: flex;
	flex-wrap: wrap;
	align-content: start;
	align-items: baseline;
	gap: .2em .3em;
	grid-column: 1;
	grid-row: 1;
	min-width: 0;
	max-width: 100%;
	line-height: 1.3;
	white-space: normal;
	overflow-wrap: anywhere;
}

body.home .thukura-product-price .amount,
body.home .thukura-category-showcase__price .amount {
	max-width: 100%;
	white-space: nowrap;
}

body.home .thukura-product-price del,
body.home .thukura-product-price ins,
body.home .thukura-category-showcase__price del,
body.home .thukura-category-showcase__price ins {
	display: block;
	flex-basis: 100%;
	min-width: 0;
	max-width: 100%;
}

body.home .thukura-product-availability {
	grid-column: 1;
	grid-row: 2;
	justify-self: start;
	width: auto;
	min-width: 0;
	max-width: 100%;
	min-height: 30px;
	margin-left: 0;
	box-sizing: border-box;
	line-height: 1.3;
	white-space: normal;
}

body.home .thukura-product-availability > span {
	min-width: 0;
	white-space: normal;
	overflow-wrap: anywhere;
}

body.home .thukura-product-bottom .thukura-product-view {
	grid-column: 1;
	grid-row: 3;
	justify-self: start;
	max-width: 100%;
	min-height: 36px;
	display: inline-flex;
	align-items: center;
	line-height: 1.3;
	white-space: normal;
	overflow-wrap: anywhere;
	box-sizing: border-box;
}

body.home .thukura-product-photo,
body.home .thukura-category-showcase__photo {
	position: relative;
	flex: 0 0 auto;
}

body.home .thukura-product-photo > a,
body.home .thukura-category-showcase__photo > a {
	position: absolute;
	inset: 0;
	display: flex;
	align-items: center;
	justify-content: center;
	width: 100%;
	height: 100%;
}

body.home .thukura-product-photo img,
body.home .thukura-category-showcase__photo img {
	display: block;
	width: 84%;
	height: 84%;
	object-fit: contain;
}

@media (max-width: 700px) {
	/* Let the header's logo column shrink at 320px instead of stretching
	 * the search row beyond the viewport. Keep all storefront controls. */
	body.home .thukura-header-main {
		grid-template-columns: 40px minmax(0, 1fr) auto;
	}
	body.home .thukura-header-main > *,
	body.home .thukura-brand,
	body.home .thukura-brand .custom-logo-link,
	body.home .thukura-brand .custom-logo {
		min-width: 0;
		max-width: 100%;
	}
	body.home .thukura-product-grid,
	body.home .thukura-category-showcase__grid {
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}
	body.home .thukura-product-photo,
	body.home .thukura-category-showcase__photo {
		height: auto;
		aspect-ratio: 1 / 1;
	}
	body.home .thukura-product-name { font-size: 14px; }
	body.home .thukura-product-availability { font-size: .68rem; }
}
