/* ==========================================================================
   Homepage sections.
   ========================================================================== */

.section--tight {
	padding-block: var(--sp-8);
}

.section-cta {
	display: flex;
	justify-content: center;
	margin-top: var(--sp-7);
}

/* ---- 1. Hero ----------------------------------------------------------- */
.hero {
	position: relative;
	display: grid;
	min-height: clamp(520px, 78vh, 760px);
	overflow: hidden;
	background: var(--black-900);
	isolation: isolate;
}

.hero__slide {
	grid-area: 1 / 1;
	position: relative;
	display: flex;
	align-items: center;
	opacity: 0;
	visibility: hidden;
	transition: opacity 900ms var(--ease), visibility 0s linear 900ms;
}

.hero__slide.is-active {
	opacity: 1;
	visibility: visible;
	transition: opacity 900ms var(--ease), visibility 0s;
	z-index: 1;
}

.hero__bg {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
	object-fit: cover;
	transform: scale(1.08);
	transition: transform 7s linear;
	filter: saturate(0.85) contrast(1.05);
}

.hero__slide.is-active .hero__bg {
	transform: scale(1);
}

@media (max-width: 767px) {
	.hero__bg {
		object-position: 60% 70%;
		transform-origin: 50% 85%;
		transform: scale(1.9);
	}
	.hero__slide.is-active .hero__bg {
		transform: scale(1.75);
	}
	.hero__shade,
	[dir="ltr"] .hero__shade,
	html:not([dir="rtl"]) .hero__shade {
		background: linear-gradient(0deg, var(--black-900) 0%, rgba(5, 5, 5, 0.82) 45%, rgba(5, 5, 5, 0.45) 100%);
	}
}

.hero__shade {
	position: absolute;
	inset: 0;
	background:
		linear-gradient(90deg, rgba(5, 5, 5, 0.25) 0%, rgba(5, 5, 5, 0.75) 45%, rgba(5, 5, 5, 0.96) 75%),
		linear-gradient(0deg, var(--black-900) 0%, transparent 35%);
}

[dir="ltr"] .hero__shade,
html:not([dir="rtl"]) .hero__shade {
	background:
		linear-gradient(270deg, rgba(5, 5, 5, 0.25) 0%, rgba(5, 5, 5, 0.75) 45%, rgba(5, 5, 5, 0.96) 75%),
		linear-gradient(0deg, var(--black-900) 0%, transparent 35%);
}

/* Gold light streaks */
.hero__streaks span {
	position: absolute;
	height: 1px;
	width: 55%;
	inset-inline-end: -10%;
	background: linear-gradient(90deg, transparent, rgba(248, 224, 142, 0.9), transparent);
	box-shadow: 0 0 18px rgba(var(--gold-rgb), 0.6);
	transform: rotate(-18deg);
	opacity: 0.55;
	animation: mst-streak 6s var(--ease) infinite;
}

.hero__streaks span:nth-child(1) { top: 28%; }
.hero__streaks span:nth-child(2) { top: 52%; width: 40%; animation-delay: 1.6s; opacity: 0.35; }
.hero__streaks span:nth-child(3) { top: 74%; width: 30%; animation-delay: 3.2s; opacity: 0.3; }

@keyframes mst-streak {
	0% { transform: translateX(40%) rotate(-18deg); opacity: 0; }
	30% { opacity: 0.6; }
	100% { transform: translateX(-60%) rotate(-18deg); opacity: 0; }
}

[dir="rtl"] .hero__streaks span {
	animation-name: mst-streak-rtl;
}

@keyframes mst-streak-rtl {
	0% { transform: translateX(-40%) rotate(18deg); opacity: 0; }
	30% { opacity: 0.6; }
	100% { transform: translateX(60%) rotate(18deg); opacity: 0; }
}

.hero__content {
	position: relative;
	z-index: 2;
	padding-block: var(--sp-10) var(--sp-12);
}

.hero__content > * {
	max-width: 620px;
}

.hero__slide.is-active .hero__content > * {
	animation: mst-hero-in 800ms var(--ease-out) both;
}

.hero__slide.is-active .hero__content > :nth-child(2) { animation-delay: 120ms; }
.hero__slide.is-active .hero__content > :nth-child(3) { animation-delay: 220ms; }
.hero__slide.is-active .hero__content > :nth-child(4) { animation-delay: 320ms; }

