/* =====================================================================
 * ANIMA – STYLY WEBU
 * Načítá plugin "Anima – úpravy webu" (jen na webu, ne v editoru).
 * Šířka obsahu je zvlášť v anima-sirka.css (ta se načítá i v editoru).
 *
 * OBSAH
 *  1. Odkazy
 *  2. Záhlaví – kompaktní ukotvené
 *  3. Drobková navigace a akordeon kategorií
 *  4. Bubliny a tabletky
 *  5. Katalog
 *  6. Karusely
 *  7. Detail produktu – galerie
 *  8. Detail produktu – nákup
 *  9. Detail produktu – tabulka vlastností
 * 10. Plovoucí prvky (tlačítko nahoru, popisek u kurzoru)
 * 11. Omezení pohybu (prefers-reduced-motion)
 * ===================================================================== */


/* =====================================================================
 * 1. ODKAZY
 * ===================================================================== */

a {
	text-decoration: none;
	text-underline-offset: 0.16em;
	display: inline-block;
	transform-origin: center;
	transition: transform 0.2s ease, text-decoration-color 0.2s ease;
}

a:hover,
a:focus-visible {
	transform: scale(1.04);
}

/* podtržení jen v drobkové navigaci a v tabulce vlastností */
.wp-block-breadcrumbs a,
.wp-block-woocommerce-product-specifications a {
	text-decoration: underline;
	text-decoration-thickness: 1px;
	text-decoration-color: #636363;
}

.wp-block-breadcrumbs a:hover,
.wp-block-woocommerce-product-specifications a:hover {
	text-decoration-color: #ffc400;
}


/* =====================================================================
 * 2. ZÁHLAVÍ – KOMPAKTNÍ UKOTVENÉ
 * Skupina s třídou "anima-header-compact" v části šablony Záhlaví.
 * Třídu "is-sticky" přidává JS, v editoru se tedy neukotvuje.
 * ===================================================================== */

.anima-header-compact {
	transition: transform 0.25s ease;
	will-change: transform;
}

.anima-header-compact.is-sticky {
	position: fixed;
	top: 0;
	left: 0;
	right: 0;
	z-index: 500;
	transform: translateY(-100%);
}

.anima-header-compact.is-sticky.is-visible {
	transform: translateY(0);
}

/* šířky sloupců podle obsahu, ne podle procent */
.anima-header-compact .wp-block-columns {
	flex-wrap: nowrap !important;
	gap: 1.5rem;
	align-items: center;
}

/* navigace – jen nezbytná šířka */
.anima-header-compact .wp-block-column:first-child {
	flex: 0 0 auto !important;
	width: auto !important;
	min-width: 0;
}

/* vyhledávání a košík – zbytek místa */
.anima-header-compact .wp-block-column:last-child {
	flex: 1 1 auto !important;
	width: auto !important;
	min-width: 0;
}

.anima-header-compact .wp-block-column:last-child > .wp-block-group {
	gap: 1rem;
}

.anima-header-compact .dgwt-wcas-search-wrapp {
	flex: 1 1 auto;
	width: auto !important;
	max-width: none !important;
	min-width: 0;
}

.anima-header-compact .wc-block-mini-cart {
	flex: 0 0 auto;
}

/* rozbalená navigace od šířky tabletu na výšku */
@media (min-width: 900px) {
	.anima-header-compact .wp-block-navigation__responsive-container-open.always-shown {
		display: none !important;
	}

	.anima-header-compact .wp-block-navigation__responsive-container.hidden-by-default {
		display: flex !important;
		position: relative !important;
		z-index: auto !important;
		background-color: transparent !important;
		padding: 0 !important;
		width: auto !important;
		height: auto !important;
	}

	.anima-header-compact .wp-block-navigation__responsive-container.hidden-by-default .wp-block-navigation__responsive-close {
		max-width: none !important;
		padding: 0 !important;
	}

	.anima-header-compact .wp-block-navigation__responsive-container.hidden-by-default .wp-block-navigation__responsive-container-close {
		display: none !important;
	}

	.anima-header-compact .wp-block-navigation__responsive-container.hidden-by-default .wp-block-navigation__responsive-dialog {
		margin-top: 0 !important;
	}

	.anima-header-compact .wp-block-navigation__responsive-container.hidden-by-default .wp-block-navigation__container {
		flex-direction: row !important;
		gap: 1.5rem;
	}
}

