
/* ---------------------------------------------------------
   Base
--------------------------------------------------------- */

*,
*::before,
*::after {
	box-sizing: border-box;
}

html {
	scroll-behavior: smooth;

	/* Reserve the scrollbar space so locking scroll (modals) doesn't shift the page. */
	scrollbar-gutter: stable;
}

/*
 * Safety net: anything wider than the screen is cut off instead of making
 * the page scroll sideways (which makes phones zoom out). "clip", unlike
 * "hidden", keeps position: sticky working.
 */
html,
body {
	overflow-x: clip;
}

/* Page scroll is locked while a modal, the mobile menu or the filter drawer is open. */
body.p2p-modal-open,
body.p2p-menu-open,
body.p2p-filter-open {
	overflow: hidden;
}

body {
	margin: 0;
	font-family: sans-serif;
	line-height: 1.5;
}

img {
	display: block;
	max-width: 100%;
	height: auto;
}

a {
	color: inherit;
}

button,
input,
select,
textarea {
	font: inherit;
}

.p2p-container {
	width: min(90%, 2000px);
	margin-inline: auto;
}


/* ---------------------------------------------------------
   Accessibility
--------------------------------------------------------- */

.p2p-skip-link {
	position: fixed;
	top: 8px;
	left: 8px;
	z-index: 99999;
	padding: 10px 14px;
	background: #000;
	color: #fff;
	text-decoration: none;
	transform: translateY(-200%);
}

.p2p-skip-link:focus {
	transform: translateY(0);
}


/* ---------------------------------------------------------
   Header
--------------------------------------------------------- */

.p2p-site-header {
	position: relative;
	z-index: 1000;
	background: #fff;
}

.p2p-site-header-main {
	background: #fff;
}

.p2p-site-header-inner {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 32px;

	/* Same width as .p2p-container, so the logo lines up with the page content. */
	width: min(90%, 2000px);
	min-height: 80px;
	margin-inline: auto;
}

.p2p-site-branding {
	flex: 0 0 auto;
	padding-block: 14px;
}

.p2p-site-branding .custom-logo-link {
	display: block;
}

.p2p-site-branding .custom-logo {
	width: auto;
	max-height: 4rem;
	height: auto;
}

.p2p-site-title {
	font-size: 1.5rem;
	font-weight: 700;
	text-decoration: none;
}


/* ---------------------------------------------------------
   Primary navigation
--------------------------------------------------------- */

.p2p-primary-navigation {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 24px;
	width: 100%;
}

.p2p-primary-navigation-menu {
	min-width: 0;
}

.p2p-primary-menu {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 20px;
	margin: 0;
	padding: 0;
	list-style: none;
}

.p2p-primary-menu a {
	display: block;
	padding: 8px 0;
	text-decoration: none;
}

.p2p-primary-menu a:hover,
.p2p-primary-menu .current-menu-item > a,
.p2p-primary-menu .current-menu-ancestor > a {
	text-decoration: underline;
	text-underline-offset: 4px;
}

.p2p-primary-navigation-actions {
	display: flex;
	align-items: center;
	gap: 16px;
	flex: 0 0 auto;
}

.p2p-header-action {
	display: inline-flex;
	align-items: center;
	gap: 7px;
	text-decoration: none;
	white-space: nowrap;
}

.p2p-header-action:hover {
	text-decoration: underline;
	text-underline-offset: 4px;
}

.p2p-header-action-icon {
	display: inline-flex;
}


/* ---------------------------------------------------------
   Main content
--------------------------------------------------------- */

.site-main {
	min-height: 50vh;
}

.p2p-homepage-intro,
.p2p-page,
.p2p-single-post,
.p2p-archive-header {
	padding-block: 48px;
}

.p2p-homepage-intro h1,
.p2p-page-title,
.p2p-entry-title,
.p2p-archive-title {
	margin: 0 0 20px;
	line-height: 1.15;
}

.p2p-homepage-description,
.p2p-page-content,
.p2p-entry-content,
.p2p-archive-description {
	max-width: 900px;
}


/* ---------------------------------------------------------
   Product gallery
--------------------------------------------------------- */

.p2p-product-layout {
	padding-block: 32px 64px;
}

.p2p-product-gallery > .p2p-container > h2 {
	margin: 0 0 24px;
}

.p2p-product-gallery ul.products {
	margin: 0;
	padding: 0;
}


/* ---------------------------------------------------------
   Posts
--------------------------------------------------------- */

.p2p-post-archive {
	display: grid;
	gap: 32px;
}

.p2p-archive-entry {
	display: grid;
	grid-template-columns: minmax(180px, 280px) 1fr;
	gap: 24px;
}

.p2p-archive-entry-image img {
	width: 100%;
	height: auto;
}

.p2p-archive-entry-title {
	margin: 0 0 12px;
}

.p2p-archive-entry-title a {
	text-decoration: none;
}

