/* ==========================================================
   DENVAS — PREMIUM PRODUCT CARDS & CURATED CAROUSEL
   Global, future-proof presentation for WooCommerce loops.

   The card layer is intentionally separate from page styles:
   - the same hierarchy is used on home, shop, category, search,
     related, upsell and cross-sell product loops;
   - curated home products become a manual scroll-snap carousel;
   - no product data, price or purchasing logic is changed.
   ========================================================== */

:root {
	--denvas-card-ink: #171714;
	--denvas-card-muted: #746d65;
	--denvas-card-surface: #fbf8f3;
	--denvas-card-image: #ffffff;
	--denvas-card-line: rgba(67, 51, 35, 0.15);
	--denvas-card-accent: #c99463;
	--denvas-card-gap: clamp(14px, 1.3vw, 20px);
	--denvas-card-title-lines: 3;
	--denvas-card-title-height: 3.51em;
}

html body.denvas-theme .denvas-products {
	padding-top: 14px !important;
}

/* ----------------------------------------------------------
   01. PRODUCT LOOP DENSITY
   Five cards on a wide desktop; responsive browsing grids.
   ---------------------------------------------------------- */

html body.denvas-theme ul.products {
	display: grid !important;
	grid-template-columns: repeat(5, minmax(0, 1fr)) !important;
	grid-auto-rows: 1fr !important;
	align-items: stretch !important;
	gap: var(--denvas-card-gap) !important;
	margin: 0 !important;
	padding: 0 !important;
	list-style: none !important;
}

html body.denvas-theme ul.products::before,
html body.denvas-theme ul.products::after {
	display: none !important;
	content: none !important;
}

/* ----------------------------------------------------------
   02. CLASSIC WOOCOMMERCE CARD

   Equal-height contract:
   - every image uses the same aspect ratio;
   - every category uses one fixed line;
   - every title reserves exactly three lines;
   - grid rows and carousel items stretch to one height.
   ---------------------------------------------------------- */

html body.denvas-theme ul.products > li.product {
	--denvas-card-local-surface: var(--denvas-card-surface);
	--denvas-card-local-image: var(--denvas-card-image);
	--denvas-card-local-ink: var(--denvas-card-ink);
	--denvas-card-local-muted: var(--denvas-card-muted);
	--denvas-card-local-line: var(--denvas-card-line);
	--denvas-card-action-fill: var(--denvas-card-ink);
	--denvas-card-action-hover-ink: #fffaf3;

	position: relative;
	float: none !important;
	display: flex !important;
	flex-direction: column;
	width: auto !important;
	min-width: 0;
	height: auto !important;
	align-self: stretch;
	margin: 0 !important;
	padding: 0 !important;
	overflow: hidden;
	border: 1px solid var(--denvas-card-local-line) !important;
	border-top-color: var(--denvas-card-local-line) !important;
	border-radius: 2px;
	background: var(--denvas-card-local-surface) !important;
	color: var(--denvas-card-local-ink) !important;
	box-shadow: 0 8px 28px rgba(31, 23, 15, 0.035);
	transition:
		transform var(--denvas-motion-card-duration, 0.55s) var(--denvas-motion-card-ease, cubic-bezier(0.2, 0.7, 0.2, 1)),
		border-color 0.36s ease,
		box-shadow 0.42s ease !important;
}

html body.denvas-theme ul.products > li.product::before {
	position: absolute;
	top: 0;
	left: 20px;
	z-index: 4;
	width: 42px;
	height: 2px;
	background: var(--denvas-card-accent);
	content: "";
	transform-origin: left center;
	transition: width 0.5s cubic-bezier(0.22, 1, 0.36, 1);
	pointer-events: none;
}

html body.denvas-theme ul.products > li.product > figure {
	position: relative;
	order: 0;
	width: 100%;
	margin: 0 !important;
	overflow: hidden;
	border-bottom: 1px solid rgba(67, 51, 35, 0.08);
	background: var(--denvas-card-local-image);
	aspect-ratio: 1.38 / 1;
}

html body.denvas-theme ul.products > li.product > figure > a,
html body.denvas-theme ul.products > li.product > figure .ct-media-container {
	display: block;
	width: 100%;
	height: 100%;
}

