/*
Theme Name: 1882 Homestead
Theme URI: https://1882homestead.monarchwave.com
Description: Brand child theme for 1882 Homestead LLC — a firearms, ammo & outdoor gear shop. Built on the GreenShift block theme with WooCommerce. Carries brand colors (navy, barn red, gold), fonts, sticky header with announcement bar, and reusable block patterns so the storefront stays easy to edit in the Site Editor.
Author: Monarch Wave
Template: greenshift
Version: 1.2.5
Requires at least: 6.5
Tested up to: 6.8
Requires PHP: 8.0
Text Domain: homestead1882
*/

/* -------------------------------------------------------------------------
   Most styling lives in theme.json (colors, fonts, spacing) so it stays
   editable in Appearance → Editor → Styles. The rules below cover behavior
   theme.json can't express — sticky header, announcement bar, marquee,
   and a few WooCommerce polish tweaks.
   ------------------------------------------------------------------------- */

/* Sticky site header --------------------------------------------------- */
/* Stick the OUTERMOST header wrapper (the wp-block-template-part <header>,
   class added via the template). position:sticky resolves against that
   element's parent — which is the tall .wp-site-blocks page container — so it
   travels the full page height. Sticking an inner div failed because its
   parent box was only as tall as the header itself. */
.wp-block-template-part.homestead-header-part,
header.homestead-header-part {
	position: -webkit-sticky;
	position: sticky;
	top: 0;
	z-index: 1000;
	/* Opaque background on the wrapper itself so scrolling page content can
	   never bleed through any sub-pixel seam between the announcement bar and
	   the white logo row. */
	background: #ffffff;
	box-shadow: 0 2px 10px rgba(31, 45, 61, 0.12);
}
/* Isolate the header into its own stacking context so descendant positioned
   elements in the page (slider, relative wrappers) can't paint over it. */
.wp-block-template-part.homestead-header-part { isolation: isolate; }
/* Belt-and-suspenders: ensure the inner bands have no margins that open a gap. */
.homestead-site-header .homestead-announcement,
.homestead-site-header .site-header-sticky { margin: 0; }

/* Mobile slide-out menu: links inherited the dark global link color on the
   navy overlay (~1.3:1, unreadable). Force light text + close button. */
.wp-block-navigation__responsive-container.is-menu-open,
.wp-block-navigation__responsive-container.is-menu-open a,
.wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation-item__label,
.wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation__responsive-container-close {
	color: var(--wp--preset--color--base) !important;
}
.wp-block-navigation__responsive-container.is-menu-open a:hover,
.wp-block-navigation__responsive-container.is-menu-open a:focus {
	color: var(--wp--preset--color--gold) !important;
}
/* The submenu chevrons are the only way into subcategories on mobile, but
   Greenshift strokes them #111 on the navy overlay — invisible. Make them
   white inside a visible tappable outline. */
.wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation-submenu .wp-block-navigation__submenu-icon svg {
	stroke: var(--wp--preset--color--base) !important;
}
.wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation__submenu-icon {
	color: var(--wp--preset--color--base) !important;
	border: 1px solid rgba(255, 255, 255, 0.35) !important;
	border-radius: 4px;
}

/* Align all three header bands (announcement / logo+search / nav) to a
   shared 1400px content column with matching side padding, so their content
   left/right edges line up vertically. The announcement bar was at 16px while
   the logo and nav rows were at 40px. */
.homestead-announcement > .wp-block-group,
.site-header-sticky > .wp-block-group:not(.homestead-nav-row),
.homestead-nav-row > .wp-block-navigation {
	max-width: 1400px;
	margin-left: auto;
	margin-right: auto;
	width: 100%;
}
/* The logo/search row is the padded element itself (the other two bands pad
   a wrapper and center an unpadded 1400px inner). With border-box, capping it
   at 1400px would eat the padding and shift its content 40px right of the
   menu, so its box must be 1400px plus the padding. */
.site-header-sticky > .wp-block-group:not(.homestead-nav-row) {
	max-width: calc(1400px + 2 * clamp(1rem, 3vw, 2.5rem));
}
/* Normalize the side padding on each band to the same value. */
.homestead-announcement,
.site-header-sticky > .wp-block-group,
.homestead-nav-row {
	padding-left: clamp(1rem, 3vw, 2.5rem) !important;
	padding-right: clamp(1rem, 3vw, 2.5rem) !important;
}

/* Collapse vertical gaps in the header so the navy nav bar sits flush
   under the logo/search row (no stray white bar between them). */
.homestead-site-header,
.homestead-site-header > *,
.site-header-sticky,
.site-header-sticky > * { row-gap: 0; }
.site-header-sticky > .homestead-nav-row { margin-top: 0; margin-bottom: 0; }
.homestead-site-header .homestead-marquee { margin: 0; }

/* Slim top announcement / deals bar ------------------------------------ */
.homestead-announcement {
	font-size: 0.85rem;
	letter-spacing: 0.02em;
}
.homestead-announcement a {
	color: var(--wp--preset--color--gold);
	text-decoration: underline;
	font-weight: 600;
}

/* Slim top deals bar: deals scroll, phone stays put -------------------- */
/* The deals text takes the remaining space (min-width:0 lets it shrink so it
   can clip+scroll instead of overflowing the bar and getting cut off). */
