.mbs-breadcrumbs,
.mbs-products,
.mbs-product-categories__grid,
.mbs-category-card,
.mbs-product-stock,
.mbs-product-whatsapp,
.mbs-product-attributes{
	box-sizing: border-box;
}


.mbs-breadcrumbs{
	display: flex;
	align-items: center;
	flex-wrap: wrap;
	min-width: 0;
}

.mbs-breadcrumbs a,
.mbs-breadcrumbs__home{
	display: inline-flex;
	align-items: center;
	column-gap: 0.4em;
	color: inherit;
	text-decoration: none;
}

.mbs-breadcrumbs a:hover,
.mbs-breadcrumbs a:focus-visible{
	text-decoration: underline;
	text-underline-offset: 0.15em;
}

.mbs-breadcrumbs__current{
	min-width: 0;
	overflow-wrap: anywhere;
}

.mbs-products{
	min-width: 0;
}

.mbs-products__heading{
	min-width: 0;
	margin: 0 0 20px;
	overflow-wrap: anywhere;
}

.mbs-products__grid{
	display: grid;
	grid-template-columns: repeat(var(--mbs-products-cols, 4), minmax(0, 1fr));
	align-items: start;
}

.mbs-products--equal .mbs-products__grid{
	align-items: stretch;
}

.mbs-products--equal .mbs-product-card{
	height: 100%;
}


/* MBS Products content layout: one spacing/alignment owner, matching the
 * approved MBS Carousel pattern. Individual typography/color sections no
 * longer add competing vertical margins or alignments. */
.mbs-products .mbs-product-card__body{
	--mbs-product-content-top: 0px;
	--mbs-product-content-gap: 8px;
	--mbs-products-flex-align: flex-start;
	margin-top: var(--mbs-product-content-top);
	row-gap: var(--mbs-product-content-gap);
}

.mbs-products .mbs-product-card__body > :is(
	.mbs-product-card__category,
	.mbs-product-card__title,
	.mbs-product-card__rating-wrap,
	.mbs-product-card__price-group,
	.mbs-product-card__excerpt,
	.mbs-product-card__stock
){
	margin-top: 0;
	margin-bottom: 0;
}

.mbs-products .mbs-product-card__rating-wrap,
.mbs-products .mbs-product-card__price,
.mbs-products .mbs-product-card__saving,
.mbs-products .mbs-product-card__stock{
	justify-content: var(--mbs-products-flex-align);
}

.mbs-products .mbs-product-card__price-group{
	display: flex;
	flex-direction: column;
	row-gap: var(--mbs-product-content-gap);
}

.mbs-products .mbs-product-card__saving{
	margin-top: 0;
}

.mbs-products .mbs-product-card__button-wrap{
	align-items: var(--mbs-products-flex-align);
	padding-top: 0;
}

.mbs-products--button-bottom .mbs-product-card__button-wrap{
	margin-top: auto;
}


.mbs-products__pagination .page-numbers:focus-visible,
.mbs-category-card a:focus-visible,
.mbs-product-whatsapp:focus-visible{
	outline: 3px solid var(--mbs-color-focus);
	outline-offset: 2px;
}


/* Product-card AJAX feedback presentation.
 * State visibility is controlled with the native `hidden` attribute by
 * product.js instead of CSS selectors that depend on transient `.loading` /
 * `.added` classes. This keeps the feedback stable with deferred JavaScript
 * and CSS unused-selector optimizers while WooCommerce remains the AJAX owner. */


.mbs-products__view-all{
	display: flex;
	align-items: center;
	justify-content: center;
}

.mbs-products__view-all-button{
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-width: 0;
	padding: 10px 20px;
	color: inherit;
	background: transparent;
	border: 0;
	border-radius:0;
	text-align: center;
	text-decoration: none;
}

.mbs-products__view-all-button:hover,
.mbs-products__view-all-button:focus{
	color: inherit;
	background: transparent;
	text-decoration: none;
}

