/**
 * Nanopeptix (NPX) Frontend Styles
 *
 * Base styles, resets, typography, and components.
 * Design tokens are defined in theme.json and extended here.
 *
 * @package WPR\NPX
 */

/* ==========================================================================
   @font-face - SF Pro Display
   ========================================================================== */

@font-face {
	font-family: 'SF Pro Display';
	src: url('../fonts/sf-pro/SF-Pro-Display-Light.woff2') format('woff2');
	font-weight: 300;
	font-style: normal;
	font-display: swap;
}

@font-face {
	font-family: 'SF Pro Display';
	src: url('../fonts/sf-pro/SF-Pro-Display-Regular.woff2') format('woff2');
	font-weight: 400;
	font-style: normal;
	font-display: swap;
}

@font-face {
	font-family: 'SF Pro Display';
	src: url('../fonts/sf-pro/SF-Pro-Display-RegularItalic.woff2') format('woff2');
	font-weight: 400;
	font-style: italic;
	font-display: swap;
}

@font-face {
	font-family: 'SF Pro Display';
	src: url('../fonts/sf-pro/SF-Pro-Display-Medium.woff2') format('woff2');
	font-weight: 500;
	font-style: normal;
	font-display: swap;
}

@font-face {
	font-family: 'SF Pro Display';
	src: url('../fonts/sf-pro/SF-Pro-Display-Semibold.woff2') format('woff2');
	font-weight: 600;
	font-style: normal;
	font-display: swap;
}

@font-face {
	font-family: 'SF Pro Display';
	src: url('../fonts/sf-pro/SF-Pro-Display-Bold.woff2') format('woff2');
	font-weight: 700;
	font-style: normal;
	font-display: swap;
}

@font-face {
	font-family: 'SF Pro Display';
	src: url('../fonts/sf-pro/SF-Pro-Display-Heavy.woff2') format('woff2');
	font-weight: 800;
	font-style: normal;
	font-display: swap;
}

@font-face {
	font-family: 'SF Pro Display';
	src: url('../fonts/sf-pro/SF-Pro-Display-Black.woff2') format('woff2');
	font-weight: 900;
	font-style: normal;
	font-display: swap;
}

/* ==========================================================================
   CSS Custom Properties (Design Tokens)
   Additional tokens beyond theme.json
   ========================================================================== */

:root {
	/* Colors - mirrors theme.json */
	--npx-primary: #0071E3;
	--npx-primary-hover: #005BB5;
	--npx-primary-active: #004A99;
	--npx-black: #000000;
	--npx-white: #FFFFFF;
	--npx-gray: #D2D2D7;
	--npx-gray-dark: #86868B;
	--npx-bg: #F5F5F5;
	--npx-success: #34C759;
	--npx-error: #FF3B30;

	/* Typography */
	--npx-font-primary: 'SF Pro Display', -apple-system, BlinkMacSystemFont, 'Inter', 'Segoe UI', 'Helvetica Neue', 'Helvetica', 'Arial', sans-serif;
	--npx-font-mono: 'SF Mono', 'Monaco', 'Inconsolata', 'Fira Mono', 'Droid Sans Mono', 'Source Code Pro', monospace;

	/* Font Sizes */
	--npx-text-h1: 64px;
	--npx-text-h2: 48px;
	--npx-text-h3: 32px;
	--npx-text-h4: 24px;
	--npx-text-body-l: 18px;
	--npx-text-body-m: 16px;
	--npx-text-body-s: 14px;
	--npx-text-caption: 12px;

	/* Line Heights */
	--npx-lh-tight: 1.15;
	--npx-lh-snug: 1.25;
	--npx-lh-normal: 1.5;
	--npx-lh-relaxed: 1.6;

	/* Spacing (8px grid) */
	--npx-space-1: 8px;
	--npx-space-2: 16px;
	--npx-space-3: 24px;
	--npx-space-4: 32px;
	--npx-space-5: 40px;
	--npx-space-6: 48px;
	--npx-space-8: 64px;
	--npx-space-10: 80px;
	--npx-space-12: 96px;
	--npx-space-15: 120px;

	/* Layout */
	--npx-container-max: 1440px;
	--npx-container-padding: 24px;
	--npx-content-max: 1200px;

	/* Border Radius */
	--npx-radius-button: 50px;
	--npx-radius-input: 10px;
	--npx-radius-card: 12px;
	--npx-radius-sm: 4px;

	/* Transitions */
	--npx-transition-fast: 0.15s ease-in-out;
	--npx-transition: 0.2s ease-in-out;
	--npx-transition-slow: 0.3s ease-in-out;

	/* Shadows */
	--npx-shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
	--npx-shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
	--npx-shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
	--npx-shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);

	/* Z-index scale */
	--npx-z-dropdown: 100;
	--npx-z-sticky: 200;
	--npx-z-fixed: 300;
	--npx-z-modal-backdrop: 400;
	--npx-z-modal: 500;
	--npx-z-tooltip: 600;
}

/* Responsive overrides */
@media (max-width: 768px) {
	:root {
		--npx-text-h1: 40px;
		--npx-text-h2: 32px;
		--npx-text-h3: 24px;
		--npx-text-h4: 20px;
		--npx-container-padding: 16px;
	}
}

/* ==========================================================================
   CSS Reset / Normalize
   ========================================================================== */

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

* {
	margin: 0;
	padding: 0;
}

html {
	-webkit-text-size-adjust: 100%;
	-webkit-font-smoothing: antialiased;
	-moz-osx-font-smoothing: grayscale;
	scroll-behavior: smooth;
}

