/* Product page: breadcrumb, image (click enlarges), facts, sizes with a drawing to scale, inquiry link. Mobile-first. */

.iw-product {
	background: var(--iw-color-bg);
	font-variant-numeric: lining-nums; /* Raleway defaults to old-style figures */
}

.iw-product__inner {
	max-width: var(--iw-container);
	margin: 0 auto;
	padding: var(--iw-space-6) var(--iw-gutter) var(--iw-space-16);
}

/* Breadcrumb */

.iw-product__crumbs ol {
	display: flex;
	flex-wrap: wrap;
	gap: var(--iw-space-2);
	margin: 0 0 var(--iw-space-6);
	padding: 0;
	list-style: none;
	color: var(--iw-color-ink-soft);
	font-size: var(--iw-text-sm);
}

.iw-product__crumbs li + li::before {
	content: "/";
	margin-right: var(--iw-space-2);
}

.iw-product__crumbs a {
	color: inherit;
	text-decoration: none;
}

/* On phones the product name is the H1 right below; the trail stays short */
@media (max-width: 639px) {
	.iw-product__crumbs li[aria-current] {
		display: none;
	}
}

.iw-product__crumbs a:hover {
	color: var(--iw-color-brown);
	text-decoration: underline;
}

.iw-product__layout {
	display: grid;
	gap: var(--iw-space-8);
}

/* Image */

.iw-product__zoom,
.iw-product__no-image {
	position: relative;
	display: block;
	width: 100%;
	aspect-ratio: 1; /* Square on phones, so the name is visible without much scrolling; 4:5 on desktop */
	overflow: hidden;
	border-radius: var(--iw-radius-lg);
	background: var(--iw-color-surface);
}

.iw-product__zoom {
	padding: 0;
	border: 0;
	cursor: zoom-in;
}

.iw-product__img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	transition: transform 0.6s ease;
}

.iw-product__zoom:hover .iw-product__img {
	transform: scale(1.03);
}

.iw-product__zoom-hint {
	position: absolute;
	right: var(--iw-space-4);
	bottom: var(--iw-space-4);
	padding: var(--iw-space-2) var(--iw-space-3);
	border-radius: var(--iw-radius);
	background: color-mix(in srgb, var(--iw-color-bg) 92%, transparent);
	color: var(--iw-color-ink);
	font-family: var(--iw-font-body);
	font-size: 0.8125rem;
	font-weight: 600;
}

/* Facts */

.iw-product__meta {
	display: flex;
	flex-wrap: wrap;
	gap: 2px var(--iw-space-2);
	margin: 0 0 var(--iw-space-3);
	color: var(--iw-color-ink-soft);
	font-size: 0.75rem;
	font-weight: 600;
	letter-spacing: 0.14em;
	text-transform: uppercase;
}

.iw-product__code {
	color: var(--iw-color-brown);
}

.iw-product__code + .iw-product__category::before {
	content: "·";
	margin-right: var(--iw-space-2);
	color: var(--iw-color-ink-soft);
}

.iw-product .iw-product__category {
	color: inherit;
	text-decoration: none;
}

.iw-product .iw-product__category:hover {
	color: var(--iw-color-brown);
	text-decoration: underline;
}

/* Product names are long ("Višeslojni pod hrast – ..."), so a size smaller than the section headings */
.iw-product__title {
	margin: 0 0 var(--iw-space-4);
	font-size: var(--iw-text-h3);
}

.iw-product__status {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: var(--iw-space-3);
	margin-bottom: var(--iw-space-6);
}

.iw-product__badge {
	padding: 3px var(--iw-space-2);
	border-radius: 4px;
	font-size: 0.6875rem;
	font-weight: 700;
	letter-spacing: 0.1em;
	line-height: 1.5;
	text-transform: uppercase;
}

.iw-product__badge--new {
	background: var(--iw-color-primary);
	color: var(--iw-color-on-primary);
}

.iw-product__badge--trend {
	background: var(--iw-color-surface);
	color: var(--iw-color-brown);
}

.iw-product__availability {
	display: inline-flex;
	align-items: center;
	gap: var(--iw-space-2);
	color: var(--iw-color-ink-soft);
	font-size: var(--iw-text-sm);
	font-weight: 500;
}

.iw-product__availability::before {
	content: "";
	width: 8px;
	height: 8px;
	border-radius: 50%;
	background: var(--iw-color-taupe);
}