@keyframes mst-hero-in {
	from { opacity: 0; transform: translateY(24px); }
	to { opacity: 1; transform: none; }
}

.hero__title {
	margin: 0 0 var(--sp-4);
	font-family: var(--font-head);
	font-size: var(--fs-display);
	font-weight: var(--fw-black);
	line-height: 1.15;
	text-wrap: balance;
	text-shadow: 0 4px 30px rgba(0, 0, 0, 0.6);
}

.hero__title em {
	display: block;
	font-style: normal;
	background: linear-gradient(180deg, #fff3c4 0%, #f2c94c 55%, #d4a62a 100%);
	-webkit-background-clip: text;
	background-clip: text;
	-webkit-text-fill-color: transparent;
	text-shadow: none;
}

.hero__text {
	margin-bottom: var(--sp-6);
	font-size: var(--fs-lg);
	color: #d0d0d0;
	max-width: 52ch;
}

.hero__ctas .btn {
	flex: 1 1 auto;
}

@media (min-width: 600px) {
	.hero__ctas .btn {
		flex: 0 0 auto;
	}
}

.hero__controls {
	position: absolute;
	inset-inline: 0;
	bottom: var(--sp-6);
	z-index: 3;
}

.hero__dots {
	display: flex;
	justify-content: center;
	gap: var(--sp-2);
}

.hero__dot {
	position: relative;
	width: 34px;
	height: var(--tap);
	padding: 0;
	border: 0;
	background: none;
}

.hero__dot::before {
	content: "";
	position: absolute;
	inset-inline: 0;
	top: 50%;
	height: 4px;
	border-radius: var(--r-pill);
	background: rgba(255, 255, 255, 0.25);
	transform: translateY(-50%);
	transition: background var(--t-base);
}

.hero__dot.is-active::before {
	background: var(--gold-gradient-h);
	box-shadow: 0 0 10px rgba(var(--gold-rgb), 0.6);
}

/* Phones: shorter hero (≤70vh), text at the bottom over the photo. */
@media (max-width: 767px) {
	.hero {
		min-height: min(70vh, 560px);
		min-height: min(70svh, 560px);
	}
	.hero__content {
		align-self: flex-end;
		padding-block: var(--sp-8) var(--sp-9);
	}
	.hero__title {
		font-size: clamp(1.75rem, 1.2rem + 3vw, 2.25rem);
	}
	.hero__text {
		margin-bottom: var(--sp-4);
		font-size: var(--fs-base);
	}
	.hero__controls {
		bottom: var(--sp-3);
	}
}

/* ---- Section heads ----------------------------------------------------- */
.home-head {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: var(--sp-4);
	margin-bottom: var(--sp-5);
}

.home-head--center {
	justify-content: center;
	text-align: center;
}

.home-head__title {
	position: relative;
	margin: 0;
	padding-inline-start: var(--sp-3);
	font-size: clamp(1.375rem, 1.1rem + 1vw, 2rem);
	line-height: 1.25;
}

.home-head__title::before {
	content: "";
	position: absolute;
	inset-inline-start: 0;
	top: 12%;
	bottom: 12%;
	width: 4px;
	border-radius: var(--r-pill);
	background: var(--gold-gradient);
}

.home-head--center .home-head__title {
	padding-inline-start: 0;
}

.home-head--center .home-head__title::before {
	display: none;
}

.home-head__end {
	display: flex;
	align-items: center;
	gap: var(--sp-4);
}

@media (max-width: 767px) {
	.home-head__end .carousel-nav {
		display: none;
	}
}

.home .section {
	padding-block: var(--sp-8);
}

@media (min-width: 1024px) {
	.home .section {
		padding-block: var(--sp-9);
	}
}

/* ---- 2. Categories: round images, swipe on phones, one row on desktop --- */
.home-cats {
	padding-block: var(--sp-7) var(--sp-5) !important;
}

.cat-rail {
	display: grid;
	grid-auto-flow: column;
	grid-auto-columns: calc((100% - var(--sp-4) * 2) / 2.6); /* 2.5 visible: hints there is more */
	gap: var(--sp-4);
	margin: 0 calc(var(--gutter) * -1);
	padding: var(--sp-1) var(--gutter) var(--sp-2);
	list-style: none;
	overflow-x: auto;
	scroll-snap-type: x mandatory;
	scroll-padding-inline: var(--gutter);
	scrollbar-width: none;
}

.cat-rail::-webkit-scrollbar {
	display: none;
}

.cat-rail > li {
	scroll-snap-align: start;
}

@media (min-width: 768px) {
	.cat-rail {
		grid-auto-flow: row;
		grid-template-columns: repeat(5, minmax(0, 1fr));
		grid-auto-columns: auto;
		gap: var(--sp-6);
		margin: 0;
		padding: var(--sp-1) 0 0;
		overflow: visible;
	}
}

.cat-round {
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: var(--sp-3);
	text-align: center;
	color: var(--text-primary);
}

.cat-round__img {
	display: grid;
	place-items: center;
	width: 100%;
	aspect-ratio: 1;
	overflow: hidden;
	border: 3px solid var(--black-600);
	border-radius: 50%;
	background: var(--well);
	color: var(--gold-500);
	box-shadow: 0 10px 30px rgba(0, 0, 0, 0.35);
	transition: border-color var(--t-base) var(--ease), transform var(--t-base) var(--ease), box-shadow var(--t-base) var(--ease);
}

.cat-round__img img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	transition: transform var(--t-slow) var(--ease);
}

