/* =========================================================
   MasterPalm global dark page shell
   Patch: 20260625 global dark inner pages

   Purpose:
   - Force all public storefront inner pages onto the MasterPalm black industrial shell.
   - Fix legacy SESRFID / Bootstrap white content surfaces on company info, policy,
     pages, news, careers, contact, category, and product listing/detail views.
   - Preserve product/image media readability while darkening text/content panels.
========================================================= */

:root{
  --mp-page-black:#050607;
  --mp-page-ink:#07090b;
  --mp-page-panel:#0d1115;
  --mp-page-panel-2:#121820;
  --mp-page-line:rgba(255,255,255,.15);
  --mp-page-line-soft:rgba(255,255,255,.09);
  --mp-page-text:#f4f5f6;
  --mp-page-muted:#c5cbd1;
  --mp-page-muted-2:#9fa8b1;
  --mp-page-red:#d71920;
}

html,
body,
#site-main{
  background:#07090b !important;
  color:var(--mp-page-text) !important;
}

body:not(.home),
body.ses-inner-page,
body.site-frontend:not(.home){
  background:
    radial-gradient(circle at 50% 0,rgba(160,165,170,.10),transparent 38%),
    linear-gradient(180deg,#0b1014 0%,#050607 46%,#07090b 100%) !important;
}

#site-main{
  min-height:60vh;
  background:
    radial-gradient(circle at 50% 0,rgba(160,165,170,.10),transparent 38%),
    linear-gradient(180deg,#0b1014 0%,#050607 46%,#07090b 100%) !important;
}

/* Inner-page wrappers: no white section backgrounds. */
#site-main :where(
  .ses-inner-content,
  .ses-inner-content--template,
  .ses-inner-content--template-fullbleed,
  .ses-inner-content--page-list,
  .ses-inner-content--career,
  .ses-inner-content--news,
  .ses-inner-content--information,
  .ses-inner-content--category,
  .ses-listing-content,
  .ses-inner-block-gallery,
  .ses-product-business-units-inner,
  .ses-news-index,
  .ses-news-detail-layout,
  .ses-news-returnbar,
  .ses-inner-related-products,
  .ses-inner-related-categories,
  .ses-inner-related-pages,
  .ses-news-linked-products,
  .ses-linked-section,
  .ses-related-section,
  .ses-career-simple-section,
  .mp-section
){
  background:transparent !important;
  color:var(--mp-page-text) !important;
}

#site-main > :where(section,div,article,main),
#site-main :where(.container,.container-fluid,.ses-inner-container,.ses-list-container,.ses-listing-container){
  color:var(--mp-page-text) !important;
}

/* Text color reset for all public page content. */
#site-main :where(
  h1,h2,h3,h4,h5,h6,
  .h1,.h2,.h3,.h4,.h5,.h6,
  .display-1,.display-2,.display-3,.display-4,.display-5,.display-6,
  .ses-listing-heading,
  .ses-page-list-title,
  .ses-news-main-heading h1,
  .ses-nyt-module-title,
  .ses-section-title,
  .ses-inner-section-title,
  .ses-inner-copy h2,
  .ses-inner-copy h3,
  .ses-inner-copy h4,
  .ses-inner-copy h5,
  .ses-inner-copy h6,
  .ses-article-body h2,
  .ses-article-body h3,
  .ses-list-card h3 a,
  .ses-list-sidebar__item h3 a,
  .ses-page-list-card__title,
  .ses-page-list-card h3,
  .ses-card-title,
  .card-title,
  .fw-semibold,
  strong
){
  color:var(--mp-page-text) !important;
}

#site-main :where(
  p,li,dd,dt,td,th,blockquote,figcaption,
  .lead,.small,.text-muted,.text-body-secondary,
  .ses-inner-copy,
  .ses-richtext,
  .ses-article-body,
  .ses-page-list-brief,
  .ses-news-main-intro,
  .ses-news-main-subtitle,
  .ses-list-card p,
  .ses-list-card__text,
  .ses-list-card__meta,
  .ses-list-sidebar__item p,
  .ses-nyt-link,
  .ses-office,
  .ses-career-simple-lead,
  .ses-career-simple-content,
  .ses-policy-card p,
  .card-text
){
  color:var(--mp-page-muted) !important;
}

#site-main :where(a):not(.btn):not(.mp-btn):not(.ses-list-card__media):not(.ses-inner-tile){
  color:#f4f5f6 !important;
}

#site-main :where(a:hover):not(.btn):not(.mp-btn):not(.ses-list-card__media):not(.ses-inner-tile){
  color:#ff343b !important;
}

