/* Blok zooflip/favorite-pet — prosty, stopniowy (2-krokowy) wybór pupila i jego zakładki strony (/rasa/)
   Szerokość 1:1 z resztą sekcji strony głównej (1320px + boczny padding -> 1240px),
   świeży błękit ZooFlip (#e4f1fb), zero zmian tła i skali na :hover */

.favorite-pet-section {
	position: relative;
	padding: var(--content-gap, 2.75rem) 0;
	background: #ffffff;
	overflow-x: clip;
}

.favorite-pet-section__inner {
	max-width: min(100%, var(--content-max, 1320px));
	width: 100%;
	margin: 0 auto;
	padding-left: var(--content-pad, clamp(1rem, 3vw, 2.5rem));
	padding-right: var(--content-pad, clamp(1rem, 3vw, 2.5rem));
	box-sizing: border-box;
}

.zf-fav-pet {
	background: #e4f1fb;
	border: 0;
	border-radius: 18px;
	padding: clamp(1.35rem, 2.5vw, 2rem);
	display: flex;
	flex-direction: column;
	gap: 1.25rem;
	box-sizing: border-box;
}

.zf-fav-pet--sky,
.zf-fav-pet--mint,
.zf-fav-pet--lavender,
.zf-fav-pet--butter {
	background: #e4f1fb;
}

/* Dyskretny pasek ostatnio wybranego pupila */
.zf-fav-pet__saved {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: space-between;
	gap: 0.65rem 1rem;
	padding: 0.65rem 1rem;
	border-radius: 12px;
	background: #ffffff;
	border: 1px solid rgba(15, 23, 42, 0.08);
}

.zf-fav-pet__saved[hidden] {
	display: none !important;
}

.zf-fav-pet__saved-info {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 0.6rem;
}

.zf-fav-pet__saved-badge {
	display: inline-flex;
	align-items: center;
	padding: 0.2rem 0.6rem;
	border-radius: 999px;
	background: #f1f5f9;
	color: #334155;
	font-size: 0.7rem;
	font-weight: 600;
	letter-spacing: 0.05em;
	text-transform: uppercase;
}

.zf-fav-pet__saved-name {
	font-family: "DM Sans", system-ui, sans-serif;
	font-size: 0.96rem;
	font-weight: 650;
	color: #0f172a;
	text-decoration: none;
}

.zf-fav-pet__saved-name:hover,
.zf-fav-pet__saved-name:focus-visible {
	text-decoration: underline;
	text-underline-offset: 2px;
}

.zf-fav-pet__saved-actions {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 0.65rem;
}

