/*
 * STORE APP Patch 404
 * Graphite surface and contrast polish for Patch 403.
 * Most permanent storefront surfaces are graphite. Product image wells and
 * temporary popup layers intentionally remain white.
 */

body.masterpalm-store-dark{
  --mp404-page:#0F141A;
  --mp404-deep:#10151B;
  --mp404-panel:#171D24;
  --mp404-raised:#202730;
  --mp404-hover:#2A333D;
  --mp404-border:#3B4652;
  --mp404-text:#FFFFFF;
  --mp404-muted:#C2CAD3;
  --mp404-red:#B8001F;
}

/* Permanent page canvas and content wrappers. */
body.site-masterpalm.masterpalm-store-white.masterpalm-store-dark,
body.site-masterpalm.masterpalm-store-white.masterpalm-store-dark #site-main,
body.site-masterpalm.masterpalm-store-white.masterpalm-store-dark #site-main > section,
body.site-masterpalm.masterpalm-store-white.masterpalm-store-dark #site-main > article,
body.site-masterpalm.masterpalm-store-white.masterpalm-store-dark #site-main > div,
body.site-masterpalm.masterpalm-store-white.masterpalm-store-dark #site-main :where(
  .mp-section,
  .mp-section-dark,
  .mp-collection-page,
  .mp-collection-page-white,
  .mp-category-product-page,
  .mp-category-layout,
  .mp-category-main,
  .mp-category-copy,
  .mp-product-results,
  .mp-product-results-head,
  .mp-related-collections,
  .mp-product-page,
  .mp-product-catalog-page,
  .mpb2b-catalog-page,
  .mpb2b-product-detail,
  .mpb2b-home-products,
  .mpb2b-section,
  .mp-home-services,
  .mp-technology-section,
  .mp-content-block,
  .mp-section-block,
  .mp-information-section,
  .mp-service-section,
  .ses-inner-page,
  .ses-inner-container,
  .ses-inner-content,
  .ses-inner-copy,
  .ses-richtext,
  .ses-article-body,
  .content-page,
  .page-content,
  .information-page,
  .policy-page,
  .service-page,
  .news-page,
  .career-page
){
  background-color:var(--mp404-page)!important;
  color:var(--mp404-text)!important;
  border-color:var(--mp404-border)!important;
}

/* Permanent cards/panels use graphite, never white. */
body.site-masterpalm.masterpalm-store-white.masterpalm-store-dark #site-main :where(
  .card,
  .card-body,
  .card-header,
  .card-footer,
  .list-group,
  .list-group-item,
  .accordion-item,
  .accordion-header,
  .accordion-button,
  .mp-category-sidebar,
  .mp-product-category-sidebar,
  .mp-category-nav,
  .mp-category-nav-root,
  .mp-category-nav-children,
  .mp-catalog-filter-panel,
  .mp-catalog-filter-head,
  .mp-sidebar-quote,
  .mp-quote-strip,
  .mp-mini-feature-strip,
  .mp-mini-feature-strip > article,
  .mp-mini-feature-strip > div,
  .mp-product-list-card,
  .mp-product-list-body,
  .mpb2b-product-card,
  .mpb2b-product-body,
  .mp-promo-product-card,
  .mp-promo-product-card__body,
  .mpb2b-buybox,
  .mpb2b-benefit-card,
  .mpb2b-moq,
  .mpb2b-volume-card,
  .mpb2b-detail-spec-row,
  .mpb2b-feature-application-card,
  .mpb2b-extra-specifications,
  .mpb2b-specification-unified,
  .mpb2b-specification-html,
  .mpb2b-cart-main,
  .mpb2b-cart-total,
  .mpb2b-checkout-main,
  .mpb2b-checkout-summary,
  .mpb2b-summary-card,
  .mp-home-service-card,
  .mp-technology-card,
  .mp-information-card,
  .mp-service-card,
  .mp-service-detail-card,
  .ses-inner-tile,
  .ses-list-card,
  .ses-card,
  .mp-account-card,
  .mp-account-card__body,
  .mp-response-card,
  .mp-branch-console,
  .mp-inquiry-console,
  .mp-branch-list,
  .mp-form-grid,
  .mp-branch-card,
  .mp-contact-office-credential,
  .mp-map-plate,
  .mp-contact-feature,
  .mp-contact-feature-strip
){
  background:var(--mp404-panel)!important;
  color:var(--mp404-text)!important;
  border-color:var(--mp404-border)!important;
  box-shadow:none!important;
}

