/* Fotoman Hakuvahti — Brand Guidelines 2024: musta, Royal Green #136207, Lemon Drop #F7F3ED, Poppins. */

.fotoman-hakuvahti {
	--fhv-vihrea: #136207;
	--fhv-tausta: #f7f3ed;
	--fhv-viiva: #ece6dc;
	font-family: "Poppins", "Helvetica Neue", Arial, sans-serif;
	color: #000;
	background: var(--fhv-tausta);
	border-radius: 8px;
	padding: 28px;
	margin: 28px 0;
	box-sizing: border-box;
}

.fotoman-hakuvahti *,
.fotoman-hakuvahti *::before,
.fotoman-hakuvahti *::after {
	box-sizing: inherit;
}

.fotoman-hakuvahti--tuotesivu {
	background: #fff;
	border: 1px solid var(--fhv-viiva);
	padding: 22px;
}

.fotoman-hakuvahti__otsikko {
	font-size: 20px;
	font-weight: 700;
	line-height: 1.3;
	margin: 0 0 8px;
	color: #000;
}

.fotoman-hakuvahti__teksti {
	font-size: 14px;
	line-height: 1.6;
	margin: 0 0 20px;
	color: #000;
}

.fotoman-hakuvahti__rivi {
	display: flex;
	flex-wrap: wrap;
	gap: 14px;
}

.fotoman-hakuvahti__rivi > .fotoman-hakuvahti__kentta {
	flex: 1 1 180px;
	min-width: 0;
}

.fotoman-hakuvahti__kentta {
	margin-bottom: 14px;
	position: relative;
}

.fotoman-hakuvahti__kentta label {
	display: block;
	font-size: 12px;
	letter-spacing: 1px;
	text-transform: uppercase;
	color: var(--fhv-vihrea);
	margin-bottom: 6px;
}

.fotoman-hakuvahti input[type="text"],
.fotoman-hakuvahti input[type="email"],
.fotoman-hakuvahti input[type="tel"],
.fotoman-hakuvahti input[type="number"],
.fotoman-hakuvahti textarea {
	width: 100%;
	font-family: inherit;
	font-size: 15px;
	color: #000;
	background: #fff;
	border: 1px solid var(--fhv-viiva);
	border-radius: 6px;
	padding: 11px 13px;
	line-height: 1.4;
}

.fotoman-hakuvahti input:focus,
.fotoman-hakuvahti textarea:focus {
	outline: 2px solid var(--fhv-vihrea);
	outline-offset: 1px;
	border-color: var(--fhv-vihrea);
}

.fotoman-hakuvahti textarea {
	resize: vertical;
}

/* Mallihaun ehdotukset. */
.fotoman-hakuvahti__ehdotukset {
	position: absolute;
	z-index: 30;
	top: 100%;
	left: 0;
	right: 0;
	margin: 4px 0 0;
	padding: 4px;
	list-style: none;
	background: #fff;
	border: 1px solid var(--fhv-viiva);
	border-radius: 6px;
	box-shadow: 0 8px 24px rgba(0, 0, 0, 0.1);
	max-height: 240px;
	overflow-y: auto;
}

.fotoman-hakuvahti__ehdotukset li {
	font-size: 14px;
	padding: 9px 11px;
	border-radius: 4px;
	cursor: pointer;
	margin: 0;
}

.fotoman-hakuvahti__ehdotukset li:hover,
.fotoman-hakuvahti__ehdotukset li[aria-selected="true"] {
	background: var(--fhv-tausta);
}

.fotoman-hakuvahti--tuotesivu .fotoman-hakuvahti__ehdotukset li:hover,
.fotoman-hakuvahti--tuotesivu .fotoman-hakuvahti__ehdotukset li[aria-selected="true"] {
	background: #f2efe9;
}

.fotoman-hakuvahti__valinta {
	display: flex;
	align-items: center;
	gap: 9px;
	font-size: 14px;
	margin: 4px 0 18px;
	cursor: pointer;
}

.fotoman-hakuvahti__valinta input {
	width: 17px;
	height: 17px;
	accent-color: var(--fhv-vihrea);
	margin: 0;
	flex: none;
}

.fotoman-hakuvahti__nappi {
	display: inline-block;
	font-family: inherit;
	font-size: 15px;
	font-weight: 700;
	color: #fff;
	background: var(--fhv-vihrea);
	border: 0;
	border-radius: 6px;
	padding: 13px 30px;
	cursor: pointer;
	transition: background 0.15s ease;
}