.mbs-products__view-all-button:focus-visible{
	outline: 2px solid currentColor;
	outline-offset: 2px;
}

.mbs-products__pagination{
	display: flex;
	align-items: center;
	justify-content: center;
	flex-wrap: wrap;
	gap: 8px;
	margin: 0;
}

.mbs-products__pagination--before{
	margin-bottom: 28px;
}

.mbs-products__pagination--after{
	margin-top: 28px;
}

.mbs-products__pagination .page-numbers{
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-width: 40px;
	min-height: 40px;
	margin: 0;
	color: inherit;
	border: 0;
	border-radius:0;
	text-decoration: none;
}

.mbs-products__pagination .page-numbers.current{
	color: inherit;
	background: transparent;
	border-color: transparent;
}

.mbs-products__empty{
	padding: 28px 16px;
	text-align: center;
}

.mbs-products__empty h3{ margin: 0 0 8px; }
.mbs-products__empty p{ margin: 0; }

.mbs-products__grid.mbs-cols-1{ --mbs-products-cols: 1; }
.mbs-products__grid.mbs-cols-2{ --mbs-products-cols: 2; }
.mbs-products__grid.mbs-cols-3{ --mbs-products-cols: 3; }
.mbs-products__grid.mbs-cols-4{ --mbs-products-cols: 4; }

.mbs-products__grid.mbs-list-view{
	--mbs-products-cols: 1;
	grid-template-columns: 1fr;
}

.mbs-products__grid.mbs-list-view .mbs-product-card{
	display: grid;
	grid-template-columns: minmax(160px, 240px) minmax(0, 1fr);
	align-items: stretch;
	height: auto;
}

.mbs-products__grid.mbs-list-view .mbs-product-card__image{
	min-height: 180px;
}

.mbs-products__grid.mbs-list-view .mbs-product-card__body{
	justify-content: center;
}

.mbs-products__grid.mbs-list-view .mbs-product-card__button-wrap{
	margin-top: 0;
}

.mbs-product-badges{
	position: absolute;
	z-index: 6;
	top: var(--mbs-badge-offset, 12px);
	display: flex;
	align-items: flex-start;
	flex-direction: column;
	gap: var(--mbs-badge-gap, 5px);
	margin: 0;
	padding: 0;
	pointer-events: none;
}

.mbs-product-badges--left{ left: var(--mbs-badge-offset, 12px); }
.mbs-product-badges--right{ right: var(--mbs-badge-offset, 12px); }

.mbs-product-badges--inline{
	position: static;
	top: auto;
	right: auto;
	bottom: auto;
	left: auto;
	display: inline-flex;
	align-items: center;
	flex-direction: row;
	flex-wrap: wrap;
	width: auto;
	pointer-events: none;
}

.mbs-product-badge{
	display: inline-flex;
	align-items: center;
	justify-content: center;
	padding: var(--mbs-badge-pad-y, 6px) var(--mbs-badge-pad-x, 8px);
	color: var(--mbs-badge-text, Canvas);
	border-radius: var(--mbs-badge-radius, 0px);
	font-size: var(--mbs-badge-font-size, 10px);
	font-weight: var(--mbs-badge-font-weight, 700);
	line-height: 1;
	letter-spacing: var(--mbs-badge-letter-spacing, 0.025em);
	text-transform: var(--mbs-badge-text-transform, uppercase);
	white-space: nowrap;
}

.mbs-badge-sale{ background: var(--mbs-badge-sale, var(--mbs-color-danger)); }
.mbs-badge-new{ background: var(--mbs-badge-new, var(--mbs-color-text)); }
.mbs-badge-hot{ background: var(--mbs-badge-hot, var(--mbs-color-warning)); }
.mbs-badge-sold-out{ background: var(--mbs-badge-sold-out, var(--mbs-color-muted)); }
.mbs-badge-featured{ background: var(--mbs-badge-featured, var(--mbs-color-accent)); }
.mbs-badge-low-stock{ background: var(--mbs-badge-low-stock, var(--mbs-color-warning)); }
.mbs-badge-backorder{ background: var(--mbs-badge-backorder, var(--mbs-color-accent)); }

