
/* =========================================================
 * MyTheme — Shop Archive / Filters / Category Description
 * Scoped only to WooCommerce product archives.
 * ========================================================= */

.woocommerce .mytheme-shop-archive-layout,
.woocommerce-page .mytheme-shop-archive-layout {
	display: grid;
	grid-template-columns: 285px minmax(0, 1fr);
	grid-template-areas: "filters products";
	gap: 28px;
	align-items: start;
	margin-top: 10px;
}

.woocommerce .mytheme-shop-products,
.woocommerce-page .mytheme-shop-products {
	grid-area: products;
	min-width: 0;
}

.woocommerce .mytheme-shop-filters,
.woocommerce-page .mytheme-shop-filters {
	grid-area: filters;
	min-width: 0;
	position: sticky;
	top: 24px;
	z-index: 5;
}

.mytheme-shop-filters__head {
	display: none;
	align-items: center;
	justify-content: space-between;
	gap: 12px;
	padding: 18px 18px 14px;
	border-bottom: 1px solid #edf0eb;
	background: #fff;
	border-radius: 16px 16px 0 0;
}

.mytheme-shop-filters__eyebrow {
	display: block;
	margin-bottom: 4px;
	color: #7b8278;
	font-size: 11px;
	font-weight: 700;
}

.mytheme-shop-filters__title {
	display: block;
	color: #1c241b;
	font-size: 18px;
	font-weight: 850;
}

.mytheme-shop-filters__close {
	display: none;
	width: 34px;
	height: 34px;
	padding: 0;
	border: 0;
	border-radius: 50%;
	background: #f4f6f2;
	color: #293027;
	font-size: 24px;
	line-height: 1;
	cursor: pointer;
}

.mytheme-shop-filters__body {
	padding: 4px 18px 18px;
	background: #fff;
	border-radius: 0 0 16px 16px;
	box-shadow: 0 8px 28px rgba(26, 38, 24, .07);
}

.mytheme-shop-filters .widget {
	margin: 0;
	padding: 18px 0;
	border-bottom: 1px solid #edf0eb;
}

.mytheme-shop-filters .widget:last-child {
	border-bottom: 0;
}

.mytheme-shop-filters .widget-title {
	margin: 0 0 14px;
	padding: 0;
	color: #20271f;
	font-size: 15px;
	font-weight: 850;
}
.woocommerce nav.woocommerce-pagination ul li a:focus, .woocommerce nav.woocommerce-pagination ul li a:hover, .woocommerce nav.woocommerce-pagination ul li span.current {
background: #e6ede6;
    color: #49464d;
    width: 33px;
    border: none;
}
.woocommerce nav.woocommerce-pagination ul li {
    border: 1px solid #e4e4e4;
    padding: 0;
    margin: 0;
    float: right;
    overflow: hidden;
    border-radius: 8px;
    width: 33px;
}
.woocommerce nav.woocommerce-pagination ul {
white-space: nowrap;
    padding: 0;
    clear: both;
    border: 0px solid #cfc8d8;
    border-left: 0;
    margin: 1px;
    margin-top: 20px;
    gap: 5px;
    display: flex;
    align-items: center;
    justify-content: center;
}
.mytheme-shop-filters ul {
margin: 0;
    padding: 0;
    list-style: none;
    max-height: 368px;
    overflow: hidden;
    overflow-y: scroll;
    direction: ltr;
    text-align: right;
    padding-right: 12px;
}

.mytheme-shop-filters li {
	margin: 0;
	padding: 5px 0;
}

.mytheme-shop-filters li a {
	color: #50584d;
	text-decoration: none;
	font-size: 13px;
	transition: color .2s ease;
}