/* sbalená navigace – po rozkliknutí přes celou obrazovku */
@media (max-width: 899px) {
	.anima-header-compact .wp-block-navigation__responsive-container.is-menu-open {
		position: fixed !important;
		top: 0 !important;
		left: 0 !important;
		right: 0 !important;
		bottom: 0 !important;
		width: 100vw !important;
		height: 100vh !important;
		height: 100dvh !important;
		max-width: none !important;
		z-index: 100000 !important;
	}
}


/* =====================================================================
 * 3. DROBKOVÁ NAVIGACE A AKORDEON KATEGORIÍ
 * Řádek s drobky a akordeonem má v editoru třídu "anima-cat-bar".
 * ===================================================================== */

/* řádek smí zalamovat, ale bez svislé mezery */
.anima-cat-bar {
	flex-wrap: wrap !important;
	row-gap: 0 !important;
	align-items: flex-start;
}

/* rozpuštění obalů akordeonu – tlačítko a panel jsou přímo v řádku */
.anima-cat-bar .wp-block-kadence-accordion,
.anima-cat-bar .kt-accordion-wrap,
.anima-cat-bar .kt-accordion-inner-wrap,
.anima-cat-bar .kt-accordion-pane {
	display: contents !important;
}

/* tlačítko zůstává vedle drobků, panel padá na celou šířku pod ně */
.anima-cat-bar .kt-accordion-header-wrap {
	flex: 0 0 auto;
}

.anima-cat-bar .kt-accordion-panel {
	flex: 1 0 100%;
}

/* panel se rozvine v toku a odsune obsah pod sebou */
.anima-cat-bar .kt-accordion-panel:not(.kt-accordion-panel-hidden) {
	height: auto !important;
	max-height: none !important;
}

.anima-cat-bar .kt-accordion-panel-inner {
	padding: 12px 0 4px;
}

/* koncová kategorie – akordeon se neukazuje (třídu na <body> přidává plugin) */
body.anima-leaf-category .anima-cat-bar .wp-block-kadence-accordion {
	display: none !important;
}

/* mobilní zkratka drobků – odkaz na nadřazenou kategorii */
.anima-crumb-mobile {
	display: none;
	align-items: center;
	gap: 0.35em;
	text-decoration: none;
}

.anima-crumb-mobile::before {
	content: "‹";
	font-size: 1.3em;
	line-height: 1;
}

@media (max-width: 781px), (pointer: coarse) and (max-width: 1024px) {
	.anima-cat-bar {
		display: flex !important;
		flex-direction: row !important;
		flex-wrap: nowrap !important;
		align-items: center !important;
		justify-content: space-between !important;
		column-gap: 8px !important;
		padding-left: 3% !important;
		padding-right: 3% !important;
	}

	.anima-cat-bar > nav.wp-block-breadcrumbs {
		flex: 0 1 auto !important;
		min-width: 0;
		margin: 0 !important;
		padding: 0 !important;
	}

	.anima-cat-bar .wp-block-breadcrumbs ol {
		display: none;
	}

	.anima-crumb-mobile {
		display: inline-flex;
		white-space: nowrap;
	}

	.anima-cat-bar .kt-blocks-accordion-title {
		letter-spacing: 0 !important;
	}

	.anima-cat-bar .wp-block-kadence-accordion {
		display: block !important;
		flex: 0 0 auto !important;
	}

	.anima-cat-bar .kt-accordion-header-wrap {
		flex: 0 0 auto !important;
		width: auto !important;
	}

	.anima-cat-bar .kt-blocks-accordion-header {
		width: auto !important;
		display: inline-flex !important;
		white-space: nowrap;
	}
	
	/* rozbalený panel padá pod celý řádek */
	.anima-cat-bar {
		flex-wrap: wrap !important;
		position: relative !important;
	}

	.anima-cat-bar .kt-accordion-panel {
		position: absolute !important;
		left: 0 !important;
		right: 0 !important;
		top: 100% !important;
		z-index: 60;
		background: #fff;
	}

	.anima-cat-bar .kt-accordion-panel-inner {
		padding: 12px 3% 8px !important;
	}

	.anima-cat-bar .wp-block-term-template {
		flex-wrap: wrap !important;
	}
}


/* =====================================================================
 * 4. BUBLINY A TABLETKY
 * Všechny "bublinové" prvky webu pohromadě – tady se sjednocuje vzhled.
 * ===================================================================== */

/* ----- 4a) Podkategorie a štítky pod katalogem -----
   Štítky mají navíc obal .anima-tag-bubbles – přes něj je lze odlišit. */

