/* Mehrad storefront category and product browser widgets. */
.elementor-widget-mehrad_store_category_carousel .elementor-widget-container,
.elementor-widget-mehrad_category_products_browser .elementor-widget-container{
	overflow:visible;
}

.mehrad-storefront-empty{
	padding:22px;
	border:1px dashed #cbd5e1;
	border-radius:18px;
	color:#64748b;
	text-align:center;
}

/* Image category carousel. */
.mehrad-store-category-carousel{
	--msc-per-view:9;
	--msc-gap:16px;
	--msc-radius:26px;
	--msc-text:#263044;
	--msc-image-bg:#efefef;
	--msc-placeholder:#7a8799;
	width:100%;
	max-width:100%;
	min-width:0;
	direction:rtl;
}

.mehrad-store-category-carousel__viewport{
	width:100%;
	max-width:100%;
	overflow-x:auto;
	overflow-y:hidden;
	padding:2px 1px 5px;
	direction:rtl;
	scroll-snap-type:x mandatory;
	scrollbar-width:none;
	-ms-overflow-style:none;
	-webkit-overflow-scrolling:touch;
	overscroll-behavior-inline:contain;
	touch-action:pan-x pan-y pinch-zoom;
	cursor:grab;
}

.mehrad-store-category-carousel__viewport::-webkit-scrollbar{display:none}
.mehrad-store-category-carousel.is-dragging .mehrad-store-category-carousel__viewport{cursor:grabbing;scroll-snap-type:none;scroll-behavior:auto}
.mehrad-store-category-carousel.is-dragging,.mehrad-store-category-carousel.is-dragging *{user-select:none!important;-webkit-user-select:none!important}

.mehrad-store-category-carousel__track{
	display:flex;
	align-items:flex-start;
	gap:var(--msc-gap);
	min-width:100%;
	direction:rtl;
}

.mehrad-store-category-carousel__item{
	display:flex;
	flex:0 0 calc((100% - (var(--msc-gap) * (var(--msc-per-view) - 1))) / var(--msc-per-view));
	flex-direction:column;
	align-items:center;
	min-width:0;
	color:var(--msc-text)!important;
	text-decoration:none!important;
	scroll-snap-align:start;
}

.mehrad-store-category-carousel__media{
	position:relative;
	display:block;
	width:100%;
	aspect-ratio:1 / 1;
	overflow:hidden;
	border-radius:var(--msc-radius);
	background:var(--msc-image-bg);
	line-height:0;
}

.mehrad-store-category-carousel__media img{
	position:absolute;
	inset:0;
	display:block!important;
	width:100%!important;
	height:100%!important;
	max-width:none!important;
	max-height:none!important;
	margin:0!important;
	padding:10px!important;
	border:0!important;
	border-radius:inherit!important;
	box-sizing:border-box;
	object-fit:contain!important;
	object-position:center!important;
	transition:transform .28s ease;
}

.mehrad-store-category-carousel__item:hover .mehrad-store-category-carousel__media img{transform:scale(1.05)}

.mehrad-store-category-carousel__placeholder{
	display:grid;
	place-items:center;
	width:100%;
	height:100%;
	color:var(--msc-placeholder);
}
.mehrad-store-category-carousel__placeholder-icon{width:38%;height:38%;max-width:46px;max-height:46px;fill:currentColor}

.mehrad-store-category-carousel__item strong{
	display:-webkit-box;
	width:100%;
	margin-top:8px;
	overflow:hidden;
	color:inherit;
	font-size:13px;
	font-weight:850;
	line-height:1.7;
	text-align:center;
	text-overflow:ellipsis;
	-webkit-line-clamp:1;
	-webkit-box-orient:vertical;
}

html.dark .mehrad-store-category-carousel,
body.dark .mehrad-store-category-carousel,
[data-theme="dark"] .mehrad-store-category-carousel{
	--msc-text:#f8fafc;
	--msc-image-bg:#2f3c50;
	--msc-placeholder:#cbd5e1;
}

