/**
 * ClothB2B Child — YISHION design layer.
 * Enqueued after astra-theme-css (see functions.php) so our rules win the cascade.
 */

/* ============ Design tokens ============ */
:root {
	--cb-blue: #87CEEB;   /* atmospheric sky blue (hero / sections) */
	--cb-earth: #D2691E;  /* atmospheric earth / chocolate */
	--cb-ink: #1a1a1a;    /* primary ink */
	--cb-text: #333333;   /* body text */
	--cb-bg: #FFFFFF;     /* page background */
	--cb-bg-alt: #F6F4F0; /* warm off-white section background */
	--cb-line: #E5E5E5;   /* hairline border */
	--cb-maxw: 1280px;    /* inner content width */
}

/* ============ Typography (offline-safe sans-serif) ============ */
body,
button,
input,
select,
textarea,
.ast-button,
.ast-custom-button {
	font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, "PingFang SC", "Microsoft YaHei", sans-serif;
	color: var(--cb-text);
}
h1, h2, h3, h4, h5, h6 {
	font-family: inherit;
	font-weight: 600;
	letter-spacing: 0.01em;
	color: var(--cb-ink);
}

/* ============ Brand (header site title) ============ */
#masthead .site-title,
#masthead .site-title a {
	font-weight: 700;
	letter-spacing: 0.12em;
	color: var(--cb-ink);
	text-transform: uppercase;
}

/* ============ Buttons ============ */
.cb-btn {
	display: inline-block;
	padding: 0.85rem 2.2rem;
	font-size: 0.8rem;
	font-weight: 600;
	letter-spacing: 0.12em;
	text-transform: uppercase;
	border-radius: 3px;
	text-decoration: none;
	transition: background-color .2s ease, color .2s ease, transform .2s ease;
	cursor: pointer;
}
.cb-btn--light { background: #fff; color: var(--cb-ink); }
.cb-btn--light:hover { background: var(--cb-bg-alt); color: var(--cb-ink); }
.cb-btn--sm { padding: 0.6rem 1.4rem; font-size: 0.72rem; }

/* ============ Layout helpers ============ */
.cb-container {
	max-width: var(--cb-maxw);
	margin: 0 auto;
	padding: 0 1.5rem;
}

/* Front page: own the width so the Hero can go full-bleed. */
body.cb-front #content .ast-container {
	max-width: 100%;
	padding-left: 0;
	padding-right: 0;
}
body.cb-front #primary { margin: 0; }

/* ============ Header language switcher ============ */
#masthead { position: relative; }

.cb-lang-switcher {
	position: absolute;
	top: 50%;
	right: 1.25rem;
	transform: translateY(-50%);
	z-index: 300;
}
.cb-lang-toggle {
	display: inline-flex;
	align-items: center;
	gap: 0.4rem;
	background: transparent;
	border: 1px solid var(--cb-line);
	border-radius: 3px;
	padding: 0.35rem 0.7rem;
	font-size: 0.78rem;
	letter-spacing: 0.06em;
	color: var(--cb-ink);
	cursor: pointer;
}
.cb-lang-toggle:hover { border-color: var(--cb-ink); }
.cb-lang-caret { transition: transform .2s ease; }
.cb-lang-list {
	position: absolute;
	top: calc(100% + 6px);
	right: 0;
	min-width: 90px;
	margin: 0;
	padding: 0.35rem 0;
	list-style: none;
	background: #fff;
	border: 1px solid var(--cb-line);
	border-radius: 3px;
	box-shadow: 0 6px 18px rgba(0, 0, 0, 0.08);
	opacity: 0;
	visibility: hidden;
	transform: translateY(-4px);
	transition: opacity .18s ease, transform .18s ease, visibility .18s;
}
.cb-lang-list a {
	display: block;
	padding: 0.4rem 0.85rem;
	font-size: 0.78rem;
	letter-spacing: 0.06em;
	color: var(--cb-text);
	text-decoration: none;
}
.cb-lang-list a:hover { background: var(--cb-bg-alt); }
.cb-lang-list li.is-current a { color: var(--cb-ink); font-weight: 700; }
.cb-lang-switcher:hover .cb-lang-list,
.cb-lang-switcher:focus-within .cb-lang-list {
	opacity: 1;
	visibility: visible;
	transform: translateY(0);
}
.cb-lang-switcher:hover .cb-lang-caret,
.cb-lang-switcher:focus-within .cb-lang-caret {
	transform: rotate(180deg);
}

