/* Global WooCommerce product-card refinements. */
.toby-product-card,
.woocommerce ul.products li.product,
.woocommerce-page ul.products li.product,
.toby-wishlist__products li.product,
.wc-block-grid__product,
.wc-block-components-product-card,
.tppb-product {
	border-radius: 8px !important;
}

.toby-product-card {
	--toby-card-radius: 8px;
	height: 100%;
	overflow: hidden;
}

/* Let the grid equalize cards by the tallest real card in each row. The theme
 * previously reserved a large fixed body, which left a blank lower panel on
 * cards containing only a title and price. */
.woocommerce ul.products,
.woocommerce-page ul.products,
.toby-wishlist__products.products {
	align-items: stretch !important;
}

.woocommerce ul.products li.product,
.woocommerce-page ul.products li.product,
.toby-wishlist__products li.product {
	display: flex !important;
	align-self: stretch;
}

.toby-product-card__body {
	min-height: 0 !important;
	flex: 1 1 auto;
	padding-bottom: 12px !important;
}

.toby-product-card__pricing:last-child {
	margin-bottom: 2px !important;
}

@media (max-width: 680px) {
	.toby-product-card__body {
		min-height: 0 !important;
		padding-bottom: 10px !important;
	}
}

/* Match sale pricing across every Toby product-card instance. The comparison
 * price and discount stay together if the group must wrap on a narrow card. */
.toby-product-card__pricing {
	display: flex !important;
	flex-flow: row wrap;
	align-items: baseline;
	gap: 3px 7px;
}

.toby-product-card__pricing .toby-product-card__current-price {
	display: inline-flex !important;
	flex: 0 0 auto;
	align-items: baseline;
	white-space: nowrap;
}

.toby-product-card__pricing .toby-product-card__was {
	display: inline-flex !important;
	flex: 0 0 auto;
	flex-wrap: nowrap !important;
	align-items: baseline;
	gap: 7px !important;
	margin: 0 !important;
	white-space: nowrap;
}

.toby-product-card__pricing .toby-product-card__was-price {
	display: inline-flex;
	flex: 0 0 auto;
	align-items: baseline;
	gap: 0 !important;
	white-space: nowrap;
}

.toby-product-card__pricing .toby-product-card__was-price > span,
.toby-product-card__pricing .toby-product-card__was-price del .woocommerce-Price-currencySymbol {
	display: none !important;
}

.toby-product-card__pricing.is-price-wrapped .toby-product-card__was-price del .woocommerce-Price-currencySymbol {
	display: inline !important;
}

.toby-product-card__pricing .toby-product-card__was > strong::after {
	content: " OFF";
}

/* Generated CSS text is invisible to the translation engine. */
:root:lang(ar) .toby-product-card__pricing .toby-product-card__was > strong::after {
	content: " خصم";
}

.woocommerce ul.products li.product > a img,
.woocommerce-page ul.products li.product > a img,
.wc-block-grid__product-image img,
.wc-block-components-product-image img {
	border-radius: 8px !important;
}

.toby-product-card [data-toby-wishlist],
.woocommerce ul.products li.product [data-toby-wishlist],
.woocommerce-page ul.products li.product [data-toby-wishlist],
.toby-wishlist__products li.product [data-toby-wishlist] {
	display: grid !important;
	width: 32px !important;
	height: 32px !important;
	min-width: 32px !important;
	min-height: 32px !important;
	padding: 0 !important;
	place-items: center;
	border-radius: 8px !important;
	opacity: .6 !important;
	transition: opacity .18s ease, background-color .18s ease, color .18s ease, transform .18s ease !important;
}

.toby-product-card [data-toby-wishlist]:hover,
.toby-product-card [data-toby-wishlist]:focus-visible,
.toby-product-card [data-toby-wishlist].is-active,
.woocommerce ul.products li.product [data-toby-wishlist]:hover,
.woocommerce ul.products li.product [data-toby-wishlist]:focus-visible,
.woocommerce ul.products li.product [data-toby-wishlist].is-active,
.toby-wishlist__products li.product [data-toby-wishlist]:hover,
.toby-wishlist__products li.product [data-toby-wishlist]:focus-visible,
.toby-wishlist__products li.product [data-toby-wishlist].is-active {
	opacity: 1 !important;
}

/* Shared rating palette. These are the exact tones used by the Customer
 * rating filter, applied to native WooCommerce stars everywhere. */
.star-rating.tppb-rating-tone-5,
.star-rating.tppb-rating-tone-5::before,
.star-rating.tppb-rating-tone-5 > span::before { color: #078a17 !important; }

.star-rating.tppb-rating-tone-4,
.star-rating.tppb-rating-tone-4::before,
.star-rating.tppb-rating-tone-4 > span::before { color: #079d18 !important; }

.star-rating.tppb-rating-tone-3,
.star-rating.tppb-rating-tone-3::before,
.star-rating.tppb-rating-tone-3 > span::before { color: #42b900 !important; }

.star-rating.tppb-rating-tone-2,
.star-rating.tppb-rating-tone-2::before,
.star-rating.tppb-rating-tone-2 > span::before { color: #f0a000 !important; }

.star-rating.tppb-rating-tone-1,
.star-rating.tppb-rating-tone-1::before,
.star-rating.tppb-rating-tone-1 > span::before { color: #f05a00 !important; }
