/**
 * Zestino designsystem – innholdsblokker.
 * Kategorikort, produktrader, tillitspunkter, sitater og stempel.
 */

/* ============================================================
   1. Kategorikort
   ============================================================ */

.z-cat-grid {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(min(100%, 240px), 1fr));
	gap: var(--z-space-md);
}

.z-cat-card {
	position: relative;
	display: block;
	min-height: clamp(280px, 32vw, 400px);
	border-radius: var(--z-radius-sm);
	overflow: hidden;
	background: var(--z-surface);
	border: var(--z-border);
	isolation: isolate;
	transition:
		border-color var(--z-dur) var(--z-ease),
		transform var(--z-dur) var(--z-ease),
		box-shadow var(--z-dur) var(--z-ease);
}

.z-cat-card:hover {
	border-color: var(--z-red);
	transform: translateY(-4px);
	box-shadow: var(--z-shadow-md);
}

.z-cat-card__media {
	position: absolute;
	inset: 0;
	z-index: -2;
	display: block;
}

.z-cat-card__media img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	filter: grayscale(0.4) contrast(1.1);
	transition: transform var(--z-dur-slow) var(--z-ease), filter var(--z-dur) var(--z-ease);
}

.z-cat-card:hover .z-cat-card__media img {
	transform: scale(1.06);
	filter: grayscale(0) contrast(1.05);
}

.z-cat-card::after {
	content: "";
	position: absolute;
	inset: 0;
	z-index: -1;
	background: linear-gradient(
		0deg,
		rgba(0, 0, 0, 0.95) 0%,
		rgba(0, 0, 0, 0.6) 42%,
		rgba(0, 0, 0, 0.15) 100%
	);
}

.z-cat-card__body {
	position: absolute;
	inset: auto 0 0 0;
	display: flex;
	flex-direction: column;
	gap: 0.25rem;
	padding: var(--z-space-md);
}

.z-cat-card__eyebrow {
	font-size: var(--z-fs-tiny);
	font-weight: var(--z-fw-bold);
	letter-spacing: var(--z-ls-label);
	text-transform: uppercase;
	color: var(--z-red);
}

.z-cat-card__title {
	font-family: var(--z-font-display);
	font-size: clamp(1.5rem, 1.1rem + 1.4vw, 2.125rem);
	font-weight: var(--z-fw-black);
	font-style: italic;
	line-height: 1;
	text-transform: uppercase;
	color: #fff;
}

.z-cat-card__count {
	font-size: var(--z-fs-tiny);
	color: var(--z-text-dim);
	letter-spacing: 0.06em;
	text-transform: uppercase;
}

.z-cat-card__cta {
	display: inline-flex;
	align-items: center;
	gap: 0.375rem;
	margin-top: var(--z-space-2xs);
	font-size: var(--z-fs-tiny);
	font-weight: var(--z-fw-bold);
	letter-spacing: var(--z-ls-label);
	text-transform: uppercase;
	color: #fff;
}

.z-cat-card:hover .z-cat-card__cta {
	color: var(--z-red);
}

.z-cat-card:hover .z-cat-card__cta .z-btn__arrow {
	transform: translateX(4px);
}

/* ============================================================
   2. Produktrad
   ============================================================ */

.z-product-row + .z-product-row {
	margin-top: var(--z-space-2xl);
}

.z-product-row__head {
	display: flex;
	flex-wrap: wrap;
	align-items: baseline;
	justify-content: space-between;
	gap: var(--z-space-sm);
	margin-bottom: var(--z-space-md);
	padding-bottom: var(--z-space-2xs);
	border-bottom: var(--z-border);
}

.z-product-row__title {
	margin: 0;
	font-size: var(--z-fs-h3);
	font-style: italic;
}

/* ============================================================
   3. Tillitspunkter
   ============================================================ */

.z-usp-grid {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(min(100%, 220px), 1fr));
	gap: var(--z-space-md);
}