.fotoman-hakuvahti__nappi:hover:not(:disabled) {
	background: #000;
}

.fotoman-hakuvahti__nappi:disabled {
	opacity: 0.6;
	cursor: default;
}

.fotoman-hakuvahti__pikkuteksti {
	font-size: 12px;
	line-height: 1.5;
	color: #666;
	margin: 12px 0 0;
}

.fotoman-hakuvahti__palaute {
	font-size: 14px;
	line-height: 1.5;
	margin: 12px 0 0;
	display: none;
}

.fotoman-hakuvahti__palaute[data-tila] {
	display: block;
	padding: 12px 14px;
	border-radius: 6px;
}

.fotoman-hakuvahti__palaute[data-tila="ok"] {
	background: #fff;
	border-left: 3px solid var(--fhv-vihrea);
	color: #000;
}

.fotoman-hakuvahti--tuotesivu .fotoman-hakuvahti__palaute[data-tila="ok"] {
	background: var(--fhv-tausta);
}

.fotoman-hakuvahti__palaute[data-tila="virhe"] {
	background: #fdf1f1;
	border-left: 3px solid #b3261e;
	color: #7a1c16;
}

/* Hunajapurkki pois näkyvistä, mutta ei display:none — osa boteista ohittaa sen. */
.fotoman-hakuvahti__purkki {
	position: absolute;
	left: -9999px;
	width: 1px;
	height: 1px;
	overflow: hidden;
}

/* Käytettyjen tuotesivuilla ei jonoteta kappaletta joka ei palaa varastoon. */
body.fotoman-hakuvahti-kaytetty .cwginstock-subscribe-form,
body.fotoman-hakuvahti-kaytetty .cwginstock-panel-primary {
	display: none !important;
}

@media (max-width: 600px) {
	.fotoman-hakuvahti {
		padding: 20px;
	}

	.fotoman-hakuvahti__nappi {
		width: 100%;
	}
}

/* --- Hakuvahti-sivun hero. Markup sivun sisällössä, tyylit täällä jotta
       klassinen editori ei pääse rikkomaan niitä (wpautop syö style-lohkot). --- */

.fh-hero {
	position: relative;
	background: #000;
	border-radius: 8px;
	padding: 64px 48px 56px;
	margin: 0 0 36px;
	overflow: hidden;
	font-family: "Poppins", "Helvetica Neue", Arial, sans-serif;
}

.fh-hero__kehys {
	position: absolute;
	inset: 18px;
	pointer-events: none;
}

.fh-hero__kehys i {
	position: absolute;
	width: 26px;
	height: 26px;
	border: 0 solid #136207;
}

.fh-hero__kehys i:nth-child(1) { top: 0; left: 0; border-top-width: 3px; border-left-width: 3px; }
.fh-hero__kehys i:nth-child(2) { top: 0; right: 0; border-top-width: 3px; border-right-width: 3px; }
.fh-hero__kehys i:nth-child(3) { bottom: 0; left: 0; border-bottom-width: 3px; border-left-width: 3px; }
.fh-hero__kehys i:nth-child(4) { bottom: 0; right: 0; border-bottom-width: 3px; border-right-width: 3px; }

.fh-hero__ylarivi {
	display: flex;
	align-items: center;
	gap: 10px;
	margin: 0 0 22px;
}

.fh-hero__piste {
	width: 9px;
	height: 9px;
	border-radius: 50%;
	background: #2ecc40;
	animation: fh-pulssi 2s ease-in-out infinite;
}

@keyframes fh-pulssi {
	0%, 100% { opacity: 1; }
	50% { opacity: 0.25; }
}

.fh-hero__tila {
	font-size: 12px;
	letter-spacing: 2px;
	text-transform: uppercase;
	color: #f7f3ed;
	opacity: 0.85;
}

/* Teeman otsikkoväri kumotaan; versaalit saavat jäädä, ne ovat sivuston tyyli. */
.fh-hero .fh-hero__otsikko {
	font-size: 44px;
	line-height: 1.12;
	font-weight: 700;
	color: #fff !important;
	margin: 0 0 6px;
}

.fh-hero__teksti {
	font-size: 16px;
	line-height: 1.7;
	color: #f7f3ed;
	opacity: 0.9;
	max-width: 34em;
	margin: 14px 0 30px;
	font-weight: 300;
}

