/* GPS canonical components. Loaded last so every template shares one system. */
:root {
	--gps-space-section: clamp(40px, 6vw, 80px);
	--gps-space-group: clamp(24px, 4vw, 48px);
	--gps-control-height: 48px;
	--gps-control-radius: 11px;
	--gps-card-radius: 16px;
	--gps-card-padding: clamp(22px, 3vw, 30px);
	--gps-shadow-card: 0 10px 30px rgba(24, 24, 24, .07);
	--gps-focus-ring: 0 0 0 2px #fff, 0 0 0 5px var(--gps-color-primary);
}

body { color: var(--gps-color-text); background: var(--gps-color-background); }
body :where(h1, h2, h3, h4, h5, h6) { color: var(--gps-color-heading); font-family: var(--gps-font-heading); text-wrap: balance; }
body :where(p, li) { text-wrap: pretty; }
.gps-content { padding-block: var(--gps-space-section); }
.gps-content-narrow { width: min(100%, 820px); }
.entry-content > * + * { margin-top: 1.25em; }
.entry-content :where(h2, h3) { margin-top: 1.7em; margin-bottom: .65em; }

/* Buttons: one geometry and priority model across the theme and WooCommerce. */
:where(.gps-button, .gps-home-button, .gps-home-link-button),
.woocommerce :where(a.button, button.button, input.button, #respond input#submit),
:where(.woocommerce-cart, .woocommerce-checkout, .woocommerce-account) button[type="submit"] {
	display: inline-flex !important;
	min-height: var(--gps-control-height) !important;
	align-items: center;
	justify-content: center;
	gap: 8px;
	padding: 0 22px !important;
	border: 1px solid transparent !important;
	border-radius: var(--gps-control-radius) !important;
	box-shadow: none !important;
	font-family: var(--gps-font-body);
	font-size: 14px !important;
	font-weight: 700 !important;
	line-height: 1 !important;
	text-align: center;
	text-decoration: none;
	cursor: pointer;
	transition: color .2s ease, border-color .2s ease, background-color .2s ease, transform .2s ease, opacity .2s ease;
}

:where(.gps-button, .gps-home-button, .gps-home-link-button):hover,
.woocommerce :where(a.button, button.button, input.button, #respond input#submit):hover { transform: translateY(-2px); }

:where(.gps-button, .gps-button--primary, .gps-home-button--primary),
.woocommerce :where(a.button, button.button, input.button, #respond input#submit),
:where(.woocommerce-cart, .woocommerce-checkout, .woocommerce-account) button[type="submit"] {
	color: #fff !important;
	border-color: var(--gps-color-primary) !important;
	background: var(--gps-color-primary) !important;
}

:where(.gps-button, .gps-button--primary, .gps-home-button--primary):hover,
.woocommerce :where(a.button, button.button, input.button, #respond input#submit):hover,
:where(.woocommerce-cart, .woocommerce-checkout, .woocommerce-account) button[type="submit"]:hover {
	color: #fff !important;
	border-color: var(--gps-color-primary-dark) !important;
	background: var(--gps-color-primary-dark) !important;
}

:where(.gps-button--accent, .gps-home-button--orange),
.woocommerce div.product form.cart .single_add_to_cart_button,
.woocommerce-checkout #place_order {
	color: #fff !important;
	border-color: var(--gps-color-accent) !important;
	background: var(--gps-color-accent) !important;
}

:where(.gps-button--accent, .gps-home-button--orange):hover,
.woocommerce div.product form.cart .single_add_to_cart_button:hover,
.woocommerce-checkout #place_order:hover {
	color: #fff !important;
	border-color: var(--gps-color-accent-hover) !important;
	background: var(--gps-color-accent-hover) !important;
}

:where(.gps-button--secondary, .gps-button--outline, .gps-button-outline, .gps-home-button--outline, .gps-home-link-button) {
	color: var(--gps-color-primary) !important;
	border-color: var(--gps-color-primary) !important;
	background: transparent !important;
}

:where(.gps-button--secondary, .gps-button--outline, .gps-button-outline, .gps-home-button--outline, .gps-home-link-button):hover {
	color: #fff !important;
	border-color: var(--gps-color-primary) !important;
	background: var(--gps-color-primary) !important;
}

:where(.gps-button--light, .gps-button-light, .gps-home-button--light) {
	color: #fff !important;
	border-color: rgba(255, 255, 255, .68) !important;
	background: transparent !important;
}

:where(.gps-button--light, .gps-button-light, .gps-home-button--light):hover {
	color: var(--gps-color-primary-dark) !important;
	border-color: #fff !important;
	background: #fff !important;
}

:where(button, .button, .gps-button, .gps-home-button, .gps-home-link-button):focus-visible,
:where(input, select, textarea, summary, a):focus-visible { outline: 2px solid transparent; outline-offset: 2px; box-shadow: var(--gps-focus-ring) !important; }

/* Form fields keep their field border without an outer focus ring. */
body input:focus,
body input:focus-visible,
body select:focus,
body select:focus-visible,
body textarea:focus,
body textarea:focus-visible {
	outline: none !important;
	box-shadow: none !important;
}
body input[type="range"]:focus-visible::-webkit-slider-thumb { outline: none !important; }
body input[type="range"]:focus-visible::-moz-range-thumb { outline: none !important; }
:where(button, .button, .gps-button, .gps-home-button):disabled,
:where(button, .button, .gps-button, .gps-home-button)[aria-disabled="true"],
.woocommerce :where(.button.disabled, .button:disabled) { opacity: .45 !important; cursor: not-allowed !important; transform: none !important; }

/* Header controls and navigation. */
.gps-search { min-height: var(--gps-control-height); border-radius: var(--gps-control-radius); }
.gps-search input[type="search"] { min-height: var(--gps-control-height); }
.gps-search button { display: grid; width: 48px; min-height: 48px; padding: 0; place-items: center; border: 0; border-radius: 0; background: var(--gps-color-accent); color: #fff; }
.gps-menu-toggle { min-width: 44px; min-height: 44px; }
.gps-nav a { position: relative; }
.gps-nav ul a::after { position: absolute; right: 0; bottom: 8px; left: 0; height: 2px; background: var(--gps-color-accent); content: ""; transform: scaleX(0); transition: transform .2s ease; }
.gps-nav ul a:hover::after, .gps-nav ul a:focus-visible::after { transform: scaleX(1); }
.gps-quote { font-weight: 800; }
.gps-nav a[aria-current="page"]::after { transform: scaleX(1); }
.gps-actions > a { min-width: 44px; min-height: 44px; justify-content: center; }
@media(max-width: 900px) {
 .gps-header-row { flex-wrap: wrap; padding-block: 12px; }
 .gps-header-row .gps-search { display: flex; order: 3; flex: 1 0 100%; width: 100%; max-width: none; }
 .gps-header-row .gps-actions { margin-left: auto; }
}

/* Forms. */
body :where(input[type="text"], input[type="email"], input[type="tel"], input[type="url"], input[type="password"], input[type="search"], input[type="number"], select, textarea) {
	width: 100%;
	min-height: var(--gps-control-height);
	padding: 10px 13px;
	border: 1px solid var(--gps-color-border);
	border-radius: var(--gps-control-radius);
	background: #fff;
	color: var(--gps-color-heading);
}
body textarea { min-height: 130px; resize: vertical; }
body :where(input, select, textarea):focus { border-color: var(--gps-color-primary); outline: 0; }
body :where(label, legend) { color: var(--gps-color-heading); font-weight: 650; }
.search-form { display: flex; gap: 10px; }
.search-form label { flex: 1; }
.search-form .search-submit { flex: 0 0 auto; min-height: var(--gps-control-height); padding: 0 22px; border: 1px solid var(--gps-color-primary); border-radius: var(--gps-control-radius); background: var(--gps-color-primary); color: #fff; font-weight: 700; }

/* Shared surfaces and page states. */
.gps-page-header { background: var(--gps-color-background); }
.gps-page-header-inner { position: relative; display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, .65fr); align-items: center; gap: 20px 40px; padding-block: 32px; border-bottom: 1px solid var(--gps-color-border); }
.gps-page-header-inner::after { position: absolute; bottom: -1px; left: 0; width: 40px; height: 3px; background: var(--gps-color-accent); content: ''; }
.gps-page-heading { grid-column: 1; grid-row: 1; min-width: 0; }
.gps-page-header h1, .gps-empty-state h1 { margin: 0; font-size: clamp(28px, 3vw, 40px); font-weight: 700; letter-spacing: -.035em; line-height: 1.18; overflow-wrap: anywhere; text-wrap: pretty; }
.gps-page-header .gps-breadcrumb { grid-column: 2; grid-row: 1; justify-self: end; max-width: 46ch; margin: 0; color: var(--gps-color-muted); font-size: 12px; line-height: 1.8; text-align: right; overflow-wrap: anywhere; }
.gps-breadcrumb a { color: var(--gps-color-primary); }
.gps-breadcrumb a:hover { color: var(--gps-color-accent); }
.gps-breadcrumb-separator { display: inline-block; margin-inline: 8px; color: var(--gps-color-muted); }
.gps-page-header .gps-page-description { max-width: 65ch; margin-top: 10px; color: var(--gps-color-muted); font-size: 14px; line-height: 1.6; }
.gps-page-header .gps-page-description p { margin: 0; }
.gps-page-header .gps-page-description p + p { margin-top: 12px; }
body .gps-content.gps-page-content { padding-block: 32px var(--gps-space-section); }
.gps-reading-content { width: 100%; max-width: 820px; margin-inline: auto; min-width: 0; }
.gps-eyebrow { margin-bottom: 10px; color: var(--gps-color-accent); font-size: 12px; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; }
.gps-empty-state { min-height: 55vh; text-align: center; }
.gps-empty-state .search-form { max-width: 620px; margin: 28px auto; }
.gps-card { display: flex; min-width: 0; flex-direction: column; overflow: hidden; border: 1px solid var(--gps-color-border); border-radius: var(--gps-card-radius); background: #fff; box-shadow: var(--gps-shadow-card); transition: border-color .2s ease, box-shadow .2s ease, transform .2s ease; }
.gps-card:hover { border-color: #f8c99b; }
.gps-card-body { display: flex; flex: 1; flex-direction: column; padding: var(--gps-card-padding); }
.gps-card-body p { margin-bottom: 0; }

/* WooCommerce listing, product, cart, checkout and account. */
.woocommerce ul.products li.product { display: flex; min-width: 0; min-height: 100%; flex-direction: column; overflow: hidden; border: 1px solid var(--gps-color-border) !important; border-radius: var(--gps-card-radius) !important; background: #fff; box-shadow: var(--gps-shadow-card); transition: border-color .2s ease, box-shadow .2s ease, transform .2s ease; }
.woocommerce ul.products li.product:hover { border-color: #f8c99b !important; }
.woocommerce ul.products li.product .woocommerce-loop-product__title { color: var(--gps-color-heading); line-height: 1.45; }
.woocommerce ul.products li.product .price { color: var(--gps-color-heading) !important; }
.woocommerce ul.products li.product > .button { width: 100%; margin-top: auto !important; }
.gps-results ul.products li.product > .button { min-height: var(--gps-control-height) !important; border-radius: var(--gps-control-radius) !important; }
.gps-filter-toggle { min-height: 44px; align-items: center; justify-content: center; gap: 8px; padding: 0 16px; border: 1px solid var(--gps-color-primary); border-radius: var(--gps-control-radius); background: var(--gps-color-primary); color: #fff; font-weight: 700; }
.gps-filter-head button { display: grid; width: 44px; height: 44px; padding: 0; place-items: center; border: 1px solid var(--gps-color-border); border-radius: 50%; background: #fff; color: var(--gps-color-heading); }
.gps-home-products ul.products li.product .button {
	width: 100% !important;
	min-height: var(--gps-control-height) !important;
	margin-top: auto !important;
	padding: 0 22px !important;
	color: #fff !important;
	border: 1px solid var(--gps-color-primary) !important;
	border-radius: var(--gps-control-radius) !important;
	background: var(--gps-color-primary) !important;
}
.gps-home-products ul.products li.product .button:hover { border-color: var(--gps-color-primary-dark) !important; background: var(--gps-color-primary-dark) !important; }
.gps-home-hero .gps-home-button { min-height: 56px !important; }
.woocommerce span.onsale { border-radius: 999px !important; background: var(--gps-color-accent) !important; }
.woocommerce :where(.woocommerce-message, .woocommerce-info, .woocommerce-error) { border-radius: var(--gps-control-radius); background: var(--gps-color-surface); }
.woocommerce div.product .summary { align-self: start; padding: var(--gps-card-padding); border: 1px solid var(--gps-color-border); border-radius: var(--gps-card-radius); background: #fff; box-shadow: var(--gps-shadow-card); }
.woocommerce div.product form.cart { display: flex; align-items: stretch; gap: 10px; }
.woocommerce div.product form.cart .quantity .qty { min-height: var(--gps-control-height); border-radius: var(--gps-control-radius); }
.woocommerce div.product .woocommerce-tabs { padding-top: var(--gps-space-group); }
.woocommerce :where(.cart_totals, .woocommerce-checkout-review-order, .woocommerce-MyAccount-navigation, .woocommerce-MyAccount-content) { border-radius: var(--gps-card-radius); }
.woocommerce table.shop_table { overflow: hidden; border-color: var(--gps-color-border); border-radius: var(--gps-card-radius); }

.gps-footer-cta .gps-buttons { display: flex; flex-wrap: wrap; }
.gps-footer-cta .gps-button { min-width: 150px; }
.gps-footer-cta :where(.gps-button-light, .gps-button-outline) { color: #fff !important; border-color: rgba(255, 255, 255, .68) !important; background: transparent !important; }
.gps-footer-cta :where(.gps-button-light, .gps-button-outline):hover { color: var(--gps-color-primary-dark) !important; border-color: #fff !important; background: #fff !important; }

/* Shared slider controls stay outside the scrolling content. */
.gps-slider-controls { display: flex; grid-column: 1 / -1; justify-content: flex-end; gap: 8px; margin: 0 0 12px; }
.gps-slider-controls[hidden] { display: none !important; }
body .gps-slider-button {
	display: inline-flex; align-items: center; justify-content: center;
	flex: 0 0 44px; width: 44px; height: 44px; padding: 0;
	border: 1px solid var(--gps-color-border); border-radius: var(--gps-control-radius);
	background: var(--gps-color-background); color: var(--gps-color-primary); cursor: pointer;
}
body .gps-slider-button:hover:not(:disabled) { background: var(--gps-color-primary); border-color: var(--gps-color-primary); color: #fff; }
body .gps-slider-button:disabled { opacity: .35; cursor: default; }
.gps-slider-button svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.8; }
[dir="rtl"] .gps-slider-button svg { transform: rotate(180deg); }
.woocommerce-product-gallery .flex-direction-nav { display: flex; justify-content: space-between; gap: 8px; list-style: none; margin: 12px 0; padding: 0; }
.woocommerce-product-gallery .flex-direction-nav a { display: inline-flex; align-items: center; justify-content: center; min-width: 44px; min-height: 44px; padding: 8px 14px; border: 1px solid var(--gps-color-border); border-radius: var(--gps-control-radius); background: var(--gps-color-background); color: var(--gps-color-primary); font-size: 14px; font-weight: 650; }
.woocommerce-product-gallery .flex-direction-nav a:hover { background: var(--gps-color-primary); color: #fff; }
.woocommerce-product-gallery .flex-direction-nav .flex-disabled { opacity: .35; pointer-events: none; }

/* Shared motion and commerce surfaces, including WooCommerce block pages. */
.gps-reveal { transition: opacity .45s ease, transform .5s cubic-bezier(.22, 1, .36, 1); }
.gps-reveal-pending { opacity: 0; transform: translateY(14px); }
.woocommerce-message, .woocommerce-info { border-top-color: var(--gps-color-accent); }
.woocommerce-message::before, .woocommerce-info::before { color: var(--gps-color-accent); }
.woocommerce :where(.cart_totals, #payment, .woocommerce-MyAccount-navigation, .woocommerce-MyAccount-content) {
	padding: clamp(16px, 3vw, 28px);
	border: 1px solid var(--gps-color-border);
	background: var(--gps-color-background);
	box-shadow: var(--gps-shadow-card);
}
.woocommerce-MyAccount-navigation ul { margin: 0; padding: 0; list-style: none; }
.woocommerce-MyAccount-navigation a { display: block; padding: 12px 14px; border-radius: var(--gps-control-radius); }
.woocommerce-MyAccount-navigation .is-active a { color: #fff; background: var(--gps-color-primary); }
.wc-block-components-button:not(.is-link) {
	min-height: var(--gps-control-height);
	border: 1px solid var(--gps-color-primary);
	border-radius: var(--gps-control-radius);
	background: var(--gps-color-primary);
	color: #fff;
}
.wc-block-components-button:not(.is-link):hover { background: var(--gps-color-primary-dark); color: #fff; }
.wc-block-components-text-input input, .wc-block-components-combobox-control input { accent-color: var(--gps-color-accent); }
input[type="checkbox"], input[type="radio"] { accent-color: var(--gps-color-primary); }
.entry-content img { border-radius: var(--gps-card-radius); }
.entry-content a:not(.button):not(.wp-element-button) { text-underline-offset: 4px; }
@media (hover: none) {
	:where(.gps-button, .gps-home-button, .gps-home-link-button, .gps-card), .woocommerce ul.products li.product { transform: none; }
}
@media print {
	.gps-reveal-pending { opacity: 1; transform: none; }
	.gps-mobile-purchase-dock, .gps-cart-toast { display: none !important; }
}

@media (max-width: 767px) {
	/* Touch scrolling replaces slider navigation buttons on mobile. */
	body .gps-slider-controls,
	body .gps-home-slider-controls,
	body.single-product .woocommerce-product-gallery .flex-direction-nav { display: none; }
	.gps-content { padding-block: 40px; }
	.gps-page-header-inner { grid-template-columns: minmax(0, 1fr); gap: 12px; padding-block: 24px; }
	.gps-page-header .gps-breadcrumb { grid-column: 1; grid-row: 1; justify-self: start; max-width: 100%; text-align: left; font-size: 11px; }
	.gps-page-heading { grid-column: 1; grid-row: 2; }
	body .gps-content.gps-page-content { padding-top: 24px; }
	.gps-home-actions, .gps-buttons { width: 100%; }
	.gps-home-actions :where(.gps-home-button, .gps-button), .gps-footer-cta .gps-button { width: 100%; }
	.search-form { align-items: stretch; flex-direction: column; }
	.search-form .search-submit { width: 100%; }
	.woocommerce div.product form.cart { flex-wrap: wrap; }
	.woocommerce div.product form.cart .single_add_to_cart_button { flex: 1; }
}

@media (prefers-reduced-motion: reduce) {
	.gps-reveal-pending { opacity: 1; transform: none; }
	html { scroll-behavior: auto; }
	*, *::before, *::after { scroll-behavior: auto !important; transition-duration: .01ms !important; animation-duration: .01ms !important; animation-iteration-count: 1 !important; }
	:where(.gps-button, .gps-home-button, .gps-home-link-button, .gps-card, .woocommerce ul.products li.product):hover { transform: none !important; }
}
