.ueb-product-grid {
	--ueb-pg-columns: 4;
	--ueb-pg-gap: 32px;
	--ueb-pg-card-bg: #ffffff;
	--ueb-pg-img-bg: #f5f0ec;
	--ueb-pg-new-bg: #3b0764;
	--ueb-pg-sale-bg: #ba1a1a;
	--ueb-pg-btn-bg: #3b0764;
	--ueb-pg-btn-icon: #ffffff;
	--ueb-pg-btn-size: 40px;

	display: grid;
	grid-template-columns: repeat(var(--ueb-pg-columns), minmax(0, 1fr));
	gap: var(--ueb-pg-gap);
	width: 100%;
	box-sizing: border-box;
}

.ueb-product-grid *,
.ueb-product-grid *::before,
.ueb-product-grid *::after {
	box-sizing: border-box;
}

.ueb-product-grid--empty {
	min-height: 0;
}

.ueb-product-card {
	background: var(--ueb-pg-card-bg);
	border-radius: 20px;
	padding: 24px;
	display: flex;
	flex-direction: column;
	gap: 8px;
	overflow: hidden;
	position: relative;
}

.ueb-product-card__image-link {
	display: block;
	text-decoration: none;
}

.ueb-product-card__image {
	position: relative;
	width: 100%;
	aspect-ratio: 1 / 1;
	background: var(--ueb-pg-img-bg);
	border-radius: 12px;
	overflow: hidden;
}

.ueb-product-card__image .ueb-product-card__img,
.ueb-product-card__image img {
	display: block;
	width: 100%;
	height: 100%;
	object-fit: contain;
	transition: transform 0.45s ease;
}

.ueb-product-card:hover .ueb-product-card__img,
.ueb-product-card:focus-within .ueb-product-card__img {
	transform: scale(1.06);
}

.ueb-badge {
	position: absolute;
	top: 16px;
	left: 16px;
	padding: 4px 12px;
	border-radius: 9999px;
	font-family: "Inter", system-ui, -apple-system, sans-serif;
	font-weight: 700;
	font-size: 10px;
	line-height: 15px;
	letter-spacing: 1px;
	color: #ffffff;
	text-transform: uppercase;
	pointer-events: none;
	white-space: nowrap;
}

.ueb-badge--new {
	background: var(--ueb-pg-new-bg);
}

.ueb-badge--sale {
	background: var(--ueb-pg-sale-bg);
}

.ueb-badge--oos {
	background: #6b7280;
	color: #ffffff;
}

.ueb-product-card__title-link {
	display: block;
	margin-top: 16px;
	text-decoration: none;
	color: inherit;
}

.ueb-product-card__title-link:hover {
	text-decoration: none;
}

.ueb-product-card__title {
	margin: 0;
	font-family: Helvetica, "Helvetica Neue", Arial, sans-serif;
	font-weight: 700;
	font-size: 18px;
	line-height: 28px;
	color: #1b1c19;
}

.ueb-product-card__subtitle {
	margin: 0;
	font-family: Helvetica, "Helvetica Neue", Arial, sans-serif;
	font-weight: 400;
	font-size: 14px;
	line-height: 20px;
	color: #44474c;
}

.ueb-product-card__footer {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 12px;
	margin-top: auto;
	padding-top: 4px;
}

.ueb-product-card__prices {
	display: flex;
	flex-direction: column;
	align-items: flex-start;
	min-width: 0;
}

.ueb-product-card__old-price {
	font-family: "Inter", system-ui, -apple-system, sans-serif;
	font-weight: 400;
	font-size: 14px;
	line-height: 20px;
	color: #44474c;
	text-decoration: line-through;
}

.ueb-product-card__old-price .woocommerce-Price-amount,
.ueb-product-card__old-price bdi {
	text-decoration: line-through;
}

.ueb-product-card__price {
	font-family: "Plus Jakarta Sans", system-ui, -apple-system, sans-serif;
	font-weight: 700;
	font-size: 20px;
	line-height: 28px;
	color: #ff4b4b;
	white-space: nowrap;
}

.ueb-product-card__price del {
	display: none;
}

.ueb-product-card__price ins {
	text-decoration: none;
	background: transparent;
}

.ueb-product-card__cart-btn {
	position: relative;
	flex: 0 0 auto;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: var(--ueb-pg-btn-size);
	height: var(--ueb-pg-btn-size);
	border-radius: 9999px;
	background: var(--ueb-pg-btn-bg);
	color: var(--ueb-pg-btn-icon);
	text-decoration: none;
	border: 0;
	cursor: pointer;
	transition: background 0.15s ease, color 0.15s ease, transform 0.15s ease, box-shadow 0.15s ease;
}

/* Hover affordance — a white "+" drawn as a pseudo-element so it survives the
   widget's custom hover-background control (which uses the `background`
   shorthand and would otherwise wipe a background-image). */
.ueb-product-card__cart-btn::before {
	content: "";
	position: absolute;
	inset: 0;
	background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24' fill='none'%3E%3Cpath d='M12 5v14M5 12h14' stroke='%23ffffff' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
	background-repeat: no-repeat;
	background-position: center;
	background-size: 18px 18px;
	opacity: 0;
	transition: opacity 0.15s ease;
	pointer-events: none;
}

.ueb-product-card__cart-btn:hover,
.ueb-product-card__cart-btn:active,
.ueb-product-card__cart-btn:focus-visible {
	background: #3b0764;
	color: var(--ueb-pg-btn-icon);
	transform: none;
	text-decoration: none;
	box-shadow: 0 4px 6px -4px rgba(129, 59, 159, 0.45), 0 10px 15px -3px rgba(129, 59, 159, 0.35);
}

.ueb-product-card__cart-btn:hover::before,
.ueb-product-card__cart-btn:active::before,
.ueb-product-card__cart-btn:focus-visible::before {
	opacity: 1;
}

.ueb-product-card__cart-btn:hover > svg,
.ueb-product-card__cart-btn:hover > i,
.ueb-product-card__cart-btn:active > svg,
.ueb-product-card__cart-btn:active > i,
.ueb-product-card__cart-btn:focus-visible > svg,
.ueb-product-card__cart-btn:focus-visible > i {
	opacity: 0;
}

.ueb-product-card__cart-btn:focus-visible {
	outline: 2px solid currentColor;
	outline-offset: 2px;
}

.ueb-product-card__cart-btn svg {
	width: 18px;
	height: 18px;
	display: block;
	color: inherit;
	stroke: currentColor;
	transition: opacity 0.15s ease;
}

.ueb-product-card__cart-btn svg path,
.ueb-product-card__cart-btn svg circle {
	stroke: currentColor;
}

.ueb-product-card__cart-btn i {
	font-size: 18px;
	color: inherit;
}

.ueb-product-card__cart-btn.added::after {
	content: "";
}

@media (max-width: 1024px) {
	.ueb-product-grid {
		--ueb-pg-columns: 3;
		--ueb-pg-gap: 24px;
	}
}

@media (max-width: 767px) {
	.ueb-product-grid {
		--ueb-pg-columns: 2;
		--ueb-pg-gap: 16px;
		--ueb-pg-btn-size: 28px;
	}
	.ueb-product-card {
		padding: 12px;
		gap: 4px;
	}
	.ueb-product-card__title-link {
		margin-top: 8px;
	}
	.ueb-product-card__title {
		font-size: 16px;
		line-height: 24px;
	}
	.ueb-product-card__price {
		font-size: 16px;
		line-height: 24px;
	}
	.ueb-product-card__cart-btn svg {
		width: 14px;
		height: 14px;
	}
}
