/*
 * Kharisvie CSS overrides.
 * Only rules that theme.json or Blocksy Customizer cannot reach belong here.
 * Keep this file SHORT — every rule is a maintenance cost. Prefer theme.json.
 */

/* ----------------------------------------------------------------
 * 1. Buttons — Blocksy native theme_mods + WC reach-extension.
 * 2026-05-23: Migrated from 80-line !important block. Brand button
 * design (color, radius, padding, min-height, border) now lives in
 * Customizer → General → Buttons. The Blocksy parent generates
 * --theme-button-* CSS variables from those mods and styles its own
 * selectors. We seed the variables here (since Blocksy's dynamic-CSS
 * pipeline only regenerates on interactive Customizer save) and extend
 * coverage to the WC-specific selectors Blocksy's defaults skip.
 * ---------------------------------------------------------------- */

/* Seed the Blocksy button CSS variables. Once you open Customizer and
 * Save, Blocksy will emit these natively and this block becomes a
 * harmless duplicate. To change colors/radius/etc., either edit here
 * OR edit Customizer → Buttons (recommended for future maintenance). */
body.kh-child-active {
	--theme-button-background-initial-color: #313131;
	--theme-button-background-hover-color: #1e1e1e;
	--theme-button-text-initial-color: #ffffff;
	--theme-button-text-hover-color: #ffffff;
	--theme-button-border-radius: 100px;
	--theme-button-padding: 0.85rem 1.5rem;
	--theme-button-min-height: 48px;
	--theme-button-font-family: "DM Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
	--theme-button-font-weight: 500;
	--theme-button-line-height: 1.2;
	--theme-button-letter-spacing: 0;
}

/* WC-specific selectors Blocksy's default button CSS doesn't reach
 * (they have higher-specificity defaults from WooCommerce core).
 * Plug the same Blocksy variables in so the design stays unified. */
body.kh-child-active .woocommerce a.button,
body.kh-child-active .woocommerce a.button.alt,
body.kh-child-active .woocommerce button.button,
body.kh-child-active .woocommerce button.button.alt,
body.kh-child-active .woocommerce input.button,
body.kh-child-active .woocommerce input.button.alt,
body.kh-child-active .woocommerce ul.products li.product .button,
body.kh-child-active .woocommerce .single_add_to_cart_button,
body.kh-child-active .wc-block-components-button,
body.kh-child-active form.cart .button {
	background: var(--theme-button-background-initial-color);
	color: var(--theme-button-text-initial-color);
	border: 0;
	border-radius: var(--theme-button-border-radius);
	padding: var(--theme-button-padding);
	min-height: var(--theme-button-min-height);
	min-width: 125px;
	font-family: var(--theme-button-font-family);
	font-weight: var(--theme-button-font-weight);
	line-height: var(--theme-button-line-height);
	letter-spacing: var(--theme-button-letter-spacing);
	text-decoration: none;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 12px;
	transition: background-color 0.18s ease, color 0.18s ease;
}
body.kh-child-active .woocommerce a.button:hover,
body.kh-child-active .woocommerce a.button.alt:hover,
body.kh-child-active .woocommerce button.button:hover,
body.kh-child-active .woocommerce input.button:hover,
body.kh-child-active .woocommerce ul.products li.product .button:hover,
body.kh-child-active .woocommerce .single_add_to_cart_button:hover,
body.kh-child-active .wc-block-components-button:hover,
body.kh-child-active form.cart .button:hover {
	background: var(--theme-button-background-hover-color);
	color: var(--theme-button-text-hover-color);
}

/* Gutenberg block-style variants — these aren't Blocksy button settings,
 * they're block-style modifiers (white-on-dark for hero CTA, outline). */
body.kh-child-active .wp-block-button__link.has-surface-background-color,
body.kh-child-active .wp-block-button__link.has-white-background-color {
	background: #ffffff;
	color: #313131;
}
body.kh-child-active .wp-block-button__link.has-surface-background-color:hover,
body.kh-child-active .wp-block-button__link.has-white-background-color:hover {
	background: #f5f5f5;
	color: #1e1e1e;
}
body.kh-child-active .is-style-outline .wp-block-button__link {
	background: transparent;
	color: inherit;
	border: 1px solid currentColor;
}
body.kh-child-active .is-style-outline .wp-block-button__link:hover {
	background: rgba(255,255,255,0.12);
}

