/*
Theme Name:   Panda Paper
Theme URI:    https://pandapaper.com.au
Description:  GeneratePress child theme for Panda Paper: brand tokens, type, buttons, forms, header, announcement bar and footer.
Author:       Panda Paper
Template:     generatepress
Version:      0.1.3
Requires PHP: 8.1
Text Domain:  panda-paper
*/

/* ---------------------------------------------------------------------------
   Tokens
   Colours are GeneratePress global colours (set in build/gp-settings.php), output by GP as
   --black --ink --white --olive --olive-dark --beige --beige-light --neutral --blue --sage --leaf.
   Contrast rules (WCAG AA, see the style guide page):
   - white text only on black, olive, olive-dark or leaf
   - never white or olive text on beige, warm neutral or off-white
   - on beige, beige-light, neutral, sage and blue: black or ink text
   ------------------------------------------------------------------------- */
:root {
	--pp-ink: var(--ink, #1a1a1a);
	--pp-olive: var(--olive, #657236);
	--pp-olive-dark: var(--olive-dark, #4e582a);
	--pp-beige: var(--beige, #baaf82);
	--pp-beige-light: var(--beige-light, #f4f1e8);
	--pp-muted: #5c5c5c;
	--pp-font-body: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
	--pp-font-display: "Luckiest Guy", "Arial Black", Impact, sans-serif;
	--pp-space-1: 0.25rem;
	--pp-space-2: 0.5rem;
	--pp-space-3: 0.75rem;
	--pp-space-4: 1rem;
	--pp-space-5: 1.5rem;
	--pp-space-6: 2rem;
	--pp-space-7: 3rem;
	--pp-space-8: 4.5rem;
	--pp-radius: 10px;
	--pp-radius-pill: 999px;
	--pp-max: 1200px;
}

/* ---------------------------------------------------------------------------
   Type
   ------------------------------------------------------------------------- */
body,
button,
input,
select,
textarea {
	font-family: var(--pp-font-body);
}

body {
	font-size: 1.0625rem;
	line-height: 1.6;
	color: var(--pp-ink);
	-webkit-font-smoothing: antialiased;
}

h1,
h2,
.pp-display {
	font-family: var(--pp-font-display);
	font-weight: 400;
	text-transform: uppercase;
	letter-spacing: 0.02em;
	line-height: 1.05;
	color: var(--black, #000);
}

h1,
.entry-header .entry-title {
	color: var(--black, #000);
	font-size: clamp(2.25rem, 1.5rem + 3.2vw, 3.75rem);
	margin-bottom: var(--pp-space-5);
}

h2 {
	font-size: clamp(1.75rem, 1.35rem + 1.8vw, 2.625rem);
	margin-bottom: var(--pp-space-4);
}

h3 {
	font-size: clamp(1.25rem, 1.15rem + 0.5vw, 1.5rem);
	font-weight: 700;
	line-height: 1.25;
}

h4 {
	font-size: 1.125rem;
	font-weight: 700;
	line-height: 1.3;
}

h5,
h6 {
	font-size: 1rem;
	font-weight: 700;
}

small,
.pp-small {
	font-size: 0.875rem;
}

a {
	text-decoration-thickness: 1px;
	text-underline-offset: 0.15em;
}

a:hover {
	text-decoration-thickness: 2px;
}

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

blockquote {
	border-left: 4px solid var(--pp-olive);
	background: var(--pp-beige-light);
	padding: var(--pp-space-4) var(--pp-space-5);
	font-style: normal;
}

/* ---------------------------------------------------------------------------
   Buttons (colours come from GP settings; shape here)
   ------------------------------------------------------------------------- */
.button,
.wp-block-button__link,
input[type="submit"],
.woocommerce a.button,
.woocommerce button.button,
.wc-block-components-button:not(.is-link) {
	border: 2px solid transparent;
	border-radius: var(--pp-radius-pill);
	font-weight: 700;
	font-size: 1rem;
	line-height: 1.2;
	padding: 0.8em 1.6em;
	text-decoration: none;
	transition: background-color 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}

.wp-block-button__link:not(.has-background),
.wc-block-components-button:not(.is-link) {
	background-color: var(--pp-olive);
	color: #fff;
}

.wp-block-button__link:not(.has-background):hover,
.wp-block-button__link:not(.has-background):focus,
.wc-block-components-button:not(.is-link):hover {
	background-color: var(--pp-olive-dark);
	color: #fff;
}

.wp-block-button.is-style-outline > .wp-block-button__link:not(.has-background),
.wp-block-button__link.is-style-outline:not(.has-background) {
	background-color: transparent;
	color: var(--pp-ink);
	border-color: var(--pp-ink);
}

.wp-block-button.is-style-outline > .wp-block-button__link:not(.has-background):hover,
.wp-block-button.is-style-outline > .wp-block-button__link:not(.has-background):focus {
	background-color: var(--pp-ink);
	color: #fff;
	border-color: var(--pp-ink);
}

/* ---------------------------------------------------------------------------
   Forms
   ------------------------------------------------------------------------- */
input[type="text"],
input[type="email"],
input[type="tel"],
input[type="url"],
input[type="password"],
input[type="search"],
input[type="number"],
textarea,
select {
	border: 1.5px solid var(--pp-muted);
	border-radius: 8px;
	padding: 0.7em 0.9em;
	background: #fff;
	color: var(--pp-ink);
	max-width: 100%;
}

input:focus,
textarea:focus,
select:focus {
	border-color: var(--pp-olive);
	outline: 2px solid var(--pp-olive);
	outline-offset: 1px;
}

label {
	font-weight: 600;
}

/* Notices: colours also set in GP settings (wc_*_message_*); these win if GP's defaults load later. */
body .woocommerce-message,
body .woocommerce-info,
body .woocommerce-error {
	background-color: var(--pp-beige-light);
	color: var(--pp-ink);
	border-left: 6px solid var(--pp-olive);
	border-radius: var(--pp-radius);
}

body .woocommerce-info {
	border-left-color: #2e8fce;
}

body .woocommerce-error {
	border-left-color: #b3261e;
	background-color: #fbeaea;
}

body .woocommerce-message a,
body .woocommerce-info a,
body .woocommerce-error a {
	color: var(--pp-ink);
}

/* ---------------------------------------------------------------------------
   Announcement bar (Phase 6 adds the free-shipping progress bar here)
   ------------------------------------------------------------------------- */
.pp-announcement {
	background: var(--black, #000);
	color: #fff;
	font-size: 0.875rem;
	line-height: 1.4;
}

.pp-announcement__list {
	list-style: none;
	margin: 0 auto;
	padding: 0.55rem var(--pp-space-4);
	max-width: var(--pp-max);
	display: flex;
	flex-wrap: wrap;
	justify-content: center;
	text-align: center;
}

.pp-announcement__list li {
	margin: 0;
}

.pp-announcement__list li + li::before {
	content: "\00B7";
	color: var(--pp-beige);
	font-weight: 700;
	margin: 0 var(--pp-space-4);
}

@media (max-width: 767px) {
	.pp-announcement__list li + li {
		display: none;
	}
}

/* ---------------------------------------------------------------------------
   Header: panda mark + two-line wordmark (the horizontal lockup), nav, account and cart
   ------------------------------------------------------------------------- */
.site-header {
	border-bottom: 1px solid var(--pp-beige);
}

.site-header .inside-header {
	padding-top: var(--pp-space-3);
	padding-bottom: var(--pp-space-3);
}

.site-branding-container {
	align-items: center;
}

.site-branding-container .site-logo {
	margin-right: var(--pp-space-3);
}

.main-title {
	font-family: var(--pp-font-display);
	font-weight: 400;
	text-transform: uppercase;
	font-size: 1.6rem;
	line-height: 0.86;
	letter-spacing: 0.01em;
	width: min-content;
	margin: 0;
}

.main-title a,
.main-title a:hover {
	color: var(--black, #000);
	text-decoration: none;
}

.main-navigation .main-nav ul li a {
	font-weight: 600;
	font-size: 1rem;
	text-decoration: none;
}

.main-navigation .main-nav ul li.current-menu-item > a,
.main-navigation .main-nav ul li.current_page_item > a {
	box-shadow: inset 0 -3px 0 var(--pp-olive);
}

.menu-bar-item svg {
	width: 22px;
	height: 22px;
	vertical-align: middle;
}

.menu-bar-item a {
	text-decoration: none;
}

@media (max-width: 768px) {
	.site-header .header-image {
		width: 30px;
	}

	.main-title {
		font-size: 1.25rem;
	}

	.site-header .inside-header {
		padding-top: var(--pp-space-2);
		padding-bottom: var(--pp-space-2);
	}
}

.entry-header .entry-title {
	margin-bottom: 0;
}

.main-navigation .menu-toggle,
.main-navigation .menu-toggle:hover,
.main-navigation .menu-toggle:focus {
	background: transparent;
	color: var(--pp-ink);
}

.main-navigation .menu-toggle .gp-icon svg {
	width: 1.4em;
	height: 1.4em;
}

/* Off-canvas menu (mobile) */
.slideout-navigation .main-nav ul li a {
	font-size: 1.125rem;
	font-weight: 600;
	line-height: 1.4;
	padding: 0.9rem 1.5rem;
}

.slideout-navigation .main-nav ul li.current-menu-item > a,
.slideout-navigation .main-nav ul li.current_page_item > a {
	box-shadow: inset 4px 0 0 var(--pp-olive);
}

/* Product names in grids: readable body font, not the display face */
.woocommerce ul.products li.product .woocommerce-loop-product__title,
.wc-block-grid__product-title,
.wc-block-components-product-name {
	font-family: var(--pp-font-body);
	text-transform: none;
	letter-spacing: 0;
	font-size: 1.0625rem;
	font-weight: 700;
	line-height: 1.35;
}

/* ---------------------------------------------------------------------------
   Footer (GP Block Element "Site footer", markup in theme/panda-paper/parts/footer.html)
   ------------------------------------------------------------------------- */
.pp-footer-band {
	height: 72px;
	margin: 0;
	background: var(--sage, #a8b59b) url("assets/img/band-sage.webp") center / cover no-repeat;
}

.pp-footer {
	background: var(--black, #000);
	color: #fff;
	padding: var(--pp-space-7) var(--pp-space-4) var(--pp-space-5);
	font-size: 0.95rem;
	margin: 0;
}

.pp-footer > * {
	max-width: var(--pp-max);
	margin-left: auto;
	margin-right: auto;
}

.pp-footer a {
	color: var(--pp-beige);
}

.pp-footer a:hover,
.pp-footer a:focus {
	color: #fff;
}

.pp-footer :focus-visible {
	outline-color: #fff;
}

.pp-footer .pp-footer__heading {
	font-family: var(--pp-font-body);
	color: #fff;
	font-size: 0.875rem;
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: 0.08em;
	margin-bottom: var(--pp-space-3);
}

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

.pp-footer li {
	margin-bottom: 0.45rem;
}

.pp-footer__badge {
	width: 92px;
	height: 92px;
	border-radius: 50%;
	background: var(--pp-beige);
	display: flex;
	align-items: center;
	justify-content: center;
	margin: 0 0 var(--pp-space-3);
}

.pp-footer__badge img {
	height: 70px;
	width: auto;
}

.pp-footer .pp-footer__name {
	font-size: 1.75rem;
	line-height: 0.9;
	color: #fff;
	margin-bottom: var(--pp-space-3);
}

.pp-footer__legal {
	border-top: 1px solid #333;
	margin-top: var(--pp-space-6);
	padding-top: var(--pp-space-4);
	font-size: 0.8125rem;
	color: #ccc;
}

/* ---------------------------------------------------------------------------
   Style guide page helpers (page "Style guide", build only)
   ------------------------------------------------------------------------- */
.pp-swatch-grid {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(165px, 1fr));
	gap: var(--pp-space-4);
	margin-bottom: var(--pp-space-6);
}

.pp-swatch {
	border-radius: var(--pp-radius);
	padding: var(--pp-space-4);
	min-height: 150px;
	display: flex;
	flex-direction: column;
	justify-content: flex-end;
	gap: 0.15rem;
	font-size: 0.875rem;
	box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.12);
}

.pp-swatch strong {
	font-size: 1rem;
}

.pp-pattern {
	border-radius: var(--pp-radius);
	overflow: hidden;
	box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.12);
}

.pp-pattern img {
	display: block;
	width: 100%;
	height: 150px;
	object-fit: cover;
}

.pp-pattern p {
	margin: 0;
	padding: var(--pp-space-3) var(--pp-space-4);
	font-size: 0.875rem;
}

.pp-demo-dark {
	background: var(--black, #000);
	color: #fff;
	padding: var(--pp-space-5);
	border-radius: var(--pp-radius);
	margin-bottom: var(--pp-space-6);
}

.pp-form-demo {
	display: grid;
	gap: var(--pp-space-4);
	max-width: 520px;
}

.pp-form-demo label {
	display: block;
	margin-bottom: var(--pp-space-1);
}

.pp-form-demo input,
.pp-form-demo select,
.pp-form-demo textarea {
	width: 100%;
}

.pp-check {
	display: flex;
	gap: var(--pp-space-2);
	align-items: center;
	font-weight: 400;
}

.pp-check input {
	width: auto;
	accent-color: var(--pp-olive);
}

.pp-space-demo {
	display: grid;
	gap: var(--pp-space-2);
}

.pp-space-demo span {
	display: block;
	height: 14px;
	background: var(--pp-olive);
	border-radius: 3px;
}
