/**
 * Zima shop & product archive: hero header, category pills, sticky filter sidebar,
 * capsule sort bar, active filter chips, product grid/list view and pagination.
 */

.zm-shop {
	--zs-p: var(--zm-color-primary, #732bed);
	--zs-a: var(--zm-color-accent, #c01dfb);
	--zs-d: var(--zm-color-heading, #1c1c25);
	--zs-t: var(--zm-color-text, #394454);
	--zs-m: var(--zm-color-muted, #707486);
	--zs-s: var(--zm-color-subtle, #a4a8ba);
	--zs-b: var(--zm-color-border, #eceef3);
	--zs-soft: color-mix(in srgb, var(--zs-p) 7%, #ffffff);
	--zs-surface: var(--zm-color-surface-alt, #f5f9fc);
	--zs-ease: cubic-bezier(0.22, 1, 0.36, 1);
	padding: 20px 0 72px;
}

/* ---------- Hero Header ---------- */

.zm-shop-hero {
	position: relative;
	margin-bottom: 32px;
	padding: 26px 34px 30px;
	overflow: hidden;
	background: linear-gradient(135deg, var(--zs-surface), color-mix(in srgb, var(--zs-p) 5%, #ffffff));
	border: 1px solid var(--zs-b);
	border-radius: 36px;
	isolation: isolate;
}

.zm-shop-hero__glow {
	position: absolute;
	top: -80px;
	inset-inline-end: -60px;
	z-index: -1;
	width: 280px;
	height: 280px;
	background: radial-gradient(circle, color-mix(in srgb, var(--zs-p) 12%, transparent), transparent 70%);
	pointer-events: none;
}

.zm-shop-hero__spark {
	position: absolute;
	top: 32px;
	inset-inline-end: 42px;
	z-index: -1;
	width: 28px;
	height: 28px;
	color: color-mix(in srgb, var(--zs-p) 35%, #ffffff);
	pointer-events: none;
}

.zm-shop-hero__top {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: space-between;
	gap: 12px;
	margin-bottom: 14px;
}

.zm-shop-hero .woocommerce-breadcrumb.zm-crumbs {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 6px 10px;
	margin: 0;
	padding: 0;
	font-size: 13px;
	font-weight: 500;
	color: var(--zs-d);
}

.zm-shop-hero .woocommerce-breadcrumb.zm-crumbs a {
	color: var(--zs-m);
	text-decoration: none;
	transition: color 0.2s;
}

.zm-shop-hero .woocommerce-breadcrumb.zm-crumbs a:hover {
	color: var(--zs-p);
}

.zm-shop-hero .woocommerce-breadcrumb.zm-crumbs .zm-crumbs__sep {
	font-size: 15px;
	line-height: 1;
	color: var(--zs-s);
}

.zm-shop-hero__count {
	padding: 4px 14px;
	font-size: 12.5px;
	font-weight: 700;
	color: var(--zs-p);
	background: #ffffff;
	border: 1px solid color-mix(in srgb, var(--zs-p) 18%, transparent);
	border-radius: 999px;
}

.zm-shop-hero__main {
	max-width: 780px;
}

.zm-shop-hero__title {
	position: relative;
	display: inline-block;
	margin: 0;
	padding-inline-start: 26px;
	font-size: clamp(22px, 2vw, 30px);
	font-weight: 800;
	line-height: 1.5;
	color: var(--zs-d);
}

.zm-shop-hero__dashes {
	position: absolute;
	top: 2px;
	inset-inline-start: 0;
	width: 19px;
	height: 17px;
	color: var(--zs-d);
}

.zm-shop-hero__desc {
	margin: 10px 0 0;
	font-size: 13.5px;
	line-height: 1.95;
	color: var(--zs-m);
}

/* ---------- Subcategories Row ---------- */

.zm-shop-cats {
	margin-top: 22px;
	padding-top: 20px;
	border-top: 1px dashed color-mix(in srgb, var(--zs-d) 12%, transparent);
}

.zm-shop-cats__list {
	display: flex;
	gap: 12px;
	margin: 0;
	padding: 4px 2px;
	overflow-x: auto;
	overscroll-behavior-x: contain;
	list-style: none;
	scrollbar-width: none;
}

.zm-shop-cats__list::-webkit-scrollbar {
	display: none;
}

.zm-shop-cats__card {
	display: flex;
	align-items: center;
	gap: 12px;
	padding: 8px 18px 8px 12px;
	color: var(--zs-d);
	text-decoration: none;
	white-space: nowrap;
	background: #ffffff;
	border: 1px solid var(--zs-b);
	border-radius: 22px;
	transition: transform 0.25s var(--zs-ease), box-shadow 0.25s var(--zs-ease), border-color 0.25s;
}

.zm-shop-cats__card:hover {
	color: var(--zs-p);
	border-color: color-mix(in srgb, var(--zs-p) 30%, transparent);
	box-shadow: 0 10px 24px rgba(28, 28, 37, 0.06);
	transform: translateY(-2px);
}

.zm-shop-cats__media {
	display: flex;
	flex: 0 0 42px;
	align-items: center;
	justify-content: center;
	width: 42px;
	height: 42px;
	overflow: hidden;
	background: var(--zs-soft);
	border-radius: 14px;
}

.zm-shop-cats__img {
	width: 100%;
	height: 100%;
	object-fit: contain;
}

.zm-shop-cats__text {
	display: flex;
	flex-direction: column;
	gap: 2px;
}

.zm-shop-cats__name {
	font-size: 13.5px;
	font-weight: 700;
	line-height: 1.4;
}

.zm-shop-cats__count {
	font-size: 11.5px;
	color: var(--zs-s);
}

/* ---------- Layout: Sidebar + Main ---------- */

.zm-shop__layout {
	display: grid;
	grid-template-columns: minmax(0, 1fr);
	gap: 28px;
	align-items: start;
}

.zm-shop--has-side .zm-shop__layout {
	grid-template-columns: 290px minmax(0, 1fr);
}

.zm-shop__main {
	min-width: 0;
}

.zm-shop__results {
	position: relative;
	transition: opacity 0.25s ease;
}

.zm-shop.is-loading .zm-shop__results {
	opacity: 0.45;
	pointer-events: none;
}

/* ---------- Toolbar (Sort & View) ---------- */

.zm-shop-bar {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: space-between;
	gap: 12px 16px;
	margin-bottom: 18px;
	padding: 12px 18px;
	background: #ffffff;
	border: 1px solid var(--zs-b);
	border-radius: 24px;
	box-shadow: 0 8px 24px rgba(28, 28, 37, 0.03);
}

.zm-shop-bar__filter-btn {
	display: none;
	align-items: center;
	gap: 8px;
	height: 42px;
	padding: 0 16px;
	font: inherit;
	font-size: 13.5px;
	font-weight: 700;
	color: var(--zs-d);
	background: var(--zs-soft);
	border: 0;
	border-radius: 999px;
	cursor: pointer;
}

.zm-shop-bar__badge {
	display: inline-grid;
	place-items: center;
	min-width: 20px;
	height: 20px;
	padding: 0 6px;
	font-size: 11px;
	color: #ffffff;
	background: var(--zs-p);
	border-radius: 999px;
}

.zm-shop-bar__sort {
	display: flex;
	flex: 1;
	flex-wrap: wrap;
	align-items: center;
	gap: 8px 12px;
	min-width: 0;
}

.zm-shop-bar__sort-label {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	font-size: 13.5px;
	font-weight: 700;
	color: var(--zs-d);
}

.zm-shop-bar__sort-label svg {
	color: var(--zs-p);
}

.zm-shop-bar__pills {
	display: flex;
	flex-wrap: wrap;
	gap: 6px;
}

.zm-shop-bar__pill {
	height: 36px;
	padding: 0 14px;
	font: inherit;
	font-size: 13px;
	font-weight: 500;
	color: var(--zs-m);
	background: transparent;
	border: 0;
	border-radius: 999px;
	cursor: pointer;
	transition: background 0.2s, color 0.2s;
}

.zm-shop-bar__pill:hover {
	color: var(--zs-d);
	background: var(--zs-surface);
}

.zm-shop-bar__pill.is-active {
	font-weight: 700;
	color: #ffffff;
	background: var(--zs-p);
	box-shadow: 0 6px 16px color-mix(in srgb, var(--zs-p) 28%, transparent);
}

.zm-shop-bar__select-wrap {
	display: none;
}

.zm-shop-bar__select {
	height: 42px;
	padding: 0 14px 0 32px;
	font: inherit;
	font-size: 13px;
	font-weight: 600;
	color: var(--zs-d);
	background: var(--zs-surface);
	border: 1px solid var(--zs-b);
	border-radius: 999px;
}

.zm-shop-bar__views {
	display: flex;
	align-items: center;
	gap: 4px;
	padding: 4px;
	background: var(--zs-surface);
	border-radius: 999px;
}

.zm-shop-bar__view {
	display: grid;
	place-items: center;
	width: 34px;
	height: 34px;
	padding: 0;
	color: var(--zs-m);
	background: transparent;
	border: 0;
	border-radius: 50%;
	cursor: pointer;
	transition: background 0.2s, color 0.2s;
}

.zm-shop-bar__view.is-active {
	color: var(--zs-p);
	background: #ffffff;
	box-shadow: 0 2px 8px rgba(28, 28, 37, 0.08);
}

/* ---------- Active Filter Chips ---------- */

.zm-shop-chips {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 8px;
	margin-bottom: 18px;
}

.zm-shop-chip {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	height: 32px;
	padding: 0 12px;
	font: inherit;
	font-size: 12.5px;
	font-weight: 600;
	color: var(--zs-p);
	background: var(--zs-soft);
	border: 1px solid color-mix(in srgb, var(--zs-p) 20%, transparent);
	border-radius: 999px;
	cursor: pointer;
	transition: background 0.2s, color 0.2s;
}

.zm-shop-chip:hover {
	color: #ffffff;
	background: var(--zs-p);
}

.zm-shop-chip i {
	font-size: 15px;
	font-style: normal;
	line-height: 1;
}

.zm-shop-chips__clear {
	padding: 4px 10px;
	font-size: 12.5px;
	font-weight: 700;
	color: var(--zm-color-sale, #e80c4a);
	text-decoration: none;
}

.zm-shop-chips__clear:hover {
	text-decoration: underline;
}

/* ---------- Sidebar Filters ---------- */

.zm-shop-side {
	position: sticky;
	top: 96px;
}

.zm-shop-side__veil,
.zm-shop-side__close,
.zm-shop-side__foot {
	display: none;
}

.zm-shop-side__head {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 8px;
	margin-bottom: 14px;
	padding: 0 4px;
}

.zm-shop-side__title {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	font-size: 15px;
	font-weight: 800;
	color: var(--zs-d);
}

.zm-shop-side__title svg {
	color: var(--zs-p);
}

.zm-shop-side__reset {
	font-size: 12px;
	font-weight: 700;
	color: var(--zm-color-sale, #e80c4a);
	text-decoration: none;
}

.zm-shop-filters {
	display: flex;
	flex-direction: column;
	gap: 14px;
}

.zm-fbox {
	padding: 16px 18px;
	background: #ffffff;
	border: 1px solid var(--zs-b);
	border-radius: 24px;
	box-shadow: 0 8px 24px rgba(28, 28, 37, 0.03);
}

/* Search inside sidebar */
.zm-fbox__search {
	position: relative;
	display: flex;
	align-items: center;
}

.zm-fbox__search input {
	width: 100%;
	height: 44px;
	padding: 0 14px 0 42px;
	font: inherit;
	font-size: 13px;
	color: var(--zs-d);
	background: var(--zs-surface);
	border: 1px solid transparent;
	border-radius: 999px;
	outline: none;
	transition: border-color 0.2s, background 0.2s;
}

.zm-fbox__search input:focus {
	background: #ffffff;
	border-color: var(--zs-p);
}

.zm-fbox__search button {
	position: absolute;
	inset-inline-end: 6px;
	display: grid;
	place-items: center;
	width: 34px;
	height: 34px;
	padding: 0;
	color: var(--zs-p);
	background: transparent;
	border: 0;
	border-radius: 50%;
	cursor: pointer;
}

/* Switches */
.zm-fbox--switches {
	display: flex;
	flex-direction: column;
	gap: 12px;
}

.zm-fswitch {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 10px;
	font-size: 13.5px;
	font-weight: 600;
	color: var(--zs-d);
	cursor: pointer;
}

.zm-fswitch input {
	position: absolute;
	width: 1px;
	height: 1px;
	opacity: 0;
}

.zm-fswitch i {
	position: relative;
	flex: 0 0 42px;
	width: 42px;
	height: 24px;
	background: #dfe1ea;
	border-radius: 999px;
	transition: background 0.2s;
}

.zm-fswitch i::after {
	content: "";
	position: absolute;
	top: 3px;
	inset-inline-start: 3px;
	width: 18px;
	height: 18px;
	background: #ffffff;
	border-radius: 50%;
	box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
	transition: inset-inline-start 0.2s;
}

.zm-fswitch input:checked + i {
	background: var(--zs-p);
}

.zm-fswitch input:checked + i::after {
	inset-inline-start: 21px;
}

/* Collapsible sections */
.zm-fbox__head {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 8px;
	font-size: 14px;
	font-weight: 700;
	color: var(--zs-d);
	list-style: none;
	cursor: pointer;
}

.zm-fbox__head::-webkit-details-marker {
	display: none;
}

.zm-fbox__head::after {
	content: "";
	width: 7px;
	height: 7px;
	border-bottom: 1.8px solid var(--zs-m);
	border-left: 1.8px solid var(--zs-m);
	transform: rotate(-45deg);
	transition: transform 0.25s;
}

details.zm-fbox[open] > .zm-fbox__head::after {
	transform: rotate(135deg);
}

.zm-fbox__badge {
	margin-inline-end: auto;
	padding: 1px 8px;
	font-size: 11px;
	color: var(--zs-p);
	background: var(--zs-soft);
	border-radius: 999px;
}

.zm-fbox__body {
	margin-top: 14px;
	padding-top: 14px;
	border-top: 1px dashed var(--zs-b);
}

/* Checkboxes list */
.zm-flist {
	display: flex;
	flex-direction: column;
	gap: 8px;
	max-height: 220px;
	margin: 0;
	padding: 0 0 0 4px;
	overflow-y: auto;
	list-style: none;
	scrollbar-width: thin;
}

.zm-fcheck {
	display: flex;
	align-items: center;
	gap: 10px;
	font-size: 13px;
	color: var(--zs-t);
	cursor: pointer;
}

.zm-fcheck input {
	position: absolute;
	width: 1px;
	height: 1px;
	opacity: 0;
}

.zm-fcheck__box {
	position: relative;
	flex: 0 0 18px;
	width: 18px;
	height: 18px;
	background: var(--zs-surface);
	border: 1.5px solid #cfd2de;
	border-radius: 6px;
	transition: background 0.15s, border-color 0.15s;
}

.zm-fcheck input:checked + .zm-fcheck__box {
	background: var(--zs-p);
	border-color: var(--zs-p);
}

.zm-fcheck input:checked + .zm-fcheck__box::after {
	content: "";
	position: absolute;
	top: 3px;
	left: 5px;
	width: 5px;
	height: 8px;
	border: solid #ffffff;
	border-width: 0 2px 2px 0;
	transform: rotate(45deg);
}

.zm-fcheck__name {
	flex: 1;
	min-width: 0;
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
}

.zm-fcheck input:checked ~ .zm-fcheck__name {
	font-weight: 700;
	color: var(--zs-p);
}

.zm-fcheck__count {
	font-size: 11.5px;
	color: var(--zs-s);
}

/* Price slider */
.zm-fprice__range {
	position: relative;
	height: 24px;
	margin-bottom: 10px;
	direction: ltr;
}

.zm-fprice__track {
	position: absolute;
	top: 9px;
	right: 0;
	left: 0;
	height: 6px;
	background: var(--zs-surface);
	border-radius: 999px;
}

.zm-fprice__range input[type="range"] {
	position: absolute;
	top: 0;
	left: 0;
	width: 100%;
	height: 24px;
	margin: 0;
	background: none;
	pointer-events: none;
	-webkit-appearance: none;
	appearance: none;
}

.zm-fprice__range input[type="range"]::-webkit-slider-thumb {
	width: 18px;
	height: 18px;
	background: #ffffff;
	border: 3px solid var(--zs-p);
	border-radius: 50%;
	box-shadow: 0 2px 6px rgba(0, 0, 0, 0.15);
	cursor: pointer;
	pointer-events: auto;
	-webkit-appearance: none;
}

.zm-fprice__range input[type="range"]::-moz-range-thumb {
	width: 14px;
	height: 14px;
	background: #ffffff;
	border: 3px solid var(--zs-p);
	border-radius: 50%;
	cursor: pointer;
	pointer-events: auto;
}

.zm-fprice__labels {
	display: flex;
	justify-content: space-between;
	gap: 8px;
	margin-bottom: 12px;
	font-size: 12.5px;
	color: var(--zs-m);
}

.zm-fprice__labels b {
	color: var(--zs-d);
}

.zm-fprice__btn {
	width: 100%;
	height: 38px;
	font: inherit;
	font-size: 12.5px;
	font-weight: 700;
	color: var(--zs-p);
	background: var(--zs-soft);
	border: 0;
	border-radius: 999px;
	cursor: pointer;
	transition: background 0.2s, color 0.2s;
}

.zm-fprice__btn:hover {
	color: #ffffff;
	background: var(--zs-p);
}

/* ---------- Product Grid & List View ---------- */

.zm-shop__grid.is-list-view {
	grid-template-columns: repeat(2, minmax(0, 1fr));
}

.zm-shop__grid.is-list-view .zm-card {
	display: grid;
	grid-template-columns: 120px minmax(0, 1fr);
	grid-template-rows: auto 1fr auto;
	gap: 6px 18px;
	align-items: center;
	padding: 18px;
}

.zm-shop__grid.is-list-view .zm-card__media {
	grid-row: 1 / 4;
	grid-column: 1;
	margin: 0;
}

.zm-shop__grid.is-list-view .zm-card__meta,
.zm-shop__grid.is-list-view .zm-card__title,
.zm-shop__grid.is-list-view .zm-card__foot {
	grid-column: 2;
}

.zm-shop__grid.is-list-view .zm-card__title {
	min-height: 0;
	margin: 0;
}

.zm-shop__grid.is-list-view .zm-card__badge {
	top: 14px;
	inset-inline-end: auto;
	inset-inline-start: 14px;
}

/* ---------- Pagination ---------- */

.zm-shop-pager {
	margin-top: 40px;
}

.zm-shop-pager ul {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: center;
	gap: 8px;
	margin: 0;
	padding: 0;
	list-style: none;
}

.zm-shop-pager a,
.zm-shop-pager span {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-width: 44px;
	height: 44px;
	padding: 0 12px;
	font-size: 14px;
	font-weight: 700;
	color: var(--zs-d);
	text-decoration: none;
	background: #ffffff;
	border: 1px solid var(--zs-b);
	border-radius: 50%;
	transition: background 0.2s, color 0.2s, border-color 0.2s, transform 0.2s;
}

.zm-shop-pager a:hover {
	color: var(--zs-p);
	border-color: var(--zs-p);
	transform: translateY(-2px);
}

.zm-shop-pager span.current {
	color: #ffffff;
	background: var(--zs-p);
	border-color: var(--zs-p);
	box-shadow: 0 8px 20px color-mix(in srgb, var(--zs-p) 32%, transparent);
}

/* ---------- Empty State ---------- */

.zm-shop-empty {
	display: flex;
	flex-direction: column;
	align-items: center;
	padding: 64px 24px;
	text-align: center;
	background: #ffffff;
	border: 1px dashed var(--zs-b);
	border-radius: 32px;
}

.zm-shop-empty__icon {
	display: grid;
	place-items: center;
	width: 88px;
	height: 88px;
	margin-bottom: 18px;
	color: var(--zs-p);
	background: var(--zs-soft);
	border-radius: 50%;
}

.zm-shop-empty__title {
	margin: 0 0 8px;
	font-size: 20px;
	font-weight: 800;
	color: var(--zs-d);
}

.zm-shop-empty__text {
	max-width: 440px;
	margin: 0 0 22px;
	font-size: 14px;
	color: var(--zs-m);
}

/* ---------- Responsive (Tablets & Phones) ---------- */

@media (max-width: 1100px) {
	.zm-shop__grid {
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}

	.zm-shop__grid.is-list-view {
		grid-template-columns: minmax(0, 1fr);
	}
}

@media (max-width: 991px) {
	.zm-shop--has-side .zm-shop__layout {
		grid-template-columns: minmax(0, 1fr);
	}

	.zm-shop-bar__filter-btn {
		display: inline-flex;
	}

	.zm-shop-bar__pills,
	.zm-shop-bar__sort-label {
		display: none;
	}

	.zm-shop-bar__select-wrap {
		display: block;
		margin-inline-end: auto;
	}

	/* Mobile off-canvas filter drawer */
	.zm-shop-side {
		position: fixed;
		inset: 0;
		z-index: 9995;
		visibility: hidden;
		pointer-events: none;
	}

	.zm-shop-side.is-open {
		visibility: visible;
		pointer-events: auto;
	}

	.zm-shop-side__veil {
		position: absolute;
		inset: 0;
		display: block;
		background: rgba(15, 2, 21, 0.45);
		opacity: 0;
		backdrop-filter: blur(3px);
		transition: opacity 0.3s ease;
	}

	.zm-shop-side.is-open .zm-shop-side__veil {
		opacity: 1;
	}

	.zm-shop-side__panel {
		position: absolute;
		top: 0;
		bottom: 0;
		inset-inline-start: 0;
		display: flex;
		flex-direction: column;
		width: min(88vw, 360px);
		padding: 20px 18px;
		overflow-y: auto;
		background: var(--zs-surface);
		box-shadow: 0 0 50px rgba(0, 0, 0, 0.2);
		transform: translateX(100%);
		transition: transform 0.35s var(--zs-ease);
	}

	[dir="ltr"] .zm-shop-side__panel {
		transform: translateX(-100%);
	}

	.zm-shop-side.is-open .zm-shop-side__panel {
		transform: none;
	}

	.zm-shop-side__close {
		display: grid;
		place-items: center;
		width: 34px;
		height: 34px;
		padding: 0;
		font-size: 22px;
		line-height: 1;
		color: var(--zs-d);
		background: #ffffff;
		border: 1px solid var(--zs-b);
		border-radius: 50%;
		cursor: pointer;
	}

	.zm-shop-side__foot {
		position: sticky;
		bottom: -20px;
		display: block;
		margin: auto -18px -20px;
		padding: 14px 18px calc(14px + env(safe-area-inset-bottom));
		background: #ffffff;
		border-top: 1px solid var(--zs-b);
	}

	.zm-shop-side__apply {
		width: 100%;
		height: 48px;
		font: inherit;
		font-size: 14px;
		font-weight: 700;
		color: #ffffff;
		background: var(--zs-p);
		border: 0;
		border-radius: 999px;
		cursor: pointer;
	}
}

@media (max-width: 767px) {
	.zm-shop {
		padding-top: 10px;
	}

	.zm-shop-hero {
		margin-bottom: 20px;
		padding: 20px 18px 22px;
		border-radius: 26px;
	}

	.zm-shop-bar {
		padding: 10px 12px;
		border-radius: 20px;
	}

	.zm-shop-bar__views {
		display: none;
	}

	.zm-shop__grid {
		gap: 12px;
	}
}