.anima-subcat-bubbles {
	--bubble-min: clamp(0.8rem, 0.75rem + 0.2vw, 0.9rem);
	--bubble-max: clamp(1rem, 0.85rem + 0.35vw, 1.4rem);
	display: flex;
	flex-wrap: wrap;
	justify-content: center;
	gap: 12px;
	margin: 24px 0;
}

.anima-subcat-bubble {
	font-size: calc(
		var(--bubble-min) +
		(var(--bubble-max) - var(--bubble-min)) * var(--bubble-ratio, 0.5)
	);
	display: inline-flex;
	align-items: center;
	gap: 8px;
	padding: 0.6em 1.4em;
	border-radius: 3px;
	background: #E6E6E6;
	color: #333;
	text-decoration: none;
	transition: transform 0.2s ease, background 0.2s ease, color 0.2s ease;
}

.anima-subcat-bubble:hover {
	background: #333;
	color: #fff;
}

.anima-subcat-bubble .count {
	opacity: 0.6;
	font-size: 0.8em;
}

/* aktivní štítek (filtr zapnutý) – kliknutím se filtr zruší */
.anima-subcat-bubble.is-active {
	background: #333;
	color: #fff;
}

.anima-subcat-bubble.is-active::after {
	content: "×";
	margin-left: 0.5em;
	font-size: 1.15em;
	line-height: 1;
	opacity: 0.8;
}

/* ----- 4b) Podkategorie v akordeonu nahoře (blok Terms Query) ----- */

.anima-cat-bar .wp-block-term-template {
	display: flex !important;
	flex-wrap: wrap;
	gap: 8px;
	list-style: none;
	margin: 0 !important;
	padding: 0 !important;
}

.anima-cat-bar .wp-block-term {
	margin: 0 !important;
}

.anima-cat-bar .wp-block-term > .wp-block-group {
	position: relative;
	align-items: center;
	gap: 6px;
	padding: 6px 14px !important;
	border-radius: 3px;
	background: #e6e6e6;
	font-size: 0.9rem !important;
	transform-origin: center;
	transition: transform 0.2s ease, background 0.2s ease, color 0.2s ease;
}

.anima-cat-bar .wp-block-term > .wp-block-group:hover {
	background: #333;
	transform: scale(1.04);
}

.anima-cat-bar .wp-block-term > .wp-block-group:hover a,
.anima-cat-bar .wp-block-term > .wp-block-group:hover .wp-block-term-count {
	color: #fff !important;
}

.anima-cat-bar .wp-block-term-name {
	margin: 0 !important;
}

.anima-cat-bar .wp-block-term-name a {
	text-decoration: none;
	color: #333 !important;
}

/* text se nezvětšuje podruhé – zvětšuje se celá bublina */
.anima-cat-bar .wp-block-term-name a:hover,
.anima-cat-bar .wp-block-term-name a:focus-visible {
	transform: none;
}

/* klikatelná celá bublina */
.anima-cat-bar .wp-block-term-name a::after {
	content: "";
	position: absolute;
	inset: 0;
}

.anima-cat-bar .wp-block-term-count {
	opacity: 0.6;
	font-size: 0.85em;
	color: #333;
}

/* ----- 4c) Kategorie a štítky pod detailem produktu (styl Tabletka) ----- */

.wp-block-post-terms.is-style-pill {
	display: flex;
	flex-wrap: wrap;
	justify-content: center;
	gap: 10px;
}

.wp-block-post-terms.is-style-pill .wp-block-post-terms__separator {
	display: none;
}

.wp-block-post-terms.is-style-pill a {
	display: inline-flex;
	align-items: center;
	padding: 0.5em 1.2em;
	border-radius: 3px;
	background: #E6E6E6;
	color: #333;
	font-size: 1.1rem;
	text-decoration: none;
	transition: transform 0.2s ease, background 0.2s ease, color 0.2s ease;
}

.wp-block-post-terms.is-style-pill a:hover,
.wp-block-post-terms.is-style-pill a:focus-visible {
	background: #333;
	color: #fff;
	transform: scale(1.04);
}

/* ----- 4d) Tlačítko "Zpět na …" (šablony atributů a štítků) ----- */

.anima-back-btn {
	display: inline-flex;
	align-items: center;
	gap: 0.4em;
	padding: 0.5em 1.2em;
	border-radius: 999px;
	background: #E6E6E6;
	color: #333;
	font-size: 0.9rem;
	text-decoration: none;
	transition: transform 0.2s ease, background 0.2s ease, color 0.2s ease;
}

.anima-back-btn::before {
	content: "‹";
	font-size: 1.3em;
	line-height: 1;
}

.anima-back-btn:hover,
.anima-back-btn:focus-visible {
	background: #333;
	color: #fff;
	transform: scale(1.04);
}


