/*!
 * Nedclan Cards – shortcode layouts (grids, tabs, pagination, sliders).
 * Column counts, gaps and products-per-view come from CSS variables set
 * per shortcode; breakpoints are added inline from the admin settings.
 */

.nc-sc {
	--nc-accent: #ff2338;
	--nc-ink: #33363d;
	--nc-muted: #8a8f9c;
	--nc-line: #e3e5e8;
	position: relative;
	width: 100%;
	margin: 0 0 40px;
	color: var(--nc-ink);
	font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

.nc-sc *,
.nc-sc *::before,
.nc-sc *::after {
	box-sizing: border-box;
}

.nc-sc .nc-sc-title {
	margin: 0 0 20px;
	padding: 0;
	color: var(--nc-ink);
	font-family: inherit;
	font-size: clamp(22px, 2.2vw, 28px);
	font-weight: 600;
	line-height: 1.25;
	letter-spacing: -0.01em;
	text-transform: none;
}

/* ---------- Grid ---------- */
.nc-sc .nedclan-cards.nc-sc-grid {
	display: grid !important;
	grid-template-columns: repeat(var(--nc-cols, 4), minmax(0, 1fr)) !important;
	gap: var(--nc-gap, 24px) !important;
}

.nc-sc.is-loading .nc-sc-grid,
.nc-sc.is-loading .nc-slider-viewport {
	opacity: .45;
	pointer-events: none;
	transition: opacity .2s ease;
}

/* ---------- Toolbar ---------- */
.nc-sc .nc-toolbar {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: space-between;
	gap: 12px;
	margin: 0 0 20px;
}

.nc-sc .nc-result-count {
	margin: 0;
	color: var(--nc-muted);
	font-size: 14px;
	line-height: 1.4;
}

.nc-sc .nc-orderby {
	min-width: 220px;
	max-width: 100%;
	height: 40px;
	margin: 0;
	padding: 0 36px 0 12px;
	border: 1px solid var(--nc-line);
	border-radius: 8px;
	background: #fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M6 9l6 6 6-6' fill='none' stroke='%2333363d' stroke-width='2' stroke-linecap='round'/%3E%3C/svg%3E") no-repeat right 10px center / 16px;
	-webkit-appearance: none;
	appearance: none;
	color: var(--nc-ink);
	font-family: inherit;
	font-size: 14px;
	line-height: 1;
	box-shadow: none;
	cursor: pointer;
}

/* ---------- Category tabs ---------- */
.nc-sc .nc-tabs {
	display: flex;
	gap: 8px;
	margin: 0 0 24px;
	padding: 0 0 4px;
	overflow-x: auto;
	scrollbar-width: none;
	-webkit-overflow-scrolling: touch;
}

.nc-sc .nc-tabs::-webkit-scrollbar {
	display: none;
}

.nc-sc .nc-tabs .nc-tab {
	-webkit-appearance: none;
	appearance: none;
	flex: 0 0 auto;
	min-height: 0;
	margin: 0;
	padding: 9px 18px;
	border: 1px solid var(--nc-line);
	border-radius: 999px;
	background: #fff;
	color: var(--nc-ink);
	font-family: inherit;
	font-size: 14px;
	font-weight: 500;
	line-height: 1.2;
	letter-spacing: normal;
	text-transform: none;
	box-shadow: none;
	cursor: pointer;
	transition: background-color .2s ease, color .2s ease, border-color .2s ease;
}

.nc-sc .nc-tabs .nc-tab:hover {
	border-color: var(--nc-ink);
	background: #fff;
	color: var(--nc-ink);
}

.nc-sc .nc-tabs .nc-tab.is-active {
	border-color: var(--nc-ink);
	background: var(--nc-ink);
	color: #fff;
}

/* ---------- Pagination ---------- */
.nc-sc .nc-pagination {
	margin: 32px 0 0;
}

.nc-sc .nc-pagination ul {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: center;
	gap: 6px;
	margin: 0;
	padding: 0;
	list-style: none;
}

.nc-sc .nc-pagination li {
	margin: 0;
	padding: 0;
}

.nc-sc .nc-pagination .nc-page {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-width: 40px;
	height: 40px;
	padding: 0 12px;
	border: 1px solid var(--nc-line);
	border-radius: 8px;
	background: #fff;
	color: var(--nc-ink);
	font-size: 14px;
	font-weight: 500;
	line-height: 1;
	text-decoration: none;
	box-shadow: none;
	transition: border-color .2s ease, background-color .2s ease, color .2s ease;
}

.nc-sc .nc-pagination a.nc-page:hover {
	border-color: var(--nc-ink);
	color: var(--nc-ink);
}

.nc-sc .nc-pagination .nc-page.is-current {
	border-color: var(--nc-accent);
	background: var(--nc-accent);
	color: #fff;
}

.nc-sc .nc-pagination .nc-page-dots {
	border-color: transparent;
	background: transparent;
	min-width: 24px;
	padding: 0;
}

.nc-sc .nc-load-more-wrap {
	display: flex;
	justify-content: center;
	margin: 32px 0 0;
}

.nc-sc .nc-load-more {
	-webkit-appearance: none;
	appearance: none;
	min-width: 180px;
	min-height: 44px;
	margin: 0;
	padding: 10px 24px;
	border: 1px solid var(--nc-ink);
	border-radius: 8px;
	background: #fff;
	color: var(--nc-ink);
	font-family: inherit;
	font-size: 15px;
	font-weight: 500;
	line-height: 1.2;
	text-transform: none;
	letter-spacing: normal;
	box-shadow: none;
	cursor: pointer;
	transition: background-color .2s ease, color .2s ease;
}

.nc-sc .nc-load-more:hover,
.nc-sc .nc-load-more:focus-visible {
	background: var(--nc-ink);
	color: #fff;
}

.nc-sc[data-pagination="infinite"] .nc-load-more {
	border-color: transparent;
	background: transparent;
	color: var(--nc-muted);
}

.nc-sc .nc-sc-empty {
	margin: 0;
	padding: 32px 16px;
	border: 1px dashed var(--nc-line);
	border-radius: 8px;
	color: var(--nc-muted);
	text-align: center;
}

/* ---------- Slider ---------- */
.nc-sc .nc-slider {
	position: relative;
}

.nc-sc .nc-slider-viewport {
	overflow: hidden;
	touch-action: pan-y;
	/* Room for card shadows and hover lift without clipping. */
	margin: -6px 0;
	padding: 6px 0;
}

.nc-sc .nedclan-cards.nc-slider-track {
	display: flex !important;
	grid-template-columns: none !important;
	gap: var(--nc-sgap, 24px) !important;
	align-items: stretch;
	will-change: transform;
	backface-visibility: hidden;
}

.nc-sc .nc-slide {
	display: flex;
	flex: 0 0 calc((100% - (var(--nc-spv, 4) - 1) * var(--nc-sgap, 24px)) / var(--nc-spv, 4));
	min-width: 0;
}

.nc-sc .nc-slide > * {
	flex: 1 1 auto;
}

.nc-sc .nc-slider.is-dragging,
.nc-sc .nc-slider.is-dragging * {
	cursor: grabbing !important;
	user-select: none;
}

.nc-sc .nc-slider img {
	-webkit-user-drag: none;
}

.nc-sc .nc-slider-arrow {
	-webkit-appearance: none;
	appearance: none;
	position: absolute;
	top: 50%;
	z-index: 5;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 44px;
	height: 44px;
	min-height: 0;
	margin: -22px 0 0;
	padding: 0;
	border: 1px solid var(--nc-line);
	border-radius: 50%;
	background: var(--nc-arrow-bg, #fff);
	color: var(--nc-arrow-color, #33363d);
	box-shadow: 0 4px 14px rgba(0, 0, 0, .12);
	cursor: pointer;
	transition: opacity .2s ease, transform .2s ease;
}

.nc-sc .nc-slider-arrow:hover,
.nc-sc .nc-slider-arrow:focus-visible {
	background: var(--nc-arrow-bg, #fff);
	color: var(--nc-arrow-color, #33363d);
	transform: scale(1.06);
}

.nc-sc .nc-slider-arrow svg {
	width: 20px;
	height: 20px;
}

.nc-sc .nc-slider-prev { left: -12px; }
.nc-sc .nc-slider-next { right: -12px; }

.nc-sc .nc-slider-arrow[disabled] {
	opacity: 0;
	pointer-events: none;
}

.nc-sc .nc-slider.is-static .nc-slider-arrow,
.nc-sc .nc-slider.is-static .nc-slider-dots {
	display: none;
}

.nc-sc .nc-slider-dots {
	display: flex;
	flex-wrap: wrap;
	justify-content: center;
	gap: 8px;
	margin-top: 20px;
}

.nc-sc .nc-slider-dots:empty {
	display: none;
}

.nc-sc .nc-slider-dot {
	-webkit-appearance: none;
	appearance: none;
	width: 8px;
	height: 8px;
	min-height: 0;
	margin: 0;
	padding: 0;
	border: 0;
	border-radius: 999px;
	background: var(--nc-dot, #d1d5db);
	box-shadow: none;
	cursor: pointer;
	transition: width .3s ease, background-color .3s ease;
}

.nc-sc .nc-slider-dot:hover {
	background: var(--nc-dot-active, #ff2338);
}

.nc-sc .nc-slider-dot.is-active {
	width: 24px;
	background: var(--nc-dot-active, #ff2338);
}

/* ---------- Loading placeholders ---------- */
.nc-sc .nc-skeleton {
	display: flex;
	flex-direction: column;
	gap: 10px;
	width: 100%;
	padding: 12px;
	border: 1px solid var(--nc-line);
	border-radius: 6px;
	background: #fff;
}

.nc-sc .nc-skeleton span {
	display: block;
	height: 14px;
	border-radius: 4px;
	background: linear-gradient(90deg, #f0f1f4 25%, #e6e8ec 50%, #f0f1f4 75%);
	background-size: 200% 100%;
	animation: nc-shimmer 1.4s linear infinite;
}

.nc-sc .nc-skeleton .nc-skeleton-img {
	height: auto;
	aspect-ratio: 1 / 1;
}

.nc-sc .nc-skeleton .nc-skeleton-short {
	width: 55%;
}

@keyframes nc-shimmer {
	to { background-position: -200% 0; }
}

/* ---------- Entrance animations ---------- */
.nc-sc[class*="nc-entrance-"] .nedclan-cards > * {
	transition: opacity .6s ease, transform .6s cubic-bezier(.22, .61, .36, 1), box-shadow .25s ease, border-color .25s ease, background-color .25s ease;
}

.nc-sc[class*="nc-entrance-"] .nedclan-cards > .nc-entering {
	transition-delay: calc(var(--nc-i, 0) * 70ms);
}

.nc-sc.nc-entrance-fade-up .nedclan-cards > .nc-wait {
	opacity: 0;
	transform: translateY(18px);
}

.nc-sc.nc-entrance-fade .nedclan-cards > .nc-wait {
	opacity: 0;
}

.nc-sc.nc-entrance-zoom .nedclan-cards > .nc-wait {
	opacity: 0;
	transform: scale(.94);
}

@media (prefers-reduced-motion: reduce) {
	.nc-sc .nedclan-cards > *,
	.nc-sc .nc-slider-track {
		transition: none !important;
	}
	.nc-sc .nedclan-cards > .nc-wait {
		opacity: 1 !important;
		transform: none !important;
	}
	.nc-sc .nc-skeleton span {
		animation: none;
	}
}

@media (max-width: 600px) {
	.nc-sc .nc-toolbar {
		flex-direction: column;
		align-items: stretch;
	}
	.nc-sc .nc-orderby {
		width: 100%;
	}
	.nc-sc .nc-slider-prev { left: 4px; }
	.nc-sc .nc-slider-next { right: 4px; }
}

/* Product count shortcodes ([nedclan_products_count] …) */
.nc-count { display: inline; font: inherit; color: inherit; }
.nc-count-number { font-variant-numeric: tabular-nums; }
a.nc-count-link { color: inherit; text-decoration: none; }
a.nc-count-link:hover { text-decoration: underline; }