/* ----------------------------------------------------------------
 * 2. Hero overlay (used by hero-promo and ai-quiz-banner patterns)
 * ---------------------------------------------------------------- */
.kh-hero {
	position: relative;
	overflow: hidden;
}
.kh-hero__overlay {
	position: absolute;
	inset: 0;
	background: linear-gradient(180deg, rgba(0,0,0,0.15) 0%, rgba(0,0,0,0.55) 100%);
	pointer-events: none;
	z-index: 1;
}
.kh-hero__content {
	position: relative;
	z-index: 2;
	color: #fff;
	text-align: center;
	padding: 4rem 1.5rem;
}
.kh-hero__content h1,
.kh-hero__content h2 {
	color: #fff;
	text-shadow: 0 2px 12px rgba(0,0,0,0.35);
	margin-bottom: 1.25rem;
}
.kh-hero__content p {
	color: #fff;
	font-size: clamp(1rem, 0.95rem + 0.3vw, 1.125rem);
	margin-bottom: 2rem;
	max-width: 600px;
	margin-left: auto;
	margin-right: auto;
}

/* ----------------------------------------------------------------
 * 3. Splide carousel — arrow + pagination styling to match reference
 * ---------------------------------------------------------------- */
.kh-splide .splide__arrow {
	background: #fff;
	border: 1px solid #dbdbdb;
	border-radius: 50%;
	width: 40px;
	height: 40px;
	opacity: 1;
	transition: background 0.18s ease, border-color 0.18s ease;
}
.kh-splide .splide__arrow:hover {
	background: #313131;
	border-color: #313131;
}
.kh-splide .splide__arrow:hover svg {
	fill: #fff;
}
.kh-splide .splide__arrow svg {
	fill: #313131;
	width: 14px;
	height: 14px;
}
.kh-splide .splide__pagination__page {
	background: #cbc4bc;
	width: 8px;
	height: 8px;
	border-radius: 8px;
	opacity: 1;
	margin: 0 4px;
	transition: width 0.2s ease, background 0.18s ease;
}
.kh-splide .splide__pagination__page.is-active {
	background: #c12e6f;
	width: 24px;
}

/* Kharisvie product slider — card layout (used by product-carousel pattern) */
body.kh-child-active .kh-product-slider .kh-splide__card {
	background: #ffffff;
	border: 1px solid #e7e5e4;
	border-radius: 12px;
	overflow: hidden;
	transition: box-shadow 0.2s ease, transform 0.2s ease;
	display: flex;
	flex-direction: column;
	height: 100%;
}
body.kh-child-active .kh-product-slider .kh-splide__card:hover {
	box-shadow: 0 12px 28px rgba(30, 30, 30, 0.08);
}
body.kh-child-active .kh-product-slider .kh-splide__card-image {
	display: block;
	position: relative;
	overflow: hidden;
	background: #f5f5f5;
}
body.kh-child-active .kh-product-slider .kh-splide__card-image img {
	display: block;
	width: 100%;
	height: auto;
	aspect-ratio: 1 / 1;
	object-fit: cover;
	border-radius: 0 !important;  /* card has its own radius via overflow */
	transition: transform 0.4s ease;
}
body.kh-child-active .kh-product-slider .kh-splide__card:hover .kh-splide__card-image img {
	transform: scale(1.04);
}
body.kh-child-active .kh-product-slider .kh-sale-badge {
	position: absolute;
	top: 12px;
	left: 12px;
	background: #c12e6f;
	color: #ffffff;
	font-size: 0.7rem;
	font-weight: 700;
	letter-spacing: 0.08em;
	padding: 4px 10px;
	border-radius: 100px;
	text-transform: uppercase;
	z-index: 2;
}
body.kh-child-active .kh-product-slider .kh-splide__card-info {
	padding: 16px;
	display: flex;
	flex-direction: column;
	gap: 8px;
	flex-grow: 1;
}
body.kh-child-active .kh-product-slider .kh-splide__card-title {
	font-size: 1rem;
	font-weight: 500;
	color: #1e1e1e;
	margin: 0;
	line-height: 1.3;
}
body.kh-child-active .kh-product-slider .kh-splide__card-title a {
	color: inherit;
	text-decoration: none;
}
body.kh-child-active .kh-product-slider .kh-splide__card-title a:hover {
	color: #e0607e;
}
body.kh-child-active .kh-product-slider .kh-splide__card-price {
	font-weight: 700;
	color: #313131;
	font-size: 1rem;
}
body.kh-child-active .kh-product-slider .kh-splide__card-price del {
	color: #767676;
	font-weight: 400;
	font-size: 0.875rem;
	margin-right: 6px;
}
body.kh-child-active .kh-product-slider .kh-splide__card-info .button {
	margin-top: auto;
	width: 100%;
}
/* Arrow positioning — push outside the card area */
body.kh-child-active .kh-product-slider .splide__arrow {
	width: 44px;
	height: 44px;
}
body.kh-child-active .kh-product-slider .splide__arrow--prev {
	left: -18px;
}
body.kh-child-active .kh-product-slider .splide__arrow--next {
	right: -18px;
}
body.kh-child-active .kh-product-slider .splide__pagination {
	bottom: -36px;
}
@media (max-width: 768px) {
	body.kh-child-active .kh-product-slider .splide__arrow--prev { left: 4px; }
	body.kh-child-active .kh-product-slider .splide__arrow--next { right: 4px; }
}

