/* ===== ویترین محصولات - استایل فرانت‌اند ===== */
.ocs-showcase {
	--ocs-gap: 20px;
	--ocs-radius: 10px;
	--ocs-name-color: #222;
	--ocs-price-color: #e63946;
	box-sizing: border-box;
	max-width: 100%;
	margin: 30px 0;
	direction: rtl;
}
.ocs-showcase * {
	box-sizing: border-box;
}

/* عنوان لینک‌دار با گرادیان */
.ocs-showcase-title {
	display: flex;
	align-items: center;
	justify-content: space-between;
	padding: 14px 22px;
	font-size: 19px;
	font-weight: 700;
	text-decoration: none;
	border-radius: var(--ocs-radius) var(--ocs-radius) 0 0;
	transition: opacity .2s ease;
}
.ocs-showcase-title:hover {
	opacity: .92;
	text-decoration: none;
}
.ocs-showcase-title .ocs-arrow {
	font-style: normal;
	font-size: 18px;
}

.ocs-showcase-body {
	position: relative;
	background: #fafafa;
	padding: var(--ocs-gap);
	border-radius: 0 0 var(--ocs-radius) var(--ocs-radius);
	display: flex;
	align-items: center;
	gap: 10px;
}

.ocs-track-wrap {
	overflow: hidden;
	width: 100%;
}

/* ---- حالت گرید: همیشه کل عرض والد را پر می‌کند صرف‌نظر از تعداد ستون ---- */
.ocs-type-grid .ocs-track {
	display: grid;
	gap: var(--ocs-gap);
	width: 100%;
}
.ocs-grid-1 { grid-template-columns: repeat(1, 1fr); }
.ocs-grid-2 { grid-template-columns: repeat(2, 1fr); }
.ocs-grid-3 { grid-template-columns: repeat(3, 1fr); }
.ocs-grid-4 { grid-template-columns: repeat(4, 1fr); }
.ocs-grid-5 { grid-template-columns: repeat(5, 1fr); }
.ocs-grid-6 { grid-template-columns: repeat(6, 1fr); }
.ocs-grid-7 { grid-template-columns: repeat(7, 1fr); }
.ocs-grid-8 { grid-template-columns: repeat(8, 1fr); }

/* ---- حالت اسلایدر ---- */
.ocs-type-slider .ocs-track {
	display: flex;
	gap: var(--ocs-gap);
	transition: transform .4s ease;
	will-change: transform;
}
.ocs-type-slider .ocs-card {
	flex: 0 0 auto;
}

.ocs-nav {
	flex: 0 0 auto;
	width: 38px;
	height: 38px;
	border-radius: 50%;
	border: none;
	background: #fff;
	box-shadow: 0 2px 8px rgba(0,0,0,.12);
	cursor: pointer;
	font-size: 15px;
	z-index: 2;
	display: flex;
	align-items: center;
	justify-content: center;
}
.ocs-nav:hover {
	background: #f0f0f0;
}

/* ---- کارت محصول ---- */
.ocs-card {
	position: relative;
	border-radius: var(--ocs-radius);
	overflow: hidden;
	padding: 12px;
	text-align: center;
	display: flex;
	flex-direction: column;
	align-items: center;
	transition: box-shadow .2s ease, transform .2s ease;
}
.ocs-card:hover {
	box-shadow: 0 6px 18px rgba(0,0,0,.08);
	transform: translateY(-3px);
}

.ocs-card-image {
	display: block;
	width: 100%;
	position: relative;
}
.ocs-card-image img {
	width: 100%;
	height: auto;
	border-radius: calc(var(--ocs-radius) - 4px);
	display: block;
}

.ocs-badge-sale {
	position: absolute;
	top: 8px;
	inset-inline-start: 8px;
	background: #e63946;
	color: #fff;
	font-size: 11px;
	padding: 3px 8px;
	border-radius: 20px;
	z-index: 1;
}

/* سواچ رنگ محصولات متغیر زیر عکس */
.ocs-swatches {
	display: flex;
	justify-content: center;
	gap: 6px;
	margin-top: 8px;
	flex-wrap: wrap;
}
.ocs-swatch {
	width: 18px;
	height: 18px;
	border-radius: 50%;
	border: 2px solid #fff;
	box-shadow: 0 0 0 1px #ddd;
	cursor: pointer;
	display: inline-block;
}
.ocs-swatch:hover,
.ocs-swatch.is-active {
	box-shadow: 0 0 0 2px #333;
}

.ocs-card-name {
	display: block;
	margin-top: 10px;
	font-size: var(--ocs-name-size, 14px);
	font-weight: var(--ocs-name-weight, 600);
	color: var(--ocs-name-color);
	text-decoration: none;
	line-height: 1.5;
}
.ocs-card-name:hover {
	text-decoration: underline;
	color: var(--ocs-name-color);
}
.ocs-card-price {
	margin-top: 6px;
	font-size: var(--ocs-price-size, 14px);
	color: var(--ocs-price-color);
	font-weight: var(--ocs-price-weight, 700);
}
.ocs-card-price del {
	opacity: .6;
	font-weight: 400;
	margin-inline-end: 4px;
}

/* ---- واکنش‌گرا: در صفحات کوچک‌تر تعداد ستون به‌صورت هوشمند کم می‌شود ---- */
@media (max-width: 992px) {
	.ocs-type-grid .ocs-track[class*="ocs-grid-"] {
		grid-template-columns: repeat(3, 1fr) !important;
	}
	.ocs-type-slider .ocs-card {
		width: calc(33.333% - var(--ocs-gap)) !important;
	}
}
@media (max-width: 600px) {
	.ocs-type-grid .ocs-track[class*="ocs-grid-"] {
		grid-template-columns: repeat(2, 1fr) !important;
	}
	.ocs-type-slider .ocs-card {
		width: calc(50% - var(--ocs-gap)) !important;
	}
	.ocs-showcase-title {
		font-size: 16px;
		padding: 12px 16px;
	}
}

/* ===== صفحه «مشاهده همه محصولات ویترین» ===== */
.ocs-view-all-wrap {
	direction: rtl;
}
.ocs-view-all-head {
	display: flex;
	align-items: center;
	justify-content: space-between;
	flex-wrap: wrap;
	gap: 12px;
	border-bottom: 1px solid #eee;
	padding-bottom: 16px;
}
.ocs-view-all-title {
	margin: 0;
	font-size: 26px;
}
.ocs-sort-form {
	display: flex;
	align-items: center;
	gap: 8px;
	font-size: 14px;
}
.ocs-sort-form select {
	padding: 6px 10px;
	border-radius: 6px;
	border: 1px solid #ccc;
}

.ocs-pagination {
	display: flex;
	justify-content: center;
	align-items: center;
	gap: 6px;
	margin: 30px 0 10px;
	flex-wrap: wrap;
}
.ocs-pagination .ocs-page-link {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-width: 36px;
	height: 36px;
	padding: 0 10px;
	border-radius: 6px;
	border: 1px solid #ddd;
	text-decoration: none;
	color: #333;
	font-size: 14px;
}
.ocs-pagination .ocs-page-link:hover {
	background: #f5f5f5;
}
.ocs-pagination .ocs-page-link.is-current {
	background: #2a4d9b;
	border-color: #2a4d9b;
	color: #fff;
}