.z-usp-card {
	display: flex;
	flex-direction: column;
	gap: 0.5rem;
	padding: var(--z-space-md);
	background: var(--z-surface);
	border: var(--z-border);
	border-radius: var(--z-radius-sm);
	transition: border-color var(--z-dur) var(--z-ease);
}

.z-usp-card:hover {
	border-color: var(--z-red);
}

.z-usp-card__icon {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 52px;
	height: 52px;
	margin-bottom: var(--z-space-2xs);
	border-radius: var(--z-radius-xs);
	background: rgba(226, 14, 23, 0.12);
	color: var(--z-red);
}

.z-usp-card__title {
	margin: 0;
	font-size: 1.125rem;
}

.z-usp-card__text {
	margin: 0;
	font-size: var(--z-fs-small);
	color: var(--z-text-muted);
}

/* ============================================================
   4. Sitater
   ============================================================ */

.z-quotes {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(min(100%, 280px), 1fr));
	gap: var(--z-space-md);
}

.z-quote {
	display: flex;
	flex-direction: column;
	gap: var(--z-space-2xs);
	margin: 0;
	padding: var(--z-space-lg);
	background: var(--z-surface);
	border: var(--z-border);
	border-radius: var(--z-radius-sm);
	position: relative;
}

.z-quote::before {
	content: "”";
	position: absolute;
	top: -0.15em;
	right: 0.35em;
	font-family: var(--z-font-display);
	font-size: 7rem;
	line-height: 1;
	color: var(--z-red);
	opacity: 0.16;
	pointer-events: none;
}

.z-quote__stars {
	display: flex;
	gap: 2px;
	color: var(--z-red);
}

.z-quote__stars svg {
	fill: currentColor;
	stroke: none;
}

.z-quote__text {
	margin: 0;
	font-size: var(--z-fs-body);
	line-height: var(--z-lh-relaxed);
	color: var(--z-text);
}

.z-quote__author {
	margin-top: auto;
	padding-top: var(--z-space-2xs);
	display: flex;
	flex-direction: column;
	font-size: var(--z-fs-small);
}

.z-quote__author strong {
	font-family: var(--z-font-display);
	font-size: 1.0625rem;
	text-transform: uppercase;
	letter-spacing: 0.02em;
}

.z-quote__author span {
	color: var(--z-red);
	font-size: var(--z-fs-tiny);
	letter-spacing: var(--z-ls-label);
	text-transform: uppercase;
	font-weight: var(--z-fw-bold);
}

/* ============================================================
   5. Stempel
   ============================================================ */

.z-stamp {
	position: relative;
	width: clamp(140px, 18vw, 230px);
	aspect-ratio: 1;
	display: grid;
	place-items: center;
}

.z-stamp svg {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
	animation: z-stamp-spin 32s linear infinite;
}

.z-stamp__ring {
	fill: none;
	stroke: var(--z-red);
	stroke-width: 2;
}

.z-stamp__core {
	fill: rgba(0, 0, 0, 0.75);
	stroke: rgba(255, 255, 255, 0.16);
	stroke-width: 1;
}

.z-stamp__text {
	fill: #fff;
	font-family: var(--z-font-body);
	font-size: 11px;
	font-weight: 700;
	letter-spacing: 0.18em;
	text-transform: uppercase;
}

.z-stamp__label {
	position: relative;
	z-index: 1;
	text-align: center;
	font-family: var(--z-font-display);
	font-size: clamp(0.9rem, 1.4vw, 1.35rem);
	font-weight: var(--z-fw-black);
	font-style: italic;
	line-height: 1;
	text-transform: uppercase;
	color: #fff;
}

.z-stamp__label em {
	color: var(--z-red);
	font-style: italic;
}

/* ============================================================
   6. Delt seksjon: bilde + tekst
   ============================================================ */

.z-split {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(min(100%, 320px), 1fr));
	gap: clamp(1.5rem, 4vw, 4rem);
	align-items: center;
}

.z-split__media {
	position: relative;
	border-radius: var(--z-radius-sm);
	overflow: hidden;
	aspect-ratio: 4 / 3;
}