/* ----------------------------------------------------------------
 * 4. Product card refinements — uniform 1:1 product image aspect
 * ---------------------------------------------------------------- */
/* Force 1:1 square aspect on product card images across WC blocks + classic loops + our custom Splide cards. */
body.kh-child-active .wc-block-components-product-image img,
body.kh-child-active .wc-block-grid__product-image img,
body.kh-child-active ul.products li.product .attachment-woocommerce_thumbnail,
body.kh-child-active ul.products li.product img,
body.kh-child-active .kh-splide__card-image img {
	aspect-ratio: 1 / 1 !important;
	object-fit: cover !important;
	width: 100% !important;
	height: auto !important;
	border-radius: 8px !important;
}
body.kh-child-active .wc-block-components-product-image,
body.kh-child-active .wc-block-grid__product-image,
body.kh-child-active .kh-splide__card-image {
	overflow: hidden;
	border-radius: 8px;
}

.kh-child-active .wc-block-grid__product,
.kh-child-active ul.products li.product {
	border: 1px solid #e7e5e4;
	border-radius: 8px;
	padding: 0;
	overflow: hidden;
	background: #fff;
	transition: box-shadow 0.2s ease, transform 0.2s ease;
}
.kh-child-active .wc-block-grid__product:hover,
.kh-child-active ul.products li.product:hover {
	box-shadow: 0 12px 28px rgba(30, 30, 30, 0.08);
}
.kh-child-active .wc-block-grid__product .wc-block-grid__product-title,
.kh-child-active ul.products li.product .woocommerce-loop-product__title {
	padding: 1rem 1rem 0.25rem;
	font-size: 1rem;
	font-weight: 500;
	color: #1e1e1e;
}
.kh-child-active ul.products li.product .price {
	padding: 0 1rem;
	color: #313131;
	font-weight: 700;
}
.kh-child-active ul.products li.product .button {
	margin: 1rem;
	width: calc(100% - 2rem);
}

/* ----------------------------------------------------------------
 * 4b. Testimonial images — force uniform 4:5 portrait aspect.
 * Targeted via alt-text selector so other sections aren't affected.
 * ---------------------------------------------------------------- */
body.kh-child-active img[alt*="Customer testimonial" i] {
	aspect-ratio: 4 / 5 !important;
	object-fit: cover !important;
	object-position: center top !important;
	width: 100% !important;
	height: auto !important;
	border-radius: 12px !important;
	display: block;
}
body.kh-child-active img[alt*="Customer testimonial" i] + * {
	/* ensure quote text sits cleanly under the now-uniform image */
}

/* ----------------------------------------------------------------
 * 4c. Value Sets bundle grid (used by value-sets-grid pattern)
 * ---------------------------------------------------------------- */