.iw-product__availability.is-available::before {
	background: var(--iw-color-primary);
}

/* What a class means, under its name */
.iw-product__fact-note {
	display: block;
	margin-top: var(--iw-space-1);
	color: var(--iw-color-ink-soft);
	font-size: var(--iw-text-sm);
	font-weight: 400;
}

/* Description under the top part: small headings, lists as rows with thin lines, two columns on wide screens. */
.iw-product__description {
	margin-top: var(--iw-space-12);
	padding-top: var(--iw-space-8);
	border-top: 1px solid var(--iw-color-line);
	color: var(--iw-color-ink-soft);
	font-size: var(--iw-text-sm);
}

.iw-product__description h2 {
	margin: 0 0 var(--iw-space-3);
	color: var(--iw-color-brown);
	font-family: var(--iw-font-body);
	font-size: 0.75rem;
	font-weight: 700;
	letter-spacing: 0.12em;
	text-transform: uppercase;
}

.iw-product__description ul {
	margin: 0 0 var(--iw-space-8);
	padding: 0;
	list-style: none;
}

.iw-product__description li {
	padding: var(--iw-space-2) 0;
	border-bottom: 1px solid var(--iw-color-line);
}

.iw-product__description > :last-child {
	margin-bottom: 0;
}

@media (min-width: 1024px) {
	.iw-product__description {
		columns: 2;
		column-gap: var(--iw-space-16);
	}

	.iw-product__description h2 {
		break-after: avoid;
	}

	.iw-product__description ul {
		break-inside: avoid;
	}

	/* The second heading starts the second column, so the columns begin on one line. */
	.iw-product__description ul + h2 {
		break-before: column;
	}
}

/* Sizes */

.iw-product__sizes {
	padding-top: var(--iw-space-6);
	border-top: 1px solid var(--iw-color-line);
}

.iw-product__label {
	margin: 0 0 var(--iw-space-3);
	color: var(--iw-color-brown);
	font-family: var(--iw-font-body);
	font-size: 0.75rem;
	font-weight: 700;
	letter-spacing: 0.16em;
	line-height: var(--iw-leading-body);
	text-transform: uppercase;
}

.iw-product__size-list {
	display: flex;
	flex-wrap: wrap;
	gap: var(--iw-space-2);
	margin: 0;
	padding: 0;
	list-style: none;
}

.iw-product__size {
	min-height: 44px;
	padding: 0 var(--iw-space-4);
	border: 1px solid var(--iw-color-line);
	border-radius: var(--iw-radius);
	background: var(--iw-color-bg);
	color: var(--iw-color-ink);
	font: inherit;
	font-size: var(--iw-text-sm);
	font-weight: 500;
	font-variant-numeric: lining-nums tabular-nums;
	cursor: pointer;
	transition: border-color 0.15s ease, background-color 0.15s ease, color 0.15s ease;
}

.iw-product__size:hover {
	border-color: var(--iw-color-brown);
}

.iw-product__size[aria-pressed="true"] {
	border-color: var(--iw-color-brown);
	background: var(--iw-color-brown);
	color: var(--iw-color-on-ink);
}

.iw-product__size-single {
	margin: 0;
	color: var(--iw-color-brown);
	font-size: var(--iw-text-lg);
	font-weight: 600;
	font-variant-numeric: lining-nums tabular-nums;
}

/* Drawing to scale; padding instead of margin (Elementor-safe habit for figure) */
.iw-product__drawing {
	margin: 0;
	padding-top: var(--iw-space-4);
}

.iw-product__drawing[hidden] {
	display: none;
}

/* Drawn 1:1 in pixels (same text size for every board), shrinks only on narrow screens */
.iw-size-drawing {
	display: block;
	max-width: 100%;
	height: auto;
	overflow: visible;
}

.iw-size-drawing__board {
	fill: var(--iw-color-surface);
	stroke: var(--iw-color-brown);
	stroke-width: 1.5;
}

.iw-size-drawing__dim line {
	stroke: var(--iw-color-taupe);
	stroke-width: 1;
}

.iw-size-drawing__text {
	fill: var(--iw-color-ink-soft);
	font-family: var(--iw-font-body);
	font-size: 12px;
	font-weight: 600;
	font-variant-numeric: lining-nums;
}

/* Fact list */

