/**
 * nl-product – top of the product page ([nl_product]) and "Similar products" ([niclen_related_products]).
 *
 * Breakpoint template, see nl-base.css. Buttons repeat their colours for :hover and :focus
 * against the theme's pink button states, as in nl-product-card.css.
 *
 * Desktop and tablet: two columns (image + description | head, data, icons, buttons, contact box).
 * Mobile: the columns dissolve ("display: contents") into one flex column: image, title, description, data, icons, buttons, contact box.
 */

/* Same fix as nl-category-grid.css: a wrapping flex container would size the widget at its content width. */
.e-con-inner > .elementor-widget-nl-product,
.e-con > .elementor-widget-nl-product,
.e-con-inner > .elementor-widget-shortcode:has(.nl-related),
.e-con > .elementor-widget-shortcode:has(.nl-related) {
	width: var(--container-widget-width, 100%);
	--flex-grow: var(--container-widget-flex-grow);
}

.nl-portfolio.nl-product {
	display: grid;
	grid-template-columns: minmax(0, 7fr) minmax(0, 5fr);
	align-items: start;
	gap: 56px;
}

.nl-product .nl-product__col {
	display: flex;
	flex-direction: column;
	min-width: 0;
}

.nl-product .nl-product__col--media {
	gap: 48px;
}

.nl-product .nl-product__col--info {
	gap: 24px;
}

/* Image */
.nl-product .nl-product__media {
	aspect-ratio: 4 / 3;
	overflow: hidden;
	border-radius: var(--nl-r-l);
	background: transparent;
}

.nl-product .nl-product__image {
	display: block;
	width: 100%;
	height: 100%;
	max-width: none;
	border-radius: 0;
	object-fit: contain; /* The whole product, never cropped. */
}

/* Description */
.nl-product .nl-product__description {
	display: flex;
	flex-direction: column;
	gap: 12px;
	max-width: 760px;
}

.nl-product .nl-product__heading {
	font-family: var(--nl-font-heading);
	font-size: 30px;
	font-weight: 900;
	line-height: 1.2;
	color: var(--nl-heading);
}

.nl-product .nl-product__text {
	font-size: 16px;
	line-height: 1.7;
	color: var(--nl-text);
	overflow-wrap: anywhere;
}

.nl-product .nl-product__text > * + * {
	margin-top: 1em;
}

.nl-product .nl-product__text a {
	color: var(--nl-action);
	text-decoration: underline;
}

/* Head */
.nl-product .nl-product__head {
	display: flex;
	flex-direction: column;
	align-items: flex-start;
	gap: 6px;
}

.nl-product .nl-product__category,
.nl-product .nl-product__category:focus {
	font-size: 15px;
	font-weight: 600;
	line-height: 1.4;
	color: var(--nl-action);
	text-decoration: none;
}

.nl-product .nl-product__category:hover {
	color: var(--nl-action);
	text-decoration: underline;
	text-underline-offset: 3px;
}

.nl-product .nl-product__title {
	font-family: var(--nl-font-heading);
	font-size: 40px;
	font-weight: 900;
	line-height: 1.15;
	color: var(--nl-navy);
	overflow-wrap: anywhere;
}

/* Technical data and features */
.nl-product .nl-product__section {
	display: flex;
	flex-direction: column;
	gap: 12px;
}

.nl-product .nl-product__subheading {
	font-family: var(--nl-font-heading);
	font-size: 20px;
	font-weight: 900;
	line-height: 1.3;
	color: var(--nl-navy);
}

.nl-product .nl-product__specs {
	display: grid;
	grid-template-columns: minmax(0, 2fr) minmax(0, 3fr);
	margin: 0;
}

.nl-product .nl-product__specs dt,
.nl-product .nl-product__specs dd {
	margin: 0;
	padding: 10px 0;
	border-bottom: 1px solid #eef2f6;
	font-size: 15px;
	line-height: 1.5;
	overflow-wrap: anywhere;
}

.nl-product .nl-product__specs dt {
	padding-right: 16px;
	font-weight: 400;
	color: var(--nl-text-muted);
}

.nl-product .nl-product__specs dd {
	font-weight: 600;
	color: var(--nl-navy);
}

/* HTML values (e.g. "<ul><li>…</li></ul>"): compact, without the theme's spacing. */
.nl-product .nl-product__specs dd :is(ul, ol, p) {
	margin: 0;
}

.nl-product .nl-product__specs dd :is(ul, ol) {
	padding-left: 1.2em;
}

