/* Natige — catalog category listing and product page. */

.product-grid {
	display: grid;
	grid-template-columns: repeat(4, minmax(0, 1fr));
	gap: 16px;
	margin: 0 0 48px;
	padding: 0;
	list-style: none;
}

.product-grid > li {
	display: flex;
	min-width: 0;
}

.product-card {
	display: flex;
	flex-direction: column;
	width: 100%;
	height: 100%;
	overflow: hidden;
	border-radius: 16px;
	background: #fff;
	border: 1px solid rgba(58, 120, 186, 0.18);
	text-decoration: none;
	color: inherit;
	transition: transform 0.4s cubic-bezier(0.35, 0, 0.14, 1), box-shadow 0.4s ease;
}

.product-card__media {
	position: relative;
	display: block;
	aspect-ratio: 1;
	background: #f4f7f8;
	overflow: hidden;
}

.product-card__media img {
	display: block;
	width: 100%;
	height: 100%;
	object-fit: contain;
	transition: transform 0.7s cubic-bezier(0.35, 0, 0.14, 1);
}

.product-card__name {
	display: -webkit-box;
	-webkit-box-orient: vertical;
	-webkit-line-clamp: 3;
	line-clamp: 3;
	overflow: hidden;
	padding: 12px 14px 14px;
	font-family: var(--font-display, "Work Sans", sans-serif);
	font-size: 16px;
	font-weight: 600;
	line-height: 1.3;
	color: var(--natige-ink, #243040);
}

.product-card:hover .product-card__name,
.product-card:focus-visible .product-card__name {
	color: var(--natige-blue, #3A78BA);
}

.product-card:hover,
.product-card:focus-visible {
	transform: translateY(-4px);
	box-shadow: 0 18px 40px rgba(58, 120, 186, 0.14);
	text-decoration: none;
	color: inherit;
}

.product-card:hover img,
.product-card:focus-visible img {
	transform: scale(1.05);
}

.product-card:focus-visible {
	outline: 2px solid #FCB43C;
	outline-offset: 3px;
}

.product-card.is-static {
	cursor: default;
}

.product-card.is-static:hover,
.product-card.is-static:focus-visible {
	transform: none;
	box-shadow: none;
}

.product-card.is-static:hover img,
.product-card.is-static:focus-visible img {
	transform: none;
}

.catalog-lead {
	max-width: 46em;
	margin: -8px 0 32px;
	font-size: 17px;
	line-height: 1.55;
	color: #5a6168;
}

.product-page {
	padding-bottom: 64px;
}

.product-page__layout {
	display: grid;
	grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr);
	gap: 48px 56px;
	align-items: start;
}

.product-page__gallery {
	margin: 0;
	overflow: hidden;
	border-radius: 16px;
	background: #f4f7f8;
}

.product-page__gallery img {
	display: block;
	width: 100%;
	height: auto;
}

.product-page__thumbs {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
	margin: 12px 0 0;
	padding: 0;
	list-style: none;
}

.product-page__thumbs a {
	display: block;
	width: 72px;
	height: 72px;
	overflow: hidden;
	border-radius: 8px;
	background: #f4f7f8;
	border: 1px solid rgba(58, 120, 186, 0.16);
}

.product-page__thumbs img {
	width: 100%;
	height: 100%;
	object-fit: cover;
}

.product-page__volume {
	display: inline-block;
	margin: 0 0 16px;
	padding: 6px 12px;
	border-radius: 999px;
	background: rgba(198, 226, 96, 0.16);
	color: #243040;
	font-size: 13px;
	font-weight: 700;
	letter-spacing: 0.04em;
}

.product-page__block {
	margin: 0 0 28px;
}

.product-page__block h2 {
	margin: 0 0 10px;
	font-size: 13px;
	font-weight: 700;
	letter-spacing: 0.12em;
	text-transform: uppercase;
	color: #3A78BA;
}

.product-page__block p,
.product-page__block {
	font-size: 16px;
	line-height: 1.55;
	color: #343a40;
}

.product-page__macros {
	display: grid;
	grid-template-columns: repeat(3, minmax(0, 1fr));
	gap: 12px;
	margin: 0 0 28px;
	padding: 0;
	list-style: none;
}

.product-page__macros li {
	padding: 16px 12px;
	border-radius: 12px;
	background: #ffffff;
	border: 1px solid rgba(58, 120, 186, 0.12);
	text-align: center;
}

.product-page__macros strong {
	display: block;
	font-size: 28px;
	font-weight: 700;
	line-height: 1.1;
	color: #3A78BA;
}

.product-page__macros span {
	display: block;
	margin-top: 6px;
	font-size: 13px;
	font-weight: 600;
	color: #5a6168;
}

.product-page__more {
	margin-top: 48px;
	padding-top: 32px;
	border-top: 1px solid rgba(58, 120, 186, 0.14);
}

.product-page__more h2 {
	margin: 0 0 20px;
	font-size: 22px;
	font-weight: 700;
	color: #3A78BA;
}

.catalog-empty {
	padding: 24px 0 64px;
}

@media (max-width: 991.98px) {
	.product-grid {
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}
	.product-page__layout {
		grid-template-columns: 1fr;
		gap: 24px;
	}
}

@media (max-width: 575.98px) {
	.product-page__macros {
		grid-template-columns: 1fr;
	}
}

/* Dairy-case marketplace. */

/* overflow-x on html/body makes them a non-scrolling scrollport, so sticky never pins. */
html:has(.shop),
html:has(.shop) body,
html:has(.shop) .animsition {
	overflow-x: visible;
}

.shop {
	--shop-blue: #3A78BA;
	--shop-lime: #C6E260;
	--shop-ink: #343a40;
	--shop-mute: #5a6168;
	--shop-line: rgba(58, 120, 186, 0.12);
	--shop-sticky-top: calc(var(--nav-stack, 106px) + 12px);
	display: grid;
	grid-template-columns: 280px minmax(0, 1fr);
	gap: 32px 40px;
	align-items: start;
	padding-bottom: 64px;
}

.shop__open {
	display: none;
}

.shop__aside {
	position: sticky;
	top: var(--shop-sticky-top);
	z-index: 4;
	align-self: start;
	max-height: calc(100dvh - var(--shop-sticky-top) - 16px);
	overflow: auto;
	overscroll-behavior: contain;
	padding: 24px 20px;
	border: 1px solid var(--shop-line);
	border-radius: 16px;
	background: #fff;
	scrollbar-width: thin;
	scrollbar-color: rgba(58, 120, 186, 0.35) transparent;
}

.shop__aside::-webkit-scrollbar {
	width: 8px;
}

.shop__aside::-webkit-scrollbar-thumb {
	background: rgba(58, 120, 186, 0.28);
	border-radius: 999px;
}

.shop__main {
	min-width: 0;
}

.shop__aside-head {
	display: flex;
	align-items: center;
	justify-content: space-between;
	margin-bottom: 16px;
}

.shop__aside-title {
	margin: 0;
	font-size: 12px;
	font-weight: 700;
	letter-spacing: 0.14em;
	text-transform: uppercase;
	color: #3A78BA;
}

.shop__close {
	display: none;
}

.shop-tree {
	margin: 0;
	padding: 0;
}

.shop-tree__all,
.shop-tree__leaf,
.shop-tree__parent {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 8px;
	margin: 0;
	padding: 8px 12px;
	border-radius: 8px;
	color: var(--shop-ink);
	text-decoration: none;
	font-size: 15px;
	font-weight: 600;
	line-height: 1.3;
}

.shop-tree__parent {
	margin-top: 8px;
	padding-left: 12px;
	font-size: 12px;
	font-weight: 700;
	letter-spacing: 0.08em;
	text-transform: uppercase;
	color: var(--shop-blue);
}

.shop-tree__all span,
.shop-tree__leaf span,
.shop-tree__parent span {
	font-size: 12px;
	font-weight: 600;
	color: var(--shop-mute);
}

.shop-tree ul {
	margin: 0 0 8px;
	padding: 0 0 0 12px;
	list-style: none;
	border-left: 2px solid var(--shop-lime);
}

.shop-tree__all:hover,
.shop-tree__leaf:hover,
.shop-tree__all:focus-visible,
.shop-tree__leaf:focus-visible {
	background: rgba(58, 120, 186, 0.06);
	color: var(--shop-blue);
	text-decoration: none;
}

.shop-tree__all.is-on,
.shop-tree__leaf.is-on {
	background: var(--shop-blue);
	color: #fff;
}

.shop-tree__all.is-on span,
.shop-tree__leaf.is-on span {
	color: rgba(255, 255, 255, 0.8);
}

.shop-tree__all:focus-visible,
.shop-tree__leaf:focus-visible {
	outline: 2px solid #FCB43C;
	outline-offset: 2px;
}

.shop__grid {
	margin-bottom: 0;
}

.shop__item.is-off {
	display: none;
}

.shop__empty {
	margin: 24px 0 0;
	padding: 24px;
	border: 1px dashed var(--shop-line);
	border-radius: 16px;
	color: var(--shop-mute);
}

.shop__mask {
	display: none;
}

.product-card__body {
	flex: 1 0 auto;
	display: flex;
	align-items: flex-start;
	min-height: calc(26px + 3.9em);
	padding: 12px 14px 14px;
}

.product-card__body .product-card__name {
	padding: 0;
}

@media (max-width: 991.98px) {
	.shop {
		grid-template-columns: minmax(0, 1fr);
		gap: 16px;
		align-items: start;
	}
	.shop__main {
		position: static;
		max-height: none;
		overflow: visible;
		padding-right: 0;
	}
	.shop__open {
		display: inline-flex;
		align-items: center;
		gap: 8px;
		min-height: 44px;
		padding: 8px 16px;
		border: 1px solid var(--shop-line);
		border-radius: 999px;
		background: #fff;
		color: var(--shop-blue);
		font-size: 14px;
		font-weight: 700;
		cursor: pointer;
	}
	.shop__aside {
		position: fixed;
		top: 0;
		left: 0;
		bottom: 0;
		z-index: 80;
		width: min(100%, 320px);
		max-height: 100%;
		overflow: auto;
		padding: 24px 20px 40px;
		border-radius: 0 16px 16px 0;
		transform: translateX(-104%);
		transition: transform 280ms cubic-bezier(0.35, 0, 0.14, 1);
	}
	.shop.is-filters .shop__aside {
		transform: none;
	}
	.shop__close {
		display: inline-flex;
		align-items: center;
		justify-content: center;
		width: 40px;
		height: 40px;
		padding: 0;
		border: 0;
		border-radius: 50%;
		background: rgba(58, 120, 186, 0.08);
		color: var(--shop-blue);
		cursor: pointer;
	}
	.shop__mask {
		display: block;
		position: fixed;
		inset: 0;
		z-index: 70;
		background: rgba(12, 32, 56, 0.4);
	}
	.shop__mask[hidden] {
		display: none;
	}
}

@media (prefers-reduced-motion: reduce) {
	.shop__aside {
		transition: none;
	}
}
