.tebrand-sale-filters {
	margin: 0 0 1.5rem;
	padding: 1rem;
	border: 1px solid #ddd;
	border-radius: 4px;
}
.tebrand-sale-filters__grid {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(min(100%, 12rem), 1fr));
	gap: .75rem 1rem;
}
.tebrand-sale-filters__grid label { min-width: 0; }
.tebrand-sale-filters__grid input,
.tebrand-sale-filters__grid select { width: 100%; margin: .25rem 0 0; }
.tebrand-sale-filters__actions {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: .75rem 1rem;
	margin-top: 1rem;
}
.tebrand-sale-filters__actions .button { margin: 0; }
.tebrand-outlet-card .box-image img { width: 100%; height: auto; }

@media (min-width: 768px) {
	/* Wrappers disappear so the fields stay direct items of the filter grid. */
	.tebrand-outlet-search,
	.tebrand-outlet-sheet,
	.tebrand-outlet-panel-fields { display: contents; }
	.tebrand-outlet-mobile-only { display: none !important; }
	.tebrand-outlet-search input::placeholder { color: transparent; }
}

@media (max-width: 767px) {
	html:has(.tebrand-outlet-sheet[open]) { overflow: hidden; }
	.tebrand-sale-filters {
		margin: 0 0 .5rem;
		padding: 0;
		border: 0;
		border-radius: 0;
	}
	.tebrand-sale-filters__grid { display: block; }
	.tebrand-sale-filters__actions { display: none; }
	.tebrand-sale-filters input,
	.tebrand-sale-filters select,
	.tebrand-outlet-order select { font-size: 16px; }

	.tebrand-outlet-search { display: flex; gap: .5rem; }
	.tebrand-outlet-search label { flex: 1; min-width: 0; margin: 0; }
	.tebrand-outlet-search label > span {
		position: absolute;
		width: 1px;
		height: 1px;
		overflow: hidden;
		clip-path: inset(50%);
		white-space: nowrap;
	}
	.tebrand-sale-filters__grid .tebrand-outlet-search input { height: 44px; margin: 0; }
	.tebrand-outlet-search .button { min-height: 44px; margin: 0; }

	.tebrand-outlet-toolbar {
		display: grid;
		grid-template-columns: auto minmax(0, 1fr);
		align-items: center;
		gap: .5rem;
		margin: 0 0 1rem;
	}
	.tebrand-outlet-filter-toggle {
		display: inline-flex;
		align-items: center;
		gap: .375rem;
		min-width: 44px;
		min-height: 44px;
		margin: 0;
		padding: 0 .25rem;
		border: 0;
		background: transparent;
		box-shadow: none;
		color: #000;
		font-weight: 400;
		line-height: 1;
		text-transform: uppercase;
		white-space: nowrap;
	}
	.tebrand-outlet-filter-toggle svg { flex: none; }
	.tebrand-outlet-order { display: flex; align-items: center; gap: .375rem; min-width: 0; }
	.tebrand-outlet-order > span { font-size: .75rem; font-weight: 700; text-transform: uppercase; }
	.tebrand-outlet-order .woocommerce-ordering { display: block; flex: 1; min-width: 0; margin: 0; }
	.tebrand-outlet-order select {
		display: block;
		width: 100%;
		height: 44px;
		margin: 0;
		text-overflow: ellipsis;
	}
	.woocommerce-ordering:not(.tebrand-outlet-order *) { display: none; }

	.tebrand-outlet-sheet[open] {
		position: fixed;
		inset: auto 0 0;
		display: flex;
		flex-direction: column;
		width: 100%;
		max-width: 100%;
		max-height: 85vh;
		max-height: 85dvh;
		margin: 0;
		padding: 0;
		border: 0;
		border-radius: 12px 12px 0 0;
		background: #fff;
		color: #333;
	}
	.tebrand-outlet-sheet::backdrop { background: rgba(0, 0, 0, .5); }
	.tebrand-outlet-sheet__header {
		display: flex;
		align-items: center;
		justify-content: space-between;
		padding: .25rem .25rem .25rem 1rem;
		border-bottom: 1px solid #ddd;
	}
	.tebrand-outlet-sheet__header h2 { margin: 0; font-size: 1.125rem; }
	.tebrand-outlet-sheet__close {
		width: 44px;
		height: 44px;
		min-height: 0;
		margin: 0;
		padding: 0;
		border: 0;
		background: none;
		color: inherit;
		font-size: 1.75rem;
		line-height: 1;
	}
	.tebrand-outlet-panel-fields {
		flex: 1;
		min-height: 0;
		overflow-y: auto;
		overscroll-behavior: contain;
		padding: 1rem;
	}
	.tebrand-outlet-panel-fields label { display: block; margin: 0 0 .75rem; }
	.tebrand-outlet-panel-fields label:last-child { margin-bottom: 0; }
	.tebrand-sale-filters__grid .tebrand-outlet-panel-fields input,
	.tebrand-sale-filters__grid .tebrand-outlet-panel-fields select { height: 44px; }
	.tebrand-outlet-sheet__footer {
		display: flex;
		align-items: center;
		justify-content: space-between;
		gap: 1rem;
		padding: .75rem 1rem calc(.75rem + env(safe-area-inset-bottom));
		border-top: 1px solid #ddd;
	}
	.tebrand-outlet-sheet__footer a { text-transform: uppercase; font-size: .8125rem; white-space: nowrap; }
	.tebrand-outlet-sheet__footer .button {
		flex: 1;
		min-height: 44px;
		margin: 0;
		text-transform: uppercase;
	}
	.tebrand-outlet-filter-toggle:focus-visible,
	.tebrand-outlet-sheet__close:focus-visible,
	.tebrand-outlet-sheet__footer :focus-visible {
		outline: 2px solid currentColor;
		outline-offset: 2px;
	}
}

/* Without scripting the sheet cannot open: keep every field usable in the page flow. */
@media (max-width: 767px) and (scripting: none) {
	.tebrand-outlet-sheet {
		position: static;
		display: block;
		width: auto;
		margin: .75rem 0 0;
		padding: 0;
		border: 0;
	}
	.tebrand-outlet-panel-fields { padding: 0; }
	.tebrand-outlet-sheet__header,
	.tebrand-outlet-filter-toggle { display: none; }
}