.mytheme-shop-filters li a:hover,
.mytheme-shop-filters li.current-cat > a,
.mytheme-shop-filters .chosen a {
	color: var(--color-primary, #6f813d);
	font-weight: 700;
}

.mytheme-shop-filters .count {
	margin-right: 4px;
	color: #9ca39a;
	font-size: 11px;
}

.mytheme-shop-filters .children {
	padding-right: 14px;
}

.mytheme-shop-filters .woocommerce-widget-layered-nav-list__item {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 8px;
}

.mytheme-shop-filters .woocommerce-widget-layered-nav-list__item a {
	flex: 1;
}

.mytheme-shop-filters .woocommerce-widget-layered-nav-list__item.chosen a {
	font-weight: 800;
}

.mytheme-shop-filters .woocommerce-widget-layered-nav-list__item.chosen a:before {
	content: "✓";
	margin-left: 6px;
}

.mytheme-shop-filters .price_slider_wrapper {
	padding-top: 3px;
}

.mytheme-shop-filters .price_slider {
	margin: 10px 4px 18px;
}

.mytheme-shop-filters .ui-slider .ui-slider-handle {
	border-radius: 50%;
}

.mytheme-shop-filters .price_slider_amount {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: space-between;
	gap: 8px;
}

.mytheme-shop-filters .price_label {
	color: #646b60;
	font-size: 12px;
}

.mytheme-shop-filters button,
.mytheme-shop-filters input[type="submit"] {
	font-family: inherit;
}

.mytheme-shop-filters .button {
	border: 0;
	border-radius: 9px;
	background: var(--color-primary, #6f813d);
	color: #fff;
	padding: 8px 13px;
	font-size: 12px;
	font-weight: 800;
	cursor: pointer;
}

.mytheme-shop-filter-toggle {
	display: none;
	align-items: center;
	justify-content: center;
	gap: 8px;
	width: 100%;
	margin: 0 0 16px;
	padding: 12px 16px;
	border: 1px solid #e1e7dd;
	border-radius: 12px;
	background: #fff;
	color: #283125;
	font-family: inherit;
	font-size: 13px;
	font-weight: 800;
	cursor: pointer;
}

.mytheme-shop-filter-toggle svg {
	width: 19px;
	height: 19px;
}

/* Category description — same interaction pattern as the product description. */
.mytheme-shop-category-description {
	margin: 0 0 26px;
	padding: 0;
	border: 1px solid #e9ede7;
	border-radius: 18px;
	background: #fff;
	box-shadow: 0 7px 25px rgba(26, 38, 24, .045);
	overflow: hidden;
}

.mytheme-shop-category-description__title {
	display: flex;
	align-items: center;
	gap: 10px;
	margin: 0;
	padding: 17px 20px;
	border-bottom: 1px solid #edf0eb;
	color: #20271f;
	font-size: 18px;
	font-weight: 850;
}

.mytheme-shop-category-description__title-icon {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 35px;
	height: 35px;
	flex: 0 0 35px;
	border-radius: 10px;
	background: #f4f7f0;
	color: var(--color-primary, #6f813d);
}

.mytheme-shop-category-description__title-icon svg {
	width: 20px;
	height: 20px;
}

.mytheme-shop-category-description__body {
	padding: 18px 20px 16px;
}

.mytheme-shop-category-description__content {
	position: relative;
	max-height: 230px;
	overflow: hidden;
	color: #50584f;
	font-size: 14px;
	line-height: 2;
	transition: max-height .35s ease;
}

.mytheme-shop-category-description__content:not(.is-expanded):after {
	content: "";
	position: absolute;
	right: 0;
	bottom: 0;
	left: 0;
	height: 90px;
	pointer-events: none;
	background: linear-gradient(to bottom, rgba(255,255,255,0), #fff 88%);
}

.mytheme-shop-category-description__content.is-expanded,
.mytheme-shop-category-description__content.is-fully-visible {
	max-height: none;
}

.mytheme-shop-category-description__content.is-expanded:after,
.mytheme-shop-category-description__content.is-fully-visible:after {
	display: none;
}

.mytheme-shop-category-description__content > :first-child {
	margin-top: 0;
}

.mytheme-shop-category-description__content > :last-child {
	margin-bottom: 0;
}

.mytheme-shop-category-description__toggle {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 7px;
	width: 100%;
	margin-top: 14px;
	padding: 10px 16px;
	border: 1px solid #e0e5df;
	border-radius: 11px;
	background: #fff;
	color: var(--color-primary, #6f813d);
	font-family: inherit;
	font-size: 13px;
	font-weight: 800;
	cursor: pointer;
	transition: background .2s ease, border-color .2s ease, transform .2s ease;
}

.mytheme-shop-category-description__toggle:hover {
	background: #f8faf6;
	border-color: var(--color-primary, #6f813d);
	transform: translateY(-1px);
}

.mytheme-shop-category-description__less {
	display: none;
}

.mytheme-shop-category-description__toggle[aria-expanded="true"] .mytheme-shop-category-description__more {
	display: none;
}

.mytheme-shop-category-description__toggle[aria-expanded="true"] .mytheme-shop-category-description__less {
	display: inline;
}

.mytheme-shop-category-description__chevron {
	width: 16px;
	height: 16px;
	transition: transform .25s ease;
}

.mytheme-shop-category-description__toggle[aria-expanded="true"] .mytheme-shop-category-description__chevron {
	transform: rotate(180deg);
}

/* Keep Woo's sort/result controls inside the product column. */
.woocommerce .mytheme-shop-products .woocommerce-result-count,
.woocommerce .mytheme-shop-products .woocommerce-ordering {
	margin-bottom: 18px;
}

@media (max-width: 1000px) {
	.woocommerce .mytheme-shop-archive-layout,
	.woocommerce-page .mytheme-shop-archive-layout {
		grid-template-columns: 1fr;
		grid-template-areas:
			"products"
			"filters";
		gap: 0;
	}

	.woocommerce .mytheme-shop-filters,
	.woocommerce-page .mytheme-shop-filters {
		position: fixed;
		inset: 0;
		top: 0;
		right: 0;
		left: auto;
		width: min(88vw, 360px);
		max-width: 100%;
		height: 100dvh;
		overflow-y: auto;
		z-index: 99999;
		background: #fff;
		box-shadow: -15px 0 45px rgba(0,0,0,.14);
		transform: translateX(110%);
		visibility: hidden;
		transition: transform .3s ease, visibility .3s ease;
	}

	.woocommerce .mytheme-shop-filters.is-open,
	.woocommerce-page .mytheme-shop-filters.is-open {
		transform: translateX(0);
		visibility: visible;
	}

	.mytheme-shop-filters__head {
		position: sticky;
		top: 0;
		z-index: 2;
		border-radius: 0;
	}

	.mytheme-shop-filters__close {
		display: inline-flex;
		align-items: center;
		justify-content: center;
	}

	.mytheme-shop-filters__body {
		min-height: calc(100% - 75px);
		border-radius: 0;
		box-shadow: none;
	}

	.mytheme-shop-filter-toggle {
		display: flex;
	}

	body.mytheme-shop-filters-open {
		overflow: hidden;
	}
}

@media (max-width: 600px) {
	.mytheme-shop-category-description {
		margin-bottom: 18px;
		border-radius: 14px;
	}

	.mytheme-shop-category-description__title {
		padding: 14px 15px;
		font-size: 16px;
	}

	.mytheme-shop-category-description__body {
		padding: 15px;
	}

	.mytheme-shop-category-description__content {
		max-height: 210px;
		font-size: 13px;
		line-height: 1.95;
	}
}

/* =========================================================
 * V2 — Enhanced WooCommerce filters
 * ========================================================= */

/* Price filter — works with the native WooCommerce price widget. */
.mytheme-shop-filters .widget_price_filter,
.mytheme-shop-filters .mytheme-price-filter-widget {
	padding: 18px 0 20px;
}

.mytheme-shop-filters .widget_price_filter .widget-title,
.mytheme-shop-filters .mytheme-price-filter-widget .widget-title {
	position: relative;
	display: flex;
	align-items: center;
	gap: 9px;
	margin-bottom: 18px;
}

.mytheme-price-filter-icon {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 28px;
	height: 28px;
	flex: 0 0 28px;
	border-radius: 9px;
	background: linear-gradient(135deg, #f2f6eb, #e8efdd);
	box-shadow: inset 0 0 0 1px rgba(111,129,61,.08);
	color: #6f813d;
}

.mytheme-price-filter-icon svg {
	width: 17px;
	height: 17px;
}

.mytheme-shop-filters .widget_price_filter .price_slider_wrapper {
	padding: 16px 12px 13px;
	border: 1px solid #e8ede3;
	border-radius: 14px;
	background: linear-gradient(180deg, #fbfcfa 0%, #f5f8f2 100%);
}

.mytheme-shop-filters .widget_price_filter .price_slider {
	height: 5px;
	margin: 4px 4px 22px;
	border: 0;
	border-radius: 999px;
	background: #dfe6d8;
}

.mytheme-shop-filters .widget_price_filter .ui-slider .ui-slider-range {
	border-radius: 999px;
	background: linear-gradient(90deg, #82974b, #637737);
}

.mytheme-shop-filters .widget_price_filter .ui-slider .ui-slider-handle {
	top: 50%;
	width: 18px;
	height: 18px;
	margin-top: -9px;
	border: 3px solid #fff;
	border-radius: 50%;
	background: #6f813d;
	box-shadow: 0 2px 8px rgba(50,65,37,.22), 0 0 0 1px rgba(111,129,61,.16);
	cursor: grab;
	transition: transform .18s ease, box-shadow .18s ease;
}

.mytheme-shop-filters .widget_price_filter .ui-slider .ui-slider-handle:hover {
	transform: scale(1.12);
	box-shadow: 0 4px 12px rgba(50,65,37,.28), 0 0 0 4px rgba(111,129,61,.10);
}

.mytheme-shop-filters .widget_price_filter .price_slider_amount {
	display: grid;
	grid-template-columns: minmax(0,1fr) auto;
	gap: 10px;
	align-items: center;
}

.mytheme-shop-filters .widget_price_filter .price_label {
	display: block;
	min-width: 0;
	padding: 8px 10px;
	border: 1px solid #e1e7dc;
	border-radius: 9px;
	background: #fff;
	color: #4e5749;
	font-size: 11px;
	font-weight: 700;
	text-align: center;
}

.mytheme-shop-filters .widget_price_filter .price_slider_amount .button {
	min-width: 72px;
	padding: 9px 12px;
	border-radius: 9px;
	background: linear-gradient(135deg, #7f9349, #617437);
	box-shadow: 0 5px 12px rgba(90,111,48,.16);
	font-size: 11px;
	transition: transform .18s ease, box-shadow .18s ease;
}

.mytheme-shop-filters .widget_price_filter .price_slider_amount .button:hover {
	transform: translateY(-1px);
	box-shadow: 0 7px 15px rgba(90,111,48,.22);
}

/* Category header + ON/OFF switch. */
.mytheme-filter-section-head,
.mytheme-stock-filter-row {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 12px;
}

.mytheme-filter-section-title-wrap,
.mytheme-stock-filter-label {
	display: flex;
	align-items: center;
	gap: 10px;
	min-width: 0;
}

.mytheme-filter-section-title-wrap .widget-title {
	margin: 0;
}

.mytheme-filter-section-icon,
.mytheme-stock-filter-icon {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 32px;
	height: 32px;
	flex: 0 0 32px;
	border-radius: 10px;
	background: #f3f6ef;
	color: var(--color-primary, #6f813d);
}

.mytheme-filter-section-icon svg,
.mytheme-stock-filter-icon svg {
	width: 18px;
	height: 18px;
}

.mytheme-filter-switch {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	padding: 3px;
	border: 0;
	background: transparent;
	font-family: inherit;
	cursor: pointer;
}

.mytheme-filter-switch__track {
	position: relative;
	display: inline-block;
	width: 39px;
	height: 22px;
	border-radius: 999px;
	background: #d8ddd5;
	box-shadow: inset 0 1px 2px rgba(0,0,0,.08);
	transition: background .22s ease;
}

.mytheme-filter-switch__thumb {
	position: absolute;
	top: 3px;
	left: 3px;
	width: 16px;
	height: 16px;
	border-radius: 50%;
	background: #fff;
	box-shadow: 0 2px 5px rgba(0,0,0,.18);
	transition: transform .22s ease;
}

.mytheme-filter-switch.is-on .mytheme-filter-switch__track {
	background: #6f813d;
}

.mytheme-filter-switch.is-on .mytheme-filter-switch__thumb {
	transform: translateX(17px);
}

.mytheme-filter-switch__state {
	min-width: 22px;
	color: #969d91;
	font-size: 9px;
	font-weight: 900;
	letter-spacing: .2px;
}

.mytheme-filter-switch.is-on .mytheme-filter-switch__state {
	color: #6f813d;
}

.mytheme-category-filter-body {
	overflow: hidden;
	max-height: 1000px;
	opacity: 1;
	transition: max-height .3s ease, opacity .2s ease, margin-top .3s ease;
}

.mytheme-category-filter-body.is-off {
	max-height: 0;
	opacity: 0;
	margin-top: 0;
}

.mytheme-category-filter-widget > .mytheme-filter-section-head {
	padding-bottom: 14px;
}

.mytheme-category-filter-body .product-categories {
	padding-top: 1px;
}

/* Stock filter */
.mytheme-stock-filter-widget {
	padding: 17px 0 !important;
}

.mytheme-stock-filter-label > span:last-child {
	display: flex;
	flex-direction: column;
	gap: 3px;
}

.mytheme-stock-filter-label strong {
	color: #283026;
	font-size: 13px;
}

.mytheme-stock-filter-label small {
	color: #92998e;
	font-size: 10px;
}

@media (max-width: 1000px) {
	.mytheme-shop-filters .widget_price_filter .price_slider_wrapper {
		border-radius: 13px;
	}
}

/* =========================================================
 * V3 — Final shop filter fixes / AJAX / native widgets only
 * ========================================================= */

/* Archive layout must own the full row so the filter column can never fall above the products. */
.woocommerce .mytheme-shop-archive-layout,
.woocommerce-page .mytheme-shop-archive-layout {
	position: relative;
	clear: both;
	width: 100%;
	max-width: 100%;
	float: none !important;
	display: grid !important;
	grid-template-columns: minmax(245px, 285px) minmax(0, 1fr) !important;
	grid-template-areas: "filters products" !important;
	align-items: start !important;
}

.woocommerce .mytheme-shop-filters,
.woocommerce-page .mytheme-shop-filters {
	grid-area: filters !important;
	width: 100%;
	float: none !important;
	align-self: start;
}

.woocommerce .mytheme-shop-products,
.woocommerce-page .mytheme-shop-products {
	grid-area: products !important;
	width: 100%;
	min-width: 0;
	float: none !important;
}

/* Each WooCommerce category gets its own ON/OFF control. */
.mytheme-shop-filters .widget_product_categories .product-categories li {
	position: relative;
}
.mytheme-category-item-row {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 8px;
	width: 100%;
}
.mytheme-category-item-row > a {
	min-width: 0;
	flex: 1 1 auto;
}
.mytheme-category-item-switch {
	display: inline-flex;
	align-items: center;
	gap: 4px;
	flex: 0 0 auto;
	padding: 2px;
	border: 0;
	background: transparent;
	font-family: inherit;
	cursor: pointer;
}
.mytheme-category-item-switch__track {
	position: relative;
	width: 31px;
	height: 18px;
	border-radius: 999px;
	background: #d7ddd4;
	box-shadow: inset 0 1px 2px rgba(0,0,0,.08);
	transition: background .2s ease;
}
.mytheme-category-item-switch__thumb {
	position: absolute;
	top: 3px;
	left: 3px;
	width: 12px;
	height: 12px;
	border-radius: 50%;
	background: #fff;
	box-shadow: 0 1px 4px rgba(0,0,0,.2);
	transition: transform .2s ease;
}
.mytheme-category-item-switch.is-on .mytheme-category-item-switch__track { background: #6f813d; }
.mytheme-category-item-switch.is-on .mytheme-category-item-switch__thumb { transform: translateX(13px); }
.mytheme-category-item-switch__state {
	min-width: 18px;
	font-size: 8px;
	font-weight: 900;
	color: #9aa197;
}
.mytheme-category-item-switch.is-on .mytheme-category-item-switch__state { color: #6f813d; }

/* Price filter — slider first, prices underneath, full-width apply button. */
.mytheme-shop-filters .widget_price_filter .price_slider_wrapper {
	padding: 18px 14px 14px !important;
	border: 1px solid #e3e9de;
	border-radius: 18px;
	background: linear-gradient(180deg,#ffffff 0%,#f5f8f1 100%);
	box-shadow: 0 8px 22px rgba(43,60,34,.06);
}
.mytheme-shop-filters .widget_price_filter .price_slider {
	height: 6px !important;
	margin: 7px 5px 24px !important;
	border: 0 !important;
	border-radius: 999px !important;
	background: #dfe6d9 !important;
}
.mytheme-shop-filters .widget_price_filter .ui-slider .ui-slider-range {
	border-radius: 999px !important;
	background: linear-gradient(90deg,#94a95d,#62763a) !important;
}
.mytheme-shop-filters .widget_price_filter .ui-slider .ui-slider-handle {
	top: 50% !important;
	width: 20px !important;
	height: 20px !important;
	margin: -10px 0 0 -10px !important;
	border: 3px solid #fff !important;
	border-radius: 50% !important;
	background: #718542 !important;
	box-shadow: 0 3px 10px rgba(50,65,37,.25),0 0 0 1px rgba(111,129,61,.15) !important;
}
.mytheme-shop-filters .widget_price_filter .price_slider_amount {
	display: flex !important;
	flex-direction: column !important;
	align-items: stretch !important;
	gap: 10px !important;
}
.mytheme-shop-filters .widget_price_filter .price_label {
	order: 1 !important;
	display: block !important;
	width: 100% !important;
	box-sizing: border-box;
	padding: 9px 10px !important;
	border: 1px solid #e1e7dc !important;
	border-radius: 11px !important;
	background: #fff !important;
	color: #505a4b !important;
	font-size: 11px !important;
	font-weight: 800 !important;
	text-align: center !important;
}
.mytheme-shop-filters .widget_price_filter .price_slider_amount .button {
	order: 2 !important;
	width: 100% !important;
	min-width: 0 !important;
	box-sizing: border-box;
	padding: 11px 14px !important;
	border: 0 !important;
	border-radius: 11px !important;
	background: linear-gradient(135deg,#7f954b,#607436) !important;
	color: #fff !important;
	font-size: 12px !important;
	font-weight: 900 !important;
	box-shadow: 0 7px 16px rgba(90,111,48,.18) !important;
}

@media (max-width: 1000px) {
	.woocommerce .mytheme-shop-archive-layout,
	.woocommerce-page .mytheme-shop-archive-layout {
		grid-template-columns: 1fr !important;
		grid-template-areas: "products" !important;
	}
	.woocommerce .mytheme-shop-filters,
	.woocommerce-page .mytheme-shop-filters {
		grid-area: auto !important;
	}
}

/* =========================================================
 * V4 — Price slider / clean switches / faster AJAX loading
 * ========================================================= */

/* Keep WooCommerce's real price slider. The numeric inputs remain hidden. */
.mytheme-shop-filters .widget_price_filter .price_slider_amount input[type="text"],
.mytheme-shop-filters .widget_price_filter .price_slider_amount input[type="number"] {
	position: absolute !important;
	width: 1px !important;
	height: 1px !important;
	padding: 0 !important;
	margin: -1px !important;
	overflow: hidden !important;
	clip: rect(0,0,0,0) !important;
	white-space: nowrap !important;
	border: 0 !important;
}

.mytheme-shop-filters .widget_price_filter .price_slider_amount {
	position: relative !important;
}

.mytheme-shop-filters .widget_price_filter .price_slider {
	position: relative !important;
	display: block !important;
	visibility: visible !important;
	opacity: 1 !important;
	cursor: pointer;
}

/* Price label stays below the slider, then the full-width Woo filter button. */
.mytheme-shop-filters .widget_price_filter .price_slider_amount .price_label {
	display: block !important;
	width: 100% !important;
	margin: 0 !important;
	order: 1 !important;
}

.mytheme-shop-filters .widget_price_filter .price_slider_amount .button {
	width: 100% !important;
	order: 2 !important;
	margin: 0 !important;
}

/* Category + stock switches are visual toggles only; no ON/OFF text beside them. */
.mytheme-category-item-switch__state,
.mytheme-filter-switch__state {
	display: none !important;
}

.mytheme-category-item-switch,
.mytheme-filter-switch {
	width: 39px;
	min-width: 39px;
	justify-content: flex-end;
	padding: 2px 0 !important;
}

/* A lighter, faster-feeling AJAX state. */
body.mytheme-shop-ajax-loading {
	cursor: wait;
}

body.mytheme-shop-ajax-loading:before {
	content: "";
	position: fixed;
	inset: 0;
	z-index: 100000;
	background: rgba(255,255,255,.32);
	backdrop-filter: blur(2px);
	pointer-events: all;
}

body.mytheme-shop-ajax-loading:after {
	content: "";
	position: fixed;
	top: 50%;
	left: 50%;
	z-index: 100001;
	width: 38px;
	height: 38px;
	margin: -19px 0 0 -19px;
	border: 4px solid #e1e8db;
	border-top-color: #6f813d;
	border-radius: 50%;
	box-shadow: 0 8px 24px rgba(42,57,35,.12);
	animation: mythemeShopSpin .65s linear infinite;
}

@keyframes mythemeShopSpin {
	from { transform: rotate(0deg); }
	to { transform: rotate(360deg); }
}

/* Product archive: exactly 3 product cards per row on desktop. */
@media (min-width: 1001px) {
	.woocommerce .mytheme-shop-products ul.products,
	.woocommerce-page .mytheme-shop-products ul.products {
		display: grid !important;
		grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
		gap: 24px !important;
		width: 100% !important;
		margin-left: 0 !important;
		margin-right: 0 !important;
	}

	.woocommerce .mytheme-shop-products ul.products::before,
	.woocommerce .mytheme-shop-products ul.products::after,
	.woocommerce-page .mytheme-shop-products ul.products::before,
	.woocommerce-page .mytheme-shop-products ul.products::after {
		display: none !important;
	}

	.woocommerce .mytheme-shop-products ul.products li.product,
	.woocommerce-page .mytheme-shop-products ul.products li.product {
		float: none !important;
		width: auto !important;
		margin: 0 !important;
	}
}

@media (max-width: 1000px) {
	/* Mobile: filters are always a drawer, and the products remain the only grid area. */
	.woocommerce .mytheme-shop-archive-layout,
	.woocommerce-page .mytheme-shop-archive-layout {
		grid-template-columns: 1fr !important;
		grid-template-areas: "products" !important;
	}

	.woocommerce .mytheme-shop-filters,
	.woocommerce-page .mytheme-shop-filters {
		position: fixed !important;
		top: 0 !important;
		right: 0 !important;
		bottom: 0 !important;
		left: auto !important;
		width: min(88vw, 360px) !important;
		height: 100dvh !important;
		z-index: 99999 !important;
	}

	/* After selecting a filter the JS closes the drawer before the request starts. */
	body.mytheme-shop-ajax-loading .mytheme-shop-filters {
		transform: translateX(110%) !important;
		visibility: hidden !important;
	}

	.mytheme-shop-filters .widget_price_filter .price_slider_wrapper {
		padding: 18px 13px 14px !important;
	}
}