html body.denvas-theme ul.products > li.product > figure img {
	display: block;
	width: 100% !important;
	height: 100% !important;
	margin: 0 !important;
	padding: clamp(6px, 0.65vw, 10px);
	background: transparent !important;
	object-fit: contain !important;
	aspect-ratio: auto !important;
	transform: scale(1);
	transition: transform var(--denvas-motion-card-duration, 0.55s) var(--denvas-motion-card-ease, cubic-bezier(0.2, 0.7, 0.2, 1)) !important;
}

/* Fallback for a classic Woo template without Blocksy's figure. */
html body.denvas-theme ul.products > li.product > a.woocommerce-LoopProduct-link > img {
	display: block;
	order: 0;
	width: 100% !important;
	margin: 0 !important;
	padding: clamp(6px, 0.65vw, 10px);
	background: var(--denvas-card-local-image) !important;
	object-fit: contain !important;
	aspect-ratio: 1.38 / 1 !important;
}

/* Category comes first visually even when Blocksy prints it later. */
html body.denvas-theme ul.products > li.product .entry-meta {
	order: 1;
	width: auto;
	height: 13px;
	min-height: 13px;
	margin: 18px 20px 0 !important;
	padding: 0 !important;
	overflow: hidden;
	border: 0 !important;
}

html body.denvas-theme ul.products > li.product .entry-meta > li {
	margin: 0 !important;
	padding: 0 !important;
}

html body.denvas-theme ul.products > li.product .meta-categories {
	display: block !important;
	width: 100%;
	height: 13px;
	overflow: hidden;
	font-size: 0 !important;
	line-height: 1 !important;
}

html body.denvas-theme ul.products > li.product .meta-categories > a {
	display: none !important;
}

html body.denvas-theme ul.products > li.product .meta-categories > a:first-of-type {
	display: block !important;
	max-width: 100%;
	overflow: hidden;
	color: #976238 !important;
	font-family: var(--denvas-sans, "Manrope", sans-serif) !important;
	font-size: 9.5px !important;
	font-weight: 700 !important;
	line-height: 1.3 !important;
	letter-spacing: 0.14em !important;
	text-decoration: none !important;
	text-overflow: ellipsis;
	text-transform: uppercase;
	white-space: nowrap;
}

html body.denvas-theme ul.products > li.product .woocommerce-loop-product__title {
	display: -webkit-box;
	order: 2;
	height: var(--denvas-card-title-height);
	min-height: var(--denvas-card-title-height);
	max-height: var(--denvas-card-title-height);
	margin: 9px 20px 0 !important;
	padding: 0 !important;
	overflow: hidden;
	color: var(--denvas-card-local-ink) !important;
	font-family: var(--denvas-serif, "Cormorant Garamond", Georgia, serif) !important;
	font-size: clamp(18.5px, 1.25vw, 20.5px) !important;
	font-weight: 500 !important;
	line-height: 1.17 !important;
	letter-spacing: -0.018em !important;
	-webkit-box-orient: vertical;
	-webkit-line-clamp: var(--denvas-card-title-lines);
}

html body.denvas-theme ul.products > li.product .woocommerce-loop-product__title a {
	color: inherit !important;
	text-decoration: none !important;
}

html body.denvas-theme ul.products > li.product:not(:has(.meta-categories > a)) .woocommerce-loop-product__title {
	margin-top: 40px !important;
}

html body.denvas-theme ul.products > li.product .price {
	order: 3;
	margin: 13px 20px 18px !important;
	padding: 0 !important;
	color: var(--denvas-card-local-ink) !important;
	font-family: var(--denvas-sans, "Manrope", sans-serif) !important;
	font-size: 14px !important;
	font-weight: 700 !important;
	line-height: 1.3 !important;
	letter-spacing: -0.01em;
}

html body.denvas-theme ul.products > li.product .price del {
	margin-right: 6px;
	color: var(--denvas-card-local-muted) !important;
	font-size: 0.88em;
	font-weight: 500;
}

html body.denvas-theme ul.products > li.product .price ins {
	color: inherit !important;
	text-decoration: none !important;
}

html body.denvas-theme ul.products > li.product .star-rating {
	order: 4;
	margin: 11px 20px 0 !important;
	color: var(--denvas-card-accent) !important;
}