#site-main :where(
  .ses-list-card__label,
  .ses-page-list-eyebrow,
  .ses-news-main-label,
  .ses-office-group-title,
  .ses-career-simple-kicker,
  .ses-section-label,
  .ses-news-meta-label,
  .ses-nyt-module-title--ruled,
  .ses-related-link-list a,
  .ses-list-card__relations a,
  .ses-list-card__relations span
){
  color:#ff343b !important;
}

/* Cards, sidebars, panels, and CMS-rendered blocks. */
#site-main :where(
  .ses-panel,
  .ses-card,
  .card,
  .card-body,
  .bg-white,
  .bg-light,
  .list-group-item,
  .accordion-item,
  .accordion-body,
  .tab-content,
  .ses-list-card,
  .ses-list-sidebar,
  .ses-page-list-card,
  .ses-career-simple-card,
  .ses-career-card,
  .ses-career-detail-card,
  .ses-news-article,
  .ses-article-body,
  .ses-nyt-module,
  .ses-nyt-rail,
  .ses-policy-shell,
  .ses-policy-card,
  .ses-ai-layout-section,
  .ses-ai-layout-lede-copy,
  .ses-ai-layout-lede,
  .ses-template-render-host,
  .ses-template-isolated,
  .ses-content-template,
  .ses-content-template .ses-mag-row,
  .ses-content-template [class*="ses-mag-layout-"],
  .ses-mag-layout-04-feature,
  .ses-mag-layout-05-split,
  .ses-mag-layout-06-gallery,
  .ses-mag-layout-07-detail,
  .ses-mag-layout-08-importance
){
  background:linear-gradient(180deg,rgba(18,24,30,.97),rgba(7,9,11,.98)) !important;
  color:var(--mp-page-text) !important;
  border-color:var(--mp-page-line) !important;
}

#site-main :where(.ses-list-card,.ses-list-sidebar,.ses-panel,.ses-career-simple-card,.ses-page-list-card,.ses-policy-card,.card){
  box-shadow:0 18px 48px rgba(0,0,0,.30) !important;
}

#site-main :where(.ses-list-card__body,.ses-page-list-card__body,.ses-news-feature__body,.ses-news-list__body){
  background:transparent !important;
  color:var(--mp-page-text) !important;
}

#site-main :where(.ses-list-card,.ses-page-list-card,.ses-panel,.ses-card,.card,.list-group-item){
  border-color:var(--mp-page-line) !important;
}

/* Listing-card media areas: keep real photos visible, darken only fallback surfaces. */
#site-main :where(.ses-list-card__media){
  border-color:var(--mp-page-line-soft) !important;
}

#site-main :where(.ses-list-card.has-gradient .ses-list-card__media,
                  .ses-list-card--listing-thumb.has-gradient .ses-list-card__media,
                  .ses-page-list-card.has-gradient .ses-page-list-card__media){
  background:radial-gradient(circle at 18% 28%,rgba(215,25,32,.48),transparent 34%),linear-gradient(135deg,#070707 0%,#171717 48%,#7f001d 100%) !important;
}

/* Keep product image canvases light enough for transparent/white-background product PNGs. */
#site-main :where(
  .ses-list-card--catalog-product .ses-list-card__media,
  .mp-product-list-media,
  .mp-product-main-image,
  .mp-related-card img
){
  background:radial-gradient(circle at 50% 50%,rgba(255,255,255,.08),transparent 46%),#f8fafc;
}

/* Buttons and chips on dark panels. */
#site-main :where(.ses-list-card__more,.ses-list-sidebar__item a,.ses-nyt-pill,.btn-outline-secondary){
  background:rgba(255,255,255,.03) !important;
  border-color:rgba(255,255,255,.28) !important;
  color:#f4f5f6 !important;
}

#site-main :where(.ses-list-card__more:hover,.ses-list-sidebar__item a:hover,.ses-nyt-pill:hover,.btn-outline-secondary:hover){
  background:#d71920 !important;
  border-color:#d71920 !important;
  color:#fff !important;
}

#site-main :where(.btn-primary,.btn-danger){
  background:linear-gradient(180deg,#e52128,#97070b) !important;
  border-color:#d71920 !important;
  color:#fff !important;
}

#site-main :where(.ses-list-card__relations a,.ses-list-card__relations span,.ses-related-link-list a){
  background:rgba(215,25,32,.10) !important;
  border-color:rgba(215,25,32,.36) !important;
}

/* Contact page. */
#site-main :where(.ses-office-list .list-group-item){
  background:linear-gradient(180deg,#151b20,#0b0f12) !important;
  color:var(--mp-page-text) !important;
}

