/*
 * Product cards (WooCommerce Product Collection with .elecadi-cards or .elecadi-mini-list),
 * wishlist hearts and the wishlist page. Ported from the prototype's premium-merch.css.
 */

:root {
	--elecadi-frame: var(--wp--preset--color--paper-deep);
	--elecadi-stock: var(--wp--preset--color--stock);
}

/* ───────────── Card grid ───────────── */
.elecadi-cards .wc-block-product-template {
	display: grid !important;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: 12px;
	margin: 0;
	padding: 0;
	list-style: none;
}
@media (min-width: 768px) {
	.elecadi-cards .wc-block-product-template {
		grid-template-columns: repeat(3, minmax(0, 1fr));
		gap: 16px;
	}
}
@media (min-width: 1024px) {
	.elecadi-cards .wc-block-product-template {
		grid-template-columns: repeat(4, minmax(0, 1fr));
	}
}
@media (min-width: 1280px) {
	.elecadi-cards:not(.is-narrow) .wc-block-product-template {
		grid-template-columns: repeat(5, minmax(0, 1fr));
	}
}
.elecadi-cards.is-narrow .wc-block-product-template {
	grid-template-columns: repeat(2, minmax(0, 1fr));
}

/* Each card is a padded tile with a hairline under it; on hover it lifts with a soft shadow. */
.elecadi-cards .wc-block-product {
	--card-py: 16px;
	--card-px: 12px;
	position: relative;
	display: flex;
	flex-direction: column;
	min-width: 0;
	margin: 0 !important;
	padding: var(--card-py) var(--card-px);
	border-bottom: 1px solid var(--wp--preset--color--hairline);
	background: var(--wp--preset--color--surface);
	text-align: start;
	transition: transform 200ms var(--wp--custom--ease), box-shadow 200ms var(--wp--custom--ease);
}
@media (max-width: 640px) {
	.elecadi-cards .wc-block-product {
		--card-py: 10px;
		--card-px: 8px;
	}
}
@media (hover: hover) {
	.elecadi-cards .wc-block-product:hover {
		box-shadow: 0 12px 32px rgb(24 21 18 / 0.08);
		transform: translateY(-3px);
	}
}
.elecadi-cards .wc-block-product > * {
	margin-block: 0;
}

/* Image: a square on the light frame colour, the whole product shown (contain, not cropped). */
.elecadi-cards .wc-block-components-product-image {
	position: relative;
	isolation: isolate;
	display: grid;
	place-items: center;
	aspect-ratio: 1;
	margin: 0 !important;
	padding: 0;
	overflow: hidden;
	background: var(--elecadi-frame);
}
/* The link fills the box, so the image size never depends on the photo.
   WordPress gives lazy "sizes=auto" images a 3000x1500 placeholder size until they load; without
   these rules that placeholder stretched the frame and pushed the photo out of view. */
.elecadi-cards .wc-block-components-product-image a {
	position: absolute;
	inset: 0;
	display: block;
}
.elecadi-cards .wc-block-components-product-image img {
	display: block;
	width: 100% !important;
	height: 100% !important;
	object-fit: contain !important;
	aspect-ratio: auto !important;
	contain-intrinsic-size: none !important;
	transition: transform 500ms var(--wp--custom--ease);
}
.elecadi-cards .wc-block-product:hover .wc-block-components-product-image img {
	transform: scale(1.05);
}
/* WooCommerce's overlay layer (holds the sale badge) must stay inside the frame. */
:is(.elecadi-cards, .elecadi-mini-list) .wc-block-components-product-image__inner-container {
	position: absolute;
	inset: 0;
	box-sizing: border-box;
	width: auto;
	height: auto;
	padding: 0;
	pointer-events: none;
}
.elecadi-mini-list .wc-block-components-product-image {
	position: relative;
	overflow: hidden;
}
/* The badge sits in the photo's top corner, its middle level with the wishlist heart's. */
.elecadi-cards .wc-block-product {
	container-type: inline-size;
}
.elecadi-cards .wc-block-components-product-sale-badge {
	position: absolute;
	top: 14px;
	inset-inline-start: 8px;
	inset-inline-end: auto;
	z-index: 1;
	margin: 0;
	padding: 2px 8px;
	border: 0;
	border-radius: 4px;
	background: var(--wp--preset--color--gold);
	color: var(--wp--preset--color--ink);
	font-size: 12px;
	font-weight: 700;
	line-height: 16px;
	text-transform: none;
}
/* WooCommerce gives the text span the badge's own background ("background-color: inherit"); the span's text box
   is taller than the badge's 16px line, so a square gold block stuck out above and below the rounded badge. */
