/* ==========================================================================
   Wyszukiwarka zapachów Insity
   Mobile first: style bazowe = telefon, większe ekrany w @media (min-width…).
   Kolory i typografia jak w motywie sklepu insity.pl (Minimog).
   ========================================================================== */

:root {
	--ink: #1d1d1b;
	--heading: #000;
	--text: #5d5d5d;
	--muted: #919191;
	--line: #eee;
	--line-strong: #d8d7d5;
	--soft: #f8f8f8;
	--radius: 5px;
	--font-body: Karla, system-ui, -apple-system, "Segoe UI", sans-serif;
	--font-heading: Lora, Georgia, serif;
	--font-bar: Jost, var(--font-body);
	--gutter: 16px;
}

*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

html,
body { overflow-x: clip; }

body {
	margin: 0;
	background: #fff;
	color: var(--ink);
	font: 400 16px/1.6 var(--font-body);
	-webkit-font-smoothing: antialiased;
}

a { color: inherit; }
img { max-width: 100%; }
[hidden] { display: none !important; }

button {
	font: inherit;
	color: inherit;
}

:focus-visible {
	outline: 2px solid #000;
	outline-offset: 2px;
}

.container-wide {
	width: 100%;
	margin: 0 auto;
	padding: 0 var(--gutter);
}

/* ── Górny pasek (1:1 z insity.pl, ukryty na telefonie) ─────────────── */

.page-top-bar {
	display: none;
	min-height: 40px;
	padding: 7px 0 2px;
	border-bottom: 1px solid var(--line);
	background: #fff;
	color: var(--ink);
	font: 500 15px/26px var(--font-bar);
}

.page-top-bar a {
	color: var(--ink);
	text-decoration: none;
	transition: color .25s cubic-bezier(.645, .045, .355, 1);
}