/* White/light Bootstrap utility classes must not create white islands. */
body.site-masterpalm.masterpalm-store-white.masterpalm-store-dark #site-main :where(.bg-white,.bg-light,.bg-body,.bg-body-secondary,.bg-body-tertiary){
  background:var(--mp404-panel)!important;
  color:var(--mp404-text)!important;
}

/* White primary text on every permanent graphite surface. */
body.site-masterpalm.masterpalm-store-white.masterpalm-store-dark #site-main :where(
  h1,h2,h3,h4,h5,h6,p,li,dt,dd,label,legend,strong,b,em,
  .text-dark,.text-body,.text-body-emphasis,
  .mp-section-title h2,.mp-section-title p,
  .mp-category-copy h1,.mp-category-copy h2,.mp-category-copy h3,.mp-category-copy p,
  .mp-product-list-body h2,.mp-product-list-body h3,.mp-product-list-body p,
  .mp-quote-strip strong,.mp-quote-strip p,.mp-quote-strip span,
  .mp-mini-feature-strip strong,.mp-mini-feature-strip span,
  .mp-sidebar-quote strong,.mp-sidebar-quote span
){
  color:var(--mp404-text)!important;
}
body.site-masterpalm.masterpalm-store-white.masterpalm-store-dark #site-main :where(.text-muted,small,.small,.mp-muted,.mpb2b-muted){
  color:var(--mp404-muted)!important;
}

/* Tool Collections page: correct the two remaining white/black blocks. */
body.site-masterpalm.masterpalm-store-white.masterpalm-store-dark.mp-tool-collections-page #site-main .mp-collection-page-white{
  background:var(--mp404-page)!important;
  color:var(--mp404-text)!important;
}
body.site-masterpalm.masterpalm-store-white.masterpalm-store-dark.mp-tool-collections-page #site-main .mp-quote-strip{
  background:var(--mp404-panel)!important;
  color:var(--mp404-text)!important;
  border:1px solid var(--mp404-border)!important;
  box-shadow:none!important;
}
body.site-masterpalm.masterpalm-store-white.masterpalm-store-dark.mp-tool-collections-page #site-main .mp-quote-strip :where(strong,p,span){
  color:var(--mp404-text)!important;
}
body.site-masterpalm.masterpalm-store-white.masterpalm-store-dark.mp-tool-collections-page #site-main .mp-quote-strip a{
  background:var(--mp404-red)!important;
  border:1px solid var(--mp404-red)!important;
  color:#FFFFFF!important;
}
body.site-masterpalm.masterpalm-store-white.masterpalm-store-dark.mp-tool-collections-page #site-main .mp-mini-feature-strip{
  background:var(--mp404-panel)!important;
  border:1px solid var(--mp404-border)!important;
  box-shadow:none!important;
}
body.site-masterpalm.masterpalm-store-white.masterpalm-store-dark.mp-tool-collections-page #site-main .mp-mini-feature-strip > :where(article,div){
  background:var(--mp404-panel)!important;
  color:var(--mp404-text)!important;
  border-color:var(--mp404-border)!important;
}
body.site-masterpalm.masterpalm-store-white.masterpalm-store-dark.mp-tool-collections-page #site-main .mp-mini-feature-strip :where(strong,span){
  color:var(--mp404-text)!important;
}
body.site-masterpalm.masterpalm-store-white.masterpalm-store-dark.mp-tool-collections-page #site-main .mp-mini-feature-strip i{
  color:#F04962!important;
}