.elecadi-cards .wc-block-components-product-sale-badge span {
	background: none;
}
.elecadi-cards .wc-block-components-product-sale-badge__text {
	display: inline;
}

/* Brand, name */
.elecadi-cards .wp-block-post-terms {
	margin-top: 8px !important;
	color: var(--wp--preset--color--ink-muted);
	font-size: 12px;
	font-weight: 400;
	line-height: 2; /* 24px tap target */
}
.elecadi-cards .wp-block-post-terms a {
	color: inherit;
	text-decoration: none;
}
.elecadi-cards .wp-block-post-title {
	display: -webkit-box;
	-webkit-box-orient: vertical;
	-webkit-line-clamp: 2;
	overflow: hidden;
	min-height: 48px; /* two lines, so prices and buttons line up across a row */
	margin-top: 0 !important;
	color: var(--wp--preset--color--ink);
	font-size: 14px !important;
	font-weight: 700;
	line-height: 24px; /* 24px tap target per line */
	text-align: start !important;
}
.elecadi-cards .wp-block-post-title a {
	color: inherit;
	text-decoration: none;
}
.elecadi-cards .wp-block-post-title a:hover {
	text-decoration: underline;
	text-underline-offset: 4px;
}

/* Rating + stock row. Prices still line up across a row because .elecadi-card__buy is pushed to
   the bottom, so nothing is reserved here or in the title: a short card doesn't carry empty space. */