.fh-hero__napit {
	display: flex;
	flex-wrap: wrap;
	gap: 14px;
	align-items: center;
	margin: 0;
}

/* !important: teeman linkkisäännöt (väri, alleviivaus) yliajavat muuten
   nämä mustalla taustalla, jolloin napista tulee lukukelvoton. */
.fh-hero .fh-hero__cta {
	display: inline-block;
	background: #136207;
	color: #fff !important;
	font-size: 15px;
	font-weight: 700;
	text-decoration: none !important;
	padding: 14px 32px;
	border-radius: 6px;
	transition: background 0.15s ease;
}

.fh-hero .fh-hero__cta:hover,
.fh-hero .fh-hero__cta:focus {
	background: #1b7d0d;
	color: #fff !important;
}

.fh-hero .fh-hero__toissijainen {
	color: #f7f3ed !important;
	font-size: 14px;
	text-decoration: underline;
	text-underline-offset: 4px;
}

.fh-hero .fh-hero__toissijainen:hover {
	color: #fff !important;
}

.fh-hero__vuosi {
	position: absolute;
	right: 44px;
	bottom: 40px;
	text-align: right;
	color: #f7f3ed;
	opacity: 0.55;
	font-size: 12px;
	letter-spacing: 2px;
	text-transform: uppercase;
	line-height: 1.7;
}

@media (max-width: 760px) {
	.fh-hero {
		padding: 44px 26px 40px;
	}

	.fh-hero .fh-hero__otsikko {
		font-size: 30px;
	}

	.fh-hero__vuosi {
		display: none;
	}

	.fh-hero .fh-hero__cta {
		width: 100%;
		text-align: center;
	}
}

/* --- Käytettyjen kategoriasivut: kuvauksen kortit ja hakuvahti-nosto.
       Markup kategorian kuvauskentässä, tyylit täällä. --- */

.fh-kat-intro {
	font-size: 15px;
	line-height: 1.7;
	max-width: 60em;
}

.fh-kat-grid {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
	gap: 14px;
	margin: 22px 0;
}

.fh-kat-kortti {
	background: #f7f3ed;
	border-radius: 8px;
	padding: 18px 20px 16px;
	font-size: 14px;
	line-height: 1.6;
}

.fh-kat-kortti strong {
	display: block;
	margin-bottom: 4px;
	color: #000;
}

.fh-kat-kortti strong::before {
	content: "✓";
	color: #136207;
	font-weight: 700;
	margin-right: 8px;
}

.fh-kat-ctat {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
	gap: 14px;
	margin: 22px 0 10px;
}

.fh-kat-cta {
	border-radius: 8px;
	padding: 22px 24px;
	font-size: 14px;
	line-height: 1.6;
}

.fh-kat-cta--vihrea {
	background: #136207;
	color: #fff;
}

.fh-kat-cta--vihrea strong {
	color: #fff;
	font-size: 16px;
	display: block;
	margin-bottom: 6px;
}

.fh-kat-cta--vaalea {
	background: #f7f3ed;
	color: #000;
}

.fh-kat-cta--vaalea strong {
	font-size: 16px;
	display: block;
	margin-bottom: 6px;
}

.fh-kat-cta .fh-kat-cta__nappi {
	display: inline-block;
	margin-top: 12px;
	font-size: 14px;
	font-weight: 700;
	text-decoration: none !important;
	padding: 10px 22px;
	border-radius: 6px;
}

.fh-kat-cta--vihrea .fh-kat-cta__nappi {
	background: #fff;
	color: #136207 !important;
}

.fh-kat-cta--vaalea .fh-kat-cta__nappi {
	background: #136207;
	color: #fff !important;
}

.fh-kat-cta a:not(.fh-kat-cta__nappi) {
	color: inherit !important;
	text-decoration: underline;
}

/* Nosto tuotelistan jälkeen — pienoisversio heron tähtäinkehyksestä. */
.fh-banneri {
	position: relative;
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 20px;
	background: #000;
	border-radius: 8px;
	padding: 30px 36px;
	margin: 36px 0 10px;
	font-family: "Poppins", "Helvetica Neue", Arial, sans-serif;
	clear: both;
}

.fh-banneri__kehys {
	position: absolute;
	inset: 10px;
	pointer-events: none;
}

.fh-banneri__kehys i {
	position: absolute;
	width: 16px;
	height: 16px;
	border: 0 solid #136207;
}

