.go-shop-filters {
	--go-shop-filters-gap: 20px;
	--go-shop-filters-radius: 6px;
	--go-shop-filters-border: #e2e2e2;
	--go-shop-filters-accent: #111111;
	--go-shop-filters-accent-text: #ffffff;
	font-size: 14px;
	color: #222;
}

.go-shop-filters input[type="checkbox"] {
	accent-color: var(--go-shop-filters-accent);
	width: 16px;
	height: 16px;
}

/* ==========================================================================
   Drawer mode: toggle button, dark overlay, sliding side panel.
   ========================================================================== */

.go-shop-filters-wrapper {
	display: inline-block;
}

.go-shop-filter-toggle {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	border: 1px solid #111;
	background: #fff;
	color: #111;
	border-radius: var(--go-shop-filters-radius);
	padding: 11px 20px;
	font-size: 13px;
	font-weight: 600;
	letter-spacing: 0.04em;
	text-transform: uppercase;
	cursor: pointer;
	transition: background 0.15s ease, color 0.15s ease;
}
.go-shop-filter-toggle:hover {
	background: #111;
	color: #fff;
}
.go-shop-filter-toggle-count,
.go-shop-filter-count {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-width: 18px;
	height: 18px;
	padding: 0 5px;
	border-radius: 999px;
	background: currentColor;
	font-size: 11px;
	font-weight: 700;
	letter-spacing: normal;
	text-transform: none;
}
.go-shop-filter-toggle-count {
	background: #111;
	color: #fff;
}
.go-shop-filter-toggle:hover .go-shop-filter-toggle-count {
	background: #fff;
	color: #111;
}
.go-shop-filter-count {
	background: rgba(255, 255, 255, 0.25);
	color: #fff;
}

.go-shop-filter-overlay {
	position: fixed;
	inset: 0;
	background: rgba(17, 17, 17, 0.5);
	opacity: 0;
	visibility: hidden;
	transition: opacity 0.25s ease, visibility 0.25s ease;
	z-index: 100000;
}
.go-shop-filter-overlay.is-open {
	opacity: 1;
	visibility: visible;
}

.go-shop-filter-drawer {
	position: fixed;
	top: 0;
	right: 0;
	height: 100vh;
	width: 400px;
	max-width: 92vw;
	background: #fff;
	z-index: 100001;
	transform: translateX(100%);
	transition: transform 0.3s ease;
	box-shadow: -12px 0 32px rgba(0, 0, 0, 0.14);
	display: flex;
	flex-direction: column;
}
.go-shop-filter-drawer.is-open {
	transform: translateX(0);
}
.go-shop-filter-drawer .go-shop-filters {
	display: flex;
	flex-direction: column;
	height: 100%;
	min-height: 0;
}

.go-shop-filter-drawer-header {
	flex: 0 0 auto;
	display: flex;
	align-items: center;
	justify-content: space-between;
	padding: 20px 22px;
	border-bottom: 1px solid var(--go-shop-filters-border);
}
.go-shop-filter-drawer-title {
	margin: 0;
	font-size: 16px;
	font-weight: 600;
	letter-spacing: 0.02em;
	text-transform: uppercase;
}
.go-shop-filter-drawer-close {
	border: none;
	background: none;
	font-size: 26px;
	line-height: 1;
	cursor: pointer;
	color: #555;
	padding: 4px 6px;
}
.go-shop-filter-drawer-close:hover {
	color: #111;
}

.go-shop-filter-drawer-body {
	flex: 1 1 auto;
	overflow-y: auto;
	padding: 22px;
	position: relative;
}

.go-shop-filter-drawer-footer {
	flex: 0 0 auto;
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 14px;
	padding: 16px 22px;
	border-top: 1px solid var(--go-shop-filters-border);
	background: #fff;
	margin-top: 0;
}
.go-shop-filter-drawer-footer .go-shop-filter-submit {
	flex: 1 1 auto;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 8px;
}
.go-shop-filter-drawer-footer .go-shop-filter-clear {
	flex: 0 0 auto;
}
.go-shop-filter-clear--hidden {
	visibility: hidden;
}

body.go-shop-drawer-open {
	overflow: hidden;
}

/* Loading / error states, driven by filters.js during the AJAX request.
   Two selector sets: ".go-shop-filters-wrapper" is the state container in
   drawer mode; inline mode has no wrapper, so the same classes land on the
   <form class="go-shop-filters"> element itself. */
.go-shop-filters-wrapper.is-loading .go-shop-filter-drawer-body,
.go-shop-filters.is-loading .go-shop-filter-drawer-body {
	opacity: 0.45;
	pointer-events: none;
}
.go-shop-filter-drawer-spinner {
	display: none;
	position: absolute;
	inset: 0;
	align-items: center;
	justify-content: center;
}
.go-shop-filters-wrapper.is-loading .go-shop-filter-drawer-spinner,
.go-shop-filters.is-loading .go-shop-filter-drawer-spinner {
	display: flex;
}
.go-shop-filter-drawer-spinner::after {
	content: "";
	width: 26px;
	height: 26px;
	border: 3px solid var(--go-shop-filters-border);
	border-top-color: #111;
	border-radius: 50%;
	animation: go-shop-spin 0.7s linear infinite;
}
@keyframes go-shop-spin {
	to {
		transform: rotate(360deg);
	}
}

