/*
 * Front page (templates/front-page-v2.php). Editorial layout: split hero with a
 * trust strip, category cards, product rows, shop by size + guide, showroom.
 * Same palette and type as the header, footer and product cards.
 */

.wecom-front {
	--fr-ink: #222;
	--fr-body: #4a4a4a;
	--fr-muted: #7a7a7a;
	--fr-line: #ececec;
	--fr-soft: #f6f5f3;
	display: grid;
	grid-template-columns: minmax(0, 1fr);
	gap: 56px;
	max-width: 1320px;
	margin: 0 auto;
	padding: 24px 32px 64px;
	box-sizing: border-box;
}

.wecom-front > * {
	min-width: 0;
}

.wecom-front img {
	display: block;
	width: 100%;
	height: auto;
}

.wecom-front-heading {
	margin: 0 0 18px;
	color: var(--fr-ink);
	font-size: clamp(20px, 2.2vw, 26px);
	font-weight: 700;
	letter-spacing: -0.01em;
}

/* ---- Hero ---- */

.wecom-front-hero__tiles {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 12px;
}

.wecom-front-hero__tile {
	position: relative;
	display: block;
	overflow: hidden;
	border-radius: 14px;
	aspect-ratio: 4 / 3;
	background: var(--fr-soft);
	color: #fff;
	text-decoration: none;
}

/* A lone tile (one saved on the settings screen) spans the row, in a wider frame. */
.wecom-front-hero__tile:only-child {
	grid-column: 1 / -1;
	aspect-ratio: 8 / 3;
}

.wecom-front-hero__tile img {
	position: absolute;
	inset: 0;
	height: 100%;
	object-fit: cover;
	transition: transform 0.5s;
}

.wecom-front-hero__tile:hover img {
	transform: scale(1.03);
}

.wecom-front-hero__tile::after {
	content: "";
	position: absolute;
	inset: 0;
	background: linear-gradient(180deg, rgba(0, 0, 0, 0) 25%, rgba(0, 0, 0, 0.65) 100%);
}

.wecom-front-hero__text {
	text-shadow: 0 1px 3px rgba(0, 0, 0, 0.45);
	position: absolute;
	right: 28px;
	bottom: 26px;
	left: 28px;
	z-index: 1;
	display: grid;
	gap: 8px;
	justify-items: start;
}

.wecom-front-hero__title {
	font-size: clamp(24px, 3vw, 38px);
	font-weight: 700;
	line-height: 1.1;
}

.wecom-front-hero__line {
	max-width: 42ch;
	font-size: 15px;
	opacity: 0.92;
}

.wecom-front-hero__button {
	text-shadow: none;
	margin-top: 6px;
	padding: 10px 20px;
	border-radius: 999px;
	background: #fff;
	color: var(--fr-ink);
	font-size: 14px;
	font-weight: 700;
}

.wecom-front-trust {
	display: grid;
	grid-template-columns: repeat(4, minmax(0, 1fr));
	gap: 12px;
	margin: 14px 0 0;
	padding: 0;
	list-style: none;
}

.wecom-front-trust li {
	margin: 0;
	padding: 0;
}

.wecom-front-trust li,
.wecom-front-trust a {
	display: flex;
	align-items: center;
	gap: 12px;
	min-width: 0;
}

.wecom-front-trust li {
	padding: 14px 16px;
	border-radius: 12px;
	background: var(--fr-soft);
}

.wecom-front-trust a {
	flex: 1;
	margin: -14px -16px;
	padding: 14px 16px;
	border-radius: 12px;
	color: inherit;
	text-decoration: none;
}

.wecom-front-trust .wecom-icon {
	flex: 0 0 auto;
	box-sizing: content-box;
	width: 20px;
	height: 20px;
	padding: 9px;
	border-radius: 50%;
	background: #fff;
	color: var(--fr-ink);
	fill: none;
	stroke: currentColor;
	stroke-width: 1.8;
	stroke-linecap: round;
	stroke-linejoin: round;
}

.wecom-front-trust span {
	display: flex;
	flex-direction: column;
	min-width: 0;
	color: var(--fr-muted);
	font-size: 13px;
	line-height: 1.35;
}

.wecom-front-trust strong {
	color: var(--fr-ink);
	font-size: 14px;
	font-weight: 700;
	white-space: nowrap;
}

.wecom-front-trust a:hover strong {
	text-decoration: underline;
	text-underline-offset: 3px;
}

/* Tablets: four boxes do not fit the titles on one line. */
@media (min-width: 769px) and (max-width: 1100px) {
	.wecom-front-trust {
		grid-template-columns: 1fr 1fr;
	}
}

/* ---- Categories ---- */

.wecom-front-cats__grid {
	display: grid;
	grid-template-columns: repeat(4, minmax(0, 1fr));
	gap: 14px;
}

.wecom-front-cats__card {
	display: grid;
	gap: 10px;
	color: var(--fr-ink);
	text-decoration: none;
}

