/* =========================================================
   Mr Amniat - Product Carousel
   ========================================================= */

.mae-carousel-widget {
	--mae-gap: 20px;
	position: relative;
}

/* ---------- Header ---------- */
.mae-carousel-header {
	display: flex;
	align-items: center;
	justify-content: space-between;
	direction: ltr; /* لینک «مشاهده همه» همیشه چپ، عنوان همیشه راست */
	margin-bottom: 22px;
}

.mae-view-all {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	font-size: 13.5px;
	font-weight: 600;
	color: #14B8A6;
	text-decoration: none;
}

.mae-view-all i,
.mae-view-all svg {
	font-size: 13px;
	width: 13px;
	height: 13px;
}

.mae-carousel-title {
	margin: 0;
	font-size: 19px;
	font-weight: 700;
	color: #16213E;
	direction: rtl;
}

/* ---------- Viewport / track ---------- */
.mae-carousel-viewport {
	position: relative;
	overflow: hidden;
}

.mae-carousel-track {
	display: flex;
	gap: var(--mae-gap);
	direction: ltr; /* جابه‌جایی فیزیکی همیشه قابل‌پیش‌بینی، صرف‌نظر از rtl صفحه */
	will-change: transform;
}

.mae-carousel-slide {
	flex: 0 0 auto;
	box-sizing: border-box;
}

/* ---------- Card shell ---------- */
.mae-product-card {
	position: relative;
	background-color: #FFFFFF;
	border-radius: 20px;
	box-shadow: 0 10px 30px rgba(20, 30, 60, 0.07);
	overflow: hidden;
	direction: rtl;
	display: flex;
	flex-direction: column;
	height: 100%;
}

/* ---------- Decorative SVG traces ---------- */
.mae-deco {
	position: absolute;
	color: #5EE7DA;
	pointer-events: none;
	z-index: 2;
}

.mae-deco-tr {
	top: 0;
	right: 0;
	width: 90px;
	height: 70px;
}

.mae-deco-bl {
	bottom: 0;
	left: 0;
	width: 90px;
	height: 38px;
}

.mae-card-sep {
	position: relative;
	width: 100%;
	height: 10px;
	flex: 0 0 auto;
}

.mae-card-sep .mae-deco-sep {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
}

.mae-corner-slash {
	position: absolute;
	width: 18px;
	height: 5px;
	background-color: #16213E;
	border-radius: 2px;
	z-index: 3;
	pointer-events: none;
}

.mae-corner-slash-tr {
	top: 34px;
	right: 30px;
	transform: rotate(-50deg);
}

.mae-corner-slash-bl {
	bottom: 14px;
	left: 14px;
	transform: rotate(-50deg);
}

/* ---------- Logo ---------- */
.mae-card-logo {
	position: absolute;
	top: 16px;
	right: 16px;
	z-index: 4;
	max-width: 70px;
}

.mae-card-logo img {
	display: block;
	width: 100%;
	height: auto;
	object-fit: contain;
}

/* ---------- Image area ---------- */
.mae-card-image-wrap {
	position: relative;
	display: flex;
	align-items: center;
	justify-content: center;
	background-color: #FBFCFD;
	aspect-ratio: 1 / 1;
	text-decoration: none;
	overflow: hidden;
}

.mae-card-image-wrap img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	display: block;
}

.mae-card-watermark {
	position: absolute;
	top: 50%;
	left: 50%;
	transform: translate(-38%, -42%);
	width: 65%;
	color: #16213E;
	opacity: 0.05;
}

.mae-card-placeholder {
	position: relative;
	z-index: 1;
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 10px;
	color: #B6BAC2;
}

.mae-card-placeholder svg {
	width: 38px;
	height: 38px;
}

.mae-card-placeholder span {
	font-size: 12px;
}

/* ---------- Footer ---------- */
.mae-card-footer {
	display: flex;
	align-items: flex-start;
	justify-content: space-between;
	gap: 12px;
	padding: 14px 20px 6px;
	direction: ltr; /* قیمت همیشه چپ، اطلاعات محصول همیشه راست */
}

.mae-price-block {
	order: 1;
	display: flex;
	flex-direction: column;
	gap: 6px;
	flex: 0 0 auto;
	direction: rtl;
	text-align: right;
}

.mae-price-label {
	font-size: 11px;
	color: #9097A3;
}

.mae-price-value {
	font-size: 15px;
	font-weight: 700;
	color: #16213E;
	white-space: nowrap;
}

.mae-card-info {
	order: 2;
	flex: 1 1 auto;
	min-width: 0;
	direction: rtl;
	text-align: right;
	display: flex;
	flex-direction: column;
	gap: 6px;
}

.mae-card-title {
	font-size: 14.5px;
	font-weight: 700;
	color: #1A1D29;
	text-decoration: none;
	display: block;
}

.mae-card-desc {
	font-size: 11.5px;
	color: #9097A3;
	line-height: 1.6;
}

.mae-card-rating {
	display: flex;
	align-items: center;
	gap: 6px;
	direction: ltr;
}

.mae-card-rating-count {
	font-size: 11px;
	color: #9097A3;
}

.mae-stars {
	display: inline-flex;
	gap: 2px;
}

.mae-star {
	width: 13px;
	height: 13px;
}

.mae-star.is-filled {
	color: #1BC5BD;
}

.mae-star.is-empty {
	color: #D7DAE0;
}

/* ---------- Add to cart button ---------- */
.mae-add-to-cart {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 8px;
	margin: 12px 20px 14px;
	padding: 12px 16px;
	background-color: #16213E;
	color: #FFFFFF;
	border-radius: 12px;
	font-size: 13px;
	font-weight: 600;
	text-decoration: none;
	transition: background-color 0.2s ease;
	direction: ltr; /* آیکون همیشه چپ، متن همیشه راست داخل دکمه */
}

.mae-add-to-cart-text {
	order: 2;
	direction: rtl;
}

.mae-add-to-cart svg {
	order: 1;
	width: 16px;
	height: 16px;
	flex: 0 0 auto;
}

.mae-add-to-cart.loading {
	opacity: 0.6;
	pointer-events: none;
}

.mae-add-to-cart:hover {
	background-color: #1F2D52;
}

/* ---------- Arrows ---------- */
.mae-arrow {
	position: absolute;
	top: 50%;
	transform: translateY(-50%);
	width: 42px;
	height: 42px;
	border-radius: 50%;
	background-color: #FFFFFF;
	color: #16213E;
	border: none;
	display: flex;
	align-items: center;
	justify-content: center;
	cursor: pointer;
	box-shadow: 0 6px 20px rgba(20, 30, 60, 0.15);
	z-index: 10;
	transition: background-color 0.2s ease, color 0.2s ease, opacity 0.25s ease;
}

.mae-arrow:hover {
	background-color: #14B8A6;
	color: #FFFFFF;
}

.mae-arrow-prev {
	right: -8px;
}

.mae-arrow-next {
	left: -8px;
}

.mae-carousel-widget[data-arrows-visibility="hover"] .mae-arrow {
	opacity: 0;
	visibility: hidden;
}

.mae-carousel-widget[data-arrows-visibility="hover"] .mae-carousel-viewport:hover .mae-arrow {
	opacity: 1;
	visibility: visible;
}

.mae-arrow.mae-arrow-faded {
	opacity: 0;
	visibility: hidden;
}

.mae-arrow:disabled {
	opacity: 0.35;
	cursor: not-allowed;
}

/* =========================================================
   موبایل
   ========================================================= */
@media (max-width: 767px) {
	.mae-arrow-prev { right: 0; }
	.mae-arrow-next { left: 0; }
}
