/*
 * GEAR polish layer.
 * Loaded after style.css / style-rtl.css; uses logical properties so it works for both.
 */

:root {
	--gear-radius: 10px;
	--gear-radius-lg: 16px;
	--gear-shadow: 0 1px 2px rgb(14 26 43 / 6%), 0 4px 14px rgb(14 26 43 / 6%);
	--gear-shadow-hover: 0 2px 4px rgb(14 26 43 / 8%), 0 14px 32px rgb(14 26 43 / 12%);
	--gear-ease: cubic-bezier(.2, .7, .2, 1);
}

/* ---------- Base ---------- */
body {
	-webkit-font-smoothing: antialiased;
	text-rendering: optimizeLegibility;
}
a:focus-visible,
button:focus-visible,
input:focus-visible,
.wp-element-button:focus-visible {
	outline: 2px solid var(--wp--preset--color--primary) !important;
	outline-offset: 2px;
}
::selection {
	background: var(--wp--preset--color--primary);
	color: var(--wp--preset--color--base);
}
.gear-accent { color: var(--wp--preset--color--primary); }
.gear-muted { opacity: .72; }

.gear-eyebrow {
	font-family: var(--wp--preset--font-family--barlow-condensed);
	font-weight: 600;
	font-size: .875rem;
	letter-spacing: 3px;
	text-transform: uppercase;
	color: var(--wp--preset--color--ternary);
	margin-block-end: .5rem;
}
.gear-eyebrow-dark { color: var(--wp--preset--color--primary); }

.gear-section-title {
	position: relative;
	text-transform: uppercase;
	letter-spacing: .5px;
	padding-block-end: .5rem;
}
.gear-section-title::after {
	content: "";
	position: absolute;
	inset-inline-start: 0;
	inset-block-end: 0;
	width: 48px;
	height: 3px;
	border-radius: 3px;
	background: var(--wp--preset--color--primary);
}
.gear-more-link a {
	font-family: var(--wp--preset--font-family--barlow-condensed);
	font-weight: 600;
	letter-spacing: 1px;
	text-transform: uppercase;
	text-decoration: none;
	color: var(--wp--preset--color--primary);
}

/* The footer sits flush against the page; each <main> carries its own bottom padding. */
.wp-site-blocks > footer.wp-block-template-part { margin-block-start: 0; }

/* ---------- Header ---------- */
/* Moved to assets/css/header.css (WP-2). */

/* ---------- Page bands (archive, search, page, 404, legal) ----------
   The front-page hero lives in home.css. */
.gear-page-band {
	position: relative;
	overflow: hidden;
	isolation: isolate;
}
.gear-page-band::before {
	content: "";
	position: absolute;
	inset: 0;
	z-index: -1;
	background:
		radial-gradient(60% 80% at 85% 20%, color-mix(in srgb, var(--wp--preset--color--primary) 28%, transparent), transparent 70%),
		radial-gradient(50% 60% at 10% 100%, color-mix(in srgb, var(--wp--preset--color--ternary) 22%, transparent), transparent 70%),
		linear-gradient(transparent 0 calc(100% - 1px), rgb(255 255 255 / 5%) 0) 0 0 / 100% 40px,
		linear-gradient(90deg, transparent 0 calc(100% - 1px), rgb(255 255 255 / 5%) 0) 0 0 / 40px 100%;
}
.gear-page-band h1,
.gear-page-band h2 { text-transform: uppercase; margin: 0; }
.gear-page-band .gear-band-sub { opacity: .8; max-width: 60ch; margin-inline: auto; }

/* Ghost button on dark bands (hero, 404) */
.gear-btn-ghost .wp-block-button__link {
	color: var(--wp--preset--color--on-secondary) !important;
	border: 1.5px solid rgb(255 255 255 / 45%) !important;
	background: transparent !important;
}
.gear-btn-ghost .wp-block-button__link:hover { border-color: var(--wp--preset--color--on-secondary) !important; }

/* ---------- Cards ---------- */
.gear-card {
	height: 100%;
	overflow: hidden;
	border-radius: var(--gear-radius-lg) !important;
	border: 1px solid var(--wp--preset--color--border-color) !important;
	background: var(--wp--preset--color--base) !important;
	box-shadow: var(--gear-shadow);
	transition: transform .25s var(--gear-ease), box-shadow .25s var(--gear-ease);
}
.gear-card:hover,
.gear-card:focus-within {
	transform: translateY(-4px);
	box-shadow: var(--gear-shadow-hover);
}
.gear-card .gear-card-media { margin: 0; }
.gear-card .gear-card-media img { transition: transform .5s var(--gear-ease); }
.gear-card:hover .gear-card-media img { transform: scale(1.04); }
.gear-card-body { padding: 18px 20px 20px; }
.gear-card-body > * + * { margin-block-start: .6rem; }
.gear-card .wp-block-post-title a { text-decoration: none; }
.gear-card .wp-block-post-title { line-height: 1.15; }
.gear-meta { color: var(--wp--preset--color--body-text); opacity: .8; }
.gear-card-grid { gap: 24px !important; }
.gear-card-grid > li,
.gear-card-grid > .wp-block-post { display: flex; }
.gear-card-grid > li > .gear-card { width: 100%; }