/* The card has one clear action. Native loop actions stay in the DOM. */
html body.denvas-theme ul.products > li.product .ct-woo-card-actions {
	display: contents !important;
}

html body.denvas-theme ul.products > li.product .ct-woo-card-actions > .button,
html body.denvas-theme ul.products > li.product > .button {
	display: none !important;
}

html body.denvas-theme ul.products > li.product .denvas-product-card__action {
	position: relative;
	z-index: 1;
	order: 20;
	display: flex;
	width: auto;
	min-height: 50px;
	margin: auto 20px 20px;
	padding: 13px 15px;
	align-items: center;
	justify-content: space-between;
	gap: 16px;
	overflow: hidden;
	border: 1px solid rgba(151, 98, 56, 0.58);
	border-radius: 1px;
	background-color: transparent;
	background-image: linear-gradient(var(--denvas-card-action-fill), var(--denvas-card-action-fill));
	background-position: left center;
	background-repeat: no-repeat;
	background-size: 0% 100%;
	color: var(--denvas-card-local-ink) !important;
	font-family: var(--denvas-serif, "Cormorant Garamond", Georgia, serif);
	font-size: 18px;
	font-weight: 500;
	line-height: 1.1;
	letter-spacing: -0.01em;
	text-decoration: none !important;
	text-transform: none;
	transform: none !important;
	transition:
		background-size var(--denvas-motion-fill-duration, 0.46s) var(--denvas-motion-fill-ease, cubic-bezier(0.77, 0, 0.18, 1)),
		border-color 0.24s ease,
		color 0.24s ease,
		box-shadow 0.28s ease !important;
}

html body.denvas-theme ul.products > li.product .denvas-product-card__action > span:last-child {
	font-family: Arial, sans-serif;
	font-size: 17px;
	font-weight: 400;
	line-height: 1;
	transition: transform var(--denvas-motion-arrow-duration, 0.42s) var(--denvas-motion-arrow-ease, cubic-bezier(0.22, 1, 0.36, 1));
}