#site-main :where(.ses-office.active){
  background:linear-gradient(180deg,#d71920,#7f060b) !important;
  border-color:#d71920 !important;
  color:#fff !important;
}

#site-main :where(.ses-mapbox){
  background:#0b0f12 !important;
  border:1px solid var(--mp-page-line) !important;
}

#site-main :where(.ses-contact-office-credential){
  background:rgba(255,255,255,.04) !important;
  border-color:rgba(255,255,255,.16) !important;
  color:var(--mp-page-text) !important;
}

#site-main :where(.ses-contact-office-credential strong){
  color:#aeb6bd !important;
}

/* Forms and controls. */
#site-main :where(label,.form-label){
  color:#eef2f5 !important;
}

#site-main :where(input,select,textarea,.form-control,.form-select){
  background-color:#10161b !important;
  color:#fff !important;
  border-color:rgba(255,255,255,.18) !important;
}

#site-main :where(input[readonly],textarea[readonly],.form-control[readonly]){
  background-color:#0c1115 !important;
  color:#dce3e9 !important;
}

#site-main :where(input::placeholder,textarea::placeholder){
  color:#8f989f !important;
}

#site-main :where(input:focus,select:focus,textarea:focus,.form-control:focus,.form-select:focus){
  background-color:#121a20 !important;
  color:#fff !important;
  border-color:#d71920 !important;
  box-shadow:0 0 0 .2rem rgba(215,25,32,.18) !important;
}

/* Tables inside policy/news/information pages. */
#site-main :where(table,.table){
  color:#e9edf1 !important;
  --bs-table-color:#e9edf1;
  --bs-table-bg:transparent;
  --bs-table-border-color:rgba(255,255,255,.14);
}

#site-main :where(.table th,.table td,table th,table td){
  color:#e9edf1 !important;
  background:transparent !important;
  border-color:rgba(255,255,255,.14) !important;
}

/* Alerts should not introduce full white/light blocks. */
#site-main :where(.alert-info,.alert-secondary,.alert-light){
  background:#111820 !important;
  color:#dce3e9 !important;
  border-color:rgba(255,255,255,.16) !important;
}

#site-main :where(.alert-success){
  background:rgba(20,108,67,.18) !important;
  color:#c8f7dc !important;
  border-color:rgba(20,108,67,.42) !important;
}

#site-main :where(.alert-danger){
  background:rgba(215,25,32,.16) !important;
  color:#ffd5d8 !important;
  border-color:rgba(215,25,32,.46) !important;
}

/* Related/sitewide feature blocks after content. */
.ses-sitewide-information-feature,
.ses-sitewide-information-feature :where(.ses-sitewide-feature-card,.ses-sitewide-feature-body){
  background:linear-gradient(180deg,#0d1115,#07090b) !important;
  color:var(--mp-page-text) !important;
  border-color:var(--mp-page-line) !important;
}

.ses-sitewide-information-feature :where(h1,h2,h3,h4,p,li,span,small,a){
  color:inherit !important;
}

/* Newsletter popup and public modals should match the dark site shell. */
.ses-newsletter-popup,
.ses-newsletter-popup :where(.modal-content,.ses-newsletter-popup__panel),
.ses-product-inquiry-modal .modal-content,
.ses-career-apply-modal .modal-content,
.ses-career-apply-summary,
.ses-career-apply-modal__footer{
  background:linear-gradient(180deg,#151b20,#0b0f12) !important;
  color:var(--mp-page-text) !important;
  border-color:var(--mp-page-line) !important;
}

.ses-newsletter-popup :where(h1,h2,h3,h4,h5,h6,p,span,small,label),
.ses-product-inquiry-modal :where(h1,h2,h3,h4,h5,h6,p,span,small,label),
.ses-career-apply-modal :where(h1,h2,h3,h4,h5,h6,p,span,small,label){
  color:inherit !important;
}

/* Any remaining legacy utility class inside the public body. */
#site-main :where(.text-dark,.text-black,.text-reset,.link-dark){
  color:var(--mp-page-text) !important;
}

#site-main :where(.border,.border-top,.border-end,.border-bottom,.border-start){
  border-color:rgba(255,255,255,.15) !important;
}

@media (max-width: 767.98px){
  #site-main :where(.ses-list-card){
    background:linear-gradient(180deg,rgba(18,24,30,.98),rgba(7,9,11,.99)) !important;
  }
}

