/**
 * Flowpark Kauppa
 * Värit, fontit ja peruskoot ovat theme.json-tiedostossa. Tässä vain asettelu ja yksityiskohdat.
 */

:root {
	--fp-oranssi: var(--wp--preset--color--oranssi);
	--fp-tumma: var(--wp--preset--color--oranssi-tumma);
	--fp-musta: var(--wp--preset--color--musta);
	--fp-raja: var(--wp--preset--color--raja);
	--fp-harmaa: var(--wp--preset--color--harmaa);
	--fp-condensed: var(--wp--preset--font-family--barlow-condensed);
	--fp-radius: 10px;
}

html {
	scroll-behavior: smooth;
}

@media (prefers-reduced-motion: reduce) {
	html {
		scroll-behavior: auto;
	}

	*,
	*::before,
	*::after {
		transition: none !important;
		animation: none !important;
	}
}

/* Ei valkoisia rakoja ylätunnisteen, sisällön ja alatunnisteen väliin. */
.wp-site-blocks > * {
	margin-block-start: 0;
}

[id] {
	scroll-margin-top: 120px;
}

:focus-visible {
	outline: 3px solid var(--fp-oranssi);
	outline-offset: 2px;
}

/* ---------- Ylätunniste ---------- */

@media (min-width: 782px) {
	.wp-site-blocks > header.wp-block-template-part {
		position: sticky;
		top: 0;
		z-index: 100;
	}

	.admin-bar .wp-site-blocks > header.wp-block-template-part {
		top: 32px;
	}
}

.fp-topbar p {
	margin: 0;
	letter-spacing: 0.02em;
}

.fp-topbar .fp-dot {
	color: var(--fp-oranssi);
	margin: 0 0.6em;
}

@media (max-width: 600px) {
	.fp-topbar {
		display: none;
	}
}

.fp-header {
	border-bottom: 1px solid var(--fp-raja);
}

.fp-logo {
	margin: 0 !important;
	line-height: 0;
	flex-shrink: 0;
}

.fp-logo img {
	display: block;
	border-radius: 4px;
}

@media (max-width: 600px) {
	.fp-logo img {
		width: 70px !important;
	}
}

.fp-header .wp-block-navigation-item__content {
	text-decoration: none;
	color: var(--fp-musta);
	padding-block: 0.25em;
	border-bottom: 3px solid transparent;
	transition: border-color 0.15s ease;
}

.fp-header .wp-block-navigation-item__content:hover,
.fp-header .wp-block-navigation-item__content:focus-visible {
	border-bottom-color: var(--fp-oranssi);
	color: var(--fp-musta);
}

.fp-nav-external .wp-block-navigation-item__content::after {
	content: " ↗";
	color: var(--fp-tumma);
}

.wp-block-navigation__responsive-container.is-menu-open {
	padding: 1.5rem;
}

.wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation-item__content {
	color: #fff;
	font-size: 1.75rem;
	border-bottom: 0;
}

.wp-block-navigation__responsive-container.is-menu-open .fp-nav-external .wp-block-navigation-item__content::after {
	color: var(--fp-oranssi);
}

.fp-header .wc-block-mini-cart__button,
.fp-header .wp-block-woocommerce-customer-account a,
.fp-header .wc-block-customer-account a {
	color: var(--fp-musta);
}

.fp-header .wp-block-woocommerce-customer-account a:hover,
.fp-header .wc-block-mini-cart__button:hover {
	color: var(--fp-tumma);
}

.fp-header .wc-block-mini-cart__badge {
	background: var(--fp-oranssi);
	color: var(--fp-musta);
	font-weight: 700;
}

/* ---------- Yhteiset ---------- */

.fp-kicker {
	font-family: var(--fp-condensed);
	font-weight: 700;
	font-size: 1.05rem;
	text-transform: uppercase;
	letter-spacing: 0.14em;
	color: var(--fp-oranssi);
	margin-bottom: 0.25rem;
}

