/*
 * STORE APP Patch 407
 * Final catalog/contact/product-detail contrast corrections.
 * Loaded after Patches 403-406. Permanent storefront surfaces are graphite;
 * product image wells and actual overlay/modal surfaces remain white.
 */
body.site-masterpalm.masterpalm-store-dark{
  --mp407-deep:#0B1015;
  --mp407-panel:#171D24;
  --mp407-raised:#202730;
  --mp407-hover:#2A333D;
  --mp407-border:#3B4652;
  --mp407-text:#FFFFFF;
  --mp407-muted:#C2CAD3;
  --mp407-red:#B8001F;
}

/* /product and /products: remove legacy white/yellow category rows. */
body.site-masterpalm.masterpalm-store-dark #site-main .mpb2b-filter-panel,
body.site-masterpalm.masterpalm-store-dark #site-main .mpb2b-filter-title,
body.site-masterpalm.masterpalm-store-dark #site-main .mpb2b-filter-group,
body.site-masterpalm.masterpalm-store-dark #site-main .mpb2b-category-tree,
body.site-masterpalm.masterpalm-store-dark #site-main .mpb2b-category-tree-list,
body.site-masterpalm.masterpalm-store-dark #site-main .mpb2b-category-tree-node,
body.site-masterpalm.masterpalm-store-dark #site-main .mpb2b-category-tree-row,
body.site-masterpalm.masterpalm-store-dark #site-main .mpb2b-category-tree-fallback,
body.site-masterpalm.masterpalm-store-dark #site-main .mpb2b-category-tree-fallback .mpb2b-category-tree-link,
body.site-masterpalm.masterpalm-store-dark #site-main .mpb2b-category-tree-all,
body.site-masterpalm.masterpalm-store-dark #site-main .mpb2b-category-tree-link,
body.site-masterpalm.masterpalm-store-dark #site-main .mpb2b-category-tree-toggle{
  background:var(--mp407-deep)!important;
  color:var(--mp407-text)!important;
  border-color:var(--mp407-border)!important;
  box-shadow:none!important;
}
body.site-masterpalm.masterpalm-store-dark #site-main .mpb2b-filter-title strong,
body.site-masterpalm.masterpalm-store-dark #site-main .mpb2b-filter-group h3,
body.site-masterpalm.masterpalm-store-dark #site-main .mpb2b-category-tree-all,
body.site-masterpalm.masterpalm-store-dark #site-main .mpb2b-category-tree-link,
body.site-masterpalm.masterpalm-store-dark #site-main .mpb2b-category-tree-link span,
body.site-masterpalm.masterpalm-store-dark #site-main .mpb2b-category-tree-toggle i{
  color:var(--mp407-text)!important;
}
body.site-masterpalm.masterpalm-store-dark #site-main .mpb2b-category-tree-row:hover,
body.site-masterpalm.masterpalm-store-dark #site-main .mpb2b-category-tree-all:hover,
body.site-masterpalm.masterpalm-store-dark #site-main .mpb2b-category-tree-link:hover,
body.site-masterpalm.masterpalm-store-dark #site-main .mpb2b-category-tree-toggle:hover,
body.site-masterpalm.masterpalm-store-dark #site-main .mpb2b-category-tree-all:focus-visible,
body.site-masterpalm.masterpalm-store-dark #site-main .mpb2b-category-tree-link:focus-visible,
body.site-masterpalm.masterpalm-store-dark #site-main .mpb2b-category-tree-toggle:focus-visible{
  background:var(--mp407-hover)!important;
  color:var(--mp407-text)!important;
  border-color:#596572!important;
}
body.site-masterpalm.masterpalm-store-dark #site-main .mpb2b-category-tree-all.is-active,
body.site-masterpalm.masterpalm-store-dark #site-main .mpb2b-category-tree-link.is-active,
body.site-masterpalm.masterpalm-store-dark #site-main .mpb2b-category-tree-all.is-active span,
body.site-masterpalm.masterpalm-store-dark #site-main .mpb2b-category-tree-link.is-active span{
  background:var(--mp407-red)!important;
  border-color:var(--mp407-red)!important;
  color:#FFFFFF!important;
}
body.site-masterpalm.masterpalm-store-dark #site-main .mpb2b-category-tree-children{
  border-left-color:var(--mp407-border)!important;
}

/* Product count/sort bar. */
body.site-masterpalm.masterpalm-store-dark #site-main .mpb2b-results-bar,
body.site-masterpalm.masterpalm-store-dark #site-main .mp-product-results-head,
body.site-masterpalm.masterpalm-store-dark #site-main .mp-catalog-results-count{
  background:var(--mp407-raised)!important;
  color:var(--mp407-text)!important;
  border-color:var(--mp407-border)!important;
  box-shadow:none!important;
}
body.site-masterpalm.masterpalm-store-dark #site-main .mpb2b-results-bar :where(span,strong,small),
body.site-masterpalm.masterpalm-store-dark #site-main .mp-product-results-head :where(span,strong,small){
  color:var(--mp407-text)!important;
}

