.woocommerce ul.products,
.ecom-products-grid {
	display: grid;
	grid-template-columns: repeat(var(--emc-columns-desktop, 4), minmax(0, 1fr));
	gap: 24px;
	list-style: none;
	padding: 0;
	margin: 0;
}

.woocommerce ul.products::before,
.woocommerce ul.products::after,
.ecom-products-grid::before,
.ecom-products-grid::after {
	display: none;
	content: none;
}

.woocommerce ul.products li.product,
.ecom-products-grid > li.product,
.ecom-product-card-wrap {
	width: auto;
	float: none;
	clear: none;
	list-style: none;
	padding: 0;
	margin: 0;
}

.ecom-product-card-wrap::before,
.ecom-product-card-wrap::after {
	display: none;
	content: none;
}

.ecom-product-card {
	display: flex;
	flex-direction: column;
	height: 100%;
	min-width: 0;
	background: var(--ecom-product-card-bg, #fff);
	border: 1px solid var(--ecom-product-card-border, rgba(217, 225, 240, 0.95));
	border-radius: var(--ecom-product-card-radius, 14px);
	box-shadow: var(--ecom-product-card-shadow, 0 8px 24px rgba(17, 42, 84, 0.06));
	overflow: hidden;
	transition: border-color 180ms ease, box-shadow 180ms ease, transform 180ms ease;
}

.ecom-product-card:hover {
	border-color: rgba(18, 113, 91, 0.35);
	box-shadow: 0 14px 30px rgba(17, 42, 84, 0.09);
	transform: translateY(-2px);
}

.ecom-product-card__media {
	position: relative;
	display: flex;
	align-items: center;
	justify-content: center;
	aspect-ratio: var(--ecom-product-card-image-ratio, 1 / 1);
	padding: var(--ecom-product-card-image-padding, 22px);
	background: var(--ecom-product-card-media-bg, #f7f9fd);
}

.ecom-product-card__image-link {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 100%;
	height: 100%;
	text-decoration: none;
}

.ecom-product-card__media img {
	display: block;
	width: 100%;
	height: 100%;
	object-fit: contain;
}

.ecom-product-card__badge-wrap {
	position: absolute;
	top: 14px;
	left: 14px;
	z-index: 2;
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
}

.ecom-product-card__badge {
	display: inline-flex;
	align-items: center;
	min-height: 26px;
	padding: 0 10px;
	border-radius: 999px;
	background: var(--ecom-color-secondary);
	color: #fff;
	font-size: 0.76rem;
	font-weight: 800;
	line-height: 1;
}

.ecom-product-card__badge--sale {
	background: var(--ecom-product-card-sale-bg, var(--ecom-color-success));
	color: var(--ecom-product-card-sale-color, #fff);
}

.ecom-product-card__wishlist {
	position: absolute;
	top: 12px;
	right: 12px;
	z-index: 2;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 38px;
	height: 38px;
	border: 1px solid rgba(217, 225, 240, 0.95);
	border-radius: 50%;
	background: rgba(255, 255, 255, 0.92);
	color: var(--ecom-color-text);
	cursor: default;
}

.ecom-product-card__wishlist:disabled {
	opacity: 1;
}

.ecom-product-card__wishlist .ecom-icon {
	width: 20px;
	height: 20px;
}

.ecom-product-card__content {
	display: flex;
	flex: 1 1 auto;
	flex-direction: column;
	gap: 10px;
	padding: var(--ecom-product-card-padding, 18px);
}

.ecom-product-card__category {
	color: var(--ecom-color-text-soft);
	font-size: 0.78rem;
	font-weight: 800;
	letter-spacing: 0.08em;
	line-height: 1.2;
	text-transform: uppercase;
}

.ecom-product-card__title {
	display: -webkit-box;
	min-height: 2.7em;
	margin: 0;
	overflow: hidden;
	color: var(--ecom-product-card-title-color, #1f2937);
	font: 800 var(--ecom-product-card-title-size, 1rem)/1.35 'Outfit', sans-serif;
	letter-spacing: 0;
	-webkit-box-orient: vertical;
	-webkit-line-clamp: 2;
}

.ecom-product-card__title a {
	color: inherit;
	text-decoration: none;
}

.ecom-product-card__rating {
	min-height: 18px;
	color: #f59e0b;
	font-size: 0.88rem;
}

.ecom-product-card__price {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 8px;
	min-height: 28px;
	color: var(--ecom-product-card-price-color, var(--ecom-color-success));
	font-weight: 900;
}

.ecom-product-card__price del,
.ecom-product-card__price del .amount {
	color: var(--ecom-product-card-regular-color, #8a94a8);
	font-weight: 700;
	opacity: 1;
}

.ecom-product-card__price ins {
	color: var(--ecom-product-card-sale-price-color, var(--ecom-color-success));
	text-decoration: none;
}

.ecom-product-card__price .emc-login-for-price {
	color: var(--ecom-color-primary);
	text-decoration: none;
}

.ecom-product-card__stock {
	color: var(--ecom-color-success);
	font-size: 0.9rem;
	font-weight: 700;
}

.ecom-product-card__stock.is-out {
	color: var(--ecom-color-danger);
}

.ecom-product-card__actions {
	display: flex;
	margin-top: auto;
	padding-top: 6px;
}

.ecom-product-card__button {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 100%;
	min-height: var(--ecom-product-card-button-height, 46px);
	padding: 0 16px;
	border: 0;
	border-radius: var(--ecom-product-card-button-radius, 6px);
	background: var(--ecom-product-card-button-bg, var(--ecom-color-success));
	color: var(--ecom-product-card-button-color, #fff);
	cursor: pointer;
	font: 800 0.92rem/1 'Inter', sans-serif;
	text-decoration: none;
	text-align: center;
}

.ecom-product-card__button:hover {
	background: var(--ecom-product-card-button-hover-bg, #0e5f4c);
	color: var(--ecom-product-card-button-color, #fff);
}

.ecom-product-card__button.is-loading {
	opacity: 0.72;
	pointer-events: none;
}

.ecom-product-card__button.is-loading::after {
	content: '';
	width: 15px;
	height: 15px;
	margin-left: 8px;
	border: 2px solid rgba(255, 255, 255, 0.45);
	border-top-color: #fff;
	border-radius: 50%;
	animation: ecom-spin 800ms linear infinite;
}

.ecom-product-card__button--disabled {
	background: #9aa4b2;
	pointer-events: none;
}

.ecom-products-grid--archive {
	grid-template-columns: repeat(4, minmax(0, 1fr));
}

.ecom-products-grid__empty {
	padding: 44px 24px;
	border: 1px dashed var(--ecom-color-border);
	border-radius: 14px;
	background: #fff;
	text-align: center;
}

.ecom-products-grid__empty p {
	margin: 0 0 14px;
	font-weight: 800;
}

.ecom-products-grid__empty a {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-height: 44px;
	padding: 0 16px;
	border-radius: 6px;
	background: var(--ecom-color-primary);
	color: #fff;
	text-decoration: none;
	font-weight: 800;
}

@keyframes ecom-spin {
	to {
		transform: rotate(360deg);
	}
}

@media (max-width: 1280px) {
	.woocommerce ul.products,
	.ecom-products-grid,
	.ecom-products-grid--archive {
		grid-template-columns: repeat(var(--emc-columns-tablet, 3), minmax(0, 1fr));
	}
}

@media (max-width: 900px) {
	.woocommerce ul.products,
	.ecom-products-grid,
	.ecom-products-grid--archive {
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}
}

@media (max-width: 420px) {
	.woocommerce ul.products,
	.ecom-products-grid,
	.ecom-products-grid--archive {
		grid-template-columns: 1fr;
	}
}
