/* ==========================================================================
   Shop, brand and category pages (inc/shop.php): filter column, toolbar,
   active-filter chips, brand intro. Phones/tablets: slide-in filter panel.
   ========================================================================== */

/* --------------------------------------------------------------------------
   Brand intro (/brand/<slug>/)
   -------------------------------------------------------------------------- */
.gcf-brand-intro {
	display: flex;
	align-items: center;
	gap: 28px;
	margin: 0 0 40px;
	padding: 28px 32px;
	border: 1px solid var(--gcf-line);
	border-radius: 20px;
	background: var(--gcf-paper);
}
.gcf-brand-intro__logo {
	flex: none;
	display: grid;
	place-items: center;
	width: 140px;
	height: 100px;
}
.gcf-brand-intro__logo img { max-width: 100%; max-height: 100%; width: auto; height: auto; object-fit: contain; }
.gcf-brand-intro__title { margin: 0 0 6px; color: #1E1E1E; font-size: 28px; line-height: 1.2; }
.gcf-brand-intro__desc p { margin: 0; color: #555; font-size: 17px; line-height: 1.6; }
@media (max-width: 767.98px) {
	.gcf-brand-intro { flex-direction: column; align-items: flex-start; gap: 14px; padding: 20px; margin-bottom: 28px; }
	.gcf-brand-intro__logo { width: 110px; height: 72px; place-items: center start; }
	.gcf-brand-intro__title { font-size: 24px; }
	.gcf-brand-intro__desc p { font-size: 16px; }
}

/* --------------------------------------------------------------------------
   Layout: filters left, products right (desktop)
   -------------------------------------------------------------------------- */
.gcf-shop { display: block; }
@media (min-width: 1024px) {
	.gcf-shop {
		display: grid;
		grid-template-columns: 240px minmax(0, 1fr);
		gap: 40px;
		align-items: start;
	}
	html body .gcf-shop ul.products.gcf-products {
		grid-template-columns: repeat(auto-fill, minmax(228px, 1fr));
		gap: 36px 20px;
	}
}

/* --------------------------------------------------------------------------
   Toolbar: count · Filter button (phones) · sort
   -------------------------------------------------------------------------- */
.gcf-shop__toolbar {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 12px 16px;
	margin: 0 0 20px;
	padding: 0 0 16px;
	border-bottom: 1px solid var(--gcf-line);
}
.gcf-shop__count { margin: 0 auto 0 0; color: var(--gcf-grey); font-size: 15px; }
.gcf-shop__sort { display: flex; align-items: center; gap: 10px; margin: 0; }
.gcf-shop__sort label { margin: 0; color: #1E1E1E; font-size: 14px; font-weight: 600; white-space: nowrap; }
html body .gcf-shop__sort select {
	min-height: 44px;
	padding: 0 40px 0 14px;
	border: 1px solid #CFCBC5;
	border-radius: 999px;
	background: #fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1.5l5 5 5-5' fill='none' stroke='%231E1E1E' stroke-width='1.6'/%3E%3C/svg%3E") no-repeat right 16px center;
	color: #1E1E1E;
	font-family: var(--gcf-font);
	font-size: 15px;
	-webkit-appearance: none;
	appearance: none;
	cursor: pointer;
}
.gcf-shop__filter-btn {
	display: none;
	align-items: center;
	gap: 8px;
	min-height: 44px;
	padding: 0 18px;
	border: 1px solid #1E1E1E;
	border-radius: 999px;
	background: #fff;
	color: #1E1E1E;
	font-family: var(--gcf-font);
	font-size: 15px;
	font-weight: 600;
	cursor: pointer;
}
.gcf-shop__filter-btn svg { width: 18px; height: 18px; }
.gcf-shop__filter-btn:hover { border-color: var(--gcf-red-ui); color: var(--gcf-red-ui); }
.gcf-shop__filter-count {
	display: inline-grid;
	place-items: center;
	min-width: 22px;
	height: 22px;
	padding: 0 6px;
	border-radius: 999px;
	background: var(--gcf-red-ui);
	color: #fff;
	font-size: 12px;
	line-height: 1;
}

/* Active filter chips */
.gcf-shop__chips { display: flex; flex-wrap: wrap; gap: 8px; margin: -4px 0 22px; padding: 0; list-style: none; }
.gcf-chip {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	min-height: 36px;
	padding: 0 12px 0 14px;
	border-radius: 999px;
	background: #F0EEEB;
	color: #1E1E1E;
	font-size: 14px;
	font-weight: 600;
}
.gcf-chip svg { width: 14px; height: 14px; }
.gcf-chip:hover { background: #1E1E1E; color: #fff; }

.gcf-shop__empty { padding: 48px 20px; border: 1px dashed #CFCBC5; border-radius: 20px; text-align: center; }
.gcf-shop__empty p { margin: 0 0 18px; color: #1E1E1E; font-size: 18px; }

/* --------------------------------------------------------------------------
   Filter column
   -------------------------------------------------------------------------- */
.gcf-filters { color: #1E1E1E; }
.gcf-filters__head { display: flex; align-items: center; justify-content: space-between; margin: 0 0 8px; }
.gcf-filters__title { margin: 0; font-size: 20px; }
.gcf-filters__close { display: none; }
.gcf-filters__form { margin: 0; }
.gcf-filters__group { margin: 0; padding: 18px 0; border: 0; border-top: 1px solid var(--gcf-line); }
.gcf-filters__legend {
	float: left; /* keeps the legend inside the fieldset's padding */
	width: 100%;
	margin: 0 0 10px;
	padding: 0;
	color: #1E1E1E;
	font-size: 13px;
	font-weight: 700;
	letter-spacing: .08em;
	text-transform: uppercase;
}
.gcf-filters__list { clear: both; margin: 0; padding: 0; list-style: none; }
.gcf-filters__list li { margin: 0; padding: 0; }

/* Checkbox rows: 44 px tall touch targets */
.gcf-check {
	position: relative;
	display: flex;
	align-items: center;
	gap: 12px;
	min-height: 44px;
	margin: 0;
	cursor: pointer;
	font-size: 16px;
	font-weight: 400;
}
.gcf-check input { position: absolute; opacity: 0; width: 20px; height: 20px; margin: 0; }
.gcf-check__box {
	flex: none;
	width: 20px;
	height: 20px;
	border: 1.5px solid #8A8580;
	border-radius: 5px;
	background: #fff;
	transition: background-color .15s ease, border-color .15s ease;
}
.gcf-check input:checked + .gcf-check__box {
	border-color: var(--gcf-red-ui);
	background: var(--gcf-red-ui) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='m5 12.5 4.5 4.5L19 7.5' fill='none' stroke='%23fff' stroke-width='2.6'/%3E%3C/svg%3E") center / 16px no-repeat;
}
.gcf-check input:focus-visible + .gcf-check__box { box-shadow: var(--gcf-focus); }
.gcf-check:hover .gcf-check__box { border-color: var(--gcf-red-ui); }
.gcf-check__label { flex: 1; }
.gcf-check__count { color: var(--gcf-grey); font-size: 14px; }

/* Price */
.gcf-filters__price { clear: both; display: flex; flex-wrap: wrap; align-items: flex-end; gap: 8px; }
.gcf-filters__price label { flex: 1 1 70px; margin: 0; }
.gcf-filters__price label span { display: block; margin: 0 0 4px; color: var(--gcf-grey); font-size: 13px; font-weight: 400; }
html body .gcf-filters__price input {
	width: 100%;
	min-height: 44px;
	padding: 0 10px;
	border: 1px solid #CFCBC5;
	border-radius: 10px;
	background: #fff;
	color: #1E1E1E;
	font-size: 16px;
}
.gcf-filters__dash { padding-bottom: 12px; color: var(--gcf-grey); }
.gcf-filters__apply-price,
.gcf-filters__submit {
	min-height: 44px;
	padding: 0 18px;
	border: 0;
	border-radius: 999px;
	background: #1E1E1E;
	color: #fff;
	font-family: var(--gcf-font);
	font-size: 15px;
	font-weight: 600;
	cursor: pointer;
}
.gcf-filters__apply-price { flex: 1 0 100%; }
.gcf-filters__apply-price:hover { background: var(--gcf-red-ui); }

.gcf-filters__actions { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 18px; padding: 18px 0 0; border-top: 1px solid var(--gcf-line); }
.gcf-filters__submit { display: none; background: var(--gcf-red-ui); }
.gcf-filters__submit:hover { background: var(--gcf-red-dark); }
.gcf-filters__clear { color: #1E1E1E; font-size: 15px; font-weight: 600; }
.gcf-filters__clear:hover { color: var(--gcf-red-ui); }
.gcf-filters__overlay { display: none; }

/* Without JS, desktop needs the submit button too. */
html:not(.gcf-js) .gcf-filters__submit { display: inline-block; }

/* --------------------------------------------------------------------------
   Phones and tablets: slide-in panel
   -------------------------------------------------------------------------- */
@media (max-width: 1023.98px) {
	.gcf-shop__filter-btn { display: inline-flex; }
	.gcf-shop__count { flex: 1 0 100%; order: 3; margin: 0; }
	.gcf-shop__sort { margin-left: auto; }
	.gcf-shop__sort label { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }

	.gcf-filters {
		position: fixed;
		z-index: 100000;
		top: 0;
		bottom: 0;
		left: 0;
		display: flex;
		flex-direction: column;
		width: min(88vw, 380px);
		background: #fff;
		box-shadow: 0 0 40px rgba(0, 0, 0, .25);
		transform: translateX(-105%);
		visibility: hidden;
		transition: transform .28s ease, visibility 0s linear .28s;
	}
	.gcf-filters.is-open { transform: none; visibility: visible; transition: transform .28s ease; }
	.gcf-filters__head { flex: none; margin: 0; padding: 12px 12px 12px 20px; border-bottom: 1px solid var(--gcf-line); }
	.gcf-filters__close {
		display: grid;
		place-items: center;
		width: 44px;
		height: 44px;
		border: 0;
		border-radius: 50%;
		background: transparent;
		color: #1E1E1E;
		cursor: pointer;
	}
	.gcf-filters__close svg { width: 22px; height: 22px; }
	.gcf-filters__close:hover { background: #F0EEEB; }
	.gcf-filters__form { flex: 1; display: flex; flex-direction: column; min-height: 0; }
	.gcf-filters__form > .gcf-filters__group { padding: 18px 20px; }
	.gcf-filters__form > .gcf-filters__group:first-of-type { border-top: 0; }
	.gcf-filters__group--price { margin-bottom: auto; }
	.gcf-filters__apply-price { display: none; } /* "Show results" applies everything */
	.gcf-filters__actions {
		position: sticky;
		bottom: 0;
		padding: 14px 20px calc(14px + env(safe-area-inset-bottom));
		background: #fff;
	}
	.gcf-filters__submit { display: inline-block; flex: 1; }
	.gcf-filters__form { overflow-y: auto; overscroll-behavior: contain; }

	.gcf-filters__overlay:not([hidden]) {
		display: block;
		position: fixed;
		z-index: 99999;
		inset: 0;
		background: rgba(20, 20, 20, .5);
	}
	html.gcf-filters-open,
	html.gcf-filters-open body { overflow: hidden; }
	/* Admin bar on phones sits above the page; keep the panel under it. */
	body.admin-bar .gcf-filters { top: 46px; }
}
@media (min-width: 783px) and (max-width: 1023.98px) {
	body.admin-bar .gcf-filters { top: 32px; }
}

@media (prefers-reduced-motion: reduce) {
	.gcf-filters,
	.gcf-filters.is-open,
	.gcf-check__box { transition: none; }
}
