/**
 * NOWOŚCI — GRID-ONLY SHORTCODE.
 *
 * Used by [vm_market_new_products_grid] inside an Elementor-built section.
 * Section background, headings, decoration, spacing and CTA belong to Elementor.
 */

.vm-market-new-products-grid,
.vm-market-new-products-grid * {
	box-sizing: border-box;
}

.vm-market-new-products-grid {
	--vm-new-accent: var(--e-global-color-accent, #ae1d27);
	--vm-new-text: var(--e-global-color-text, #262223);

	display: grid;
	width: 100%;
	height: clamp(500px, 42vw, 620px);
	grid-template-columns: minmax(0, 1.12fr) minmax(0, 0.88fr);
	grid-template-rows: repeat(2, minmax(0, 1fr));
	gap: clamp(8px, 1.4vw, 16px);
	color: var(--vm-new-text);
	font-family: inherit;
}

.vm-market-new-products-grid a {
	color: inherit;
	text-decoration: none;
}

.vm-market-new-products-grid .vm-market-product-card {
	position: relative;
	display: flex;
	min-width: 0;
	min-height: 0;
	flex-direction: column;
	overflow: hidden;
	border: 1px solid var(--vm-market-border, #e5dedf);
	border-radius: 6px;
	background: var(--vm-market-surface-white, #fff);
	box-shadow: 0 7px 18px rgba(20, 18, 19, 0.08);
}

.vm-market-new-products-grid .vm-market-product-card--new-feature {
	grid-column: 1;
	grid-row: 1 / span 2;
}

.vm-market-new-products-grid .vm-market-product-card--new-compact:nth-child(2) {
	grid-column: 2;
	grid-row: 1;
}

.vm-market-new-products-grid .vm-market-product-card--new-compact:nth-child(3) {
	grid-column: 2;
	grid-row: 2;
}

.vm-market-new-products-grid .vm-market-product-card__image {
	position: relative;
	display: block;
	min-width: 0;
	min-height: 0;
	flex: 1 1 0;
	overflow: hidden;
	background: var(--vm-market-surface-dark, #0d0b0c);
}

.vm-market-new-products-grid .vm-market-product-card__image-link {
	display: block;
	width: 100%;
	height: 100%;
}

.vm-market-new-products-grid .vm-market-product-card__image img {
	display: block;
	width: 100%;
	height: 100%;
	margin: 0;
	object-fit: cover;
	transition: transform 500ms cubic-bezier(0.16, 1, 0.3, 1);
}

.vm-market-new-products-grid .vm-market-product-card:hover
.vm-market-product-card__image img {
	transform: scale(1.025);
}

.vm-market-new-products-grid .vm-market-product-card__body {
	position: relative;
	display: flex;
	min-width: 0;
	flex: 0 0 auto;
	justify-content: center;
	flex-direction: column;
	gap: 2px;
	padding: clamp(8px, 1.4vw, 14px);
	background: var(--vm-market-surface-white, #fff);
}

.vm-market-new-products-grid .vm-market-product-card--new-feature
.vm-market-product-card__body {
	min-height: clamp(78px, 13vw, 112px);
}

.vm-market-new-products-grid .vm-market-product-card--new-compact
.vm-market-product-card__body {
	min-height: clamp(66px, 10vw, 88px);
}

.vm-market-new-products-grid .vm-market-product-card__category {
	display: block;
	overflow: hidden;
	color: color-mix(in srgb, var(--vm-new-text) 54%, transparent);
	font-size: clamp(7px, 0.8vw, 9px);
	font-weight: 600;
	letter-spacing: 0.07em;
	line-height: 1.2;
	text-overflow: ellipsis;
	text-transform: uppercase;
	white-space: nowrap;
}

.vm-market-new-products-grid .vm-market-product-card h3 {
	margin: 2px 0 4px;
	overflow: hidden;
	font-size: clamp(10px, 1.5vw, 15px);
	font-weight: 500;
	line-height: 1.2;
	text-overflow: ellipsis;
	white-space: nowrap;
}

.vm-market-new-products-grid .vm-market-product-card__bottom {
	display: flex;
	width: 100%;
	align-items: center;
	justify-content: space-between;
	gap: 8px;
	margin-top: auto;
}

.vm-market-new-products-grid .vm-market-price {
	display: flex;
	min-width: 0;
	align-items: baseline;
	gap: 5px;
	font-size: clamp(9px, 1.25vw, 13px);
	font-weight: 600;
	line-height: 1;
	white-space: nowrap;
}

.vm-market-new-products-grid .vm-market-price del {
	opacity: 0.5;
}

.vm-market-new-products-grid .vm-market-price ins {
	color: var(--vm-new-accent);
	text-decoration: none;
}

.vm-market-new-products-grid .vm-market-product-card__actions {
	display: flex;
	flex: 0 0 auto;
	align-items: center;
	margin-left: auto;
}

.vm-market-new-products-grid .vm-market-product-card__add,
.vm-market-new-products-grid .vm-market-add {
	display: grid;
	width: 27px !important;
	height: 27px !important;
	place-items: center;
	padding: 0;
	border: 0;
	background: transparent;
	color: var(--vm-new-accent);
}

.vm-market-new-products-grid .vm-market-product-card__add svg,
.vm-market-new-products-grid .vm-market-add svg {
	display: block;
	width: 17px;
	height: 17px;
	fill: none;
	stroke: currentColor;
	stroke-width: 1.8;
	stroke-linecap: round;
	stroke-linejoin: round;
}

@media (max-width: 767px) {
	.vm-market-new-products-grid {
		height: clamp(220px, 62vw, 310px);
		grid-template-columns: minmax(0, 1.08fr) minmax(0, 0.92fr);
		gap: 6px;
	}

	.vm-market-new-products-grid .vm-market-product-card__body {
		gap: 1px;
		padding: 6px;
	}

	.vm-market-new-products-grid .vm-market-product-card--new-feature
	.vm-market-product-card__body {
		min-height: clamp(48px, 12.1vw, 62px);
	}

	.vm-market-new-products-grid .vm-market-product-card--new-compact
	.vm-market-product-card__body {
		min-height: clamp(40px, 10.15vw, 52px);
	}

	.vm-market-new-products-grid .vm-market-product-card__category {
		font-size: clamp(5px, 1.45vw, 7px);
	}

	.vm-market-new-products-grid .vm-market-product-card h3 {
		margin: 1px 0 3px;
		font-size: clamp(8px, 2.15vw, 10px);
	}

	.vm-market-new-products-grid .vm-market-price {
		gap: 3px;
		font-size: clamp(8px, 2.05vw, 10px);
	}

	.vm-market-new-products-grid .vm-market-product-card__add,
	.vm-market-new-products-grid .vm-market-add {
		width: 22px !important;
		height: 22px !important;
	}

	.vm-market-new-products-grid .vm-market-product-card__add svg,
	.vm-market-new-products-grid .vm-market-add svg {
		width: 14px;
		height: 14px;
	}
}
