/**
 * Knjiga uzoraka (/materijali/knjiga-uzoraka/)
 * Prefix: lm-swatch-book-
 */

body.lm-surface-swatch-book-page,
.lm-swatch-book {
	--lm-surface-tag-radius: 6px;
	--lm-content-max: 1440px;
	--lm-swatch-book-bg: #faf9f7;
	--lm-swatch-book-disc: clamp(88px, 9vw, 112px);
	--lm-swatch-book-gap: clamp(1.1rem, 2.2vw, 1.75rem);
	--lm-swatch-book-col-min: calc(var(--lm-swatch-book-disc) + 1.5rem);
	--lm-swatch-book-sticky-top: var(--lm-site-header-bottom, 5.875rem);
}

body.lm-surface-swatch-book-page {
	--lm-page-padding-x: 40px;
	--lm-page-padding-y: 28px;
	background: var(--lm-swatch-book-bg, #faf9f7);
}

@media (max-width: 1120px) {
	body.lm-surface-swatch-book-page {
		--lm-page-padding-x: 20px;
		--lm-page-padding-y: 22px;
	}
}

@media (max-width: 767px) {
	body.lm-surface-swatch-book-page {
		--lm-page-padding-x: 16px;
		--lm-page-padding-y: 18px;
		--lm-swatch-book-disc: 76px;
		--lm-swatch-book-gap: 1rem;
	}
}

body.lm-surface-swatch-book-page .site-content,
body.lm-surface-swatch-book-page #content,
body.lm-surface-swatch-book-page .content-area,
body.lm-surface-swatch-book-page #primary,
body.lm-surface-swatch-book-page .site-main,
body.lm-surface-swatch-book-page .page-content,
body.lm-surface-swatch-book-page .entry-content,
body.lm-surface-swatch-book-page article.page,
body.lm-surface-swatch-book-page .hentry {
	max-width: none !important;
	width: 100% !important;
	padding-left: 0 !important;
	padding-right: 0 !important;
	margin-left: 0 !important;
	margin-right: 0 !important;
	box-sizing: border-box;
}

body.lm-surface-swatch-book-page .page-header {
	display: none;
}

body.lm-surface-swatch-book-page .lm-swatch-book.lm-surface-page-shell,
body.lm-surface-swatch-book-page .lm-surface-page-shell {
	width: 100% !important;
	max-width: var(--lm-content-max, 1440px) !important;
	margin-left: auto !important;
	margin-right: auto !important;
	padding-left: var(--lm-page-padding-x, 40px) !important;
	padding-right: var(--lm-page-padding-x, 40px) !important;
	padding-top: var(--lm-page-padding-y, 28px) !important;
	padding-bottom: calc(var(--lm-page-padding-y, 28px) * 2) !important;
	box-sizing: border-box !important;
}

.lm-swatch-book {
	--lm-finish-swatch-size: var(--lm-swatch-book-disc);
}

.lm-swatch-book h1,
.lm-swatch-book h2 {
	font-weight: inherit;
	text-transform: none;
	letter-spacing: normal;
	margin-top: 0;
}

.lm-swatch-book__header {
	max-width: 42rem;
	margin: 0 0 clamp(1.5rem, 3vw, 2.25rem);
}

.lm-swatch-book__header .lm-surface-breadcrumb {
	margin: 0 0 0.85rem;
}

.lm-swatch-book__header .lm-surface-breadcrumb__link,
.lm-swatch-book__header .lm-surface-breadcrumb__current {
	font-family: "Work Sans", Arial, sans-serif;
	font-size: 0.78rem;
	font-weight: 500;
	line-height: 1.4;
	letter-spacing: 0;
	text-transform: none;
}

.lm-swatch-book__title {
	margin: 0 0 0.75rem;
	font-family: "Bricolage Grotesque", "Work Sans", Arial, sans-serif;
	font-size: clamp(1.85rem, 3.2vw, 2.45rem);
	font-weight: 400;
	line-height: 1.15;
	color: var(--lm-navy, #002a3a);
}

.lm-swatch-book__lead {
	margin: 0;
	font-family: "Work Sans", Arial, sans-serif;
	font-size: clamp(0.95rem, 1.4vw, 1.05rem);
	line-height: 1.55;
	color: var(--lm-navy-mid, #073343);
}

.lm-swatch-book__empty {
	margin: 0;
	font-family: "Work Sans", Arial, sans-serif;
	color: var(--lm-navy-mid, #073343);
}

/* Sticky effect jump nav — same pill track as /primene/ switcher */
.lm-swatch-book__jump {
	position: sticky;
	top: var(--lm-swatch-book-sticky-top, var(--lm-site-header-bottom, 5.875rem));
	z-index: 20;
	margin: 0 0 clamp(1.5rem, 3vw, 2.25rem);
	padding: 0.2rem 0;
	background: transparent;
}

.lm-swatch-book__jump-scroll {
	width: 100%;
	overflow-x: auto;
	overflow-y: hidden;
	overflow-y: clip;
	overscroll-behavior-x: contain;
	overscroll-behavior-y: auto;
	touch-action: pan-x pan-y pinch-zoom;
	scrollbar-width: none;
	-ms-overflow-style: none;
	padding: 0.35rem;
	border: 1px solid rgba(0, 42, 58, 0.07);
	border-radius: 999px;
	background: rgba(255, 255, 255, 0.72);
	box-shadow: 0 10px 28px rgba(0, 42, 58, 0.05);
	box-sizing: border-box;
	backdrop-filter: blur(12px);
	-webkit-backdrop-filter: blur(12px);
}

.lm-swatch-book__jump-scroll::-webkit-scrollbar {
	display: none;
}

.lm-swatch-book__jump-list {
	display: flex;
	flex-wrap: wrap;
	gap: 0.35rem;
	margin: 0;
	padding: 0;
	list-style: none;
}

.lm-swatch-book__jump-list > li {
	flex-shrink: 0;
}

.lm-swatch-book__jump-link {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 0.4rem;
	min-height: 34px;
	padding: 0.35rem 0.75rem;
	border: 1px solid transparent;
	border-radius: 999px;
	background: transparent;
	font-family: "Work Sans", Arial, sans-serif;
	font-size: 0.8125rem;
	font-weight: 600;
	line-height: 1;
	color: #4c5659;
	text-decoration: none;
	white-space: nowrap;
	transition:
		background-color 0.2s ease,
		border-color 0.2s ease,
		color 0.2s ease;
}

.lm-swatch-book__jump-link:hover,
.lm-swatch-book__jump-link:focus-visible,
.lm-swatch-book__jump-link.is-active {
	border-color: rgba(127, 169, 182, 0.35);
	background: #eef4f6;
	color: #002a3a;
	outline: none;
	text-decoration: none;
}

.lm-swatch-book__jump-count {
	font-weight: 500;
	color: rgba(0, 42, 58, 0.5);
	font-variant-numeric: tabular-nums;
}

.lm-swatch-book__jump-link:hover .lm-swatch-book__jump-count,
.lm-swatch-book__jump-link:focus-visible .lm-swatch-book__jump-count,
.lm-swatch-book__jump-link.is-active .lm-swatch-book__jump-count {
	color: rgba(0, 42, 58, 0.65);
}

@media (max-width: 767px) {
	.lm-swatch-book__jump-list {
		flex-wrap: nowrap;
	}
}

.lm-swatch-book__section {
	scroll-margin-top: calc(var(--lm-swatch-book-sticky-top, var(--lm-site-header-bottom, 5.875rem)) + 4.5rem);
	margin: 0 0 clamp(2.5rem, 5vw, 3.75rem);
}

.lm-swatch-book__section:last-child {
	margin-bottom: 0;
}

.lm-swatch-book__section-head {
	display: flex;
	flex-wrap: wrap;
	align-items: baseline;
	gap: 0.5rem 1rem;
	margin: 0 0 1.15rem;
	padding-bottom: 0.65rem;
	border-bottom: 1px solid rgba(0, 42, 58, 0.1);
}

.lm-swatch-book__section-title {
	margin: 0;
	font-family: "Bricolage Grotesque", "Work Sans", Arial, sans-serif;
	font-size: clamp(1.25rem, 2.2vw, 1.5rem);
	font-weight: 400;
	line-height: 1.25;
	color: var(--lm-navy, #002a3a);
}

.lm-swatch-book__section-count {
	margin: 0;
	font-family: "Work Sans", Arial, sans-serif;
	font-size: 0.8125rem;
	color: rgba(0, 42, 58, 0.55);
}

.lm-swatch-book__grid {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(var(--lm-swatch-book-col-min), 1fr));
	gap: var(--lm-swatch-book-gap);
	justify-items: center;
}

.lm-swatch-book__cell {
	width: 100%;
	max-width: calc(var(--lm-swatch-book-disc) + 3.25rem);
}

.lm-swatch-book__item {
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 0.65rem;
	width: 100%;
	text-decoration: none !important;
	color: inherit;
}

.lm-swatch-book__item:hover,
.lm-swatch-book__item:focus,
.lm-swatch-book__item:focus-visible {
	text-decoration: none !important;
}

.lm-swatch-book__item:focus-visible {
	outline: none;
}

.lm-swatch-book__item:focus-visible .lm-surface-finish-swatch-tab__disc {
	box-shadow:
		0 0 0 2px #fff,
		0 0 0 4px var(--lm-navy, #002a3a),
		0 8px 18px rgba(0, 42, 58, 0.08);
}

.lm-swatch-book__item:hover .lm-surface-finish-swatch-tab__disc {
	transform: translateY(-2px);
}

.lm-swatch-book__disc-wrap {
	display: block;
	line-height: 0;
}

/* Full-bleed circular fill: crop live macro photos into the disc */
.lm-swatch-book .lm-surface-finish-swatch-tab__disc {
	width: var(--lm-swatch-book-disc);
	height: var(--lm-swatch-book-disc);
	border-radius: 50%;
	overflow: hidden;
	background: #d8dee2;
}

.lm-swatch-book .lm-surface-finish-swatch-tab__disc img,
.lm-swatch-book .lm-surface-finish-swatch-tab__img {
	display: block;
	width: 100%;
	height: 100%;
	max-width: none;
	max-height: none;
	object-fit: cover;
	object-position: center;
	border-radius: 0;
	transform: scale(1.12);
	transform-origin: center center;
}

.lm-swatch-book .lm-surface-finish-swatch-tab__disc--live img,
.lm-swatch-book .lm-surface-finish-swatch-tab__disc--live .lm-surface-finish-swatch-tab__img {
	/* Portrait daylight samples need stronger crop to fill the circle */
	transform: scale(1.72);
	transform-origin: center center;
}

.lm-swatch-book__meta {
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 0.15rem;
	text-align: center;
	min-width: 0;
	width: 100%;
}

.lm-swatch-book__collection {
	font-family: "Work Sans", Arial, sans-serif;
	font-size: 0.625rem;
	font-weight: 500;
	line-height: 1.25;
	letter-spacing: 0.07em;
	text-transform: uppercase;
	color: #9aa3b2;
	text-decoration: none !important;
	overflow-wrap: anywhere;
}

.lm-swatch-book__name {
	font-family: "Work Sans", Arial, sans-serif;
	font-size: 0.8125rem;
	font-weight: 500;
	line-height: 1.3;
	color: var(--lm-navy, #002a3a);
	text-decoration: none !important;
	overflow-wrap: anywhere;
}

.lm-swatch-book__finish {
	font-family: "Work Sans", Arial, sans-serif;
	font-size: 0.75rem;
	font-weight: 400;
	line-height: 1.3;
	color: rgba(0, 42, 58, 0.62);
	text-decoration: none !important;
	overflow-wrap: anywhere;
}

@media (prefers-reduced-motion: reduce) {
	.lm-swatch-book__item:hover .lm-surface-finish-swatch-tab__disc {
		transform: none;
	}
}