.iw-product__facts {
	margin: var(--iw-space-8) 0 0;
	border-top: 1px solid var(--iw-color-line);
}

.iw-product__facts div {
	display: grid;
	grid-template-columns: 9rem minmax(0, 1fr);
	gap: var(--iw-space-4);
	padding: var(--iw-space-3) 0;
	border-bottom: 1px solid var(--iw-color-line);
}

.iw-product__facts dt {
	color: var(--iw-color-ink-soft);
	font-size: var(--iw-text-sm);
}

.iw-product__facts dd {
	margin: 0;
	font-weight: 500;
}

/* Inquiry link */

.iw-product__actions {
	margin-top: var(--iw-space-8);
}

.iw-product .iw-product__cta {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-height: 52px;
	padding: 0 var(--iw-space-8);
	border-radius: var(--iw-radius);
	background: var(--iw-color-primary);
	color: var(--iw-color-on-primary);
	font-weight: 600;
	text-decoration: none;
	transition: background-color 0.2s ease;
}

.iw-product .iw-product__cta:hover {
	background: var(--iw-color-primary-dark);
	color: var(--iw-color-on-primary);
}

.iw-product__cta-note {
	margin: var(--iw-space-3) 0 0;
	color: var(--iw-color-ink-soft);
	font-size: var(--iw-text-sm);
}

/* Enlarged image */

.iw-product__lightbox {
	max-width: min(92vw, 70rem);
	max-height: 92vh;
	padding: 0;
	border: 0;
	background: transparent;
	overflow: visible;
}

.iw-product__lightbox::backdrop {
	background: color-mix(in srgb, var(--iw-color-espresso) 88%, transparent);
}

.iw-product__lightbox-img {
	width: auto;
	max-width: min(92vw, 70rem);
	max-height: 92vh;
	border-radius: var(--iw-radius);
	object-fit: contain;
}

.iw-product__lightbox-close {
	position: absolute;
	top: var(--iw-space-3);
	right: var(--iw-space-3);
	width: 44px;
	height: 44px;
	border: 0;
	border-radius: 50%;
	background: var(--iw-color-bg);
	cursor: pointer;
}

.iw-product__lightbox-close span[aria-hidden]::before,
.iw-product__lightbox-close span[aria-hidden]::after {
	content: "";
	position: absolute;
	top: 50%;
	left: 50%;
	width: 18px;
	height: 2px;
	background: var(--iw-color-ink);
	transform: translate(-50%, -50%) rotate(45deg);
}

.iw-product__lightbox-close span[aria-hidden]::after {
	transform: translate(-50%, -50%) rotate(-45deg);
}

@media (min-width: 1024px) {
	.iw-product__inner {
		padding-top: var(--iw-space-8);
	}

	.iw-product__crumbs ol {
		margin-bottom: var(--iw-space-8);
	}

	.iw-product__layout {
		grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr);
		gap: var(--iw-space-16);
		align-items: start;
	}

	/* The image stays in view while the facts scroll */
	.iw-product__media {
		position: sticky;
		top: calc(var(--iw-header-height) + var(--iw-space-6));
	}

	.iw-product__zoom,
	.iw-product__no-image {
		aspect-ratio: 4 / 5;
	}

	.iw-product__info {
		padding-top: var(--iw-space-4);
	}
}

@media (prefers-reduced-motion: reduce) {
	.iw-product__img {
		transition: none;
	}
}

/* ---------- Inquiry (#upit): modal on a warm panel, what goes into the inquiry on the left, the form on the right.
   Full screen on phones. ---------- */

.iw-inquiry {
	width: 100%;
	max-width: 100%;
	height: 100%;
	max-height: 100%;
	margin: 0;
	padding: 0;
	border: 0;
	background: var(--iw-color-surface);
	color: var(--iw-color-ink);
	overscroll-behavior: contain;
}

/* Chrome focuses the dialog itself on opening; the frame needs no focus ring (fields and buttons keep theirs) */
.iw-inquiry:focus-visible,
.iw-product__lightbox:focus-visible {
	outline: none;
}

.iw-inquiry::backdrop {
	background: color-mix(in srgb, var(--iw-color-espresso) 72%, transparent);
}

html.iw-modal-open {
	overflow: hidden;
}