.homestead-announcement > .wp-block-group { flex-wrap: nowrap; align-items: center; }
.homestead-marquee {
	flex: 1 1 auto;
	min-width: 0;
	overflow: hidden;
	white-space: nowrap;
}
.homestead-marquee > * {
	margin: 0;
	display: inline-block;
	padding-left: 100%;
	animation: homestead-scroll 30s linear infinite;
}
.homestead-marquee:hover > * { animation-play-state: paused; }
@keyframes homestead-scroll {
	0%   { transform: translateX(0); }
	100% { transform: translateX(-100%); }
}
/* Phone stays a fixed, non-shrinking column on the right. */
.homestead-announcement > .wp-block-group > p { flex: 0 0 auto; white-space: nowrap; margin: 0; }
@media (max-width: 781px) {
	/* On mobile, hide the phone in the bar (it's in the header/footer too)
	   and give the scrolling deals the full width. */
	.homestead-announcement > .wp-block-group > p:last-child { display: none; }
}

/* Product cards: tighten the look so items read fast (Primary Arms vibe) */
.woocommerce ul.products li.product,
.wc-block-grid__product,
.wp-block-woocommerce-product-template li {
	text-align: left;
}
.wp-block-woocommerce-product-template .wp-block-woocommerce-product-image img {
	width: 100%;
	height: auto;
	aspect-ratio: 1 / 1;
	/* The block hardcodes an inline object-fit:cover; contain must win or
	   wide product shots (most long guns) get their ends cut off. */
	object-fit: contain !important;
	background: #ffffff;
}

/* Sale badge in brand red --------------------------------------------- */
.wc-block-components-product-sale-badge,
.onsale {
	background: var(--wp--preset--color--red) !important;
	color: #ffffff !important;
	border: none !important;
}

/* Buttons: solid, confident, no rounded "bubbly" AI look --------------- */
.wp-element-button,
.wc-block-components-button,
.woocommerce a.button,
.woocommerce button.button {
	border-radius: 3px;
	font-weight: 600;
	letter-spacing: 0.02em;
	text-transform: uppercase;
}

/* Hero slider readability --------------------------------------------- */
.homestead-hero .wp-block-cover__inner-container {
	max-width: 1200px;
	margin-inline: auto;
	width: 100%;
}

/* Make the single-product layout feel like PSA/Bud's: price column tidy */
.single-product .wp-block-woocommerce-product-price,
.single-product .price {
	color: var(--wp--preset--color--navy);
	font-weight: 700;
}

/* Product gallery: distributor photos come at all sizes, so the natural-size
   image left a dead zone between it and the summary column. Give the main
   image a column-filling square stage (contain, never crop) so it sits flush
   against the column gap. */
.single-product .woocommerce-product-gallery .woocommerce-product-gallery__image img {
	width: 100%;
	height: auto;
	aspect-ratio: 1 / 1;
	object-fit: contain;
	background: #ffffff;
	border: 1px solid rgba(31, 45, 61, 0.1);
	border-radius: 6px;
}
/* Thumbnail strip (products with multiple images): flexslider emits a bare
   float-based list; lay it out as a tidy grid of uniform square tiles. */
.single-product .woocommerce-product-gallery .flex-control-thumbs {
	display: grid;
	grid-template-columns: repeat(5, 1fr);
	gap: 0.5rem;
	margin: 0.75rem 0 0;
	padding: 0;
	list-style: none;
}
/* Woo caps the gallery block at 512px; let it fill its column instead. */
.single-product .wp-block-woocommerce-product-image-gallery {
	max-width: none !important;
}
/* !important: Greenshift's bundled Woo CSS sizes thumbs at width:25% +
   float via the higher-specificity `.single-product div.images ...` —
   25% of a grid cell is what shrank thumbs to 24px. */
.single-product .woocommerce-product-gallery .flex-control-thumbs li {
	float: none !important;
	width: auto !important;
	margin: 0 !important;
	clear: none !important;
}
.single-product .woocommerce-product-gallery .flex-control-thumbs li img {
	display: block;
	width: 100%;
	aspect-ratio: 1 / 1;
	object-fit: contain;
	background: #ffffff;
	border: 1px solid rgba(31, 45, 61, 0.15);
	border-radius: 4px;
	cursor: pointer;
	opacity: 0.65;
	transition: opacity 0.15s ease, border-color 0.15s ease;
}
.single-product .woocommerce-product-gallery .flex-control-thumbs li img:hover,
.single-product .woocommerce-product-gallery .flex-control-thumbs li img.flex-active {
	opacity: 1;
	border-color: var(--wp--preset--color--navy);
}