body.kh-child-active .kh-valueset-grid {
	display: grid;
	grid-template-columns: repeat(3, 1fr);
	gap: 1.5rem;
}
@media (max-width: 1024px) {
	body.kh-child-active .kh-valueset-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 600px) {
	body.kh-child-active .kh-valueset-grid { grid-template-columns: 1fr; }
}
body.kh-child-active .kh-valueset-card {
	background: #ffffff;
	border-radius: 16px;
	overflow: hidden;
	display: flex;
	flex-direction: column;
	box-shadow: 0 1px 2px rgba(30, 30, 30, 0.04);
	transition: box-shadow 0.2s ease, transform 0.2s ease;
}
body.kh-child-active .kh-valueset-card:hover {
	box-shadow: 0 12px 28px rgba(30, 30, 30, 0.10);
}
body.kh-child-active .kh-valueset-card__image {
	display: block;
	overflow: hidden;
	background: #f5f5f5;
}
body.kh-child-active .kh-valueset-card__image img {
	display: block;
	width: 100%;
	aspect-ratio: 4 / 3 !important;
	object-fit: cover !important;
	object-position: center center;
	transition: transform 0.4s ease;
}
body.kh-child-active .kh-valueset-card:hover .kh-valueset-card__image img {
	transform: scale(1.04);
}
body.kh-child-active .kh-valueset-card__body {
	padding: 1.5rem;
	display: flex;
	flex-direction: column;
	gap: 0.5rem;
	flex-grow: 1;
}
body.kh-child-active .kh-valueset-card__title {
	font-size: 1.25rem;
	font-weight: 700;
	color: #1e1e1e;
	margin: 0;
	line-height: 1.3;
}
body.kh-child-active .kh-valueset-card__contents {
	font-size: 0.875rem;
	color: #616161;
	margin: 0;
	line-height: 1.5;
}
body.kh-child-active .kh-valueset-card__price {
	margin: 0.5rem 0 0.75rem;
	font-weight: 700;
	font-size: 1.125rem;
}
body.kh-child-active .kh-valueset-card__price-now {
	color: #313131;
}
body.kh-child-active .kh-valueset-card__price-old {
	color: #767676;
	font-weight: 400;
	text-decoration: line-through;
	margin-left: 8px;
	font-size: 0.875rem;
}
body.kh-child-active .kh-valueset-card__cta {
	margin-top: auto;
	align-self: flex-start;
}

/* ----------------------------------------------------------------
 * 5. Trust bar layout
 * ---------------------------------------------------------------- */
.kh-trust-bar {
	background: #faf6f2;
	padding: 1.25rem 1rem;
}
.kh-trust-bar__inner {
	max-width: 1280px;
	margin: 0 auto;
	display: grid;
	grid-template-columns: repeat(2, 1fr);
	gap: 1rem 2rem;
	text-align: center;
}
@media (min-width: 768px) {
	.kh-trust-bar__inner { grid-template-columns: repeat(4, 1fr); }
}
.kh-trust-bar__item {
	font-size: 0.875rem;
	color: #313131;
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 0.5rem;
}

/* ----------------------------------------------------------------
 * 5a. Homepage — hide page title + remove white gap above hero
 * Blocksy auto-renders <h1 class="page-title">Home</h1> in .entry-header.
 * On the static front page we want the hero to butt directly under the
 * sticky header, so we hide the title and zero out the top spacing of
 * every wrapping container.
 * ---------------------------------------------------------------- */
body.home .entry-header,
body.home .page-title,
body.home .hero-section > .entry-header {
	display: none !important;
}
body.home main.site-main,
body.home .ct-container-full,
body.home article.page,
body.home .hero-section,
body.home .entry-content {
	padding-top: 0 !important;
	margin-top: 0 !important;
}
/* The hero pattern is full-width — make sure its parent doesn't add gutter padding */
body.home article.page > .entry-content,
body.home article.page {
	padding-left: 0 !important;
	padding-right: 0 !important;
}

/* ----------------------------------------------------------------
 * 5b. Sticky header — entire #header (promo bar + main nav)
 * Pins the full header to the top of the viewport on scroll.
 * Adds a subtle shadow once scrolled past the top so the header
 * visually separates from page content.
 * ---------------------------------------------------------------- */