/* Stays in the corner while the content scrolls */
.iw-inquiry__close {
	position: sticky;
	top: var(--iw-space-3);
	z-index: 1;
	display: block;
	width: 44px;
	height: 44px;
	margin: var(--iw-space-3) var(--iw-space-3) calc(-44px - var(--iw-space-3)) auto; /* takes no room above the content */
	border: 0;
	border-radius: 50%;
	background: var(--iw-color-bg);
	cursor: pointer;
}

.iw-inquiry__close span[aria-hidden]::before,
.iw-inquiry__close span[aria-hidden]::after {
	content: "";
	position: absolute;
	top: 50%;
	left: 50%;
	width: 18px;
	height: 2px;
	background: var(--iw-color-ink);
	transform: translate(-50%, -50%) rotate(45deg);
}

.iw-inquiry__close span[aria-hidden]::after {
	transform: translate(-50%, -50%) rotate(-45deg);
}

.iw-inquiry__inner {
	display: grid;
	gap: var(--iw-space-8);
	padding: var(--iw-space-12) var(--iw-gutter) var(--iw-space-8);
}

.iw-inquiry__intro {
	display: flex;
	flex-direction: column;
}

.iw-inquiry__kicker {
	margin: 0 0 var(--iw-space-3);
	color: var(--iw-color-brown);
	font-size: 0.75rem;
	font-weight: 700;
	letter-spacing: 0.22em;
	text-transform: uppercase;
}

.iw-inquiry__title {
	margin: 0 0 var(--iw-space-4);
	font-size: var(--iw-text-h2);
}

.iw-inquiry__text {
	max-width: 30rem;
	margin: 0 0 var(--iw-space-8);
	color: var(--iw-color-ink-soft);
	font-size: var(--iw-text-lg);
}

/* What the inquiry carries: the product, filled in automatically */
.iw-inquiry__summary {
	padding: var(--iw-space-6);
	border-radius: var(--iw-radius-lg);
	background: var(--iw-color-bg);
}

.iw-inquiry__summary-label {
	margin: 0 0 var(--iw-space-4);
	color: var(--iw-color-brown);
	font-size: 0.75rem;
	font-weight: 700;
	letter-spacing: 0.16em;
	text-transform: uppercase;
}

.iw-inquiry__product {
	display: flex;
	align-items: flex-start;
	gap: var(--iw-space-4);
}

.iw-inquiry__thumb {
	flex: none;
	width: 72px;
	height: 72px;
	border-radius: var(--iw-radius);
	object-fit: cover;
}

.iw-inquiry__facts {
	display: grid;
	gap: var(--iw-space-2);
	margin: 0;
}

/* Phones: label above the value (next to the small image there is no room for two columns) */
.iw-inquiry__facts div {
	display: grid;
}

@media (min-width: 640px) {
	.iw-inquiry__facts div {
		grid-template-columns: 5.5rem minmax(0, 1fr);
		gap: var(--iw-space-3);
	}
}

.iw-inquiry__facts dt {
	color: var(--iw-color-ink-soft);
	font-size: var(--iw-text-sm);
}

.iw-inquiry__facts dd {
	margin: 0;
	font-weight: 600;
	font-variant-numeric: lining-nums tabular-nums;
}

/* Form */

.iw-inquiry__form-wrap {
	padding: var(--iw-space-8) var(--iw-space-6);
	border-radius: var(--iw-radius-lg);
	background: var(--iw-color-bg);
}

.iw-inquiry__notice {
	margin: 0 0 var(--iw-space-6);
	padding: var(--iw-space-4);
	border-left: 3px solid var(--iw-color-brown);
	background: var(--iw-color-surface);
	font-weight: 600;
}

.iw-inquiry__notice--success {
	border-left-color: var(--iw-color-primary);
}

.iw-inquiry__form,
.iw-inquiry__pair {
	display: grid;
	gap: var(--iw-space-6);
}

.iw-inquiry__row {
	display: grid;
	gap: var(--iw-space-2);
}

.iw-inquiry__row label {
	font-size: var(--iw-text-sm);
	font-weight: 600;
}

.iw-inquiry__optional {
	color: var(--iw-color-ink-soft);
	font-weight: 400;
}

.iw-inquiry__row input,
.iw-inquiry__row select,
.iw-inquiry__row textarea {
	width: 100%;
	padding: var(--iw-space-3) var(--iw-space-4);
	border: 1px solid var(--iw-color-line);
	border-radius: var(--iw-radius);
	background: var(--iw-color-bg);
	color: var(--iw-color-ink);
	font: inherit;
	font-variant-numeric: lining-nums;
}

