/* TRA catalog card — scoped overrides for Porto theme_shop.css winners.
   Live cascade (staging theme_shop.css + theme_css_vars.css):
   - ul.products li { margin-bottom: var(--porto-grid-gutter-width, 20px) } → 30px
     matches li.tra-cc-fact inside ul.products
   - .products ul { margin: 0 0 1em } matches ul.tra-cc-facts
   - ul.products .price { margin-bottom: 1rem }
   - ul.products .woocommerce-loop-product__title { white-space: nowrap; ellipsis }
   Enqueued on shop / product taxonomy / product search, and on modern TRA
   shared Product Pages for Related Products (G5.4). */

ul.products li.product .product-content h3.woocommerce-loop-product__title {
	display: -webkit-box;
	-webkit-box-orient: vertical;
	-webkit-line-clamp: 2;
	line-clamp: 2;
	white-space: normal;
	overflow: hidden;
	text-overflow: clip;
	line-height: 1.3;
	min-height: 2.6em;
	max-height: 2.6em;
	margin-top: 0;
	margin-bottom: 0.25rem;
}

ul.products li.product .product-content .price {
	margin-top: 0;
	margin-bottom: 0.2rem;
	line-height: 1.25;
}

.tra-cc-offer {
	display: flex;
	flex-direction: row;
	flex-wrap: wrap;
	align-items: center;
	gap: 0.5rem;
	min-height: 1.35em;
}

.tra-cc-price {
	white-space: nowrap;
}

.tra-cc-availability {
	display: inline-block;
	margin: 0;
	padding: 0.05rem 0.4rem;
	border-radius: 999px;
	font-size: 10px;
	font-weight: 600;
	letter-spacing: 0.01em;
	line-height: 1.4;
	background: #e8f6f1;
	color: #146c43;
}

.tra-cc-availability--reserved {
	background: #fff4e0;
	color: #9a6700;
}

.tra-cc-availability--sold {
	background: #f2f2f2;
	color: #5c6570;
}

.tra-cc-availability--in_transit,
.tra-cc-availability--on_order,
.tra-cc-availability--in_production {
	background: #e8f1f8;
	color: #1a5276;
}

.tra-catalog-card {
	margin: 0.1rem 0 0;
	font-size: 12px;
	line-height: 1.2;
	color: #24313b;
}

ul.products .tra-catalog-card ul.tra-cc-facts,
ul.products .tra-catalog-card ul {
	display: flex;
	flex-direction: column;
	gap: 0;
	list-style: none;
	margin: 0;
	padding: 0;
}

ul.products .tra-catalog-card li.tra-cc-fact,
ul.products .tra-catalog-card li {
	display: flex;
	justify-content: space-between;
	align-items: baseline;
	gap: 0.4rem;
	list-style: none;
	margin: 0;
	padding: 0;
	min-height: 24px;
	max-height: 28px;
	line-height: 24px;
}

.tra-catalog-card .tra-cc-label {
	color: #7a848e;
	flex: 0 0 auto;
	font-size: 11px;
	font-weight: 400;
}

.tra-catalog-card .tra-cc-value {
	font-weight: 600;
	font-size: 12px;
	text-align: right;
	flex: 1 1 auto;
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
}

ul.products .tra-catalog-card p.tra-cc-meta,
ul.products .tra-catalog-card p {
	display: flex;
	justify-content: space-between;
	align-items: baseline;
	gap: 0.4rem;
	margin: 0;
	padding: 0;
	min-height: 24px;
	max-height: 28px;
	line-height: 24px;
}

ul.products .tra-catalog-card p.tra-cc-meta {
	font-size: 11px;
	color: #6b7580;
}

ul.products .tra-catalog-card p.tra-cc-meta .tra-cc-value {
	font-size: 11px;
	font-weight: 500;
	white-space: nowrap;
}

@media (max-width: 767px) {
	ul.products li.product .product-content h3.woocommerce-loop-product__title {
		min-height: 2.4em;
		max-height: 2.4em;
		margin-bottom: 0.15rem;
	}

	.tra-catalog-card {
		font-size: 11px;
		margin-top: 0.08rem;
	}

	ul.products .tra-catalog-card li.tra-cc-fact,
	ul.products .tra-catalog-card li,
	ul.products .tra-catalog-card p.tra-cc-meta,
	ul.products .tra-catalog-card p {
		min-height: 22px;
		max-height: 24px;
		line-height: 22px;
	}

	.tra-cc-pri-6,
	.tra-cc-pri-7,
	.tra-cc-pri-8 {
		display: none;
	}
}

/* D8P1 commercial card — scoped to supported-family products in the main loop.
   Always-on 1px so hover does not shift the grid. D3 fallback cards are untouched. */
ul.products li.product.tra-cc-commercial .product-inner {
	box-sizing: border-box;
	border: 1px solid rgba(36, 49, 59, 0.12);
	border-radius: 6px;
	overflow: hidden;
	transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

ul.products li.product.tra-cc-commercial:hover .product-inner {
	border-color: rgba(36, 49, 59, 0.32);
	box-shadow: 0 1px 6px rgba(36, 49, 59, 0.06);
	transform: none;
}

ul.products li.product.tra-cc-commercial .product-content {
	padding: 8px 10px 10px;
}

ul.products li.product.tra-cc-commercial .product-content .category-list {
	display: none;
}

ul.products li.product.tra-cc-commercial .product-content .tra-cc-token-strip {
	margin: 0 0 0.25rem;
	padding: 0;
	font-size: 10px;
	line-height: 1.3;
	font-weight: 400;
	letter-spacing: 0.06em;
	text-transform: uppercase;
	color: #5c6770;
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
}

ul.products li.product.tra-cc-commercial .product-content .tra-cc-token,
ul.products li.product.tra-cc-commercial .product-content .tra-cc-token-sep {
	font-family: inherit;
	font-size: inherit;
	font-weight: inherit;
	line-height: inherit;
	letter-spacing: inherit;
	text-transform: inherit;
}

ul.products li.product.tra-cc-commercial .product-content .tra-cc-token-sep {
	opacity: 0.45;
}

@media (max-width: 767px) {
	ul.products li.product.tra-cc-commercial .product-content {
		padding: 7px 10px 9px;
	}

	ul.products li.product.tra-cc-commercial .product-content .tra-cc-token-strip {
		white-space: normal;
	}
}