/* Category tiles on the homepage -------------------------------------- */
.homestead-cat-grid.wp-block-columns { gap: 1rem !important; }
.homestead-cat-grid .wp-block-column {
	gap: 1rem;
	display: flex;
	flex-direction: column;
}
.homestead-cat-tile {
	overflow: hidden;
	border-radius: 6px;
	transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.homestead-cat-tile:hover { transform: translateY(-3px); box-shadow: 0 8px 22px rgba(31,45,61,0.25); }
.homestead-cat-tile h3 { margin: 0; }
.homestead-cat-tile h3 a { color: #fff; text-decoration: none; }
.homestead-cat-tile h3 a:hover { color: var(--wp--preset--color--gold); }

/* Header search — Super Speedy Search, fitted into the white nav bar ---- */
.homestead-search { flex: 1 1 340px; min-width: 200px; max-width: 600px; }
.homestead-search .super-speedy-search-form,
.homestead-search .super-speedy-searchform { width: 100%; margin: 0; padding: 0; }
.homestead-search .sss_maybe_close_button { display: none; }
/* The plugin injects empty <p> tags that create dead padding under the box. */
.homestead-search .super-speedy-search-form p,
.homestead-search .super-speedy-searchform p { display: none; margin: 0; padding: 0; }
/* Keep the results/suggestions panel from reserving space when collapsed. */
.homestead-search .sssresults { position: absolute; z-index: 1000; width: 100%; }
.homestead-search .ssswrapper { position: relative; }
/* Pin the search box to a definite height so every child can resolve
   height:100% cleanly — otherwise the submit button sits a few px short and
   leaves a white sliver under the icon. */
.homestead-search .ssswrapper {
	display: flex;
	align-items: stretch;
	width: 100%;
	height: 42px;
	border: 1px solid #cbd2da;
	border-radius: 4px;
	overflow: hidden;
	background: #fff;
}
.homestead-search .ssswrapper:focus-within {
	border-color: var(--wp--preset--color--gold);
	box-shadow: 0 0 0 2px rgba(201,162,74,0.35);
}
.homestead-search .sssinputwrapper { flex: 1 1 auto; display: flex; align-items: stretch; height: 100%; }
.homestead-search .sssinputwrapper br { display: none; }
.homestead-search .ssstext,
.homestead-search input.ssstext,
.homestead-search input[type="text"] {
	width: 100%;
	height: 100%;
	padding: 0 0.9rem;
	border: 0;
	outline: 0;
	font-size: 0.95rem;
	line-height: 42px;
	background: transparent;
	box-sizing: border-box;
}
.homestead-search .sssresetwrapper { display: flex; align-items: center; height: 100%; }
.homestead-search .sss_clear_button {
	background: none; border: 0; cursor: pointer;
	color: #9097a1; padding: 0 0.4rem; height: 100%;
}
/* Submit button fills the full 42px height — flush to top and bottom edges.
   Force align-self:stretch and a fixed 42px so neither the plugin's flex
   defaults nor the icon's intrinsic height can leave a sliver. */
.homestead-search .sssbuttonwrapper {
	display: flex !important;
	align-self: stretch !important;
	height: 42px !important;
	margin: 0 !important;
}
.homestead-search .sss_search_button {
	background: var(--wp--preset--color--navy);
	color: #fff; border: 0; cursor: pointer;
	margin: 0 !important;
	padding: 0 0.95rem;
	display: flex; align-items: center; justify-content: center;
	height: 42px !important;
	min-height: 42px;
	font-size: 1rem;
	line-height: 1;
}
.homestead-search .sss_search_button:hover { background: var(--wp--preset--color--red); }
.homestead-search .sss-suggestions,
.homestead-search .sss-suggestions-container { z-index: 1000; text-align: left; }

/* Section header band (Featured Gear / On Sale): group the heading and the
   "View all" link together at the left, baseline-aligned, with a thin rule
   under the whole row. Overrides the block's space-between so the link sits
   right beside the title (reads as one unit) instead of flung to the far
   right wall. The link is nudged to sit just above the rule on the right of
   the title using margin-left:auto only on wide screens. */
.homestead-section-head {
	justify-content: flex-start !important;
	align-items: baseline !important;
	flex-wrap: wrap;
	gap: 0.25rem 1rem;
	border-bottom: 2px solid rgba(31,45,61,0.12);
	padding-bottom: 0.6rem;
	/* Breathing room between the divider rule and the product grid below. */
	margin-bottom: 1.75rem !important;
}
.homestead-section-head h2 { line-height: 1.1; margin: 0; }
.homestead-section-head p { margin: 0; }
.homestead-section-head a {
	font-family: var(--wp--preset--font-family--display);
	text-transform: uppercase;
	letter-spacing: 0.03em;
	font-size: 0.8rem;
	font-weight: 600;
	white-space: nowrap;
	color: var(--wp--preset--color--red);
}
.homestead-section-head a:hover { color: var(--wp--preset--color--navy); }

/* Featured / On-Sale: align the [products] grid with its heading (zero the
   shortcode wrapper's side margins) but keep clear space above the grid so
   the divider rule doesn't run straight into the product cards. */
.homestead-prodsection .woocommerce { margin: 0; }
.homestead-prodsection ul.products { margin: 0 !important; padding: 0; }
.homestead-prodsection .homestead-section-head + .woocommerce,
.homestead-prodsection .homestead-section-head + .wp-block-woocommerce-product-collection { margin-top: 1.75rem; }

/* Homepage product cards: white card with a fixed-height image stage.
   Catalog photos are uncropped and every shape (long rifles, tall optics
   boxes), so the image gets one shared height and scales its width inside
   it — no card towers over its neighbors, nothing gets cropped. */
.homestead-prodsection ul.products li.product {
	background: #ffffff;
	border: 1px solid rgba(31, 45, 61, 0.1);
	border-radius: 4px;
	padding: 1rem;
}
.homestead-prodsection ul.products li.product img.attachment-woocommerce_thumbnail {
	display: block;
	height: 200px;
	width: auto;
	max-width: 100%;
	object-fit: contain;
	margin: 0 auto 0.75rem;
}

/* Equalize cards despite wildly varying title lengths.
   Strategy: NO fixed pixel/em height anywhere near text — every previous
   mid-letter clip came from a hardcoded height losing to some other rule's
   line-height/padding/font-size. Instead:
   1. The list is a grid, so every card in a row stretches to the tallest
      card's height automatically.
   2. Titles clamp at 3 lines via line-clamp alone, which by definition cuts
      at whole-line boundaries (with an ellipsis) at whatever line-height
      actually computes. Half-sliced letters are geometrically impossible.
   3. Price + button pin to the card bottom; slack space from short titles
      is absorbed in the middle of the card. */
.homestead-prodsection ul.products {
	display: grid !important;
	grid-template-columns: repeat(4, minmax(0, 1fr));
	gap: 1.5rem 1.25rem;
}
@media (max-width: 1100px) {
	.homestead-prodsection ul.products { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (max-width: 700px) {
	.homestead-prodsection ul.products { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
/* Woo's clearfix pseudo-elements would become phantom grid cells. */
.homestead-prodsection ul.products::before,
.homestead-prodsection ul.products::after {
	display: none;
}
.homestead-prodsection ul.products li.product {
	display: flex;
	flex-direction: column;
	position: relative;
	/* Neutralize Woo's float grid (float + percentage width + row margins). */
	float: none !important;
	width: auto !important;
	margin: 0 !important;
}
/* Keep the Sale! badge out of the flow so badged and unbadged cards in the
   same row stay identical; it floats over the image corner instead. */
.homestead-prodsection ul.products li.product .onsale {
	position: absolute;
	top: 0.5rem;
	right: 0.5rem;
	margin: 0;
	z-index: 2;
}
.homestead-prodsection ul.products li.product .woocommerce-LoopProduct-link {
	display: flex;
	flex-direction: column;
	flex: 1 1 auto;
}
.homestead-prodsection ul.products li.product .woocommerce-loop-product__title {
	display: -webkit-box;
	-webkit-box-orient: vertical;
	-webkit-line-clamp: 3;
	line-clamp: 3;
	overflow: hidden;
	flex-shrink: 0;
	/* Safari/legacy-WebKit paints the clamped 4th line inside the element's
	   bottom padding (Woo adds .5em), showing the top half of its letters.
	   Chrome's standard line-clamp discards it, so the bug only shows on
	   WebKit. No bottom padding = nowhere for the ghost line to paint;
	   margin restores the visual gap (clipped content can't paint in
	   margins). !important because Woo's equally-specific padding rule
	   loads after this sheet. */
	padding-bottom: 0 !important;
	margin-bottom: 0.5em !important;
}
.homestead-prodsection ul.products li.product img.attachment-woocommerce_thumbnail,
.homestead-prodsection ul.products li.product .price,
.homestead-prodsection ul.products li.product .button {
	flex-shrink: 0;
}
.homestead-prodsection ul.products li.product .price {
	margin-top: auto;
	padding-top: 0.5rem;
	text-align: left;
	font-size: 1.15rem;
	font-weight: 700;
	color: var(--wp--preset--color--navy);
}
.homestead-prodsection ul.products li.product .button {
	margin-top: 0.75rem;
	align-self: stretch;
	text-align: center;
}

/* Filter sidebar (Super Speedy Filters): stacked widgets with dividers;
   the page itself scrolls, so attribute lists run their full length. */
.homestead-filters .fww_sidebar ul.product-categories {
	margin: 0 0 0.5rem;
}
/* Exception: the Category widget lists every top-level department (~36 even
   collapsed) — box it and scroll so it doesn't shove the attribute filters
   below the fold. */
.homestead-filters .fww_sidebar .widget.product_cat ul.product-categories {
	max-height: 340px;
	overflow-y: auto;
	border: 1px solid rgba(31, 45, 61, 0.12);
	border-radius: 4px;
	padding: 0.5rem 0.75rem;
}
.homestead-filters .fww_sidebar .widget {
	margin-bottom: 1.25rem;
	padding-bottom: 1rem;
	border-bottom: 1px solid rgba(31, 45, 61, 0.1);
}
.homestead-filters .fww_sidebar .widget:last-child { border-bottom: none; }

/* Breadcrumbs: force left alignment on category / shop archives -------- */
.woocommerce-breadcrumb,
.wc-block-breadcrumbs,
.wp-block-breadcrumbs,
.wp-block-woocommerce-breadcrumbs {
	text-align: left !important;
	justify-content: flex-start !important;
}

/* Footer logo (white knockout for the dark footer) -------------------- */
.homestead-footer-logo img { max-width: 200px; height: auto; }

/* Footer links: the global barn-red link color fails WCAG contrast on the
   dark navy footer (~2.1:1). Use cream (14.4:1) with a gold hover (6.8:1) —
   both pass AA. */
.homestead-site-footer a,
.homestead-site-footer .homestead-footer-list a {
	color: var(--wp--preset--color--cream);
	text-decoration: none;
}
.homestead-site-footer a:hover,
.homestead-site-footer a:focus {
	color: var(--wp--preset--color--gold);
	text-decoration: underline;
}

/* Shop / category: filter sidebar + results ---------------------------- */
.homestead-shop-layout .homestead-filters {
	border: 1px solid #e5e7eb;
	border-radius: 6px;
	padding: 1.25rem;
	align-self: flex-start;
	background: #fff;
}
.homestead-shop-layout .homestead-filters h2 {
	border-bottom: 2px solid var(--wp--preset--color--gold);
	padding-bottom: 0.5rem;
}
.homestead-shop-layout .ssfilterwrapper,
.homestead-shop-layout .ssf-widget { margin-bottom: 1rem; }
@media (max-width: 781px) {
	/* Stack filters above products on mobile */
	.homestead-shop-layout { flex-wrap: wrap; }
	.homestead-shop-layout .homestead-filters { flex-basis: 100% !important; }
}

/* --- Filter widgets: clean, consistent styling ----------------------- */
.homestead-filters .fwwfilter { margin-bottom: 1.5rem; }
.homestead-filters .fwwfilter h3 {
	font-family: var(--wp--preset--font-family--display);
	text-transform: uppercase;
	letter-spacing: 0.03em;
	font-size: 0.95rem;
	color: var(--wp--preset--color--navy);
	margin: 0 0 0.6rem;
	padding-bottom: 0.4rem;
	border-bottom: 1px solid #e5e7eb;
}
/* Category term list */
.homestead-filters ul.product-categories,
.homestead-filters .fww-widget-content ul {
	list-style: none;
	margin: 0;
	padding: 0;
}
.homestead-filters .fww-widget-content li { margin: 0; }
.homestead-filters .fww-widget-content li a {
	display: flex;
	justify-content: space-between;
	align-items: baseline;
	gap: 0.5rem;
	padding: 0.35rem 0;
	color: var(--wp--preset--color--navy);
	text-decoration: none;
	font-size: 0.95rem;
	border-bottom: 1px solid #f1f1f1;
}
.homestead-filters .fww-widget-content li a:hover { color: var(--wp--preset--color--red); }
.homestead-filters .fww-widget-content li a .count,
.homestead-filters .fww-widget-content li a .categorycount {
	color: #9097a1;
	font-size: 0.8rem;
	font-weight: 400;
}
.homestead-filters .fwwname { font-weight: 500; }

/* --- Search results: hierarchical category tree --------------------- */
.hh-searchfilter__heading {
	font-family: var(--wp--preset--font-family--display);
	text-transform: uppercase;
	letter-spacing: 0.03em;
	font-size: 0.95rem;
	color: var(--wp--preset--color--navy);
	margin: 0 0 0.6rem;
}
.hh-searchfilter__box {
	border: 1px solid #e5e7eb;
	border-radius: 6px;
	padding: 0.5rem 0.75rem;
	max-height: 420px;
	overflow-y: auto;
	background: #fff;
}
.hh-searchfilter__box ul.hh-cat__list {
	list-style: none;
	margin: 0;
	padding: 0;
}
/* Indent nested levels and give them a guide line */
.hh-searchfilter__box .hh-cat__list .hh-cat__list {
	margin-left: 0.5rem;
	padding-left: 0.6rem;
	border-left: 1px solid #eef0f2;
}
.hh-cat {
	position: relative;
	margin: 0;
}
.hh-cat__link {
	display: block;
	padding: 0.32rem 1.5rem 0.32rem 0.15rem;
	color: var(--wp--preset--color--navy);
	text-decoration: none;
	font-size: 0.92rem;
	line-height: 1.3;
	border-radius: 3px;
}
.hh-cat__link:hover { color: var(--wp--preset--color--red); }
.hh-cat__name { font-weight: 500; }
.hh-cat__count {
	color: #9097a1;
	font-size: 0.78rem;
	font-weight: 400;
}
.hh-cat__all {
	border-bottom: 1px solid #eef0f2;
	margin-bottom: 0.25rem;
}
.hh-cat.is-active > .hh-cat__link,
.hh-cat__all.is-active {
	color: var(--wp--preset--color--red);
}
.hh-cat.is-active > .hh-cat__link .hh-cat__name,
.hh-cat__all.is-active .hh-cat__name { font-weight: 700; }

/* Expand/collapse chevron */
.hh-cat__toggle {
	position: absolute;
	top: 0;
	right: 0;
	width: 1.5rem;
	height: 1.6rem;
	padding: 0;
	margin: 0;
	border: 0;
	background: none;
	cursor: pointer;
	display: flex;
	align-items: center;
	justify-content: center;
}
.hh-cat__toggle::before {
	content: "";
	width: 0.45rem;
	height: 0.45rem;
	border-right: 2px solid #9097a1;
	border-bottom: 2px solid #9097a1;
	transform: rotate(45deg);
	transition: transform 0.15s ease;
	margin-top: -0.15rem;
}
.hh-cat.is-collapsed > .hh-cat__toggle::before { transform: rotate(-45deg); }
.hh-cat.is-collapsed > .hh-cat__list { display: none; }

/* Price slider (noUiSlider) in brand colors */
.homestead-filters .noUi-target {
	border: 0;
	background: #e5e7eb;
	box-shadow: none;
	height: 6px;
	margin: 1rem 0 1.25rem;
}
.homestead-filters .noUi-connect { background: var(--wp--preset--color--gold); }
.homestead-filters .noUi-handle {
	width: 18px; height: 18px;
	border-radius: 50%;
	border: 2px solid var(--wp--preset--color--navy);
	background: #fff;
	box-shadow: 0 1px 3px rgba(0,0,0,0.2);
	top: -7px; right: -9px;
	cursor: grab;
}
.homestead-filters .noUi-handle::before,
.homestead-filters .noUi-handle::after { display: none; }
/* noUi value tooltips: move below the track (default is above, where they
   collided with the "Price" heading) and make them subtle. */
.homestead-filters .noUi-tooltip {
	bottom: auto;
	top: 22px;
	font-size: 0.75rem;
	color: #6b7280;
	background: transparent;
	border: 0;
	padding: 0;
}
/* Add a little headroom so the slider never rides up into the heading. */
.homestead-filters .ssf_range_content { padding-top: 0.25rem; }
/* Price min/max number boxes */
.homestead-filters .ssf_range_content input,
.homestead-filters .range-filter-fields input {
	width: 70px;
	padding: 0.35rem 0.5rem;
	border: 1px solid #cbd2da;
	border-radius: 3px;
	font-size: 0.9rem;
}
/* The "Filter" apply button */
.homestead-filters .ssf_apply_range_filter,
.homestead-filters button[type="submit"],
.homestead-filters .button {
	margin-top: 0.75rem;
	background: var(--wp--preset--color--navy);
	color: #fff;
	border: 0;
	border-radius: 3px;
	padding: 0.5rem 1.1rem;
	font-family: var(--wp--preset--font-family--display);
	text-transform: uppercase;
	letter-spacing: 0.03em;
	font-size: 0.8rem;
	font-weight: 600;
	cursor: pointer;
}
.homestead-filters .ssf_apply_range_filter:hover,
.homestead-filters .button:hover { background: var(--wp--preset--color--red); }

/* --- Product card "Add to cart": softer, less shouty than full red ---- */
.woocommerce a.button.add_to_cart_button,
.wp-block-woocommerce-product-button .wp-block-button__link,
.wc-block-grid__product .wp-block-button__link {
	background: var(--wp--preset--color--navy) !important;
	color: #fff !important;
	border: 0 !important;
	font-weight: 600;
}
.woocommerce a.button.add_to_cart_button:hover,
.wp-block-woocommerce-product-button .wp-block-button__link:hover,
.wc-block-grid__product .wp-block-button__link:hover {
	background: var(--wp--preset--color--red) !important;
}
/* Keep the single-product main Add to Cart prominent in red, but refined. */
.single-product .single_add_to_cart_button {
	background: var(--wp--preset--color--red) !important;
	color: #fff !important;
}
.single-product .single_add_to_cart_button:hover {
	background: var(--wp--preset--color--red-dark, #7e2020) !important;
}

/* Buy box polish (BattleHawk-style: clear price, confident in-stock, trust
   lines) — keeps our palette per client direction. */
.homestead-buybox .stock.in-stock,
.single-product .stock.in-stock {
	color: #1f7a44;            /* confident green for "in stock" */
	font-weight: 600;
}
.homestead-buybox .stock.in-stock::before { content: "✓ "; }
.homestead-buybox .price,
.homestead-buybox .woocommerce-Price-amount { color: var(--wp--preset--color--navy); }
.homestead-buybox-trust p {
	margin: 0;
	color: #4b5563;
	display: flex;
	align-items: center;
	gap: 0.4rem;
}

/* ------------------------------------------------------------------
   FAQ accordions (.homestead-faq details blocks — e.g. Gun Transfers)
   ------------------------------------------------------------------ */
.homestead-faq.wp-block-details {
	border: 1px solid rgba(31, 45, 61, 0.15);
	border-radius: 6px;
	margin-bottom: 0.75rem;
	background: #fff;
}
.homestead-faq.wp-block-details summary {
	list-style: none;
	cursor: pointer;
	font-weight: 600;
	color: var(--wp--preset--color--contrast, #1f2d3d);
	padding: 1rem 3rem 1rem 1.25rem;
	position: relative;
	border-radius: 6px;
}
/* Safari/legacy WebKit shows its own triangle unless removed here */
.homestead-faq.wp-block-details summary::-webkit-details-marker {
	display: none;
}
.homestead-faq.wp-block-details summary::after {
	content: "+";
	position: absolute;
	right: 1.25rem;
	top: 50%;
	transform: translateY(-50%);
	font-size: 1.5rem;
	line-height: 1;
	font-weight: 500;
	color: var(--wp--preset--color--primary, #9b2a2a);
}
.homestead-faq.wp-block-details[open] summary::after {
	content: "\2013";
}
.homestead-faq.wp-block-details summary:hover {
	background: rgba(31, 45, 61, 0.04);
}
.homestead-faq.wp-block-details[open] summary {
	border-bottom: 1px solid rgba(31, 45, 61, 0.1);
	border-radius: 6px 6px 0 0;
}
.homestead-faq.wp-block-details > p {
	padding: 0 1.25rem;
	margin-top: 0.85rem;
	margin-bottom: 1rem;
}

/* ------------------------------------------------------------------
   Classic WooCommerce checkout
   ------------------------------------------------------------------ */
/* Field labels */
.woocommerce-checkout form.checkout label {
	display: block;
	font-weight: 600;
	font-size: 0.9rem;
	color: #1f2d3d;
	margin-bottom: 0.3rem;
}
.woocommerce-checkout form.checkout .required {
	color: #9b2a2a;
	text-decoration: none;
}

/* Inputs — the parent theme strips borders, so make fields visible again */
.woocommerce-checkout form.checkout .input-text,
.woocommerce-checkout form.checkout textarea,
.woocommerce-checkout form.checkout select {
	width: 100%;
	padding: 0.65rem 0.75rem;
	border: 1px solid rgba(31, 45, 61, 0.3) !important;
	border-radius: 4px;
	background: #fff;
	font: inherit;
	font-size: 1rem;
	line-height: 1.4;
	color: #1f2d3d;
	box-sizing: border-box;
}
.woocommerce-checkout form.checkout .input-text:focus,
.woocommerce-checkout form.checkout textarea:focus,
.woocommerce-checkout form.checkout select:focus {
	outline: none;
	border-color: #1f2d3d !important;
	box-shadow: 0 0 0 2px rgba(31, 45, 61, 0.15);
}
.woocommerce-checkout form.checkout .form-row {
	margin-bottom: 1.1rem;
}

/* selectWoo (select2) dropdowns — match the text inputs */
.woocommerce-checkout .select2-container--default .select2-selection--single {
	height: auto;
	padding: 0.65rem 0.75rem;
	border: 1px solid rgba(31, 45, 61, 0.3);
	border-radius: 4px;
	background: #fff;
}
.woocommerce-checkout .select2-container--default .select2-selection--single .select2-selection__rendered {
	line-height: 1.4;
	padding: 0;
	color: #1f2d3d;
}
.woocommerce-checkout .select2-container--default .select2-selection--single .select2-selection__arrow {
	height: 100%;
	top: 0;
	right: 0.6rem;
}

/* Section headings */
.woocommerce-checkout form.checkout h3,
.woocommerce-checkout #order_review_heading {
	font-family: var(--wp--preset--font-family--display, inherit);
	text-transform: uppercase;
	font-size: 1.35rem;
	letter-spacing: 0.02em;
	color: #1f2d3d;
	margin: 0 0 1rem;
}
.woocommerce-checkout #ship-to-different-address {
	font-size: 1.05rem;
	text-transform: none;
	display: flex;
	align-items: center;
	gap: 0.5rem;
}
.woocommerce-checkout #ship-to-different-address label {
	margin-bottom: 0;
	display: inline-flex;
	align-items: center;
	gap: 0.5rem;
}

/* Order review box */
.woocommerce-checkout #order_review_heading {
	margin-top: 0;
}
.woocommerce-checkout #order_review {
	background: #f7f8fa;
	border: 1px solid rgba(31, 45, 61, 0.15);
	border-radius: 6px;
	padding: 1.5rem;
	box-sizing: border-box;
}
.woocommerce-checkout #order_review table.shop_table {
	border: none;
	background: transparent;
	margin-bottom: 1rem;
	width: 100%;
}
.woocommerce-checkout #order_review table.shop_table th,
.woocommerce-checkout #order_review table.shop_table td {
	border: none;
	border-bottom: 1px solid rgba(31, 45, 61, 0.12);
	padding: 0.75rem 0;
	background: transparent;
	font-size: 0.95rem;
	vertical-align: top;
}
.woocommerce-checkout #order_review table.shop_table td:last-child,
.woocommerce-checkout #order_review table.shop_table th + td {
	text-align: right;
}
.woocommerce-checkout #order_review table.shop_table tr.order-total th,
.woocommerce-checkout #order_review table.shop_table tr.order-total td {
	border-bottom: none;
	font-size: 1.15rem;
	font-weight: 700;
	padding-top: 1rem;
}
.woocommerce-checkout #order_review table.shop_table tfoot th {
	font-weight: 600;
}