.elecadi-card__meta {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: space-between;
	gap: 2px 10px;
	margin-top: 6px !important;
}
.elecadi-card__meta > * {
	margin: 0 !important;
}
.elecadi-card__meta:not(:has(*)) {
	display: none;
}
.elecadi-cards .wc-block-components-product-rating__stars {
	color: var(--wp--preset--color--gold);
	font-size: 12px;
	margin: 0;
}
:is(.elecadi-cards, .elecadi-mini-list) .wc-block-components-product-stock-indicator {
	display: inline-flex;
	align-items: center;
	gap: 4px;
	margin: 0;
	padding: 4px 6px;
	border-radius: 4px;
	background: color-mix(in srgb, currentColor 22%, #fff);
	color: var(--elecadi-stock);
	font-size: 12px;
	font-weight: 500;
	line-height: 16px;
}
:is(.elecadi-cards, .elecadi-mini-list) .wc-block-components-product-stock-indicator::before {
	content: "";
	width: 12px;
	height: 12px;
	background: currentColor;
	-webkit-mask: var(--elecadi-icon-check) center / contain no-repeat;
	mask: var(--elecadi-icon-check) center / contain no-repeat;
}
/* Out of stock: the same pill in the theme's red, with an x */
:is(.elecadi-cards, .elecadi-mini-list) .wc-block-components-product-stock-indicator--out-of-stock {
	background: color-mix(in srgb, currentColor 12%, #fff);
	color: var(--wp--preset--color--danger);
}
:is(.elecadi-cards, .elecadi-mini-list) .wc-block-components-product-stock-indicator--out-of-stock::before {
	-webkit-mask-image: var(--elecadi-icon-x);
	mask-image: var(--elecadi-icon-x);
}

/* Price, then a full-width outlined "add to cart" button under it */
.elecadi-card__buy {
	display: flex;
	flex-direction: column;
	align-items: stretch;
	gap: 12px;
	margin-top: auto !important;
	padding-top: 8px;
}
.elecadi-card__buy > * {
	margin: 0 !important;
}
.elecadi-cards .wc-block-components-product-price {
	display: flex;
	flex-wrap: wrap;
	align-items: baseline;
	gap: 0 8px;
	color: var(--wp--preset--color--ink);
	font-family: var(--wp--preset--font-family--cairo);
	font-size: 18px !important;
	font-weight: 800;
	line-height: 28px;
	text-align: start !important;
	font-variant-numeric: tabular-nums;
}
@media (max-width: 640px) {
	.elecadi-cards .wc-block-components-product-price {
		font-size: 16px !important;
	}
}
.elecadi-cards .wc-block-components-product-price del {
	order: 2;
	color: var(--wp--preset--color--ink-muted);
	font-size: 12px;
	font-weight: 400;
	text-decoration-thickness: 1px;
}
.elecadi-cards .wc-block-components-product-price ins {
	text-decoration: none;
}
.elecadi-cards .wp-block-woocommerce-product-button {
	width: 100%;
}
.elecadi-cards .wp-block-woocommerce-product-button .wp-block-button__link,
.elecadi-cards .wp-block-woocommerce-product-button .wc-block-components-product-button__button {
	position: relative;
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 8px;
	box-sizing: border-box;
	width: 100%;
	height: 40px;
	margin: 0;
	padding: 0 12px;
	overflow: hidden;
	border: 1px solid var(--wp--preset--color--hairline-strong);
	border-radius: var(--wp--preset--border-radius--sm);
	background: transparent;
	color: var(--wp--preset--color--ink);
	font-size: 14px;
	font-weight: 700;
	line-height: 20px;
	white-space: nowrap;
	text-decoration: none;
	box-shadow: none;
	transition: background-color 200ms var(--wp--custom--ease), border-color 200ms var(--wp--custom--ease), color 200ms var(--wp--custom--ease);
}
.elecadi-cards .wc-block-components-product-button__button > span {
	overflow: hidden;
	text-overflow: ellipsis;
}
.elecadi-cards .wp-block-woocommerce-product-button .wp-block-button__link::before,
.elecadi-cards .wp-block-woocommerce-product-button .wc-block-components-product-button__button::before {
	content: "";
	flex-shrink: 0;
	width: 16px;
	height: 16px;
	background: currentColor;
	-webkit-mask: var(--elecadi-icon-shopping-cart) center / contain no-repeat;
	mask: var(--elecadi-icon-shopping-cart) center / contain no-repeat;
}
.elecadi-cards .wp-block-woocommerce-product-button :is(.wp-block-button__link, .wc-block-components-product-button__button):is(:hover, :focus-visible, :active) {
	border-color: var(--wp--preset--color--gold);
	background: var(--wp--preset--color--gold);
	color: var(--wp--preset--color--ink);
}

/* Cards fade up into place, one after another, as they scroll into view (assets/js/cards.js). Cards already on
   screen when the page loads are left alone, so nothing visible flickers. Uses `translate`, not `transform`,
   so it doesn't fight the hover lift. */
.elecadi-cards .wc-block-product.is-reveal-pending {
	opacity: 0;
}
.elecadi-cards .wc-block-product.is-revealed {
	animation: elecadi-card-in 550ms var(--wp--custom--ease) both;
	animation-delay: var(--reveal-delay, 0ms);
}
@keyframes elecadi-card-in {
	from {
		opacity: 0;
		translate: 0 18px;
	}
	to {
		opacity: 1;
		translate: 0 0;
	}
}
@media (prefers-reduced-motion: reduce) {
	.elecadi-cards .wc-block-product.is-reveal-pending {
		opacity: 1;
	}
	.elecadi-cards .wc-block-product.is-revealed {
		animation: none;
	}
}
.elecadi-cards .wp-block-woocommerce-product-button .added_to_cart,
.elecadi-cards .wc-block-components-product-button__button .wc-block-components-spinner {
	position: absolute;
	width: 1px;
	height: 1px;
	overflow: hidden;
	clip: rect(0 0 0 0);
}

/* The quote request lives on the product page; the compact card only has the cart action. */
:is(.elecadi-cards, .elecadi-mini-list) .afrfqbt-guest,
:is(.elecadi-cards, .elecadi-mini-list) .afrfqbt {
	display: none !important;
}

/* ───────────── Wishlist heart ───────────── */
.elecadi-wish {
	display: grid;
	place-items: center;
	width: 44px;
	height: 44px;
	padding: 0;
	border: 0;
	border-radius: 50%;
	background: transparent;
	color: var(--wp--preset--color--ink);
	cursor: pointer;
	transition: color 250ms var(--wp--custom--ease);
}
.elecadi-wish:disabled {
	opacity: 0.6;
	cursor: progress;
}
.elecadi-wish__icon {
	width: 20px;
	height: 20px;
}
.elecadi-wish[aria-pressed="true"] .elecadi-wish__icon path {
	fill: var(--wp--preset--color--gold);
	stroke: var(--wp--preset--color--gold);
}
/* A 32px white circle in the photo's corner (the 44px button is the tap target). On devices with a
   mouse it shows on hover or keyboard focus, and stays once the product is in the wishlist. */
.elecadi-wish--card {
	position: absolute;
	z-index: 2;
	isolation: isolate;
	top: calc(var(--card-py, 0px) + 2px);
	inset-inline-end: calc(var(--card-px, 0px) + 2px);
	transition: color 250ms var(--wp--custom--ease), opacity 200ms var(--wp--custom--ease);
}
.elecadi-wish--card .elecadi-wish__icon {
	width: 16px;
	height: 16px;
}
.elecadi-wish--card::before {
	content: "";
	position: absolute;
	inset: 6px;
	z-index: -1;
	border-radius: 50%;
	background: var(--wp--preset--color--surface);
	box-shadow: 0 1px 3px rgb(0 0 0 / 0.1), 0 1px 2px -1px rgb(0 0 0 / 0.1);
	transition: background-color 250ms var(--wp--custom--ease);
}
.elecadi-wish--card:hover::before {
	background: var(--wp--preset--color--paper-deep);
}
@media (hover: hover) and (min-width: 768px) {
	.elecadi-cards .elecadi-wish--card:not([aria-pressed="true"]) {
		opacity: 0;
	}
	.elecadi-cards .wc-block-product:is(:hover, :focus-within) .elecadi-wish--card {
		opacity: 1;
	}
}
.wp-block-elecadi-wishlist-button {
	position: static;
}
/* Classic product loop (until those templates are blocks) */
.woocommerce ul.products li.product {
	position: relative;
}
.elecadi-wish--single {
	display: inline-grid;
	margin-inline-start: 8px;
	border: 1px solid var(--wp--preset--color--hairline-strong);
	border-radius: var(--wp--preset--border-radius--sm);
	vertical-align: middle;
}

/* ───────────── Classic product loops ─────────────
   WooCommerce's classic loop (ul.products), laid out like the theme's product cards. Used by the
   Dokan store page. */
.dokan-store .seller-items ul.products {
	display: grid !important;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: 28px 14px;
	margin: 0 0 40px;
	padding: 0;
}
@media (min-width: 768px) {
	.dokan-store .seller-items ul.products {
		grid-template-columns: repeat(3, minmax(0, 1fr));
		gap: 32px 20px;
	}
}
@media (min-width: 1024px) {
	.dokan-store .seller-items ul.products {
		grid-template-columns: repeat(4, minmax(0, 1fr));
		gap: 32px 24px;
	}
}
/* Four columns at most: Dokan shows 12 products per store page, so rows stay full. */
.dokan-store .seller-items ul.products::before,
.dokan-store .seller-items ul.products::after {
	display: none;
}
.dokan-store .seller-items ul.products li.product {
	position: relative;
	display: flex;
	flex-direction: column;
	float: none;
	width: auto !important;
	margin: 0 !important;
	padding: 0;
	text-align: start;
}
.dokan-store .seller-items ul.products li.product a.woocommerce-LoopProduct-link {
	display: flex;
	flex: 1;
	flex-direction: column;
	color: inherit;
	text-decoration: none;
}
.dokan-store .seller-items ul.products li.product a img {
	display: block;
	width: 100%;
	height: auto;
	margin: 0 0 14px;
	aspect-ratio: 1;
	border-radius: var(--wp--preset--border-radius--md);
	object-fit: cover;
	box-sizing: border-box;
}
.dokan-store .seller-items ul.products li.product .woocommerce-loop-product__title {
	display: -webkit-box;
	margin: 0 0 8px;
	padding: 0;
	overflow: hidden;
	-webkit-box-orient: vertical;
	-webkit-line-clamp: 2;
	color: var(--wp--preset--color--ink);
	font-size: 15px;
	font-weight: 500;
	line-height: 1.6;
}
.dokan-store .seller-items ul.products li.product a:hover .woocommerce-loop-product__title {
	text-decoration: underline;
	text-underline-offset: 4px;
}
.dokan-store .seller-items ul.products li.product .price {
	margin: auto 0 12px;
	color: var(--wp--preset--color--ink);
	font-size: 16px;
	font-weight: 700;
}
.dokan-store .seller-items ul.products li.product .price del {
	display: block;
	color: var(--wp--preset--color--ink-muted);
	font-size: 13px;
	font-weight: 400;
}
.dokan-store .seller-items ul.products li.product .price ins {
	text-decoration: none;
}
.dokan-store .seller-items ul.products li.product .onsale {
	position: absolute;
	z-index: 2;
	top: 12px;
	inset-inline-start: 12px;
	inset-inline-end: auto; /* not "right": on RTL pages that cancels the line above and lands the badge on the heart */
	min-width: 0;
	min-height: 0;
	margin: 0;
	padding: 4px 10px;
	font-size: 12px;
	font-weight: 800;
	line-height: 1.5;
}
.dokan-store .seller-items ul.products li.product .button {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 100%;
	text-align: center;
	min-height: 44px;
	margin: 0;
	font-size: 14px;
}
/* Same as the other product cards: the quote request lives on the product page. */
.dokan-store .seller-items ul.products li.product :is(.afrfqbt, .afrfqbt-guest) {
	display: none;
}
.dokan-store .seller-items ul.products li.product .added_to_cart {
	margin-top: 6px;
	font-size: 13px;
	text-align: center;
}

/* ───────────── Compact list (homepage columns) ───────────── */
.elecadi-mini-list .wc-block-product-template {
	display: block !important;
	margin: 0;
	padding: 0;
	list-style: none;
}
.elecadi-mini-list .wc-block-product {
	display: grid !important;
	grid-template-columns: 84px minmax(0, 1fr);
	column-gap: 16px;
	align-items: start;
	margin: 0 !important;
	padding-block: 16px;
	border-bottom: 1px solid var(--wp--preset--color--hairline);
	text-align: start;
}
.elecadi-mini-list .wc-block-product:last-child {
	border-bottom: 0;
}
.elecadi-mini-list .wc-block-product > * {
	grid-column: 2;
	margin: 0 !important;
}
.elecadi-mini-list .wc-block-components-product-image {
	box-sizing: border-box;
	grid-column: 1;
	grid-row: 1 / span 4;
	width: 84px;
	height: 84px;
	padding: 0;
}
.elecadi-mini-list .wc-block-components-product-image img {
	contain-intrinsic-size: none !important;
	width: 100% !important;
	height: 100% !important;
	object-fit: cover !important;
}
.elecadi-mini-list .wp-block-post-terms {
	color: var(--wp--preset--color--ink-muted);
	font-size: 12px;
}
.elecadi-mini-list .wp-block-post-terms a {
	color: inherit;
	text-decoration: none;
}
.elecadi-mini-list .wp-block-post-title {
	display: -webkit-box;
	-webkit-box-orient: vertical;
	-webkit-line-clamp: 2;
	overflow: hidden;
	font-size: 14px !important;
	font-weight: 600;
	line-height: 1.6;
	text-align: start !important;
}
.elecadi-mini-list .wp-block-post-title a {
	color: var(--wp--preset--color--ink);
	text-decoration: none;
}
.elecadi-mini-list .wc-block-components-product-stock-indicator {
	justify-self: start;
	margin-top: 4px !important;
	text-align: start;
}
.elecadi-mini-list .wc-block-components-product-price {
	margin-top: 4px;
	font-size: 16px !important;
	font-weight: 700;
	text-align: start !important;
}
.elecadi-mini-list .wc-block-components-product-price del {
	color: var(--wp--preset--color--ink-muted);
	font-size: 13px;
	font-weight: 400;
}
.elecadi-mini-list .wc-block-components-product-price ins {
	text-decoration: none;
}

/* ───────────── Wishlist page ───────────── */
.elecadi-wishlist__count {
	margin: 0 0 24px;
	color: var(--wp--preset--color--ink-muted);
	font-size: var(--wp--preset--font-size--sm);
}
.elecadi-wishlist__grid {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
	gap: 32px 24px;
	margin: 0;
	padding: 0;
	list-style: none;
}
.elecadi-wishlist__item {
	position: relative;
	display: flex;
	flex-direction: column;
}
.elecadi-wishlist__media {
	display: grid;
	place-items: center;
	aspect-ratio: 5 / 4;
	overflow: hidden;
}
.elecadi-wishlist__media img {
	width: 100%;
	height: 100%;
	object-fit: cover;
}
.elecadi-wishlist__body {
	display: flex;
	flex: 1;
	flex-direction: column;
	gap: 6px;
	padding-top: 12px;
}
.elecadi-wishlist__name {
	margin: 0;
	font-size: 14px;
	font-weight: 600;
	line-height: 1.55;
}
.elecadi-wishlist__name a {
	color: var(--wp--preset--color--ink);
	text-decoration: none;
}
.elecadi-wishlist__price {
	font-size: 17px;
	font-weight: 700;
}
.elecadi-wishlist__price del {
	color: var(--wp--preset--color--ink-muted);
	font-size: 13px;
	font-weight: 400;
}
.elecadi-wishlist__price ins {
	text-decoration: none;
}
.elecadi-wishlist__stock p {
	margin: 0;
	color: var(--elecadi-stock);
	font-size: 12px;
}
.elecadi-wishlist__actions {
	margin-top: auto;
	padding-top: 8px;
}
.elecadi-wishlist__actions .wp-element-button {
	display: inline-flex;
	box-sizing: border-box; /* the padding and border were added to the 100% width: buttons overlapped the next card */
	width: 100%;
	justify-content: center;
	padding: 10px 16px;
	border: 1px solid transparent; /* same height as the outlined "عرض المنتج" in the next card */
	text-decoration: none;
}
.elecadi-wishlist__actions .is-style-outline {
	border: 1px solid var(--wp--preset--color--hairline-strong);
	background: transparent;
	color: var(--wp--preset--color--ink);
}
/* WooCommerce's "عرض السلة" link after a product is added from here. */
.elecadi-wishlist__actions .added_to_cart {
	display: block;
	margin-top: 8px;
	color: var(--wp--preset--color--ink);
	font-size: 13px;
	text-align: center;
	text-underline-offset: 4px;
}
.elecadi-wishlist__empty {
	padding: 56px 0;
	text-align: center;
}
.elecadi-wishlist__empty-title {
	margin: 0 0 8px;
	font-size: var(--wp--preset--font-size--xl);
	font-weight: 600;
}
.elecadi-wishlist__empty p {
	margin: 0;
	color: var(--wp--preset--color--ink-muted);
}
.elecadi-wishlist__empty .wp-element-button {
	display: inline-flex; /* an inline link ignores the top margin and its padding overlapped the text */
	margin-top: 24px;
}

/* ───────────── Brand logo grid ([product_brands class="elecadi-brands__grid"]): homepage and brands page ───────────── */
.elecadi-brands .brands-container {
	margin-top: 16px;
}
.elecadi-brands__grid {
	/* Lines are drawn by the cells, not by a grey background showing through gaps, so a
	   part-filled last row leaves its empty cells blank. */
	display: grid;
	grid-template-columns: repeat(6, minmax(0, 1fr));
	margin: 0;
	padding: 0;
	border-top: 1px solid var(--wp--preset--color--hairline);
	border-inline-start: 1px solid var(--wp--preset--color--hairline);
	list-style: none;
}
.elecadi-brands__grid > li {
	border-bottom: 1px solid var(--wp--preset--color--hairline);
	border-inline-end: 1px solid var(--wp--preset--color--hairline);
	background: var(--wp--preset--color--surface);
	transition: background-color 250ms var(--wp--custom--ease);
}
.elecadi-brands__grid > li:not(:has(img)) {
	display: none;
}
.elecadi-brands__grid > li:has(a:is(:hover, :focus-visible)) {
	background: var(--wp--preset--color--paper-deep);
}
.elecadi-brands__grid a {
	display: grid;
	place-items: center;
	height: 112px;
	outline-offset: -4px;
}
.elecadi-brands__grid img {
	width: auto;
	max-width: 70%;
	max-height: 52px;
	mix-blend-mode: multiply;
	transition: transform 250ms var(--wp--custom--ease);
}
.elecadi-brands__grid a:is(:hover, :focus-visible) img {
	transform: scale(1.04);
}
@media (max-width: 1024px) {
	.elecadi-brands__grid {
		grid-template-columns: repeat(4, minmax(0, 1fr));
	}
	.elecadi-brands__grid a {
		height: 100px;
	}
}
@media (max-width: 640px) {
	.elecadi-brands__grid {
		grid-template-columns: repeat(3, minmax(0, 1fr));
	}
	.elecadi-brands__grid a {
		height: 84px;
	}
}

.elecadi-section__head {
	margin-bottom: 32px;
}
.elecadi-brands-page .elecadi-section__title {
	margin: 0;
	font-size: clamp(1.5rem, 1.05rem + 1.2vw, 2.125rem);
	font-weight: 600;
	line-height: 1.5;
}
.elecadi-brands-page .elecadi-section__lede {
	max-width: 52ch;
	margin-top: 8px;
	color: var(--wp--preset--color--ink-muted);
	font-size: 14px;
	line-height: 1.9;
}

@media (prefers-reduced-motion: reduce) {
	.elecadi-cards .wc-block-components-product-image img {
		transition: none;
	}
}

/* Add-to-cart states (assets/js/cards.js): a spinner while adding, then an "in the cart" ✓ that stays.
   WooCommerce's "view cart" link wrapper sits under the button in a column with a 12px gap, so it lifted
   the button out of line with the other cards; it is hidden (the ✓ button opens the cart instead). */
.elecadi-cards .wp-block-woocommerce-product-button > span {
	display: none;
}
.elecadi-cards .wc-block-components-product-button__button.is-adding {
	pointer-events: none;
}
.elecadi-cards .wc-block-components-product-button__button.is-adding::before {
	box-sizing: border-box;
	width: 18px;
	height: 18px;
	border: 2px solid currentColor;
	border-top-color: transparent;
	border-radius: 50%;
	background: transparent;
	-webkit-mask: none;
	mask: none;
	animation: elecadi-card-spin 0.7s linear infinite;
}
.elecadi-cards .wp-block-woocommerce-product-button[data-in-cart] .wc-block-components-product-button__button:not(.is-adding) {
	border-color: var(--wp--preset--color--ink);
	background: var(--wp--preset--color--ink);
	color: var(--wp--preset--color--on-dark);
}
.elecadi-cards .wp-block-woocommerce-product-button[data-in-cart] .wc-block-components-product-button__button:not(.is-adding)::before {
	-webkit-mask-image: var(--elecadi-icon-check);
	mask-image: var(--elecadi-icon-check);
	animation: elecadi-card-pop 0.3s var(--wp--custom--ease);
}
@keyframes elecadi-card-spin {
	to { transform: rotate(360deg); }
}
@keyframes elecadi-card-pop {
	from { transform: scale(0.4); }
	to { transform: scale(1); }
}
@media (prefers-reduced-motion: reduce) {
	.elecadi-cards .wc-block-components-product-button__button::before {
		animation: none !important;
	}
}

/* The brand name and the title on product cards and lists are links; give them at least a 24px tap target
   (WCAG 2.5.8) without changing how the lines look. */
.wc-block-product .taxonomy-product_brand a {
	display: inline-block;
	min-height: 24px;
	line-height: 24px;
}
.wc-block-product .wp-block-post-title a {
	display: inline-block;
	min-height: 24px;
}