html body.denvas-theme ul.products > li.product .denvas-product-card__action:focus-visible {
	outline: 2px solid var(--denvas-motion-focus, #c99463) !important;
	outline-offset: 3px !important;
}

html body.denvas-theme ul.products > li.product:focus-within {
	border-color: rgba(151, 98, 56, 0.48) !important;
}

/* Sale badge: compact, warm and consistent with the new hierarchy. */
html body.denvas-theme ul.products > li.product .onsale {
	top: 14px !important;
	left: 14px !important;
	z-index: 5;
	min-width: 0 !important;
	min-height: 0 !important;
	padding: 6px 9px !important;
	border: 1px solid rgba(255, 255, 255, 0.28) !important;
	border-radius: 0 !important;
	background: #24231f !important;
	color: #fffaf3 !important;
	font-family: var(--denvas-sans, "Manrope", sans-serif) !important;
	font-size: 9px !important;
	font-weight: 700 !important;
	line-height: 1 !important;
	letter-spacing: 0.08em !important;
	text-transform: uppercase;
}

@media (hover: hover) and (pointer: fine) {
	html body.denvas-theme ul.products > li.product:hover {
		border-color: rgba(67, 51, 35, 0.22) !important;
		box-shadow: 0 14px 32px rgba(31, 23, 15, 0.085);
		transform: translateY(-3px);
	}

	html body.denvas-theme ul.products > li.product:hover::before {
		width: 64px;
	}

	html body.denvas-theme ul.products > li.product:hover > figure img {
		transform: scale(1.018);
	}

	html body.denvas-theme ul.products > li.product .denvas-product-card__action:hover {
		border-color: var(--denvas-card-action-fill);
		background-size: 100% 100%;
		color: var(--denvas-card-action-hover-ink) !important;
		box-shadow: 0 8px 20px rgba(25, 18, 11, 0.10);
	}

	html body.denvas-theme ul.products > li.product .denvas-product-card__action:hover > span:last-child {
		transform: translateX(4px);
	}
}

@media (hover: none), (pointer: coarse) {
	html body.denvas-theme ul.products > li.product:hover,
	html body.denvas-theme ul.products > li.product:hover > figure img {
		transform: none !important;
		box-shadow: 0 8px 28px rgba(31, 23, 15, 0.035);
	}

	html body.denvas-theme ul.products > li.product .denvas-product-card__action:active {
		opacity: 0.88;
		transition-duration: 0.12s !important;
	}
}

/* ----------------------------------------------------------
   03. DARK WORLD VARIANT
   ---------------------------------------------------------- */

html body.denvas-theme.denvas-world-zdrowie ul.products > li.product {
	--denvas-card-local-surface: #11110f;
	--denvas-card-local-image: #181816;
	--denvas-card-local-ink: #eee8df;
	--denvas-card-local-muted: #aaa198;
	--denvas-card-local-line: #34312c;
	--denvas-card-action-fill: #c99463;
	--denvas-card-action-hover-ink: #151411;
}

html body.denvas-theme.denvas-world-zdrowie ul.products > li.product .meta-categories > a:first-of-type {
	color: #d5a570 !important;
}

/* ----------------------------------------------------------
   04. WOOCOMMERCE BLOCKS FALLBACK
   Keeps future block-based product collections on-brand too.
   ---------------------------------------------------------- */

html body.denvas-theme .wc-block-grid__products,
html body.denvas-theme .wp-block-woocommerce-product-template {
	grid-auto-rows: 1fr !important;
	align-items: stretch !important;
	gap: var(--denvas-card-gap) !important;
}

html body.denvas-theme .wc-block-grid__product,
html body.denvas-theme .wp-block-woocommerce-product-template > .wc-block-product {
	display: flex !important;
	flex-direction: column;
	height: 100%;
	overflow: hidden;
	border: 1px solid var(--denvas-card-line) !important;
	border-top-color: var(--denvas-card-accent) !important;
	background: var(--denvas-card-surface) !important;
	box-shadow: 0 8px 28px rgba(31, 23, 15, 0.035);
}

html body.denvas-theme .wc-block-grid__product-image,
html body.denvas-theme .wc-block-components-product-image {
	background: var(--denvas-card-image);
}

html body.denvas-theme .wc-block-grid__product-title,
html body.denvas-theme .wp-block-post-title.wc-block-components-product-title {
	display: -webkit-box;
	height: var(--denvas-card-title-height);
	min-height: var(--denvas-card-title-height);
	max-height: var(--denvas-card-title-height);
	overflow: hidden;
	color: var(--denvas-card-ink) !important;
	font-family: var(--denvas-serif, "Cormorant Garamond", Georgia, serif) !important;
	font-size: clamp(19px, 1.45vw, 22px) !important;
	font-weight: 500 !important;
	line-height: 1.17 !important;
	-webkit-box-orient: vertical;
	-webkit-line-clamp: var(--denvas-card-title-lines);
}

html body.denvas-theme .wc-block-grid__product .wp-block-button,
html body.denvas-theme .wp-block-woocommerce-product-template > .wc-block-product .wp-block-button {
	margin-top: auto;
}

html body.denvas-theme .wc-block-grid__product-category,
html body.denvas-theme .wp-block-post-terms.taxonomy-product_cat {
	margin-top: 18px !important;
	padding-inline: 20px !important;
	color: #976238 !important;
	font-size: 9.5px !important;
	font-weight: 700 !important;
	letter-spacing: 0.14em !important;
	text-transform: uppercase;
}

/* ----------------------------------------------------------
   05. CURATED HOME CAROUSEL
   JS adds .denvas-product-carousel; without JS the grid remains.
   ---------------------------------------------------------- */

html body.denvas-theme .denvas-product-carousel {
	position: relative;
}

html body.denvas-theme .denvas-product-carousel .denvas-section-heading {
	align-items: center;
	gap: 18px;
	margin-bottom: 13px;
}

html body.denvas-theme .denvas-product-carousel .denvas-section-heading > h2 {
	margin-right: auto;
}

html body.denvas-theme .denvas-product-carousel .denvas-section-heading > a {
	order: 3;
	margin-left: 12px;
	white-space: nowrap;
}

html body.denvas-theme .denvas-carousel__controls {
	order: 2;
	display: flex;
	align-items: center;
	gap: 0;
	white-space: nowrap;
}

html body.denvas-theme .denvas-carousel__count {
	min-width: 48px;
	margin-right: 12px;
	color: #776e65;
	font-family: var(--denvas-sans, "Manrope", sans-serif);
	font-size: 9.5px;
	font-weight: 700;
	line-height: 1;
	letter-spacing: 0.12em;
	text-align: center;
}

html body.denvas-theme .denvas-carousel__rail {
	display: none;
}

html body.denvas-theme .denvas-carousel__rail > span {
	display: block;
	width: 0;
	height: 100%;
	background: var(--denvas-card-accent);
	transform-origin: left center;
	transition: width 0.34s ease;
}

html body.denvas-theme .denvas-carousel__button {
	display: inline-flex;
	width: 39px;
	height: 39px;
	min-width: 39px;
	min-height: 39px;
	padding: 0;
	align-items: center;
	justify-content: center;
	border: 1px solid rgba(74, 57, 40, 0.22);
	border-radius: 0;
	background: transparent;
	color: var(--denvas-card-ink);
	font-family: Arial, sans-serif;
	font-size: 17px;
	font-weight: 400;
	line-height: 1;
	cursor: pointer;
	transform: none !important;
	transition: background-color 0.24s ease, border-color 0.24s ease, color 0.24s ease, opacity 0.24s ease !important;
}

html body.denvas-theme .denvas-carousel__button--previous {
	border-radius: 999px 0 0 999px;
}

html body.denvas-theme .denvas-carousel__button--next {
	margin-left: -1px;
	border-radius: 0 999px 999px 0;
}

html body.denvas-theme .denvas-carousel__button:disabled {
	opacity: 0.3;
	cursor: default;
}

html body.denvas-theme .denvas-carousel__button:focus-visible {
	outline: 2px solid var(--denvas-motion-focus, #c99463) !important;
	outline-offset: 3px !important;
}

@media (hover: hover) and (pointer: fine) {
	html body.denvas-theme .denvas-carousel__button:not(:disabled):hover {
		border-color: var(--denvas-card-ink);
		background: var(--denvas-card-ink);
		color: #fffaf3;
	}
}

html body.denvas-theme .denvas-product-carousel ul.products {
	display: flex !important;
	grid-template-columns: none !important;
	align-items: stretch !important;
	gap: 18px !important;
	margin: -8px 0 -10px !important;
	padding: 8px 1px 22px !important;
	overflow-x: auto;
	overflow-y: hidden;
	overscroll-behavior-inline: contain;
	scroll-behavior: smooth;
	scroll-padding-inline: 1px;
	scroll-snap-type: x mandatory;
	scrollbar-width: none;
	-webkit-overflow-scrolling: touch;
}

html body.denvas-theme .denvas-product-carousel ul.products::-webkit-scrollbar {
	display: none;
}

html body.denvas-theme .denvas-product-carousel ul.products > li.product {
	flex: 0 0 calc(20% - 14.4px) !important;
	height: auto !important;
	scroll-snap-align: start;
	scroll-snap-stop: normal;
}

html body.denvas-theme .denvas-product-carousel.is-dragging ul.products {
	cursor: grabbing;
	scroll-snap-type: none;
}

/* ----------------------------------------------------------
   06. RESPONSIVE DENSITY
   ---------------------------------------------------------- */

@media (max-width: 1280px) {
	html body.denvas-theme ul.products {
		grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
	}

	html body.denvas-theme .denvas-product-carousel ul.products {
		gap: 16px !important;
	}

	html body.denvas-theme .denvas-product-carousel ul.products > li.product {
		flex-basis: calc(25% - 12px) !important;
	}
}

@media (max-width: 980px) {
	html body.denvas-theme ul.products {
		grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
	}

	html body.denvas-theme .denvas-product-carousel ul.products {
		gap: 14px !important;
	}

	html body.denvas-theme .denvas-product-carousel ul.products > li.product {
		flex-basis: calc(33.3333% - 9.3333px) !important;
	}

	html body.denvas-theme ul.products > li.product .woocommerce-loop-product__title {
		font-size: 20px !important;
	}
}

@media (max-width: 720px) {
	html body.denvas-theme ul.products {
		grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
		gap: 11px !important;
	}

	html body.denvas-theme .denvas-product-carousel .denvas-section-heading {
		display: grid !important;
		grid-template-columns: minmax(0, 1fr) auto;
		align-items: end !important;
		column-gap: 12px;
		row-gap: 9px;
	}

	html body.denvas-theme .denvas-product-carousel .denvas-section-heading > h2 {
		grid-column: 1 / -1;
		grid-row: 1;
		margin: 0 !important;
	}

	html body.denvas-theme .denvas-product-carousel .denvas-section-heading > a {
		grid-column: 2;
		grid-row: 2;
		justify-self: end;
		margin: 0 !important;
	}

	html body.denvas-theme .denvas-product-carousel .denvas-carousel__controls {
		grid-column: 1;
		grid-row: 2;
		justify-self: start;
	}

	html body.denvas-theme .denvas-product-carousel ul.products > li.product {
		flex-basis: 44% !important;
	}
}

@media (max-width: 540px) {
	html body.denvas-theme .denvas-products {
		padding-inline: 10px;
	}

	html body.denvas-theme ul.products > li.product::before {
		left: 15px;
		width: 34px;
	}

	html body.denvas-theme ul.products > li.product .entry-meta {
		margin: 15px 15px 0 !important;
	}

	html body.denvas-theme ul.products > li.product .woocommerce-loop-product__title {
		margin-right: 15px !important;
		margin-left: 15px !important;
		font-size: 18.5px !important;
	}

	html body.denvas-theme ul.products > li.product .price,
	html body.denvas-theme ul.products > li.product .star-rating {
		margin-right: 15px !important;
		margin-left: 15px !important;
	}

	html body.denvas-theme ul.products > li.product .denvas-product-card__action {
		min-height: 46px;
		margin-right: 15px;
		margin-bottom: 15px;
		margin-left: 15px;
		padding: 11px 12px;
		font-size: 16.5px;
	}

	html body.denvas-theme .denvas-carousel__rail {
		display: none;
	}

	html body.denvas-theme .denvas-carousel__count {
		min-width: 39px;
		font-size: 9px;
	}

	html body.denvas-theme .denvas-carousel__button {
		width: 37px;
		height: 37px;
		min-width: 37px;
		min-height: 37px;
	}

	html body.denvas-theme .denvas-product-carousel ul.products {
		gap: 12px !important;
	}

	html body.denvas-theme .denvas-product-carousel ul.products > li.product {
		flex-basis: 86% !important;
	}
}

@media (prefers-reduced-motion: reduce) {
	html body.denvas-theme ul.products > li.product,
	html body.denvas-theme ul.products > li.product::before,
	html body.denvas-theme ul.products > li.product > figure img,
	html body.denvas-theme ul.products > li.product .denvas-product-card__action,
	html body.denvas-theme ul.products > li.product .denvas-product-card__action > span:last-child,
	html body.denvas-theme .denvas-carousel__button,
	html body.denvas-theme .denvas-carousel__rail > span {
		transition-duration: 0.01ms !important;
	}

	html body.denvas-theme .denvas-product-carousel ul.products {
		scroll-behavior: auto;
	}

	html body.denvas-theme ul.products > li.product:hover,
	html body.denvas-theme ul.products > li.product:hover > figure img {
		transform: none !important;
	}
}

/* DENVAS audit remediation — readable catalogue microcopy. */
html body.denvas-theme ul.products > li.product .meta-categories > a:first-of-type,
html body.denvas-theme .wc-block-grid__product-category,
html body.denvas-theme .wp-block-post-terms.taxonomy-product_cat,
html body.denvas-theme ul.products > li.product > .denvas-product-card__stock {
	font-size: 11px !important;
}

html body.denvas-theme ul.products > li.product .onsale {
	font-size: 10px !important;
}

html body.denvas-theme .denvas-carousel__count {
	font-size: 10.5px !important;
}

/* ----------------------------------------------------------
   07. MOBILE CARD CONTAINMENT — 2026-09-19
   Keep content widths inclusive of both card insets. Explicit
   bounds also neutralise inherited theme widths/minimum widths.
   Desktop, grid density, image scaling and commerce stay intact.
   ---------------------------------------------------------- */

@media (max-width: 720px) {
	html body.denvas-theme ul.products {
		min-width: 0 !important;
		max-width: 100%;
		/* Size each row from its own cards, not the longest title in the
		   entire catalogue. Items still stretch equally within their row. */
		grid-auto-rows: auto !important;
		align-content: start !important;
	}

	html body.denvas-theme ul.products > li.product {
		--denvas-card-mobile-inset: clamp(10px, 3vw, 15px);
		box-sizing: border-box;
		min-width: 0 !important;
		max-width: 100% !important;
		align-items: stretch;
	}

	html body.denvas-theme ul.products > li.product > figure,
	html body.denvas-theme ul.products > li.product > a.woocommerce-LoopProduct-link {
		box-sizing: border-box;
		min-width: 0 !important;
		max-width: 100%;
		flex-shrink: 0;
	}

	html body.denvas-theme ul.products > li.product .entry-meta,
	html body.denvas-theme ul.products > li.product .woocommerce-loop-product__title,
	html body.denvas-theme ul.products > li.product .price,
	html body.denvas-theme ul.products > li.product .denvas-product-card__action {
		box-sizing: border-box;
		width: calc(100% - var(--denvas-card-mobile-inset) - var(--denvas-card-mobile-inset)) !important;
		min-width: 0 !important;
		max-width: calc(100% - var(--denvas-card-mobile-inset) - var(--denvas-card-mobile-inset)) !important;
		margin-right: var(--denvas-card-mobile-inset) !important;
		margin-left: var(--denvas-card-mobile-inset) !important;
		align-self: flex-start;
		flex-shrink: 0;
	}

	/* Let complete names wrap; row-local stretching and auto CTA
	   margins still align the bottoms of neighbouring cards. */
	html body.denvas-theme ul.products > li.product .woocommerce-loop-product__title {
		display: block;
		height: auto;
		max-height: none;
		white-space: normal;
		word-break: normal;
		overflow-wrap: anywhere;
		-webkit-line-clamp: unset;
	}

	html body.denvas-theme ul.products > li.product .woocommerce-loop-product__title a {
		display: block;
		min-width: 0;
		max-width: 100%;
		white-space: normal;
		word-break: normal;
		overflow-wrap: anywhere;
	}

	html body.denvas-theme ul.products > li.product .price {
		white-space: normal;
		overflow-wrap: anywhere;
	}

	html body.denvas-theme ul.products > li.product .denvas-product-card__action {
		min-height: 48px;
		padding: 10px clamp(8px, 2vw, 12px);
		gap: 6px;
		font-size: clamp(15px, 4vw, 18px);
		line-height: 1.2;
	}

	/* A narrow phone may wrap the label at the space, not clip it.
	   The arrow keeps its own space and the entire link stays tappable. */
	html body.denvas-theme ul.products > li.product .denvas-product-card__action > span:first-child {
		flex: 1 1 auto;
		min-width: 0;
		white-space: normal;
		word-break: normal;
		overflow-wrap: anywhere;
	}

	html body.denvas-theme ul.products > li.product .denvas-product-card__action > span:last-child {
		flex: 0 0 auto;
		font-size: 16px;
	}
}

/* DENVAS_CARD_SPACING_AND_CATEGORY_CONTROLS_BEGIN — 2026-09-30 */
/* Each row follows its own tallest card; buttons remain aligned within a row. */
html body.denvas-theme.denvas-catalog-modern-v3 #main-content ul.products,
html body.denvas-theme.tax-product_cat #main-content ul.products {
	grid-auto-rows: auto !important;
	align-content: start !important;
}

/* Match the existing home/shop controls on product category archives. */
html body.denvas-theme.tax-product_cat #main-content ul.products > li.product > .denvas-product-card__favourite {
	position: absolute !important;
	z-index: 8;
	top: 14px !important;
	right: 14px !important;
	bottom: auto !important;
	left: auto !important;
	width: 40px !important;
	min-width: 40px !important;
	max-width: 40px !important;
	height: 40px !important;
	min-height: 40px !important;
	display: grid !important;
	place-items: center;
	margin: 0 !important;
	padding: 0 !important;
	border: 1px solid rgba(23, 21, 18, .14) !important;
	border-radius: 50% !important;
	appearance: none;
	background: rgba(255, 255, 255, .94) !important;
	box-shadow: 0 5px 16px rgba(31, 23, 15, .07);
	color: #171512 !important;
	line-height: 1;
	cursor: pointer;
	transition: border-color .22s ease, color .22s ease, transform .22s ease, box-shadow .22s ease;
}