/* Place order button */
.woocommerce-checkout #place_order {
	display: block;
	width: 100%;
	padding: 1rem 1.5rem;
	background: #9b2a2a;
	color: #fff;
	border: none;
	border-radius: 4px;
	font-family: var(--wp--preset--font-family--display, inherit);
	font-size: 1.05rem;
	font-weight: 600;
	text-transform: uppercase;
	letter-spacing: 0.04em;
	cursor: pointer;
	transition: background 0.15s ease;
}
.woocommerce-checkout #place_order:hover {
	background: #7e2222;
}

/* Terms row */
.woocommerce-checkout .woocommerce-terms-and-conditions-wrapper {
	margin-bottom: 1rem;
}
.woocommerce-checkout .woocommerce-terms-and-conditions-wrapper .woocommerce-privacy-policy-text p {
	font-size: 0.85rem;
	color: rgba(31, 45, 61, 0.75);
}
.woocommerce-checkout .woocommerce-terms-and-conditions-checkbox-text {
	font-size: 0.92rem;
	font-weight: 400;
}
.woocommerce-checkout .validate-required .woocommerce-terms-and-conditions-checkbox-text {
	display: inline;
}

/* Coupon + info notices */
.woocommerce-checkout .woocommerce-info,
.woocommerce-checkout .woocommerce-message {
	background: rgba(31, 45, 61, 0.05);
	border-top: 3px solid #1f2d3d;
	color: #1f2d3d;
	border-radius: 0 0 4px 4px;
}
.woocommerce-checkout .woocommerce-info::before,
.woocommerce-checkout .woocommerce-message::before {
	color: #1f2d3d;
}
.woocommerce-checkout .woocommerce-info a {
	color: #9b2a2a;
}

