/**
 * Product card — Bảo Hộ Việt Trung
 */

/* ── Card mới (shop loop) ── */

.baohiem-product-card {
	margin-bottom: 1.5rem;
}

.baohiem-pcard {
	background: #fff;
	border: 1px solid rgba(0, 0, 0, 0.12);
	border-radius: 12px;
	overflow: hidden;
	height: 100%;
	display: flex;
	flex-direction: column;
	box-shadow: 0 2px 10px rgba(0, 0, 0, 0.07), 0 1px 3px rgba(0, 0, 0, 0.05);
	transition: transform var(--baohiem-transition), box-shadow var(--baohiem-transition), border-color var(--baohiem-transition);
}

.baohiem-pcard:hover {
	transform: translateY(-5px);
	border-color: var(--baohiem-primary, var(--primary-color));
	box-shadow: 0 14px 36px rgba(0, 0, 0, 0.13);
}

/* Media */
.baohiem-pcard__media {
	position: relative;
	background: #fff;
	overflow: hidden;
	border-bottom: 1px solid rgba(0, 0, 0, 0.08);
}

.baohiem-pcard__image-link {
	display: block;
	text-decoration: none;
}

.baohiem-pcard__image {
	display: block;
	position: relative;
	padding-top: 100%;
	overflow: hidden;
	background: #fff;
}

.baohiem-pcard__image img {
	position: absolute;
	top: 0;
	left: 0;
	width: 100%;
	height: 100%;
	max-width: none;
	max-height: none;
	object-fit: cover;
	object-position: center;
	padding: 0;
	margin: 0;
	transition: transform 0.45s ease;
}

.baohiem-pcard__image .back-image {
	opacity: 0;
	object-fit: cover;
	object-position: center;
	transition: opacity 0.45s ease, transform 0.45s ease;
}

.baohiem-pcard:hover .baohiem-pcard__image > img:first-child {
	transform: scale(1.06);
}

.baohiem-pcard:hover .baohiem-pcard__image .back-image {
	opacity: 1;
}

/* Badges */
.baohiem-pcard__badges {
	position: absolute;
	top: 12px;
	left: 12px;
	z-index: 2;
	display: flex;
	flex-direction: column;
	gap: 6px;
}

.baohiem-pcard__badges .badge-container {
	position: static;
}

.baohiem-pcard__badges .badge .badge-inner {
	font-size: 11px;
	font-weight: 700;
	letter-spacing: 0.03em;
	padding: 4px 10px;
	border-radius: 20px;
}

.baohiem-pcard__badge {
	display: inline-block;
	font-size: 11px;
	font-weight: 700;
	padding: 4px 10px;
	border-radius: 20px;
	background: #555;
	color: #fff;
}

.baohiem-pcard__badge--stock {
	background: #888;
}

/* Body */
.baohiem-pcard__body {
	padding: 1.05rem 1.15rem 1.2rem;
	display: flex;
	flex-direction: column;
	flex: 1;
	gap: 0.5rem;
	background: #fafbfc;
}

.baohiem-pcard__category {
	margin: 0;
	font-size: 11px;
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: 0.07em;
	color: var(--baohiem-primary);
	line-height: 1.3;
	opacity: 1;
}

.baohiem-pcard__title {
	margin: 0;
	font-size: 15px;
	font-weight: 700;
	line-height: 1.45;
	min-height: 2.9em;
}

.baohiem-pcard__title a {
	color: #1a1a1a;
	text-decoration: none;
	display: -webkit-box;
	-webkit-line-clamp: 2;
	-webkit-box-orient: vertical;
	overflow: hidden;
	transition: color var(--baohiem-transition);
}

.baohiem-pcard__title a:hover {
	color: var(--baohiem-primary);
}

.baohiem-pcard__price {
	margin-top: auto;
	padding-top: 0.35rem;
	font-size: 18px;
	font-weight: 800;
	color: var(--baohiem-secondary);
}

.baohiem-pcard__price .amount {
	color: inherit;
}

.baohiem-pcard.is-contact-price .baohiem-pcard__price {
	color: var(--baohiem-primary);
}