body {
	font-family: var(--npx-font-primary);
	font-size: var(--npx-text-body-m);
	line-height: var(--npx-lh-normal);
	font-weight: 400;
	/* Ensure default text is not bold */
	color: var(--npx-black);
	background-color: var(--npx-white);
	min-height: 100vh;
}

img,
picture,
video,
canvas,
svg {
	display: block;
	max-width: 100%;
	height: auto;
}

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

button {
	cursor: pointer;
	background: none;
	border: none;
}

a {
	color: var(--npx-primary);
	text-decoration: none;
	transition: color var(--npx-transition);
}

a:hover {
	color: var(--npx-primary-hover);
}

ul,
ol {
	list-style: none;
}

/* Remove default button styles */
button:focus-visible,
a:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
	outline: 2px solid var(--npx-primary);
	outline-offset: 2px;
}

/* ==========================================================================
   Typography
   ========================================================================== */

h1,
.npx-h1 {
	font-family: var(--npx-font-primary);
	font-size: var(--npx-text-h1);
	font-weight: 600;
	line-height: var(--npx-lh-tight);
	color: var(--npx-black);
	margin-bottom: var(--npx-space-3);
}

h2,
.npx-h2 {
	font-family: var(--npx-font-primary);
	font-size: var(--npx-text-h2);
	font-weight: 600;
	line-height: 1.2;
	color: var(--npx-black);
	margin-bottom: var(--npx-space-3);
}

h3,
.npx-h3 {
	font-family: var(--npx-font-primary);
	font-size: var(--npx-text-h3);
	font-weight: 600;
	line-height: var(--npx-lh-snug);
	color: var(--npx-black);
	margin-bottom: var(--npx-space-2);
}

h4,
.npx-h4 {
	font-family: var(--npx-font-primary);
	font-size: var(--npx-text-h4);
	font-weight: 600;
	line-height: 1.3;
	color: var(--npx-black);
	margin-bottom: var(--npx-space-2);
}

h5,
.npx-h5 {
	font-family: var(--npx-font-primary);
	font-size: var(--npx-text-body-l);
	font-weight: 600;
	line-height: 1.4;
	color: var(--npx-black);
	margin-bottom: var(--npx-space-1);
}

h6,
.npx-h6 {
	font-family: var(--npx-font-primary);
	font-size: var(--npx-text-body-m);
	font-weight: 600;
	line-height: 1.4;
	color: var(--npx-black);
	margin-bottom: var(--npx-space-1);
}

p {
	margin-bottom: var(--npx-space-2);
	font-weight: 400;
	/* Ensure paragraphs are not bold */
}

p:last-child {
	margin-bottom: 0;
}

.npx-body-l {
	font-size: var(--npx-text-body-l);
	line-height: 28px;
}

.npx-body-m {
	font-size: var(--npx-text-body-m);
	line-height: 24px;
}

.npx-body-s {
	font-size: var(--npx-text-body-s);
	line-height: 20px;
}

.npx-caption {
	font-size: var(--npx-text-caption);
	line-height: 16px;
	color: var(--npx-gray-dark);
}

/* ==========================================================================
   Layout Components
   ========================================================================== */

.npx-container {
	max-width: var(--npx-container-max);
	margin-left: auto;
	margin-right: auto;
	padding-left: var(--npx-container-padding);
	padding-right: var(--npx-container-padding);
}

.npx-container--narrow {
	max-width: var(--npx-content-max);
}

.npx-container--small {
	max-width: 800px;
}

.npx-main {
	min-height: 50vh;
	padding-top: var(--npx-space-6);
	padding-bottom: var(--npx-space-10);
}

.npx-section {
	padding-top: var(--npx-space-10);
	padding-bottom: var(--npx-space-10);
}

.npx-section--sm {
	padding-top: var(--npx-space-6);
	padding-bottom: var(--npx-space-6);
}

.npx-section--lg {
	padding-top: var(--npx-space-15);
	padding-bottom: var(--npx-space-15);
}

.npx-section--bg {
	background-color: var(--npx-bg);
}

/* ==========================================================================
   Block Styles
   ========================================================================== */

/* Button: Text Link Style */
.wp-block-button.is-style-text .wp-block-button__link {
	background-color: transparent;
	border: none;
	box-shadow: none;
	color: var(--npx-black);
	padding-left: 0;
	padding-right: 0;
	text-decoration: none;
	display: inline-flex;
	align-items: center;
}

/* Remove Hover/Focus Effects */
.wp-block-button.is-style-text .wp-block-button__link:hover,
.wp-block-button.is-style-text .wp-block-button__link:focus,
.wp-block-button.is-style-text .wp-block-button__link:active,
.wp-block-button.is-style-text .wp-block-button__link:focus-visible {
	background-color: transparent;
	color: var(--npx-black);
	border: none;
	outline: none;
	box-shadow: none;
}

/* ==========================================================================
   Buttons
   ========================================================================== */

.npx-button {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: var(--npx-space-1);
	padding: 16px 24px;
	font-family: var(--npx-font-primary);
	font-size: var(--npx-text-body-m);
	font-weight: 500;
	line-height: 1;
	text-align: center;
	text-decoration: none;
	border-radius: var(--npx-radius-button);
	transition: background-color var(--npx-transition), color var(--npx-transition), border-color var(--npx-transition), transform var(--npx-transition);
	cursor: pointer;
	border: 1px solid transparent;
}

.npx-button:focus-visible {
	outline: 2px solid var(--npx-primary);
	outline-offset: 2px;
}

