/**
 * Shared Bear Việt product card.
 *
 * Homepage, category archives, and the similar-products carousel all use
 * these rules. The button, current price, and discount badge read three
 * separate colors from Giao diện → Tùy biến → Card sản phẩm.
 */

:root {
	--bv-btn: #71a82e;
	--bv-btn-dark: color-mix(in srgb, var(--bv-btn) 78%, #000);
	--bv-price: #ff0000;
	--bv-badge: #ff0000;
	--bv-title-size: 15px;
	--bv-orange: var(--ast-global-color-0, #f26b1d);
	--bv-ink: #1f2430;
	--bv-muted: #8b919c;
	--bv-line: #e7e9ee;
	--bv-card: #ffffff;
	--bv-bg: #f6f7f9;
}

.bv-card {
	float: none !important;
	width: auto !important;
	margin: 0 !important;
	clear: none !important;
	padding: 0;
	border: 1px solid var(--bv-line);
	border-radius: 12px;
	background: var(--bv-card);
	overflow: hidden;
	display: flex;
	flex-direction: column;
}

.bv-card__media {
	position: relative;
	background: var(--bv-bg);
}

.bv-card__image {
	display: block;
	aspect-ratio: 1;
}

.bv-card__image img {
	width: 100%;
	height: 100%;
	object-fit: cover;
}

.bv-card__badge,
.bv-card__stock {
	position: absolute;
	top: 10px;
	left: 10px;
	padding: 4px 8px;
	border-radius: 6px;
	background: var(--bv-badge);
	color: #fff;
	font-size: 12px;
	font-weight: 700;
	line-height: 1.2;
}

.bv-card__stock {
	left: auto;
	right: 10px;
	background: #4b5160;
}

.bv-card__body {
	display: flex;
	flex-direction: column;
	gap: 8px;
	padding: 14px 14px 16px;
	flex: 1;
}

html body .bv-card h2.bv-card__title,
html body .bv-card h2.bv-card__title a {
	margin: 0;
	font-size: var(--bv-title-size) !important;
	line-height: 1.4 !important;
	font-weight: 600 !important;
	text-align: center !important;
	min-height: calc(var(--bv-title-size) * 2.8);
}

html body .bv-card h2.bv-card__title a {
	min-height: 0;
	color: var(--bv-ink);
	text-decoration: none;
}

.bv-card__title a:hover {
	color: var(--bv-btn);
}

html body .bv-card .bv-card__rating {
	display: flex;
	justify-content: center;
}

html body .bv-card .bv-card__rating .star-rating {
	float: none !important;
	margin: 0 !important;
	color: #f5b400;
}

html body .bv-card .bv-card__rating .star-rating::before {
	color: #e6e6e6;
}

html body .bv-card .bv-card__rating .star-rating span::before {
	color: #f5b400;
}

.bv-card__price {
	margin-top: auto;
	font-size: 16px;
	font-weight: 700;
}

.bv-card__price,
.bv-card__price .amount {
	color: var(--bv-price);
}

.bv-card__price del,
.bv-card__price del .amount {
	color: var(--bv-muted);
	font-size: 13px;
	font-weight: 500;
	margin-right: 6px;
	text-decoration: line-through;
}

.bv-card__price ins {
	background: transparent;
	text-decoration: none;
	font-weight: 700;
}

html body.woocommerce-js ul.products li.product.bv-card .bv-card__action a.button,
html body ul.products li.product.bv-card .bv-card__action a.button,
html body .bv-card .bv-card__action a.button {
	display: flex !important;
	align-items: center;
	justify-content: center;
	width: 100%;
	min-height: 40px;
	margin: 0 !important;
	padding: 0 12px !important;
	border: 1px solid var(--bv-btn) !important;
	border-radius: 999px !important;
	background: var(--bv-btn) !important;
	background-color: var(--bv-btn) !important;
	background-image: none !important;
	color: #fff !important;
	font-size: 14px !important;
	font-weight: 700 !important;
	line-height: 1.2 !important;
	text-align: center;
	text-transform: none !important;
	text-decoration: none;
	box-shadow: none !important;
}

html body.woocommerce-js ul.products li.product.bv-card .bv-card__action a.bv-card__readmore,
html body .bv-card .bv-card__action a.bv-card__readmore {
	background: #fff !important;
	background-color: #fff !important;
	color: var(--bv-btn) !important;
}

html body.woocommerce-js ul.products li.product.bv-card .bv-card__action a.bv-card__readmore:hover,
html body .bv-card .bv-card__action a.bv-card__readmore:hover {
	background: var(--bv-btn-dark) !important;
	background-color: var(--bv-btn-dark) !important;
	border-color: var(--bv-btn-dark) !important;
	color: #fff !important;
}

html body.woocommerce-js ul.products li.product.bv-card .bv-card__action a.button:not(.bv-card__readmore):hover,
html body ul.products li.product.bv-card .bv-card__action a.button:not(.bv-card__readmore):hover,
html body .bv-card .bv-card__action a.button:not(.bv-card__readmore):hover {
	border-radius: 999px !important;
	background: #aad16e !important;
	background-color: #aad16e !important;
	border-color: #aad16e !important;
	color: transparent !important;
	font-size: 0 !important;
}

html body.woocommerce-js ul.products li.product.bv-card .bv-card__action a.button:not(.bv-card__readmore):hover::before,
html body ul.products li.product.bv-card .bv-card__action a.button:not(.bv-card__readmore):hover::before,
html body .bv-card .bv-card__action a.button:not(.bv-card__readmore):hover::before {
	content: "" !important;
	display: block;
	width: 22px;
	height: 22px;
	flex: 0 0 22px;
	background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23ffffff' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='9' cy='20' r='1.25' fill='%23ffffff' stroke='none'/%3E%3Ccircle cx='18' cy='20' r='1.25' fill='%23ffffff' stroke='none'/%3E%3Cpath d='M3 4h2.2l2.2 11.1a1.6 1.6 0 0 0 1.55 1.3h9.35a1.6 1.6 0 0 0 1.55-1.22L21.6 8H6.2'/%3E%3C/svg%3E") center / 22px 22px no-repeat;
}