/* Category/product-list left navigation: one coherent graphite surface. */
body.site-masterpalm.masterpalm-store-white.masterpalm-store-dark.mp-category-detail-page #site-main .mp-category-sidebar,
body.site-masterpalm.masterpalm-store-white.masterpalm-store-dark.mp-category-detail-page #site-main .mp-product-category-sidebar,
body.site-masterpalm.masterpalm-store-white.masterpalm-store-dark.mp-category-detail-page #site-main .mp-category-nav,
body.site-masterpalm.masterpalm-store-white.masterpalm-store-dark.mp-category-detail-page #site-main .mp-category-nav-root,
body.site-masterpalm.masterpalm-store-white.masterpalm-store-dark.mp-category-detail-page #site-main .mp-category-nav-children{
  background:var(--mp404-deep)!important;
  color:var(--mp404-text)!important;
  border-color:var(--mp404-border)!important;
}
body.site-masterpalm.masterpalm-store-white.masterpalm-store-dark.mp-category-detail-page #site-main .mp-category-nav-children{
  border-left-color:#596572!important;
}
body.site-masterpalm.masterpalm-store-white.masterpalm-store-dark.mp-category-detail-page #site-main .mp-category-nav-row{
  background:transparent!important;
  gap:0!important;
}
body.site-masterpalm.masterpalm-store-white.masterpalm-store-dark.mp-category-detail-page #site-main .mp-category-nav-row > a,
body.site-masterpalm.masterpalm-store-white.masterpalm-store-dark.mp-category-detail-page #site-main .mp-category-nav-toggle{
  background:var(--mp404-panel)!important;
  color:var(--mp404-text)!important;
  border-color:var(--mp404-border)!important;
  border-radius:0!important;
}
body.site-masterpalm.masterpalm-store-white.masterpalm-store-dark.mp-category-detail-page #site-main .mp-category-nav-row > a{
  border-right:0!important;
}
body.site-masterpalm.masterpalm-store-white.masterpalm-store-dark.mp-category-detail-page #site-main .mp-category-nav-row:hover > a,
body.site-masterpalm.masterpalm-store-white.masterpalm-store-dark.mp-category-detail-page #site-main .mp-category-nav-row:hover > .mp-category-nav-toggle,
body.site-masterpalm.masterpalm-store-white.masterpalm-store-dark.mp-category-detail-page #site-main .mp-category-nav-row > a:focus-visible,
body.site-masterpalm.masterpalm-store-white.masterpalm-store-dark.mp-category-detail-page #site-main .mp-category-nav-row > a.is-active{
  background:var(--mp404-red)!important;
  color:#FFFFFF!important;
  border-color:var(--mp404-red)!important;
}
body.site-masterpalm.masterpalm-store-white.masterpalm-store-dark.mp-category-detail-page #site-main .mp-sidebar-quote{
  background:var(--mp404-panel)!important;
  border-color:var(--mp404-border)!important;
  border-left-color:var(--mp404-red)!important;
  color:var(--mp404-text)!important;
}
body.site-masterpalm.masterpalm-store-white.masterpalm-store-dark.mp-category-detail-page #site-main .mp-sidebar-quote :where(strong,span){
  color:var(--mp404-text)!important;
}