.wp-block-button.is-style-outline > .wp-block-button__link {
	background: transparent;
	color: var(--fp-musta);
	border: 2px solid currentColor;
	padding: calc(0.8em - 2px) calc(1.5em - 2px);
}

.wp-block-button.is-style-outline > .wp-block-button__link:hover,
.wp-block-button.is-style-outline > .wp-block-button__link:focus-visible {
	background: var(--fp-musta);
	border-color: var(--fp-musta);
	color: #fff;
}

.wp-block-button.fp-button-light > .wp-block-button__link {
	color: #fff;
	border-color: rgba(255, 255, 255, 0.85);
}

.wp-block-button.fp-button-light > .wp-block-button__link:hover,
.wp-block-button.fp-button-light > .wp-block-button__link:focus-visible {
	background: #fff;
	border-color: #fff;
	color: var(--fp-musta);
}

/* ---------- Kansikuva ---------- */

.fp-hero h1 {
	margin-top: 0.1em;
	margin-bottom: 0.3em;
	text-shadow: 0 2px 24px rgba(0, 0, 0, 0.25);
}

.fp-hero p.has-large-font-size {
	max-width: 34rem;
}

@media (max-width: 781px) {
	.fp-hero {
		min-height: 520px !important;
	}

	.fp-hero .wp-block-cover__background {
		background: linear-gradient(180deg, rgba(26, 26, 24, 0.45) 0%, rgba(26, 26, 24, 0.88) 70%) !important;
	}

	.fp-hero .wp-block-cover__image-background {
		object-position: 70% 30% !important;
	}
}

/* ---------- Puistokortit ---------- */

