/* MasterPalm Patch 283 — compact inner headers and unfiltered category media
   Loaded after Patch 282 so this file owns the final header and category-card cascade. */

/* ================================================================
   Non-home shared headers
   - real image/video: 2:1 frame
   - no image/video: content height plus 24px top/bottom padding
================================================================ */
body.site-masterpalm:not(.home) #site-main .ses-inner-hero.has-image,
body.site-masterpalm:not(.home) #site-main .ses-inner-hero.has-video,
body.masterpalm-theme:not(.home) #site-main .ses-inner-hero.has-image,
body.masterpalm-theme:not(.home) #site-main .ses-inner-hero.has-video{
  --ses-inner-hero-ratio-desktop:2 / 1 !important;
  --ses-inner-hero-ratio-mobile:2 / 1 !important;
  width:100% !important;
  height:auto !important;
  min-height:0 !important;
  max-height:none !important;
  aspect-ratio:2 / 1 !important;
  padding:0 !important;
}

body.site-masterpalm:not(.home) #site-main .ses-inner-hero:not(.has-image):not(.has-video),
body.masterpalm-theme:not(.home) #site-main .ses-inner-hero:not(.has-image):not(.has-video){
  --ses-inner-hero-text-color:#1f2933 !important;
  width:100% !important;
  height:auto !important;
  min-height:0 !important;
  max-height:none !important;
  aspect-ratio:auto !important;
  padding:24px 0 !important;
  overflow:visible !important;
  background:#ffffff !important;
  background-image:none !important;
}

body.site-masterpalm:not(.home) #site-main .ses-inner-hero:not(.has-image):not(.has-video) .ses-inner-hero__shade,
body.site-masterpalm:not(.home) #site-main .ses-inner-hero:not(.has-image):not(.has-video)::after,
body.masterpalm-theme:not(.home) #site-main .ses-inner-hero:not(.has-image):not(.has-video) .ses-inner-hero__shade,
body.masterpalm-theme:not(.home) #site-main .ses-inner-hero:not(.has-image):not(.has-video)::after{
  display:none !important;
  content:none !important;
}

body.site-masterpalm:not(.home) #site-main .ses-inner-hero:not(.has-image):not(.has-video) .ses-inner-hero__outer,
body.masterpalm-theme:not(.home) #site-main .ses-inner-hero:not(.has-image):not(.has-video) .ses-inner-hero__outer{
  position:relative !important;
  inset:auto !important;
  min-height:0 !important;
  display:block !important;
  pointer-events:none !important;
}

body.site-masterpalm:not(.home) #site-main .ses-inner-hero:not(.has-image):not(.has-video) .ses-inner-hero__copy,
body.masterpalm-theme:not(.home) #site-main .ses-inner-hero:not(.has-image):not(.has-video) .ses-inner-hero__copy{
  min-height:0 !important;
  padding:0 !important;
}

body.site-masterpalm:not(.home) #site-main .ses-inner-hero:not(.has-image):not(.has-video).is-nonproduct-hero.no-subtitle .ses-inner-hero__copy::after,
body.masterpalm-theme:not(.home) #site-main .ses-inner-hero:not(.has-image):not(.has-video).is-nonproduct-hero.no-subtitle .ses-inner-hero__copy::after{
  display:none !important;
  content:none !important;
  height:0 !important;
}

/* Legacy MasterPalm page headers use the same media-state policy. */
body.site-masterpalm:not(.home) #site-main .mp-page-hero.has-image,
body.masterpalm-theme:not(.home) #site-main .mp-page-hero.has-image{
  width:100% !important;
  height:auto !important;
  min-height:0 !important;
  max-height:none !important;
  aspect-ratio:2 / 1 !important;
  padding:0 !important;
}

body.site-masterpalm:not(.home) #site-main .mp-page-hero.no-image,
body.masterpalm-theme:not(.home) #site-main .mp-page-hero.no-image{
  width:100% !important;
  height:auto !important;
  min-height:0 !important;
  max-height:none !important;
  aspect-ratio:auto !important;
  padding:0 !important;
  background:#ffffff !important;
  background-image:none !important;
  color:#1f2933 !important;
}

body.site-masterpalm:not(.home) #site-main .mp-page-hero.no-image::before,
body.masterpalm-theme:not(.home) #site-main .mp-page-hero.no-image::before{
  display:none !important;
  content:none !important;
}

