/*
Theme Name: Wolley Handmade
Theme URI: https://www.wolleyhandmade.com
Description: Wolley Handmade's look (warm terracotta & dusty pink, Merriweather + Nunito) on top of the free default WordPress theme Twenty Twenty-Five. Change colours and fonts any time in Appearance > Editor > Styles.
Author: Wolley Handmade
Template: twentytwentyfive
Version: 1.0.0
Requires at least: 6.7
Tested up to: 6.9
Requires PHP: 7.4
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: wolley-handmade
*/

/* ------------------------------------------------------------------
   Small extras that the Styles panel can't do on its own.
   You normally never need to touch this file.
------------------------------------------------------------------- */

/* Wavy edges (block style "Wavy edges" / "Wavy bottom" on Group and Cover blocks) */
.is-style-wavy-bottom,
.is-style-wavy-edges {
	--wave-h: clamp(18px, 3vw, 40px);
	-webkit-mask:
		linear-gradient(#000 0 0) top / 100% calc(100% - var(--wave-h) + 1px) no-repeat,
		url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 1440 40' preserveAspectRatio='none'%3E%3Cpath d='M0 0h1440v14c-120 18-240 26-360 18S840 4 720 6 480 30 360 34 120 26 0 14z'/%3E%3C/svg%3E") bottom / 100% var(--wave-h) no-repeat;
	mask:
		linear-gradient(#000 0 0) top / 100% calc(100% - var(--wave-h) + 1px) no-repeat,
		url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 1440 40' preserveAspectRatio='none'%3E%3Cpath d='M0 0h1440v14c-120 18-240 26-360 18S840 4 720 6 480 30 360 34 120 26 0 14z'/%3E%3C/svg%3E") bottom / 100% var(--wave-h) no-repeat;
	padding-bottom: calc(var(--wp--preset--spacing--60, 4rem) + var(--wave-h)) !important;
}
.is-style-wavy-edges {
	-webkit-mask:
		url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 1440 40' preserveAspectRatio='none'%3E%3Cpath d='M0 40h1440V26c-120-18-240-26-360-18S840 36 720 34 480 10 360 6 120 14 0 26z'/%3E%3C/svg%3E") top / 100% var(--wave-h) no-repeat,
		linear-gradient(#000 0 0) center / 100% calc(100% - 2 * var(--wave-h) + 2px) no-repeat,
		url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 1440 40' preserveAspectRatio='none'%3E%3Cpath d='M0 0h1440v14c-120 18-240 26-360 18S840 4 720 6 480 30 360 34 120 26 0 14z'/%3E%3C/svg%3E") bottom / 100% var(--wave-h) no-repeat;
	mask:
		url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 1440 40' preserveAspectRatio='none'%3E%3Cpath d='M0 40h1440V26c-120-18-240-26-360-18S840 36 720 34 480 10 360 6 120 14 0 26z'/%3E%3C/svg%3E") top / 100% var(--wave-h) no-repeat,
		linear-gradient(#000 0 0) center / 100% calc(100% - 2 * var(--wave-h) + 2px) no-repeat,
		url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 1440 40' preserveAspectRatio='none'%3E%3Cpath d='M0 0h1440v14c-120 18-240 26-360 18S840 4 720 6 480 30 360 34 120 26 0 14z'/%3E%3C/svg%3E") bottom / 100% var(--wave-h) no-repeat;
	padding-top: calc(var(--wp--preset--spacing--60, 4rem) + var(--wave-h)) !important;
}

/* Rounded photo (block style "Rounded photo" on Image blocks) */
.wp-block-image.is-style-soft-rounded img { border-radius: 24px; }

/* Pattern cards: image on top, same height */
.wolley-card img { aspect-ratio: 4 / 3; object-fit: cover; width: 100%; }

/* Testimonial quotes */
.wolley-quote { font-style: italic; }

/* Kit and Ko-fi embeds: centre them */
.wolley-embed { display: flex; justify-content: center; }
.wolley-embed form, .wolley-embed .formkit-form { margin-left: auto; margin-right: auto; }

/* Header: keep the logo nicely sized on phones */
@media (max-width: 781px) {
	.wolley-header .wp-block-site-logo img { max-width: 170px; height: auto; }
	.wolley-header .wolley-header-social .wp-block-social-links { display: none; }
}

/* Linked titles look like titles, not like links */
:where(h1, h2, h3, h4, h5, h6) a { color: inherit; text-decoration: none; }
:where(h1, h2, h3, h4, h5, h6) a:hover { color: var(--wp--preset--color--accent-1); }

/* Links on the dusty-pink sections stay readable */


/* No white gaps between header, page and footer */
.wp-site-blocks > * + * { margin-block-start: 0; }


/* Text colour on the dusty-pink sections (set per style: white in Original, dark in Warm oat / Hand-written) */
.has-accent-2-background-color { color: var(--wp--custom--on-pink, #fff); }
.has-accent-2-background-color a:not(.wp-element-button) { color: inherit; }

/* "Handwritten" block style: only changes the look when the Hand-written style is active
   (that style adds the rules). In Original and Warm oat the text looks normal. */

/* ------------------------------------------------------------------
   Layout details (cards, ornaments, footer …)
------------------------------------------------------------------- */

/* Wavy top edge (used on the footer): the wave sits on top of whatever section comes before */
.is-style-wavy-top { --wave-h: clamp(18px, 3vw, 40px); position: relative; overflow: visible; }
.is-style-wavy-top::before {
	content: "";
	position: absolute;
	left: 0; right: 0;
	top: calc(-1 * var(--wave-h) + 1px);
	height: var(--wave-h);
	background: inherit;
	-webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 1440 40' preserveAspectRatio='none'%3E%3Cpath d='M0 40h1440V26c-120-18-240-26-360-18S840 36 720 34 480 10 360 6 120 14 0 26z'/%3E%3C/svg%3E") center / 100% 100% no-repeat;
	mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 1440 40' preserveAspectRatio='none'%3E%3Cpath d='M0 40h1440V26c-120-18-240-26-360-18S840 36 720 34 480 10 360 6 120 14 0 26z'/%3E%3C/svg%3E") center / 100% 100% no-repeat;
	pointer-events: none;
}

/* Little stitched ornament under section titles */
.wolley-title::after {
	content: "";
	display: block;
	width: 64px;
	height: 12px;
	margin: 0.55em auto 0;
	background-color: var(--wp--preset--color--accent-1);
	-webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 64 12'%3E%3Cg fill='none' stroke='%23000' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M4 3l5 6 5-6M18 3l5 6 5-6M36 3l5 6 5-6M50 3l5 6 5-6'/%3E%3C/g%3E%3C/svg%3E") center / contain no-repeat;
	mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 64 12'%3E%3Cg fill='none' stroke='%23000' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M4 3l5 6 5-6M18 3l5 6 5-6M36 3l5 6 5-6M50 3l5 6 5-6'/%3E%3C/g%3E%3C/svg%3E") center / contain no-repeat;
}
.wolley-title-left::after { margin-left: 0; }

/* Stitched separator line ("Stitched line" style on the Separator block) */
.wp-block-separator.is-style-stitch {
	border: 0 !important;
	height: 2px !important;
	max-width: 760px;
	margin-left: auto !important;
	margin-right: auto !important;
	background: repeating-linear-gradient(90deg, var(--wp--preset--color--accent-1) 0 12px, transparent 12px 20px) !important;
	opacity: 0.6;
}

/* Cards: linen on oat sections, oat on linen sections */
.wolley-card-box, .wolley-quote-card, .wolley-post-cards > li {
	background: var(--wp--preset--color--accent-4);
	border-radius: 22px;
	padding: 14px 14px 20px !important;
	box-sizing: border-box;
}
.has-accent-4-background-color .wolley-card-box,
.has-accent-4-background-color .wolley-quote-card,
.has-accent-4-background-color .wolley-post-cards > li { background: var(--wp--preset--color--base); }
.wolley-card-box > * , .wolley-post-cards > li > * { padding-left: 6px; padding-right: 6px; }
.wolley-card-box > .wp-block-image, .wolley-post-cards .wp-block-post-featured-image { padding: 0; overflow: hidden; border-radius: 16px; }
.wolley-card-box .wp-block-image img, .wolley-post-cards .wp-block-post-featured-image img {
	border-radius: 16px; aspect-ratio: 4 / 3; object-fit: cover; width: 100%;
	transition: transform .6s ease;
}
.wolley-post-cards .wp-block-post-featured-image img { aspect-ratio: 4 / 3; }
@media (hover: hover) {
	.wolley-card-box:hover .wp-block-image img,
	.wolley-post-cards > li:hover .wp-block-post-featured-image img { transform: scale(1.04); }
}
.wolley-card-box h3 { margin: 0; line-height: 1.3; }
.wolley-price { margin: 0; white-space: nowrap; font-weight: 600; color: var(--wp--preset--color--accent-1); }

/* Testimonials */
.wolley-quote-card { padding: 1.6rem 1.4rem 1.4rem !important; position: relative; height: 100%; }
.wolley-quote-card::before {
	content: "\201C";
	display: block;
	text-align: center;
	font-family: var(--wp--preset--font-family--fraunces, Georgia), serif;
	font-size: 4.2rem;
	line-height: 0.7;
	height: 2.2rem;
	color: var(--wp--preset--color--accent-1);
}
.wolley-quote-card .wolley-quote { font-style: italic; }

/* Outline buttons: terracotta outline, fill on hover */
.wp-block-button.is-style-outline > .wp-block-button__link {
	background: transparent !important;
	color: var(--wp--preset--color--accent-1) !important;
	border: 1.5px solid currentColor !important;
}
.wp-block-button.is-style-outline > .wp-block-button__link:hover {
	background: var(--wp--preset--color--accent-1) !important;
	color: var(--wp--preset--color--base) !important;
	border-color: var(--wp--preset--color--accent-1) !important;
}

/* Smaller Instagram grid */
.wolley-insta { max-width: 640px; margin-left: auto !important; margin-right: auto !important; gap: 8px !important; }
.wolley-insta img { border-radius: 10px; }

/* Newsletter card */
.wolley-newsletter .wolley-embed { justify-content: flex-start; }

/* Header: thin line at the bottom */
.wolley-header { border-bottom: 1px solid var(--wp--preset--color--accent-4); }

/* Cocoa footer */
.wolley-footer a { color: var(--wp--preset--color--base); text-decoration-color: color-mix(in srgb, currentColor 40%, transparent); }
.wolley-footer a:hover { color: var(--wp--preset--color--accent-2); }
.wolley-footer { border-top: 0 !important; }

/* Pattern pages */
.wolley-detail-cols { gap: 3rem !important; }
@media (max-width: 781px) { .wolley-buybox { position: static !important; } }

/* Featured patterns: two cards per row on phones */
@media (max-width: 781px) {
	.wp-block-columns.wolley-cards { display: grid !important; grid-template-columns: 1fr 1fr; gap: 12px !important; }
	.wolley-cards .wolley-card-box { padding: 10px 10px 14px !important; border-radius: 18px; }
	.wolley-cards .wp-block-button__link { padding: 0.7em 1em !important; }
}
/* Rounded photos in pattern galleries */
.wp-block-gallery .wp-block-image img { border-radius: 14px; }
/* Equal-height pattern cards, button at the bottom */
.wolley-card-box { height: 100%; display: flex; flex-direction: column; }
.wolley-card-box > .wp-block-buttons { margin-top: auto !important; padding-top: 0.8rem; }

/* Old price on the knitwear page */
.wolley-was { display: block; font-weight: 400; font-size: 0.85em; color: var(--wp--preset--color--contrast); opacity: .7; text-decoration: line-through; white-space: nowrap; }
.wolley-lang-note p { margin: 0; }

/* Language button in the header */
.wolley-lang-switch {
	display: inline-flex; align-items: center; gap: .4em;
	padding: .45em 1em; border: 1.5px solid var(--wp--preset--color--accent-1); border-radius: 999px;
	color: var(--wp--preset--color--accent-1); background: var(--wp--preset--color--accent-5);
	font-size: .9rem; font-weight: 700; line-height: 1.2; text-decoration: none; white-space: nowrap;
	transition: background-color .2s, color .2s;
}
.wolley-lang-switch:hover, .wolley-lang-switch:focus-visible { background: var(--wp--preset--color--accent-1); color: #fff; }
.wolley-lang-short { display: none; }
.wolley-header-right { gap: 1.4rem; }
@media (max-width: 1100px) {
	.wolley-header-right { gap: .9rem; }
	.wolley-header-right .wp-block-social-links { flex-wrap: nowrap; gap: .55rem; }
}
@media (max-width: 781px) {
	.wolley-header .wp-block-site-logo img { max-width: min(150px, 100%); }
	.wolley-header-right { gap: .5rem; }
	.wolley-lang-switch { padding: .4em .8em; font-size: .85rem; }
}
@media (max-width: 599px) {
	.wolley-header .wp-block-columns > .wp-block-column:nth-child(1) { flex: 0 0 44px !important; min-width: 0; }
	.wolley-header .wp-block-columns > .wp-block-column:nth-child(2) { flex: 1 1 0 !important; min-width: 0; }
	.wolley-header .wp-block-columns > .wp-block-column:nth-child(3) { flex: 0 0 auto !important; width: max-content; min-width: 0; }
	.wolley-header .wolley-header-right { width: max-content; }
}
@media (max-width: 359px) {
	.wolley-lang-long { display: none; }
	.wolley-lang-short { display: inline; }
}

/* Kit form in the dark footer: light text for the checkbox options */
.wolley-footer .formkit-form label,
.wolley-footer .formkit-form legend,
.wolley-footer .formkit-form .formkit-checkboxes,
.wolley-footer .formkit-form .formkit-checkboxes span,
.wolley-footer .formkit-form [data-element="tags-checkboxes"] * {
	color: var(--wp--preset--color--base) !important;
}
.wolley-footer .formkit-form .formkit-checkboxes label::before {
	border-color: var(--wp--preset--color--accent-2) !important;
}
.wolley-footer .formkit-powered-by-convertkit { filter: invert(1); opacity: .65; }