.cat-round__img .mst-icon {
	width: 40%;
	height: 40%;
}

.cat-round__name {
	font-size: var(--fs-sm);
	font-weight: var(--fw-bold);
	line-height: 1.35;
}

@media (min-width: 768px) {
	.cat-round__name {
		font-size: var(--fs-lg);
	}
}

.cat-round:hover .cat-round__img,
.cat-round:focus-visible .cat-round__img {
	border-color: var(--gold-500);
	box-shadow: 0 0 0 4px rgba(var(--gold-rgb), 0.15), 0 14px 34px rgba(0, 0, 0, 0.45);
}

.cat-round:hover .cat-round__img img {
	transform: scale(1.06);
}

.cat-round:hover .cat-round__name {
	color: var(--gold-400);
}

/* ---- 3. Latest products carousel --------------------------------------- */
@media (max-width: 599px) {
	.home-latest ul.carousel__track {
		grid-auto-columns: 46%;
		gap: var(--sp-3);
	}
}

@media (min-width: 1440px) {
	.home-latest ul.carousel__track {
		grid-auto-columns: calc((100% - var(--gutter) * 2 - var(--sp-5) * 4) / 5);
	}
}

/* ---- 4. Image banner --------------------------------------------------- */
.home-promo {
	padding-block: var(--sp-2);
}

.promo-banner {
	position: relative;
	display: flex;
	align-items: center;
	min-height: 220px;
	overflow: hidden;
	border-radius: var(--r-card);
	border: 1px solid var(--line);
	background: var(--black-800);
	isolation: isolate;
	color: var(--text-primary);
}

@media (min-width: 768px) {
	.promo-banner {
		min-height: 320px;
	}
}

.promo-banner--image {
	display: block;
	min-height: 0;
}

.promo-banner__img {
	display: block;
	width: 100%;
	height: auto;
	transition: transform var(--t-slow) var(--ease);
}

.promo-banner__bg {
	position: absolute;
	inset: 0;
	z-index: -2;
	width: 100%;
	height: 100%;
	object-fit: cover;
	transition: transform 1.2s var(--ease);
}

.promo-banner:not(.promo-banner--image)::before {
	content: "";
	position: absolute;
	inset: 0;
	z-index: -1;
	background: linear-gradient(270deg, rgba(5, 5, 5, 0.95) 0%, rgba(5, 5, 5, 0.75) 45%, rgba(5, 5, 5, 0.15) 100%);
}

html:not([dir="rtl"]) .promo-banner:not(.promo-banner--image)::before {
	background: linear-gradient(90deg, rgba(5, 5, 5, 0.95) 0%, rgba(5, 5, 5, 0.75) 45%, rgba(5, 5, 5, 0.15) 100%);
}

@media (max-width: 599px) {
	.promo-banner:not(.promo-banner--image)::before,
	html:not([dir="rtl"]) .promo-banner:not(.promo-banner--image)::before {
		background: linear-gradient(0deg, rgba(5, 5, 5, 0.96) 15%, rgba(5, 5, 5, 0.55) 100%);
	}
	.promo-banner:not(.promo-banner--image) {
		align-items: flex-end;
		min-height: 300px;
	}
}