/* Primary Button */
.npx-button--primary {
	background-color: var(--npx-primary);
	color: var(--npx-white);
	border-color: var(--npx-primary);
}

.npx-button--primary:hover {
	background-color: var(--npx-primary-hover);
	border-color: var(--npx-primary-hover);
	color: var(--npx-white);
}

.npx-button--primary:active {
	background-color: var(--npx-primary-active);
	border-color: var(--npx-primary-active);
	transform: scale(0.98);
}

/* Secondary Button */
.npx-button--secondary {
	background-color: transparent;
	color: var(--npx-black);
	border-color: var(--npx-gray);
}

.npx-button--secondary:hover {
	border-color: var(--npx-black);
	color: var(--npx-black);
}

.npx-button--secondary:active {
	background-color: var(--npx-bg);
	transform: scale(0.98);
}

/* Ghost Button */
.npx-button--ghost {
	background-color: transparent;
	color: var(--npx-primary);
	border-color: transparent;
	padding: 8px 16px;
}

.npx-button--ghost:hover {
	background-color: rgba(0, 113, 227, 0.1);
	color: var(--npx-primary);
}

/* Button Sizes */
.npx-button--sm {
	padding: 10px 16px;
	font-size: var(--npx-text-body-s);
}

.npx-button--lg {
	padding: 20px 32px;
	font-size: var(--npx-text-body-l);
}

/* Button with icon */
.npx-button__icon {
	width: 20px;
	height: 20px;
	flex-shrink: 0;
}

.npx-button--sm .npx-button__icon {
	width: 16px;
	height: 16px;
}

/* ==========================================================================
   Form Elements
   ========================================================================== */

.npx-form-group {
	margin-bottom: var(--npx-space-3);
}

.npx-label {
	display: block;
	font-size: var(--npx-text-body-s);
	font-weight: 500;
	margin-bottom: var(--npx-space-1);
	color: var(--npx-black);
}

.npx-label--required::after {
	content: ' *';
	color: var(--npx-error);
}

.npx-input,
.npx-textarea,
.npx-select {
	display: block;
	width: 100%;
	padding: 14px 16px;
	font-family: var(--npx-font-primary);
	font-size: var(--npx-text-body-m);
	line-height: 1.5;
	color: var(--npx-black);
	background-color: var(--npx-white);
	border: 1px solid var(--npx-gray);
	border-radius: var(--npx-radius-input);
	transition: border-color var(--npx-transition), box-shadow var(--npx-transition);
}

.npx-input:hover,
.npx-textarea:hover,
.npx-select:hover {
	border-color: var(--npx-gray-dark);
}

.npx-input:focus,
.npx-textarea:focus,
.npx-select:focus {
	border-color: var(--npx-primary);
	box-shadow: 0 0 0 3px rgba(0, 113, 227, 0.15);
	outline: none;
}

.npx-input::placeholder,
.npx-textarea::placeholder {
	color: var(--npx-gray-dark);
}

.npx-input--error,
.npx-textarea--error,
.npx-select--error {
	border-color: var(--npx-error);
}

.npx-input--error:focus,
.npx-textarea--error:focus,
.npx-select--error:focus {
	box-shadow: 0 0 0 3px rgba(255, 59, 48, 0.15);
}

.npx-textarea {
	min-height: 120px;
	resize: vertical;
}

.npx-select {
	appearance: none;
	background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 16 16'%3E%3Cpath fill='%23000' d='M4 6l4 4 4-4'/%3E%3C/svg%3E");
	background-repeat: no-repeat;
	background-position: right 16px center;
	padding-right: 48px;
}

.npx-form-hint {
	font-size: var(--npx-text-caption);
	color: var(--npx-gray-dark);
	margin-top: 4px;
}

.npx-form-error {
	font-size: var(--npx-text-caption);
	color: var(--npx-error);
	margin-top: 4px;
}

/* ==========================================================================
   Cards
   ========================================================================== */

.npx-card {
	background-color: var(--npx-white);
	border-radius: var(--npx-radius-card);
	overflow: hidden;
	transition: box-shadow var(--npx-transition), transform var(--npx-transition);
}

.npx-card--bordered {
	border: 1px solid var(--npx-gray);
}

.npx-card--shadow {
	box-shadow: var(--npx-shadow-md);
}

.npx-card--shadow:hover {
	box-shadow: var(--npx-shadow-lg);
}

.npx-card--interactive:hover {
	transform: translateY(-2px);
}

.npx-card__image {
	aspect-ratio: 1;
	overflow: hidden;
	background-color: var(--npx-bg);
}

.npx-card__image img {
	width: 100%;
	height: 100%;
	object-fit: cover;
}

.npx-card__content {
	padding: var(--npx-space-3);
}

.npx-card__title {
	font-size: var(--npx-text-body-l);
	font-weight: 600;
	margin-bottom: var(--npx-space-1);
}

.npx-card__text {
	font-size: var(--npx-text-body-s);
	color: var(--npx-gray-dark);
}

/* ==========================================================================
   Page Header
   ========================================================================== */

.npx-page-header {
	margin-bottom: var(--npx-space-6);
}

.npx-page-title {
	font-size: var(--npx-text-h2);
	margin-bottom: var(--npx-space-2);
}

.npx-archive-description {
	font-size: var(--npx-text-body-l);
	color: var(--npx-gray-dark);
}

/* ==========================================================================
   Posts / Content
   ========================================================================== */

.npx-posts {
	display: grid;
	gap: var(--npx-space-6);
}