/* ============ Hero ============ */
.cb-hero {
	position: relative;
	min-height: 80vh;
	display: flex;
	align-items: center;
	justify-content: center;
	text-align: center;
	background-color: var(--cb-blue);
	background-image: url("../images/hero.svg"); /* TODO: replace with a real hero photo */
	background-size: cover;
	background-position: center;
	color: #fff;
}
.cb-hero::after {
	content: "";
	position: absolute;
	inset: 0;
	background: linear-gradient(to bottom, rgba(0, 0, 0, 0.12), rgba(0, 0, 0, 0.32));
	pointer-events: none;
}
.cb-hero__inner {
	position: relative;
	z-index: 1;
	max-width: 760px;
	padding: 0 1.5rem;
}
.cb-hero__title {
	font-size: clamp(2rem, 5vw, 3.25rem);
	color: #fff;
	margin: 0 0 1rem;
	line-height: 1.2;
}
.cb-hero__sub {
	font-size: clamp(0.95rem, 1.6vw, 1.15rem);
	color: #fff;
	margin: 0 0 2rem;
	opacity: 0.95;
}

/* ============ Section heading ============ */
.cb-section-title {
	text-align: center;
	font-size: clamp(1.4rem, 3vw, 2rem);
	margin: 0 0 2.5rem;
	text-transform: uppercase;
	letter-spacing: 0.04em;
}

/* ============ Shop by Fitting (6-col grid) ============ */
.cb-fitting { padding: 4.5rem 0; }
.cb-fitting-grid {
	display: grid;
	grid-template-columns: repeat(6, 1fr);
	gap: 1rem;
}
.cb-fit-card {
	position: relative;
	display: block;
	aspect-ratio: 1 / 1;
	overflow: hidden;
	text-decoration: none;
	color: #fff;
}
.cb-fit-card__img {
	position: absolute;
	inset: 0;
	background-size: cover;
	background-position: center;
	transition: transform .5s ease;
}
.cb-fit-card::after {
	content: "";
	position: absolute;
	inset: 0;
	background: linear-gradient(to top, rgba(0, 0, 0, 0.55), rgba(0, 0, 0, 0) 45%);
	transition: background .3s ease;
}
.cb-fit-card:hover .cb-fit-card__img { transform: scale(1.06); }
.cb-fit-card:hover::after { background: linear-gradient(to top, rgba(0, 0, 0, 0.7), rgba(0, 0, 0, 0.05) 55%); }
.cb-fit-card__label {
	position: absolute;
	left: 0;
	right: 0;
	bottom: 0.85rem;
	z-index: 1;
	text-align: center;
	font-size: 0.78rem;
	font-weight: 600;
	letter-spacing: 0.12em;
	text-transform: uppercase;
}

/* ============ New Arrivals (3-col overlay cards) ============ */
.cb-new { padding: 4.5rem 0; background: var(--cb-bg-alt); }
.cb-new-grid {
	display: grid;
	grid-template-columns: repeat(3, 1fr);
	gap: 1.5rem;
}
.cb-new-card {
	position: relative;
	display: block;
	aspect-ratio: 4 / 5;
	overflow: hidden;
	text-decoration: none;
	color: #fff;
}
.cb-new-card__img {
	position: absolute;
	inset: 0;
	background-color: #dcd9d2;
	background-size: cover;
	background-position: center;
	transition: transform .5s ease;
}
.cb-new-card::after {
	content: "";
	position: absolute;
	inset: 0;
	background: linear-gradient(to top, rgba(0, 0, 0, 0.5), rgba(0, 0, 0, 0.05) 60%);
	transition: background .3s ease;
}
.cb-new-card:hover .cb-new-card__img { transform: scale(1.05); }
.cb-new-card:hover::after { background: linear-gradient(to top, rgba(0, 0, 0, 0.65), rgba(0, 0, 0, 0.1) 60%); }
.cb-new-card__overlay {
	position: absolute;
	inset: 0;
	z-index: 1;
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	gap: 1.1rem;
	text-align: center;
	padding: 1rem;
}
.cb-new-card__title {
	font-size: clamp(1.2rem, 2.2vw, 1.6rem);
	font-weight: 700;
	letter-spacing: 0.04em;
	text-transform: uppercase;
	color: #fff;
}
.cb-empty {
	grid-column: 1 / -1;
	text-align: center;
	color: var(--cb-text);
	padding: 2rem 0;
}

/* ============ Responsive ============ */
@media (max-width: 1024px) {
	.cb-fitting-grid { grid-template-columns: repeat(3, 1fr); }
}
@media (max-width: 768px) {
	.cb-new-grid { grid-template-columns: 1fr; }
	.cb-fitting-grid { grid-template-columns: repeat(2, 1fr); }
	/* Astra collapses the header to a hamburger here; move the switcher so it
	   doesn't overlap the mobile trigger. Position may need tuning per live UI. */
	.cb-lang-switcher {
		top: auto;
		bottom: 0.6rem;
		right: 3.5rem;
		transform: none;
	}
}
@media (max-width: 480px) {
	.cb-fitting-grid { grid-template-columns: repeat(2, 1fr); gap: 0.6rem; }
	.cb-hero { min-height: 70vh; }
}