.z-split__media img {
	width: 100%;
	height: 100%;
	object-fit: cover;
}

.z-split__media::after {
	content: "";
	position: absolute;
	inset: 0;
	border: 1px solid rgba(255, 255, 255, 0.1);
	border-radius: inherit;
	pointer-events: none;
}

/* Tallpar under en tekstblokk. */
.z-stats {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
	gap: var(--z-space-md);
	margin-top: var(--z-space-lg);
	padding-top: var(--z-space-lg);
	border-top: var(--z-border);
}

.z-stat__value {
	display: block;
	font-family: var(--z-font-display);
	font-size: clamp(2rem, 1.4rem + 2vw, 3rem);
	font-weight: var(--z-fw-black);
	font-style: italic;
	line-height: 1;
	color: var(--z-red);
}

.z-stat__label {
	display: block;
	margin-top: 0.25rem;
	font-size: var(--z-fs-tiny);
	letter-spacing: var(--z-ls-label);
	text-transform: uppercase;
	color: var(--z-text-dim);
}

/* ============================================================
   7. CTA-banner
   ============================================================ */

.z-cta-band {
	position: relative;
	padding-block: var(--z-section-y);
	background: var(--z-black);
	overflow: hidden;
	text-align: center;
	isolation: isolate;
}

.z-cta-band__inner {
	position: relative;
	z-index: 1;
	max-width: 46rem;
	margin-inline: auto;
}

/* ============================================================
   8. Produktkarusell
   ============================================================ */

.z-product-row__head {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: space-between;
	gap: var(--z-space-sm);
}

.z-product-row__tools {
	display: flex;
	align-items: center;
	gap: var(--z-space-sm);
}

.z-carousel__nav {
	display: flex;
	gap: 4px;
}

.z-theme .z-carousel__nav .z-icon-btn {
	width: 40px;
	height: 40px;
	border: var(--z-border);
	color: var(--z-text-muted);
}

.z-theme .z-carousel__nav .z-icon-btn:hover {
	border-color: var(--z-red);
	color: #fff;
}

.z-theme .z-carousel__nav .z-icon-btn[disabled] {
	opacity: 0.35;
	cursor: default;
}

.z-carousel__nav .z-flip {
	transform: rotate(180deg);
}

.z-carousel {
	position: relative;
	margin-inline: calc(var(--z-gutter) * -1);
	padding-inline: var(--z-gutter);
	overflow-x: auto;
	overflow-y: hidden;
	scroll-snap-type: x mandatory;
	scroll-behavior: smooth;
	overscroll-behavior-x: contain;
	scrollbar-width: none;
	-ms-overflow-style: none;
}

.z-carousel::-webkit-scrollbar {
	display: none;
}

/* Selve sporet: faste kortbredder i stedet for et rutenett. */
.z-theme .z-carousel .z-carousel__track,
.z-theme .z-carousel ul.products.z-carousel__track {
	display: flex;
	grid-template-columns: none;
	gap: var(--z-space-md);
	margin: 0;
	padding: 0;
	list-style: none;
	width: max-content;
	min-width: 100%;
}

.z-theme .z-carousel ul.products.z-carousel__track > li.product {
	flex: 0 0 auto;
	width: clamp(220px, 24vw, 300px);
	scroll-snap-align: start;
	margin: 0 !important;
}

/* Er det få produkter, fyller de bredden i stedet for å klumpe seg til venstre. */
.z-carousel.is-static {
	overflow: visible;
	margin-inline: 0;
	padding-inline: 0;
}

.z-theme .z-carousel.is-static ul.products.z-carousel__track {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(min(100%, 240px), 1fr));
	width: auto;
}

.z-theme .z-carousel.is-static ul.products.z-carousel__track > li.product {
	width: auto;
}

@media (max-width: 640px) {
	.z-theme .z-carousel ul.products.z-carousel__track > li.product {
		width: min(78vw, 300px);
	}
}