/* =========================================================
   MasterPalm global graphite/red storefront surface v1
   Patch: 20260627 global graphite red all storefront pages

   Purpose:
   - Make every public storefront page use a dark graphite industrial shell.
   - Add MasterPalm red glow/gradient accents behind sections.
   - Force legacy white/light CMS blocks to dark panels with white text.
   - Keep form fields and product image canvases readable.
========================================================= */
:root{
  --mp-global-bg:#050607;
  --mp-global-graphite:#0b1014;
  --mp-global-panel:#10161b;
  --mp-global-panel-2:#171e25;
  --mp-global-red:#d71920;
  --mp-global-red-dark:#7f060b;
  --mp-global-text:#f5f7f8;
  --mp-global-muted:#c5cbd1;
  --mp-global-line:rgba(255,255,255,.15);
}

html,
body.site-frontend,
body.site-masterpalm,
body.masterpalm-theme,
body.ses-home-page,
body.ses-inner-page,
#site-main{
  background-color:var(--mp-global-bg) !important;
  color:var(--mp-global-text) !important;
}

body.site-frontend,
body.site-masterpalm,
body.masterpalm-theme,
body.ses-home-page,
body.ses-inner-page{
  background:
    radial-gradient(circle at 8% 4%,rgba(215,25,32,.20),transparent 28%),
    radial-gradient(circle at 88% 16%,rgba(215,25,32,.16),transparent 30%),
    radial-gradient(circle at 50% 0,rgba(210,220,226,.10),transparent 36%),
    linear-gradient(180deg,#121820 0%,#07090b 38%,#050607 100%) !important;
}

#site-main{
  min-height:70vh;
  background:
    radial-gradient(circle at 8% 4%,rgba(215,25,32,.18),transparent 30%),
    radial-gradient(circle at 92% 18%,rgba(215,25,32,.14),transparent 30%),
    radial-gradient(circle at 46% 0,rgba(215,224,232,.08),transparent 34%),
    linear-gradient(180deg,#111821 0%,#07090b 42%,#050607 100%) !important;
}

/* All top-level storefront sections should sit on the graphite/red shell, not white. */
#site-main > :where(section,div,article,main),
#site-main :where(
  section,
  .py-section,
  .page-section,
  .content-section,
  .ses-inner-content,
  .ses-listing-content,
  .ses-page-list,
  .ses-products-index,
  .ses-categories-index,
  .ses-news-index,
  .ses-careers-index,
  .ses-policy-index,
  .ses-information-index,
  .mp-section
){
  background-color:transparent !important;
  color:var(--mp-global-text) !important;
}

/* Universal readable text pass for legacy CMS views and Bootstrap utilities. */
#site-main :where(h1,h2,h3,h4,h5,h6,.h1,.h2,.h3,.h4,.h5,.h6,.display-1,.display-2,.display-3,.display-4,.display-5,.display-6),
#site-main :where(.title,.page-title,.section-title,.card-title,.entry-title,.product-title,.category-title,.news-title,.service-title),
#site-main :where(.text-dark,.text-black,.text-body,.text-reset,.link-dark){
  color:#fff !important;
}

#site-main :where(p,li,small,span,dd,dt,td,th,label,figcaption,blockquote,.lead,.card-text,.text-muted,.text-body-secondary,.small),
#site-main :where(.ses-richtext,.ses-inner-copy,.ses-article-body,.ses-page-list-brief,.ses-list-card__text,.ses-list-card__meta){
  color:var(--mp-global-muted) !important;
}

#site-main :where(a):not(.btn):not(.mp-btn):not(.ses-list-card__media){
  color:#f5f7f8 !important;
}
#site-main :where(a:hover):not(.btn):not(.mp-btn):not(.ses-list-card__media){
  color:#ff454b !important;
}

/* Convert old white Bootstrap/CMS panels to graphite panels with red industrial depth. */
#site-main :where(
  .container > .bg-white,
  .container > .bg-light,
  .bg-white,
  .bg-light,
  .card,
  .card-body,
  .ses-panel,
  .ses-card,
  .ses-list-card,
  .ses-page-list-card,
  .ses-list-sidebar,
  .ses-news-article,
  .ses-news-feature,
  .ses-news-list-card,
  .ses-career-card,
  .ses-career-simple-card,
  .ses-career-detail-card,
  .ses-policy-card,
  .ses-ai-layout-section,
  .ses-ai-layout-lede-copy,
  .ses-template-render-host,
  .ses-template-isolated,
  .ses-content-template,
  .list-group-item,
  .accordion-item,
  .accordion-body,
  .tab-content,
  .modal-content:not(.offcanvas)
){
  background:
    linear-gradient(135deg,rgba(215,25,32,.10),transparent 36%),
    linear-gradient(180deg,rgba(23,30,37,.98),rgba(7,9,11,.99)) !important;
  color:var(--mp-global-text) !important;
  border-color:var(--mp-global-line) !important;
  box-shadow:0 18px 52px rgba(0,0,0,.34) !important;
}