.iw-inquiry__row textarea {
	min-height: 7rem;
	resize: vertical;
}

.iw-inquiry__row textarea::placeholder {
	color: var(--iw-color-ink-soft);
}

.iw-inquiry__row input:focus,
.iw-inquiry__row select:focus,
.iw-inquiry__row textarea:focus {
	outline: 2px solid var(--iw-color-primary);
	outline-offset: 1px;
	border-color: var(--iw-color-primary);
}

/* Honeypot: invisible for people, present for bots */
.iw-inquiry__hp {
	position: absolute;
	left: -9999px;
	width: 1px;
	height: 1px;
	overflow: hidden;
}

.iw-inquiry__consent {
	display: flex;
	align-items: flex-start;
	gap: var(--iw-space-3);
	color: var(--iw-color-ink-soft);
	font-size: var(--iw-text-sm);
}

.iw-inquiry__consent input {
	flex: none;
	width: 1.125rem;
	height: 1.125rem;
	margin-top: 0.2rem;
	accent-color: var(--iw-color-primary);
}

.iw-inquiry__consent a {
	color: var(--iw-color-brown);
	text-decoration: underline;
	text-underline-offset: 3px;
}

.iw-inquiry__submit {
	justify-self: start;
	padding: var(--iw-space-4) var(--iw-space-8);
	border: 0;
	border-radius: var(--iw-radius);
	background: var(--iw-color-primary);
	color: var(--iw-color-on-primary);
	font: inherit;
	font-size: 1.0625rem;
	font-weight: 600;
	cursor: pointer;
	transition: background-color 0.15s ease;
}

.iw-inquiry__submit:hover {
	background: var(--iw-color-primary-dark);
}

@media (min-width: 640px) {
	.iw-inquiry__pair {
		grid-template-columns: 1fr 1fr;
	}

	.iw-inquiry__form-wrap {
		padding: var(--iw-space-10);
	}
}

@media (min-width: 1024px) {
	.iw-inquiry__inner {
		grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
		gap: var(--iw-space-12);
		padding: var(--iw-space-12);
	}

	/* The product summary fills the rest of the column: a tall product image, the facts below it,
	   so the bottom lines up with the bottom of the form */
	.iw-inquiry__summary {
		display: flex;
		flex: 1;
		flex-direction: column;
	}

	.iw-inquiry__product {
		flex: 1;
		flex-direction: column;
		align-items: stretch;
	}

	.iw-inquiry__thumb {
		flex: 1 1 0;
		width: 100%;
		min-height: 10rem;
		height: auto;
	}
}

/* Modal as a centred panel from tablets up */
@media (min-width: 768px) {
	.iw-inquiry {
		width: min(100% - 2 * var(--iw-gutter), 72rem);
		height: fit-content; /* not auto: a modal dialog is fixed with inset 0, auto would stretch it to max-height */
		max-height: calc(100dvh - 2 * var(--iw-space-6));
		margin: auto;
		border-radius: var(--iw-radius-lg);
		box-shadow: var(--iw-shadow-md);
	}
}

/* ---------- Similar products: catalog cards on a warm band, four in a row on desktop ---------- */

.iw-catalog.iw-related {
	background: var(--iw-color-surface);
}

.iw-related__inner {
	max-width: var(--iw-container);
	margin: 0 auto;
	padding: var(--iw-space-16) var(--iw-gutter) var(--iw-space-24);
}

.iw-related__head {
	display: flex;
	flex-wrap: wrap;
	align-items: baseline;
	justify-content: space-between;
	gap: var(--iw-space-2) var(--iw-space-6);
	margin-bottom: var(--iw-space-8);
}

.iw-related__title {
	margin: 0;
	font-size: var(--iw-text-h2);
}

.iw-catalog .iw-related__link {
	color: var(--iw-color-brown);
	font-weight: 600;
	text-decoration: underline;
	text-underline-offset: 0.25em;
}

.iw-catalog .iw-related__link:hover {
	color: var(--iw-color-primary-dark);
}

@media (min-width: 1024px) {
	.iw-related .iw-catalog__grid {
		grid-template-columns: repeat(4, minmax(0, 1fr));
	}
}