.zf-fav-pet__saved-cta {
	display: inline-flex;
	align-items: center;
	padding: 0.42rem 0.9rem;
	border-radius: 8px;
	background: var(--color-navy, #1a2e4a);
	color: #ffffff;
	font-size: 0.82rem;
	font-weight: 600;
	text-decoration: none;
}

.zf-fav-pet__saved-cta:hover,
.zf-fav-pet__saved-cta:focus-visible {
	background: #13233a;
	color: #ffffff;
	text-decoration: none;
}

.zf-fav-pet__saved-reset {
	appearance: none;
	border: 0;
	background: transparent;
	color: #64748b;
	font-size: 0.8rem;
	font-weight: 550;
	cursor: pointer;
	padding: 0.2rem 0.35rem;
}

.zf-fav-pet__saved-reset:hover,
.zf-fav-pet__saved-reset:focus-visible {
	color: #0f172a;
	text-decoration: underline;
	text-underline-offset: 2px;
}

/* Nagłówek sekcji */
.zf-fav-pet__intro {
	display: flex;
	flex-direction: column;
	align-items: flex-start;
	gap: 0.25rem;
}

.zf-fav-pet__step-pill {
	display: inline-flex;
	align-items: center;
	padding: 0.22rem 0.65rem;
	border-radius: 999px;
	background: #ffffff;
	color: #14635c;
	font-family: "DM Sans", system-ui, sans-serif;
	font-size: 0.72rem;
	font-weight: 650;
	letter-spacing: 0.06em;
	text-transform: uppercase;
}

.zf-fav-pet__heading {
	margin: 0.15rem 0 0;
	font-family: "DM Sans", system-ui, sans-serif;
	font-size: clamp(1.35rem, 2.2vw, 1.65rem);
	font-weight: 700;
	line-height: 1.18;
	letter-spacing: -0.025em;
	color: var(--color-navy, #1a2e4a);
}

.zf-fav-pet__lead {
	margin: 0.1rem 0 0;
	font-family: "DM Sans", system-ui, sans-serif;
	font-size: 0.92rem;
	line-height: 1.5;
	color: rgba(26, 46, 74, 0.7);
	max-width: 58ch;
}

/* Krok 1: Równe, czyste kafelki zwierząt (6 kolumn desktop, 3 tablet, 2 mobile) */
.zf-fav-pet__species-grid {
	display: grid;
	grid-template-columns: repeat(6, minmax(0, 1fr));
	gap: 0.8rem;
}

.zf-fav-pet__sp-card {
	appearance: none;
	position: relative;
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	gap: 0.65rem;
	padding: 1.1rem 0.7rem 0.95rem;
	border-radius: 16px;
	border: 1.5px solid transparent;
	background: #ffffff;
	color: var(--color-navy, #1a2e4a);
	cursor: pointer;
	text-align: center;
	box-sizing: border-box;
	transition: background-color 0.15s ease, border-color 0.15s ease, box-shadow 0.15s ease;
}

.zf-fav-pet__sp-card:hover,
.zf-fav-pet__sp-card:focus-visible {
	background: #ffffff;
	border-color: rgba(26, 46, 74, 0.18);
	transform: none;
	box-shadow: 0 4px 14px rgba(26, 46, 74, 0.05);
	outline: none;
}

.zf-fav-pet__sp-card:hover .zf-fav-pet__sp-name,
.zf-fav-pet__sp-card:focus-visible .zf-fav-pet__sp-name {
	text-decoration: none;
}

.zf-fav-pet__sp-card.is-active {
	border-color: #14635c;
	background: #ffffff;
	box-shadow: 0 4px 16px rgba(20, 99, 92, 0.1);
}

.zf-fav-pet__sp-card.is-active::after {
	content: "✓";
	position: absolute;
	top: 8px;
	right: 8px;
	width: 21px;
	height: 21px;
	border-radius: 50%;
	background: #14635c;
	color: #ffffff;
	font-family: "DM Sans", system-ui, sans-serif;
	font-size: 0.7rem;
	font-weight: 700;
	display: inline-flex;
	align-items: center;
	justify-content: center;
}

.zf-fav-pet__sp-media {
	width: 72px;
	height: 72px;
	border-radius: 50%;
	background: #d7ebf8;
	border: 0;
	display: flex;
	align-items: center;
	justify-content: center;
	overflow: hidden;
	flex: 0 0 72px;
}

.zf-fav-pet__sp-card:hover .zf-fav-pet__sp-media {
	background: #cbe4f4;
}

.zf-fav-pet__sp-media img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	display: block;
	transform: none;
}

.zf-fav-pet__sp-name {
	font-family: "DM Sans", system-ui, sans-serif;
	font-size: 0.96rem;
	font-weight: 650;
	letter-spacing: -0.015em;
	line-height: 1.25;
	color: var(--color-navy, #1a2e4a);
}

.zf-fav-pet__sp-hint {
	font-family: "DM Sans", system-ui, sans-serif;
	font-size: 0.75rem;
	font-weight: 500;
	color: rgba(26, 46, 74, 0.58);
	line-height: 1.2;
}

/* Krok 2: Rozwijany panel zakładek strony (/rasa/{slug}/) */
.zf-fav-pet__step2 {
	background: #ffffff;
	border: 0;
	border-radius: 16px;
	padding: clamp(1.05rem, 2vw, 1.4rem);
	display: flex;
	flex-direction: column;
	gap: 1rem;
}

.zf-fav-pet__step2[hidden] {
	display: none !important;
}

.zf-fav-pet__step2-head {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: space-between;
	gap: 0.75rem 1rem;
}

.zf-fav-pet__step2-titles {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 0.55rem;
}

.zf-fav-pet__step2-badge {
	display: inline-flex;
	align-items: center;
	padding: 0.18rem 0.55rem;
	border-radius: 999px;
	background: #f1f5f9;
	color: #334155;
	font-family: "DM Sans", system-ui, sans-serif;
	font-size: 0.7rem;
	font-weight: 600;
	letter-spacing: 0.04em;
	text-transform: uppercase;
}

.zf-fav-pet__step2-title {
	margin: 0;
	font-family: "DM Sans", system-ui, sans-serif;
	font-size: 1.05rem;
	font-weight: 650;
	letter-spacing: -0.015em;
	color: #0f172a;
}

.zf-fav-pet__step2-controls {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 0.6rem;
	flex: 0 1 auto;
	min-width: 0;
}

.zf-fav-pet__search {
	width: 240px;
	max-width: 100%;
	min-width: 0;
	height: 38px;
	padding: 0 0.9rem;
	border-radius: 999px;
	border: 1px solid rgba(26, 46, 74, 0.15);
	background: #ffffff;
	color: #1a2e4a;
	font-family: "DM Sans", system-ui, sans-serif;
	font-size: 0.85rem;
	outline: none;
	box-sizing: border-box;
}

.zf-fav-pet__search:focus {
	border-color: #14635c;
}

.zf-fav-pet__collapse {
	appearance: none;
	height: 38px;
	padding: 0 0.85rem;
	border-radius: 999px;
	border: 1px solid rgba(26, 46, 74, 0.14);
	background: #ffffff;
	color: #1a2e4a;
	font-family: "DM Sans", system-ui, sans-serif;
	font-size: 0.82rem;
	font-weight: 700;
	cursor: pointer;
	white-space: nowrap;
}

.zf-fav-pet__collapse:hover,
.zf-fav-pet__collapse:focus-visible {
	background: #ffffff;
	text-decoration: underline;
	text-underline-offset: 2px;
}

/* Siatka prostych zakładek pupila (prowadzi wyłącznie na /rasa/{slug}/) */
.zf-fav-pet__grid {
	display: grid;
	grid-template-columns: repeat(4, minmax(0, 1fr));
	gap: 0.75rem;
}

.zf-fav-pet__breed {
	display: flex;
	align-items: center;
	gap: 0.7rem;
	padding: 0.68rem 0.85rem;
	border-radius: 12px;
	border: 1px solid rgba(15, 23, 42, 0.085);
	background: #ffffff;
	color: #0f172a;
	text-decoration: none;
	min-width: 0;
	box-sizing: border-box;
	transition: background-color 0.14s ease, border-color 0.14s ease;
}

.zf-fav-pet__breed:hover,
.zf-fav-pet__breed:focus-visible {
	background: #f8fafb;
	border-color: rgba(15, 23, 42, 0.18);
	color: #0f172a;
	text-decoration: none;
	box-shadow: none;
	transform: none;
}

.zf-fav-pet__breed:hover .zf-fav-pet__breed-name,
.zf-fav-pet__breed:focus-visible .zf-fav-pet__breed-name {
	text-decoration: none;
}

.zf-fav-pet__breed-media {
	width: 44px;
	height: 44px;
	flex: 0 0 44px;
	border-radius: 10px;
	background: #f4f6f8;
	border: 1px solid rgba(15, 23, 42, 0.055);
	display: flex;
	align-items: center;
	justify-content: center;
	overflow: hidden;
}

.zf-fav-pet__breed:hover .zf-fav-pet__breed-media {
	background: #f4f6f8;
}

.zf-fav-pet__breed-media img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	display: block;
	transform: none;
}

.zf-fav-pet__breed-body {
	display: flex;
	flex-direction: column;
	gap: 0.1rem;
	min-width: 0;
	flex: 1 1 auto;
}

.zf-fav-pet__breed-name {
	font-family: "DM Sans", system-ui, sans-serif;
	font-size: 0.9rem;
	font-weight: 600;
	letter-spacing: -0.01em;
	line-height: 1.25;
	color: #0f172a;
	overflow-wrap: break-word;
}

.zf-fav-pet__breed-meta {
	font-family: "DM Sans", system-ui, sans-serif;
	font-size: 0.74rem;
	font-weight: 500;
	color: #64748b;
	line-height: 1.25;
}

.zf-fav-pet__breed-arrow {
	flex: 0 0 auto;
	font-size: 0.95rem;
	font-weight: 700;
	color: #14635c;
}

.zf-fav-pet__empty {
	grid-column: 1 / -1;
	margin: 0;
	padding: 0.75rem 1rem;
	border-radius: 12px;
	background: #ffffff;
	font-size: 0.88rem;
	color: #3d526b;
}

.zf-fav-pet__footer {
	display: flex;
	justify-content: center;
}

.zf-fav-pet__footer[hidden] {
	display: none !important;
}

.zf-fav-pet__more-btn {
	appearance: none;
	padding: 0.45rem 1.05rem;
	border-radius: 999px;
	border: 1px solid rgba(26, 46, 74, 0.14);
	background: #ffffff;
	color: #1a2e4a;
	font-family: "Nunito", "DM Sans", system-ui, sans-serif;
	font-size: 0.84rem;
	font-weight: 800;
	cursor: pointer;
}

.zf-fav-pet__more-btn:hover,
.zf-fav-pet__more-btn:focus-visible {
	background: #ffffff;
	text-decoration: underline;
	text-underline-offset: 2px;
}

@media (max-width: 1080px) {
	.zf-fav-pet__species-grid {
		grid-template-columns: repeat(3, minmax(0, 1fr));
	}

	.zf-fav-pet__grid {
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}
}

@media (max-width: 640px) {
	.zf-fav-pet {
		padding: 1.2rem 1rem;
		border-radius: 20px;
		gap: 1.05rem;
	}

	.zf-fav-pet__species-grid {
		grid-template-columns: repeat(2, minmax(0, 1fr));
		gap: 0.65rem;
	}

	.zf-fav-pet__sp-media {
		width: 60px;
		height: 60px;
		flex: 0 0 60px;
	}

	.zf-fav-pet__step2-controls {
		width: 100%;
	}

	.zf-fav-pet__search {
		flex: 1 1 auto;
		width: auto;
	}

	.zf-fav-pet__grid {
		grid-template-columns: minmax(0, 1fr);
		gap: 0.55rem;
	}
}