#site-main :where(.card-header,.card-footer,.list-group,.accordion-button){
  background:linear-gradient(180deg,rgba(18,24,30,.98),rgba(8,10,12,.98)) !important;
  color:#fff !important;
  border-color:var(--mp-global-line) !important;
}
#site-main :where(.accordion-button::after){filter:invert(1);opacity:.75;}

/* Red accents for labels, metadata highlights, and section markers. */
#site-main :where(
  .mp-kicker,
  .ses-section-label,
  .ses-page-list-eyebrow,
  .ses-list-card__label,
  .ses-news-main-label,
  .ses-news-meta-label,
  .ses-office-group-title,
  .badge,
  .text-danger
){
  color:#ff454b !important;
}

#site-main :where(.badge,.ses-list-card__relations a,.ses-related-link-list a){
  background:rgba(215,25,32,.14) !important;
  border-color:rgba(215,25,32,.38) !important;
}

/* Preserve product images: dark card, but white/neutral product canvas for transparent PNGs. */
#site-main :where(
  .mp-product-list-media,
  .mp-related-card-media,
  .ses-product-catalog-list .ses-list-card--catalog-product .ses-list-card__media,
  .ses-linked-product-list > .ses-list-card--linked-product.has-image .ses-list-card__media,
  .mp-product-main-image
){
  background-color:#fff !important;
  color:#111820 !important;
}

/* Form surfaces on the dark shell. */
#site-main :where(input,select,textarea,.form-control,.form-select,.input-group-text){
  background:#10161b !important;
  color:#fff !important;
  border-color:rgba(255,255,255,.20) !important;
}
#site-main :where(input::placeholder,textarea::placeholder){color:#8f989f !important;}
#site-main :where(input:focus,select:focus,textarea:focus,.form-control:focus,.form-select:focus){
  background:#121a20 !important;
  color:#fff !important;
  border-color:var(--mp-global-red) !important;
  box-shadow:0 0 0 .2rem rgba(215,25,32,.18) !important;
}
#site-main :where(option){background:#10161b;color:#fff;}

/* Keep tables, alerts, breadcrumbs, and separators readable. */
#site-main :where(table,.table){
  --bs-table-color:#e9edf1;
  --bs-table-bg:transparent;
  --bs-table-border-color:rgba(255,255,255,.14);
  color:#e9edf1 !important;
}
#site-main :where(.table th,.table td,table th,table td){
  color:#e9edf1 !important;
  background:transparent !important;
  border-color:rgba(255,255,255,.14) !important;
}
#site-main :where(hr,.border,.border-top,.border-end,.border-bottom,.border-start){border-color:rgba(255,255,255,.15) !important;}
#site-main :where(.breadcrumb,.breadcrumb-item,.breadcrumb-item.active){color:#c5cbd1 !important;}
#site-main :where(.breadcrumb-item + .breadcrumb-item::before){color:rgba(255,255,255,.55) !important;}

#site-main :where(.alert,.alert-info,.alert-secondary,.alert-light){
  background:linear-gradient(180deg,rgba(17,24,30,.98),rgba(9,12,15,.98)) !important;
  color:#dce3e9 !important;
  border-color:rgba(255,255,255,.16) !important;
}
#site-main :where(.alert-danger){
  background:rgba(215,25,32,.18) !important;
  color:#ffd9dc !important;
  border-color:rgba(215,25,32,.45) !important;
}
#site-main :where(.alert-success){
  background:rgba(20,108,67,.18) !important;
  color:#cdf8df !important;
  border-color:rgba(20,108,67,.42) !important;
}

/* Public newsletter popup from frontend.css used .nl-* and was white. */
body.site-frontend :where(.nl-modal){
  background:linear-gradient(180deg,#171e25,#0b0f12) !important;
  color:#fff !important;
  border:1px solid rgba(255,255,255,.16) !important;
}
body.site-frontend :where(.nl-title,.nl-desc,.nl-fine,.nl-msg,.nl-badge){color:#fff !important;}
body.site-frontend :where(.nl-close){background:#10161b !important;color:#fff !important;border-color:rgba(255,255,255,.18) !important;}

@media(max-width:767.98px){
  #site-main{
    background:
      radial-gradient(circle at 18% 2%,rgba(215,25,32,.18),transparent 34%),
      linear-gradient(180deg,#111821 0%,#07090b 48%,#050607 100%) !important;
  }
}