/* Full-width product-card RFQ action. Win over Patch 338's #site-main rule. */
body.site-masterpalm.masterpalm-store-dark #site-main button.mpb2b-quote-check.mpb2b-rfq-button,
body.site-masterpalm.masterpalm-store-dark #site-main .mpb2b-product-card .mpb2b-rfq-button{
  background:#29323C!important;
  color:#FFFFFF!important;
  border-color:#596572!important;
  box-shadow:none!important;
}
body.site-masterpalm.masterpalm-store-dark #site-main button.mpb2b-quote-check.mpb2b-rfq-button :where(i,span,small){
  color:#FFFFFF!important;
}
body.site-masterpalm.masterpalm-store-dark #site-main button.mpb2b-quote-check.mpb2b-rfq-button:hover,
body.site-masterpalm.masterpalm-store-dark #site-main button.mpb2b-quote-check.mpb2b-rfq-button:focus-visible,
body.site-masterpalm.masterpalm-store-dark #site-main button.mpb2b-quote-check.mpb2b-rfq-button.is-added{
  background:var(--mp407-red)!important;
  color:#FFFFFF!important;
  border-color:var(--mp407-red)!important;
}

/* Breadcrumbs on category/catalog pages must remain legible. */
body.site-masterpalm.masterpalm-store-dark #site-main :where(
  .mpb2b-breadcrumb,.mp-category-breadcrumb,.mp-collection-breadcrumb,
  .ses-breadcrumb,.breadcrumb
),
body.site-masterpalm.masterpalm-store-dark #site-main :where(
  .mpb2b-breadcrumb,.mp-category-breadcrumb,.mp-collection-breadcrumb,
  .ses-breadcrumb,.breadcrumb
) :where(a,span,li,.breadcrumb-item,.breadcrumb-item::before){
  color:var(--mp407-text)!important;
}
body.site-masterpalm.masterpalm-store-dark #site-main :where(
  .mpb2b-breadcrumb,.mp-category-breadcrumb,.mp-collection-breadcrumb,
  .ses-breadcrumb,.breadcrumb
) a:hover{color:#F04962!important}

/* Product-detail specification table: both label and value cells graphite. */
body.site-masterpalm.masterpalm-store-dark #site-main .mpb2b-spec-table,
body.site-masterpalm.masterpalm-store-dark #site-main .mpb2b-spec-table tbody,
body.site-masterpalm.masterpalm-store-dark #site-main .mpb2b-spec-table tr,
body.site-masterpalm.masterpalm-store-dark #site-main .mpb2b-spec-table td,
body.site-masterpalm.masterpalm-store-dark #site-main .mpb2b-spec-table td:first-child,
body.site-masterpalm.masterpalm-store-dark #site-main .mpb2b-spec-table td:nth-child(2),
body.site-masterpalm.masterpalm-store-dark #site-main .mpb2b-spec-table td:not(:first-child),
body.site-masterpalm.masterpalm-store-dark #site-main .mpb2b-specification-html table,
body.site-masterpalm.masterpalm-store-dark #site-main .mpb2b-specification-html tr,
body.site-masterpalm.masterpalm-store-dark #site-main .mpb2b-specification-html td,
body.site-masterpalm.masterpalm-store-dark #site-main .mpb2b-specification-html th{
  background:var(--mp407-panel)!important;
  color:var(--mp407-text)!important;
  border-color:var(--mp407-border)!important;
}
body.site-masterpalm.masterpalm-store-dark #site-main .mpb2b-spec-table td:first-child,
body.site-masterpalm.masterpalm-store-dark #site-main .mpb2b-specification-html th{
  background:var(--mp407-raised)!important;
}

/* Contact page hero/header and permanent console headers. */
body.site-masterpalm.masterpalm-store-dark.mp-contact-page #site-main .mp-industrial-contact,
body.site-masterpalm.masterpalm-store-dark.mp-contact-page #site-main .mp-contact-hero,
body.site-masterpalm.masterpalm-store-dark.mp-contact-page #site-main .mp-contact-hero-inner,
body.site-masterpalm.masterpalm-store-dark.mp-contact-page #site-main .mp-contact-workspace,
body.site-masterpalm.masterpalm-store-dark.mp-contact-page #site-main .mp-contact-shell,
body.site-masterpalm.masterpalm-store-dark.mp-contact-page #site-main .mp-contact-body,
body.site-masterpalm.masterpalm-store-dark.mp-contact-page #site-main .mp-branch-console,
body.site-masterpalm.masterpalm-store-dark.mp-contact-page #site-main .mp-inquiry-console,
body.site-masterpalm.masterpalm-store-dark.mp-contact-page #site-main .mp-console-head,
body.site-masterpalm.masterpalm-store-dark.mp-contact-page #site-main .mp-map-plate__head{
  background-color:var(--mp407-deep)!important;
  color:var(--mp407-text)!important;
  border-color:var(--mp407-border)!important;
}
/* Preserve configured hero photography while enforcing its graphite overlay. */
body.site-masterpalm.masterpalm-store-dark.mp-contact-page #site-main .mp-contact-hero{
  background-image:linear-gradient(90deg,rgba(5,7,9,.96) 0%,rgba(5,7,9,.87) 48%,rgba(5,7,9,.62) 100%),var(--mp-contact-hero-image,linear-gradient(135deg,#171D24,#0B1015))!important;
  background-size:cover!important;
  background-position:center!important;
}
body.site-masterpalm.masterpalm-store-dark.mp-contact-page #site-main :where(
  .mp-contact-title,.mp-contact-lead,.mp-contact-lead strong,
  .mp-contact-breadcrumb,.mp-contact-breadcrumb a,.mp-contact-breadcrumb span,
  .mp-console-head h2,.mp-console-head span,.mp-map-plate__head,
  .mp-map-plate__head span,.mp-map-plate__head a
){color:var(--mp407-text)!important}