.mbs-product-categories{
	min-width: 0;
}

.mbs-product-categories__heading{
	min-width: 0;
	margin: 0 0 20px;
}

.mbs-product-categories__grid{
	display: grid;
	grid-template-columns: repeat(var(--mbs-category-cols, 4), minmax(0, 1fr));
	align-items: stretch;
}

.mbs-product-categories--natural .mbs-product-categories__grid{
	align-items: start;
}

.mbs-category-card{
	display: flex;
	flex-direction: column;
	min-width: 0;
	height: 100%;
	overflow: hidden;
	background: var(--mbs-color-surface);
	border: 1px solid var(--mbs-color-border);
	border-radius: 0;
}

.mbs-category-card:is(.mbs-category-card--effect-lift, .mbs-category-card--effect-float, .mbs-category-card--effect-grow, .mbs-category-card--effect-press) {
	transition:
		transform var(--mbs-category-card-effect-duration, 180ms) ease var(--mbs-category-card-effect-delay, 0ms),
		box-shadow var(--mbs-category-card-effect-duration, 180ms) ease var(--mbs-category-card-effect-delay, 0ms),
		border-color var(--mbs-category-card-effect-duration, 180ms) ease var(--mbs-category-card-effect-delay, 0ms),
		background-color var(--mbs-category-card-effect-duration, 180ms) ease var(--mbs-category-card-effect-delay, 0ms);
}

/* Product-category-card hover-effect owner. */
.mbs-category-card--effect-lift:hover,
.mbs-category-card--effect-lift:focus-visible,
.mbs-category-card--effect-float:hover,
.mbs-category-card--effect-float:focus-visible {
	transform: translateY(calc(var(--mbs-category-card-effect-amount, 3) * -1px));
}

.mbs-category-card--effect-grow:hover,
.mbs-category-card--effect-grow:focus-visible {
	transform: scale(calc(1 + (var(--mbs-category-card-effect-amount, 3) / 100)));
}

.mbs-category-card--effect-press:hover,
.mbs-category-card--effect-press:focus-visible {
	transform: scale(calc(1 - (var(--mbs-category-card-effect-amount, 3) / 100)));
}

.mbs-product-categories--natural .mbs-category-card{
	height: auto;
}

.mbs-category-card__image{
	display: flex;
	align-items: center;
	justify-content: center;
	min-width: 0;
	overflow: hidden;
	background: var(--mbs-color-surface-muted);
	text-decoration: none;
}

.mbs-category-card__image img{
	display: block;
	width: 100%;
	height: 100%;
	max-width: 100%;
	object-fit: contain;
}

.mbs-category-card__body{
	display: flex;
	flex: 1 1 auto;
	flex-direction: column;
	min-width: 0;
	gap: 8px;
	padding: 16px;
}

.mbs-category-card__title,
.mbs-category-card__count,
.mbs-category-card__description{
	margin: 0;
	min-width: 0;
}

.mbs-category-card__title{
	overflow-wrap: anywhere;
}

.mbs-category-card__title > a{
	color: inherit;
	text-decoration: none;
}

.mbs-product-categories__empty{
	min-width: 0;
	text-align: center;
}

.mbs-product-categories__empty h3,
.mbs-product-categories__empty p{
	margin: 0;
}

.mbs-product-categories__empty p{
	margin-top: 8px;
}

.mbs-product-categories__view-all-row{
	display: flex;
	width: 100%;
	min-width: 0;
	align-items: center;
	justify-content: center;
	margin-top: 24px;
}

.mbs-product-categories__view-all{
	display: inline-flex;
	flex: 0 0 auto;
	align-items: center;
	justify-content: center;
	box-sizing: border-box;
	min-width: 0;
	min-height: 0;
	color: inherit;
	background: transparent;
	text-align: center;
	text-decoration: none;
}

