/*
 * Homepage, following the approved design (Qilaada Homepage.pdf): campaign
 * hero, "Designed to express", "New arrivals", "Defiant", the Timeless /
 * Elegant / Radiant / Bold strip, four category tiles, "Shop the look" and
 * "Top favorite picks for you".
 *
 * Measurements in comments are the design at 1440px (page 1, desktop) and
 * 390px (page 2, phone) wide. Tablets sit between the two.
 */

.site-main--home {
	padding: 0;
	overflow-x: clip; /* Rows that run to the window edge never widen the page. */
}

/* 20px side margins on phones, as in the design (48px from 1024px). */
@media (max-width: 639.98px) {
	.site-main--home {
		--qilaada-gutter: 1.25rem;
	}
}

/* Section titles: 18px phones, 24px desktop, capitals spaced 0.1em. */
.site-main--home .section-title {
	margin: 0 0 1.375rem;
	font-family: var(--qilaada-font-body);
	font-size: 1.125rem;
	font-weight: 400;
	letter-spacing: 0.1em;
	line-height: 1;
	text-transform: uppercase;
}

@media (min-width: 1024px) {
	.site-main--home .section-title {
		margin-bottom: 1.75rem;
		font-size: 1.5rem;
	}
}

/* Buttons: 44px black bars, 11px capitals spaced 0.12em; full width on phones. */
.site-main--home .home-arrivals__more .button,
.site-main--home .home-defiant__cta {
	min-height: 2.75rem;
	padding: 0 2.25rem;
	border-color: #111;
	border-radius: 0;
	background: #111;
	color: var(--qilaada-color-white);
	font-family: var(--qilaada-font-body);
	font-size: 0.6875rem;
	font-weight: 500;
	letter-spacing: 0.12em;
	text-transform: uppercase;
}

.site-main--home .home-arrivals__more .button:hover,
.site-main--home .home-defiant__cta:hover {
	border-color: var(--qilaada-color-ink);
	background: var(--qilaada-color-white);
	color: var(--qilaada-color-ink);
}

/* ------------------------------------------------------------------
 * Hero: full-bleed photograph, 2:1 from 1024px (1440x720), 3:2 on tablets,
 * 390x480 on phones.
 * ---------------------------------------------------------------- */

.home-hero--campaign {
	position: relative;
	overflow: hidden;
	background: var(--qilaada-color-tile);
}

.home-hero__picture {
	display: block;
}

.home-hero--campaign .home-hero__image {
	width: 100%;
	aspect-ratio: 390 / 480;
	object-fit: cover;
}

@media (min-width: 640px) {
	.home-hero--campaign .home-hero__image {
		aspect-ratio: 3 / 2;
	}
}

@media (min-width: 1024px) {
	.home-hero--campaign .home-hero__image {
		aspect-ratio: 2 / 1;
	}
}

.home-hero__overlay {
	position: absolute;
	inset-inline-end: var(--qilaada-gutter);
	bottom: var(--qilaada-space-12);
	inset-inline-start: var(--qilaada-gutter);
	display: grid;
	justify-items: start;
	gap: var(--qilaada-space-4);
	color: var(--qilaada-color-white);
}

.home-hero__overlay .home-hero__title {
	color: inherit;
}