/* Payment box (notice + button area) */
.woocommerce-checkout #payment {
	background: transparent;
	border-radius: 0;
}
.woocommerce-checkout #payment .woocommerce-notice,
.woocommerce-checkout #payment .woocommerce-info {
	font-size: 0.92rem;
}

/* GreenShift wraps the order review in its own 3px frame — our #order_review
   card already provides one, so neutralize it and use it as the sticky anchor */
.woocommerce-checkout .re_woocheckout_order {
	border: none !important;
	padding: 0 !important;
	background: transparent !important;
}
@media (min-width: 769px) {
	.woocommerce-checkout .re_woocheckout_order {
		position: sticky;
		top: 120px;
	}
}

/* Woo renders checkout notices as block banners — brand the info ones */
.woocommerce-checkout .wc-block-components-notice-banner.is-info {
	background: rgba(31, 45, 61, 0.05);
	border: 1px solid rgba(31, 45, 61, 0.25);
	color: #1f2d3d;
}
.woocommerce-checkout .wc-block-components-notice-banner.is-info > svg {
	background-color: #1f2d3d;
	fill: #fff;
}
.woocommerce-checkout .wc-block-components-notice-banner a {
	color: #9b2a2a;
}

/* Checkout layout: GreenShift caps .woocommerce at 1000px and leaves it
   left-aligned in the 1400px content column, with two ~456px floated columns
   inside — broken width with dead space on the right. Lift the cap and lay
   the form out on a real grid: fluid billing column + fixed order summary. */