/* =====================================================================
 * 5. KATALOG
 * Blok Kolekce produktů s třídou "anima-katalog".
 * ===================================================================== */

/* katalog je "kontejner" – sloupce se řídí jeho šířkou */
.anima-katalog {
	container-type: inline-size;
}

.anima-katalog .wc-block-product-template,
.anima-katalog .wp-block-woocommerce-product-template {
	--anima-cols: 2;
	display: grid !important;
	grid-template-columns: repeat(var(--anima-cols), minmax(0, 1fr)) !important;
	gap: 2.5rem 1.5rem !important;
	margin-left: 0 !important;
	margin-right: 0 !important;
	padding: 0 !important;
	list-style: none;
}

.anima-katalog .wc-block-product-template > li,
.anima-katalog .wp-block-woocommerce-product-template > li {
	width: auto !important;
	max-width: none !important;
	margin: 0 !important;
}

/* body zlomu – šířka KATALOGU, ne obrazovky
   3 sl. = tablet na výšku, 4 = tablet na šířku,
   5 = 13–15" notebook, 6 = monitor 19" a větší */
@container (min-width: 540px) {
	.anima-katalog .wc-block-product-template,
	.anima-katalog .wp-block-woocommerce-product-template { --anima-cols: 3; }
}
@container (min-width: 820px) {
	.anima-katalog .wc-block-product-template,
	.anima-katalog .wp-block-woocommerce-product-template { --anima-cols: 4; }
}
@container (min-width: 1024px) {
	.anima-katalog .wc-block-product-template,
	.anima-katalog .wp-block-woocommerce-product-template { --anima-cols: 5; }
}
@container (min-width: 1450px) {
	.anima-katalog .wc-block-product-template,
	.anima-katalog .wp-block-woocommerce-product-template { --anima-cols: 6; }
}

/* skryté produkty */
.anima-katalog li[hidden] {
	display: none !important;
}

/* než se spustí JS, neukazovat celou dávku (proti probliknutí) */
html.anima-has-js .anima-katalog:not(.anima-js) .wc-block-product-template > li:nth-child(n+19),
html.anima-has-js .anima-katalog:not(.anima-js) .wp-block-woocommerce-product-template > li:nth-child(n+19) {
	display: none;
}

/* stránkování skrýt jen když běží JS */
.anima-katalog.anima-js .wp-block-query-pagination {
	display: none !important;
}

/* ----- tlačítko "Zobrazit další" – vše nastavujte v :root ----- */

:root {
	/* barvy – výchozí stav */
	--anima-btn-text:         #ffffff;
	--anima-btn-bg:           #000000;
	--anima-btn-border:       #1a1a1a;

	/* barvy – po najetí myší */
	--anima-btn-text-hover:   #000000;
	--anima-btn-bg-hover:     #ffc400;
	--anima-btn-border-hover: transparent;

	/* velikost textu */
	--anima-btn-font-size:    1.2rem;

	/* vnitřní odsazení: nahoře/dole  vlevo/vpravo */
	--anima-btn-padding:      0.5em 2.3em;

	/* zvětšení po najetí (1 = bez zvětšení, 1.05 = o 5 %) */
	--anima-btn-scale-hover:  1.05;

	/* rychlost animace */
	--anima-btn-speed:        .25s;

	/* zaoblení rohů */
	--anima-btn-radius:       999px;
}

.anima-loadmore {
	display: flex;
	justify-content: center;
	margin-top: 3rem;
}

.anima-loadmore[hidden] {
	display: none;
}

.anima-loadmore .anima-loadmore__btn {
	cursor: pointer;
	color: var(--anima-btn-text) !important;
	background-color: var(--anima-btn-bg) !important;
	border: 1px solid var(--anima-btn-border) !important;
	border-radius: var(--anima-btn-radius) !important;
	font-size: var(--anima-btn-font-size) !important;
	padding: var(--anima-btn-padding) !important;
	transform: scale(1);
	transition:
		color var(--anima-btn-speed) ease,
		background-color var(--anima-btn-speed) ease,
		border-color var(--anima-btn-speed) ease,
		transform var(--anima-btn-speed) ease;
}

.anima-loadmore .anima-loadmore__btn:hover,
.anima-loadmore .anima-loadmore__btn:focus-visible {
	color: var(--anima-btn-text-hover) !important;
	background-color: var(--anima-btn-bg-hover) !important;
	border-color: var(--anima-btn-border-hover) !important;
	transform: scale(var(--anima-btn-scale-hover));
}

