/*
Theme Name: Adventure Seeds - Blocksy child
Theme URI: https://creativethemes.com/blocksy/
Description: Child theme til Adventure Seeds baseret på Blocksy.
Author: Sabina Winther
Template: blocksy
Version: 1.1.9
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: adventure-seeds-blocksy-child
*/

/* Adventure Seeds topbar */
.adventure-seeds-topbar {
	background: #526c2d;
	color: #ffffff;
	font-size: 14px;
	font-weight: 700;
	line-height: 1.45;
	text-align: center;
	padding: 9px 16px;
	width: 100%;
	box-sizing: border-box;
}

.adventure-seeds-topbar__inner {
	max-width: var(--theme-container-width, 1290px);
	margin: 0 auto;
}

.adventure-seeds-topbar a {
	color: inherit;
	text-decoration: underline;
	text-underline-offset: 3px;
}

.adventure-seeds-topbar p {
	margin: 0;
}


/* Adventure Seeds page hero for ordinary pages
   Matches the 1520 x 250 category banner artwork. */
.as-page-main {
	background: #ffffff;
}

.as-page-hero {
	background: #f2f3f4;
}

.as-page-hero__visual {
	position: relative;
	height: 250px;
	min-height: 250px;
	background-color: #f2f3f4;
	background-image: var(--as-page-hero-image);
	background-repeat: no-repeat;
	background-position: center top;
	background-size: 1520px 250px;
	overflow: hidden;
}