.woocommerce-checkout .woocommerce {
	/* GreenShift's Woo stylesheet loads after this one — !important required */
	max-width: none !important;
}
.woocommerce-checkout form.checkout {
	display: grid;
	grid-template-columns: minmax(0, 1fr) 440px;
	column-gap: 3.5rem;
	align-items: start;
}
.woocommerce-checkout form.checkout > #customer_details {
	float: none;
	width: 100%;
	grid-column: 1;
}
.woocommerce-checkout form.checkout > .re_woocheckout_order {
	float: none !important;
	width: 100% !important;
	grid-column: 2;
	grid-row: 1 / span 2;
}
.woocommerce-checkout form.checkout > .clearfix {
	display: none;
}
/* Billing / shipping sections fill the whole left column */
.woocommerce-checkout #customer_details .col-1,
.woocommerce-checkout #customer_details .col-2 {
	float: none;
	width: 100%;
	max-width: none;
}
.woocommerce-checkout #customer_details .col-2 {
	margin-top: 1.5rem;
}
/* Side-by-side first/last name still applies within the wider column */
@media (max-width: 980px) {
	.woocommerce-checkout form.checkout {
		grid-template-columns: 1fr;
	}
	.woocommerce-checkout form.checkout > .re_woocheckout_order {
		grid-column: 1;
		grid-row: auto;
	}
}