.npx-post {
	padding-bottom: var(--npx-space-6);
	border-bottom: 1px solid var(--npx-gray);
}

.npx-post:last-child {
	border-bottom: none;
	padding-bottom: 0;
}

.npx-post__header {
	margin-bottom: var(--npx-space-3);
}

.npx-post__title {
	font-size: var(--npx-text-h3);
	margin-bottom: var(--npx-space-1);
}

.npx-post__title a {
	color: var(--npx-black);
	text-decoration: none;
}

.npx-post__title a:hover {
	color: var(--npx-primary);
}

.npx-post__meta {
	font-size: var(--npx-text-body-s);
	color: var(--npx-gray-dark);
}

.npx-post__thumbnail {
	margin-bottom: var(--npx-space-3);
	border-radius: var(--npx-radius-card);
	overflow: hidden;
}

.npx-post__content {
	font-size: var(--npx-text-body-l);
	line-height: var(--npx-lh-relaxed);
}

/* ==========================================================================
   No Content
   ========================================================================== */

.npx-no-content {
	text-align: center;
	padding: var(--npx-space-10) 0;
}

.npx-no-content .npx-page-title {
	margin-bottom: var(--npx-space-2);
}

.npx-no-content p {
	font-size: var(--npx-text-body-l);
	color: var(--npx-gray-dark);
	margin-bottom: var(--npx-space-4);
}

/* ==========================================================================
   Pagination
   ========================================================================== */

.pagination,
.nav-links {
	display: flex;
	justify-content: center;
	align-items: center;
	gap: var(--npx-space-1);
	margin-top: var(--npx-space-6);
}

.page-numbers {
	display: flex;
	align-items: center;
	justify-content: center;
	min-width: 40px;
	height: 40px;
	padding: 0 12px;
	font-size: var(--npx-text-body-s);
	color: var(--npx-black);
	background-color: var(--npx-white);
	border: 1px solid var(--npx-gray);
	border-radius: var(--npx-radius-sm);
	text-decoration: none;
	transition: all var(--npx-transition);
}

.page-numbers:hover {
	border-color: var(--npx-black);
	color: var(--npx-black);
}

.page-numbers.current {
	background-color: var(--npx-primary);
	border-color: var(--npx-primary);
	color: var(--npx-white);
}

.page-numbers.dots {
	border: none;
	background: none;
}



/* ==========================================================================
   Utilities
   ========================================================================== */

/* Screen reader only */
.sr-only {
	position: absolute;
	width: 1px;
	height: 1px;
	padding: 0;
	margin: -1px;
	overflow: hidden;
	clip: rect(0, 0, 0, 0);
	white-space: nowrap;
	border: 0;
}

/* Skip link */
.skip-link {
	position: absolute;
	top: -100px;
	left: 50%;
	transform: translateX(-50%);
	padding: 12px 24px;
	background-color: var(--npx-primary);
	color: var(--npx-white);
	border-radius: var(--npx-radius-button);
	z-index: 9999;
	transition: top var(--npx-transition);
}

.skip-link:focus {
	top: 16px;
	outline: none;
}

/* Text alignment */
.text-left {
	text-align: left;
}

.text-center {
	text-align: center;
}

.text-right {
	text-align: right;
}

/* Display */
.d-none {
	display: none;
}

.d-block {
	display: block;
}

.d-flex {
	display: flex;
}

.d-grid {
	display: grid;
}

/* Flexbox utilities */
.flex-column {
	flex-direction: column;
}

.flex-wrap {
	flex-wrap: wrap;
}

.justify-center {
	justify-content: center;
}

.justify-between {
	justify-content: space-between;
}

.align-center {
	align-items: center;
}

.align-start {
	align-items: flex-start;
}

.align-end {
	align-items: flex-end;
}

.gap-1 {
	gap: var(--npx-space-1);
}

.gap-2 {
	gap: var(--npx-space-2);
}

.gap-3 {
	gap: var(--npx-space-3);
}

.gap-4 {
	gap: var(--npx-space-4);
}

/* Margin utilities */
.mt-0 {
	margin-top: 0;
}

.mt-1 {
	margin-top: var(--npx-space-1);
}

.mt-2 {
	margin-top: var(--npx-space-2);
}

.mt-3 {
	margin-top: var(--npx-space-3);
}

.mt-4 {
	margin-top: var(--npx-space-4);
}

.mt-6 {
	margin-top: var(--npx-space-6);
}

.mb-0 {
	margin-bottom: 0;
}

.mb-1 {
	margin-bottom: var(--npx-space-1);
}

.mb-2 {
	margin-bottom: var(--npx-space-2);
}

.mb-3 {
	margin-bottom: var(--npx-space-3);
}

.mb-4 {
	margin-bottom: var(--npx-space-4);
}

.mb-6 {
	margin-bottom: var(--npx-space-6);
}

/* Padding utilities */
.p-0 {
	padding: 0;
}

.p-1 {
	padding: var(--npx-space-1);
}

.p-2 {
	padding: var(--npx-space-2);
}

.p-3 {
	padding: var(--npx-space-3);
}

.p-4 {
	padding: var(--npx-space-4);
}

/* Width utilities */
.w-full {
	width: 100%;
}

.w-auto {
	width: auto;
}

/* Colors */
.text-primary {
	color: var(--npx-primary);
}

/* ==========================================================================
   Search Block
   ========================================================================== */