.go-shop-filter-error {
	display: none;
	margin: 0 0 14px;
	padding: 10px 12px;
	border: 1px solid #f0c4c4;
	background: #fdf1f1;
	color: #b42318;
	font-size: 12px;
	border-radius: var(--go-shop-filters-radius);
}
.go-shop-filters-wrapper.has-error .go-shop-filter-error,
.go-shop-filters.has-error .go-shop-filter-error {
	display: block;
}

@media (max-width: 640px) {
	.go-shop-filter-drawer {
		width: 100%;
		max-width: 100%;
	}
}

/* A 400px (or full-width mobile) drawer is too narrow for category+marca
   side by side once either list has more than a couple of terms -- stack
   them instead. Inline mode keeps the wider side-by-side layout below. */
.go-shop-filters--drawer .go-shop-filter-block--taxonomy {
	flex-direction: column;
}

.go-shop-filter-block--taxonomy {
	display: flex;
	flex-wrap: wrap;
	gap: var(--go-shop-filters-gap);
}
.go-shop-filter-block--taxonomy .go-shop-filter-group {
	flex: 1 1 200px;
}

.go-shop-filter-group {
	margin-bottom: var(--go-shop-filters-gap);
	padding-bottom: var(--go-shop-filters-gap);
	border-bottom: 1px solid var(--go-shop-filters-border);
}
.go-shop-filters--vertical .go-shop-filter-group:last-of-type {
	border-bottom: none;
}

.go-shop-filter-title {
	display: block;
	font-weight: 600;
	margin-bottom: 10px;
	font-size: 13px;
	text-transform: uppercase;
	letter-spacing: 0.02em;
}

.go-shop-filter-options {
	display: flex;
	flex-direction: column;
	gap: 6px;
}

.go-shop-filter-option {
	display: flex;
	align-items: center;
	gap: 6px;
	font-size: 13px;
	cursor: pointer;
}
.go-shop-filter-option input {
	margin: 0;
}

.go-shop-filter-more {
	margin-top: 2px;
}
.go-shop-filter-more summary {
	cursor: pointer;
	font-size: 12px;
	text-decoration: underline;
	color: #555;
	list-style: none;
}
.go-shop-filter-more summary::-webkit-details-marker {
	display: none;
}
.go-shop-filter-more[open] summary {
	margin-bottom: 6px;
}
.go-shop-filter-more .go-shop-filter-options {
	margin-top: 4px;
}

.go-shop-filter-options--price {
	flex-direction: row;
	align-items: center;
	gap: 8px;
}
.go-shop-filter-options--price input {
	width: 100%;
	max-width: 110px;
	padding: 8px;
	border: 1px solid var(--go-shop-filters-border);
	border-radius: var(--go-shop-filters-radius);
}
.go-shop-filter-price-sep {
	color: #999;
}

.go-shop-filter-group--orderby select {
	width: 100%;
	padding: 8px;
	border: 1px solid var(--go-shop-filters-border);
	border-radius: var(--go-shop-filters-radius);
	background: #fff;
}

.go-shop-filter-actions {
	display: flex;
	align-items: center;
	gap: 14px;
	margin-top: 8px;
}
.go-shop-filter-submit {
	border: none;
	border-radius: var(--go-shop-filters-radius);
	cursor: pointer;
	padding: 11px 22px;
	background: var(--go-shop-filters-accent);
	color: var(--go-shop-filters-accent-text);
	font-size: 13px;
	font-weight: 600;
	letter-spacing: 0.03em;
}
.go-shop-filter-submit:hover {
	opacity: 0.85;
}
.go-shop-filter-clear {
	font-size: 13px;
	text-decoration: underline;
	color: #555;
}

.go-shop-filter-active {
	margin-top: 14px;
	font-size: 12px;
	color: #666;
}

/* Horizontal layout: groups flow side by side, wrapping on small screens. */
.go-shop-filters--horizontal {
	display: flex;
	flex-wrap: wrap;
	align-items: flex-start;
	gap: var(--go-shop-filters-gap);
}
.go-shop-filters--horizontal .go-shop-filter-block--taxonomy,
.go-shop-filters--horizontal .go-shop-filter-group {
	flex: 1 1 180px;
	margin-bottom: 0;
	padding-bottom: 0;
	border-bottom: none;
}
.go-shop-filters--horizontal .go-shop-filter-actions {
	margin-top: 0;
	align-self: flex-end;
}
.go-shop-filters--horizontal .go-shop-filter-active {
	flex-basis: 100%;
}

@media (max-width: 640px) {
	.go-shop-filters--horizontal,
	.go-shop-filter-block--taxonomy {
		flex-direction: column;
	}
	.go-shop-filters--horizontal .go-shop-filter-group {
		width: 100%;
		border-bottom: 1px solid var(--go-shop-filters-border);
		padding-bottom: var(--go-shop-filters-gap);
	}
	.go-shop-filter-actions {
		flex-direction: column;
		align-items: stretch;
	}
	.go-shop-filter-submit {
		width: 100%;
	}
}
