/**
 * nl-product-card – product card.
 *
 * Breakpoint template, see nl-base.css. Selectors use two classes, and buttons repeat their colours
 * for :hover and :focus, because the theme (Hello) styles every button pink on hover and focus.
 */

.nl-portfolio .nl-card {
	display: flex;
	flex-direction: column;
	gap: 12px;
	height: 100%;
	padding: 16px;
	border: 1px solid var(--nl-line);
	border-radius: var(--nl-r-card);
	background: #fff;
}

.nl-portfolio .nl-card__media {
	display: block;
	aspect-ratio: 1 / 1;
	overflow: hidden;
	border-radius: var(--nl-r-card-img);
	background: var(--nl-surface);
}

.nl-portfolio .nl-card__image {
	display: block;
	width: 100%;
	height: 100%;
	max-width: none;
	object-fit: cover;
}

.nl-portfolio .nl-card__title {
	font-family: var(--nl-font-heading);
	font-size: 18px;
	font-weight: 700;
	line-height: 1.3;
	color: var(--nl-action);
	overflow-wrap: anywhere;
}

.nl-portfolio .nl-card__link,
.nl-portfolio .nl-card__link:hover,
.nl-portfolio .nl-card__link:focus {
	color: var(--nl-action);
	text-decoration: none;
}

.nl-portfolio .nl-card__link:hover {
	text-decoration: underline;
	text-underline-offset: 3px;
}

.nl-portfolio .nl-card__type {
	margin-top: 4px;
	font-size: 14px;
	line-height: 1.4;
	color: var(--nl-text-muted);
}

.nl-portfolio .nl-card__actions {
	display: flex;
	flex-direction: column;
	gap: 8px;
	margin-top: auto;
}

/*
 * 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-portfolio .nl-card__step,
.nl-portfolio .nl-card__step:is(:hover, :focus, :active),
.nl-portfolio .nl-card__load,
.nl-portfolio .nl-card__load:is(:hover, :focus, :active),
.nl-portfolio .nl-card__compare,
.nl-portfolio .nl-card__compare:is(:hover, :focus, :active),
.nl-portfolio .nl-card__details,
.nl-portfolio .nl-card__details:is(:hover, :focus, :active) {
	display: flex;
	align-items: center;
	justify-content: center;
	margin: 0;
	border-radius: var(--nl-r-pill);
	box-shadow: none;
	transform: none;
	font-family: var(--nl-font-text);
	font-size: 14px;
	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-portfolio .nl-card__actions svg {
	flex: none;
}

/* Truck: − quantity + │ "Load onto truck" in one blue pill. */
.nl-portfolio .nl-card__truck {
	display: flex;
	align-items: stretch;
	width: 100%;
	height: 44px;
	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-portfolio .nl-card__step,
.nl-portfolio .nl-card__step:is(:hover, :focus, :active),
.nl-portfolio .nl-card__load,
.nl-portfolio .nl-card__load:is(:hover, :focus, :active) {
	height: 100%;
	border: 0;
	border-radius: 0;
	background: transparent;
	color: #fff;
}

.nl-portfolio .nl-card__step:hover,
.nl-portfolio .nl-card__load:hover {
	background: var(--nl-navy);
}

.nl-portfolio .nl-card__step {
	flex: none;
	width: 32px;
	padding: 0;
}

.nl-portfolio .nl-card__step:first-child {
	padding-left: 4px;
}

.nl-portfolio .nl-card__step svg {
	width: 16px;
	height: 16px;
}

.nl-portfolio .nl-card__quantity {
	display: flex;
	align-items: center;
	justify-content: center;
	min-width: 22px;
	font-size: 15px;
	font-weight: 700;
}

/* Stepper: hidden until the product is on the truck, then it slides in from the left. */
.nl-portfolio .nl-card__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-portfolio .nl-card.is-in-truck .nl-card__stepper {
	max-width: 120px;
	visibility: visible;
	opacity: 1;
	transition: max-width 0.3s ease, opacity 0.2s ease 0.1s, visibility 0s;
}

.nl-portfolio .nl-card__divider {
	flex: none;
	width: 1px;
	margin: 10px 0;
	background: rgba(255, 255, 255, 0.45);
}

.nl-portfolio .nl-card__load {
	flex: 1;
	gap: 6px;
	min-width: 0;
	padding: 0 8px;
}

.nl-portfolio .nl-card__truck-icon {
	display: none;
	width: 20px;
	height: 20px;
}

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

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

.nl-portfolio .nl-card__compare,
.nl-portfolio .nl-card__compare:is(:hover, :focus, :active) {
	gap: 8px;
	width: 100%;
	height: 44px;
	padding: 0 12px;
	border: 1px solid var(--nl-field);
	background: #fff;
	color: var(--nl-navy);
	/* "Remove from comparison" may need two lines on narrow cards. */
	line-height: 1.15;
	white-space: normal;
	text-align: center;
}

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

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

.nl-portfolio .nl-card__compare svg {
	width: 18px;
	height: 18px;
}

.nl-portfolio .nl-card__details,
.nl-portfolio .nl-card__details:is(:hover, :focus, :active) {
	gap: 4px;
	width: 100%;
	height: 44px;
	padding: 0 12px;
	border: 1.5px solid var(--nl-action);
	background: #fff;
	color: var(--nl-action);
	text-decoration: none;
}

.nl-portfolio .nl-card__details:hover {
	background: var(--nl-action);
	color: #fff;
	text-decoration: none;
}

.nl-portfolio .nl-card__details svg {
	width: 16px;
	height: 16px;
}

@media (prefers-reduced-motion: reduce) {
	.nl-portfolio .nl-card__stepper,
	.nl-portfolio .nl-card__step,
	.nl-portfolio .nl-card__step:is(:hover, :focus, :active),
	.nl-portfolio .nl-card__load,
	.nl-portfolio .nl-card__load:is(:hover, :focus, :active),
	.nl-portfolio .nl-card__compare,
	.nl-portfolio .nl-card__compare:is(:hover, :focus, :active),
	.nl-portfolio .nl-card__details,
	.nl-portfolio .nl-card__details:is(:hover, :focus, :active) {
		transition: none;
	}
}

@media (max-width: 767px) {
	.nl-portfolio .nl-card {
		padding: 12px;
		border-radius: 34px;
	}

	.nl-portfolio .nl-card__title {
		font-size: 16px;
	}

	.nl-portfolio .nl-card__truck-icon {
		display: block;
	}

	/* Visually hidden, still the accessible name of the button. */
	.nl-portfolio .nl-card__load-text {
		position: absolute;
		width: 1px;
		height: 1px;
		overflow: hidden;
		clip: rect(0 0 0 0);
		white-space: nowrap;
	}
}
