/* NEYL shop catalog — ecommerce-04 inspired, RTL, mobile sheet */

.neyl-shop-catalog {
	--neyl-shop-border: #e6e2dc;
	--neyl-shop-muted: #6b6560;
	--neyl-shop-fg: #1a1816;
	--neyl-shop-bg: #faf8f5;
	--neyl-shop-surface: #ffffff;
	--neyl-shop-ease: cubic-bezier(0.22, 1, 0.36, 1);
	color: var(--neyl-shop-fg);
	background:
		radial-gradient(120% 80% at 100% 0%, rgba(74, 93, 115, 0.08), transparent 55%),
		radial-gradient(90% 60% at 0% 20%, rgba(196, 164, 132, 0.12), transparent 50%),
		var(--neyl-shop-bg);
	padding: 2.5rem 0 4rem;
	font-family: Vazirmatn, system-ui, sans-serif;
}

/* Hide WP/WooCommerce shop title only — keep in-widget design header */
body.woocommerce .woocommerce-products-header,
body.woocommerce-page .woocommerce-products-header,
body.woocommerce h1.woocommerce-products-header__title,
body.woocommerce h1.page-title,
.neyl-shop-wc-loop-hide {
	display: none !important;
}

.neyl-shop-catalog__header {
	max-width: 72rem;
	margin: 0 auto 2.5rem;
	padding: 0 1.25rem;
}

.neyl-shop-catalog__eyebrow {
	display: block;
	font-size: 0.75rem;
	letter-spacing: 0.08em;
	text-transform: uppercase;
	color: var(--neyl-shop-muted);
	margin-bottom: 0.75rem;
}

.neyl-shop-catalog__title {
	margin: 0 0 0.75rem;
	font-size: clamp(1.75rem, 4vw, 2.35rem);
	font-weight: 700;
	letter-spacing: -0.02em;
	line-height: 1.2;
}

.neyl-shop-catalog__lead {
	margin: 0;
	max-width: 36rem;
	color: var(--neyl-shop-muted);
	font-size: 0.98rem;
	line-height: 1.7;
}

.neyl-shop-catalog__layout {
	max-width: 72rem;
	margin: 0 auto;
	padding: 0 1.25rem;
	display: grid;
	gap: 2rem;
}

@media (min-width: 1024px) {
	.neyl-shop-catalog__layout {
		grid-template-columns: 15rem minmax(0, 1fr);
		gap: 2.75rem;
		align-items: start;
	}
}

.neyl-shop-catalog__aside {
	display: none;
}

@media (min-width: 1024px) {
	.neyl-shop-catalog__aside {
		display: block;
		position: sticky;
		top: 1.5rem;
	}
}

.neyl-shop-filters__head {
	display: flex;
	align-items: center;
	justify-content: space-between;
	padding-bottom: 0.75rem;
	border-bottom: 1px solid var(--neyl-shop-border);
	margin-bottom: 1.25rem;
}

.neyl-shop-filters__title {
	font-size: 0.95rem;
	font-weight: 600;
}

.neyl-shop-filters__clear {
	border: 0;
	background: transparent;
	color: var(--neyl-shop-muted);
	font: inherit;
	font-size: 0.8rem;
	cursor: pointer;
	padding: 0.25rem 0.4rem;
}

.neyl-shop-filters__clear:disabled {
	opacity: 0.4;
	cursor: default;
}

.neyl-shop-filters__set {
	border: 0;
	margin: 0;
	padding: 0 0 1.35rem;
	border-bottom: 1px solid var(--neyl-shop-border);
	margin-bottom: 1.35rem;
}

.neyl-shop-filters__set legend {
	padding: 0;
	margin-bottom: 0.85rem;
	font-size: 0.72rem;
	font-weight: 500;
	letter-spacing: 0.06em;
	text-transform: uppercase;
	color: var(--neyl-shop-muted);
}

.neyl-shop-filters__hint {
	margin: -0.35rem 0 0.75rem;
	font-size: 0.75rem;
	line-height: 1.5;
	color: var(--neyl-shop-muted);
}

.neyl-shop-filters__row {
	display: flex;
	align-items: center;
	gap: 0.55rem;
	margin-bottom: 0.55rem;
	font-size: 0.9rem;
	cursor: pointer;
}

.neyl-shop-filters__row input {
	accent-color: #1a1816;
}

.neyl-shop-filters__count {
	margin-inline-start: auto;
	font-size: 0.75rem;
	font-variant-numeric: tabular-nums;
	color: var(--neyl-shop-muted);
}