.nl-product .nl-product__features {
	display: flex;
	flex-wrap: wrap;
	gap: 16px;
	margin: 0;
	padding: 0;
	list-style: none;
}

.nl-product .nl-product__feature {
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 8px;
}

.nl-product .nl-product__features.has-labels .nl-product__feature {
	width: 76px;
}

.nl-product .nl-product__feature-icon {
	position: relative;
	display: block;
	width: 56px;
	height: 56px;
	border-radius: 50%;
}

.nl-product .nl-product__feature-image {
	display: block;
	width: 100%;
	height: 100%;
	max-width: none;
	object-fit: contain;
}

/* The value printed onto the icon ("IP65", "2"), as in the previous plugin. */
.nl-product .nl-product__feature-value {
	position: absolute;
	top: 50%;
	left: 50%;
	font-size: 11px;
	font-weight: 700;
	line-height: 1;
	color: #000;
	white-space: nowrap;
	transform: translate(-50%, -50%);
}

.nl-product .nl-product__feature-label {
	font-size: 13px;
	line-height: 1.3;
	text-align: center;
	color: var(--nl-text);
	overflow-wrap: anywhere;
}

/* Tooltip: a dark bubble above the icon on hover and keyboard focus. */
.nl-product .nl-product__tooltip {
	position: absolute;
	bottom: calc(100% + 8px);
	left: 50%;
	z-index: 10;
	width: max-content;
	max-width: 240px;
	padding: 6px 10px;
	border-radius: 6px;
	background: var(--nl-navy);
	font-size: 14px;
	line-height: 1.4;
	text-align: center;
	color: #fff;
	opacity: 0;
	visibility: hidden;
	transform: translateX(-50%);
	transition: opacity 0.15s ease, visibility 0.15s ease;
	pointer-events: none;
}

.nl-product .nl-product__tooltip::after {
	content: "";
	position: absolute;
	top: 100%;
	left: 50%;
	margin-left: -6px;
	border: 6px solid transparent;
	border-top-color: var(--nl-navy);
}

.nl-product .nl-product__feature-icon:is(:hover, :focus) .nl-product__tooltip {
	opacity: 1;
	visibility: visible;
}

/* Buttons */
.nl-product .nl-product__actions {
	display: flex;
	flex-direction: column;
	gap: 8px;
}

/*
 * Shared button look. Repeated for :hover, :focus and :active, so global button styles of the site
 * (theme, Elementor kit) cannot change the shape in any state.
 */
.nl-product .nl-product__step,
.nl-product .nl-product__step:is(:hover, :focus, :active),
.nl-product .nl-product__load,
.nl-product .nl-product__load:is(:hover, :focus, :active),
.nl-product .nl-product__compare,
.nl-product .nl-product__compare:is(:hover, :focus, :active) {
	display: flex;
	align-items: center;
	justify-content: center;
	margin: 0;
	box-shadow: none;
	transform: none;
	font-family: var(--nl-font-text);
	font-weight: 600;
	line-height: 1;
	text-transform: none;
	letter-spacing: normal;
	white-space: nowrap;
	cursor: pointer;
	transition: background-color 0.2s ease, border-color 0.2s ease, color 0.2s ease;
}

.nl-product .nl-product__actions svg {
	flex: none;
}

/* Truck: − quantity + │ "Load onto truck" in one blue pill. */
.nl-product .nl-product__truck {
	display: flex;
	align-items: stretch;
	width: 100%;
	height: 52px;
	overflow: hidden;
	border-radius: var(--nl-r-pill);
	background: var(--nl-action);
	color: #fff;
}

/* The buttons fill their whole segment on hover; the pill rounds the outer ends. */
.nl-product .nl-product__step,
.nl-product .nl-product__step:is(:hover, :focus, :active),
.nl-product .nl-product__load,
.nl-product .nl-product__load:is(:hover, :focus, :active) {
	height: 100%;
	border: 0;
	border-radius: 0;
	background: transparent;
	color: #fff;
}

.nl-product .nl-product__step:hover,
.nl-product .nl-product__load:hover {
	background: var(--nl-navy);
}

.nl-product .nl-product__step {
	flex: none;
	width: 48px;
	padding: 0;
}

.nl-product .nl-product__step:first-child {
	padding-left: 6px;
}

.nl-product .nl-product__step svg {
	width: 18px;
	height: 18px;
}

.nl-product .nl-product__quantity {
	display: flex;
	align-items: center;
	justify-content: center;
	min-width: 28px;
	font-size: 17px;
	font-weight: 700;
}