.fp-park-card {
	display: flex;
	flex-direction: column;
	border-radius: var(--fp-radius);
	overflow: hidden;
	box-shadow: var(--wp--preset--shadow--kortti);
	transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.fp-park-card:hover {
	transform: translateY(-3px);
	box-shadow: 0 2px 4px rgba(26, 26, 24, 0.08), 0 18px 36px rgba(26, 26, 24, 0.14);
}

.fp-park-card .fp-park-image {
	margin: 0;
}

.fp-park-card .fp-park-image img {
	display: block;
	width: 100%;
}

.fp-park-visual {
	aspect-ratio: 3 / 2;
	min-height: 0 !important;
	margin: 0 !important;
}

.fp-park-visual.wp-block-cover {
	align-items: flex-end;
}

.fp-park-tile {
	display: flex;
	flex-direction: column;
	justify-content: space-between;
	padding: 1.25rem;
	color: #fff;
	background-image: repeating-linear-gradient(135deg, rgba(255, 255, 255, 0.07) 0 2px, transparent 2px 16px);
}

.fp-park-tile p {
	margin: 0;
}

.fp-tile-arrow {
	align-self: flex-end;
	font-size: 3.25rem;
	line-height: 1;
	font-weight: 700;
}

.fp-park-card .fp-tile-name {
	margin: 0;
	font-family: var(--fp-condensed);
	font-weight: 800;
	font-size: clamp(2.4rem, 3.2vw, 3.25rem);
	line-height: 0.95;
	text-transform: uppercase;
	color: #fff;
	text-shadow: 0 1px 12px rgba(0, 0, 0, 0.2);
}

.fp-park-body {
	flex: 1;
	display: flex;
	flex-direction: column;
}

.fp-park-body h3 {
	margin: 0;
	font-size: 1.75rem;
	text-transform: uppercase;
}

.fp-park-body p {
	margin: 0;
}

.fp-park-body .wp-block-buttons {
	margin-top: auto !important;
	padding-top: 1rem;
}

/* ---------- Näin lippu toimii ---------- */

.fp-step {
	padding: 1.75rem;
	border: 1px solid var(--fp-raja);
	border-radius: var(--fp-radius);
	background: #fff;
}

.fp-step h3,
.fp-step p {
	margin: 0;
}

.fp-step-number {
	display: grid;
	place-items: center;
	width: 3rem;
	height: 3rem;
	margin: 0 0 0.4rem !important;
	border-radius: 50%;
	background: var(--fp-oranssi);
	color: var(--fp-musta);
	font-family: var(--fp-condensed);
	font-weight: 800;
	font-size: 1.6rem;
	line-height: 1;
}

/* ---------- Kuukausikortti ---------- */

.fp-band .fp-kicker {
	color: var(--fp-oranssi);
}

.fp-ticket {
	position: relative;
	max-width: 340px;
	margin-inline: auto;
	border-radius: 14px;
	box-shadow: 0 24px 60px rgba(0, 0, 0, 0.35);
	transform: rotate(-3deg);
}

.fp-ticket::before,
.fp-ticket::after {
	content: "";
	position: absolute;
	top: 34%;
	width: 24px;
	height: 24px;
	border-radius: 50%;
	background: var(--wp--preset--color--metsa);
}

.fp-ticket::before {
	left: -12px;
}

.fp-ticket::after {
	right: -12px;
}

.fp-ticket p,
.fp-ticket .wp-block-image {
	margin: 0;
}

.fp-ticket-label {
	font-family: var(--fp-condensed);
	font-weight: 800;
	font-size: 1.6rem;
	line-height: 1;
	text-transform: uppercase;
}

.fp-ticket-qr {
	border-top: 2px dashed var(--fp-raja);
	padding-top: 1.1rem !important;
}

.fp-ticket-qr img {
	display: block;
	margin-inline: auto;
}

@media (max-width: 781px) {
	.fp-ticket {
		transform: none;
		margin-top: 1rem;
	}
}

/* ---------- Usein kysyttyä ---------- */

.fp-faq .wp-block-details:first-child {
	border-top: 1px solid var(--fp-raja);
}

.wp-block-details summary {
	display: flex;
	justify-content: space-between;
	align-items: center;
	gap: 1rem;
	cursor: pointer;
	list-style: none;
	font-family: var(--fp-condensed);
	font-weight: 700;
	font-size: 1.35rem;
	line-height: 1.25;
}

.wp-block-details summary::-webkit-details-marker {
	display: none;
}

.wp-block-details summary::after {
	content: "+";
	flex-shrink: 0;
	color: var(--fp-tumma);
	font-size: 2rem;
	line-height: 1;
	transition: transform 0.2s ease;
}

.wp-block-details[open] summary::after {
	transform: rotate(45deg);
}

.wp-block-details > p {
	max-width: 65ch;
	margin-top: 0.6rem;
	color: var(--fp-harmaa);
}

/* ---------- Alatunniste ---------- */

.fp-footer .wp-block-image {
	margin: 0 0 1rem;
}

.fp-footer .fp-footer-title {
	margin: 0 0 0.75rem;
	font-size: 1.1rem;
	letter-spacing: 0.08em;
	text-transform: uppercase;
	color: var(--fp-oranssi);
}

.fp-footer-list {
	list-style: none;
	margin: 0;
	padding: 0;
}

.fp-footer-list li {
	margin: 0.35rem 0;
}

.fp-footer a {
	text-decoration: none;
}

.fp-footer a:hover,
.fp-footer a:focus-visible {
	text-decoration: underline;
}

/* ---------- WooCommerce: tuotelistaus ---------- */

.wc-block-product-template .wc-block-product,
.wp-block-woocommerce-product-template .wc-block-product {
	display: flex;
	flex-direction: column;
	padding-bottom: 1.25rem;
	background: #fff;
	border: 1px solid var(--fp-raja);
	border-radius: var(--fp-radius);
	overflow: hidden;
	box-shadow: var(--wp--preset--shadow--kortti);
	transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.wc-block-product-template .wc-block-product:hover {
	transform: translateY(-2px);
	box-shadow: 0 2px 4px rgba(26, 26, 24, 0.08), 0 16px 32px rgba(26, 26, 24, 0.12);
}

.wc-block-product > *:not(.wc-block-components-product-image):not(.wp-block-woocommerce-product-image) {
	padding-inline: 1.1rem;
}

.wc-block-product .wc-block-components-product-image {
	margin: 0 0 1rem !important;
}

/* Lippukuvat ovat 5:2-bannereita (1400 × 560). Sama muoto myös ilman kuvaa. */
.wc-block-product .wc-block-components-product-image img {
	width: 100%;
	height: auto !important;
	aspect-ratio: 5 / 2 !important;
	object-fit: cover;
	border-radius: 0;
}

.wc-block-product .wp-block-post-title {
	font-family: var(--fp-condensed);
	font-weight: 700;
	font-size: 1.4rem !important;
	line-height: 1.15;
	text-align: left !important;
	text-transform: none;
	margin-top: 0;
}

.wc-block-product .wp-block-post-title a {
	color: var(--fp-musta);
	text-decoration: none;
}

.wc-block-product .wc-block-components-product-price {
	text-align: left !important;
}

.wc-block-components-product-price,
.wc-block-grid__product-price,
.wp-block-woocommerce-product-price {
	font-family: var(--fp-condensed);
	font-weight: 700;
	color: var(--fp-musta);
}

.wc-block-product .wc-block-components-product-price,
.wp-block-woocommerce-product-price .wc-block-components-product-price {
	font-size: 1.4rem !important;
}

.fp-checkout-back {
	margin: 0;
	font-weight: 600;
}

.fp-checkout-back a {
	color: var(--fp-musta);
}

.wc-block-product .wp-block-button.wc-block-components-product-button {
	margin-top: auto;
	justify-content: flex-start;
	align-items: stretch;
}

.wc-block-product .wc-block-components-product-button__button {
	width: 100%;
}

/* Puiston sivun ja kauppasivun otsikot */
.wp-block-query-title,
.woocommerce-products-header__title {
	text-transform: uppercase;
}

.wc-block-breadcrumbs,
.woocommerce-breadcrumb {
	font-size: var(--wp--preset--font-size--small);
	color: var(--fp-harmaa);
}

/* ---------- WooCommerce: tuotesivu, ostoskori ja kassa ---------- */

.single-product h1.wp-block-post-title {
	font-size: clamp(2rem, 1.3rem + 2.2vw, 3.1rem) !important;
	line-height: 1.02;
}

.wp-block-woocommerce-product-image-gallery img,
.woocommerce-product-gallery img {
	border-radius: var(--fp-radius);
}

.wc-block-add-to-cart-form .quantity input.qty,
.woocommerce .quantity input.qty {
	min-height: 3rem;
	border: 1px solid var(--fp-raja);
	border-radius: 6px;
	font-size: 1.1rem;
}

/* Lippulisäosan kentät tuotesivulla, esim. kortin haltijan nimi */
.fpl-field {
	margin: 0 0 1rem;
}

.fpl-field label {
	display: block;
	margin-bottom: 0.35rem;
	font-weight: 600;
}

.fpl-field input[type="text"],
.fpl-field input[type="email"],
.fpl-field input[type="date"],
.fpl-field select {
	width: 100%;
	max-width: 26rem;
	min-height: 3rem;
	padding: 0.5rem 0.75rem;
	border: 1px solid #8f8b82;
	border-radius: 6px;
	font: inherit;
	background: #fff;
}

.woocommerce .return-to-shop,
.wc-block-cart .wp-block-woocommerce-empty-cart-block .wp-block-button {
	margin-top: 1.25rem;
}

.wc-block-components-text-input input,
.wc-block-components-text-input textarea,
.wc-block-components-combobox .wc-block-components-combobox-control input,
.wc-blocks-components-select .wc-blocks-components-select__select {
	border-radius: 6px !important;
}

.wc-block-cart__submit-button,
.wc-block-components-checkout-place-order-button {
	width: 100%;
}

.wc-block-components-totals-footer-item .wc-block-components-totals-item__value,
.wc-block-components-totals-footer-item .wc-block-components-totals-item__label {
	font-family: var(--fp-condensed);
	font-size: 1.4rem;
	font-weight: 800;
}

.wc-block-components-notice-banner {
	border-radius: 8px;
}

.woocommerce-store-notice,
p.demo_store {
	background: var(--fp-musta);
}