.neyl-shop-filters__row--switch {
	justify-content: space-between;
	padding: 0.35rem 0 1.1rem;
	border-bottom: 1px solid var(--neyl-shop-border);
	margin-bottom: 1.1rem;
}

.neyl-shop-filters__swatches {
	display: flex;
	flex-wrap: wrap;
	gap: 0.5rem;
}

.neyl-shop-filters__swatch {
	width: 1.75rem;
	height: 1.75rem;
	min-width: 0;
	padding: 0;
	border-radius: 999px;
	border: 1px solid rgba(26, 24, 22, 0.22);
	background: var(--swatch, #ccc);
	cursor: pointer;
	box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.35);
	transition: box-shadow 0.15s ease, transform 0.15s ease;
}

.neyl-shop-filters__swatch[aria-pressed="true"] {
	box-shadow: 0 0 0 2px #fff, 0 0 0 4px #1a1816;
}

.neyl-shop-filters__swatch.is-fabric {
	width: auto;
	min-width: 2.4rem;
	padding: 0 0.45rem;
	border-radius: 999px;
	display: inline-grid;
	place-items: center;
	background: linear-gradient(145deg, #3d5168, #5a718a);
}

.neyl-shop-filters__swatch-text {
	font-size: 0.7rem;
	font-weight: 700;
	color: #fff;
	letter-spacing: 0.02em;
}

.neyl-shop-catalog__toolbar {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: space-between;
	gap: 0.75rem;
	padding-bottom: 1rem;
	border-bottom: 1px solid var(--neyl-shop-border);
	margin-bottom: 1rem;
}

.neyl-shop-catalog__mobile-filters {
	display: inline-flex;
	align-items: center;
	gap: 0.4rem;
	border: 1px solid var(--neyl-shop-border);
	background: var(--neyl-shop-surface);
	border-radius: 0.5rem;
	padding: 0.45rem 0.75rem;
	font: inherit;
	font-size: 0.85rem;
	cursor: pointer;
}

@media (min-width: 1024px) {
	.neyl-shop-catalog__mobile-filters {
		display: none;
	}
}

.neyl-shop-catalog__active-n:not([hidden]) {
	font-variant-numeric: tabular-nums;
}

.neyl-shop-catalog__count {
	margin: 0;
	font-size: 0.875rem;
	color: var(--neyl-shop-muted);
	font-variant-numeric: tabular-nums;
}

.neyl-shop-catalog__sort select {
	font: inherit;
	font-size: 0.85rem;
	border: 1px solid var(--neyl-shop-border);
	border-radius: 0.5rem;
	background: var(--neyl-shop-surface);
	padding: 0.45rem 0.7rem;
	min-width: 9.5rem;
}

.neyl-shop-catalog__chips {
	list-style: none;
	margin: 0 0 1.25rem;
	padding: 0;
	display: flex;
	flex-wrap: wrap;
	gap: 0.45rem;
}

.neyl-shop-catalog__chips li {
	display: inline-flex;
}

.neyl-shop-catalog__chip {
	display: inline-flex;
	align-items: center;
	gap: 0.25rem;
	border: 1px solid var(--neyl-shop-border);
	background: var(--neyl-shop-surface);
	border-radius: 999px;
	padding: 0.25rem 0.35rem 0.25rem 0.7rem;
	font-size: 0.8rem;
}

.neyl-shop-catalog__chip button {
	width: 1.35rem;
	height: 1.35rem;
	border: 0;
	border-radius: 999px;
	background: transparent;
	cursor: pointer;
	color: var(--neyl-shop-muted);
	line-height: 1;
}

.neyl-shop-catalog__empty {
	text-align: center;
	padding: 3rem 1.25rem;
	border: 1px dashed var(--neyl-shop-border);
	border-radius: 0.75rem;
	background: var(--neyl-shop-surface);
}

.neyl-shop-catalog__empty[hidden] {
	display: none !important;
}

.neyl-shop-catalog__empty strong {
	display: block;
	margin-bottom: 0.4rem;
	font-size: 1.05rem;
}

.neyl-shop-catalog__empty p {
	margin: 0 0 1rem;
	color: var(--neyl-shop-muted);
	font-size: 0.9rem;
}

.neyl-shop-catalog__empty button {
	border: 1px solid var(--neyl-shop-border);
	background: transparent;
	border-radius: 0.5rem;
	padding: 0.5rem 1rem;
	font: inherit;
	cursor: pointer;
}

.neyl-shop-grid {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(min(100%, 16.5rem), 1fr));
	gap: 1.5rem;
	align-items: stretch;
	margin-top: 0.5rem;
}