html body.denvas-theme.tax-product_cat #main-content ul.products > li.product > .denvas-product-card__favourite:hover {
	border-color: rgba(151, 98, 56, .62) !important;
	box-shadow: 0 7px 20px rgba(31, 23, 15, .11);
	color: #976238 !important;
	transform: translateY(-1px);
}

html body.denvas-theme.tax-product_cat #main-content ul.products > li.product > .denvas-product-card__favourite:focus-visible {
	outline: 2px solid #c99463;
	outline-offset: 3px;
}

html body.denvas-theme.tax-product_cat #main-content ul.products > li.product > .denvas-product-card__favourite span {
	display: block;
	font-family: Arial, sans-serif;
	font-size: 22px;
	font-weight: 400;
	line-height: 1;
	transform: translateY(-1px);
}

html body.denvas-theme.tax-product_cat #main-content ul.products > li.product > .denvas-product-card__favourite[aria-pressed="true"] {
	border-color: rgba(151, 98, 56, .62) !important;
	color: #976238 !important;
}

html body.denvas-theme.tax-product_cat #main-content ul.products > li.product > .denvas-product-card__favourite[aria-pressed="true"] span {
	font-size: 0;
}

html body.denvas-theme.tax-product_cat #main-content ul.products > li.product > .denvas-product-card__favourite[aria-pressed="true"] span::after {
	content: "♥";
	font-size: 19px;
}