/* Page-level search blocks (404, search results, etc.) — excludes header search */
:not(.npx-header-search)>.wp-block-search__button,
.wp-block-search:not(.npx-header-search) .wp-block-search__button {
	background-color: var(--npx-primary);
	color: var(--npx-white);
	border: 1px solid var(--npx-primary);
	padding: 12px 24px;
	border-radius: 8px;
	font-weight: 500;
	transition: background-color var(--npx-transition);
}

:not(.npx-header-search)>.wp-block-search__button:hover,
.wp-block-search:not(.npx-header-search) .wp-block-search__button:hover {
	background-color: var(--npx-primary-hover);
	color: var(--npx-white);
}

.wp-block-search:not(.npx-header-search) .wp-block-search__input {
	padding: 16px;
	font-family: var(--npx-font-primary);
}

/* Variant 1: Button Outside (Input [Gap] Button) */
.wp-block-search__button-outside:not(.npx-header-search) .wp-block-search__inside-wrapper {
	display: flex;
	gap: 12px !important;
	border: none !important;
	background: transparent !important;
	padding: 0 !important;
}

.wp-block-search__button-outside:not(.npx-header-search) .wp-block-search__input {
	border-radius: 8px !important;
	border: 1px solid var(--npx-gray) !important;
	flex-grow: 1;
}

.wp-block-search__button-outside:not(.npx-header-search) .wp-block-search__button {
	border-radius: 30px !important;
	width: 161px;
	margin-left: 0;
}

/* Variant 2: Button Inside (Input [Button] Inside Border) */
.wp-block-search__button-inside:not(.npx-header-search) .wp-block-search__inside-wrapper {
	border: 1px solid var(--npx-gray);
	border-radius: 8px;
	padding: 4px;
	display: flex;
	background: #fff;
}

.wp-block-search__button-inside:not(.npx-header-search) .wp-block-search__input {
	border: none !important;
	border-radius: 4px !important;
	padding-left: 12px;
}

.wp-block-search__button-inside:not(.npx-header-search) .wp-block-search__input:focus {
	box-shadow: none !important;
	outline: none !important;
}

.wp-block-search__button-inside:not(.npx-header-search) .wp-block-search__button {
	border-radius: 6px !important;
	margin-left: 0;
	padding: 8px 20px;
	border: none !important;
}

.wp-block-search:not(.npx-header-search) .wp-block-search__inside-wrapper {
	gap: 0;
}

/* Header search — compact, inherits editor block attributes */
.npx-header-search-group .wp-block-search__input {
	padding: 12px !important;
	font-size: 14px;
	border: 1px solid var(--npx-gray);
}

.text-gray {
	color: var(--npx-gray-dark);
}

.text-success {
	color: var(--npx-success);
}

.text-error {
	color: var(--npx-error);
}

.bg-white {
	background-color: var(--npx-white);
}

.bg-gray {
	background-color: var(--npx-bg);
}

.bg-primary {
	background-color: var(--npx-primary);
}

/* ==========================================================================
   Responsive Utilities
   ========================================================================== */

@media (max-width: 768px) {
	.md\:d-none {
		display: none;
	}

	.md\:d-block {
		display: block;
	}

	.md\:d-flex {
		display: flex;
	}

	.md\:flex-column {
		flex-direction: column;
	}

	.md\:text-center {
		text-align: center;
	}
}

@media (max-width: 480px) {
	.sm\:d-none {
		display: none;
	}

	.sm\:d-block {
		display: block;
	}

	.sm\:flex-column {
		flex-direction: column;
	}
}

/* ==========================================================================
   Header — Single Sticky Bar
   ========================================================================== */

/* Sticky wrapper */
.wp-block-template-part:has(> .npx-header) {
	position: sticky;
	top: 0;
	z-index: var(--npx-z-sticky, 200);
}

.npx-header {
	position: relative;
	padding: 0 !important;
}

/* Elevate header stacking context when mobile menu is open */
body.npx-drawer-open .wp-block-template-part:has(> .npx-header) {
	z-index: var(--npx-z-modal);
}

/* Header bar layout — matches theme.json contentSize: 1200px */
.npx-header-bar {
	display: flex;
	align-items: center;
	justify-content: space-between;
	max-width: 1200px;
	margin: 0 auto;
	padding: 20px var(--npx-container-padding, 24px);
	gap: var(--npx-space-3);
}

/* Align with 1200px content grid on large desktops only */
@media (min-width: 1248px) {
	.npx-header-bar {
		padding-left: 0;
		padding-right: 0;
	}
}

/* Remove any WP block wrapper padding that offsets the header */
.npx-header > .wp-block-shortcode {
	padding: 0;
	margin: 0;
}

/* Reset stray <p> and <br> from wpautop — don't hide, just neutralize */
.npx-header-bar p,
.npx-header-bar__right p {
	display: contents !important;
	margin: 0 !important;
	padding: 0 !important;
}

.npx-header-bar > br,
.npx-header-bar__right > br,
.npx-header-bar p:empty {
	display: none !important;
}

/* Logo */
.npx-header-bar__logo {
	flex-shrink: 0;
}

.npx-header-bar__logo-link {
	display: flex;
	align-items: center;
	text-decoration: none;
	color: var(--npx-black);
}

.npx-header-bar__logo-img {
	height: 30px;
	width: auto;
	display: block;
}

.npx-header-bar__logo-text {
	font-family: var(--npx-font-primary);
	font-size: var(--npx-text-h4);
	font-weight: 700;
	letter-spacing: -0.02em;
}

/* Hide any WP site-logo block remnants inside header */
.npx-header .wp-block-site-logo {
	display: none !important;
}