/* při kliknutí lehce "zamáčknout" */
.anima-loadmore .anima-loadmore__btn:active {
	transform: scale(0.98);
}

/* během načítání bez hover efektu */
.anima-loadmore .anima-loadmore__btn[disabled],
.anima-loadmore .anima-loadmore__btn[disabled]:hover {
	opacity: .6;
	cursor: wait;
	color: var(--anima-btn-text) !important;
	background-color: var(--anima-btn-bg) !important;
	border-color: var(--anima-btn-border) !important;
	transform: scale(1);
}

/* ----- kartičky produktů ----- */

.wp-block-group:has(> .wc-block-components-product-image) {
	transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.wc-block-product:hover .wp-block-group:has(> .wc-block-components-product-image) {
	transform: scale(1.02);
	box-shadow: 0 4px 12px rgba(0, 0, 0, 0.4) !important;
}

/* obrázek se nezvětšuje podruhé – zvětšuje se celý blok výše */
.wc-block-components-product-image a:hover,
.wc-block-components-product-image a:focus-visible {
	transform: none;
}

/* zkrácení dlouhých názvů a seznamů autorů (celý text v popisku u kurzoru) */
.wc-block-product .wp-block-post-title a,
.wc-block-product .product-autor {
	display: -webkit-box;
	-webkit-line-clamp: 3;
	-webkit-box-orient: vertical;
	overflow: hidden;
}

.wc-block-product .product-autor {
	-webkit-line-clamp: 2;
}

/* název štítku doplněný k nadpisu kategorie při filtrování */
.anima-title-tag {
	font-weight: 300;
	opacity: 0.7;
}
/* během načítání (změna řazení) kurzor s kolečkem */
html.anima-busy,
html.anima-busy * {
	cursor: progress !important;
}


/* =====================================================================
 * 6. KARUSELY
 * ===================================================================== */

/* ----- karusely z bloku Kolekce produktů ----- */

.wp-block-woocommerce-product-collection {
	position: relative;
}

.is-product-collection-layout-carousel {
	padding-left: 0 !important;
	padding-right: 0 !important;
	margin-left: 0 !important;
	margin-right: 0 !important;
}

/* lišta šipek roztažená ZA okraje řady */
.wp-block-woocommerce-product-collection > .wp-block-group .wc-block-next-previous-buttons {
	position: absolute;
	top: 0;
	bottom: 0;
	left: -3rem;
	right: -3rem;
	display: flex;
	justify-content: space-between;
	align-items: center;
	pointer-events: none;
	z-index: 2;
}

/* kulaté šipky */
.wp-block-woocommerce-product-collection > .wp-block-group .wc-block-next-previous-buttons button {
	pointer-events: auto;
	width: 2.5rem;
	height: 2.5rem;
	border: 0;
	border-radius: 50%;
	background: rgba(0, 0, 0, .55);
	color: #fff;
	display: flex;
	align-items: center;
	justify-content: center;
	cursor: pointer;
}

/* na menších zařízeních šipky dovnitř */
@media (max-width: 900px) {
	.wp-block-woocommerce-product-collection > .wp-block-group .wc-block-next-previous-buttons {
		left: 0.5rem !important;
		right: 0.5rem !important;
	}
}

/* rail na hlavní stránce a karusely souvisejících produktů */
/* rail na hlavní stránce a karusely souvisejících produktů */
.anima-rail-home .is-product-collection-layout-carousel .wc-block-product,
.anima-rel-kategorie .is-product-collection-layout-carousel .wc-block-product,
.anima-rel-autor .is-product-collection-layout-carousel .wc-block-product,
.anima-rel-nakladatel .is-product-collection-layout-carousel .wc-block-product,
.anima-rel-edice .is-product-collection-layout-carousel .wc-block-product {
	--anima-card-w: 150px;                          /* mobil */
	flex: 0 0 var(--anima-card-w) !important;
	max-width: none !important;
	min-width: 0 !important;
}
@media (min-width: 768px) {
	.anima-rail-home .is-product-collection-layout-carousel .wc-block-product,
	.anima-rel-kategorie .is-product-collection-layout-carousel .wc-block-product,
	.anima-rel-autor .is-product-collection-layout-carousel .wc-block-product,
	.anima-rel-nakladatel .is-product-collection-layout-carousel .wc-block-product,
	.anima-rel-edice .is-product-collection-layout-carousel .wc-block-product {
		--anima-card-w: 190px;                      /* tablet */
	}
}
@media (min-width: 1280px) {
	.anima-rail-home .is-product-collection-layout-carousel .wc-block-product,
	.anima-rel-kategorie .is-product-collection-layout-carousel .wc-block-product,
	.anima-rel-autor .is-product-collection-layout-carousel .wc-block-product,
	.anima-rel-nakladatel .is-product-collection-layout-carousel .wc-block-product,
	.anima-rel-edice .is-product-collection-layout-carousel .wc-block-product {
		--anima-card-w: 240px;                      /* notebook a větší */
	}
}

/* ----- karusely [anima_related_by_author] a [anima_related_by_publisher] ----- */

.anima-related-carousel-wrap {
	position: relative;
	margin: 2rem 0;
}

.anima-related-carousel-heading {
	margin-bottom: 1rem;
	font-size: 1.25rem;
}

.anima-carousel-viewport {
	position: relative;
	overflow: hidden;
}

.anima-carousel-track {
	display: flex;
	gap: 1rem;
	overflow-x: auto;
	scroll-behavior: smooth;
	scrollbar-width: none;
}

.anima-carousel-track::-webkit-scrollbar {
	display: none;
}

.anima-carousel-item {
	flex: 0 0 auto;
	width: 180px;
}

.anima-carousel-item a {
	text-decoration: none;
	color: inherit;
}

.anima-carousel-item img {
	width: 100%;
	height: auto;
	display: block;
}

.anima-carousel-title {
	margin-top: 0.5rem;
	font-size: 0.9rem;
}

.anima-carousel-price {
	font-weight: bold;
	margin-top: 0.25rem;
}

.anima-carousel-arrow {
	position: absolute;
	top: 40%;
	width: 2.5rem;
	height: 2.5rem;
	border: 0;
	border-radius: 50%;
	background: rgba(0, 0, 0, .55);
	color: #fff;
	display: flex;
	align-items: center;
	justify-content: center;
	cursor: pointer;
	font-size: 1.25rem;
	z-index: 2;
}

.anima-carousel-prev { left: -1.25rem; }
.anima-carousel-next { right: -1.25rem; }

/* skrytí celé sekce, když karusel nemá co zobrazit */
.anima-rel-group:not(:has(.wc-block-product)) {
	display: none;
}


/* =====================================================================
 * 7. DETAIL PRODUKTU – GALERIE
 * Blok Product Image Gallery (klasická galerie s lightboxem).
 * ===================================================================== */

.wp-block-woocommerce-product-image-gallery {
	max-width: none !important;
	width: 100%;
}

.woocommerce-product-gallery {
	width: 100%;
	/* výška okna hlavního obrázku – ladí se jen tady */
	--anima-gallery-height: 70vh;
}

/* pevná výška okna – miniatury pak neskáčou */
.woocommerce-product-gallery .flex-viewport {
	position: relative;
	height: var(--anima-gallery-height) !important;
}

.woocommerce-product-gallery__wrapper {
	margin: 0;
	height: 100%;
}

.woocommerce-product-gallery__image {
	display: flex !important;
	align-items: center;
	justify-content: center;
	height: 100% !important;
}

/* hlavní obrázek se vždy vejde celý, nikdy se nedeformuje */
.woocommerce-product-gallery .woocommerce-product-gallery__image.woocommerce-product-gallery__image img {
	display: block;
	width: auto !important;
	height: auto !important;
	max-width: 100% !important;
	max-height: var(--anima-gallery-height) !important;
	margin: 0 auto;
	object-fit: contain !important;
}

/* lupa vypnutá (i v PHP), ikona lupy v rohu skrytá */
.woocommerce-product-gallery .zoomImg {
	display: none !important;
}

.woocommerce-product-gallery__trigger {
	display: none;
}

/* kliknutí na obrázek otevře lightbox – kurzor lupa, bez zvětšování */
.woocommerce-product-gallery__image a {
	position: relative;
	display: block;
	cursor: zoom-in;
}

.woocommerce-product-gallery__image a:hover,
.woocommerce-product-gallery__image a:focus-visible {
	transform: none !important;
}

/* ----- šipky na hlavním obrázku ----- */

.woocommerce-product-gallery .flex-direction-nav {
	margin: 0;
	padding: 0;
	list-style: none;
}

.woocommerce-product-gallery .flex-direction-nav a {
	position: absolute;
	top: 50%;
	transform: translateY(-50%);
	z-index: 3;
	display: flex;
	align-items: center;
	justify-content: center;
	width: 2.75rem;
	height: 2.75rem;
	border-radius: 50%;
	background: #636363;
	color: #ffffff;
	font-size: 0;
	text-decoration: none;
	opacity: 0.75;
	transition: background 0.2s ease, color 0.2s ease, opacity 0.2s ease;
}

.woocommerce-product-gallery .flex-direction-nav a::before {
	font-size: 1.4rem;
	line-height: 1;
}

.woocommerce-product-gallery .flex-direction-nav .flex-prev {
	left: 0.75rem;
}

.woocommerce-product-gallery .flex-direction-nav .flex-prev::before {
	content: "‹";
}

.woocommerce-product-gallery .flex-direction-nav .flex-next {
	right: 0.75rem;
}

.woocommerce-product-gallery .flex-direction-nav .flex-next::before {
	content: "›";
}

.woocommerce-product-gallery .flex-direction-nav a:hover {
	background: #ffc400;
	color: #000000;
	opacity: 1;
}

.woocommerce-product-gallery .flex-direction-nav a.flex-disabled {
	opacity: 0.25;
	cursor: default;
}

/* ----- miniatury pod hlavním obrázkem ----- */

.woocommerce-product-gallery .flex-control-thumbs.flex-control-thumbs.flex-control-nav {
	display: flex !important;
	flex-wrap: nowrap !important;
	gap: 10px;
	width: 100% !important;
	margin: 1rem 0 0 !important;
	padding: 0 0 0.75rem !important;
	list-style: none;
	overflow-x: auto !important;
	overflow-y: hidden;
	scrollbar-width: thin;
	scrollbar-color: #b0b0b0 transparent;
}

.woocommerce-product-gallery .flex-control-thumbs::-webkit-scrollbar {
	height: 6px;
}

.woocommerce-product-gallery .flex-control-thumbs::-webkit-scrollbar-thumb {
	background: #b0b0b0;
	border-radius: 999px;
}

.woocommerce-product-gallery .flex-control-thumbs.flex-control-thumbs li {
	flex: 0 0 auto !important;
	width: auto !important;
	margin: 0 !important;
	padding: 0 !important;
	float: none !important;
	display: block !important;
}

.woocommerce-product-gallery .flex-control-thumbs.flex-control-thumbs img {
	display: block;
	box-sizing: border-box;
	width: 7rem !important;
	height: 7rem !important;
	object-fit: contain !important;
	background: #f5f5f5;
	border-radius: 4px;
	opacity: 1 !important;
	cursor: pointer;
	transition: outline-color 0.2s ease;
	outline: 2px solid transparent;
	outline-offset: -2px;
}

.woocommerce-product-gallery .flex-control-thumbs.flex-control-thumbs img.flex-active {
	outline-color: #ffc400;
}


/* =====================================================================
 * 8. DETAIL PRODUKTU – NÁKUP
 * Obal ceny a tlačítka má v editoru třídu "anima-buy-box".
 * ===================================================================== */

.wc-block-components-product-button .wp-block-button__link {
	transition: background-color 0.2s ease, color 0.2s ease,
	            border-color 0.2s ease, font-size 0.2s ease;
}

.wc-block-components-product-button .wp-block-button__link:hover,
.wc-block-components-product-button .wp-block-button__link:focus-visible {
	background-color: #ffc400 !important;
	color: #000000 !important;
	border-color: #ffc400 !important;
	font-size: 1.05em !important;
}

/* pozadí ceny reaguje na najetí na tlačítko */
.anima-buy-box > .wp-block-group.has-background {
	border: 1px solid transparent;
	transition: background-color 0.2s ease, border-color 0.2s ease;
}

.anima-buy-box:has(.wc-block-components-product-button .wp-block-button__link:hover) > .wp-block-group.has-background {
	background-color: #F7F7F7 !important;
	border-color: #000000;
	border-radius: 3px;
}


/* =====================================================================
 * 9. DETAIL PRODUKTU – TABULKA VLASTNOSTÍ
 * ===================================================================== */

.wp-block-woocommerce-product-specifications table {
	border-collapse: collapse;
	table-layout: auto;
	width: 100%;
	margin: 0;
}

.wp-block-woocommerce-product-specifications th,
.wp-block-woocommerce-product-specifications td {
	padding: 0.35em 0.75em !important;
	vertical-align: top;
	border: 0 !important;
}

/* sloupec s názvy – jen nezbytná šířka */
.wp-block-woocommerce-product-specifications th {
	width: 1%;
	white-space: nowrap;
}

/* hodnoty o kousek větší než názvy */
.wp-block-woocommerce-product-specifications td {
	font-size: 1.15em !important;
}

.wp-block-woocommerce-product-specifications th:first-child,
.wp-block-woocommerce-product-specifications td:first-child {
	padding-left: 0.5rem !important;
}

.wp-block-woocommerce-product-specifications p {
	margin: 0 !important;
}

/* větší odsazení nad prvním řádkem */
.wp-block-woocommerce-product-specifications tbody tr:first-child th,
.wp-block-woocommerce-product-specifications tbody tr:first-child td {
	padding-top: 0.6em !important;
}

/* jemné oddělení řádků */
.wp-block-woocommerce-product-specifications tbody tr {
	border-bottom: 1px solid #d1d1d1;
}

.wp-block-woocommerce-product-specifications tbody tr:last-child {
	border-bottom: 0;
}


/* =====================================================================
 * 10. PLOVOUCÍ PRVKY
 * ===================================================================== */

/* ----- tlačítko "Zpět na vrch stránky" ----- */

#anima-to-top {
	position: fixed;
	right: clamp(1rem, 3vw, 3rem);
	bottom: 15%;
	z-index: 999;
	display: flex;
	align-items: center;
	justify-content: center;
	width: 2.75rem;
	height: 2.75rem;
	padding: 0;
	border: 0;
	border-radius: 50%;
	background: #636363;
	color: #ffffff;
	font-family: inherit;
	cursor: pointer;
	opacity: 0;
	visibility: hidden;
	transform: scale(0.9);
	transition: opacity .25s ease, transform .2s ease,
	            background-color .2s ease, color .2s ease, visibility .25s;
}

