/*
 * Reusable product/card patterns for the FusionCommerce redesign.
 *
 * Keep this shared across product modules, category listings and product-related card contexts where practical.
 */

.vm-product-title {
	min-height: 2.7em;
	font-size: 1rem !important;
	line-height: 1.35;
}

.category-view .quantity-box {
	display: none;
	visibility: hidden;
}

.vm-products-type-title,
.vm-page-title,
.vm-category-title,
.vm-section-title {
	color: var(--color-text-strong);
}

.vm-price-desc {
	color: var(--color-text-muted);
}

.vm-has-discount .PricesalesPrice,
.vm-product-details-container .vm-price-value .PricesalesPrice,
.vm2-remove_from_cart {
	color: var(--color-danger);
}

.vm-has-discount .PricebasePriceWithTax::after {
	border-top-color: var(--color-border-price);
}

.vm-category-subcategories .vm-subcategory>a {
	display: flex;
	flex-direction: column;
	height: 100%;
	padding: 0.9rem;
	border: 1px solid var(--category-card-border);
	border-radius: var(--bs-border-radius);
	background: linear-gradient(180deg, var(--color-surface) 0%, var(--color-surface-alt) 100%);
	box-shadow: var(--shadow-category-card-soft);
	color: inherit;
	text-decoration: none;
	transition: box-shadow 0.22s ease, border-color 0.22s ease, background-color 0.22s ease;
	backface-visibility: hidden;
	-webkit-font-smoothing: antialiased;
}

.vm-category-subcategories .vm-subcategory>a:hover,
.vm-category-subcategories .vm-subcategory>a:focus {
	border-color: var(--category-card-border-hover);
	box-shadow: var(--shadow-category-card-soft-hover);
}

.vm-category-subcategories .browseCategoryImage {
	display: block;
	width: 100%;
	margin-bottom: 0.9rem !important;
	border-radius: calc(var(--bs-border-radius) - 0.15rem);
}

.vm-category-subcategories .vm-subcategory-title {
	margin: 0;
	padding-top: 0.85rem;
	border-top: 1px solid var(--category-card-separator) !important;
	color: var(--color-text);
	font-size: 1.25rem;
	font-weight: 500;
	line-height: 1.35;
	transition: color 0.22s ease, border-color 0.22s ease;
}

.vm-category-subcategories .vm-subcategory>a:hover .vm-subcategory-title,
.vm-category-subcategories .vm-subcategory>a:focus .vm-subcategory-title {
	color: var(--color-primary);
	border-top-color: var(--category-card-separator-hover) !important;
}
.vm-product-meta-container {
	min-height: 1.75rem;
	gap: 0.75rem;
}

.vm-product-meta-container.is-empty {
	border-bottom-color: transparent !important;
}

.vm-product-meta__rating,
.vm-product-meta__stock {
	display: flex;
	align-items: center;
	min-height: 1.25rem;
}

.vm-product-meta__stock {
	margin-left: auto;
}

.vm-stock-status-text {
	display: inline-flex;
	align-items: center;
	gap: 0.4rem;
	font-size: 0.8125rem;
	font-weight: 400;
	line-height: 1.2;
	color: var(--color-text-muted);
	white-space: nowrap;
}

.vm-stock-status__dot {
	position: relative;
	top: -0.01em;
	width: 0.42rem;
	height: 0.42rem;
	flex: 0 0 0.42rem;
	border-radius: 50%;
	background-color: currentColor;
	opacity: 0.95;
}

.vm-stock-status.lowstock {
	color: var(--color-secondary-dark);
}

.vm-stock-status.nostock {
	color: var(--color-danger-dark);
}

.vm-stock-status.normalstock {
	color: var(--color-success);
}

.vm-stock-status__label {
	display: inline-block;
	padding: 0.2rem 0.55rem;
	border: 1px solid transparent;
	border-radius: var(--bs-border-radius-pill);
}

.vm-ratingbox-wrap {
	display: inline-flex;
	align-items: center;
	gap: 0.45rem;
}

.vm-ratingbox-summary {
	display: inline-flex;
	align-items: baseline;
	gap: 0.2rem;
	font-size: 0.8125rem;
	line-height: 1;
	color: var(--color-rating-meta);
	white-space: nowrap;
}

.vm-ratingbox-value {
	font-weight: 600;
	color: var(--color-text);
}

.vm-ratingbox-count {
	color: var(--color-rating-meta);
}

.bi-square,
.vm-ratingbox-unrated svg,
.customer-reviews .form-check-label svg {
	color: var(--color-rating-empty);
}

.vm-ratingbox-rated svg {
	color: var(--color-rating-active) !important;
}

.normalstock .bi-square-fill {
	color: var(--color-success) !important;
}

.lowstock .bi-square-fill {
	color: var(--color-secondary) !important;
}

.nostock .bi-square-fill {
	color: var(--color-danger) !important;
}

.availability {
	padding: 0.45rem 0.75rem;
	border-radius: var(--bs-border-radius);
	background: var(--color-secondary-soft);
	color: var(--color-availability-text);
}

.item-image,
.vm-img-desc,
.vm-product-media-container,
.additional-images a {
	overflow: hidden;
	border-radius: var(--bs-border-radius-xl);
}

.item-image img,
.vm-product-media-container img,
.additional-images img,
.vm-product-category-image img,
.category-view img {
	border-radius: var(--bs-border-radius);
}

@media screen and (max-width: 768px) {
	.vm-page-title,
	.vm-category-title {
		font-size: 26px;
	}
}