.fh-banneri__kehys i:nth-child(1) { top: 0; left: 0; border-top-width: 2px; border-left-width: 2px; }
.fh-banneri__kehys i:nth-child(2) { top: 0; right: 0; border-top-width: 2px; border-right-width: 2px; }
.fh-banneri__kehys i:nth-child(3) { bottom: 0; left: 0; border-bottom-width: 2px; border-left-width: 2px; }
.fh-banneri__kehys i:nth-child(4) { bottom: 0; right: 0; border-bottom-width: 2px; border-right-width: 2px; }

.fh-banneri__sisalto {
	flex: 1 1 340px;
}

.fh-banneri__otsikko {
	font-size: 20px;
	font-weight: 700;
	color: #fff !important;
	margin: 0 0 6px;
}

.fh-banneri__teksti {
	font-size: 14px;
	line-height: 1.6;
	color: #f7f3ed;
	opacity: 0.9;
	margin: 0;
	max-width: 44em;
}

.fh-banneri .fh-banneri__nappi {
	flex: none;
	display: inline-block;
	background: #136207;
	color: #fff !important;
	font-size: 15px;
	font-weight: 700;
	text-decoration: none !important;
	padding: 13px 30px;
	border-radius: 6px;
	transition: background 0.15s ease;
}

.fh-banneri .fh-banneri__nappi:hover {
	background: #1b7d0d;
}

.fh-banneri__napit {
	flex: none;
	display: flex;
	flex-direction: column;
	align-items: flex-start;
	gap: 10px;
}

.fh-banneri .fh-banneri__toissijainen {
	color: #f7f3ed !important;
	font-size: 13px;
	text-decoration: underline;
	text-underline-offset: 3px;
}

.fh-banneri .fh-banneri__toissijainen:hover {
	color: #fff !important;
}

@media (max-width: 600px) {
	.fh-banneri {
		padding: 24px 22px;
	}

	.fh-banneri .fh-banneri__nappi {
		width: 100%;
		text-align: center;
	}

	.fh-banneri__napit {
		width: 100%;
		align-items: center;
	}
}

/* --- Kategoriakuvauksen tiivis muoto: merkkichipit ja avattava lisäteksti,
       jotta tuotteet alkavat mobiilissakin heti. --- */

.fh-kat-chips {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
	margin: 14px 0 6px;
	padding: 0;
	list-style: none;
}

.fh-kat-chips li {
	background: #f7f3ed;
	border-radius: 999px;
	padding: 6px 14px;
	font-size: 13px;
	line-height: 1.4;
	margin: 0;
}

.fh-kat-chips li::before {
	content: "\2713";
	color: #136207;
	font-weight: 700;
	margin-right: 6px;
}

details.fh-kat-lisaa {
	margin: 10px 0 4px;
}

details.fh-kat-lisaa > summary {
	display: inline-block;
	cursor: pointer;
	list-style: none;
	font-size: 14px;
	font-weight: 600;
	color: #136207;
	text-decoration: underline;
	text-underline-offset: 3px;
	padding: 4px 0;
}

details.fh-kat-lisaa > summary::-webkit-details-marker {
	display: none;
}

details.fh-kat-lisaa > summary::after {
	content: " \25BE";
	text-decoration: none;
}

details.fh-kat-lisaa[open] > summary::after {
	content: " \25B4";
}

details.fh-kat-lisaa > .fh-kat-lisaa__sisalto {
	padding-top: 10px;
	font-size: 14px;
	line-height: 1.7;
	max-width: 60em;
}

/* Vihje hakukentän alla: kenttä on vapaa tekstikenttä, ei pudotusvalikko. */
.fotoman-hakuvahti__vihje {
	font-size: 12.5px;
	line-height: 1.5;
	color: #5a5a5a;
	margin: 7px 0 0;
}

/* Ehdotuslistan alarivi — ei valittavissa, kertoo vain ettei listasta tarvitse valita. */
.fotoman-hakuvahti__ehdotukset li.fotoman-hakuvahti__vapaa {
	border-top: 1px solid var(--fhv-viiva);
	margin-top: 4px;
	padding-top: 10px;
	font-size: 12.5px;
	color: #5a5a5a;
	cursor: default;
	border-radius: 0;
}

.fotoman-hakuvahti__ehdotukset li.fotoman-hakuvahti__vapaa:hover {
	background: transparent;
}