.baohiem-pcard__price del {
	font-size: 13px;
	font-weight: 400;
	color: #999;
	margin-right: 6px;
}

/* Actions */
.baohiem-pcard__actions {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
	margin-top: 0.7rem;
	padding-top: 0.85rem;
	border-top: 1px solid rgba(0, 0, 0, 0.1);
}

.baohiem-pcard__actions--stack {
	flex-direction: column;
	align-items: stretch;
}

.baohiem-pcard__btn {
	flex: 1 1 calc(50% - 4px);
	min-width: min(100%, 7.5rem);
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 6px;
	padding: 0.55rem 0.75rem;
	font-size: 12px;
	font-weight: 600;
	line-height: 1.3;
	text-align: center;
	text-decoration: none;
	border-radius: 8px;
	border: none;
	cursor: pointer;
	transition: background var(--baohiem-transition), color var(--baohiem-transition), opacity var(--baohiem-transition);
	white-space: normal;
}

.baohiem-pcard__actions--stack .baohiem-pcard__btn {
	flex: 1 1 auto;
	width: 100%;
	min-width: 0;
	max-width: 100%;
}

.baohiem-pcard__btn--cart {
	background: var(--baohiem-primary, var(--primary-color));
	color: #fff !important;
}

/* Nút liên hệ trên card — màu theo contact-buttons.css */
.baohiem-pcard__btn--contact {
	color: #fff !important;
}

.baohiem-pcard__btn--cart:hover {
	opacity: 0.88;
	color: #fff !important;
}

.baohiem-pcard__btn--detail {
	background: #f0f3f7;
	color: var(--baohiem-heading) !important;
	border: 1px solid rgba(0, 0, 0, 0.08);
}

.baohiem-pcard__btn--detail:hover {
	background: #e4e9ef;
	color: var(--baohiem-primary) !important;
}

.baohiem-pcard__btn--full {
	flex: 1 1 100%;
}

.baohiem-pcard__actions .added_to_cart {
	display: none;
}

/* Out of stock */
.baohiem-pcard.is-out-of-stock {
	opacity: 0.75;
}

.baohiem-pcard.is-out-of-stock .baohiem-pcard__image img {
	filter: grayscale(30%);
}

/* ── Đồng bộ UX Products shortcode (trang chủ) ── */

.products .product-small.box {
	border: 1px solid rgba(0, 0, 0, 0.12);
	border-radius: 12px;
	overflow: hidden;
	background: #fff;
	box-shadow: 0 2px 10px rgba(0, 0, 0, 0.07), 0 1px 3px rgba(0, 0, 0, 0.05);
	transition: transform var(--baohiem-transition), box-shadow var(--baohiem-transition), border-color var(--baohiem-transition);
}

.products .product-small.box:hover {
	transform: translateY(-5px);
	border-color: var(--baohiem-primary, var(--primary-color));
	box-shadow: 0 14px 36px rgba(0, 0, 0, 0.13);
}

.products .product-small .box-image {
	background: #fff;
	overflow: hidden;
}

.products .product-small .box-image > div {
	position: relative;
	padding-top: 100% !important;
	height: auto !important;
	overflow: hidden;
}

.products .product-small .box-image img {
	position: absolute;
	top: 0;
	left: 0;
	width: 100%;
	height: 100%;
	max-width: none;
	object-fit: cover;
	object-position: center;
	padding: 0;
}

.products .product-small .box-text {
	padding: 1.05rem 1.15rem 1.2rem;
	background: #fafbfc;
	border-top: 1px solid rgba(0, 0, 0, 0.08);
}

.products .product-small .product-title {
	font-size: 15px;
	font-weight: 700;
	line-height: 1.45;
	color: #1a1a1a;
}

.products .product-small .price {
	font-size: 18px;
	font-weight: 800;
	color: var(--baohiem-secondary);
}

.products .product-small .product-cat {
	color: var(--baohiem-primary);
	font-weight: 700;
}

/* Mobile */
@media (max-width: 549px) {
	.baohiem-pcard__actions:not(.baohiem-pcard__actions--stack) {
		flex-direction: column;
	}

	.baohiem-pcard__title {
		min-height: auto;
	}
}