#anima-to-top.is-visible {
	opacity: 0.75;
	visibility: visible;
	transform: scale(1);
}

#anima-to-top:hover,
#anima-to-top:focus-visible {
	background: #ffc400;
	color: #000000;
	opacity: 1;
	transform: scale(1.12);
}

/* popisek vlevo od tlačítka */
#anima-to-top::after {
	content: attr(data-tooltip);
	position: absolute;
	right: calc(100% + 0.6rem);
	top: 50%;
	transform: translateY(-50%);
	padding: 0.35em 0.7em;
	border-radius: 0.25rem;
	background: #636363;
	color: #ffffff;
	font-size: 0.8125rem;
	line-height: 1.3;
	white-space: nowrap;
	opacity: 0;
	pointer-events: none;
	transition: opacity .2s ease;
}

#anima-to-top:hover::after,
#anima-to-top:focus-visible::after {
	opacity: 1;
	/* protizvětšení, aby popisek nerostl s tlačítkem (1 / 1.12) */
	transform: translateY(-50%) scale(0.893);
}

/* ----- popisek u kurzoru (galerie, zkrácené názvy) ----- */

#anima-cursor-tip {
	position: fixed;
	z-index: 9999;
	max-width: 22rem;
	padding: 0.35em 0.8em;
	border-radius: 3px;
	background: #636363;
	color: #fff;
	font-size: 0.8rem;
	white-space: normal;
	pointer-events: none;
	opacity: 0;
	transition: opacity 0.15s ease;
}

