/**
 * Fesma kujundus Blocksy peal. Värvid ja mõõdud on võetud vanast Kadence'i teemast.
 * Sisukord: 1 muutujad · 2 üldine · 3 päis · 4 jalus · 5 sisu ja galeriid · 6 karussell · 7 suurendus · 8 pood
 * · 9 küpsisebänner
 */

/* ---------- 1. Muutujad ---------- */
:root {
	--fesma-punane: #e31f24;
	--fesma-punane-tume: #af1418;
	--fesma-tume: #1f2933;
	--fesma-tekst: #3e4c59;
	--fesma-hall: #7b8794;
	--fesma-hele: #f3f4f7;
	--fesma-taust: #f9f9fb;
	--fesma-laius: 1290px;

	/* Kadence'i värviklassid ja -muutujad, mida olemasolev sisu kasutab. */
	--wp--preset--color--theme-palette-1: #e31f24;
	--wp--preset--color--theme-palette-2: #af1418;
	--wp--preset--color--theme-palette-3: #1f2933;
	--wp--preset--color--theme-palette-4: #3e4c59;
	--wp--preset--color--theme-palette-5: #52606d;
	--wp--preset--color--theme-palette-6: #7b8794;
	--wp--preset--color--theme-palette-7: #f3f4f7;
	--wp--preset--color--theme-palette-8: #f9f9fb;
	--wp--preset--color--theme-palette-9: #fff;
}