/* Right side — all items as flat siblings, vertically centered */
.npx-header-bar__right {
	display: flex;
	align-items: center;
	gap: var(--npx-space-4);
	flex-wrap: nowrap;
	white-space: nowrap;
	line-height: 1;
}

/* Current/active nav item */
.npx-header-bar__item.is-current {
	color: var(--npx-primary);
}

/* Header items with text label + icon (Search, Cart, Account) */
.npx-header-bar__item {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	background: none;
	border: none;
	padding: 0;
	margin: 0;
	cursor: pointer;
	color: var(--npx-black);
	text-decoration: none;
	font-family: var(--npx-font-primary);
	font-size: var(--npx-text-body-m);
	font-weight: 500;
	line-height: 20px;
	height: 20px;
	transition: color var(--npx-transition);
	white-space: nowrap;
	vertical-align: middle;
}

.npx-header-bar__item:hover {
	color: var(--npx-primary);
}

.npx-header-bar__item svg {
	flex-shrink: 0;
	display: block;
}

.npx-header-bar__item span {
	display: inline-flex;
	align-items: center;
	height: 20px;
}

/* Mobile right side — icons only */
.npx-header-bar__right-mobile {
	display: flex;
	align-items: center;
	gap: var(--npx-space-2);
}

/* Icon-only buttons (mobile) */
.npx-header-bar__icon-btn {
	display: flex;
	align-items: center;
	justify-content: center;
	background: none;
	border: none;
	padding: 4px;
	cursor: pointer;
	color: var(--npx-black);
	transition: color var(--npx-transition);
	text-decoration: none;
	position: relative;
}

.npx-header-bar__icon-btn:hover {
	color: var(--npx-primary);
}

/* Cart icon wrapper (for badge positioning) */
.npx-header-bar__cart-icon-wrap {
	position: relative;
	display: flex;
	align-items: center;
}

/* Cart count badge */
.npx-header-bar__cart-count {
	position: absolute;
	top: -10px;
	right: -14px;
	background: var(--npx-primary);
	color: var(--npx-white);
	font-size: 12px;
	font-weight: 600;
	min-width: 16px;
	height: 16px;
	line-height: 16px;
	text-align: center;
	border-radius: 50%;
	padding: 0 8px;
}

/* Search overlay */
.npx-header-bar__search-overlay {
	position: absolute;
	top: 0;
	left: 0;
	right: 0;
	height: 100%;
	margin-top: 0;
	background: var(--npx-white);
	display: flex;
	align-items: center;
	justify-content: center;
	z-index: 10;
	padding: 0 24px;
}

.npx-header-bar__search-form {
	display: flex;
	align-items: center;
	width: 100%;
	max-width: 600px;
	gap: var(--npx-space-1);
}

.npx-header-bar__search-input {
	flex: 1;
	padding: 10px 16px;
	border: 1px solid var(--npx-gray);
	border-radius: var(--npx-radius-input);
	font-family: var(--npx-font-primary);
	font-size: var(--npx-text-body-m);
	outline: none;
	transition: border-color var(--npx-transition);
}

.npx-header-bar__search-input:focus {
	border-color: var(--npx-primary);
	box-shadow: 0 0 0 2px rgba(0, 113, 227, 0.15);
}

.npx-header-bar__search-submit,
.npx-header-bar__search-close {
	display: flex;
	align-items: center;
	justify-content: center;
	background: none;
	border: none;
	padding: 8px;
	cursor: pointer;
	color: var(--npx-black);
	transition: color var(--npx-transition);
}

.npx-header-bar__search-submit:hover,
.npx-header-bar__search-close:hover {
	color: var(--npx-primary);
}

/* Mobile drawer */
.npx-mobile-drawer {
	position: fixed;
	top: 0;
	right: 0;
	bottom: 0;
	width: 280px;
	height: 100%;
	background: var(--npx-white);
	z-index: var(--npx-z-modal);
	transform: translateX(100%);
	transition: transform var(--npx-transition-slow);
	padding: 60px 24px 24px;
	box-shadow: var(--npx-shadow-xl);
	overflow-y: auto;
	display: flex;
	flex-direction: column;
	margin-top: 0;
}

.npx-mobile-drawer__close {
	position: absolute;
	top: 20px;
	right: 20px;
	background: none;
	border: none;
	padding: 8px;
	cursor: pointer;
	color: var(--npx-black);
	transition: color var(--npx-transition);
	z-index: 2;
}

.npx-mobile-drawer__close:hover {
	color: var(--npx-primary);
}

.npx-mobile-drawer__close svg {
	display: block;
}

.npx-mobile-drawer[aria-hidden="false"] {
	transform: translateX(0);
}

.npx-mobile-drawer__menu {
	list-style: none;
	margin: 0;
	padding: 0;
}

.npx-mobile-drawer__menu li {
	border-bottom: 1px solid var(--npx-gray);
}

.npx-mobile-drawer__menu a {
	display: block;
	padding: 16px 0;
	font-family: var(--npx-font-primary);
	font-size: var(--npx-text-body-l);
	font-weight: 500;
	color: var(--npx-black);
	text-decoration: none;
	transition: color var(--npx-transition);
}

.npx-mobile-drawer__menu a:hover {
	color: var(--npx-primary);
}

.npx-mobile-drawer__menu .current-menu-item a {
	color: var(--npx-primary);
}

/* Drawer backdrop */
body.npx-drawer-open::after {
	content: '';
	position: fixed;
	top: 0;
	left: 0;
	right: 0;
	bottom: 0;
	background: rgba(0, 0, 0, 0.4);
	z-index: var(--npx-z-modal-backdrop);
}