.as-page-hero--no-image .as-page-hero__visual {
	background-image: linear-gradient(135deg, #526c2d, #2f3f1b);
	background-size: cover;
}

.as-page-hero__content {
	position: absolute;
	top: 104px;
	left: max(1rem, calc(50% - 73px));
	right: max(1rem, calc(50% - 352px));
	color: #526c2d;
	z-index: 2;
}

.as-page-hero--no-image .as-page-hero__content {
	left: max(1rem, calc(50% - 645px));
	right: max(1rem, calc(50% - 645px));
	color: #ffffff;
}

.as-page-hero__title {
	margin: 0 0 0.25rem;
	color: inherit;
	font-size: clamp(2.05rem, 3vw, 3rem);
	font-weight: 800;
	line-height: 0.98;
	letter-spacing: -0.025em;
	text-wrap: balance;
}

.as-page-hero__subtitle {
	max-width: 470px;
	margin: 0;
	color: inherit;
	font-size: clamp(1rem, 1.25vw, 1.25rem);
	line-height: 1.25;
	font-weight: 400;
	text-wrap: balance;
}

.as-page-hero__breadcrumbs {
	margin-top: 0.55rem;
	font-size: 0.78rem;
	line-height: 1.2;
	font-weight: 500;
	color: rgba(82, 108, 45, 0.78);
}

.as-page-hero--no-image .as-page-hero__breadcrumbs {
	color: rgba(255, 255, 255, 0.82);
}

.as-page-hero__breadcrumbs .ct-breadcrumbs {
	margin: 0;
	color: inherit;
}

.as-page-hero__breadcrumbs .ct-breadcrumbs,
.as-page-hero__breadcrumbs .ct-breadcrumbs a,
.as-page-hero__breadcrumbs .ct-breadcrumbs span {
	color: inherit;
}

.as-page-hero__breadcrumbs .ct-breadcrumbs a:hover {
	color: #526c2d;
	text-decoration: underline;
	text-underline-offset: 3px;
}

.as-page-hero--no-image .as-page-hero__breadcrumbs .ct-breadcrumbs a:hover {
	color: #ffffff;
}

.as-page-hero__breadcrumbs .ct-separator,
.as-page-hero__breadcrumbs .ct-separator-custom {
	opacity: 0.7;
}

.as-page-content-container {
	padding-top: clamp(2.5rem, 5vw, 4rem);
	padding-bottom: clamp(2.5rem, 5vw, 4rem);
}

.as-search-results-container {
	padding-top: clamp(2.5rem, 5vw, 4rem);
	padding-bottom: clamp(2.5rem, 5vw, 4rem);
}

.as-page-content-wrap {
	margin: 0;
}

.as-page-edit-link {
	margin-top: 2rem;
}

@media (max-width: 900px) and (min-width: 768px) {
	.as-page-hero__title {
		font-size: clamp(2rem, 4.8vw, 2.65rem);
	}

	.as-page-hero__subtitle {
		font-size: 1rem;
		max-width: 410px;
	}
}

@media (max-width: 767px) {
	.as-page-hero {
		background: #ffffff;
	}

	.as-page-hero__visual {
		height: auto;
		min-height: 0;
		padding-top: clamp(135px, 40vw, 190px);
		padding-bottom: clamp(1.6rem, 7vw, 2.4rem);
		background-size: auto clamp(135px, 40vw, 190px);
		background-position: center top;
		overflow: visible;
	}

	.as-page-hero--no-image .as-page-hero__visual {
		padding-top: 0;
		background-image: linear-gradient(135deg, #526c2d, #2f3f1b);
	}

	.as-page-hero__content,
	.as-page-hero--no-image .as-page-hero__content {
		position: relative;
		top: auto;
		left: auto;
		right: auto;
		width: min(var(--theme-container-width, 1290px), calc(100% - 2rem));
		margin: 0 auto;
		padding: clamp(1.35rem, 5vw, 2rem) 0 0;
		color: #526c2d;
		text-align: center;
	}

	.as-page-hero--no-image .as-page-hero__content {
		padding: 2.4rem 0;
		color: #ffffff;
	}

	.as-page-hero__title {
		font-size: clamp(2rem, 9vw, 2.7rem);
		line-height: 1;
	}

	.as-page-hero__subtitle {
		max-width: 32rem;
		margin-right: auto;
		margin-left: auto;
		font-size: 1rem;
		line-height: 1.4;
	}

	.as-page-hero__breadcrumbs {
		margin-top: 0.9rem;
		font-size: 0.78rem;
	}

	.as-page-hero__breadcrumbs .ct-breadcrumbs {
		justify-content: center;
	}

	.as-page-content-container,
	.as-search-results-container {
		padding-top: clamp(2rem, 8vw, 3rem);
	}
}


/* Custom grouped search results */
.as-search-results-container {
	max-width: min(var(--theme-container-width, 1290px), calc(100% - 2rem));
}

.as-search-section + .as-search-section,
.as-search-section + .as-search-empty {
	margin-top: clamp(2.2rem, 5vw, 4rem);
}

.as-search-section__header {
	display: flex;
	align-items: baseline;
	justify-content: space-between;
	gap: 1rem;
	margin-bottom: 1rem;
	border-bottom: 1px solid rgba(82, 108, 45, 0.18);
	padding-bottom: 0.75rem;
}

.as-search-section__header h2 {
	margin: 0;
	color: #07243a;
	font-size: clamp(1.45rem, 2.3vw, 2rem);
	line-height: 1.1;
}

.as-search-section__header span {
	color: rgba(82, 108, 45, 0.82);
	font-size: 0.92rem;
	font-weight: 700;
	white-space: nowrap;
}

.as-search-products-grid {
	display: grid;
	grid-template-columns: repeat(4, minmax(0, 1fr));
	gap: clamp(1rem, 2vw, 1.35rem);
}

.as-search-product-card,
.as-search-page-card,
.as-search-empty {
	background: #ffffff;
	box-shadow: 0 12px 34px rgba(7, 36, 58, 0.06);
}

.as-search-product-card {
	display: flex;
	flex-direction: column;
	min-width: 0;
	overflow: hidden;
	border: 1px solid rgba(82, 108, 45, 0.10);
	transition: transform 160ms ease, box-shadow 160ms ease, border-color 160ms ease;
}

.as-search-product-card:hover {
	transform: translateY(-2px);
	border-color: rgba(82, 108, 45, 0.22);
	box-shadow: 0 16px 38px rgba(7, 36, 58, 0.10);
}

.as-search-product-card__image {
	position: relative;
	display: block;
	aspect-ratio: 1 / 0.78;
	background: #f4f5f2;
	overflow: hidden;
}

.as-search-product-card__image img {
	display: block;
	width: 100%;
	height: 100%;
	object-fit: cover;
	transition: transform 200ms ease;
}

.as-search-product-card:hover .as-search-product-card__image img {
	transform: scale(1.035);
}

.as-search-product-card__body {
	display: flex;
	flex-direction: column;
	gap: 0.55rem;
	padding: 1rem;
	flex: 1;
}

.as-search-product-card__title,
.as-search-page-card__title {
	margin: 0;
	color: #07243a;
	line-height: 1.16;
}

.as-search-product-card__title {
	font-size: 1.05rem;
}

.as-search-product-card__title a,
.as-search-page-card__title a {
	color: inherit;
	text-decoration: none;
}

.as-search-product-card__title a:hover,
.as-search-page-card__title a:hover {
	color: #526c2d;
}

.as-search-product-card__price {
	color: #526c2d;
	font-size: 1rem;
	font-weight: 800;
	line-height: 1.2;
}

.as-search-product-card__price del {
	font-weight: 500;
	opacity: 0.65;
}

.as-search-product-card__excerpt,
.as-search-page-card__excerpt {
	margin: 0;
	color: #526c2d;
	font-size: 0.92rem;
	line-height: 1.45;
}

.as-search-product-card__excerpt {
	display: -webkit-box;
	-webkit-line-clamp: 3;
	-webkit-box-orient: vertical;
	overflow: hidden;
}

.as-search-type-badge {
	display: inline-flex;
	align-items: center;
	width: fit-content;
	border-radius: 999px;
	font-size: 0.7rem;
	font-weight: 800;
	letter-spacing: 0.04em;
	line-height: 1;
	text-transform: uppercase;
}

.as-search-type-badge--product {
	position: absolute;
	top: 0.7rem;
	left: 0.7rem;
	background: #526c2d;
	color: #ffffff;
	padding: 0.45rem 0.65rem;
	z-index: 2;
}

.as-search-type-badge--page {
	background: rgba(82, 108, 45, 0.10);
	color: #526c2d;
	padding: 0.42rem 0.62rem;
}

.as-search-card-button,
.as-search-page-card__link {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: fit-content;
	margin-top: auto;
	border-radius: 4px;
	background: #526c2d;
	color: #ffffff;
	font-size: 0.9rem;
	font-weight: 800;
	line-height: 1;
	text-decoration: none;
	padding: 0.78rem 0.95rem;
}

.as-search-card-button:hover,
.as-search-page-card__link:hover {
	background: #3e5222;
	color: #ffffff;
}

.as-search-pages-list {
	display: grid;
	gap: 1rem;
}

.as-search-page-card {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: clamp(1rem, 3vw, 2rem);
	border: 1px solid rgba(82, 108, 45, 0.10);
	padding: clamp(1.15rem, 2.5vw, 1.7rem);
}

.as-search-page-card__content {
	display: grid;
	gap: 0.6rem;
	min-width: 0;
}

.as-search-page-card__title {
	font-size: clamp(1.1rem, 1.7vw, 1.45rem);
}

.as-search-empty {
	border: 1px solid rgba(82, 108, 45, 0.10);
	padding: clamp(1.4rem, 4vw, 2.4rem);
	text-align: center;
}

.as-search-empty h2 {
	margin-top: 0;
	color: #07243a;
}

.as-search-empty p {
	margin-right: auto;
	margin-left: auto;
	max-width: 46rem;
	color: #526c2d;
}

.as-search-empty form {
	max-width: 34rem;
	margin: 1.25rem auto 0;
}

@media (max-width: 1100px) {
	.as-search-products-grid {
		grid-template-columns: repeat(3, minmax(0, 1fr));
	}
}

@media (max-width: 820px) {
	.as-search-products-grid {
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}

	.as-search-page-card {
		align-items: flex-start;
		flex-direction: column;
	}
}

@media (max-width: 560px) {
	.as-search-section__header {
		align-items: flex-start;
		flex-direction: column;
		gap: 0.35rem;
	}

	.as-search-products-grid {
		grid-template-columns: 1fr;
	}

	.as-search-product-card__image {
		aspect-ratio: 1 / 0.7;
	}
}


/* Single product uses the shared Adventure Seeds banner instead of Blocksy's inline title. */
.as-product-hero .as-page-hero__content {
	max-width: 520px;
}

.as-product-hero .as-page-hero__title {
	margin-bottom: 0.45rem;
}

.single-product .product .entry-summary > .product_title:first-child,
.single-product .product .entry-summary > h1.product_title:first-child {
	display: none;
}

/* Make WooCommerce product blocks follow the same badge system as Blocksy cards. */
.wc-block-grid__product,
.wc-block-components-product-image {
	position: relative;
}

.wc-block-grid__product .wc-block-grid__product-onsale,
.wc-block-components-product-image .wc-block-components-product-sale-badge,
.wc-block-components-product-sale-badge,
.wc-block-grid__product-onsale {
	display: inline-flex !important;
	align-items: center !important;
	justify-content: center !important;
	z-index: 2;
	position: absolute !important;
	top: var(--badge-top, 15px) !important;
	inset-inline-start: var(--badge-left, 15px) !important;
	inset-inline-end: auto !important;
	height: var(--badge-height, 28px) !important;
	min-width: var(--badge-min-width, 55px) !important;
	border: 0 !important;
	border-radius: var(--badge-radius, 0px) !important;
	padding: var(--badge-padding, 5px 10px) !important;
	text-align: center !important;
	text-transform: none !important;
	text-decoration: none !important;
	color: var(--badge-text-color, #fff) !important;
	background-color: var(--badge-background-color, var(--theme-palette-color-1)) !important;
	box-shadow: none !important;
}

.wc-block-grid__product-onsale[data-shape="type-2"],
.wc-block-components-product-sale-badge[data-shape="type-2"],
.as-sale-percent-badge[data-shape="type-2"],
.as-sale-percent-badge.as-sale-shape-type-2 {
	--badge-radius: 3px;
}

.wc-block-grid__product-onsale[data-shape="type-3"],
.wc-block-components-product-sale-badge[data-shape="type-3"],
.as-sale-percent-badge[data-shape="type-3"],
.as-sale-percent-badge.as-sale-shape-type-3 {
	--badge-size: 48px;
	--badge-radius: 999px;
	--badge-height: var(--badge-size);
	--badge-min-width: var(--badge-size);
	--badge-padding: 0;
	width: var(--badge-size) !important;
	height: var(--badge-size) !important;
	min-width: var(--badge-size) !important;
	min-height: var(--badge-size) !important;
	max-width: var(--badge-size) !important;
	max-height: var(--badge-size) !important;
	aspect-ratio: 1 / 1;
	border-radius: 999px !important;
	padding: 0 !important;
}

/* Percentage sale badges */
.as-sale-percent-badge {
	text-align: center !important;
	font-weight: 800 !important;
	line-height: 1 !important;
	white-space: nowrap;
}

.as-sale-percent-badge:not([data-shape="type-3"]):not(.as-sale-shape-type-3) {
	min-width: 3.35em;
}

.as-sale-percent-badge::before,
.as-sale-percent-badge::after {
	content: none !important;
}

/* WooCommerce featured/product blocks can be stubborn, so force our round shape there too. */
.wc-block-grid__product-onsale.as-sale-percent-badge.as-sale-shape-type-3,
.wc-block-components-product-sale-badge.as-sale-percent-badge.as-sale-shape-type-3 {
	border-radius: 999px !important;
	clip-path: none !important;
}

/* Slightly larger badge on single product images. */
.single-product .as-product-gallery {
	position: relative;
}

.single-product .as-product-gallery .as-sale-percent-badge {
	--badge-size: 72px;
	--badge-top: 24px;
	--badge-left: 24px;
	font-size: 18px !important;
	z-index: 5;
}

.single-product .as-product-gallery .as-sale-percent-badge:not([data-shape="type-3"]):not(.as-sale-shape-type-3) {
	min-height: 38px;
	min-width: 4.25em;
	padding-inline: 15px !important;
}

@media (max-width: 767px) {
	.single-product .as-product-gallery .as-sale-percent-badge {
		--badge-size: 60px;
		--badge-top: 16px;
		--badge-left: 16px;
		font-size: 16px !important;
	}
}