.mbs-product-categories__view-all:hover,
.mbs-product-categories__view-all:focus-visible{
	text-decoration: none;
}

.mbs-product-categories__view-all:focus-visible{
	outline: 2px solid currentColor;
	outline-offset: 2px;
}

.mbs-product-categories__view-all-content{
	display: flex;
	align-items: center;
	justify-content: center;
	min-width: 0;
	max-width: 100%;
	gap: 0;
}

.mbs-product-categories__view-all-icon{
	display: flex;
	align-items: center;
	justify-content: center;
	flex: 0 0 auto;
	margin: 0;
	padding: 0;
	line-height: 1;
	color: inherit;
}

.mbs-product-categories__view-all-icon > :is(i, svg, img){
	display: block;
	width: 1em;
	height: 1em;
	max-width: none;
	max-height: none;
	font-size: 1em;
	line-height: 1;
	color: inherit;
	object-fit: contain;
	margin: 0;
	padding: 0;
}

.mbs-product-categories__view-all-icon svg{
	fill: currentColor;
}

.mbs-product-categories__view-all-text{
	display: inline-block;
	min-width: 0;
	max-width: 100%;
	overflow-wrap: anywhere;
}

.mbs-product-short-description,
.mbs-product-description-wrap,
.mbs-product-attributes-wrap{
	min-width: 0;
}

.mbs-product-short-description > :first-child,
.mbs-product-description > :first-child{ margin-top: 0; }
.mbs-product-short-description > :last-child,
.mbs-product-description > :last-child{ margin-bottom: 0; }

.mbs-product-inline,
.mbs-product-trust,
.mbs-product-rating{
	display: flex;
	align-items: center;
	gap: 8px;
	min-width: 0;
}

.mbs-product-rating .star-rating{
	margin: 0;
}

.mbs-product-stock{
	display: flex;
	align-items: center;
	gap: 8px;
	color: var(--mbs-stock-in-color, var(--mbs-color-success));
}

.mbs-product-stock.is-backorder{ color: var(--mbs-stock-back-color, var(--mbs-color-warning)); }
.mbs-product-stock.is-out-of-stock{ color: var(--mbs-stock-out-color, var(--mbs-color-danger)); }

.mbs-product-stock__dot{
	width: 9px;
	height: 9px;
	flex: 0 0 auto;
	background: currentColor;
	border-radius: 50%;
}

.mbs-product-section-title{ margin: 0; }

.mbs-product-whatsapp-wrap{
	display: flex;
	width: 100%;
}

.mbs-product-whatsapp{
	display: inline-flex;
	align-items: center;
	justify-content: center;
	column-gap: 9px;
	min-height: 44px;
	padding: 10px 16px;
	color: inherit;
	background: transparent;
	border: 0;
	border-radius:0;
	line-height: 1.2;
	text-decoration: none;
}

.mbs-product-whatsapp:hover,
.mbs-product-whatsapp:focus-visible{
	color: inherit;
	background: transparent;
	text-decoration: none;
}

.mbs-product-attributes{
	width: 100%;
	border-collapse: collapse;
}

.mbs-product-attributes th,
.mbs-product-attributes td{
	padding: 10px 12px;
	border-bottom: 1px solid var(--mbs-color-border);
	text-align: left;
	vertical-align: top;
	overflow-wrap: anywhere;
}


@media (max-width: 767px) {
	.mbs-products__grid.mbs-list-view .mbs-product-card{
		display: flex;
		flex-direction: column;
	}

	.mbs-products__grid.mbs-list-view .mbs-product-card__image{ min-height: 0; }


	.mbs-product-badge{
		padding: 5px 7px;
		font-size: 9px;
	}
}

@media (prefers-reduced-motion: reduce) {
	.mbs-category-card,
	.mbs-products .mbs-product-card__image--swap .mbs-product-card__img {
		transition: none;
	}
}

