/* GRX Core — compliance, promo and COA components. Colors come from the theme tokens. */

:root {
	--grx-bg: var(--c-bg, #ffffff);
	--grx-surface: var(--c-surface, #f8f7f4);
	--grx-line: var(--c-line, #e7e3db);
	--grx-text: var(--c-text, #111111);
	--grx-muted: var(--c-muted, #6e695f);
	--grx-gold: var(--c-gold, #c9a24a);
	--grx-gold-ink: var(--c-gold-ink, #8a6a22);
}

/* Four catalog cards per desktop row; retain the theme's smaller-screen layouts. */
@media (min-width: 1024px) {
	body:is(.woocommerce-shop, .post-type-archive-product, .tax-product_cat, .tax-product_tag) .woo-page > ul.products {
		grid-template-columns: repeat(4, minmax(0, 1fr));
	}
}

/* Homepage catalog cards: readable descriptions and the same inset buttons as the shop. */
body.home .grx-rail__track ul.products > li.product { padding-bottom: 18px; }
body.home .grx-rail__track ul.products > li.product > a.button { width: auto; margin: 0 16px; align-self: stretch; }
body.home .grx-rail__track .grx-card-type {
	display: grid; grid-template-columns: 7px minmax(0, 1fr); align-items: start;
	white-space: normal; overflow: visible; text-overflow: clip; overflow-wrap: anywhere;
}
body.home .grx-rail__track .grx-card-type .dot { margin-top: .5em; }
body.home .grx-rail__track li.product:focus-within { opacity: 1 !important; }
@media (max-width: 820px) {
	body.home .grx-rail__track ul.products {
        width: calc(100% + var(--gutter, 16px) + var(--gutter, 16px));
        max-width: none; margin-inline: calc(-1 * var(--gutter, 16px));
        padding-inline: 0; gap: 12px; scroll-padding-inline: 0;
    }
    /* End spacers let the first and last cards reach the same center snap point. */
    body.home .grx-rail__track ul.products::before,
    body.home .grx-rail__track ul.products::after {
        content: ""; display: block !important; flex: 0 0 calc(19% - 12px); width: auto;
    }
    body.home .grx-rail__track ul.products > li.product { --rail-w: 62%; scroll-snap-align: center; }
}
@media (max-width: 420px) {
	body.home .grx-rail__track ul.products > li.product > a.button { margin-inline: 12px; }
}
@media (prefers-reduced-motion: reduce) {
	body.home .grx-rail__track li.product { opacity: 1 !important; }
}

/* Keep every compound-type choice visible without a scrolling tab strip. */
body:is(.woocommerce-shop, .post-type-archive-product, .tax-product_cat, .tax-product_tag) .woo-page .shop-tabs {
	flex-wrap: wrap;
	gap: 8px;
	padding: 12px 0;
	overflow: visible;
}
body:is(.woocommerce-shop, .post-type-archive-product, .tax-product_cat, .tax-product_tag) .woo-page .shop-tab {
	justify-content: center;
	min-width: 0;
	min-height: 44px;
	margin: 0;
	padding: 8px 12px;
	border: 1px solid var(--grx-line);
	border-radius: 4px;
	background: var(--grx-bg);
	font-size: .875rem;
	line-height: 1.3;
	white-space: nowrap;
	transition: background .2s, border-color .2s, color .2s;
}
body:is(.woocommerce-shop, .post-type-archive-product, .tax-product_cat, .tax-product_tag) .woo-page .shop-tab:hover {
	border-color: var(--grx-gold);
	background: var(--grx-surface);
}
body:is(.woocommerce-shop, .post-type-archive-product, .tax-product_cat, .tax-product_tag) .woo-page .shop-tab.is-active {
	border-color: var(--grx-gold);
	background: var(--c-gold-soft, #f5edd9);
	color: var(--grx-text);
}
body:is(.woocommerce-shop, .post-type-archive-product, .tax-product_cat, .tax-product_tag) .woo-page .shop-tabs__count {
	padding-bottom: 0;
}
@media (max-width: 760px) {
	body:is(.woocommerce-shop, .post-type-archive-product, .tax-product_cat, .tax-product_tag) .woo-page .shop-tabs {
		display: grid;
		grid-template-columns: repeat(3, minmax(0, 1fr));
	}
	body:is(.woocommerce-shop, .post-type-archive-product, .tax-product_cat, .tax-product_tag) .woo-page .shop-tab {
		font-size: .82rem;
	}
}
@media (max-width: 420px) {
	body:is(.woocommerce-shop, .post-type-archive-product, .tax-product_cat, .tax-product_tag) .woo-page .shop-tabs {
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}
}

/* Show complete catalog and related-product descriptions at every screen width. */
body:is(.woocommerce-shop, .post-type-archive-product, .tax-product_cat, .tax-product_tag) .woo-page > ul.products .grx-card-type,
body.single-product .related.products > ul.products .grx-card-type {
	display: grid;
	grid-template-columns: 7px minmax(0, 1fr);
	align-items: start;
	white-space: normal;
	overflow: visible;
	text-overflow: clip;
	overflow-wrap: anywhere;
}
body:is(.woocommerce-shop, .post-type-archive-product, .tax-product_cat, .tax-product_tag) .woo-page > ul.products .grx-card-type .dot,
body.single-product .related.products > ul.products .grx-card-type .dot {
	margin-top: .5em;
}

/* Inset product-card buttons with a white border of space beneath them. */
body:is(.woocommerce-shop, .post-type-archive-product, .tax-product_cat, .tax-product_tag) .woo-page > ul.products > li.product,
body.single-product .related.products > ul.products > li.product {
	padding-bottom: 18px;
}
body:is(.woocommerce-shop, .post-type-archive-product, .tax-product_cat, .tax-product_tag) .woo-page > ul.products > li.product > a.button,
body.single-product .related.products > ul.products > li.product > a.button {
	width: auto;
	margin: 0 16px;
	align-self: stretch;
}
@media (max-width: 420px) {
	body:is(.woocommerce-shop, .post-type-archive-product, .tax-product_cat, .tax-product_tag) .woo-page > ul.products > li.product > a.button,
	body.single-product .related.products > ul.products > li.product > a.button {
		margin-inline: 12px;
	}
}

.screen-reader-text { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

.grx-button {
	display: inline-flex; align-items: center; justify-content: center; gap: .5rem;
	min-height: 48px; padding: 0 1.5rem; border: 1px solid var(--grx-gold);
	background: var(--grx-gold); color: #111; font-weight: 600; font-size: .95rem;
	text-decoration: none; cursor: pointer; transition: background .2s, color .2s;
}
.grx-button:hover { background: #b8913c; border-color: #b8913c; color: #111; }
.grx-button:disabled { opacity: .35; cursor: not-allowed; background: var(--grx-gold); color: #111; }
.grx-button--ghost { background: transparent; color: var(--grx-text); border-color: var(--grx-line); }
.grx-button--ghost:hover { border-color: var(--grx-text); color: var(--grx-text); }

/* Entry gate — visible until accepted (no flash for returning visitors). */
.grx-gate {
	position: fixed; inset: 0; z-index: 99999; display: flex; align-items: center; justify-content: center;
	padding: 16px; background: rgba(255, 255, 255, .86); backdrop-filter: blur(8px);
}
.grx-gate-ok .grx-gate { display: none; }
body.grx-gate-open { overflow: hidden; }
.grx-gate__card {
	width: 100%; max-width: 520px; max-height: calc(100vh - 32px); overflow-y: auto;
	padding: clamp(24px, 5vw, 40px); background: var(--grx-bg); border: 1px solid var(--grx-line); color: var(--grx-text); box-shadow: 0 24px 60px rgba(17, 17, 17, .12);
}
.grx-gate__card img { display: block; margin-bottom: 28px; height: auto; }
.grx-gate__card h2 { margin: 0 0 8px; font-size: 1.5rem; }
.grx-gate__card > p { margin: 0 0 20px; color: var(--grx-muted); }
.grx-gate__card label { display: flex; gap: 12px; align-items: flex-start; margin-bottom: 16px; font-size: .92rem; line-height: 1.5; cursor: pointer; }
.grx-gate__card input[type="checkbox"] { flex: 0 0 auto; width: 20px; height: 20px; margin-top: 2px; accent-color: var(--grx-gold-ink); }
.grx-gate__links { font-size: .8rem; color: var(--grx-muted); }
.grx-gate__links a { color: var(--grx-muted); }
.grx-gate__actions { display: grid; grid-template-columns: 1fr 2fr; gap: 12px; margin-top: 24px; }

/* Announcement bar */
.grx-bar { background: var(--grx-gold); color: #111; font-size: .82rem; }
.grx-bar__inner { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 6px 18px; max-width: 1280px; min-height: 40px; margin: 0 auto; padding: 8px 16px; text-align: center; }
.grx-bar strong { text-transform: uppercase; letter-spacing: .08em; }
.grx-bar__timer { font-variant-numeric: tabular-nums; }
.grx-bar a { color: inherit; font-weight: 600; text-underline-offset: 3px; }
@media (max-width: 600px) { .grx-bar__deal { display: none; } }

/* Homepage countdown block */
.grx-countdown { padding: clamp(40px, 7vw, 72px) 16px; text-align: center; background: var(--grx-surface); border-block: 1px solid var(--grx-line); }
.grx-countdown__label { margin: 0 0 12px; color: var(--grx-gold-ink); text-transform: uppercase; letter-spacing: .14em; font-size: .8rem; font-weight: 600; }
.grx-countdown__title { margin: 0 auto 10px; max-width: 18ch; font-size: clamp(1.6rem, 4vw, 2.6rem); }
.grx-countdown__sub { margin: 0 0 28px; color: var(--grx-muted); }
.grx-countdown__clock { display: grid; width: fit-content; max-width: 100%; margin-inline: auto; grid-template-columns: repeat(4, minmax(64px, 110px)); gap: clamp(8px, 2vw, 16px); margin-bottom: 32px; }
.grx-countdown__clock div { padding: 14px 6px; border: 1px solid var(--grx-line); background: var(--grx-bg); }
.grx-countdown__clock span { display: block; font-size: clamp(1.6rem, 6vw, 2.8rem); font-weight: 600; font-variant-numeric: tabular-nums; color: var(--grx-text); }
.grx-countdown__clock small { color: var(--grx-muted); font-size: .72rem; text-transform: uppercase; letter-spacing: .1em; }

/* Badges */
.grx-bogo-badge, .grx-soon-badge {
	display: inline-block; margin: 0 0 10px; padding: 4px 10px; font-size: .72rem; font-weight: 600;
	letter-spacing: .06em; text-transform: uppercase; border: 1px solid var(--grx-gold); color: var(--grx-gold-ink);
}
.grx-soon-badge { border-color: var(--grx-line); color: var(--grx-muted); }
.grx-coming-soon { color: var(--grx-muted); font-weight: 600; }
.grx-coming-soon-note { padding: 12px 14px; border: 1px solid var(--grx-line); color: var(--grx-muted); font-size: .92rem; }
.grx-free-note { flex-basis: 100%; margin: 10px 0 0; color: var(--grx-gold-ink); font-size: .85rem; font-weight: 600; }

/* Checkout attestations */
.grx-attest { margin: 0 0 20px; padding: 18px; border: 1px solid var(--grx-line); background: var(--grx-bg); }
.grx-attest__title { margin: 0 0 12px; font-weight: 600; }
.grx-attest .form-row { margin: 0 0 12px; }
.grx-attest label.checkbox { display: flex !important; gap: 10px; align-items: flex-start; line-height: 1.5; font-size: .9rem; }
.grx-attest input[type="checkbox"] { flex: 0 0 auto; width: 18px; height: 18px; margin-top: 3px; accent-color: var(--grx-gold-ink); }
.grx-attest__links { margin: 0; font-size: .8rem; color: var(--grx-muted); }

/* COA tables */
.grx-table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; }
.grx-coa-table { width: 100%; border-collapse: collapse; font-size: .92rem; }
.grx-coa-table th, .grx-coa-table td { padding: 12px 10px; border-bottom: 1px solid var(--grx-line); text-align: left; white-space: nowrap; }
.grx-coa-table th { color: var(--grx-muted); font-weight: 600; font-size: .78rem; text-transform: uppercase; letter-spacing: .08em; }
.grx-coa-table a { color: var(--grx-gold-ink); }
.grx-coa-request { margin: 6px 0 14px; color: var(--grx-muted); font-size: .88rem; }

/* Selected-size certificate in the product buy box. */
.grx-coa-card {
	display: grid; grid-template-columns: 24px minmax(0, 1fr) auto; gap: 12px; align-items: center;
	margin: 0 0 24px; padding: 16px; border: 1px solid var(--grx-line); background: #fcfbf8;
	color: var(--grx-text); text-align: left; box-sizing: border-box; max-width: 100%;
}
.grx-coa-card__icon { width: 24px; height: 28px; color: var(--grx-gold-ink); }
.grx-coa-card__icon svg { display: block; width: 100%; height: 100%; }
.grx-coa-card__content { min-width: 0; }
.grx-coa-card [data-coa-title] { display: block; margin: 0; font-size: .94rem; font-weight: 600; line-height: 1.4; }
.grx-coa-card [data-coa-detail] { display: block; margin-top: 4px; color: var(--grx-muted); font-size: .78rem; line-height: 1.5; overflow-wrap: anywhere; }
.grx-coa-card [data-coa-link] {
	display: inline-flex; justify-content: center; align-items: center; min-height: 44px; padding: 9px 14px;
	border: 1px solid var(--grx-gold); background: var(--grx-bg); color: var(--grx-gold-ink);
	font-size: .85rem; font-weight: 600; line-height: 1.3; text-decoration: none; white-space: nowrap; box-sizing: border-box;
	transition: background .2s, color .2s;
}
.grx-coa-card [data-coa-link]:is(:hover, :focus-visible) { border-color: var(--grx-text); background: #b8913c; color: var(--grx-text); }
.grx-coa-card [data-coa-link]:focus-visible { outline: 2px solid var(--grx-gold-ink); outline-offset: 3px; }
.grx-coa-card [data-coa-link][hidden] { display: none !important; }
.grx-coa-card[data-state="choose"] { grid-template-columns: 24px minmax(0, 1fr); }
@media (max-width: 860px) {
	.single-product div.product .summary > .grx-coa-card { order: 5; margin: 0 0 16px; }
}
@media (max-width: 480px) {
	.grx-coa-card { grid-template-columns: 24px minmax(0, 1fr); align-items: start; padding: 14px; }
	.grx-coa-card [data-coa-link] { grid-column: 2; justify-self: start; }
}
.grx-ship-nudge { margin: 0 0 14px; padding: 10px 14px; border: 1px solid var(--grx-line); background: var(--grx-bg); font-size: .9rem; color: var(--grx-text); }
.grx-ship-nudge--ok { border-color: var(--grx-gold); color: var(--grx-gold-ink); }

/* SMS consent */
.grx-sms label.checkbox { display: flex !important; gap: 10px; align-items: flex-start; line-height: 1.5; font-size: .85rem; color: var(--grx-muted, #555); }
.grx-sms input[type="checkbox"] { flex: 0 0 auto; width: 18px; height: 18px; margin-top: 3px; accent-color: var(--grx-gold-ink); }
.grx-sms__links { display: block; margin-top: 4px; }
.grx-sms .optional { display: none; }
.grx-sms-signup { max-width: 560px; margin: 0 0 40px; padding: 24px; border: 1px solid var(--grx-line); background: var(--grx-bg); }
.grx-sms-signup h2 { margin-top: 0; }
.grx-sms-signup__label { display: block; font-weight: 600; margin-bottom: 6px; }
.grx-sms-signup input[type="tel"] { width: 100%; padding: 12px; border: 1px solid var(--grx-line); font-size: 1rem; margin-bottom: 14px; box-sizing: border-box; }
.grx-sms-signup__check { display: flex; gap: 10px; align-items: flex-start; line-height: 1.5; font-size: .9rem; margin-bottom: 12px; }
.grx-sms-signup__check input { flex: 0 0 auto; width: 18px; height: 18px; margin-top: 3px; accent-color: var(--grx-gold-ink); }
.grx-sms-signup__fine, .grx-sms-signup__links { font-size: .8rem; line-height: 1.5; }
.grx-sms-signup__hp { position: absolute; left: -9999px; }
.grx-sms-signup__ok { font-weight: 600; }
.grx-sms-signup__err { color: #b42318; }

/* BOGO bar sirens: the siren emoji, recolored gold */
.grx-siren { flex: 0 0 auto; display: inline-block; font-size: 1.15rem; line-height: 1; filter: grayscale(1) sepia(1) saturate(3) hue-rotate(4deg) brightness(1.18) contrast(1.1); animation: grx-siren-pulse 1.1s ease-in-out infinite; }
@keyframes grx-siren-pulse { 0%, 100% { transform: scale(1); opacity: 1; } 50% { transform: scale(1.12); opacity: .82; } }
@media (prefers-reduced-motion: reduce) { .grx-siren { animation: none; } }
@media (max-width: 600px) { .grx-siren { font-size: 1rem; } .grx-bar__inner { column-gap: 10px; } .grx-bar__inner > .grx-siren:first-of-type { order: 1; } .grx-bar__inner > strong { order: 2; } .grx-bar__inner > .grx-siren:last-of-type { order: 3; } .grx-bar__timer { order: 4; } .grx-bar__inner > a { order: 5; } }

/* Certificates page: one continuous list with every field and action in view. */
body.grx-certificates-page .container.prose-page { max-width: 1280px; }
.grx-certificates-page .page-title { margin-bottom: 16px; }
.grx-certificates-page .prose > p { max-width: 80ch; color: var(--grx-muted); }
.grx-coa-library { margin-top: 28px; color: var(--grx-text); min-width: 0; }
.grx-coa-library *, .grx-coa-library *::before, .grx-coa-library *::after { box-sizing: border-box; }
.grx-coa-library [hidden] { display: none !important; }
.grx-coa-library__tools {
	display: grid; grid-template-columns: minmax(220px, 1fr) auto auto; align-items: end; gap: 16px;
	margin: 0 0 12px;
}
.grx-coa-library__search { min-width: 0; }
.grx-coa-library__search label { display: block; margin-bottom: 7px; font-size: .8rem; color: var(--grx-text); font-weight: 600; }
.grx-coa-library [data-library-search] {
	display: block; width: 100%; min-width: 0; min-height: 46px; margin: 0; padding: 11px 14px;
	border: 1px solid #d6d1c6; border-radius: 0; background: var(--grx-bg); color: var(--grx-text);
	font: inherit; font-size: 1rem; line-height: 1.4; appearance: auto;
}
.grx-coa-library [data-library-search]::placeholder { color: var(--grx-muted); opacity: 1; }
.grx-coa-library__filters { display: flex; flex-wrap: wrap; gap: 6px; min-width: 0; }
.grx-coa-library [data-library-filter], .grx-coa-library [data-library-clear] {
	display: inline-flex; align-items: center; justify-content: center; min-height: 46px; margin: 0;
	padding: 10px 14px; border: 1px solid var(--grx-line); border-radius: 0;
	background: var(--grx-bg); color: var(--grx-muted); font: inherit; font-size: .82rem;
	font-weight: 600; line-height: 1.4; cursor: pointer; white-space: normal;
}
.grx-coa-library [data-library-filter] { transition: background .2s, color .2s; }
.grx-coa-library [data-library-filter][aria-pressed="true"] { border-color: var(--grx-gold); background: #f9f3e5; color: var(--grx-gold-ink); }
.grx-coa-library [data-library-filter]:is(:hover, :focus-visible) { border-color: var(--grx-text); background: #b8913c; color: var(--grx-text); }
.grx-coa-library [data-library-clear] { border-color: transparent; padding-inline: 8px; text-decoration: underline; text-underline-offset: 3px; }
.grx-coa-library [data-library-clear]:hover { color: var(--grx-text); }
.grx-coa-library [data-library-clear]:disabled { opacity: .48; cursor: default; text-decoration: none; }
.grx-coa-library__count { margin: 14px 0 18px; color: var(--grx-muted); font-size: .82rem; }
.grx-coa-library .grx-coa-library__table { width: 100%; max-width: 100%; table-layout: fixed; border-collapse: collapse; border-spacing: 0; margin: 0; background: var(--grx-bg); }
.grx-coa-library .grx-coa-grid-head th {
	padding: 13px 14px; border-top: 2px solid var(--grx-gold); border-bottom: 1px solid var(--grx-line);
	background: #faf9f6; color: var(--grx-muted); font-size: .68rem; letter-spacing: .08em;
	text-transform: uppercase; font-weight: 600; text-align: left; overflow-wrap: anywhere;
}
.grx-coa-grid-head th:nth-child(1) { width: 24%; }
.grx-coa-grid-head th:nth-child(2) { width: 12%; }
.grx-coa-grid-head th:nth-child(3) { width: 26%; }
.grx-coa-grid-head th:nth-child(4) { width: 18%; }
.grx-coa-grid-head th:nth-child(5) { width: 20%; }
.grx-coa-library .grx-coa-field { min-width: 0; padding: 16px 14px; border-bottom: 1px solid var(--grx-line); font-size: .88rem; line-height: 1.5; text-align: left; vertical-align: middle; }
.grx-coa-library .grx-coa-record:hover { background: #fcfbf8; }
.grx-coa-library__caption, .grx-coa-field__label { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }
.grx-coa-field__value { display: block; min-width: 0; overflow-wrap: anywhere; }
.grx-coa-library .grx-coa-field--compound a { color: var(--grx-text); font-weight: 600; text-decoration: none; text-underline-offset: 4px; }
.grx-coa-library .grx-coa-field--compound a:hover { color: var(--grx-gold-ink); text-decoration: underline; }
.grx-coa-field:nth-child(3) .grx-coa-field__value { color: var(--grx-muted); font-size: .8rem; }
.grx-coa-field--action .grx-coa-field__value { display: flex; flex-direction: column; align-items: flex-start; gap: 6px; }
.grx-coa-library .grx-coa-library__button {
	display: inline-flex; align-items: center; justify-content: center; min-height: 44px; min-width: 0;
	max-width: 100%; padding: 9px 16px; border: 1px solid var(--grx-gold); background: #fbf7ee;
	color: var(--grx-gold-ink); font-size: .82rem; font-weight: 600; line-height: 1.4; text-align: center;
	text-decoration: none; overflow-wrap: anywhere; transition: background .2s, color .2s;
}
.grx-coa-library .grx-coa-library__button:hover { border-color: var(--grx-text); background: #b8913c; color: var(--grx-text); }
.grx-coa-library .grx-coa-library__button--request { border-color: #d6d1c6; background: var(--grx-bg); color: var(--grx-muted); }
.grx-coa-library .grx-coa-library__button--request:hover { border-color: var(--grx-gold); color: var(--grx-gold-ink); background: #fcfaf5; }
.grx-coa-library .grx-coa-library__verify { font-size: .74rem; color: var(--grx-muted); text-underline-offset: 3px; overflow-wrap: anywhere; }
.grx-coa-library :is(a, button, input):focus-visible { outline: 2px solid var(--grx-gold-ink); outline-offset: 3px; }
.grx-coa-library [data-library-empty] { margin: 0; padding: 32px 24px; border: 1px dashed #d6d1c6; background: #fcfbf8; text-align: center; color: var(--grx-muted); }
@media (max-width: 1060px) {
	.grx-coa-library__tools { grid-template-columns: minmax(0, 1fr) auto; }
	.grx-coa-library__search { grid-column: 1 / -1; }
}
@media (max-width: 760px) {
	.grx-coa-library .grx-coa-library__table, .grx-coa-library__table tbody { display: block; }
	.grx-coa-library .grx-coa-library__table { border-top: 2px solid var(--grx-gold); }
	.grx-coa-grid-head { display: none; }
	.grx-coa-record { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px 18px; padding: 20px 0; border-bottom: 1px solid var(--grx-line); }
	.grx-coa-library .grx-coa-field { display: block; padding: 0; border: 0; }
	.grx-coa-field__label { display: block; position: static; width: auto; height: auto; overflow: visible; clip: auto; margin: 0 0 5px; white-space: normal; font-size: .65rem; text-transform: uppercase; letter-spacing: .09em; color: var(--grx-muted); font-weight: 600; }
	.grx-coa-field:nth-child(1) { grid-column: 1 / -1; grid-row: 1; }
	.grx-coa-field:nth-child(2) { grid-column: 1; grid-row: 2; }
	.grx-coa-field:nth-child(4) { grid-column: 2; grid-row: 2; }
	.grx-coa-field:nth-child(3) { grid-column: 1 / -1; grid-row: 3; }
	.grx-coa-field--action { grid-column: 1 / -1; grid-row: 4; }
	.grx-coa-library .grx-coa-field--compound a { font-size: 1rem; }
	.grx-coa-field--action .grx-coa-field__value { flex-direction: row; flex-wrap: wrap; align-items: center; gap: 10px 16px; }
}
@media (max-width: 480px) {
	.grx-coa-library { margin-top: 22px; }
	.grx-coa-library__tools { display: flex; flex-wrap: wrap; gap: 10px 8px; }
	.grx-coa-library__search { flex-basis: 100%; }
	.grx-coa-library__filters { flex: 1 1 100%; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); }
	.grx-coa-library [data-library-filter] { padding: 9px 6px; font-size: .75rem; }
	.grx-coa-library [data-library-clear] { padding: 0 8px; min-height: 44px; margin-left: auto; }
	.grx-coa-record { padding: 18px 0; gap: 12px 16px; }
}

/* Keep the native sorting control, with an inset arrow clear of its rounded edge. */
body .shop-bar__controls .woocommerce-ordering select {
  -webkit-appearance: none;
  appearance: none;
  padding-right: 48px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='m1 1 5 5 5-5' fill='none' stroke='%23111' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 18px center;
  background-size: 12px 8px;
}
@media (forced-colors: active) {
  body .shop-bar__controls .woocommerce-ordering select { appearance: auto; background-image: none; }
}