.wecom-front-cats__card img {
	aspect-ratio: 1 / 1;
	border-radius: 12px;
	object-fit: cover;
	transition: transform 0.3s;
}

.wecom-front-cats__card:hover img {
	transform: translateY(-3px);
}

.wecom-front-cats__label {
	font-size: 15px;
	font-weight: 700;
}

/* ---- Product rows: plain grid (no Masonry on this page) ---- */

.wecom-front-row__list.products {
	display: grid !important;
	grid-template-columns: repeat(4, minmax(0, 1fr));
	gap: 14px;
	margin: 0 !important;
	padding: 0 !important;
}

.wecom-front-row__list.products::before,
.wecom-front-row__list.products::after {
	display: none !important;
}

.wecom-front-row__list.products li.product {
	position: relative !important;
	width: auto !important;
	margin: 0 !important;
	float: none !important;
}

/* ---- Shop by size + guide ---- */

.wecom-front-sizes {
	display: grid;
	grid-template-columns: 1.2fr 1fr;
	gap: 32px;
	align-items: start;
	padding: 32px;
	border-radius: 16px;
	background: var(--fr-soft);
}

.wecom-front-sizes__chips {
	display: flex;
	flex-wrap: wrap;
	gap: 10px;
}

.wecom-front-sizes__chip {
	padding: 10px 18px;
	border: 1.5px solid var(--fr-ink);
	border-radius: 999px;
	background: #fff;
	color: var(--fr-ink);
	font-size: 15px;
	font-weight: 700;
	text-decoration: none;
	transition: background-color 0.15s, color 0.15s;
}

.wecom-front-sizes__chip:hover {
	background: var(--fr-ink);
	color: #fff;
}

.wecom-front-sizes__guide h3 {
	margin: 0 0 8px;
	font-size: 17px;
	font-weight: 700;
}

.wecom-front-sizes__guide p {
	margin: 0;
	color: var(--fr-body);
	font-size: 15px;
	line-height: 1.6;
}

/* ---- Showroom ---- */

.wecom-front-showroom {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 32px;
	align-items: center;
}

.wecom-front-showroom__image img {
	aspect-ratio: 16 / 10;
	border-radius: 14px;
	object-fit: cover;
}

.wecom-front-showroom__text p {
	color: var(--fr-body);
	font-size: 15px;
	line-height: 1.6;
}

.wecom-front-showroom__actions {
	display: flex;
	flex-wrap: wrap;
	gap: 10px;
}

.wecom-front-button {
	display: inline-flex;
	align-items: center;
	height: 46px;
	padding: 0 22px;
	border-radius: 999px;
	background: var(--fr-ink);
	color: #fff !important;
	font-weight: 700;
	text-decoration: none;
}

.wecom-front-button--ghost {
	border: 1.5px solid var(--fr-ink);
	background: transparent;
	color: var(--fr-ink) !important;
}

/* ---- Tablet and phone ---- */

@media (max-width: 1024px) {
	.wecom-front-row__list.products {
		grid-template-columns: repeat(3, minmax(0, 1fr));
	}
}

@media (max-width: 768px) {
	.wecom-front {
		gap: 40px;
		padding: 16px 16px 48px;
	}

	.wecom-front-hero__tiles,
	.wecom-front-sizes,
	.wecom-front-showroom {
		grid-template-columns: 1fr;
	}

	.wecom-front-hero__tile,
	.wecom-front-hero__tile:only-child {
		aspect-ratio: 4 / 3.4;
	}

	/* Phones: 2 x 2, icon above the text. */
	.wecom-front-trust {
		grid-template-columns: 1fr 1fr;
		gap: 8px;
	}

	.wecom-front-trust li,
	.wecom-front-trust a {
		flex-direction: column;
		align-items: flex-start;
		gap: 10px;
	}

	.wecom-front-trust li {
		padding: 14px;
	}

	.wecom-front-trust a {
		margin: -14px;
		padding: 14px;
	}

	.wecom-front-trust span {
		font-size: 12.5px;
	}

	.wecom-front-trust strong {
		font-size: 13.5px;
		white-space: normal;
	}

	.wecom-front-cats__grid {
		grid-template-columns: repeat(2, minmax(0, 1fr));
		gap: 10px;
	}

	/* Product rows scroll sideways on phones. */
	.wecom-front-row__list.products {
		display: flex !important;
		gap: 10px;
		margin: 0 -16px !important;
		padding: 0 16px 4px !important;
		overflow-x: auto;
		scroll-snap-type: x mandatory;
		scrollbar-width: none;
	}

	.wecom-front-row__list.products li.product {
		flex: 0 0 46%;
		scroll-snap-align: start;
	}

	.wecom-front-row__list.products::-webkit-scrollbar {
		display: none;
	}

	.wecom-front-sizes {
		padding: 22px;
	}
}