/* Placeholders keep each image area's proportions until photographs exist. */
.home-hero--campaign .media-placeholder {
	background: linear-gradient(135deg, #efe9e1, #ddd3c6);
}

.category-tile .media-placeholder,
.mega-promo .media-placeholder {
	height: 100%;
}

/* ------------------------------------------------------------------
 * "Designed to express": heading centred in the left half, text in the
 * right half starting 16px past the middle (21px / 14.5px type, 218px tall
 * band at 1440px); centred and stacked on phones (18px / 14.5px).
 * ---------------------------------------------------------------- */

.home-intro {
	padding: 2.5rem 0 4.25rem;
	text-align: center;
}

.site-main--home .home-intro__title {
	margin: 0 0 1.125rem;
	font-size: 1.125rem;
	letter-spacing: 0.12em;
	line-height: 1.2;
}

.home-intro__text {
	max-width: 36.875rem;
	margin: 0 auto;
	color: #111;
	font-size: 0.875rem;
	line-height: 1.375rem;
}

.home-intro .text-link {
	display: inline-block;
	margin-top: var(--qilaada-space-4);
}

@media (min-width: 768px) {
	.home-intro {
		display: flex;
		align-items: center;
		min-height: 13.625rem;
		padding: 2rem 0;
		text-align: start;
	}

	.home-intro .container {
		max-width: none;
		padding: 0;
	}

	.home-intro__inner {
		display: grid;
		grid-template-columns: 1fr 1fr;
		align-items: center;
		width: 100%;
	}

	.site-main--home .home-intro__title {
		margin: 0;
		padding-inline: var(--qilaada-gutter);
		text-align: center;
	}

	.home-intro__body {
		padding-inline: 1rem var(--qilaada-gutter);
	}

	.home-intro__text {
		margin: 0;
		font-size: 0.90625rem;
		line-height: 1.3125rem;
	}
}

@media (min-width: 1024px) {
	.site-main--home .home-intro__title {
		font-size: 1.3125rem;
	}
}

/* ------------------------------------------------------------------
 * Product rows, "New arrivals" and "Top favorite picks for you": 2:3 cards
 * (324x486 at 1440px, 16px apart; 169x254 two by two on phones, 12px
 * apart), the name (12px capitals) 14px below the image and the price
 * (11px) 6px below it; "View all" centred 32px below (full width on phones).
 * ---------------------------------------------------------------- */

.site-main--home .home-arrivals {
	margin: 0;
	padding-block: 2.5rem;
}

.home-arrivals ul.products {
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: 1.25rem 0.75rem;
}

@media (min-width: 768px) {
	.home-arrivals ul.products {
		grid-template-columns: repeat(4, minmax(0, 1fr));
		gap: 1rem;
	}
}

.home-arrivals .product-card {
	text-align: start;
}

.home-arrivals .product-card--skeleton .product-card__media,
.home-arrivals .product-card--skeleton .media-placeholder {
	background: var(--qilaada-color-placeholder-soft);
}

.home-arrivals .product-card__body {
	justify-content: flex-start;
	gap: 0.375rem;
	padding: 0.875rem 0 0;
}

.home-arrivals .product-card__title {
	min-height: 0.875rem;
	font-family: var(--qilaada-font-body);
	font-size: 0.75rem;
	letter-spacing: 0.02em;
	line-height: 0.875rem;
}

.home-arrivals .product-card__price {
	min-height: 0.8125rem;
	color: #666;
	font-family: var(--qilaada-font-body);
	font-size: 0.6875rem;
	letter-spacing: 0;
	line-height: 0.8125rem;
}

/* Empty slots: the name and price lines are shaded bars of their usual length. */
.home-arrivals .product-card--skeleton .product-card__title:empty::before,
.home-arrivals .product-card--skeleton .product-card__price:empty::before {
	width: 9em;
	height: 0.875em;
	background: var(--qilaada-color-placeholder-soft);
}

.home-arrivals .product-card--skeleton .product-card__price:empty::before {
	width: 5em;
}

/* The design's outline heart, top right of every card: decorative on the
   empty slots, the working wishlist button on real products. */
.home-arrivals .product-card__heart {
	position: absolute;
	top: 0.625rem;
	inset-inline-end: 0.625rem;
	z-index: 2;
	display: flex;
	color: var(--qilaada-color-ink);
	pointer-events: none;
}

.home-arrivals .product-card__heart .icon {
	width: 1rem;
	height: 1rem;
	stroke-width: 1.6;
}

.home-arrivals .product-card__wishlist {
	top: 0;
	inset-inline-end: 0;
}

@media (min-width: 768px) {
	.home-arrivals .product-card__heart {
		top: 1rem;
		inset-inline-end: 1rem;
	}

	.home-arrivals .product-card__heart .icon {
		width: 1.375rem;
		height: 1.375rem;
	}

	/* A 44px target whose 22px icon sits 16px from the corner, like the design. */
	.home-arrivals .product-card__wishlist {
		top: 0.3125rem;
		inset-inline-end: 0.3125rem;
	}
}

.home-arrivals__more {
	display: flex;
	justify-content: center;
	margin: 1.75rem 0 0;
}

.site-main--home .home-arrivals__more .button {
	width: 100%;
}

@media (min-width: 640px) {
	.home-arrivals__more {
		margin-top: 2rem;
	}

	.site-main--home .home-arrivals__more .button {
		width: auto;
	}
}

/* ------------------------------------------------------------------
 * "Defiant": portrait photograph left (722x634 at 1440px), 2px from a warm
 * beige panel with a 46px spaced capital heading, one line of copy and a
 * button. Phones: the photograph (390x420) above the panel.
 * ---------------------------------------------------------------- */

.home-defiant {
	display: grid;
	gap: 2px;
}

.home-defiant__image {
	display: block;
	width: 100%;
	height: 100%;
}

.home-defiant__image {
	aspect-ratio: 390 / 420;
	object-fit: cover;
}

.home-defiant__panel {
	display: flex;
	flex-direction: column;
	justify-content: center;
	align-items: stretch;
	gap: 0.875rem;
	padding: 2.375rem 1.5rem 5.375rem;
	background: #f5f1ea; /* [ref] approved design, Defiant panel */
}

.home-defiant__title {
	margin: 0;
	font-family: var(--qilaada-font-body);
	font-size: 2rem;
	font-weight: 400;
	line-height: 1.1;
	letter-spacing: 0.14em;
	text-transform: uppercase;
}

.home-defiant__text {
	max-width: 26.875rem;
	margin: 0;
	color: #3d3a35;
	font-size: 0.875rem;
	line-height: 1.5rem;
}

.site-main--home .home-defiant__cta {
	margin-top: 0.75rem;
	padding-inline: 1.75rem;
}

@media (min-width: 768px) {
	.home-defiant {
		grid-template-columns: 722fr 716fr;
	}

	.home-defiant__image {
		aspect-ratio: 722 / 634;
	}

	/* The design's empty line above the heading lowers the content by 18px. */
	.home-defiant__panel {
		align-items: flex-start;
		gap: 1.375rem;
		padding: 2.25rem clamp(2rem, 6.7vw, 6rem) 0;
	}

	.site-main--home .home-defiant__cta {
		margin-top: 0.625rem;
	}
}

@media (min-width: 1024px) {
	.home-defiant__title {
		font-size: 2.875rem;
		line-height: 1.087;
	}

	.home-defiant__text {
		font-size: 0.9375rem;
	}
}

/* ------------------------------------------------------------------
 * Timeless / Elegant / Radiant / Bold: a 40px strip, #130909, white 13px
 * capitals spaced 0.32em in four equal columns, 48px below "Defiant"
 * (40px on phones, 10px type spaced 0.14em).
 * ---------------------------------------------------------------- */

.home-values {
	display: grid;
	grid-template-columns: repeat(4, minmax(0, 1fr));
	align-items: center;
	height: 2.5rem;
	margin: 2.5rem 0 0;
	padding: 0;
	background: #130909; /* [ref] approved design */
	color: var(--qilaada-color-white);
	font-family: var(--qilaada-font-body);
	font-size: 0.625rem;
	font-weight: 400;
	letter-spacing: 0.14em;
	list-style: none;
	text-align: center;
	text-transform: uppercase;
}

@media (min-width: 640px) {
	.home-values {
		margin-top: 3rem;
		font-size: 0.8125rem;
		letter-spacing: 0.32em;
	}
}

/* ------------------------------------------------------------------
 * Category tiles: Necklaces, Bracelets, Rings, Watches. Four across at
 * 1440px (308x461, 38px apart, 36px below the strip), the underlined 11px
 * label 18px below each; two by two on phones (167x239, 16px apart).
 * ---------------------------------------------------------------- */

.home-categories {
	padding: 1.875rem var(--qilaada-gutter) 0;
}

.category-grid {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: 1.5rem 1rem;
	max-width: calc(var(--qilaada-container-page) - 2 * var(--qilaada-gutter));
	margin: 0 auto;
	padding: 0;
	list-style: none;
}

@media (min-width: 640px) {
	.home-categories {
		padding-bottom: 2rem;
	}
}

@media (min-width: 768px) {
	.category-grid {
		grid-template-columns: repeat(4, minmax(0, 1fr));
		gap: 1.5rem;
	}
}

@media (min-width: 1024px) {
	.home-categories {
		padding-top: 2.25rem;
	}

	.category-grid {
		column-gap: 2.375rem;
	}
}

.category-tile {
	display: grid;
	gap: 0.75rem;
	justify-items: center;
	color: var(--qilaada-color-ink);
	text-decoration: none;
}

.category-tile__media {
	display: block;
	width: 100%;
	overflow: hidden;
	aspect-ratio: 167 / 239;
	background: var(--qilaada-color-tile);
}

.category-tile .media-placeholder {
	background: var(--qilaada-color-placeholder-soft);
}

@media (min-width: 768px) {
	.category-tile {
		gap: 1.125rem;
	}

	.category-tile__media {
		aspect-ratio: 2 / 3;
	}
}

.category-tile__image {
	width: 100%;
	height: 100%;
	object-fit: contain;
	mix-blend-mode: multiply;
	transition: transform 0.6s var(--qilaada-ease);
}

a.category-tile:hover .category-tile__image {
	transform: scale(1.05);
}

.category-tile__label {
	border-bottom: 1px solid currentColor;
	font-family: var(--qilaada-font-body);
	font-size: 0.6875rem;
	letter-spacing: 0.03em;
	line-height: 0.875rem;
	text-transform: uppercase;
}

/* ------------------------------------------------------------------
 * Shop the look: the three approved photographs (left, middle, right),
 * 2px apart across the page with 12px margins (470x501 at 1440px), the
 * heading above at the same 12px; on phones a swipeable row of 300x321
 * images 10px apart, starting at the screen edge.
 * ---------------------------------------------------------------- */

.site-main--home .home-looks {
	margin: 0;
	padding: 3rem 0 2.5rem;
}

.home-looks .container {
	max-width: none;
	padding: 0;
}

.home-looks .section-title {
	padding-inline: var(--qilaada-gutter);
}

.look-grid {
	display: grid;
	grid-auto-columns: 76.92%;
	grid-auto-flow: column;
	gap: 0.625rem;
	margin: 0;
	padding: 0;
	overflow-x: auto;
	list-style: none;
	scroll-snap-type: x mandatory;
	scrollbar-width: none;
}

.look-grid::-webkit-scrollbar {
	display: none;
}

.look-grid > li {
	scroll-snap-align: start;
}

@media (min-width: 640px) {
	.site-main--home .home-looks {
		padding: 1.0625rem 0.75rem 0;
	}

	.site-main--home .home-looks .section-title {
		margin-bottom: 1.875rem;
		padding-inline: 0;
	}

	.look-grid {
		grid-auto-flow: row;
		grid-template-columns: repeat(3, minmax(0, 1fr));
		gap: 2px;
		overflow: visible;
	}
}

.look-tile {
	position: relative; /* Keeps its screen-reader text inside the swipe row (otherwise it widens the page on phones). */
	display: block;
	width: 100%;
	padding: 0;
	overflow: hidden;
	border: 0;
	border-radius: 0;
	background: none;
	color: inherit;
	font: inherit;
	text-align: inherit;
	text-decoration: none;
}

.look-tile__image {
	display: block;
	width: 100%;
	aspect-ratio: 300 / 321;
	object-fit: cover;
	background: var(--qilaada-color-tile);
	transition: transform 0.8s var(--qilaada-ease);
}

@media (min-width: 640px) {
	.look-tile__image {
		aspect-ratio: 470 / 501;
	}
}

/* An empty slot uses the same shade as the other image placeholders. */
.look-tile .media-placeholder {
	background: var(--qilaada-color-placeholder);
}

.look-tile:hover .look-tile__image {
	transform: scale(1.03);
}

/* ------------------------------------------------------------------
 * Store cards of the "Find us" information view (local design preview):
 * label above each image (330x307), four across on desktop, a swipeable
 * row on phones.
 * ---------------------------------------------------------------- */

.places-row {
	display: grid;
	grid-auto-columns: 77%;
	grid-auto-flow: column;
	gap: 0.5rem;
	margin: 0 calc(-1 * var(--qilaada-gutter)) 0 0;
	padding: 0;
	overflow-x: auto;
	list-style: none;
	scroll-snap-type: x mandatory;
	scrollbar-width: none;
}

.place {
	scroll-snap-align: start;
}

@media (min-width: 1024px) {
	.places-row {
		grid-auto-flow: row;
		grid-template-columns: repeat(4, minmax(0, 1fr));
		margin-inline-end: 0;
		overflow: visible;
	}
}

.place__link {
	display: grid;
	gap: 0.5rem;
	text-decoration: none;
}

.place__label {
	font-size: var(--qilaada-text-sm);
	letter-spacing: 0.06em;
	line-height: 1.4;
	text-transform: uppercase;
}

@media (min-width: 1024px) {
	.place__label {
		font-size: var(--qilaada-text-lg);
	}
}

.place__image {
	width: 100%;
	aspect-ratio: 330 / 307;
	object-fit: cover;
	background: var(--qilaada-color-tile);
}

.places-row::-webkit-scrollbar {
	display: none;
}

/* ------------------------------------------------------------------
 * The three "Discover the look" panels (the wishlist drawer's styles are in
 * drawers.css). Products are listed one per row; the look's image stays on
 * the homepage only.
 * ---------------------------------------------------------------- */

.look-tile {
	cursor: pointer;
}

/* Phones: a "Discover the look" panel covers the screen and rises from the
   bottom (the right-hand panel stays from 640px). */
@media (max-width: 639.98px) {
	.look-drawer.drawer--right {
		inset: 0;
		width: 100%;
		height: 100dvh;
		transform: translateY(100%);
	}

	.look-drawer.drawer--right[open] {
		transform: none;
	}

	@starting-style {
		.look-drawer.drawer--right[open] {
			transform: translateY(100%);
		}
	}
}

.look-drawer .drawer__body {
	padding-top: var(--qilaada-space-6);
}

/* One product per row: the photo on the left (heart on its corner), title,
   price and badges beside it; rows divided by a hairline. */
.look-drawer ul.products {
	--look-thumb: 7.5rem;

	grid-template-columns: minmax(0, 1fr);
	gap: 0;
	margin: 0;
}

.look-drawer .product-card {
	display: grid;
	grid-template-columns: var(--look-thumb) minmax(0, 1fr);
	grid-template-rows: auto 1fr;
	align-items: start;
	column-gap: var(--qilaada-space-4);
	padding-block: var(--qilaada-space-4);
	border-bottom: 1px solid var(--qilaada-color-gray-20);
	text-align: start;
}

.look-drawer .product-card:first-child {
	padding-top: 0;
}

.look-drawer .product-card__media {
	grid-column: 1;
	grid-row: 1 / span 2;
}

.look-drawer .product-card__body {
	grid-column: 2;
	grid-row: 1;
	min-width: 0;
	padding-top: 0;
	overflow-wrap: anywhere;
}

.look-drawer .product-card__wishlist {
	inset-inline-start: calc(var(--look-thumb) - 2.75rem);
	inset-inline-end: auto;
	top: var(--qilaada-space-4);
}

.look-drawer .product-card:first-child .product-card__wishlist {
	top: 0;
}

.look-drawer .product-card__actions {
	grid-column: 2;
	grid-row: 2;
	justify-self: start;
	margin-top: var(--qilaada-space-3);
}

.look-drawer__empty {
	padding: var(--qilaada-space-4) 0;
	text-align: center;
}

.look-drawer__more {
	width: 100%;
}

.look-drawer__empty .empty-state__title {
	font-size: var(--qilaada-text-base);
}