/* MBS Products image-swap and button-content ownership. */
.mbs-products .mbs-product-card__image--swap .mbs-product-card__img{
	transition: opacity var(--mbs-products-image-hover-duration, 260ms) ease;
}

.mbs-products .mbs-product-card__image--swap .mbs-product-card__img--hover{
	position: absolute;
	inset: 0;
	margin: auto;
	opacity: 0;
	pointer-events: none;
}

@media (hover: hover) and (pointer: fine) {
	.mbs-products .mbs-product-card__image--swap:hover .mbs-product-card__img--primary,
.mbs-products .mbs-product-card:hover .mbs-product-card__image--swap .mbs-product-card__img--primary{
		opacity: 0;
	}

	.mbs-products .mbs-product-card__image--swap:hover .mbs-product-card__img--hover,
.mbs-products .mbs-product-card:hover .mbs-product-card__image--swap .mbs-product-card__img--hover{
		opacity: 1;
	}
}

/* Products controls own button sizing; shared visual ownership stays in product-card.css. */
.mbs-products .mbs-product-card__button{
	min-height: 0;
}

.mbs-products__view-all-content{
	display: flex;
	align-items: center;
	justify-content: center;
	min-width: 0;
	max-width: 100%;
	gap: 0;
}

.mbs-products__view-all-text{
	display: inline-block;
	min-width: 0;
	max-width: 100%;
	overflow-wrap: anywhere;
}

/* View All controls own its size and visuals. */
.mbs-products .mbs-products__view-all-button{
	min-height: 0;
}

/* =========================================================
 * Single Product description expansion + reviews
 * ========================================================= */
.mbs-product-description__toggle-wrap{
	margin: 0;
}

.mbs-product-description__toggle{
	-webkit-appearance: none;
	appearance: none;
	margin: 0;
	padding: 0;
	border: 0;
	background: transparent;
	color: inherit;
	font: inherit;
	line-height: inherit;
	box-shadow: none;
	cursor: pointer;
}

.mbs-product-description__toggle:focus-visible{
	outline: 2px solid currentColor;
	outline-offset: 2px;
}

.mbs-product-description__excerpt[hidden],
.mbs-product-description__full[hidden]{
	display: none;
}

.mbs-product-reviews,
.mbs-product-reviews .woocommerce-Reviews,
.mbs-product-reviews #comments,
.mbs-product-reviews #review_form_wrapper,
.mbs-product-reviews #review_form{
	min-width: 0;
	max-width: 100%;
}

.mbs-product-reviews__heading{
	margin: 0;
}

.elementor-widget-mbs-product-reviews .mbs-product-reviews--hide-native-title .woocommerce-Reviews-title{
	display: none;
}

.elementor-widget-mbs-product-reviews .mbs-product-reviews .commentlist{
	display: grid;
	margin: 0;
	padding: 0;
	list-style: none;
}

.elementor-widget-mbs-product-reviews .mbs-product-reviews .commentlist > li{
	margin: 0;
	border-bottom: 1px solid transparent;
}

.elementor-widget-mbs-product-reviews .mbs-product-reviews .commentlist > li:last-child{
	border-bottom-color: transparent;
}

.woocommerce .elementor-widget-mbs-product-reviews .mbs-product-reviews--stacked #reviews #comments,
.woocommerce-page .elementor-widget-mbs-product-reviews .mbs-product-reviews--stacked #reviews #comments,
.woocommerce .elementor-widget-mbs-product-reviews .mbs-product-reviews--stacked #reviews #review_form_wrapper,
.woocommerce-page .elementor-widget-mbs-product-reviews .mbs-product-reviews--stacked #reviews #review_form_wrapper{
	float: none;
	width: 100%;
}

.elementor-widget-mbs-product-reviews .mbs-product-reviews #review_form input[type="text"],
.elementor-widget-mbs-product-reviews .mbs-product-reviews #review_form input[type="email"],
.elementor-widget-mbs-product-reviews .mbs-product-reviews #review_form textarea{
	box-sizing: border-box;
	max-width: 100%;
}
