/*//////////////////////////////////////////////////////////////////
[ Storefront filter chips — tek standart ]
  Anasayfa ürün filtreleri, kategori sayfası, QR menü.
  Kaynak: QR menü horizontal chip rail.
//////////////////////////////////////////////////////////////////*/

.sf-filter-chips {
	position: relative;
	margin: 0 0 1.25rem;
	padding: 0;
}

.sf-filter-chips--sticky {
	position: sticky;
	top: 0;
	top: env(safe-area-inset-top, 0px);
	z-index: 40;
	margin: 0 0 1.15rem;
	padding: 0.7rem 0;
	background: #fff;
	border-bottom: 0;
	box-shadow: none;
}

/* Eski home-produces chrome: ok / hint / fade / border — kapalı */
.sf-filter-chips.home-produces-filter-wrap,
.sf-filter-chips.home-produces-filter-wrap.has-overflow,
.sf-filter-chips.home-produces-filter-wrap.has-overflow-start,
.sf-filter-chips.home-produces-filter-wrap.has-overflow-end {
	display: block;
}

.sf-filter-chips .home-produces-filter-nav,
.sf-filter-chips .home-produces-filter-hint,
.sf-filter-chips.home-produces-filter-wrap::before,
.sf-filter-chips.home-produces-filter-wrap::after,
.sf-filter-chips.home-produces-filter-wrap.has-overflow::before,
.sf-filter-chips.home-produces-filter-wrap.has-overflow::after,
.sf-filter-chips.home-produces-filter-wrap.has-overflow-start::before,
.sf-filter-chips.home-produces-filter-wrap.has-overflow-end::after {
	display: none !important;
	content: none !important;
}

.sf-filter-chips__rail,
.sf-filter-chips .home-produces-filter-scroll {
	display: flex;
	flex-wrap: nowrap;
	align-items: center;
	gap: 0.5rem;
	overflow-x: auto;
	overflow-y: hidden;
	-webkit-overflow-scrolling: touch;
	scroll-snap-type: x proximity;
	padding: 2px 2px 4px;
	margin: 0;
	border: 0;
	border-bottom: 0 !important;
	scrollbar-width: none;
	overscroll-behavior-x: contain;
	touch-action: pan-x pan-y;
	scroll-padding-inline: 0.25rem;
}

.sf-filter-chips__rail::-webkit-scrollbar,
.sf-filter-chips .home-produces-filter-scroll::-webkit-scrollbar {
	display: none;
	height: 0;
}

/* Track opsiyonel: chip’ler rail’e doğrudan da konabilir (QR). */
.sf-filter-chips__track,
.sf-filter-chips .home-produces-filter-group,
.sf-filter-chips .filter-tope-group {
	display: flex;
	flex-wrap: nowrap;
	align-items: center;
	gap: 0.5rem;
	flex: 0 0 auto;
	min-width: min-content;
	width: max-content;
	max-width: none;
	padding: 0;
	margin: 0;
}