/* No featured image: branded fallback keeps the grid even */
.wp-block-post-featured-image .gear-card-fallback,
.gear-card-fallback {
	position: relative;
	display: flex;
	height: 100%;
	align-items: flex-end;
	aspect-ratio: 16 / 10;
	padding: 16px 18px;
	overflow: hidden;
	text-decoration: none;
	background:
		radial-gradient(70% 90% at 85% 10%, color-mix(in srgb, var(--wp--preset--color--primary) 55%, transparent), transparent 70%),
		radial-gradient(50% 60% at 5% 100%, color-mix(in srgb, var(--wp--preset--color--ternary) 35%, transparent), transparent 70%),
		linear-gradient(transparent 0 calc(100% - 1px), rgb(255 255 255 / 6%) 0) 0 0 / 100% 28px,
		linear-gradient(90deg, transparent 0 calc(100% - 1px), rgb(255 255 255 / 6%) 0) 0 0 / 28px 100%,
		var(--wp--preset--color--secondary);
}
.gear-card-fallback__mark {
	position: absolute;
	inset-inline-end: -4%;
	inset-block-start: -22%;
	font-family: var(--wp--preset--font-family--barlow-condensed);
	font-weight: 700;
	font-size: 9rem;
	line-height: 1;
	color: var(--wp--preset--color--on-secondary);
	opacity: .08;
	pointer-events: none;
}
.gear-card-fallback__text {
	position: relative;
	font-family: var(--wp--preset--font-family--barlow-condensed);
	font-weight: 700;
	font-size: 1.25rem;
	letter-spacing: 1px;
	text-transform: uppercase;
	line-height: 1.1;
	color: var(--wp--preset--color--on-secondary);
	opacity: .92;
}

/* Category chip (post-terms) */
.gear-chip a,
.wp-block-post-terms.gear-chip a {
	display: inline-block;
	padding: 3px 10px;
	border-radius: 999px;
	font-family: var(--wp--preset--font-family--barlow-condensed);
	font-weight: 600;
	font-size: .8125rem;
	letter-spacing: 1px;
	text-transform: uppercase;
	text-decoration: none;
	color: var(--wp--preset--color--ternary);
	background: var(--wp--preset--color--ternary-light);
}
.gear-chip .wp-block-post-terms__separator { display: none; }

/* ---------- Read-more link ---------- */
.gear-read-more,
.wp-block-read-more {
	font-family: var(--wp--preset--font-family--barlow-condensed);
	font-weight: 600;
	letter-spacing: 1px;
	text-transform: uppercase;
	text-decoration: none !important;
	color: var(--wp--preset--color--primary) !important;
}

/* ---------- Product cards (shop picks, shop grid, related products) ---------- */
.gear-product-card .wc-block-components-product-image { margin: 0 !important; background: var(--wp--preset--color--section-bg); }
.gear-product-card .wp-block-woocommerce-product-price { color: var(--wp--preset--color--primary); font-weight: 600; }

/* ---------- Spec sheet ---------- */
.gear-specs-box {
	border: 1px solid var(--wp--preset--color--border-color);
	border-radius: var(--gear-radius-lg);
	overflow: hidden;
	margin-block: 2rem;
}
.gear-specs-title {
	margin: 0;
	padding: 14px 20px;
	text-transform: uppercase;
	letter-spacing: 1px;
	background: var(--wp--preset--color--secondary);
	color: var(--wp--preset--color--on-secondary);
}
.gear-specs { margin: 0; }
.gear-specs table { width: 100%; border-collapse: collapse; }
.gear-specs th,
.gear-specs td {
	padding: 12px 20px;
	border: 0;
	border-block-end: 1px solid var(--wp--preset--color--border-color);
	text-align: start;
	font-size: .9375rem;
}
.gear-specs tr:nth-child(even) { background: var(--wp--preset--color--section-bg); }
.gear-specs tr:last-child th,
.gear-specs tr:last-child td { border-block-end: 0; }
.gear-specs th {
	width: 38%;
	font-family: var(--wp--preset--font-family--barlow-condensed);
	font-weight: 600;
	letter-spacing: .5px;
	text-transform: uppercase;
	color: var(--wp--preset--color--heading);
}
.gear-specs td { font-variant-numeric: tabular-nums; }

