/* Non-home visual refinement. Fresh production baseline verified 2026-11-04.
 * Intended asset: ty-product-collections/assets/ty-nonhome-refinement.css.
 * Two PHP gates: !is_front_page() when adding body class AND enqueueing.
 * CSS gate on every rule: body.ty-nonhome-refinement:not(.home).
 * No @font-face, font, size, spacing, layout, display/hiding, image or JS edits.
 * Confirmed decorative DOM nodes are removed by their exact PHP owner instead.
 * Existing commerce badges/selected/disabled/focus states and legal notices stay.
 */

/* 1. Existing paper variables: white canvas, neutral separator only. */
body.ty-nonhome-refinement:not(.home) {
  --ty-page-paper: #fff;
  --ty-paper: #fff;
  --ty-white: #fff;
  --ty-lime: #fff;
  --ty-sport: #fff;
  --ty-open: #fff;
  --ty-focus: #fff;
  --ty-line: #e5e7eb;
  --ty-commerce-paper: #fff;
  --ty-commerce-surface: #fff;
  --ty-commerce-line: #e5e7eb;
  --ty-checkout-canvas: #fff;
  --ty-checkout-summary: #fff;
  --ty-checkout-rule: #e5e7eb;
  background-color: #fff;
}
body.ty-nonhome-refinement:not(.home) :is(#page, .site-content, .ty-commerce-page-intro) {
  background-color: #fff !important;
}
body.ty-nonhome-refinement:not(.home).ty-commerce-shell #content {
  background-color: #fff !important;
}