.page-top-bar a:hover,
.page-top-bar a:focus { color: #999; }

.page-top-bar ul {
	list-style: none;
	margin: 0 0 5px;
	padding: 0;
}

.top-bar-row { display: flex; align-items: center; gap: 24px; }
.top-bar-left, .top-bar-right { flex: 1 1 0; white-space: nowrap; }
.top-bar-center { flex: 0 1 auto; text-align: center; margin-bottom: 5px; }
.top-bar-right { text-align: end; }
.page-top-bar .menu { display: inline-flex; gap: 0 30px; }

/* ── Nagłówek i wyszukiwanie ─────────────────────────────────────────── */

.site-header {
	padding: 20px var(--gutter) 16px;
	text-align: center;
}

.logo {
	position: relative;
	display: inline-block;
	width: 150px;
}

.logo img { display: block; width: 100%; height: auto; }

.logo::after {
	content: "®";
	position: absolute;
	top: 0;
	right: -10px;
	font: 700 8px/1 var(--font-body);
	color: #000;
}

.page-title {
	margin: 14px 0 16px;
	color: var(--heading);
	font: 400 24px/1.2 var(--font-heading);
}

.search {
	display: grid;
	grid-template-columns: 1fr auto;
	gap: 8px;
	max-width: 720px;
	margin: 0 auto;
}

.search-field { position: relative; }

.search-field input {
	width: 100%;
	height: 48px;
	padding: 0 14px 0 44px;
	border: 1px solid var(--line-strong);
	border-radius: var(--radius);
	background: #fff;
	color: #000;
	font: 300 16px var(--font-body); /* 16px = brak auto-zoomu na iOS */
	-webkit-appearance: none;
	appearance: none;
}

.search-field input:focus {
	border-color: #000;
	outline: none;
}

.search-field input::placeholder { color: var(--muted); }

/* X do czyszczenia pola – czarny, w stylu strony (zamiast niebieskiego z przeglądarki) */
.search-field input::-webkit-search-cancel-button {
	-webkit-appearance: none;
	appearance: none;
	width: 18px;
	height: 18px;
	margin-left: 8px;
	background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2.2' stroke-linecap='round'%3E%3Cpath d='M6 6l12 12M18 6 6 18'/%3E%3C/svg%3E") center / contain no-repeat;
	cursor: pointer;
}

.search-icon {
	position: absolute;
	top: 50%;
	left: 14px;
	width: 20px;
	height: 20px;
	transform: translateY(-50%);
	fill: none;
	stroke: var(--muted);
	stroke-width: 2;
	stroke-linecap: round;
	pointer-events: none;
}

.search-submit,
.filters-toggle,
.button-primary,
.button-secondary {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 8px;
	height: 48px;
	padding: 0 18px;
	border: 1px solid #000;
	border-radius: var(--radius);
	font-weight: 500;
	font-size: 16px;
	text-decoration: none;
	cursor: pointer;
	transition: background .2s, color .2s;
}

.search-submit,
.button-primary { background: #000; color: #fff; }

.search-submit { display: none; } /* telefon: wyszukiwanie na żywo, Enter wystarcza */

.search-submit:hover,
.button-primary:hover { background: #fff; color: #000; }

.filters-toggle,
.button-secondary { background: #fff; color: #000; }

.filters-toggle svg,
.icon-button svg {
	width: 20px;
	height: 20px;
	fill: none;
	stroke: currentColor;
	stroke-width: 2;
	stroke-linecap: round;
}

.filters-count {
	min-width: 20px;
	height: 20px;
	padding: 0 6px;
	border-radius: 10px;
	background: #000;
	color: #fff;
	font-size: 12px;
	line-height: 20px;
}

/* ── Filtry: na telefonie panel wysuwany od dołu ─────────────────────── */

.backdrop {
	position: fixed;
	inset: 0;
	z-index: 90;
	background: rgba(0, 0, 0, .4);
}

/* Telefon/tablet: pływająca karta z marginesami 15px; za wysoka – przewija się w środku */
.filters {
	position: fixed;
	left: 15px;
	right: 15px;
	bottom: calc(15px + env(safe-area-inset-bottom));
	z-index: 100;
	max-width: 680px;
	margin: 0 auto;
	max-height: calc(100vh - 30px);
	max-height: calc(100dvh - 30px);
	overflow-y: auto;
	overscroll-behavior: contain;
	padding: 0 16px;
	border-radius: 16px;
	background: #fff;
	box-shadow: 0 12px 40px rgba(0, 0, 0, .2);
	transform: translateY(calc(100% + 30px));
	visibility: hidden;
	transition: transform .3s ease, visibility 0s linear .3s;
}

.filters.is-open {
	transform: translateY(0);
	visibility: visible;
	transition: transform .3s ease;
}

.filters-head,
.filters-foot {
	position: sticky;
	z-index: 2;
	display: flex;
	align-items: center;
	gap: 10px;
	background: #fff;
}

.filters-head {
	top: 0;
	justify-content: space-between;
	padding: 16px 0 8px;
}

.filters-head h2 {
	margin: 0;
	font: 400 22px/1.2 var(--font-heading);
	color: var(--heading);
}

/* Kwadratowy przycisk z ikoną (X) – ikona idealnie na środku */
.icon-button {
	display: inline-grid;
	place-items: center;
	flex: none;
	width: 40px;
	height: 40px;
	padding: 0;
	border: 1px solid var(--line);
	border-radius: var(--radius);
	background: var(--soft);
	color: #000;
	cursor: pointer;
	transition: border-color .2s, background-color .2s;
}

.icon-button:hover { border-color: #000; background: #fff; }
.icon-button svg { display: block; }

.filters-foot {
	bottom: 0;
	padding: 12px 0 16px;
	border-top: 1px solid var(--line);
}

.filters-foot > * { flex: 1; white-space: nowrap; padding: 0 12px; }
.filters-foot .button-secondary { flex: 0 0 auto; padding: 0 18px; }

.filter-group h3 {
	margin: 12px 0 10px;
	color: var(--heading);
	font: 500 13px/1.2 var(--font-body);
	letter-spacing: .08em;
	text-transform: uppercase;
}

.filter-group ul {
	list-style: none;
	margin: 0 0 12px;
	padding: 0;
}

.filter-moods ul {
	display: grid;
	/* minmax(0, 1fr) = równe kolumny, nawet gdy podpis ma długie słowo („Spontaniczność”) */
	grid-template-columns: repeat(4, minmax(0, 1fr));
	gap: 14px 6px;
}

.filter {
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 6px;
	color: var(--text);
	text-decoration: none;
	font-size: 12px;
	line-height: 1.25;
	text-align: center;
	-webkit-tap-highlight-color: transparent;
}

.mood-tile span {
	font-size: 11px;
	letter-spacing: -.01em;
	white-space: nowrap; /* linie dzielone przed „i” w HTML */
}

@media (max-width: 374px) {
	.mood-tile span { font-size: 10px; }
}

.mood-tile img {
	display: block;
	width: 100%;
	max-width: 72px;
	height: auto;
	aspect-ratio: 1;
	object-fit: cover;
	border-radius: 9px;
	transition: transform .2s, box-shadow .2s;
}

.filter[aria-pressed="true"] { color: #000; font-weight: 700; }

.mood-tile[aria-pressed="true"] img {
	box-shadow: 0 0 0 2px #fff, 0 0 0 4px #000;
}

.filter-categories ul {
	display: flex;
	flex-wrap: wrap;
	gap: 10px;
}

.filter-categories li.main { flex: 1 1 calc(50% - 5px); }
.filter-categories li.letter { flex: 1 1 calc(33.333% - 7px); }

.cat-tile {
	height: 100%;
	justify-content: center;
	padding: 10px 6px;
	border: 1px solid var(--line-strong);
	border-radius: 9px;
	color: #000;
}

.cat-word {
	font: 400 20px/1.2 var(--font-heading);
}

.cat-letter {
	font: 400 40px/1 var(--font-heading);
}

.cat-name { font-size: 12px; color: var(--text); }

.cat-tile[aria-pressed="true"] {
	border-color: #000;
	box-shadow: inset 0 0 0 1px #000;
}

/* Złote / srebrne / czarne litery kategorii – jak dotąd */
.text-gold-gradient,
.cat-icon.is-women {
	background: linear-gradient(45deg, #B8860B, #D4AF37, #8B7500);
	-webkit-background-clip: text;
	background-clip: text;
	-webkit-text-fill-color: transparent;
}

.text-silver-gradient,
.cat-icon.is-men {
	background: linear-gradient(45deg, #8f9094, #C0C0C0, #7d7d7d);
	-webkit-background-clip: text;
	background-clip: text;
	-webkit-text-fill-color: transparent;
}

.text-black-gradient,
.cat-icon.is-unisex {
	background: linear-gradient(45deg, #000, #1a1a1a, #404040, #1a1a1a, #000);
	-webkit-background-clip: text;
	background-clip: text;
	-webkit-text-fill-color: transparent;
}

/* ── Wyniki i tabela ─────────────────────────────────────────────────── */

.results { padding-bottom: 112px; } /* miejsce na pływający przycisk koszyka */

.results-head {
	display: flex;
	align-items: baseline;
	justify-content: space-between;
	gap: 12px;
	margin: 8px 0 12px;
}

.results-title {
	margin: 0;
	color: var(--heading);
	font: 400 20px/1.2 var(--font-heading);
}

.results-count {
	margin: 0;
	color: var(--muted);
	font-size: 14px;
	white-space: nowrap;
}

.perfumes {
	width: 100%;
	border-collapse: separate;
	border-spacing: 0;
	font-size: 15px;
	line-height: 1.35;
}

/* Czarny pasek z tytułami kolumn „jedzie” razem z przewijaniem */
.perfumes thead th {
	position: sticky;
	top: 0;
	z-index: 5;
	padding: 0;
	background: #000;
	color: #fff;
	font-weight: 500;
	font-size: 13px;
	text-align: left;
	white-space: nowrap;
}

/* Każda komórka jest osobną warstwą (sticky) – przy ułamkowych szerokościach kolumn
   między nimi potrafiła prześwitywać biała kreska. Czarny cień w lewo zakrywa szczelinę. */
.perfumes thead th + th { box-shadow: -1px 0 0 #000; }

.perfumes thead th:first-child { border-top-left-radius: var(--radius); }
.perfumes thead th:last-child { border-top-right-radius: var(--radius); }
/* Przyklejony nagłówek: zaokrąglenia płynnie znikają, a po powrocie wracają */
.perfumes thead th { transition: border-radius .25s ease; }
.perfumes.is-stuck thead th { border-radius: 0; }
.sticky-sentinel { height: 1px; margin-bottom: -1px; }

.sort {
	display: flex;
	align-items: center;
	gap: 6px;
	padding: 12px 6px;
	color: #fff;
	text-decoration: none;
	cursor: pointer;
	-webkit-tap-highlight-color: transparent;
}

.sort:hover span:first-child { text-decoration: underline; text-underline-offset: 3px; }
.sort:focus-visible { outline-color: #fff; outline-offset: -4px; }

/* Strzałki sortowania: ▲ A→Z, ▼ Z→A, nieaktywne – obie przygaszone */
.sort-icon {
	display: inline-flex;
	flex-direction: column;
	gap: 2px;
}

.sort-icon::before,
.sort-icon::after {
	content: "";
	border-left: 4px solid transparent;
	border-right: 4px solid transparent;
	opacity: .35;
}

.sort-icon::before { border-bottom: 5px solid currentColor; }
.sort-icon::after { border-top: 5px solid currentColor; }

th[aria-sort="ascending"] .sort-icon::before,
th[aria-sort="descending"] .sort-icon::after { opacity: 1; }

/* Na telefonie nagłówki nastroju i kategorii skrócone do ikon-kolumn */
.col-mood .sort span:first-child,
.col-category .sort span:first-child,
.col-name .sort span:first-child,
.col-inspiration .sort span:first-child {
	font-size: 0;
}

.col-mood .sort span:first-child::before { content: "Nastr."; font-size: 13px; }
.col-category .sort span:first-child::before { content: "Kat."; font-size: 13px; }
.col-name .sort span:first-child::before { content: "Nazwa"; font-size: 13px; }
.col-inspiration .sort span:first-child::before { content: "Nuta inspiracji"; font-size: 13px; }

@media (max-width: 374px) {
	.col-inspiration .sort span:first-child::before { content: "Nuta insp."; }
}

.perfumes td {
	padding: 10px 4px;
	border-bottom: 1px solid var(--line);
	vertical-align: middle;
}

.perfumes tbody tr { transition: background-color .15s; }

@media (hover: hover) {
	.perfumes tbody tr:hover { background: var(--soft); }
}

td.col-name { white-space: nowrap; }

td.col-name a {
	color: #000;
	font-family: var(--font-heading);
	font-weight: 500;
	text-decoration: none;
}

td.col-name a:hover { text-decoration: underline; text-underline-offset: 3px; }

.title-brand { display: none; }

.stock-note {
	display: block;
	color: var(--muted);
	font-size: 11px;
	letter-spacing: .04em;
	text-transform: uppercase;
}

tr.is-out td,
tr.is-out .col-name a { color: var(--muted); }
tr.is-out img,
tr.is-out .cat-icon,
tr.is-out .dot { opacity: .5; }

.col-mood,
.col-category { width: 1%; }

.mood-text,
.category-text,
.insp-full { display: none; }

.mood-icon img {
	display: block;
	width: 28px;
	height: 28px;
	border-radius: 7px;
}

.category-icons {
	display: inline-flex;
	gap: 4px;
}

.cat-icon {
	display: inline-grid;
	place-items: center;
	width: 26px;
	height: 26px;
	border-radius: 6px;
	box-shadow: inset 0 0 0 1px #e2e2e2;
	font: 400 17px/1 var(--font-heading);
}

.cat-icon.is-niche {
	background: #000;
	color: #fff;
	box-shadow: none;
	font: 500 12px/1 var(--font-body);
	letter-spacing: .02em;
}

.col-inspiration { width: 60%; text-align: right; }
.perfumes th.col-inspiration .sort { justify-content: flex-end; }

.badge {
	display: inline-block;
	margin-left: 6px;
	padding: 2px 6px;
	border: 1px solid var(--ink);
	border-radius: 3px;
	font-size: 11px;
	font-weight: 500;
	letter-spacing: .06em;
	line-height: 1.3;
	text-transform: uppercase;
	vertical-align: 1px;
}

.empty-state {
	padding: 48px var(--gutter);
	color: var(--text);
	text-align: center;
}

/* ── Dymki (najechanie myszą / stuknięcie palcem) ────────────────────── */

.tip {
	position: relative;
	display: inline-flex;
	align-items: center;
	padding: 0;
	border: 0;
	background: none;
	text-align: inherit;
	cursor: pointer;
	-webkit-tap-highlight-color: transparent;
}

.insp-short {
	display: inline;
	font-size: inherit;
	line-height: inherit;
}

.tip.has-more {
	text-decoration: underline dotted var(--muted);
	text-underline-offset: 4px;
}

.tip-bubble {
	position: absolute;
	bottom: calc(100% + 8px);
	left: 50%;
	z-index: 20;
	padding: 6px 10px;
	border-radius: var(--radius);
	background: #000;
	color: #fff;
	font: 500 13px/1.3 var(--font-body);
	white-space: nowrap;
	opacity: 0;
	pointer-events: none;
	transform: translate(-50%, 4px);
	transition: opacity .15s, transform .15s;
}

.tip-bubble::after {
	content: "";
	position: absolute;
	top: 100%;
	left: 50%;
	margin-left: -5px;
	border: 5px solid transparent;
	border-top-color: #000;
}

/* Dymek przy prawej krawędzi ekranu – wyrównany do prawej */
.insp-short .tip-bubble { left: auto; right: 0; transform: translateY(4px); }
.insp-short .tip-bubble::after { left: auto; right: 14px; }

.tip.is-open .tip-bubble,
.tip:focus-visible .tip-bubble {
	opacity: 1;
	transform: translate(-50%, 0);
}

.insp-short.is-open .tip-bubble,
.insp-short:focus-visible .tip-bubble { transform: translateY(0); }

@media (hover: hover) {
	.tip:hover .tip-bubble { opacity: 1; transform: translate(-50%, 0); }
	.insp-short:hover .tip-bubble { transform: translateY(0); }
}

/* ==========================================================================
   Tablet (od 768px)
   ========================================================================== */

@media (min-width: 768px) {
	:root { --gutter: 24px; }


	.site-header { padding: 40px var(--gutter) 28px; }
	.logo { width: 260px; }
	.logo::after { top: 2px; font-size: 10px; }
	.page-title { font-size: 34px; margin: 22px 0 22px; }

	.title-brand { display: inline; }

	.perfumes td { padding: 12px 12px; }
	.sort { padding: 14px 12px; font-size: 14px; }
}

/* ==========================================================================
   Komputer (od 1024px): filtry na stałe nad tabelą, kolumny słownie
   ========================================================================== */

@media (min-width: 1024px) {
	/* Górny pasek – od 1024px (węższe ekrany łamią jego 3 kolumny) */
	.page-top-bar { display: block; }

	.search { grid-template-columns: 1fr auto; }
	.search-submit { display: inline-flex; }
	.filters-toggle,
	.filters .icon-button,
	.filters-foot { display: none !important; }

	.filters-head {
		position: absolute;
		width: 1px;
		height: 1px;
		overflow: hidden;
		clip: rect(0 0 0 0);
		white-space: nowrap;
	}

	.filters {
		position: static;
		max-width: none;
		max-height: none;
		overflow: visible;
		margin: 0 0 36px;
		padding: 28px 36px 30px;
		border-radius: 12px;
		background: var(--soft);
		box-shadow: none;
		transform: none;
		visibility: visible;
		transition: none;
	}

	/* 1/2 Nastrój | 1/2 Kategoria, pod spodem Nuty na całą szerokość (od 1500px – 3 kolumny) */
	.filters {
		--tile: 96px;      /* szerokość kafelka nastroju */
		--tile-h: 140px;   /* kafelek + 2 linie podpisu – ta sama wysokość mają kafelki kategorii */
		--row-gap: 18px;
	}

	.filters-grid {
		display: grid;
		grid-template-columns: 1fr 1fr;
		gap: 28px 40px; /* 4 kafelki × 96px + odstępy mieszczą się w połowie już od 1024px */
	}

	.filter-notes { grid-column: 1 / -1; }

	.filter-group h3 {
		margin: 0 0 14px;
		font: 500 20px/1.2 var(--font-heading);
		letter-spacing: 0;
		text-transform: none;
	}

	.filter-group ul { margin: 0; }
	.filter,
	.mood-tile span { font-size: 13px; letter-spacing: 0; }

	/* Pierwszy kafelek równo z napisem „Nastrój”, ostatni przy prawej krawędzi, równe odstępy */
	.filter-moods ul {
		grid-template-columns: repeat(4, var(--tile));
		grid-auto-rows: var(--tile-h);
		justify-content: space-between;
		gap: var(--row-gap) 12px;
	}

	.mood-tile { width: var(--tile); height: 100%; justify-content: flex-start; }
	.mood-tile img { width: var(--tile); max-width: none; }

	/* Kategoria: rzędy tej samej wysokości co rzędy nastrojów */
	.filter-categories ul {
		display: grid;
		grid-template-columns: repeat(6, 1fr);
		grid-auto-rows: var(--tile-h);
		gap: var(--row-gap) 12px;
	}

	.filter-categories li.main { grid-column: span 3; }
	.filter-categories li.letter { grid-column: span 2; }

	.cat-tile { background: #fff; }
	.cat-word { font-size: 22px; }
	.cat-letter { font-size: 44px; }

	/* Kolumny tekstowe zamiast ikon */
	.mood-text,
	.category-text,
	.insp-full { display: inline; }

	.mood-icon,
	.category-icons,
	.insp-short { display: none; }

	.perfumes .sort span:first-child { font-size: inherit; }
	.perfumes .sort span:first-child::before { content: none; }

	.col-mood,
	.col-category { text-align: left; width: auto; white-space: nowrap; }
	.col-inspiration { width: auto; }

	.mood-text {
		display: inline-flex;
		align-items: center;
		gap: 8px;
	}

	.dot {
		width: 10px;
		height: 10px;
		flex: none;
		border-radius: 50%;
		background: var(--mood);
	}

	.brand { color: var(--muted); }
}



@media (min-width: 1200px) {
	:root { --gutter: 50px; }
	.container-wide { max-width: 1720px; }
}

@media (prefers-reduced-motion: reduce) {
	*, *::before, *::after { transition: none !important; }
}

/* ==========================================================================
   Nuty zapachowe – filtr w formie „chipsów”
   ========================================================================== */

.filter-notes ul {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
}

.note-chip {
	display: inline-flex;
	flex-direction: row;
	padding: 7px 14px;
	border: 1px solid var(--line-strong);
	border-radius: var(--radius);
	background: #fff;
	color: var(--ink);
	font-size: 14px;
	line-height: 1.2;
	transition: border-color .2s, background-color .2s, color .2s;
}

.note-chip:hover { border-color: #000; }

.note-chip[aria-pressed="true"] {
	border-color: #000;
	background: #000;
	color: #fff;
	font-weight: 500;
}

.visually-hidden {
	position: absolute !important;
	width: 1px;
	height: 1px;
	overflow: hidden;
	clip: rect(0 0 0 0);
	white-space: nowrap;
}

/* ==========================================================================
   Szybki koszyk – kolumna w tabeli
   ========================================================================== */

.col-cart { width: 1%; text-align: center; }

.perfumes th.col-cart,
.perfumes td.col-cart { padding-left: 4px; padding-right: 4px; text-align: center; }
.perfumes th.col-cart .cart-svg { display: block; margin: 0 auto; }

.cart-svg,
.add-to-cart svg,
.cart-fab-button svg {
	width: 20px;
	height: 20px;
	fill: none;
	stroke: currentColor;
	stroke-width: 1.7;
	stroke-linecap: round;
	stroke-linejoin: round;
	vertical-align: middle;
}

.add-to-cart {
	display: inline-grid;
	place-items: center;
	width: 34px;
	height: 34px;
	border: 1px solid var(--line-strong);
	border-radius: 9px;
	background: #fff;
	color: #000;
	cursor: pointer;
	transition: background-color .2s, color .2s, border-color .2s, transform .15s;
	-webkit-tap-highlight-color: transparent;
}

.add-to-cart:hover {
	border-color: #000;
	background: #000;
	color: #fff;
}

.add-to-cart:active { transform: scale(.94); }

/* ==========================================================================
   Okienka (wybór rozmiaru, mini koszyk): telefon – od dołu, komputer – na środku
   ========================================================================== */

.sheet {
	position: fixed;
	left: 15px;
	right: 15px;
	bottom: calc(15px + env(safe-area-inset-bottom));
	z-index: 100;
	max-height: calc(100vh - 30px);
	max-height: calc(100dvh - 30px);
	overflow-y: auto;
	overscroll-behavior: contain;
	padding: 0 16px 16px;
	border-radius: 16px;
	background: #fff;
	box-shadow: 0 12px 40px rgba(0, 0, 0, .2);
	transform: translateY(calc(100% + 30px));
	transition: transform .3s ease, opacity .3s ease;
}

.sheet.is-open { transform: translateY(0); }
.sheet:focus { outline: none; }

.sheet-head,
.sheet-foot {
	position: sticky;
	z-index: 2;
	display: flex;
	align-items: center;
	gap: 12px;
	background: #fff;
}

.sheet-head {
	top: 0;
	justify-content: space-between;
	padding: 16px 0 12px;
}

.sheet-head h2 {
	margin: 0;
	color: var(--heading);
	font: 400 22px/1.2 var(--font-heading);
}

.sheet-sub {
	margin: 4px 0 0;
	color: var(--muted);
	font-size: 14px;
}

.sheet-foot {
	bottom: 0;
	padding: 14px 0 4px;
	border-top: 1px solid var(--line);
}

.sheet-foot > * { flex: 1; }

/* Kafelki pojemności – kolejność jak na stronie produktu (od 100 ml) */
.sizes {
	display: grid;
	grid-template-columns: repeat(3, 1fr);
	gap: 10px;
	padding: 4px 0 12px;
}

.size-tile {
	position: relative;
	display: grid;
	place-items: center;
	aspect-ratio: 1;
	border: 1px solid var(--line-strong);
	border-radius: 9px;
	background: #fff;
	color: #000;
	cursor: pointer;
	transition: border-color .2s, box-shadow .2s, transform .15s;
	-webkit-tap-highlight-color: transparent;
}

.size-tile:hover { border-color: #000; box-shadow: inset 0 0 0 1px #000; }
.size-tile:active { transform: scale(.96); }

.size-ml { position: relative; z-index: 1; font: 400 20px/1 var(--font-heading); }

/* Niedostępna pojemność: wyszarzona + czerwony X w kolorze dopasowanym do marki */
.size-tile.is-out {
	border-color: var(--line);
	background: var(--soft);
	color: #9a9a9a;
	cursor: not-allowed;
}

.size-tile.is-out:hover { box-shadow: none; }

.size-x {
	position: absolute;
	inset: 22%;
	width: 56%;
	height: 56%;
	fill: none;
	stroke: #b8433a;
	stroke-width: 1.2;
	stroke-linecap: round;
	opacity: .55;
}

.size-badge {
	position: absolute;
	top: 6px;
	right: 6px;
	padding: 1px 6px;
	border-radius: 10px;
	background: #000;
	color: #fff;
	font-size: 11px;
	font-weight: 500;
}

/* Lista w mini koszyku */
.cart-list {
	list-style: none;
	margin: 0;
	padding: 0;
}

.cart-item {
	display: grid;
	grid-template-columns: 1fr auto auto;
	align-items: center;
	gap: 10px;
	padding: 12px 0;
	border-bottom: 1px solid var(--line);
}

.cart-item:last-child { border-bottom: 0; }

.cart-item strong {
	color: #000;
	font: 500 16px/1.3 var(--font-heading);
}

.cart-item-size { font-weight: 500; }

.cart-item-insp {
	display: block;
	color: var(--muted);
	font-size: 13px;
}

.qty {
	display: inline-flex;
	align-items: center;
	border: 1px solid var(--line-strong);
	border-radius: var(--radius);
}

.qty-btn {
	width: 32px;
	height: 32px;
	border: 0;
	background: none;
	font-size: 18px;
	cursor: pointer;
}

.qty-btn:disabled { color: #ccc; cursor: not-allowed; }

.qty-value {
	min-width: 22px;
	text-align: center;
	font-weight: 500;
}

.cart-item .icon-button.remove {
	width: 34px;
	height: 34px;
}

/* ==========================================================================
   Pływający przycisk mini koszyka (prawy dolny róg)
   ========================================================================== */

.cart-fab {
	position: fixed;
	right: max(16px, env(safe-area-inset-right));
	bottom: max(16px, env(safe-area-inset-bottom));
	z-index: 80;
	display: flex;
	align-items: center;
	gap: 10px;
	animation: fab-in .35s ease;
}

@keyframes fab-in {
	from { transform: translateY(20px) scale(.9); opacity: 0; }
}

.cart-fab-button {
	position: relative;
	display: grid;
	place-items: center;
	width: 58px;
	height: 58px;
	border: 0;
	border-radius: 50%;
	background: #000;
	color: #fff;
	box-shadow: 0 8px 24px rgba(0, 0, 0, .22);
	cursor: pointer;
	transition: transform .2s;
}

.cart-fab-button svg { width: 24px; height: 24px; }
.cart-fab-button:hover { transform: scale(1.05); }

.cart-fab-count {
	position: absolute;
	top: -4px;
	right: -4px;
	min-width: 22px;
	height: 22px;
	padding: 0 6px;
	border: 2px solid #fff;
	border-radius: 11px;
	background: #b8433a;
	color: #fff;
	font-size: 12px;
	font-weight: 700;
	line-height: 18px;
	text-align: center;
}

/* „Dodaj do koszyka” wysuwa się od lewej po najechaniu na ikonę (mysz) */
.cart-fab-transfer {
	padding: 12px 18px;
	border-radius: var(--radius);
	background: #000;
	color: #fff;
	font-weight: 500;
	text-decoration: none;
	white-space: nowrap;
	box-shadow: 0 8px 24px rgba(0, 0, 0, .18);
	opacity: 0;
	pointer-events: none;
	transform: translateX(-24px);
	transition: opacity .25s ease, transform .3s cubic-bezier(.2, .8, .2, 1);
}

@media (hover: hover) {
	.cart-fab:hover .cart-fab-transfer,
	.cart-fab:focus-within .cart-fab-transfer {
		opacity: 1;
		pointer-events: auto;
		transform: translateX(0);
	}
}

.cart-fab-transfer:hover { background: #333; color: #fff; }

/* ==========================================================================
   Powiadomienie
   ========================================================================== */

.toast {
	position: fixed;
	left: 50%;
	bottom: calc(90px + env(safe-area-inset-bottom));
	z-index: 120;
	max-width: calc(100% - 32px);
	padding: 12px 18px;
	border-radius: var(--radius);
	background: #000;
	color: #fff;
	font-size: 14px;
	box-shadow: 0 8px 24px rgba(0, 0, 0, .2);
	opacity: 0;
	transform: translate(-50%, 12px);
	transition: opacity .25s, transform .25s;
}

.toast.is-visible { opacity: 1; transform: translate(-50%, 0); }

/* Komputer: okienka na środku ekranu, 6 pojemności w rzędzie */
@media (min-width: 768px) {
	.sheet {
		left: 50%;
		right: auto;
		top: 50%;
		bottom: auto;
		width: min(600px, calc(100% - 48px));
		max-height: 80vh;
		padding: 0 28px 24px;
		border-radius: 12px;
		box-shadow: 0 20px 60px rgba(0, 0, 0, .2);
		opacity: 0;
		transform: translate(-50%, -46%);
	}

	.sheet.is-open { opacity: 1; transform: translate(-50%, -50%); }

	.sizes { grid-template-columns: repeat(6, 1fr); }
	.size-ml { font-size: 17px; }
	.cart-fab { right: 28px; bottom: 28px; }
}

/* Filtr, który przy obecnych wyborach nic by nie znalazł – wyszarzony i nieklikalny */
.filter.is-disabled {
	opacity: .35;
	cursor: default;
	pointer-events: none;
}

.mood-tile.is-disabled img { filter: grayscale(1); }

/* Duży ekran: trzy równe kolumny – Nastrój | Kategoria | Nuty zapachowe */
@media (min-width: 1500px) {
	.filters { --tile: 84px; --tile-h: 128px; }
	.filters-grid { grid-template-columns: repeat(3, 1fr); gap: 28px 48px; }
	.filter-notes { grid-column: auto; }
}