/* Idle chip — hover/focus ASLA selected ile aynı görünmesin (mobil sticky :hover çift seçili bug) */
.sf-filter-chips__chip,
a.sf-filter-chips__chip,
button.sf-filter-chips__chip,
.sf-filter-chips .home-produces-filter-btn,
.category-page .sf-filter-chips .home-produces-filter-btn,
.category-page .sf-filter-chips .filter-tope-group button.home-produces-filter-btn {
	flex: 0 0 auto;
	scroll-snap-align: start;
	display: inline-flex;
	align-items: center;
	gap: 0.28rem;
	max-width: min(72vw, 16rem);
	min-height: 38px;
	margin: 0 !important;
	padding: 0.42rem 0.95rem !important;
	border-radius: 999px !important;
	border: 1px solid color-mix(in srgb, var(--primary-color, #717fe0) 18%, #e2e8f0) !important;
	background: #fff !important;
	box-shadow: none !important;
	color: var(--primary-ink, #0f172a) !important;
	font-family: var(--main-font, Poppins, sans-serif);
	font-size: 0.8125rem !important;
	font-weight: 700 !important;
	letter-spacing: -0.01em !important;
	line-height: 1.2 !important;
	text-transform: none !important;
	text-decoration: none !important;
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
	cursor: pointer;
	-webkit-tap-highlight-color: transparent;
	touch-action: manipulation;
	transition: background 0.18s ease, border-color 0.18s ease, color 0.18s ease, box-shadow 0.18s ease;
}

.sf-filter-chips__chip::after,
.sf-filter-chips .home-produces-filter-btn::after {
	display: none !important;
	content: none !important;
}

/* Hover / klavye focus — hafif; selected değil */
.sf-filter-chips__chip:hover,
.sf-filter-chips__chip:focus-visible,
.sf-filter-chips .home-produces-filter-btn:hover,
.sf-filter-chips .home-produces-filter-btn:focus-visible,
.category-page .sf-filter-chips .filter-tope-group button.home-produces-filter-btn:hover,
.category-page .sf-filter-chips .filter-tope-group button.home-produces-filter-btn:focus-visible {
	background: color-mix(in srgb, var(--primary-color, #717fe0) 6%, #fff) !important;
	border-color: color-mix(in srgb, var(--primary-color, #717fe0) 28%, #e2e8f0) !important;
	color: var(--primary-ink, #0f172a) !important;
	box-shadow: none !important;
	outline: none;
}

/* Yalnız gerçek seçili — :focus / :hover selected sayılmaz */
.sf-filter-chips__chip.is-active,
.sf-filter-chips__chip.how-active1,
.sf-filter-chips .home-produces-filter-btn.is-active,
.sf-filter-chips .home-produces-filter-btn.how-active1,
.category-page .sf-filter-chips .home-produces-filter-btn.how-active1,
.category-page .sf-filter-chips .filter-tope-group button.home-produces-filter-btn.how-active1,
.category-page .sf-filter-chips .filter-tope-group button.home-produces-filter-btn.is-active {
	background: color-mix(in srgb, var(--primary-color, #717fe0) 18%, #fff) !important;
	border-color: color-mix(in srgb, var(--primary-color, #717fe0) 46%, #cbd5e1) !important;
	color: var(--primary-ink, var(--primary-color, #0f172a)) !important;
	box-shadow: 0 4px 14px -8px color-mix(in srgb, var(--primary-color, #717fe0) 55%, transparent) !important;
}

.sf-filter-chips__chip.is-active:hover,
.sf-filter-chips__chip.how-active1:hover,
.sf-filter-chips__chip.is-active:focus-visible,
.sf-filter-chips__chip.how-active1:focus-visible,
.sf-filter-chips .home-produces-filter-btn.how-active1:hover,
.sf-filter-chips .home-produces-filter-btn.how-active1:focus-visible,
.category-page .sf-filter-chips .filter-tope-group button.home-produces-filter-btn.how-active1:hover,
.category-page .sf-filter-chips .filter-tope-group button.home-produces-filter-btn.how-active1:focus-visible {
	background: color-mix(in srgb, var(--primary-color, #717fe0) 22%, #fff) !important;
	border-color: color-mix(in srgb, var(--primary-color, #717fe0) 52%, #cbd5e1) !important;
	outline: none;
}

.sf-filter-chips__count {
	font-weight: 700;
	opacity: 0.72;
}

/* Sticky bar: mobil .main-content overflow-x:hidden sticky’yi kırar */
@media (max-width: 767px) {
	.category-page .main-content.category-page-section,
	body.qr-menu-page .qr-menu.main-content {
		overflow: visible;
		overflow-x: visible;
		overflow-y: visible;
	}
}

@media (min-width: 992px) {
	.sf-filter-chips--sticky {
		top: 0;
	}
}