.p2p-archive-entry-title a:hover {
	text-decoration: underline;
}


/* ---------------------------------------------------------
   Pagination
--------------------------------------------------------- */

.p2p-pagination {
	margin-top: 40px;
}

.p2p-pagination ul {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
	margin: 0;
	padding: 0;
	list-style: none;
}

.p2p-pagination a,
.p2p-pagination span {
	display: inline-block;
	padding: 8px 12px;
	text-decoration: none;
}

.p2p-pagination .current {
	font-weight: 700;
}


/* ---------------------------------------------------------
   Footer
--------------------------------------------------------- */

/* .p2p-site-footer {
	margin-top: 64px;
	background: #000;
	color: #fff;
}

.p2p-site-footer-main {
	padding-block: 48px;
}

.p2p-site-footer-inner {
	display: grid;
	grid-template-columns: minmax(200px, 1fr) minmax(300px, 2fr);
	gap: 48px;
	width: min(100% - 32px, 1400px);
	margin-inline: auto;
}

.p2p-site-footer-branding .custom-logo {
	width: auto;
	max-width: 240px;
	height: auto;
}

.p2p-footer-site-title {
	color: #fff;
	font-size: 1.5rem;
	font-weight: 700;
	text-decoration: none;
}

.p2p-footer-navigation {
	min-width: 0;
}

.p2p-footer-menu {
	display: flex;
	flex-wrap: wrap;
	gap: 12px 24px;
	margin: 0;
	padding: 0;
	list-style: none;
}

.p2p-footer-menu a {
	color: #fff;
	text-decoration: none;
}

.p2p-footer-menu a:hover {
	text-decoration: underline;
	text-underline-offset: 4px;
}

.p2p-site-footer-bottom {
	border-top: 1px solid rgba(255, 255, 255, 0.2);
}

.p2p-site-footer-bottom-inner {
	width: min(100% - 32px, 1400px);
	margin-inline: auto;
	padding-block: 20px;
}

.p2p-copyright {
	margin: 0;
	font-size: 0.9rem;
} */


/* ---------------------------------------------------------
   Product layout (filter sidebar + gallery)
--------------------------------------------------------- */

.p2p-product-layout {
	display: grid;
	grid-template-columns: 240px minmax(0, 1fr);
	gap: 2rem;
	align-items: start;
}

.p2p-gallery-filter {
	position: sticky;
	top: var(--pg-header-offset, 0px);
}

.p2p-product-gallery {
	min-width: 0;
}


/* ---------------------------------------------------------
   Responsive

   Breakpoints (see sizes.css):
   xs  < 576px    phones
   sm  576-767px  large phones
   md  >= 768px   tablets
   lg  >= 992px   small desktops (full menu, filter sidebar)
   xl  >= 1200px  desktops
--------------------------------------------------------- */

/* Menu button: only below 992px. */
.p2p-menu-toggle {
	display: none;
	align-items: center;
	justify-content: center;
	width: 44px;
	height: 44px;
	padding: 0;
	font-size: 1.5rem;
	color: inherit;
	background: none;
	border: 0;
	cursor: pointer;
}

@media (min-width: 1200px) {

	.p2p-product-layout {
		grid-template-columns: 280px minmax(0, 1fr);
	}

}

/* Below lg: hamburger menu, filter drawer instead of sidebar. */
@media (max-width: 991.98px) {

	.p2p-site-header-inner {
		gap: 16px;
		min-height: 64px;
	}

	.p2p-primary-navigation {
		justify-content: flex-end;
	}

	.p2p-primary-navigation-menu {
		display: none;
	}

	.p2p-menu-toggle {
		display: inline-flex;
	}

	.p2p-product-layout {
		display: block;
		padding-block: 24px 48px;
	}

	.p2p-homepage-intro,
	.p2p-page,
	.p2p-single-post,
	.p2p-archive-header {
		padding-block: 32px;
	}

}

@media (max-width: 767.98px) {

	.p2p-archive-entry {
		grid-template-columns: 1fr;
	}

}

/* xs: tighter page gutters, icon-only header actions. */
@media (max-width: 575.98px) {

	.p2p-container,
	.p2p-site-header-inner {
		width: calc(100% - 32px);
	}

	.p2p-site-branding .custom-logo {
		max-height: 2.75rem;
	}

	.p2p-primary-navigation-actions {
		gap: 4px;
	}

	.p2p-header-action {
		justify-content: center;
		min-width: 44px;
		min-height: 44px;
	}

	.p2p-header-action-label {
		position: absolute;
		width: 1px;
		height: 1px;
		overflow: hidden;
		clip: rect(0 0 0 0);
		white-space: nowrap;
	}

	.p2p-homepage-intro,
	.p2p-page,
	.p2p-single-post,
	.p2p-archive-header {
		padding-block: 24px;
	}

}