/* SSF stock toggle: brand the checked state navy (plugin ships Google blue) */
.homestead-filters .fww-toggle-switch > :checked + label::before,
.homestead-filters :checked + .fww-toggle-switch-label::before {
	background: #1f2d3d;
}
.homestead-filters .fww-toggle-switch > :checked + label::after,
.homestead-filters :checked + .fww-toggle-switch-label::after {
	background: #1f2d3d;
}
.homestead-filters .fww-toggle-switch > :focus + label::after,
.homestead-filters .fww-toggle-switch:hover > label::after {
	box-shadow: 0 0 6px rgba(31, 45, 61, 0.5), 0 0 0 10px rgba(31, 45, 61, 0.15);
}
.homestead-filters .fww-toggle-switch .fww-toggle-switch-text {
	font-weight: 500;
}

/* Collapsible filter widgets — same +/– affordance as the FAQ accordions */
.homestead-filters .fww_sidebar .widget.hh-collapsible > h3 {
	cursor: pointer;
	position: relative;
	padding-right: 1.75rem;
	user-select: none;
	-webkit-user-select: none;
}
.homestead-filters .fww_sidebar .widget.hh-collapsible > h3::after {
	content: "\2013";
	position: absolute;
	right: 0.25rem;
	top: 50%;
	transform: translateY(-50%);
	font-size: 1.3rem;
	line-height: 1;
	font-weight: 500;
	color: var(--wp--preset--color--primary, #9b2a2a);
}
.homestead-filters .fww_sidebar .widget.hh-collapsed > h3::after {
	content: "+";
}
.homestead-filters .fww_sidebar .widget.hh-collapsed > *:not(h3) {
	display: none;
}