.promo-banner:hover .promo-banner__bg,
.promo-banner:hover .promo-banner__img {
	transform: scale(1.03);
}

.promo-banner__body {
	display: flex;
	flex-direction: column;
	align-items: flex-start;
	gap: var(--sp-2);
	max-width: 520px;
	padding: var(--sp-6) var(--sp-5);
}

@media (min-width: 768px) {
	.promo-banner__body {
		padding: var(--sp-8);
	}
}

.promo-banner__title {
	font-size: clamp(1.5rem, 1.1rem + 1.8vw, 2.5rem);
	font-weight: var(--fw-black);
	line-height: 1.2;
}

.promo-banner__text {
	margin-bottom: var(--sp-3);
	color: var(--text-secondary);
}

/* ---- 6. Our features --------------------------------------------------- */
.home-features {
	border-top: 1px solid var(--line);
	background: var(--black-800);
}

.features-grid {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: var(--sp-3);
	margin: 0;
	padding: 0;
	list-style: none;
}

@media (min-width: 1024px) {
	.features-grid {
		grid-template-columns: repeat(4, minmax(0, 1fr));
		gap: var(--sp-5);
	}
}

.feature-card {
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: var(--sp-2);
	padding: var(--sp-5) var(--sp-3);
	border: 1px solid var(--line);
	border-radius: var(--r-md);
	background: var(--surface-1);
	text-align: center;
}

.feature-card__icon {
	display: grid;
	place-items: center;
	width: 56px;
	height: 56px;
	margin-bottom: var(--sp-1);
	border-radius: 50%;
	background: rgba(var(--gold-rgb), 0.12);
	color: var(--gold-500);
}

.feature-card__icon .mst-icon {
	width: 28px;
	height: 28px;
}

.feature-card b {
	font-size: var(--fs-base);
}

.feature-card > span:last-child {
	font-size: var(--fs-xs);
	color: var(--text-secondary);
	line-height: 1.5;
}

@media (min-width: 768px) {
	.feature-card > span:last-child {
		font-size: var(--fs-sm);
	}
}

/* ---- Hero: finished banner image as a slide ----------------------------
   The slider takes the banner's shape: 2.5:1 on desktop, square on phones
   (phone image = the text side of the banner). Text slides fill the same box. */
.hero:has(.hero__slide--banner) {
	min-height: 0;
	aspect-ratio: var(--hero-ar, 1920 / 768);
	max-height: 78vh;
}

@media (max-width: 767px) {
	.hero:has(.hero__slide--banner) {
		aspect-ratio: var(--hero-ar-m, 5 / 4);
		max-height: none;
	}
}

.hero__slide--banner {
	align-items: stretch;
}

.hero__banner {
	position: absolute;
	inset: 0;
	display: block;
}

.hero__banner picture,
.hero__banner-img {
	display: block;
	width: 100%;
	height: 100%;
}

.hero__banner-img {
	object-fit: cover;
	object-position: center;
}


/* Text slides inside the banner-shaped slider: tighter spacing. */
.hero:has(.hero__slide--banner) .hero__content {
	padding-block: var(--sp-6) var(--sp-8);
}

/* Dots stay readable over bright banner areas. */
.hero__dots {
	width: fit-content;
	margin-inline: auto;
	padding: 0 10px;
	border-radius: var(--r-pill);
	background: rgba(0, 0, 0, 0.45);
	backdrop-filter: blur(6px);
	-webkit-backdrop-filter: blur(6px);
}

.hero__dot::before {
	background: rgba(255, 255, 255, 0.45);
}

/* Phones: text slides share the shorter banner box — compact title + button, clear of the dots. */
@media (max-width: 767px) {
	.hero:has(.hero__slide--banner) .hero__content {
		align-self: center;
		padding-block: var(--sp-4) 56px;
	}
	.hero:has(.hero__slide--banner) .hero__content .eyebrow {
		margin-bottom: var(--sp-1);
		font-size: 11px;
	}
	.hero:has(.hero__slide--banner) .hero__title {
		margin-bottom: var(--sp-3);
		font-size: clamp(1.375rem, 1rem + 2.4vw, 1.75rem);
	}
	.hero:has(.hero__slide--banner) .hero__text {
		display: none;
	}
	.hero:has(.hero__slide--banner) .hero__ctas .btn {
		--btn-h: 42px;
		flex: 0 0 auto;
		padding: 0 var(--sp-5);
		font-size: var(--fs-sm);
	}
	.hero:has(.hero__slide--banner) .hero__controls {
		bottom: 6px;
	}
}