body.site-masterpalm:not(.home) #site-main .mp-page-hero.no-image .mp-page-hero-inner,
body.masterpalm-theme:not(.home) #site-main .mp-page-hero.no-image .mp-page-hero-inner{
  padding-top:24px !important;
  padding-bottom:24px !important;
}

body.site-masterpalm:not(.home) #site-main .mp-page-hero.no-image :is(h1,p,.mp-breadcrumb,.mp-breadcrumb a,.mp-breadcrumb span),
body.masterpalm-theme:not(.home) #site-main .mp-page-hero.no-image :is(h1,p,.mp-breadcrumb,.mp-breadcrumb a,.mp-breadcrumb span){
  color:#1f2933 !important;
  text-shadow:none !important;
}

/* ================================================================
   Category list cards
   - image cards: original image, no overlay/filter
   - no-image cards: solid graphite
   - all category-card copy: white
================================================================ */
body.site-masterpalm #site-main .mp-category-card,
body.masterpalm-theme #site-main .mp-category-card{
  color:#ffffff !important;
  filter:none !important;
}

body.site-masterpalm #site-main .mp-category-card.has-image,
body.site-masterpalm #site-main .mp-category-card[style*="--mp-bg"],
body.masterpalm-theme #site-main .mp-category-card.has-image,
body.masterpalm-theme #site-main .mp-category-card[style*="--mp-bg"]{
  background-color:#242a30 !important;
  background-image:var(--mp-bg, none) !important;
  background-size:cover !important;
  background-position:center center !important;
  background-repeat:no-repeat !important;
}

body.site-masterpalm #site-main .mp-category-card.no-image,
body.site-masterpalm #site-main .mp-category-card:not(.has-image):not([style*="--mp-bg"]),
body.masterpalm-theme #site-main .mp-category-card.no-image,
body.masterpalm-theme #site-main .mp-category-card:not(.has-image):not([style*="--mp-bg"]){
  background:#242a30 !important;
  background-image:none !important;
}

body.site-masterpalm #site-main .mp-category-card::before,
body.site-masterpalm #site-main .mp-category-card::after,
body.masterpalm-theme #site-main .mp-category-card::before,
body.masterpalm-theme #site-main .mp-category-card::after{
  display:none !important;
  content:none !important;
  background:none !important;
  opacity:0 !important;
  filter:none !important;
}

body.site-masterpalm #site-main .mp-category-card .mp-card-body,
body.masterpalm-theme #site-main .mp-category-card .mp-card-body{
  background:transparent !important;
  color:#ffffff !important;
  filter:none !important;
}

body.site-masterpalm #site-main .mp-category-card .mp-card-body *,
body.site-masterpalm #site-main .mp-category-card :is(strong,small,span,em,.mp-card-more),
body.masterpalm-theme #site-main .mp-category-card .mp-card-body *,
body.masterpalm-theme #site-main .mp-category-card :is(strong,small,span,em,.mp-card-more){
  color:#ffffff !important;
}

body.site-masterpalm #site-main .mp-category-card.has-image .mp-card-body *,
body.site-masterpalm #site-main .mp-category-card[style*="--mp-bg"] .mp-card-body *,
body.masterpalm-theme #site-main .mp-category-card.has-image .mp-card-body *,
body.masterpalm-theme #site-main .mp-category-card[style*="--mp-bg"] .mp-card-body *{
  text-shadow:0 2px 5px rgba(0,0,0,.95),0 0 2px rgba(0,0,0,.9) !important;
}

body.site-masterpalm #site-main .mp-category-card .mp-card-more,
body.masterpalm-theme #site-main .mp-category-card .mp-card-more{
  border-color:rgba(255,255,255,.82) !important;
  background:transparent !important;
  color:#ffffff !important;
  box-shadow:none !important;
  filter:none !important;
}

@supports not (aspect-ratio:1 / 1){
  body.site-masterpalm:not(.home) #site-main .ses-inner-hero.has-image,
  body.site-masterpalm:not(.home) #site-main .ses-inner-hero.has-video,
  body.site-masterpalm:not(.home) #site-main .mp-page-hero.has-image,
  body.masterpalm-theme:not(.home) #site-main .ses-inner-hero.has-image,
  body.masterpalm-theme:not(.home) #site-main .ses-inner-hero.has-video,
  body.masterpalm-theme:not(.home) #site-main .mp-page-hero.has-image{
    min-height:50vw !important;
  }
}