body.kh-child-active #header,
body.kh-child-active .ct-header {
	position: sticky !important;
	top: 0;
	z-index: 99;
	background: #ffffff;
	transition: box-shadow 0.2s ease;
}

/* When the page has scrolled (body scroll offset > 0), the WP admin bar offsets.
 * Logged-in users see a 32px admin bar at top — push header below it. */
html.admin-bar body.kh-child-active #header,
html.admin-bar body.kh-child-active .ct-header {
	top: 32px;
}
@media (max-width: 782px) {
	html.admin-bar body.kh-child-active #header,
	html.admin-bar body.kh-child-active .ct-header {
		top: 46px;
	}
}

/* Subtle shadow once the user scrolls (added by Blocksy via .is-scrolled),
 * but also add a fallback that always applies a soft shadow when sticky. */
body.kh-child-active #header {
	box-shadow: 0 1px 0 rgba(30, 30, 30, 0.06);
}
body.kh-child-active.is-scrolled #header,
body.kh-child-active #header.is-stuck {
	box-shadow: 0 4px 12px rgba(30, 30, 30, 0.08);
}

/* ----------------------------------------------------------------
 * 6. Sticky promo bar at top (Blocksy header top-row + text element)
 * The text element content is set via JS in functions.php; here we
 * style the entire top-row strip so it reads as a promo bar.
 * ---------------------------------------------------------------- */
body.kh-child-active [data-row="top"],
body.kh-child-active .ct-header-top,
body.kh-child-active .ct-top-bar {
	background: #313131 !important;
	color: #ffffff !important;
	font-size: 0.875rem !important;
	min-height: auto !important;
}
body.kh-child-active [data-row="top"] *,
body.kh-child-active .ct-header-top *,
body.kh-child-active .ct-top-bar * {
	color: #ffffff !important;
	font-size: 0.875rem !important;
}
body.kh-child-active [data-row="top"] [data-id="text"],
body.kh-child-active [data-row="top"] .ct-header-text {
	padding: 8px 16px !important;
	text-align: center !important;
	width: 100% !important;
	letter-spacing: 0.04em !important;
}
body.kh-child-active [data-row="top"] a {
	color: #ffffff !important;
	text-decoration: underline !important;
}

/* ----------------------------------------------------------------
 * 7. Newsletter inline form
 * ---------------------------------------------------------------- */
.kh-newsletter {
	background: linear-gradient(135deg, #fff8f9 0%, #fceef1 100%);
	padding: 4rem 1.5rem;
	text-align: center;
}
.kh-newsletter__form {
	display: flex;
	flex-wrap: wrap;
	gap: 0.75rem;
	justify-content: center;
	max-width: 520px;
	margin: 0 auto;
}
.kh-newsletter__form input[type="email"] {
	flex: 1 1 240px;
	height: 48px;
	padding: 0 1.25rem;
	border: 1px solid #313131;
	border-radius: 100px;
	font-family: inherit;
	font-size: 1rem;
}
.kh-newsletter__form button {
	height: 48px;
	border-radius: 100px;
	background: #313131;
	color: #fff;
	border: 0;
	padding: 0 1.75rem;
	font-weight: 500;
	cursor: pointer;
}
.kh-newsletter__form button:hover { background: #1e1e1e; }

/* ----------------------------------------------------------------
 * 7b. Brand mark — image logo replaces the text wordmark (2026-05-23).
 * Site Logo (Customizer → Site Identity) is now the canonical
 * "Kharisvie" brand mark — the blush-butterfly script wordmark image.
 * Blocksy renders both the custom_logo <img> AND a .site-title text
 * element by default; hide the text so only the image shows.
 * The image carries alt="Kharisvie" for screen readers and OG meta.
 * ---------------------------------------------------------------- */
body.kh-child-active .ct-site-title,
body.kh-child-active .site-title {
	display: none !important;
}
/* Cleanly size the logo; Blocksy defaults to 50px tall. */
body.kh-child-active .custom-logo,
body.kh-child-active .wp-block-site-logo img,
body.kh-child-active header .default-logo {
	max-height: 50px;
	width: auto;
}

/* ----------------------------------------------------------------
 * 7c-pre. Nav typography — match L'ange's Title Case + 18px / 400 weight
 * Blocksy defaults to uppercased nav with tracked spacing; we match
 * the L'ange-style natural Title Case rendering instead.
 * ---------------------------------------------------------------- */
body.kh-child-active .ct-menu-link,
body.kh-child-active #header .menu a,
body.kh-child-active .ct-header [data-id="menu"] a {
	font-family: "DM Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif !important;
	font-size: 1.125rem !important;          /* 18px */
	font-weight: 400 !important;
	letter-spacing: normal !important;
	text-transform: none !important;           /* Title Case, not UPPERCASE */
	line-height: 1.5 !important;
	color: #313131 !important;
}

/* Spacing between nav items (Blocksy uses tight default; add breathing room) */
body.kh-child-active .ct-header [data-id="menu"] > ul,
body.kh-child-active #header .menu {
	column-gap: 28px;
}
body.kh-child-active .ct-header [data-id="menu"] > ul > li,
body.kh-child-active #header .menu > li {
	margin: 0;
}