#anima-cursor-tip.is-visible {
	opacity: 1;
}


/* =====================================================================
 * 11. OMEZENÍ POHYBU
 * Uživatelé, kteří mají v systému vypnuté animace.
 * ===================================================================== */

@media (prefers-reduced-motion: reduce) {
	a,
	.anima-header-compact,
	.anima-subcat-bubble,
	.anima-cat-bar .wp-block-term > .wp-block-group,
	.wp-block-post-terms.is-style-pill a,
	.anima-back-btn,
	.wp-block-group:has(> .wc-block-components-product-image) {
		transition: none;
	}

	a:hover,
	a:focus-visible,
	.anima-cat-bar .wp-block-term > .wp-block-group:hover,
	.wp-block-post-terms.is-style-pill a:hover,
	.wp-block-post-terms.is-style-pill a:focus-visible,
	.anima-back-btn:hover,
	.anima-back-btn:focus-visible,
	.wc-block-product:hover .wp-block-group:has(> .wc-block-components-product-image) {
		transform: none;
	}

	/* tlačítko nahoru – jen prolnutí */
	#anima-to-top,
	#anima-to-top::after {
		transition: opacity .25s ease;
	}

	#anima-to-top:hover,
	#anima-to-top:focus-visible {
		transform: scale(1);
	}

	#anima-to-top:hover::after,
	#anima-to-top:focus-visible::after {
		transform: translateY(-50%);
	}

	/* tlačítko Zobrazit další */
	.anima-loadmore .anima-loadmore__btn,
	.anima-loadmore .anima-loadmore__btn:hover,
	.anima-loadmore .anima-loadmore__btn:active {
		transform: none;
		transition: none;
	}
}