/* Stepper: hidden until the product is on the truck, then it slides in from the left. */
.nl-product .nl-product__stepper {
	display: flex;
	flex: none;
	align-items: stretch;
	max-width: 0;
	overflow: hidden;
	visibility: hidden;
	opacity: 0;
	transition: max-width 0.3s ease, opacity 0.2s ease, visibility 0s 0.3s;
}

.nl-product.is-in-truck .nl-product__stepper {
	max-width: 160px;
	visibility: visible;
	opacity: 1;
	transition: max-width 0.3s ease, opacity 0.2s ease 0.1s, visibility 0s;
}

.nl-product .nl-product__divider {
	flex: none;
	width: 1px;
	margin: 12px 0;
	background: rgba(255, 255, 255, 0.45);
}

.nl-product .nl-product__load {
	flex: 1;
	gap: 8px;
	min-width: 0;
	padding: 0 16px;
	font-size: 16px;
}

.nl-product .nl-product__load svg {
	width: 20px;
	height: 20px;
}

/* Only the text of the current state shows. */
.nl-product.is-in-truck .nl-product__load-text--add,
.nl-product:not(.is-in-truck) .nl-product__load-text--remove,
.nl-product .nl-product__compare.is-active .nl-product__compare-text--add,
.nl-product .nl-product__compare:not(.is-active) .nl-product__compare-text--remove {
	display: none;
}

/* Focus rings inside the pill would be cut off by its overflow. */
.nl-product .nl-product__truck :focus-visible {
	outline-offset: -4px;
	outline-color: #fff;
}

.nl-product .nl-product__compare,
.nl-product .nl-product__compare:is(:hover, :focus, :active) {
	gap: 8px;
	width: 100%;
	height: 48px;
	padding: 0 16px;
	border: 1px solid var(--nl-field);
	border-radius: var(--nl-r-pill);
	background: #fff;
	font-size: 15px;
	color: var(--nl-navy);
}

.nl-product .nl-product__compare:hover {
	border-color: var(--nl-navy);
	background: #fff;
	color: var(--nl-navy);
}

.nl-product .nl-product__compare.is-active,
.nl-product .nl-product__compare.is-active:is(:hover, :focus, :active) {
	border-color: var(--nl-action);
	background: var(--nl-chip);
	color: var(--nl-navy);
}

.nl-product .nl-product__compare svg {
	width: 18px;
	height: 18px;
}

/* Similar products */
.nl-portfolio.nl-related {
	display: flex;
	flex-direction: column;
	gap: 24px;
}

.nl-related .nl-related__title {
	font-family: var(--nl-font-heading);
	font-size: 30px;
	font-weight: 900;
	line-height: 1.2;
	color: var(--nl-heading);
}

.nl-related .nl-related__list {
	display: grid;
	grid-template-columns: repeat(4, minmax(0, 1fr));
	gap: 24px;
	margin: 0;
	padding: 0;
	list-style: none;
}

@media (prefers-reduced-motion: reduce) {
	.nl-product .nl-product__stepper,
	.nl-product .nl-product__step,
	.nl-product .nl-product__step:is(:hover, :focus, :active),
	.nl-product .nl-product__load,
	.nl-product .nl-product__load:is(:hover, :focus, :active),
	.nl-product .nl-product__compare,
	.nl-product .nl-product__compare:is(:hover, :focus, :active),
	.nl-product .nl-product__tooltip {
		transition: none;
	}
}

@media (max-width: 1024px) {
	.nl-portfolio.nl-product {
		grid-template-columns: repeat(2, minmax(0, 1fr));
		gap: 32px;
	}

	.nl-product .nl-product__col--media {
		gap: 32px;
	}

	.nl-product .nl-product__title {
		font-size: 32px;
	}

	.nl-related .nl-related__list {
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}
}

@media (max-width: 767px) {
	.nl-portfolio.nl-product {
		display: flex;
		flex-direction: column;
		align-items: stretch;
		gap: 24px;
	}

	.nl-product .nl-product__col {
		display: contents;
	}

	/* Image, title, description, then the rest of the right column in source order. */
	.nl-product .nl-product__media {
		order: 1;
	}

	.nl-product .nl-product__head {
		order: 2;
	}

	.nl-product .nl-product__description {
		order: 3;
	}

	.nl-product .nl-product__col--info > :not(.nl-product__head) {
		order: 4;
	}

	.nl-product .nl-product__heading,
	.nl-related .nl-related__title {
		font-size: 22px;
	}

	.nl-product .nl-product__title {
		font-size: 28px;
	}

	.nl-related .nl-related__list {
		grid-template-columns: minmax(0, 1fr);
		gap: 12px;
	}
}