/* ----------------------------------------------------------------
 * 7c. Menu items — active / hover use brand pink, not Blocksy blue
 * ---------------------------------------------------------------- */
body.kh-child-active .menu .current-menu-item > a,
body.kh-child-active .menu .current-menu-ancestor > a,
body.kh-child-active .menu .current-menu-parent > a,
body.kh-child-active .ct-menu-link.active,
body.kh-child-active .ct-menu-link:hover,
body.kh-child-active .menu li a:hover,
body.kh-child-active .menu-item.current-menu-item a,
body.kh-child-active #offcanvas .menu .current-menu-item > a {
	color: #e0607e !important;
}

/* ----------------------------------------------------------------
 * 8. Skip-link visibility (accessibility — matches reference behavior)
 * ---------------------------------------------------------------- */
.kh-child-active .skip-link:focus {
	top: 0;
	background: #1e1e1e;
	color: #fff;
}

/* ----------------------------------------------------------------
 * 9. Responsive type rhythm refinements
 * ---------------------------------------------------------------- */
@media (max-width: 767px) {
	.kh-hero__content { padding: 3rem 1rem; }
	.kh-trust-bar__inner { gap: 1.25rem; }
}

/* ----------------------------------------------------------------
 * 10g. Fluent Forms submit buttons — brand pill.
 * Fluent Forms ships a blue (#1a7efb) submit button by default and
 * carries its own styles via inline CSS classes. Plug in the same
 * Blocksy --theme-button-* variables we use everywhere else so the
 * Contact + Newsletter submit buttons match the brand pill silhouette.
 * ---------------------------------------------------------------- */
body.kh-child-active .frm-fluent-form .ff-btn-submit,
body.kh-child-active .fluentform .ff-btn-submit,
body.kh-child-active .fluentform button[type="submit"],
body.kh-child-active .frm-fluent-form button[type="submit"] {
	background-color: var(--theme-button-background-initial-color) !important;
	border-color: var(--theme-button-background-initial-color) !important;
	color: var(--theme-button-text-initial-color) !important;
	border-radius: var(--theme-button-border-radius) !important;
	padding: var(--theme-button-padding) !important;
	min-height: var(--theme-button-min-height);
	font-family: var(--theme-button-font-family);
	font-weight: var(--theme-button-font-weight);
	border-width: 0 !important;
}
body.kh-child-active .frm-fluent-form .ff-btn-submit:hover,
body.kh-child-active .fluentform .ff-btn-submit:hover,
body.kh-child-active .fluentform button[type="submit"]:hover,
body.kh-child-active .frm-fluent-form button[type="submit"]:hover {
	background-color: var(--theme-button-background-hover-color) !important;
	border-color: var(--theme-button-background-hover-color) !important;
	color: var(--theme-button-text-hover-color) !important;
}

/* ----------------------------------------------------------------
 * 7d. Header submenu dropdown (2026-05-24)
 *
 * Blocksy ships a dark-navy submenu panel by default. Reskin to match
 * the editorial palette: white surface, graphite text, pink hover,
 * soft shadow for depth. Mobile (off-canvas) uses Blocksy's accordion
 * which is already passable; this is desktop hover-dropdown only.
 * ---------------------------------------------------------------- */