body.npx-drawer-open,
body.npx-no-scroll {
	overflow: hidden;
}

/* Desktop / Mobile visibility */
.npx-desktop-only {
	display: flex;
}

.npx-mobile-only {
	display: none;
}

/* User greeting (legacy shortcode support) */
.npx-user-greeting {
	white-space: nowrap;
}

.npx-user-greeting--guest {
	text-decoration: none;
	color: inherit;
}

.npx-header-bar__mini-cart-hidden {
	position: absolute;
	overflow: hidden;
	width: 0;
	height: 0;
	opacity: 0;
	pointer-events: none;
}

/* ==========================================================================
   Footer Responsive Grid
   ========================================================================== */

/* Desktop: 4 columns */
footer .wp-block-group.is-layout-grid,
.npx-footer-grid {
	display: grid !important;
	grid-template-columns: repeat(4, 1fr) !important;
	gap: 40px 24px !important;
}

/* Tablet: 2 columns */
@media (max-width: 768px) {

	footer .wp-block-group.is-layout-grid,
	.npx-footer-grid {
		grid-template-columns: repeat(2, 1fr) !important;
		gap: 32px 20px !important;
	}
}

/* Mobile: 2 columns with tighter spacing */
@media (max-width: 480px) {

	footer .wp-block-group.is-layout-grid,
	.npx-footer-grid {
		grid-template-columns: repeat(2, 1fr) !important;
		gap: 24px 16px !important;
	}
}

/* ==========================================================================
   Header Responsive
   ========================================================================== */

@media (max-width: 768px) {
	.npx-header-bar {
		padding: 16px 20px;
		gap: var(--npx-space-2);
	}

	.npx-header-bar__logo-img {
		height: 20px;
	}

	/* Hide desktop nav, show hamburger */
	.npx-desktop-only {
		display: none !important;
	}

	.npx-mobile-only {
		display: flex !important;
	}

	.npx-header-bar__right-mobile {
		gap: var(--npx-space-2);
	}
}

/* ==========================================================================
   Product Collection Block (Search Results, Archives)
   Matches the custom product-card component styling for consistency.
   ========================================================================== */

/* Product Title Links */
.wp-block-woocommerce-product-collection .wp-block-post-title a {
	color: var(--npx-black);
	text-decoration: none;
	transition: color var(--npx-transition);
}

.wp-block-woocommerce-product-collection .wp-block-post-title a:hover {
	color: var(--npx-primary);
	text-decoration: none;
}

/* Product Button (Add to Cart / Select Options) — editor-customizable */
.wp-block-woocommerce-product-collection .wp-block-button .wp-block-button__link,
.wp-block-woocommerce-product-collection .wc-block-components-product-button__button {
	background-color: var(--npx-primary);
	color: var(--npx-white);
	border: 1px solid var(--npx-primary);
	border-radius: var(--npx-radius-button);
	padding: 10px 24px;
	font-weight: 500;
	text-decoration: none;
	transition: all var(--npx-transition);
	cursor: pointer;
}

.wp-block-woocommerce-product-collection .wp-block-button .wp-block-button__link:hover,
.wp-block-woocommerce-product-collection .wc-block-components-product-button__button:hover {
	background-color: var(--npx-primary-hover);
	border-color: var(--npx-primary-hover);
	color: var(--npx-white);
	transform: translateY(-1px);
	box-shadow: var(--npx-shadow-sm);
}

/* Sale Badge */
.wp-block-woocommerce-product-collection .wc-block-components-product-sale-badge {
	background-color: var(--npx-primary);
	color: var(--npx-white);
	font-size: 12px;
	font-weight: 600;
	padding: 4px 10px;
	border-radius: 4px;
}

/* Price Styling */
.wp-block-woocommerce-product-collection .wc-block-components-product-price del {
	color: var(--npx-gray-dark);
	font-weight: 400;
}

.wp-block-woocommerce-product-collection .wc-block-components-product-price ins {
	text-decoration: none;
	color: var(--npx-error);
}

/* Pagination */
.wp-block-query-pagination {
	margin-top: 48px;
	display: flex !important;
	justify-content: center;
	width: 100%;
}

.wp-block-query-pagination-numbers {
	display: flex !important;
	gap: 12px;
	justify-content: center;
	align-items: center;
}

.wp-block-query-pagination-numbers .page-numbers {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-width: 40px;
	height: 40px;
	padding: 0 12px;
	border: 1px solid var(--npx-gray);
	border-radius: 8px;
	text-decoration: none;
	color: var(--npx-black);
	font-family: var(--npx-font-primary);
	font-size: 14px;
	font-weight: 500;
	transition: all var(--npx-transition);
	background-color: var(--npx-white);
}

.wp-block-query-pagination-numbers .page-numbers.current {
	background-color: var(--npx-primary);
	border-color: var(--npx-primary);
	color: var(--npx-white);
}

.wp-block-query-pagination-numbers a.page-numbers:hover {
	border-color: var(--npx-primary);
	color: var(--npx-primary);
	transform: translateY(-1px);
	box-shadow: var(--npx-shadow-sm);
}

