/* Shared accessibility, then public storefront presentation. */
@media (prefers-reduced-motion: reduce) {
	#selvamart-intro { display: none !important; }
	body.selvamart-intro-active { overflow: auto; }
}
/* Keep the existing brand, with consistent surfaces and usable touch targets. */
body.home .elementor-widget-selvamart-hero-banner {
	width: 100% !important;
	max-width: 100% !important;
	margin-inline: 0 !important;
}
body.selvamart-body:not(.sm-vendor-ui) {
	background: #fffdf8;
	color: #243322;
}
body.selvamart-body:not(.sm-vendor-ui) .selvamart-header__search {
	border: 1px solid #dedfce;
	border-radius: 12px;
}
body.selvamart-body:not(.sm-vendor-ui) .selvamart-header__search button[type="submit"] {
	background: #99451f;
	color: #fff;
	border-radius: 0 10px 10px 0;
}
body.selvamart-body:not(.sm-vendor-ui) .selvamart-footer__social a {
	border-radius: 50%;
}
body.selvamart-body:not(.sm-vendor-ui) .selvamart-mobile-bar a {
	min-height: 48px;
}
body.selvamart-body:not(.sm-vendor-ui) .selvamart-product-card {
	background: #fff;
}
body.selvamart-body:not(.sm-vendor-ui) .selvamart-product-card img {
	aspect-ratio: 1;
	object-fit: contain;
}
/* Keep WooCommerce's absolute screen-reader price labels inside the carousel. */
.selvamart-recently-viewed__grid .sm-rv__card {
	position: relative;
	min-width: 0;
}
body.selvamart-body :is(a, button, input, select, textarea, summary):focus-visible {
	outline: 3px solid #99501f !important;
	outline-offset: 3px;
}
body.selvamart-body:not(.sm-vendor-ui) .selvamart-shop-archive__header {
	padding: clamp(1.25rem, 3vw, 2.5rem);
	margin-bottom: 1.5rem;
	background: linear-gradient(120deg, #faf5e9, #edf4e9);
	border: 1px solid #e5e5d8;
	border-radius: 18px;
}
body.selvamart-body:not(.sm-vendor-ui) .selvamart-product-card {
	border: 1px solid #e6e8df;
	border-radius: 16px;
	box-shadow: 0 4px 18px rgba(35, 53, 28, .05);
	min-width: 0;
	overflow-wrap: anywhere;
}
body.selvamart-body:not(.sm-vendor-ui) .selvamart-product-card:focus-within {
	border-color: #99501f;
}
.selvamart-header__search:focus-within {
	box-shadow: 0 0 0 3px rgba(153, 80, 31, .2);
}
@media (min-width: 768px) and (max-width: 991px) {
	.selvamart-header__search {
		display: grid !important;
		grid-template-columns: minmax(0, 1fr) 42px 42px 48px;
	}
	.selvamart-header__search-category {
		grid-column: 1 / -1;
		width: 100%;
		min-width: 0;
	}
	.selvamart-header__search input[type="search"] {
		grid-column: 1;
		width: 100% !important;
	}
}
.selvamart-header__main-inner > *,
.selvamart-footer__grid > *,
.selvamart-checkout-grid > * {
	min-width: 0;
}
.selvamart-footer__contact a,
.selvamart-profile-info {
	overflow-wrap: anywhere;
}
@media (max-width: 767px) {
	body.selvamart-body:not(.sm-vendor-ui) .selvamart-header__main-inner {
		padding-block: 10px;
		gap: 10px;
	}
	body.selvamart-body:not(.sm-vendor-ui) .selvamart-header__logo img {
		max-height: 58px !important;
		width: auto;
	}
	body.selvamart-body:not(.sm-vendor-ui) .selvamart-header__search-category {
		min-height: 40px;
		border-radius: 10px 10px 0 0;
	}
	/* Bottom navigation already provides the cart; avoid covering the CTA. */
	body:has(.selvamart-mobile-bar) .selvamart-floating-cart {
		display: none;
	}
	.selvamart-header__search {
		display: grid !important;
		box-sizing: border-box;
		grid-template-columns: minmax(0, 1fr) 42px 42px 48px;
	}
	.selvamart-header__search-category {
		grid-column: 1 / -1;
		width: 100%;
		min-width: 0;
	}
	.selvamart-header__search input[type="search"] {
		grid-column: 1;
		width: 100% !important;
	}
	body.selvamart-body:not(.sm-vendor-ui) {
		padding-bottom: calc(72px + env(safe-area-inset-bottom, 0px));
	}
	.selvamart-mobile-bar {
		padding-bottom: env(safe-area-inset-bottom, 0px);
	}
	.selvamart-floating-cart {
		bottom: calc(80px + env(safe-area-inset-bottom, 0px));
	}
	.selvamart-header__search input[type="search"] {
		font-size: 16px;
	}
	body.selvamart-body:not(.sm-vendor-ui) .selvamart-order-summary-sticky {
		position: static !important;
	}
}
/* WooCommerce's default 48% gallery width is redundant inside our grid column. */
body.single-product .selvamart-single-product__gallery .woocommerce-product-gallery {
	width: 100% !important;
	max-width: 100% !important;
	float: none !important;
}
body.single-product .selvamart-single-product__gallery .woocommerce-product-gallery__image > a > img {
	width: 100% !important;
	height: auto !important;
	object-fit: contain !important;
}

/* The single-product wrapper must not make a recommendation fill its row. */
body.single-product .selvamart-single-product-wrapper .related.products ul.products {
	display: grid !important;
	grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
	gap: 16px !important;
	padding: 0 !important;
}
body.single-product .selvamart-single-product-wrapper .related.products ul.products::before,
body.single-product .selvamart-single-product-wrapper .related.products ul.products::after {
	content: none !important;
}
body.single-product .selvamart-single-product-wrapper .related.products ul.products li.product {
	width: 100% !important;
	min-width: 0 !important;
	max-width: none !important;
	margin: 0 !important;
	float: none !important;
	grid-column: auto !important;
	box-sizing: border-box;
}
body.single-product .selvamart-single-product-wrapper .related.products ul.products li.product a.woocommerce-loop-product__link {
	display: block !important;
	min-height: 0 !important;
	padding: 0 !important;
}
body.single-product .selvamart-single-product-wrapper .related.products ul.products li.product a.woocommerce-loop-product__link::before {
	content: none !important;
}
body.single-product .selvamart-single-product-wrapper .related.products ul.products li.product img {
	display: block !important;
	margin: 0 !important;
	width: 100% !important;
	height: 170px !important;
	max-height: 170px !important;
	object-fit: contain !important;
	box-sizing: border-box;
}
body.single-product .related.products .gmwqp_inquirybtn_loop,
body.single-product .related.products .gmwqp_inq {
	display: none !important;
}
body.single-product .selvamart-single-product-wrapper .related.products ul.products li.product .woocommerce-loop-product__title {
	font-size: 15px !important;
	line-height: 1.5 !important;
	overflow-wrap: anywhere;
}
@media (max-width: 767px) {
	body.single-product .selvamart-single-product-wrapper .related.products ul.products {
		grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
		gap: 12px !important;
	}
	body.single-product .selvamart-single-product-wrapper .related.products ul.products li.product img {
		height: 140px !important;
		max-height: 140px !important;
	}
}
@media (prefers-reduced-motion: reduce) {
	body.selvamart-body *, body.selvamart-body *::before, body.selvamart-body *::after {
		animation-duration: .01ms !important;
		animation-iteration-count: 1 !important;
		transition-duration: .01ms !important;
		scroll-behavior: auto !important;
	}
}