/* Product/card image wells are intentionally white for clean product photography. */
body.site-masterpalm.masterpalm-store-white.masterpalm-store-dark #site-main :where(
  .mpb2b-product-media,
  .mpb2b-product-media-empty,
  .mp-product-list-media,
  .ses-list-card__media,
  .mp-promo-product-card__media,
  .mp-product-main-image,
  .mp-product-thumb,
  .mp-product-gallery-panel .mpb2b-gallery-main,
  .mpb2b-gallery-main,
  .mpb2b-gallery-main--empty,
  .mpb2b-thumb,
  .mpb2b-cart-img,
  .mpb2b-cart-img-empty,
  .mp-related-card .mp-related-card__media,
  .mp-related-card > img
){
  background-color:#FFFFFF!important;
  border-color:#D6DCE2!important;
  color:#29323D!important;
}
body.site-masterpalm.masterpalm-store-white.masterpalm-store-dark #site-main :where(
  .mpb2b-product-media,
  .mpb2b-product-media-empty,
  .mp-product-list-media,
  .ses-list-card__media,
  .mp-promo-product-card__media,
  .mp-product-main-image,
  .mpb2b-gallery-main,
  .mpb2b-gallery-main--empty,
  .mpb2b-thumb,
  .mpb2b-cart-img,
  .mpb2b-cart-img-empty
) :where(span,small,strong){
  color:#29323D!important;
}

/* RFQ actions on product cards: graphite with white text, red only on hover. */
body.site-masterpalm.masterpalm-store-white.masterpalm-store-dark #site-main :where(
  .mp-quote-square-button,
  .mp-rfq-square-button,
  .mpb2b-price-hidden-actions > a,
  .mp-product-list-actions > a.mp-quote-square-button,
  .mp-product-list-actions > a[href*="request-quote"],
  .mpb2b-card-actions > a[href*="request-quote"]
){
  background:#2A323B!important;
  border-color:#596572!important;
  color:#FFFFFF!important;
}
body.site-masterpalm.masterpalm-store-white.masterpalm-store-dark #site-main :where(
  .mp-quote-square-button,
  .mp-rfq-square-button,
  .mpb2b-price-hidden-actions > a,
  .mp-product-list-actions > a.mp-quote-square-button,
  .mp-product-list-actions > a[href*="request-quote"],
  .mpb2b-card-actions > a[href*="request-quote"]
):hover,
body.site-masterpalm.masterpalm-store-white.masterpalm-store-dark #site-main :where(
  .mp-quote-square-button,
  .mp-rfq-square-button,
  .mpb2b-price-hidden-actions > a,
  .mp-product-list-actions > a.mp-quote-square-button,
  .mp-product-list-actions > a[href*="request-quote"],
  .mpb2b-card-actions > a[href*="request-quote"]
):focus-visible{
  background:var(--mp404-red)!important;
  border-color:var(--mp404-red)!important;
  color:#FFFFFF!important;
}
body.site-masterpalm.masterpalm-store-white.masterpalm-store-dark #site-main :where(.mp-quote-square-button,.mp-rfq-square-button) i{
  color:inherit!important;
}

/* B2B desktop dropdown: dark panel and a hover fill spanning the complete row. */
body.masterpalm-store-dark .mpb2b-nav-submenu{
  padding:0!important;
  background:var(--mp404-deep)!important;
  border-color:var(--mp404-border)!important;
  border-top-color:var(--mp404-red)!important;
  overflow:visible;
}
body.masterpalm-store-dark .mpb2b-nav-submenu .mpb2b-nav-item-row{
  display:flex!important;
  width:100%!important;
  gap:0!important;
  background:transparent!important;
  border-bottom:1px solid var(--mp404-border)!important;
}
body.masterpalm-store-dark .mpb2b-nav-submenu .mpb2b-nav-item-row > a,
body.masterpalm-store-dark .mpb2b-nav-submenu .mpb2b-nav-item-row > .mpb2b-submenu-toggle{
  margin:0!important;
  background:transparent!important;
  color:var(--mp404-text)!important;
  border:0!important;
  border-radius:0!important;
  box-shadow:none!important;
}
body.masterpalm-store-dark .mpb2b-nav-submenu .mpb2b-nav-item-row > .mpb2b-submenu-toggle{
  border-left:1px solid var(--mp404-border)!important;
}
body.masterpalm-store-dark .mpb2b-nav-submenu .mpb2b-nav-item-row:hover,
body.masterpalm-store-dark .mpb2b-nav-submenu .mpb2b-nav-item-row:focus-within{
  background:var(--mp404-hover)!important;
  box-shadow:inset 4px 0 0 var(--mp404-red)!important;
}
body.masterpalm-store-dark .mpb2b-nav-submenu .mpb2b-nav-item-row:hover > a,
body.masterpalm-store-dark .mpb2b-nav-submenu .mpb2b-nav-item-row:hover > .mpb2b-submenu-toggle,
body.masterpalm-store-dark .mpb2b-nav-submenu .mpb2b-nav-item-row:focus-within > a,
body.masterpalm-store-dark .mpb2b-nav-submenu .mpb2b-nav-item-row:focus-within > .mpb2b-submenu-toggle{
  background:transparent!important;
  color:#FFFFFF!important;
}