html body.denvas-theme.tax-product_cat #main-content ul.products > li.product > .denvas-product-card__stock {
	position: absolute !important;
	z-index: 8;
	top: 14px !important;
	right: auto !important;
	bottom: auto !important;
	left: 14px !important;
	width: auto !important;
	max-width: calc(100% - 82px);
	height: auto !important;
	min-height: 27px;
	display: inline-flex !important;
	align-items: center;
	gap: 6px;
	margin: 0 !important;
	padding: 6px 10px !important;
	border: 1px solid rgba(23, 21, 18, .1);
	border-radius: 999px;
	background: rgba(255, 255, 255, .94);
	box-shadow: 0 5px 16px rgba(31, 23, 15, .06);
	color: #55745f;
	font-family: var(--denvas-sans, "DENVAS Outfit", Arial, sans-serif);
	font-size: 11px !important;
	font-weight: 600;
	line-height: 1;
	letter-spacing: .03em;
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
	pointer-events: none;
}

html body.denvas-theme.tax-product_cat #main-content ul.products > li.product > .denvas-product-card__stock::before {
	content: "";
	width: 5px;
	height: 5px;
	flex: 0 0 5px;
	border-radius: 50%;
	background: currentColor;
}

html body.denvas-theme.tax-product_cat #main-content ul.products > li.product > .denvas-product-card__stock.is-unavailable {
	color: #9b554d;
}

html body.denvas-theme.tax-product_cat #main-content ul.products > li.product:has(.onsale) > .denvas-product-card__stock {
	top: 49px !important;
}

@media (max-width: 540px) {
	html body.denvas-theme.tax-product_cat #main-content ul.products > li.product > .denvas-product-card__favourite {
		top: 10px !important;
		right: 10px !important;
		width: 36px !important;
		min-width: 36px !important;
		max-width: 36px !important;
		height: 36px !important;
		min-height: 36px !important;
	}
	html body.denvas-theme.tax-product_cat #main-content ul.products > li.product > .denvas-product-card__stock {
		top: 10px !important;
		left: 10px !important;
		max-width: calc(100% - 66px);
		min-height: 24px;
		padding: 5px 8px !important;
	}
	html body.denvas-theme.tax-product_cat #main-content ul.products > li.product:has(.onsale) > .denvas-product-card__stock {
		top: 44px !important;
	}
}
/* DENVAS_CARD_SPACING_AND_CATEGORY_CONTROLS_END */