body.kh-child-active #header .ct-menu-dropdown,
body.kh-child-active #header .menu .sub-menu,
body.kh-child-active #header [data-id="menu"] ul ul {
	background: #ffffff !important;
	border: 1px solid #e7e5e4 !important;
	border-radius: 12px !important;
	box-shadow: 0 12px 32px rgba(30, 30, 30, 0.10) !important;
	padding: 0.5rem 0 !important;
	min-width: 220px !important;
}
body.kh-child-active #header .ct-menu-dropdown a,
body.kh-child-active #header .menu .sub-menu a,
body.kh-child-active #header [data-id="menu"] ul ul a {
	color: #313131 !important;
	font-family: "DM Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif !important;
	font-size: 0.9375rem !important;
	font-weight: 400 !important;
	text-transform: none !important;
	letter-spacing: normal !important;
	line-height: 1.5 !important;
	padding: 0.5rem 1.25rem !important;
	display: block;
	transition: background-color 0.15s ease, color 0.15s ease;
}
body.kh-child-active #header .ct-menu-dropdown a:hover,
body.kh-child-active #header .menu .sub-menu a:hover,
body.kh-child-active #header [data-id="menu"] ul ul a:hover,
body.kh-child-active #header .ct-menu-dropdown .current-menu-item > a,
body.kh-child-active #header .menu .sub-menu .current-menu-item > a {
	background: #faf6f2 !important;
	color: #c12e6f !important;
}

/* "Shop All ..." item — divider above, slight emphasis */
body.kh-child-active #header .ct-menu-dropdown li:last-child > a,
body.kh-child-active #header .menu .sub-menu li:last-child > a,
body.kh-child-active #header [data-id="menu"] ul ul li:last-child > a {
	border-top: 1px solid #e7e5e4;
	margin-top: 0.25rem;
	padding-top: 0.625rem;
	font-weight: 500;
}

/* ----------------------------------------------------------------
 * 11. Use-case filter pill row (2026-05-23)
 *
 * Server-rendered above the WooCommerce product loop on /shop and
 * /product-category/* archives. Inspired by Tymo Beauty's filter UX.
 * Pills follow the Pill-Only Rule and the Pink-As-Verb Rule: "All" pill
 * (the active reset) sits in dark graphite when active; tag pills are
 * surface-soft at rest and shift to graphite on active. No pink here —
 * filtering is a tertiary verb, not a primary call-to-act.
 * ---------------------------------------------------------------- */
body.kh-child-active .kh-filter {
	margin: 0 0 1.5rem 0;
	padding: 0;
}
body.kh-child-active .kh-filter__list {
	list-style: none;
	margin: 0;
	padding: 0;
	display: flex;
	flex-wrap: wrap;
	gap: 0.5rem;
}
body.kh-child-active .kh-filter__pill {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	height: 40px;
	padding: 0 1.125rem;
	border-radius: 100px;
	background: #f5f5f5;
	color: #313131;
	font-family: "DM Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
	font-size: 0.9375rem;
	font-weight: 500;
	line-height: 1;
	cursor: pointer;
	user-select: none;
	transition: background-color 0.18s ease, color 0.18s ease;
	white-space: nowrap;
}
body.kh-child-active .kh-filter__pill:hover {
	background: #e8e6e3;
}
body.kh-child-active .kh-filter__pill:focus-visible {
	outline: 2px solid #313131;
	outline-offset: 2px;
}
body.kh-child-active .kh-filter__pill.is-active {
	background: #313131;
	color: #ffffff;
}
body.kh-child-active .kh-filter__pill.is-active:hover {
	background: #1e1e1e;
}

/* Hidden products + empty-state notice */
body.kh-child-active li.product.kh-filter-hidden {
	display: none !important;
}
body.kh-child-active li.kh-filter-empty {
	list-style: none;
	grid-column: 1 / -1;
	padding: 3rem 1rem;
	text-align: center;
	color: #616161;
	font-style: italic;
}