/* Catalog Sorting Dropdown Styling */
.wp-block-woocommerce-catalog-sorting select.orderby {
	appearance: none;
	-webkit-appearance: none;
	background-color: var(--npx-white);
	border: 1px solid var(--npx-gray);
	border-radius: 10px;
	padding: 8px 36px 8px 12px;
	font-family: var(--npx-font-primary);
	font-size: 14px;
	font-weight: 400;
	color: var(--npx-black);
	cursor: pointer;
	transition: border-color var(--npx-transition);
	background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%2386868B' d='M2.5 4.5L6 8l3.5-3.5'/%3E%3C/svg%3E");
	background-repeat: no-repeat;
	background-position: right 12px center;
	background-size: 12px;
	min-width: 180px;
}

.wp-block-woocommerce-catalog-sorting select.orderby:hover {
	border-color: var(--npx-primary);
}

.wp-block-woocommerce-catalog-sorting select.orderby:focus {
	outline: none;
	border-color: var(--npx-primary);
	box-shadow: 0 0 0 2px rgba(0, 113, 227, 0.1);
}

/* No Results Section */
.wp-block-woocommerce-product-collection-no-results {
	text-align: center;
	padding: 48px 24px;
}

/* ==========================================================================
   WPForms Contact Form
   ========================================================================== */

/* Form container — centered with max width */
#wpforms-292,
.wpforms-container {
	max-width: 752px;
	margin: 0 auto;
}

/* Override WPForms medium field width restriction */
.wpforms-container-full .wpforms-form .wpforms-field-medium,
.wpforms-container-full .wpforms-form .wpforms-field-row.wpforms-field-medium {
	max-width: 100%;
}

/* All inputs — rounded, taller, consistent border */
.wpforms-container-full .wpforms-form .wpforms-field input,
.wpforms-container-full .wpforms-form .wpforms-field textarea,
.wpforms-container-full .wpforms-form .wpforms-field select {
	border: 1px solid var(--npx-gray, #D2D2D7);
	border-radius: 10px;
	padding: 14px 16px;
	height: 50px;
	font-size: 15px;
	font-family: var(--npx-font-primary, inherit);
	background: var(--npx-white, #fff);
	width: 100%;
	box-sizing: border-box;
	transition: border-color var(--npx-transition, 0.2s ease);
}

.wpforms-container-full .wpforms-form .wpforms-field input:focus,
.wpforms-container-full .wpforms-form .wpforms-field textarea:focus {
	border-color: var(--npx-primary, #0071E3);
	outline: none;
	box-shadow: 0 0 0 2px rgba(0, 113, 227, 0.1);
}

/* Textarea (Message field) — taller */
.wpforms-container-full .wpforms-form .wpforms-field textarea {
	height: auto;
	min-height: 50px;
}

/* Field spacing */
.wpforms-container-full .wpforms-form .wpforms-field {
	margin-bottom: 16px;
}

/* Submit button — full-width pill */
.wpforms-container-full .wpforms-form .wpforms-submit-container {
	margin-top: 8px;
}

.wpforms-container-full .wpforms-form .wpforms-submit {
	width: 100%;
	height: 56px;
	background: var(--npx-primary, #0071E3) !important;
	color: var(--npx-white, #fff);
	border: none;
	border-radius: 30px;
	padding: 16px 24px;
	font-size: 16px;
	font-weight: 600;
	cursor: pointer;
	transition: background-color var(--npx-transition, 0.2s ease);
}

.wpforms-container-full .wpforms-form .wpforms-submit:hover {
	background: var(--npx-primary-hover, #005BB5) !important;
}

/* Loading spinner — centered inside submit button */
.wpforms-container-full .wpforms-form .wpforms-submit-container {
	position: relative;
}

.wpforms-container-full .wpforms-form .wpforms-submit-container .wpforms-submit-spinner {
	position: absolute !important;
	top: 50% !important;
	left: 50% !important;
	transform: translate(-50%, -50%) !important;
	margin: 0 !important;
}

/* Placeholder styling */
.wpforms-container-full .wpforms-form .wpforms-field input::placeholder,
.wpforms-container-full .wpforms-form .wpforms-field textarea::placeholder {
	color: #86868B;
	font-weight: 400;
}

/* WPForms and WooCommerce Success Message */
.wpforms-container-full .wpforms-confirmation-container-full,
.woocommerce-notices-wrapper .wc-block-components-notice-banner.is-success {
	background-color: #dfefff !important;
	border: 1px solid #0071E3 !important;
	color: #000000 !important;
	border-radius: 4px !important;
	font-family: var(--npx-font-primary);
	font-size: var(--npx-text-body-m);
	margin-bottom: var(--npx-space-4);
}

/* Constrain WooCommerce Store Notices to content width on Cart/Checkout */
.wc-block-store-notices.alignwide {
	max-width: 1200px !important;
	margin-left: auto !important;
	margin-right: auto !important;
}

.woocommerce-notices-wrapper .wc-block-components-notice-banner.is-success svg {
	fill: #fff !important;
	background: #0071E3 !important;
}

/* ==========================================================================
   Full Height Layout (Push Footer to Bottom)
   ========================================================================== */
body {
	display: flex;
	flex-direction: column;
	min-height: 100vh;
}

.wp-site-blocks {
	display: flex;
	flex-direction: column;
	flex-grow: 1;
	width: 100%;
	overflow-x: clip;
}

.wp-site-blocks>main,
.wp-site-blocks>.wp-block-group>main,
.wp-site-blocks>main>.wp-block-post-content {
	flex-grow: 1;
}

.wp-site-blocks>.wp-block-woocommerce-coming-soon {
	flex-grow: 1;
	display: flex;
	flex-direction: column;
}

.wp-site-blocks>.wp-block-woocommerce-coming-soon>.wp-block-group:nth-child(2) {
	flex-grow: 1;
}