/* ---- Our products: header with category tabs (mockup style) ------------ */
.home-products {
	background:
		radial-gradient(ellipse 60% 50% at 50% 0%, rgba(var(--gold-rgb), 0.08), transparent 70%),
		var(--black-900);
}

.prod-head {
	display: grid;
	grid-template-columns: auto minmax(0, 1fr) auto;
	grid-template-areas: "tabs center all";
	align-items: center;
	gap: var(--sp-5);
	margin-bottom: var(--sp-6);
}

.prod-head__center {
	grid-area: center;
	text-align: center;
}

.prod-head__title {
	margin: 0;
	font-size: clamp(1.75rem, 1.3rem + 1.6vw, 2.75rem);
	font-weight: var(--fw-black);
	line-height: 1.2;
}

.prod-head__sub {
	margin: var(--sp-2) 0 0;
	font-size: var(--fs-sm);
	color: var(--text-secondary);
}

.prod-tabs {
	grid-area: tabs;
	justify-self: start;
	display: flex;
	gap: 4px;
	max-width: 100%;
	padding: 5px;
	overflow-x: auto;
	border: 1px solid rgba(255, 255, 255, 0.09);
	border-radius: 14px;
	background: rgba(255, 255, 255, 0.03);
	scrollbar-width: none;
}

.prod-tabs::-webkit-scrollbar {
	display: none;
}

.prod-tabs__tab {
	display: inline-flex;
	flex-shrink: 0;
	align-items: center;
	gap: 7px;
	min-height: 44px;
	padding: 0 14px;
	border: 1px solid transparent;
	border-radius: 10px;
	background: rgba(255, 255, 255, 0.03);
	color: #d4d4d8;
	font-family: var(--font-head);
	font-size: var(--fs-sm);
	font-weight: var(--fw-bold);
	white-space: nowrap;
	transition: background var(--t-fast), color var(--t-fast), border-color var(--t-fast);
}

.prod-tabs__tab .mst-icon {
	width: 18px;
	height: 18px;
	color: #a1a1aa;
}

.prod-tabs__tab:hover {
	border-color: rgba(var(--gold-rgb), 0.35);
	color: #fff;
}

.prod-tabs__tab.is-active {
	background: linear-gradient(180deg, #f7d469 0%, #e6b53a 55%, #d4a12a 100%);
	color: #17130a;
	box-shadow: 0 6px 16px rgba(var(--gold-rgb), 0.25);
}

.prod-tabs__tab.is-active .mst-icon {
	color: #17130a;
}

.prod-head__all {
	grid-area: all;
	justify-self: end;
	display: inline-flex;
	align-items: center;
	gap: var(--sp-2);
	min-height: 46px;
	padding: 0 var(--sp-5);
	border: 1.5px solid rgba(var(--gold-rgb), 0.7);
	border-radius: 12px;
	color: var(--gold-400);
	font-weight: var(--fw-bold);
	transition: background var(--t-fast), color var(--t-fast);
}

.prod-head__all:hover {
	background: rgba(var(--gold-rgb), 0.1);
	color: var(--gold-300);
}

.prod-head__all .mst-icon {
	width: 18px;
	height: 18px;
}

/* Bigger cards here: 4 per row on laptops. */
@media (min-width: 1024px) {
	.home-products ul.products {
		grid-template-columns: repeat(4, minmax(0, 1fr));
		gap: var(--sp-5);
	}
}

.prod-empty {
	padding: var(--sp-8) 0;
	text-align: center;
	color: var(--text-secondary);
}

/* Tablets & phones: title on top, tabs scroll under it, "View all" next to the title. */
@media (max-width: 1199px) {
	.prod-head {
		grid-template-columns: 1fr;
		grid-template-areas: "center" "tabs";
		gap: var(--sp-4);
	}
	.prod-tabs {
		justify-self: stretch;
	}
	.prod-head__all {
		display: none;
	}
}

@media (max-width: 599px) {
	.prod-tabs {
		margin-inline: calc(var(--gutter) * -1);
		padding: 5px var(--gutter);
		border-radius: 0;
		border-inline: 0;
	}
	.prod-tabs__tab {
		min-height: 40px;
		padding: 0 12px;
	}
}