/* Tabbed category products. */
.mehrad-category-products-browser{
	--mcpb-columns:5;
	--mcpb-rows:2;
	--mcpb-gap:0px;
	--mcpb-radius:18px;
	--mcpb-card-radius:14px;
	--mcpb-image-radius:12px;
	--mcpb-image-size:96px;
	--mcpb-panel-bg:#fff;
	--mcpb-border:#e5e7eb;
	--mcpb-tab-text:#263044;
	--mcpb-tab-active:#ef476f;
	--mcpb-title:#343b4a;
	--mcpb-muted:#777f8d;
	--mcpb-price:#263044;
	--mcpb-discount:#ef476f;
	--mcpb-rating:#ffb000;
	--mcpb-divider:#edf0f4;
	width:100%;
	max-width:100%;
	min-width:0;
	direction:rtl;
}

.mehrad-category-products-browser__tabs{
	display:flex;
	align-items:center;
	justify-content:flex-start;
	gap:10px;
	width:100%;
	margin:0 0 18px;
	overflow-x:auto;
	overflow-y:hidden;
	padding:1px 1px 4px;
	direction:rtl;
	scrollbar-width:none;
	-ms-overflow-style:none;
	-webkit-overflow-scrolling:touch;
	touch-action:pan-x pan-y pinch-zoom;
}
.mehrad-category-products-browser__tabs::-webkit-scrollbar{display:none}

.mehrad-category-products-browser__tab{
	flex:0 0 auto;
	min-height:42px;
	padding:0 18px;
	border:1px solid var(--mcpb-border);
	border-radius:999px;
	background:transparent;
	color:var(--mcpb-tab-text);
	font:inherit;
	font-size:14px;
	font-weight:750;
	white-space:nowrap;
	cursor:pointer;
	transition:border-color .22s ease,color .22s ease,background-color .22s ease;
}
.mehrad-category-products-browser__tab:hover{border-color:var(--mcpb-tab-active);color:var(--mcpb-tab-active)}
.mehrad-category-products-browser__tab.is-active{border-color:var(--mcpb-tab-active);color:var(--mcpb-tab-active);background:color-mix(in srgb,var(--mcpb-tab-active) 5%,transparent)}

.mehrad-category-products-browser__panels{
	border:1px solid var(--mcpb-border);
	border-radius:var(--mcpb-radius)!important;
	background:var(--mcpb-panel-bg);
	overflow:hidden!important;
	clip-path:inset(0 round var(--mcpb-radius));
}
.mehrad-category-products-browser__panel[hidden]{display:none!important}

.mehrad-category-products-browser__viewport{
	width:100%;
	max-width:100%;
	overflow-x:auto;
	overflow-y:hidden;
	direction:rtl;
	scroll-snap-type:x mandatory;
	scrollbar-width:none;
	-ms-overflow-style:none;
	-webkit-overflow-scrolling:touch;
	overscroll-behavior-inline:contain;
	touch-action:pan-x pan-y pinch-zoom;
	cursor:grab;
}
.mehrad-category-products-browser__viewport::-webkit-scrollbar{display:none}
.mehrad-category-products-browser__panel.is-dragging .mehrad-category-products-browser__viewport{cursor:grabbing;scroll-snap-type:none;scroll-behavior:auto}
.mehrad-category-products-browser__panel.is-dragging,.mehrad-category-products-browser__panel.is-dragging *{user-select:none!important;-webkit-user-select:none!important}

.mehrad-category-products-browser__track{
	display:grid;
	grid-template-rows:repeat(var(--mcpb-rows),minmax(0,1fr));
	grid-auto-flow:column;
	grid-auto-columns:calc((100% - (var(--mcpb-gap) * (var(--mcpb-columns) - 1))) / var(--mcpb-columns));
	gap:var(--mcpb-gap);
	min-width:100%;
	direction:rtl;
}

.mehrad-category-products-browser__card{
	display:grid;
	grid-template-columns:var(--mcpb-image-size) minmax(0,1fr);
	grid-template-areas:"media body";
	align-items:center;
	gap:12px;
	min-width:0;
	min-height:165px;
	padding:18px 14px;
	border-inline-end:1px solid var(--mcpb-divider);
	border-bottom:1px solid var(--mcpb-divider);
	background:var(--mcpb-panel-bg);
	border-radius:0;
	overflow:hidden;
	background-clip:padding-box;
	color:var(--mcpb-title)!important;
	text-decoration:none!important;
	scroll-snap-align:start;
	box-sizing:border-box;
}