/* Legacy navigation follows the same full-row hover model. */
body.masterpalm-store-dark .mp-submenu{
  padding:0!important;
  background:var(--mp404-deep)!important;
  border-color:var(--mp404-border)!important;
}
body.masterpalm-store-dark .mp-submenu > .mp-nav-item > .mp-nav-link-row{
  width:100%;
  gap:0;
  border-bottom:1px solid var(--mp404-border)!important;
}
body.masterpalm-store-dark .mp-submenu .mp-nav-link,
body.masterpalm-store-dark .mp-submenu .mp-sub-toggle{
  margin:0!important;
  background:transparent!important;
  color:var(--mp404-text)!important;
  border-radius:0!important;
}
body.masterpalm-store-dark .mp-submenu > .mp-nav-item > .mp-nav-link-row:hover,
body.masterpalm-store-dark .mp-submenu > .mp-nav-item > .mp-nav-link-row:focus-within{
  background:var(--mp404-hover)!important;
  box-shadow:inset 4px 0 0 var(--mp404-red)!important;
}

/* Popup layers remain the only general white UI surfaces. */
body.masterpalm-store-dark :where(
  .modal-content,.modal-header,.modal-body,.modal-footer,
  .popover,.toast,.dropdown-menu,
  .offcanvas,.offcanvas-header,.offcanvas-body,
  .ses-translate-panel,.ses-language-menu,
  .newsletter-popup,.cookie-preferences-modal
){
  background:#FFFFFF!important;
  color:#17202B!important;
  border-color:#D3D9E0!important;
  color-scheme:light;
}
body.masterpalm-store-dark :where(
  .modal-content,.popover,.toast,.dropdown-menu,.offcanvas,
  .ses-translate-panel,.ses-language-menu,.newsletter-popup,.cookie-preferences-modal
) :where(h1,h2,h3,h4,h5,h6,p,span,small,strong,b,label,a,li){
  color:#17202B!important;
}
body.masterpalm-store-dark .dropdown-item:hover,
body.masterpalm-store-dark .dropdown-item:focus,
body.masterpalm-store-dark .ses-language-option:hover,
body.masterpalm-store-dark .ses-language-option.is-active{
  background:#EEF1F4!important;
  color:var(--mp404-red)!important;
}

/* Product video remains black, overriding the general white modal rule. */
body.masterpalm-store-dark .mpb2b-video-modal :where(.modal-content,.modal-header,.modal-body,.modal-footer){
  background:#07090C!important;
  color:#FFFFFF!important;
  border-color:var(--mp404-border)!important;
}
body.masterpalm-store-dark .mpb2b-video-modal :where(h1,h2,h3,h4,h5,h6,p,span,small,strong,b,label,a){
  color:#FFFFFF!important;
}

@media(max-width:900px){
  body.masterpalm-store-dark .mpb2b-nav-submenu,
  body.masterpalm-store-dark .mp-submenu{
    background:var(--mp404-deep)!important;
  }
}