.neyl-shop-card {
	min-width: 0;
	height: 100%;
}

.neyl-shop-card .neyl-pcard {
	width: 100% !important;
	max-width: 100% !important;
	height: 100%;
	margin: 0;
}

.neyl-shop-card.is-filtered-out,
.neyl-shop-card[hidden] {
	display: none !important;
}

@media (max-width: 767px) {
	.neyl-shop-grid {
		grid-template-columns: 1fr;
	}
}

/* Mobile bottom sheet */
.neyl-shop-sheet {
	border: 0;
	padding: 0;
	margin: 0;
	max-width: none;
	width: 100%;
	height: 100%;
	background: transparent;
}

.neyl-shop-sheet::backdrop {
	background: rgba(20, 18, 16, 0.45);
}

.neyl-shop-sheet__panel {
	position: fixed;
	inset-inline: 0;
	bottom: 0;
	max-height: 85svh;
	display: flex;
	flex-direction: column;
	background: var(--neyl-shop-surface);
	border-radius: 1rem 1rem 0 0;
	box-shadow: 0 -12px 40px rgba(0, 0, 0, 0.18);
	animation: neyl-shop-sheet-in 0.35s var(--neyl-shop-ease) both;
}

@keyframes neyl-shop-sheet-in {
	from {
		transform: translateY(12%);
		opacity: 0.6;
	}
	to {
		transform: translateY(0);
		opacity: 1;
	}
}

@media (prefers-reduced-motion: reduce) {
	.neyl-shop-sheet__panel {
		animation: none;
	}
}

.neyl-shop-sheet__head {
	display: flex;
	justify-content: space-between;
	gap: 1rem;
	padding: 1rem 1.15rem;
	border-bottom: 1px solid var(--neyl-shop-border);
}

.neyl-shop-sheet__head strong {
	display: block;
	font-size: 1rem;
}

.neyl-shop-sheet__head p {
	margin: 0.2rem 0 0;
	font-size: 0.8rem;
	color: var(--neyl-shop-muted);
}

.neyl-shop-sheet__close {
	border: 0;
	background: transparent;
	font-size: 1.5rem;
	line-height: 1;
	cursor: pointer;
	color: var(--neyl-shop-muted);
}

.neyl-shop-sheet__body {
	overflow: auto;
	padding: 1rem 1.15rem;
	flex: 1;
	min-height: 0;
}

.neyl-shop-sheet__foot {
	display: flex;
	gap: 0.6rem;
	padding: 0.85rem 1.15rem calc(0.85rem + env(safe-area-inset-bottom, 0px));
	border-top: 1px solid var(--neyl-shop-border);
}

.neyl-shop-sheet__foot button {
	flex: 1;
	border: 1px solid var(--neyl-shop-border);
	background: var(--neyl-shop-surface);
	border-radius: 0.55rem;
	padding: 0.7rem 0.5rem;
	font: inherit;
	font-size: 0.9rem;
	cursor: pointer;
}

.neyl-shop-sheet__foot button.is-primary {
	background: #1a1816;
	border-color: #1a1816;
	color: #fff;
}

.sr-only {
	position: absolute;
	width: 1px;
	height: 1px;
	padding: 0;
	margin: -1px;
	overflow: hidden;
	clip: rect(0, 0, 0, 0);
	white-space: nowrap;
	border: 0;
}

/* Fabric لی badge on cards in shop */
.neyl-pcard__fabric-pill {
	display: inline-flex;
	align-items: center;
	gap: 0.3rem;
	margin-top: 0.15rem;
	padding: 0.15rem 0.55rem;
	border-radius: 999px;
	font-size: 0.72rem;
	font-weight: 600;
	background: #eef2f6;
	color: #3d5168;
	border: 1px solid #d5dde6;
	width: fit-content;
}

/* Simple single-colour shop cards — no colour picker */
.neyl-shop-card .neyl-pcard__fieldset:has([data-pcard-swatches]),
.neyl-shop-card .neyl-pcard__swatches {
	display: none !important;
}

.neyl-pcard__simple-color {
	display: inline-flex;
	align-items: center;
	gap: 0.45rem;
	margin: 0.15rem 0 0;
	font-size: 0.82rem;
	color: var(--neyl-shop-muted, #6b6560);
}

.neyl-pcard__simple-swatch {
	width: 0.85rem;
	height: 0.85rem;
	border-radius: 999px;
	border: 1px solid rgba(26, 24, 22, 0.18);
	background: var(--swatch, #ccc);
	flex-shrink: 0;
}