.mehrad-category-products-browser__media{
	grid-area:media;
	display:grid;
	place-items:center;
	width:var(--mcpb-image-size);
	height:var(--mcpb-image-size);
	aspect-ratio:1 / 1;
	overflow:hidden!important;
	border-radius:var(--mcpb-image-radius)!important;
	clip-path:inset(0 round var(--mcpb-image-radius));
	background:color-mix(in srgb,var(--mcpb-panel-bg) 88%,#ffffff);
	line-height:0;
}
.mehrad-category-products-browser__media img,
.mehrad-category-products-browser__media picture,
.mehrad-category-products-browser__media .wp-post-image{
	display:block!important;
	width:100%!important;
	height:100%!important;
	max-width:none!important;
	max-height:none!important;
	margin:0!important;
	padding:0!important;
	border:0!important;
	border-radius:inherit!important;
	overflow:hidden!important;
	clip-path:inset(0 round var(--mcpb-image-radius));
	object-fit:contain!important;
	object-position:center!important;
}

.mehrad-category-products-browser__body{
	grid-area:body;
	display:flex;
	flex-direction:column;
	align-items:stretch;
	min-width:0;
}

.mehrad-category-products-browser__title{
	display:-webkit-box;
	min-height:3.7em;
	margin:0;
	overflow:hidden;
	color:var(--mcpb-title);
	font-size:14px;
	font-weight:700;
	line-height:1.85;
	text-align:right;
	text-overflow:ellipsis;
	-webkit-line-clamp:2;
	-webkit-box-orient:vertical;
}

.mehrad-category-products-browser__category{
	display:-webkit-box;
	margin-top:3px;
	overflow:hidden;
	color:var(--mcpb-muted);
	font-size:10px;
	font-weight:600;
	line-height:1.6;
	text-align:right;
	text-overflow:ellipsis;
	-webkit-line-clamp:1;
	-webkit-box-orient:vertical;
}

.mehrad-category-products-browser__meta{
	display:flex;
	align-items:center;
	justify-content:space-between;
	gap:8px;
	min-height:24px;
	margin-top:7px;
}

.mehrad-category-products-browser__rating{
	display:inline-flex;
	align-items:center;
	gap:4px;
	color:var(--mcpb-title);
	font-size:11px;
	font-weight:800;
	direction:ltr;
}
.mehrad-category-products-browser__rating i{color:var(--mcpb-rating);font-size:16px;font-style:normal;line-height:1}

.mehrad-category-products-browser__discount{
	display:inline-flex;
	align-items:center;
	justify-content:center;
	min-height:24px;
	padding:0 8px;
	border-radius:999px;
	background:var(--mcpb-discount);
	color:#fff;
	font-size:10px;
	font-weight:950;
}

.mehrad-category-products-browser__price{
	display:inline-flex;
	align-items:center;
	justify-content:flex-start;
	align-self:flex-end;
	justify-content:flex-end;
	gap:5px;
	min-height:28px;
	margin-top:5px;
	color:var(--mcpb-price);
	direction:ltr;
	white-space:nowrap;
}
.mehrad-category-products-browser__price b{order:2;color:inherit;font-size:14px;font-weight:950;direction:rtl}
.mehrad-category-products-browser__currency{order:1;display:grid;place-items:center;width:20px;height:20px;flex:0 0 20px}
.mehrad-category-products-browser__currency img{display:block!important;width:18px!important;height:18px!important;max-width:18px!important;max-height:18px!important;margin:0!important;padding:0!important;border:0!important;object-fit:contain!important}

.mehrad-category-products-browser__empty{padding:34px;color:var(--mcpb-muted);text-align:center}

html.dark .mehrad-category-products-browser,
body.dark .mehrad-category-products-browser,
[data-theme="dark"] .mehrad-category-products-browser{
	--mcpb-panel-bg:#202b3a;
	--mcpb-border:#42526a;
	--mcpb-tab-text:#dbe4f0;
	--mcpb-tab-active:#ff6b8b;
	--mcpb-title:#f8fafc;
	--mcpb-muted:#bdc8d8;
	--mcpb-price:#f8fafc;
	--mcpb-discount:#ff6b8b;
	--mcpb-rating:#ffc342;
	--mcpb-divider:#3d4b60;
}
html.dark .mehrad-category-products-browser__currency img,
body.dark .mehrad-category-products-browser__currency img,
[data-theme="dark"] .mehrad-category-products-browser__currency img{filter:brightness(0) invert(1)}

@media(max-width:1024px){
	.mehrad-store-category-carousel{--msc-per-view:6}
	.mehrad-category-products-browser{--mcpb-columns:3}
}

@media(max-width:767px){
	.mehrad-store-category-carousel{--msc-per-view:4.2;--msc-gap:10px}
	.mehrad-store-category-carousel__media img{padding:7px!important}
	.mehrad-store-category-carousel__item strong{margin-top:6px;font-size:11px}

	.mehrad-category-products-browser{--mcpb-columns:2;--mcpb-rows:2;--mcpb-image-size:72px}
	.mehrad-category-products-browser__tabs{gap:7px;margin-bottom:10px}
	.mehrad-category-products-browser__tab{min-height:35px;padding:0 13px;font-size:11px}
	.mehrad-category-products-browser__card{grid-template-columns:var(--mcpb-image-size) minmax(0,1fr);gap:9px;min-height:126px;padding:12px 9px}
	.mehrad-category-products-browser__media{width:var(--mcpb-image-size);height:var(--mcpb-image-size);aspect-ratio:1 / 1}
	.mehrad-category-products-browser__title{min-height:3.5em;font-size:11px;line-height:1.75}
	.mehrad-category-products-browser__category{font-size:8.5px}
	.mehrad-category-products-browser__meta{margin-top:4px;gap:4px}
	.mehrad-category-products-browser__rating{font-size:9px}.mehrad-category-products-browser__rating i{font-size:13px}
	.mehrad-category-products-browser__discount{min-height:20px;padding:0 6px;font-size:8px}
	.mehrad-category-products-browser__price{gap:3px;margin-top:3px}.mehrad-category-products-browser__price b{font-size:11px}.mehrad-category-products-browser__currency{width:16px;height:16px;flex-basis:16px}.mehrad-category-products-browser__currency img{width:15px!important;height:15px!important;max-width:15px!important;max-height:15px!important}
}

@media(prefers-reduced-motion:reduce){
	.mehrad-store-category-carousel__media img,
	.mehrad-category-products-browser__tab{transition:none!important}
}


/* Mehrad v1.0.122 exact radius fix for the tabbed product widget. */
.elementor-widget-mehrad_category_products_browser .mehrad-category-products-browser__panels{
	border-radius:var(--mcpb-radius)!important;
	overflow:hidden!important;
}
.elementor-widget-mehrad_category_products_browser .mehrad-category-products-browser__card{
	border-radius:0!important;
	overflow:hidden!important;
}
.elementor-widget-mehrad_category_products_browser .mehrad-category-products-browser__media,
.elementor-widget-mehrad_category_products_browser .mehrad-category-products-browser__media img,
.elementor-widget-mehrad_category_products_browser .mehrad-category-products-browser__media picture,
.elementor-widget-mehrad_category_products_browser .mehrad-category-products-browser__media .wp-post-image{
	border-radius:var(--mcpb-image-radius)!important;
	overflow:hidden!important;
	clip-path:inset(0 round var(--mcpb-image-radius));
}


/* Mehrad v1.0.123 - true square product image frame. */
.elementor-widget-mehrad_category_products_browser .mehrad-category-products-browser__media{
	width:var(--mcpb-image-size)!important;
	height:var(--mcpb-image-size)!important;
	min-width:var(--mcpb-image-size)!important;
	min-height:var(--mcpb-image-size)!important;
	max-width:var(--mcpb-image-size)!important;
	max-height:var(--mcpb-image-size)!important;
	aspect-ratio:1 / 1!important;
	border-radius:var(--mcpb-image-radius)!important;
	background:#fff!important;
	overflow:hidden!important;
	clip-path:inset(0 round var(--mcpb-image-radius));
}
.elementor-widget-mehrad_category_products_browser .mehrad-category-products-browser__media img,
.elementor-widget-mehrad_category_products_browser .mehrad-category-products-browser__media .wp-post-image,
.elementor-widget-mehrad_category_products_browser .mehrad-category-products-browser__media picture{
	display:block!important;
	width:100%!important;
	height:100%!important;
	min-width:100%!important;
	min-height:100%!important;
	max-width:100%!important;
	max-height:100%!important;
	aspect-ratio:1 / 1!important;
	border-radius:var(--mcpb-image-radius)!important;
	object-fit:contain!important;
	object-position:center!important;
	background:#fff!important;
}


/* Mehrad v1.0.124 - product cards use square corners; image radius remains separate. */
.elementor-widget-mehrad_category_products_browser .mehrad-category-products-browser__card{
	border-radius:0!important;
}