.has-theme-palette-1-color { color: #e31f24 !important; }
.has-theme-palette-2-color { color: #af1418 !important; }
.has-theme-palette-3-color { color: #1f2933 !important; }
.has-theme-palette-4-color { color: #3e4c59 !important; }
.has-theme-palette-5-color { color: #52606d !important; }
.has-theme-palette-6-color { color: #7b8794 !important; }
.has-theme-palette-7-color { color: #f3f4f7 !important; }
.has-theme-palette-8-color { color: #f9f9fb !important; }
.has-theme-palette-9-color { color: #fff !important; }
.has-theme-palette-1-background-color { background-color: #e31f24 !important; }
.has-theme-palette-2-background-color { background-color: #af1418 !important; }
.has-theme-palette-3-background-color { background-color: #1f2933 !important; }
.has-theme-palette-4-background-color { background-color: #3e4c59 !important; }
.has-theme-palette-5-background-color { background-color: #52606d !important; }
.has-theme-palette-6-background-color { background-color: #7b8794 !important; }
.has-theme-palette-7-background-color { background-color: #f3f4f7 !important; }
.has-theme-palette-8-background-color { background-color: #f9f9fb !important; }
.has-theme-palette-9-background-color { background-color: #fff !important; }

/* ---------- 2. Üldine ---------- */
body {
	/* Blocksy võtab kirja sellest muutujast (pealkirjad, nupud, vormid). */
	--theme-font-family: "Open Sans", -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
	font-family: var(--theme-font-family);
}

h1, h2, h3, h4, h5, h6 {
	font-family: var(--theme-font-family);
}

.entry-content a:not(.wp-element-button):not(.button) {
	text-decoration: underline;
	text-underline-offset: 2px;
}

hr.wp-block-separator.is-style-wide {
	height: 2px;
	border: 0;
}

/* ---------- 3. Päis ---------- */
.fesma-paised {
	position: relative;
	z-index: 50;
	background: #353e47;
	border-bottom: 4px solid var(--fesma-punane);
	color: #fff;
}

.fesma-paised-sisu {
	display: flex;
	gap: 10px 24px;
	align-items: center;
	max-width: calc(var(--fesma-laius) + 48px);
	min-height: 68px;
	margin-inline: auto;
	padding: 0 24px;
}

.fesma-logo {
	flex: 0 0 auto;
	padding: 8px 0;
	color: #fff;
	font-weight: 700;
	font-size: 24px;
	line-height: 1;
}

.fesma-logo img {
	display: block;
	width: auto;
	height: 52px;
	max-width: 150px;
	object-fit: contain;
}

.fesma-menuu {
	flex: 1 1 auto;
	min-width: 0;
}

.fesma-menuu-loend,
.fesma-menuu-loend .sub-menu,
.fesma-mobiilimenuu-loend,
.fesma-mobiilimenuu-loend .sub-menu,
.fesma-jalus-loend {
	margin: 0;
	padding: 0;
	list-style: none;
}

.fesma-menuu-loend {
	display: flex;
	flex-wrap: wrap;
	align-items: center; /* lipud (madalamad kui tekst) jäävad tekstiga samale joonele */
	justify-content: flex-end;
}

.fesma-menuu-loend > li {
	position: relative;
}

.fesma-menuu-loend a {
	display: flex;
	gap: 6px;
	align-items: center;
	padding: 6px 9px;
	color: #fff;
	font-size: 15px;
	line-height: 1.4;
	text-decoration: none;
}

.fesma-menuu-loend > .menu-item-has-children > a::after {
	width: 7px;
	height: 7px;
	margin-top: -4px;
	border: solid currentColor;
	border-width: 0 1.5px 1.5px 0;
	transform: rotate(45deg);
	content: "";
}

.fesma-menuu-loend > li > a:hover,
.fesma-menuu-loend > li:focus-within > a,
.fesma-menuu-loend > .current-menu-item > a,
.fesma-menuu-loend > .current-menu-ancestor > a {
	color: #ff8f92;
}

.fesma-menuu-loend .sub-menu {
	position: absolute;
	top: 100%;
	left: 0;
	z-index: 60;
	display: none;
	min-width: 230px;
	padding: 4px 0;
	background: var(--fesma-tume);
	box-shadow: 0 8px 24px rgb(0 0 0 / 25%);
}

.fesma-menuu-loend > li:hover > .sub-menu,
.fesma-menuu-loend > li:focus-within > .sub-menu {
	display: block;
}

.fesma-menuu-loend .sub-menu a {
	padding: 6px 14px;
	font-size: 14px;
}

.fesma-menuu-loend .sub-menu a:hover,
.fesma-menuu-loend .sub-menu a:focus-visible,
.fesma-menuu-loend .sub-menu .current-menu-item > a {
	background: rgb(255 255 255 / 8%);
	color: #ff8f92;
}

.fesma-menuu-loend .lang-item a {
	padding-inline: 6px;
}

.fesma-menuu-loend .lang-item img,
.fesma-mobiilimenuu-loend .lang-item img {
	display: block;
}

.fesma-korv {
	position: relative;
	display: flex;
	flex: 0 0 auto;
	align-items: center;
	padding: 8px 12px 8px 4px;
	color: #fff;
}

.fesma-korv:hover {
	color: #ff8f92;
}

.fesma-korv-arv {
	position: absolute;
	top: 2px;
	right: 0;
	min-width: 20px;
	padding: 0 5px;
	border-radius: 10px;
	background: #fff;
	color: var(--fesma-tume);
	font-weight: 700;
	font-size: 12px;
	line-height: 20px;
	text-align: center;
}

.fesma-korv-arv[data-arv="0"] {
	background: rgb(255 255 255 / 85%);
}

.fesma-menuunupp {
	display: none;
	flex: 0 0 auto;
	width: 48px;
	height: 48px;
	margin: 0;
	padding: 0;
	border: 0;
	background: none;
	color: var(--fesma-punane);
	cursor: pointer;
}

.fesma-menuunupp-ikoon,
.fesma-menuunupp-ikoon::before,
.fesma-menuunupp-ikoon::after {
	display: block;
	width: 34px;
	height: 4px;
	margin-inline: auto;
	border-radius: 2px;
	background: currentColor;
	transition: transform 0.2s, opacity 0.2s;
	content: "";
}

.fesma-menuunupp-ikoon {
	position: relative;
}

.fesma-menuunupp-ikoon::before {
	position: absolute;
	top: -11px;
}

.fesma-menuunupp-ikoon::after {
	position: absolute;
	top: 11px;
}

.fesma-menuunupp[aria-expanded="true"] .fesma-menuunupp-ikoon {
	background: transparent;
}

.fesma-menuunupp[aria-expanded="true"] .fesma-menuunupp-ikoon::before {
	transform: translateY(11px) rotate(45deg);
}

.fesma-menuunupp[aria-expanded="true"] .fesma-menuunupp-ikoon::after {
	transform: translateY(-11px) rotate(-45deg);
}

.fesma-mobiilimenuu {
	border-top: 1px solid rgb(255 255 255 / 15%);
	background: var(--fesma-tume);
}

.fesma-mobiilimenuu[hidden] {
	display: none;
}

.fesma-mobiilimenuu-loend {
	max-width: 720px;
	margin-inline: auto;
	padding: 8px 24px 20px;
}

.fesma-mobiilimenuu-loend li {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	border-bottom: 1px solid rgb(255 255 255 / 12%);
}

.fesma-mobiilimenuu-loend .sub-menu li:last-child {
	border-bottom: 0;
}

.fesma-mobiilimenuu-loend a {
	flex: 1 1 0;
	padding: 9px 0;
	color: #fff;
	font-size: 15px;
	text-decoration: none;
}

.fesma-mobiilimenuu-loend .sub-menu {
	flex: 0 0 100%;
	padding: 0 0 8px 16px;
}

.fesma-mobiilimenuu-loend .sub-menu[hidden] {
	display: none;
}

.fesma-mobiilimenuu-loend .lang-item {
	display: inline-flex;
	border-bottom: 0;
	margin-right: 16px;
}

.fesma-alamnupp {
	flex: 0 0 44px;
	height: 40px;
	margin: 0;
	padding: 0;
	border: 0;
	background: none;
	color: #fff;
	cursor: pointer;
}

.fesma-alamnupp::before {
	display: block;
	width: 10px;
	height: 10px;
	margin: -5px auto 0;
	border: solid currentColor;
	border-width: 0 2px 2px 0;
	transform: rotate(45deg);
	transition: transform 0.2s;
	content: "";
}

.fesma-alamnupp[aria-expanded="true"]::before {
	margin-top: 5px;
	transform: rotate(-135deg);
}

/* Kitsam aken (väike sülearvuti, tahvel külili): menüü jääb nähtavale, ainult tihedamalt. */
@media (min-width: 881px) and (max-width: 1100px) {
	.fesma-paised-sisu {
		gap: 10px 14px;
		padding-inline: 16px;
	}

	.fesma-logo img {
		height: 44px;
	}

	.fesma-menuu-loend a {
		padding: 6px 6px;
		font-size: 14px;
	}

	.fesma-menuu-loend .lang-item a {
		padding-inline: 4px;
	}

	.fesma-korv {
		padding-left: 0;
	}
}

/* Menüünupp (telefon, tahvel püsti) alles alla 881 px. */
@media (max-width: 880px) {
	.fesma-menuu {
		visibility: hidden;
		height: 0;
		overflow: hidden;
	}

	.fesma-menuunupp {
		display: block;
	}

	.fesma-paised-sisu {
		min-height: 64px;
	}

	.fesma-logo img {
		height: 46px;
	}
}

@media (min-width: 881px) {
	.fesma-mobiilimenuu {
		display: none;
	}
}

/* ---------- 4. Jalus ---------- */
.fesma-jalus {
	margin-top: 60px;
	border-top: 4px solid var(--fesma-hall);
	background: var(--fesma-hele); /* „Küsi lisainfot“ + kontaktid helehallil; lehe sisu on valge */
	color: var(--fesma-tekst);
}

.fesma-jalus-sisu {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 40px 60px;
	align-items: center;
	max-width: calc(var(--fesma-laius) + 48px);
	margin-inline: auto;
	padding: 40px 24px;
}

.fesma-jalus-kontakt {
	text-align: center;
}

.fesma-jalus-kontakt figure {
	margin: 0 auto 20px;
}

.fesma-jalus-kontakt img {
	display: inline-block;
}

.fesma-jalus a {
	color: var(--fesma-tume);
}

.fesma-jalus a:hover {
	color: var(--fesma-punane);
}

.fesma-jalus .fesma-vidin + .fesma-vidin {
	margin-top: 16px;
}

.fesma-jalus h2 {
	margin: 0;
	font-size: 28px;
}

.fesma-jalus-menuu {
	display: flex;
	flex-wrap: wrap;
	gap: 6px 26px;
	justify-content: center;
	padding: 18px 24px;
	border-top: 4px solid var(--fesma-hall);
	background: var(--fesma-hele);
	font-size: 15px;
}

.fesma-jalus-loend {
	display: flex;
	flex-wrap: wrap;
	gap: 6px 26px;
	justify-content: center;
}

.fesma-jalus-menuu a {
	text-decoration: none;
}

@media (max-width: 800px) {
	.fesma-jalus-sisu {
		grid-template-columns: 1fr;
	}
}

/* Kontaktivorm (Contact Form 7) */
.wpcf7 input[type="text"],
.wpcf7 input[type="email"],
.wpcf7 input[type="tel"],
.wpcf7 textarea {
	width: 100%;
	max-width: 520px;
	border: 1px solid #c9d0d8; /* valgel taustal peab väli olema piiritletud */
	background: #fff;
}

.wpcf7 textarea {
	height: 140px;
}

/* ---------- 5. Sisu ja galeriid ---------- */
.gallery {
	display: grid;
	grid-template-columns: repeat(3, minmax(0, 1fr));
	gap: 20px;
	margin: 24px 0 40px;
}

.gallery-columns-1 { grid-template-columns: 1fr; }
.gallery-columns-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.gallery-columns-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.gallery-columns-5 { grid-template-columns: repeat(5, minmax(0, 1fr)); }
.gallery-columns-6 { grid-template-columns: repeat(6, minmax(0, 1fr)); }
.gallery-columns-7,
.gallery-columns-8,
.gallery-columns-9 { grid-template-columns: repeat(7, minmax(0, 1fr)); }

.gallery .gallery-item {
	width: auto !important;
	margin: 0 !important;
	float: none !important;
	text-align: center;
}

.gallery br {
	display: none;
}

.gallery .gallery-icon {
	margin: 0;
}

.gallery .gallery-icon img {
	display: block;
	width: 100%;
	height: auto;
	aspect-ratio: 4 / 3;
	border: 0 !important;
	object-fit: cover;
}

.gallery .gallery-caption {
	margin: 6px 0 0;
	font-size: 14px;
}

.gallery a,
.wp-block-gallery a,
.wp-block-image a {
	display: block;
	cursor: zoom-in;
}

@media (max-width: 800px) {
	.gallery[class*="gallery-columns-"] {
		grid-template-columns: repeat(3, minmax(0, 1fr));
		gap: 12px;
	}
}

@media (max-width: 480px) {
	.gallery[class*="gallery-columns-"] {
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}
}

/* Avalehe toetusteated: väikesed pildid kõrvuti, klikiga suureks (galeriiplokk klassiga „fesma-toetused“). */
.wp-block-gallery.has-nested-images.fesma-toetused {
	display: grid;
	grid-template-columns: repeat(3, minmax(0, 1fr));
	gap: 20px;
	align-items: center;
	max-width: 900px;
	margin: 40px auto 0;
}

.wp-block-gallery.has-nested-images.fesma-toetused figure.wp-block-image {
	width: auto !important;
	margin: 0 !important;
}

.wp-block-gallery.has-nested-images.fesma-toetused img {
	width: 100%;
	height: auto !important;
	border: 1px solid #e1e5ea;
	background: #fff;
	object-fit: contain;
}

.wp-block-gallery.fesma-toetused a:hover img,
.wp-block-gallery.fesma-toetused a:focus-visible img {
	border-color: var(--fesma-punane);
}

@media (max-width: 480px) {
	.wp-block-gallery.has-nested-images.fesma-toetused {
		gap: 10px;
	}
}

/* Avalehe kolm tulpa (Lihaveisefarm, Piimaveisefarm, Teenused): kahes esimeses on lehtede loend (päringuplokk),
   kolmandas pealkirjaplokid. Kõigil sama, tihedam reavahe. */
.home .entry-content > .wp-block-columns .wp-block-post-template > li {
	margin: 0;
}

.home .entry-content > .wp-block-columns .wp-block-post-template {
	gap: 0;
}

.home .entry-content > .wp-block-columns h6.wp-block-post-title,
.home .entry-content > .wp-block-columns h6.wp-block-heading,
.home .entry-content > .wp-block-columns .wp-block-column > p.has-small-font-size { /* ingliskeelsel avalehel on read lõikudena */
	margin: 0 !important;
	padding: 4px 0 !important;
	line-height: 1.5;
}

.home .entry-content > .wp-block-columns .wp-block-column > h2 {
	margin: 0 0 12px;
}

/* Avalehe lehtede loendid (päringuplokk) */
.wp-block-query .wp-block-post-template {
	margin: 0;
	padding: 0;
	list-style: none;
}

.wp-block-post-title a {
	color: inherit;
	text-decoration: none;
}

.wp-block-post-title a:hover {
	color: var(--fesma-punane);
}

/* ---------- 6. Karussell ---------- */
.fesma-karussell-raam {
	position: relative;
	margin-bottom: 40px;
}

.fesma-karussell-raam .wp-block-gallery.fesma-karussell {
	display: flex;
	flex-wrap: nowrap;
	gap: 20px;
	overflow-x: auto;
	scroll-snap-type: x mandatory;
	scrollbar-width: none;
}

.fesma-karussell-raam .wp-block-gallery.fesma-karussell::-webkit-scrollbar {
	display: none;
}

.fesma-karussell-raam .wp-block-gallery.fesma-karussell > figure.wp-block-image {
	flex: 0 0 calc((100% - 4 * 20px) / 5) !important;
	width: auto !important;
	margin: 0 !important;
	scroll-snap-align: start;
}

.fesma-karussell-raam .wp-block-gallery.fesma-karussell img {
	width: 100%;
	height: auto !important;
	aspect-ratio: 1200 / 1451;
	object-fit: cover;
}

.fesma-karussell-nupp {
	position: absolute;
	top: 50%;
	z-index: 2;
	width: 40px;
	height: 40px;
	margin: -20px 0 0;
	padding: 0 0 4px;
	border: 0;
	border-radius: 50%;
	background: rgb(31 41 51 / 75%);
	color: #fff;
	font-size: 28px;
	line-height: 1;
	cursor: pointer;
}

.fesma-karussell-nupp:hover,
.fesma-karussell-nupp:focus-visible {
	background: var(--fesma-punane);
}

.fesma-karussell-eelmine { left: 8px; }
.fesma-karussell-jargmine { right: 8px; }

@media (max-width: 1280px) {
	.fesma-karussell-raam .wp-block-gallery.fesma-karussell > figure.wp-block-image {
		flex-basis: calc((100% - 3 * 20px) / 4) !important;
	}
}

@media (max-width: 1000px) {
	.fesma-karussell-raam .wp-block-gallery.fesma-karussell > figure.wp-block-image {
		flex-basis: calc((100% - 2 * 20px) / 3) !important;
	}
}

@media (max-width: 700px) {
	.fesma-karussell-raam .wp-block-gallery.fesma-karussell > figure.wp-block-image {
		flex-basis: calc((100% - 20px) / 2) !important;
	}
}

@media (max-width: 440px) {
	.fesma-karussell-raam .wp-block-gallery.fesma-karussell > figure.wp-block-image {
		flex-basis: 100% !important;
	}
}

/* ---------- 7. Piltide suurendus ---------- */
.fesma-suurendus-avatud {
	overflow: hidden;
}

.fesma-suurendus {
	position: fixed;
	inset: 0;
	z-index: 4000;
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	padding: 56px 16px 16px;
	background: rgb(15 20 26 / 93%);
}

.fesma-suurendus[hidden] {
	display: none;
}

.fesma-suurendus-pilt {
	max-width: 100%;
	max-height: calc(100vh - 120px);
	object-fit: contain;
	box-shadow: 0 10px 40px rgb(0 0 0 / 50%);
}

.fesma-suurendus-tekst {
	margin: 12px 0 0;
	color: #fff;
	font-size: 14px;
	text-align: center;
}

.fesma-suurendus-nupp {
	position: absolute;
	width: 48px;
	height: 48px;
	margin: 0;
	padding: 0 0 4px;
	border: 0;
	border-radius: 50%;
	background: rgb(255 255 255 / 12%);
	color: #fff;
	font-size: 32px;
	line-height: 1;
	cursor: pointer;
}

.fesma-suurendus-nupp:hover,
.fesma-suurendus-nupp:focus-visible {
	background: var(--fesma-punane);
}

.fesma-suurendus-sulge { top: 8px; right: 12px; }
.fesma-suurendus-eelmine { top: 50%; left: 12px; margin-top: -24px; }
.fesma-suurendus-jargmine { top: 50%; right: 12px; margin-top: -24px; }

.fesma-suurendus-yks .fesma-suurendus-eelmine,
.fesma-suurendus-yks .fesma-suurendus-jargmine {
	display: none;
}

/* ---------- 8. Pood (vana lapsteema reeglid + külgriba) ---------- */
.single-product div.product .images.bundled_product_images {
	width: 80px;
}

.bundled_product_summary {
	padding-bottom: 0.1em !important;
}

/* Ostukorvis komplekti osade vahesumma ära. */
.product-subtotal .bundled_table_item_subtotal {
	font-size: 0;
}

.product-subtotal .woocommerce-Price-amount {
	font-size: 12px;
}

.product_type_bundle {
	display: none !important;
}

.summary .woocommerce-Price-amount bdi::after {
	color: #767676;
	font-size: small;
	content: " (Sis. 24% käibemaks)";
}

/* Külgriba kategooriapuus alamkategooriaid ei näidata. */
.wc-block-product-categories-list li li {
	display: none !important;
}

.wc-block-product-categories-list {
	margin: 0;
	padding: 0;
	list-style: none;
}

/* Kategooria rida: pilt ja nimi on lingi sees kõrvuti; pikk nimi murdub pildi kõrval tiheda reavahega. */
.wc-block-product-categories-list-item {
	margin: 0;
	padding: 0;
}

.wc-block-product-categories-list-item a {
	display: flex;
	gap: 10px;
	align-items: center;
	padding: 3px 0;
	color: var(--fesma-tume);
	font-size: 15px;
	line-height: 1.25;
	text-decoration: none;
}

.wc-block-product-categories-list-item a:hover {
	color: var(--fesma-punane);
}

.wc-block-product-categories-list-item__image {
	flex: 0 0 36px;
	width: 36px;
	max-width: none;
	margin: 0 !important;
	border: 0 !important;
}

.wc-block-product-categories-list-item__image img {
	display: block;
	width: 36px;
	height: 36px;
	object-fit: contain;
}

/* Telefonis kaks toodet reas (nagu vanas teemas). */
@media (max-width: 689px) {
	ul.products[data-products] {
		--shop-columns: repeat(2, minmax(0, 1fr));
	}
}

.woocommerce div.product div.images .flex-control-thumbs {
	margin-top: 0 !important;
}

/* ---------- 9. Küpsisebänner ---------- */
.fesma-nousolek {
	position: fixed;
	inset: auto 20px 20px;
	z-index: 3000;
	display: flex;
	flex-wrap: wrap;
	gap: 15px 30px;
	align-items: center;
	max-width: 1000px;
	margin-inline: auto;
	padding: 20px 25px;
	border-top: 4px solid var(--fesma-punane);
	background: #fff;
	box-shadow: 0 6px 30px rgb(0 0 0 / 25%);
	color: var(--fesma-tekst);
	font-size: 15px;
	line-height: 1.5;
}

.fesma-nousolek[hidden] {
	display: none;
}

.fesma-nousolek-sisu {
	flex: 1 1 420px;
}

.fesma-nousolek p {
	margin: 0 0 0.5em;
}

.fesma-nousolek-pealkiri {
	color: var(--fesma-tume);
	font-weight: 700;
}

.fesma-nousolek a {
	color: var(--fesma-punane-tume);
	text-decoration: underline;
}

.fesma-nousolek-valikud {
	display: flex;
	flex-wrap: wrap;
	gap: 8px 20px;
	margin: 10px 0 0;
	padding: 0;
	border: 0;
}

.fesma-nousolek-valikud[hidden] {
	display: none;
}

.fesma-nousolek-valikud label {
	display: inline-flex;
	gap: 6px;
	align-items: center;
	cursor: pointer;
}

.fesma-nousolek-nupud {
	display: flex;
	flex-wrap: wrap;
	gap: 10px;
}

.fesma-nousolek-nupud button {
	min-height: 40px;
	margin: 0;
	padding: 8px 18px;
	border: 2px solid var(--fesma-punane);
	border-radius: 3px;
	background: #fff;
	color: var(--fesma-punane-tume);
	font: inherit;
	font-weight: 600;
	font-size: 14px;
	cursor: pointer;
}

.fesma-nousolek-nupud .fesma-nousolek-jah {
	background: var(--fesma-punane);
	color: #fff;
}

.fesma-nousolek-nupud button:hover,
.fesma-nousolek-nupud button:focus-visible {
	border-color: var(--fesma-punane-tume);
	background: var(--fesma-punane-tume);
	color: #fff;
}

@media (max-width: 600px) {
	.fesma-nousolek {
		inset: auto 0 0;
		padding: 15px;
	}

	.fesma-nousolek-nupud {
		width: 100%;
	}

	.fesma-nousolek-nupud button {
		flex: 1 1 auto;
	}
}

/* ---------- 10. Tehtud tööd (kategooriate ja tööde ruudustik) ---------- */
.fesma-tt-pais {
	margin-bottom: 30px;
}

.fesma-tt-kirjeldus {
	margin-bottom: 40px;
}

.fesma-tt-ruudustik {
	display: grid;
	grid-template-columns: repeat(3, minmax(0, 1fr));
	gap: 30px;
	margin: 0 0 40px;
}

.fesma-tt-kaart {
	display: block;
	color: var(--fesma-tume);
	text-align: center;
	text-decoration: none !important;
}

.fesma-tt-pilt {
	display: block;
	overflow: hidden;
	aspect-ratio: 1;
	background: var(--fesma-hele);
}

.fesma-tt-pilt img {
	display: block;
	width: 100%;
	height: 100%;
	object-fit: cover;
	transition: transform 0.3s;
}

.fesma-tt-kaart:hover .fesma-tt-pilt img,
.fesma-tt-kaart:focus-visible .fesma-tt-pilt img {
	transform: scale(1.04);
}

.fesma-tt-nimi {
	display: block;
	padding: 12px 6px 0;
	font-weight: 700;
	font-size: 18px;
	line-height: 1.3;
}

.fesma-tt-kaart:hover .fesma-tt-nimi {
	color: var(--fesma-punane);
}

@media (max-width: 700px) {
	.fesma-tt-ruudustik {
		grid-template-columns: repeat(2, minmax(0, 1fr));
		gap: 16px;
	}

	.fesma-tt-nimi {
		font-size: 15px;
	}
}

.fesma-tt-tagasi {
	margin: 0 0 6px;
	font-size: 15px;
}

.fesma-tt-tagasi a {
	color: var(--fesma-punane-tume);
	text-decoration: none;
}

.fesma-tt-tagasi a:hover {
	text-decoration: underline;
}

/* E-poe avalehel (/e-pood/) pealkirjariba ei näidata. H1 jääb lehele ekraanilugejate ja otsimootorite jaoks.
   Kategooriatel ja otsingutulemustel on pealkiri alles. */
.woocommerce-shop:not(.search) .hero-section {
	position: absolute;
	width: 1px;
	height: 1px;
	margin: -1px;
	padding: 0;
	overflow: hidden;
	clip-path: inset(50%);
	white-space: nowrap;
}

/* Poe kategooria (ja poe otsingu) pealkirjariba madalamaks: Blocksy vaikimisi 250 px, nüüd pealkiri + 22 px üleval ja all. */
.woocommerce-page .hero-section[data-type="type-2"] > .entry-header {
	min-height: 0;
	padding-block: 22px;
}

.woocommerce-page .hero-section[data-type="type-2"] + .ct-container[data-vertical-spacing] {
	padding-top: 40px;
}

/* Külgriba kategooriapuu algab vasakust servast (ilma loendi taandeta). */
.ct-sidebar ul.wc-block-product-categories-list {
	margin: 0;
	padding: 0;
	list-style: none;
}

.ct-sidebar ul.wc-block-product-categories-list > li {
	margin: 0;
}

/* Lehe taust valge (Blocksy seab kehale paleti 7. värvi #f9f9fb; „html body“ on sellest tugevam). */
html body {
	background-color: #fff;
}

/* Poe kategooria pealkirjariba valgel taustal; pealkirja ja toodete vahe selle võrra väiksem. */
.woocommerce-page .hero-section[data-type="type-2"] {
	background-color: #fff !important; /* Blocksy enda reegel (kohandaja värv) on muidu tugevam */
}

.woocommerce-page .hero-section[data-type="type-2"] > .entry-header {
	padding-bottom: 0;
}

.woocommerce-page .hero-section[data-type="type-2"] + .ct-container[data-vertical-spacing] {
	padding-top: 28px;
}