@media (max-width: 640px) {
	body.kh-child-active .kh-filter__list {
		flex-wrap: nowrap;
		overflow-x: auto;
		scrollbar-width: none;
		-ms-overflow-style: none;
		padding-bottom: 0.5rem;
		margin-left: -1rem;
		margin-right: -1rem;
		padding-left: 1rem;
		padding-right: 1rem;
	}
	body.kh-child-active .kh-filter__list::-webkit-scrollbar { display: none; }
	body.kh-child-active .kh-filter__pill {
		flex: 0 0 auto;
		height: 36px;
		font-size: 0.875rem;
	}
}

/* ----------------------------------------------------------------
 * 10. Polish pass 2026-05-22 — DESIGN.md alignment
 *
 * Each rule below traces to a Named Rule in DESIGN.md. Keep this block
 * intact when porting — these are the polish-delta edits.
 * ---------------------------------------------------------------- */

/* 10a. DM Sans cascade to body / paragraphs / lists.
 * Blocksy's bundle/main.min.css sets body font from --theme-font-family
 * and wins source-order over the inline theme.json styles. Override the
 * variable at the body-class level so every Blocksy descendant inherits
 * DM Sans without per-element !important fights. */
body.kh-child-active {
	--theme-font-family: "DM Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

/* 10b. Image-wrapper anchors strip default link blue.
 * <a class="kh-splide__card-image"> wraps an image with a positioned
 * sale-badge span inside. The link inherits #2872fa from default
 * <a> styling — invisible at rest (no text child) but leaks via
 * focus rings and any future inline text. */
body.kh-child-active a.kh-splide__card-image {
	color: inherit;
}

/* 10c. Product carousel card title — DESIGN.md Title role.
 * Spec calls for weight 700 in DM Sans. Existing rule was 500 and
 * had no font-family, so it fell back to body's broken cascade. */
body.kh-child-active .kh-product-slider .kh-splide__card-title,
body.kh-child-active .kh-product-slider .kh-splide__card-title a {
	font-family: "DM Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif !important;
	font-weight: 700 !important;
}

/* 10d. Footer outer band — let the inner pattern paint the whole footer.
 * The inner block-group is dark (primary #313131); the outer <footer>
 * was cool grey #f2f5f7 (Blocksy default) leaving a cold strip around
 * the warm-palette band. Strip the outer bg. */
body.kh-child-active footer.ct-footer.kh-footer {
	background: transparent !important;
}

/* 10e. Homepage No-Pure-White Rule — page-level surface sections inherit
 * Warm Neutral. Pattern files now use warm-neutral directly (catches
 * future renders); this rule catches block markup already inlined to
 * the page at save time. */
body.home .wp-block-group.alignfull.has-surface-background-color {
	background-color: #faf6f2 !important;
}

/* 10f. WooCommerce .onsale badge — Blocksy native CSS variables.
 * 2026-05-23: Originally a 25-line `.onsale { ...!important }` block.
 * Migrated to Blocksy's documented CSS-variable contract:
 *   --badge-background-color, --badge-text-color, --badge-radius,
 *   --badge-padding.
 * Theme_mods saleBadgeColor / product_badge_font / sale_badge_default_value
 * are also set in the DB (Customizer → WooCommerce → Product Badges) so
 * future Customizer edits override these CSS values automatically. We seed
 * here because Blocksy's dynamic-CSS pipeline only regenerates when the
 * Customizer is opened + saved interactively — not from set_theme_mod()
 * calls. This belt-and-suspenders approach renders correctly out of the
 * box AND respects whatever the user sets in Customizer later. */
body.kh-child-active {
	--badge-background-color: #c12e6f;
	--badge-text-color: #ffffff;
}
/* Variables set at the element scope — Blocksy sets --badge-radius
 * directly on [data-shape] so we must match that scope to win the
 * cascade. Custom properties resolve by the nearest defining scope,
 * not by selector specificity. */
body.kh-child-active .onsale,
body.kh-child-active [class*="ct-woo-badge-"] {
	--badge-radius: 100px;
	--badge-padding: 4px 12px;
	--badge-min-width: auto;
	--badge-height: auto;
	font-family: "DM Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
	font-weight: 700;
	font-size: 0.7rem;
	letter-spacing: 0.08em;
	text-transform: uppercase;
	line-height: 1.4;
}