/* ---------- Review verdict ---------- */
.gear-verdict {
	padding: 24px;
	margin-block: 2rem;
	border-radius: var(--gear-radius-lg);
	background: var(--wp--preset--color--section-bg);
	border-inline-start: 4px solid var(--wp--preset--color--primary);
}
.gear-verdict-head { gap: 18px; }
.gear-verdict-head p { margin: 0; }
.gear-score {
	flex: none;
	display: grid;
	place-items: center;
	width: 72px;
	height: 72px;
	border-radius: 50%;
	font-family: var(--wp--preset--font-family--barlow-condensed);
	font-weight: 700;
	font-size: 1.875rem;
	color: var(--wp--preset--color--base);
	background: conic-gradient(var(--wp--preset--color--primary) 0 var(--gear-score-pct, 87%), var(--wp--preset--color--border-color) 0);
	box-shadow: inset 0 0 0 6px var(--wp--preset--color--secondary);
}
.gear-proscons { margin-block-start: 1.25rem; gap: 20px; }
.gear-proscons ul { list-style: none; padding: 0; }
.gear-proscons li { position: relative; padding-inline-start: 1.6em; margin-block-end: .4em; }
.gear-proscons li::before {
	position: absolute;
	inset-inline-start: 0;
	font-weight: 700;
}
.gear-pros li::before { content: "+"; color: #16A34A; }
.gear-cons li::before { content: "–"; color: #DC2626; }

/* ---------- Motion preferences ---------- */
@media (prefers-reduced-motion: reduce) {
	*,
	*::before,
	*::after {
		animation-duration: .01ms !important;
		transition-duration: .01ms !important;
	}
	.wow { visibility: visible !important; }
}

/* ======================================================================
   Page types: listings, pages, 404, shop, sidebar, navigation overlay
   ====================================================================== */

/* ---------- Layout scale ---------- */
.gear-section { padding-inline: var(--wp--custom--gutter, 16px); }
.gear-page-band .gear-eyebrow { margin-block-end: .75rem; }
.gear-page-band .gear-band-sub { margin-block-start: 1rem; }
.gear-band-slim { padding-block: 14px !important; }
.gear-band-slim .gear-breadcrumbs { margin: 0; }
.gear-band-search { margin-block-start: 1.75rem; }

/* ---------- Search form (band, sidebar, no-results) ---------- */
.gear-search-form .wp-block-search__inside-wrapper {
	border: 0;
	padding: 0;
	gap: 8px;
}
.gear-search-form .wp-block-search__input {
	min-height: 48px;
	padding-inline: 16px;
	border: 1px solid var(--wp--preset--color--border-color);
	border-radius: var(--gear-radius);
	background: var(--wp--preset--color--base);
	color: var(--wp--preset--color--heading);
	font-size: 1rem;
}
.gear-search-form .wp-block-search__button {
	min-height: 48px;
	min-width: 48px;
	padding: 0 16px;
	margin: 0;
	border: 0;
	border-radius: var(--gear-radius);
	background: var(--wp--preset--color--primary);
	color: var(--wp--preset--color--base);
	cursor: pointer;
	transition: background .2s;
}
.gear-search-form .wp-block-search__button:hover { background: var(--wp--preset--color--ternary); }
.gear-search-form .wp-block-search__button svg { fill: currentColor; }
.gear-page-band .gear-search-form .wp-block-search__input { border-color: transparent; }

/* ---------- Listings (grid, pagination and no-results live in pages.css) ---------- */
.gear-ad-slot:empty { display: none; }

/* ---------- Sidebar (optional part) ---------- */
.gear-sidebar-card { padding: 20px 22px 22px; height: auto; }
.gear-sidebar-card:hover { transform: none; box-shadow: var(--gear-shadow); }
.gear-sidebar-title {
	text-transform: uppercase;
	letter-spacing: 1px;
	margin: 0 0 14px;
	padding-block-end: 8px;
	border-block-end: 2px solid var(--wp--preset--color--primary);
}
.gear-sidebar-post { gap: 12px; padding-block: 10px; border-block-end: 1px solid var(--wp--preset--color--border-color); }
.gear-sidebar-posts li:last-child .gear-sidebar-post { border-block-end: 0; }
.gear-sidebar-thumb { flex: none; margin: 0; }
.gear-sidebar-thumb img { border-radius: 8px; }
.gear-sidebar-post .wp-block-post-title { margin: 0; line-height: 1.25; }
.gear-sidebar-post .wp-block-post-title a { text-decoration: none; }
.gear-sidebar-list { list-style: none; padding: 0; margin: 0; }
.gear-sidebar-list li { padding-block: 8px; border-block-end: 1px solid var(--wp--preset--color--border-color); }
.gear-sidebar-list li:last-child { border-block-end: 0; }
.gear-sidebar-list a { text-decoration: none; }
.gear-tag-cloud a {
	display: inline-block;
	margin: 0 6px 8px 0;
	padding: 4px 12px;
	border-radius: 999px;
	font-family: var(--wp--preset--font-family--barlow-condensed);
	font-size: .875rem !important;
	font-weight: 600;
	letter-spacing: .5px;
	text-transform: uppercase;
	text-decoration: none;
	background: var(--wp--preset--color--section-bg);
	color: var(--wp--preset--color--heading);
}
.gear-tag-cloud a:hover { background: var(--wp--preset--color--primary); color: var(--wp--preset--color--base); }

/* ---------- Navigation: active state + mobile overlay ---------- */
/* Moved to assets/css/header.css (WP-2). */

/* ---------- Shop: toolbar, grid, cards ---------- */
.gear-breadcrumbs .woocommerce-breadcrumb,
.gear-breadcrumbs {
	font-family: var(--wp--preset--font-family--barlow-condensed);
	font-size: .9375rem;
	letter-spacing: 1px;
	text-transform: uppercase;
	color: inherit;
	opacity: .85;
}
.gear-breadcrumbs a { color: inherit; text-decoration: none; }
.gear-breadcrumbs a:hover { color: var(--wp--preset--color--primary); }
.gear-page-band .gear-breadcrumbs { margin-block-start: 1.25rem; }
.gear-shop-toolbar {
	margin-block-end: var(--wp--preset--spacing--50);
	padding-block-end: 16px;
	border-block-end: 1px solid var(--wp--preset--color--border-color);
	gap: 16px;
}
.gear-shop-toolbar .woocommerce-result-count { margin: 0; font-size: .9375rem; opacity: .8; }
.gear-shop-toolbar .woocommerce-ordering select,
.gear-shop-toolbar .wc-block-catalog-sorting select {
	min-height: 42px;
	padding: 6px 36px 6px 14px;
	border: 1px solid var(--wp--preset--color--border-color);
	border-radius: var(--gear-radius);
	background-color: var(--wp--preset--color--base);
	color: var(--wp--preset--color--heading);
	font-family: var(--wp--preset--font-family--barlow-condensed);
	font-weight: 600;
	letter-spacing: .5px;
	text-transform: uppercase;
}
.gear-products .wc-block-product-template,
.gear-products ul.wc-block-product-template { gap: 24px; }
.gear-products .wc-block-product-template > li,
.gear-products .wc-block-product { padding: 0; margin: 0; display: flex; }
.gear-products .wc-block-product > .gear-card { width: 100%; }
.gear-product-card .gear-card-body { display: flex; flex-direction: column; align-items: flex-start; }
.gear-product-card .gear-card-body > .wp-block-button,
.gear-product-card .gear-card-body > .wc-block-components-product-button { margin-block-start: auto; padding-block-start: .4rem; }
.gear-product-card .wc-block-components-product-image a { display: block; aspect-ratio: 1; overflow: hidden; }
.gear-product-card .wc-block-components-product-image img { width: 100%; height: 100%; object-fit: cover; transition: transform .5s var(--gear-ease); }
.gear-product-card:hover .wc-block-components-product-image img { transform: scale(1.04); }
.gear-product-card .wc-block-components-product-sale-badge {
	background: var(--wp--preset--color--primary);
	color: var(--wp--preset--color--base);
	border: 0;
	border-radius: 999px;
	font-family: var(--wp--preset--font-family--barlow-condensed);
	letter-spacing: 1px;
	text-transform: uppercase;
}
.gear-product-card .wp-block-post-title { font-size: 1.125rem; line-height: 1.2; }
.gear-product-card .wc-block-components-product-rating { margin: 0; }
.gear-product-card .wc-block-components-product-rating__stars { color: var(--wp--preset--color--primary); }
.gear-product-card .wp-block-button__link,
.gear-product-card .wc-block-components-product-button__button {
	border-radius: var(--gear-radius);
	background: var(--wp--preset--color--secondary);
	color: var(--wp--preset--color--on-secondary);
	font-family: var(--wp--preset--font-family--barlow-condensed);
	font-weight: 600;
	letter-spacing: 1px;
	text-transform: uppercase;
	padding: .65em 1.3em;
}
.gear-product-card .wp-block-button__link:hover,
.gear-product-card .wc-block-components-product-button__button:hover { background: var(--wp--preset--color--primary); }
.gear-product-card .added_to_cart { display: block; margin-block-start: .5rem; font-size: .875rem; }

/* ---------- Mobile ---------- */
@media (max-width: 599px) {
	.gear-card-grid,
	.gear-tiles { gap: 16px !important; }
	.gear-page-band { padding-inline: 16px !important; }
	.gear-product-card .gear-card-body { padding: 12px 14px 14px; }
	.gear-product-card .wp-block-post-title { font-size: 1rem; }
}
html { overflow-x: clip; }