/* 2. Component declarations are closer than body; repeat only paper/line tokens. */
body.ty-nonhome-refinement:not(.home) .ty-storefront {
  --ty-store-paper: #fff;
  --ty-home-paper: #fff;
  --ty-home-raised: #fff;
  --ty-home-sage: #fff;
  --ty-home-line: #e5e7eb;
}
body.ty-nonhome-refinement:not(.home) .ty-store-route { --ty-route-paper: #fff; }
body.ty-nonhome-refinement:not(.home) .ty-product-media-story { --ty-media-paper: #fff; }
body.ty-nonhome-refinement:not(.home) .ty-ai-glasses-page {
  --ty-ai-paper: #fff;
  --ty-ai-paper-deep: #fff;
  --ty-ai-line: #e5e7eb;
}
body.ty-nonhome-refinement:not(.home) .ty-guides {
  --ty-guides-paper: #fff;
  --ty-guides-raised: #fff;
  --ty-guides-sage: #fff;
  --ty-guides-line: #e5e7eb;
}
body.ty-nonhome-refinement:not(.home).single-product.ty-managed-product {
  --ty-pdp-paper: #fff;
  --ty-pdp-panel: #fff;
  --ty-pdp-line: #e5e7eb;
}
/* Do not change commerce-soft/pdp-soft globally: these also style live state cues. */

/* 3. Header/menu cleanup is background/border only. Original dimensions, fonts,
 * logo, language/currency controls, hover/expanded/focus states remain owned. */
body.ty-nonhome-refinement:not(.home).ty-unified-shell .ty-site-navigation {
  --ty-header-paper: #fff;
  --ty-header-line: #e5e7eb;
}
body.ty-nonhome-refinement:not(.home).ty-unified-shell .ty-site-navigation :is(
  .ty-header, .ty-locale-tools, .ty-mega-menu, .ty-mega-column, .ty-mega-feature,
  .ty-menu-drawer
) {
  background: #fff !important;
}
body.ty-nonhome-refinement:not(.home).ty-unified-shell .ty-menu-drawer__head {
  background: #fff;
  border-bottom-color: #e5e7eb;
}
/* Existing drawer header originally has a dark surface and white close glyph.
 * Pair the now-white surface with its original dark-ink text; no control changes. */
body.ty-nonhome-refinement:not(.home).ty-unified-shell .ty-menu-drawer__head > a,
body.ty-nonhome-refinement:not(.home).ty-unified-shell .ty-menu-drawer__head button {
  color: #17231c;
}
body.ty-nonhome-refinement:not(.home) .ty-site-breadcrumb {
  background: #fff !important;
  border-bottom-color: #e5e7eb;
}
body.ty-nonhome-refinement:not(.home) .ty-site-footer[data-ty-footer-owner="product-collections"] {
  background: #fff !important;
  border-top-color: #e5e7eb;
}
body.ty-nonhome-refinement:not(.home) .ty-site-footer[data-ty-footer-owner="product-collections"] a:focus-visible {
  box-shadow: 0 0 0 6px #fff;
}

/* 4. Explicit content panel surfaces. Background shorthand removes the existing
 * decorative container gradients; no img/video pixels, media opacity or filters. */
body.ty-nonhome-refinement:not(.home) :is(
  .ty-route-hero, .ty-route-journey, .ty-route-media,
  .ty-pdp .purchase, .ty-pdp .gallery-stage, .ty-pdp .gallery-stage img,
  .ty-all-products, .ty-catalog-photo, .ty-catalog-empty, .ty-inline-catalog-empty,
  .ty-catalog-story, .ty-catalog-image, .ty-model-image, .ty-catalog-help,
  .ty-ai-glasses-copy, .ty-ai-glasses-proof, .ty-ai-product-card,
  .ty-ai-product-media figure, .ty-ai-compare-scroll,
  .ty-ai-compare thead th, .ty-ai-compare tbody th, .ty-ai-compare tfoot th,
  .ty-ai-moment-browser, .ty-ai-moment-panel figcaption, .ty-ai-capability-grid article,
  .ty-ai-support-strip, .ty-guide-topic__media, .ty-guide-article__media,
  .ty-discount, .ty-discount__copy, .ty-error-page
) {
  background: #fff !important;
}
body.ty-nonhome-refinement:not(.home).ty-error-404 .site-content { background: #fff; }
body.ty-nonhome-refinement:not(.home).single-product.ty-managed-product :is(
  .woocommerce div.product > .woocommerce-product-gallery,
  .woocommerce-product-gallery > .woocommerce-product-gallery__wrapper,
  .woocommerce-product-gallery .flex-viewport,
  .ty-pdp-overview, .ty-product-media-grid--scenes figure, .ty-pdp-assurances
) {
  background: #fff !important;
}
/* The native product/card backgrounds may still be baked into raster pixels;
 * CSS cannot remove those honestly. Do not use filters/inversion to fake it. */

/* 5. Transaction surfaces only. No controls/field grids/order/display changes,
 * no blanket notices rule; success/info/error notice state colors are preserved. */
body.ty-nonhome-refinement:not(.home).ty-commerce-shell form.checkout_coupon {
  background-color: #fff;
}
body.ty-nonhome-refinement:not(.home).ty-commerce-checkout :is(
  .ty-header, .wcf-order-wrap, #wcf-embed-checkout-form .wcf-order-wrap
) {
  background-color: #fff;
}

/* Product overview: existing description, published facts and existing image.
 * Existing copy (heading/description/optional actual facts) then optional figure.
 * .ty-pdp-overview--enhanced only with valid figure; no image => no modifier.
 * dl.ty-pdp-overview-facts contains <=3 actual nonvariation div > dt + dd.
 * Main Woo gallery/purchase/forms unchanged; no CSS order or font-family override.
 */
body.ty-nonhome-refinement:not(.home).single-product.ty-managed-product .ty-pdp-overview.ty-pdp-overview--enhanced {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(0, .9fr);
  gap: clamp(24px, 3.4vw, 44px);
  align-items: center;
  margin-top: clamp(28px, 3.6vw, 44px);
  padding: clamp(20px, 2.8vw, 36px);
  border: 1px solid #e5e7eb;
  background: #fff;
}
body.ty-nonhome-refinement:not(.home).single-product.ty-managed-product .ty-pdp-overview-visual {
  display: grid;
  place-items: center;
  width: min(100%, 560px);
  min-width: 0;
  max-height: 420px;
  aspect-ratio: 4 / 3;
  margin: 0;
  padding: 12px;
  box-sizing: border-box;
  background: #fff;
}
body.ty-nonhome-refinement:not(.home).single-product.ty-managed-product .ty-pdp-overview-photo {
  display: block;
  width: 100%;
  height: 100%;
  max-width: 100%;
  max-height: 396px;
  object-fit: contain;
}
body.ty-nonhome-refinement:not(.home).single-product.ty-managed-product .ty-pdp-overview--enhanced > .ty-pdp-overview-copy {
  min-width: 0;
  max-width: none;
}
body.ty-nonhome-refinement:not(.home).single-product.ty-managed-product .ty-pdp-overview--enhanced > .ty-pdp-overview-copy h2 {
  max-width: 24ch;
  margin-bottom: 14px;
  font-size: clamp(24px, 2.5vw, 34px);
  line-height: 1.16;
}
body.ty-nonhome-refinement:not(.home).single-product.ty-managed-product .ty-pdp-overview-facts {
  margin: 20px 0 0;
  border-top: 1px solid #e5e7eb;
}
body.ty-nonhome-refinement:not(.home).single-product.ty-managed-product .ty-pdp-overview-facts > div {
  display: grid;
  grid-template-columns: minmax(96px, .42fr) minmax(0, .58fr);
  gap: 16px;
  padding: 12px 0;
  border-bottom: 1px solid #e5e7eb;
}
body.ty-nonhome-refinement:not(.home).single-product.ty-managed-product .ty-pdp-overview-facts dt {
  margin: 0;
  font-size: 13px;
  font-weight: 600;
  line-height: 1.5;
  letter-spacing: normal;
  text-transform: none;
  overflow-wrap: anywhere;
}
body.ty-nonhome-refinement:not(.home).single-product.ty-managed-product .ty-pdp-overview-facts dd {
  margin: 0;
  font-size: 14px;
  line-height: 1.5;
  overflow-wrap: anywhere;
}
@media (max-width: 760px) {
  body.ty-nonhome-refinement:not(.home).single-product.ty-managed-product .ty-pdp-overview.ty-pdp-overview--enhanced {
    grid-template-columns: minmax(0, 1fr);
    gap: 20px;
    padding: 20px;
  }
  body.ty-nonhome-refinement:not(.home).single-product.ty-managed-product .ty-pdp-overview-visual {
    max-height: 320px;
    margin-inline: auto;
  }
  body.ty-nonhome-refinement:not(.home).single-product.ty-managed-product .ty-pdp-overview-photo {
    max-height: 296px;
  }
}
@media (max-width: 420px) {
  body.ty-nonhome-refinement:not(.home).single-product.ty-managed-product .ty-pdp-overview-facts > div {
    grid-template-columns: minmax(80px, .42fr) minmax(0, .58fr);
    gap: 12px;
  }
}

/* Source-evidenced policy/support panel colors.
 * Owners: saved shipping/returns/contact/FAQ page styles (four embedded-style-source.txt files).
 * No typography, dimensions, layout, DOM hiding, image pixels, input behavior or JS changes.
 * The saved body.page background uses !important; later source declarations cannot win without it.
 */
body.ty-nonhome-refinement:not(.home) {
  background-color: #fff !important;
}

/* These variables must be reset on their actual owning root, not inherited from body.
 * Each existing embedded root defines its own dark canvas and light foreground palette.
 */
body.ty-nonhome-refinement:not(.home) :is(.ty-shipping, .ty-returns, .ty-contact, .ty-faq) {
  --ty-bg: #fff;
  --ty-bg-2: #fff;
  --ty-bg-soft: #fff;
  --ty-panel: #fff;
  --ty-card: #fff;
  --ty-card-2: #fff;
  --ty-light: #fff;
  --ty-text: #111827;
  --ty-ink: #111827;
  --ty-dark-ink: #111827;
  --ty-muted: #4b5563;
  --ty-border: #e5e7eb;
  --ty-line: #e5e7eb;
  --ty-aqua: #1d4ed8;
  --ty-cyan: #1d4ed8;
  --ty-orange: #1d4ed8;
  background: #fff !important;
  color: #111827;
}

/* Explicit gradients and hardcoded backgrounds, plus their confirmed content panels.
 * Do not target native WooCommerce notices, disabled states or shared header/Footer.
 */
body.ty-nonhome-refinement:not(.home) :is(.ty-shipping, .ty-returns, .ty-contact, .ty-faq) :is(
  .ty-process, .ty-glance, .ty-glance-item, .ty-step,
  .ty-table-card, .ty-table-card h3, .ty-guidance, .ty-guidance-card,
  .ty-cta, .ty-cta-inner, .ty-principles, .ty-card, .ty-hygiene-box,
  .ty-eligibility, .ty-refund, .ty-support, .ty-note, .ty-form,
  .ty-aside, .ty-jump-grid, .ty-safety, .ty-final, .ty-hero-media
) {
  background: #fff !important;
  border-color: #e5e7eb;
}
body.ty-nonhome-refinement:not(.home) .ty-faq .ty-hero::before {
  background: #fff;
}

/* Four actual hardcoded light foregrounds would become unreadable on white.
 * Variables already handle normal paragraphs; these are the specific exceptions.
 */
body.ty-nonhome-refinement:not(.home) .ty-shipping .ty-detail-intro .ty-callout,
body.ty-nonhome-refinement:not(.home) .ty-returns .ty-hygiene-list li,
body.ty-nonhome-refinement:not(.home) .ty-returns .ty-refund,
body.ty-nonhome-refinement:not(.home) .ty-contact .ty-note,
body.ty-nonhome-refinement:not(.home) .ty-faq .ty-hero-note {
  color: #374151;
}
body.ty-nonhome-refinement:not(.home) :is(.ty-shipping, .ty-returns, .ty-contact) .ty-table-card h3 {
  color: #111827;
}
body.ty-nonhome-refinement:not(.home) :is(.ty-shipping, .ty-returns, .ty-contact) :is(
  .ty-step, .ty-card, .ty-table-row, .ty-hygiene-list li
) {
  border-color: #e5e7eb;
}

/* Existing meaningful process markers stay visible. Their former dark-on-cyan
 * foreground must not become dark-on-brand-blue when the local accent is reset.
 */
body.ty-nonhome-refinement:not(.home) :is(.ty-shipping, .ty-returns, .ty-contact) .ty-number,
body.ty-nonhome-refinement:not(.home) .ty-returns .ty-steps li::before {
  background: #fff;
  color: #1d4ed8;
}

/* Existing actions retain a clear contrasting label; this scope never reaches
 * global navigation, WooCommerce purchase forms, payment or customer-account UI.
 */
body.ty-nonhome-refinement:not(.home) .ty-shipping .ty-btn,
body.ty-nonhome-refinement:not(.home) .ty-returns .ty-btn,
body.ty-nonhome-refinement:not(.home) .ty-contact .ty-btn-primary,
body.ty-nonhome-refinement:not(.home) .ty-faq .ty-button-primary {
  background: #1d4ed8;
  color: #fff;
}
body.ty-nonhome-refinement:not(.home) .ty-shipping .ty-btn:hover,
body.ty-nonhome-refinement:not(.home) .ty-returns .ty-btn:hover,
body.ty-nonhome-refinement:not(.home) .ty-contact .ty-btn-primary:hover,
body.ty-nonhome-refinement:not(.home) .ty-faq .ty-button-primary:hover {
  background: #1e40af;
  color: #fff;
}
body.ty-nonhome-refinement:not(.home) .ty-contact .ty-btn-secondary:hover {
  background: #1d4ed8;
  color: #fff;
}
body.ty-nonhome-refinement:not(.home) :is(.ty-shipping, .ty-returns, .ty-contact, .ty-faq) .ty-skip {
  background: #fff;
  color: #1d4ed8;
}

/* Audio department's actual .ty-headphone-home class, distinct from homepage V4.
 * Existing video/hero/photo overlays stay intact; these are container paper panels.
 */
body.ty-nonhome-refinement:not(.home) .ty-headphone-home :is(
  .ty-editorial-series, .ty-editorial-series article, .ty-editorial-journey figcaption
) {
  background: #fff;
  border-color: #e5e7eb;
}

/* Existing --ty-pdp-soft also controls disabled swatches, hover and launch states.
 * Override only this large neutral review surface instead of changing that token.
 */
body.ty-nonhome-refinement:not(.home).single-product.ty-managed-product #review_form_wrapper {
  background: #fff;
  border-color: #e5e7eb;
}

/* The header already exposes the real cart and quantity. On narrow product
 * pages, remove only the duplicate fixed trigger that covers purchase copy.
 * The drawer, header, full cart and every other page keep their own behavior. */
@media (max-width: 1024px) {
  body.ty-nonhome-refinement:not(.home).single-product.ty-managed-product #moderncart-floating-cart {
    display: none !important;
  }
}
