/* MasterPalm Patch 239 — cumulative storefront restore guard
   Reapplies layout fixes that later translation/template patches can accidentally reverse:
   - product detail main image: 16:9 background-image, contain
   - product detail video library: 4 columns desktop, 1 column mobile
   - /product listing cards: 4 columns desktop, 1 column mobile
   - /product pagination: black/dark graphite controls with white text
   This file must load after masterpalm-industrial.css, pages.css, Patch 237, and Patch 238. */

/* =============================
   Product detail main image
============================= */
body.site-masterpalm #site-main .mp-product-page .mp-product-main-image,
body.masterpalm-theme #site-main .mp-product-page .mp-product-main-image,
#site-main .mp-product-page .mp-product-main-image{
  position:relative !important;
  width:100% !important;
  height:auto !important;
  min-height:0 !important;
  max-height:none !important;
  aspect-ratio:16 / 9 !important;
  display:grid !important;
  place-items:center !important;
  overflow:hidden !important;
  border-radius:0 !important;
  border:1px solid rgba(255,255,255,.10) !important;
  background-color:#050607 !important;
  background-image:radial-gradient(circle at 50% 50%, rgba(255,255,255,.08), transparent 45%), var(--mp-product-main-bg, none) !important;
  background-position:center center !important;
  background-size:contain !important;
  background-repeat:no-repeat !important;
}

body.site-masterpalm #site-main .mp-product-page .mp-product-main-image img,
body.masterpalm-theme #site-main .mp-product-page .mp-product-main-image img,
#site-main .mp-product-page .mp-product-main-image img{
  width:100% !important;
  height:100% !important;
  object-fit:contain !important;
  opacity:0 !important;
  pointer-events:none !important;
}

body.site-masterpalm #site-main .mp-product-page .mp-product-thumbs,
body.masterpalm-theme #site-main .mp-product-page .mp-product-thumbs,
#site-main .mp-product-page .mp-product-thumbs{
  display:grid !important;
  grid-template-columns:repeat(4,minmax(0,1fr)) !important;
  gap:10px !important;
  overflow:visible !important;
  padding-bottom:0 !important;
}
body.site-masterpalm #site-main .mp-product-page .mp-product-thumbs button,
body.masterpalm-theme #site-main .mp-product-page .mp-product-thumbs button,
#site-main .mp-product-page .mp-product-thumbs button{
  width:100% !important;
  height:auto !important;
  aspect-ratio:16 / 9 !important;
  border-radius:0 !important;
  background-color:#0b0f12 !important;
  background-image:var(--mp-product-thumb-bg, none) !important;
  background-position:center center !important;
  background-size:contain !important;
  background-repeat:no-repeat !important;
}
body.site-masterpalm #site-main .mp-product-page .mp-product-thumbs img,
body.masterpalm-theme #site-main .mp-product-page .mp-product-thumbs img,
#site-main .mp-product-page .mp-product-thumbs img{
  opacity:0 !important;
  pointer-events:none !important;
}

/* =============================
   Product detail video grid
============================= */
body.site-masterpalm #site-main .mp-product-videos,
body.masterpalm-theme #site-main .mp-product-videos,
#site-main .mp-product-videos{
  margin-top:22px !important;
  padding:22px !important;
  border:1px solid rgba(255,255,255,.12) !important;
  background:linear-gradient(180deg,rgba(21,27,32,.97),rgba(7,9,11,.98)) !important;
  box-shadow:0 18px 46px rgba(0,0,0,.36) !important;
  color:#fff !important;
  border-radius:0 !important;
}
body.site-masterpalm #site-main .mp-product-videos-head,
body.masterpalm-theme #site-main .mp-product-videos-head,
#site-main .mp-product-videos-head{
  display:flex !important;
  align-items:end !important;
  justify-content:space-between !important;
  gap:16px !important;
  margin-bottom:16px !important;
}
body.site-masterpalm #site-main .mp-product-videos-head span,
body.masterpalm-theme #site-main .mp-product-videos-head span,
#site-main .mp-product-videos-head span{
  color:#ff343b !important;
  text-transform:uppercase !important;
  font-weight:900 !important;
  letter-spacing:.08em !important;
  font-size:12px !important;
}
body.site-masterpalm #site-main .mp-product-videos-head h2,
body.masterpalm-theme #site-main .mp-product-videos-head h2,
#site-main .mp-product-videos-head h2{
  margin:0 !important;
  color:#fff !important;
  text-transform:uppercase !important;
  font-weight:1000 !important;
}
body.site-masterpalm #site-main .mp-product-video-grid,
body.masterpalm-theme #site-main .mp-product-video-grid,
#site-main .mp-product-video-grid{
  display:grid !important;
  grid-template-columns:repeat(4,minmax(0,1fr)) !important;
  gap:16px !important;
  align-items:stretch !important;
}
body.site-masterpalm #site-main .mp-product-video-card,
body.masterpalm-theme #site-main .mp-product-video-card,
#site-main .mp-product-video-card{
  min-width:0 !important;
  border:1px solid rgba(255,255,255,.12) !important;
  background:#0b0f12 !important;
  color:#fff !important;
  border-radius:0 !important;
  overflow:hidden !important;
}
body.site-masterpalm #site-main .mp-product-video-frame,
body.masterpalm-theme #site-main .mp-product-video-frame,
#site-main .mp-product-video-frame{
  position:relative !important;
  width:100% !important;
  aspect-ratio:16 / 9 !important;
  background:#050607 !important;
  overflow:hidden !important;
}
body.site-masterpalm #site-main .mp-product-video-frame iframe,
body.site-masterpalm #site-main .mp-product-video-frame video,
body.masterpalm-theme #site-main .mp-product-video-frame iframe,
body.masterpalm-theme #site-main .mp-product-video-frame video,
#site-main .mp-product-video-frame iframe,
#site-main .mp-product-video-frame video{
  position:absolute !important;
  inset:0 !important;
  width:100% !important;
  height:100% !important;
  border:0 !important;
  display:block !important;
  background:#050607 !important;
}
body.site-masterpalm #site-main .mp-product-video-body,
body.masterpalm-theme #site-main .mp-product-video-body,
#site-main .mp-product-video-body{
  padding:14px !important;
}
body.site-masterpalm #site-main .mp-product-video-body strong,
body.masterpalm-theme #site-main .mp-product-video-body strong,
#site-main .mp-product-video-body strong{
  display:block !important;
  color:#fff !important;
  text-transform:uppercase !important;
  line-height:1.15 !important;
}
body.site-masterpalm #site-main .mp-product-video-body p,
body.masterpalm-theme #site-main .mp-product-video-body p,
#site-main .mp-product-video-body p{
  margin:8px 0 0 !important;
  color:#bfc6cc !important;
  line-height:1.5 !important;
}

/* =============================
   /product listing grid and media
============================= */
body.site-masterpalm #site-main .ses-products-index .ses-product-catalog-list,
body.masterpalm-theme #site-main .ses-products-index .ses-product-catalog-list,
#site-main .ses-products-index .ses-product-catalog-list,
body.site-masterpalm #site-main .mp-category-product-page .mp-category-products-grid,
body.masterpalm-theme #site-main .mp-category-product-page .mp-category-products-grid,
#site-main .mp-category-product-page .mp-category-products-grid{
  display:grid !important;
  grid-template-columns:repeat(4,minmax(0,1fr)) !important;
  gap:16px !important;
  align-items:stretch !important;
}
body.site-masterpalm #site-main .ses-products-index .ses-list-card,
body.masterpalm-theme #site-main .ses-products-index .ses-list-card,
#site-main .ses-products-index .ses-list-card,
body.site-masterpalm #site-main .mp-product-list-card,
body.masterpalm-theme #site-main .mp-product-list-card,
#site-main .mp-product-list-card{
  width:100% !important;
  min-width:0 !important;
  max-width:none !important;
  display:flex !important;
  flex-direction:column !important;
  border:1px solid rgba(255,255,255,.12) !important;
  background:linear-gradient(180deg,#141a20,#080b0d) !important;
  color:#fff !important;
  border-radius:0 !important;
  overflow:hidden !important;
}
body.site-masterpalm #site-main .ses-products-index .ses-list-card__media,
body.masterpalm-theme #site-main .ses-products-index .ses-list-card__media,
#site-main .ses-products-index .ses-list-card__media,
body.site-masterpalm #site-main .mp-product-list-media,
body.masterpalm-theme #site-main .mp-product-list-media,
#site-main .mp-product-list-media{
  width:100% !important;
  height:auto !important;
  min-height:0 !important;
  aspect-ratio:16 / 9 !important;
  display:grid !important;
  place-items:center !important;
  background-color:#07090b !important;
  background-image:var(--mp-product-list-bg, var(--list-bg, none)) !important;
  background-position:center center !important;
  background-size:contain !important;
  background-repeat:no-repeat !important;
  border-radius:0 !important;
  color:#bfc6cc !important;
}
body.site-masterpalm #site-main .ses-products-index .ses-list-card__body,
body.masterpalm-theme #site-main .ses-products-index .ses-list-card__body,
#site-main .ses-products-index .ses-list-card__body,
body.site-masterpalm #site-main .mp-product-list-body,
body.masterpalm-theme #site-main .mp-product-list-body,
#site-main .mp-product-list-body{
  flex:1 1 auto !important;
  background:transparent !important;
  color:#dce1e5 !important;
}
body.site-masterpalm #site-main .ses-products-index .ses-list-card__body h3,
body.site-masterpalm #site-main .ses-products-index .ses-list-card__body h3 a,
body.masterpalm-theme #site-main .ses-products-index .ses-list-card__body h3,
body.masterpalm-theme #site-main .ses-products-index .ses-list-card__body h3 a,
#site-main .ses-products-index .ses-list-card__body h3,
#site-main .ses-products-index .ses-list-card__body h3 a,
body.site-masterpalm #site-main .mp-product-list-body h3,
body.site-masterpalm #site-main .mp-product-list-body h3 a,
body.masterpalm-theme #site-main .mp-product-list-body h3,
body.masterpalm-theme #site-main .mp-product-list-body h3 a,
#site-main .mp-product-list-body h3,
#site-main .mp-product-list-body h3 a{
  color:#fff !important;
}
body.site-masterpalm #site-main .ses-products-index .ses-list-card__text,
body.masterpalm-theme #site-main .ses-products-index .ses-list-card__text,
#site-main .ses-products-index .ses-list-card__text,
body.site-masterpalm #site-main .mp-product-list-body p,
body.masterpalm-theme #site-main .mp-product-list-body p,
#site-main .mp-product-list-body p{
  color:#bfc6cc !important;
}
body.site-masterpalm #site-main .ses-products-index .ses-list-card__more,
body.masterpalm-theme #site-main .ses-products-index .ses-list-card__more,
#site-main .ses-products-index .ses-list-card__more,
body.site-masterpalm #site-main .mp-product-list-actions a,
body.masterpalm-theme #site-main .mp-product-list-actions a,
#site-main .mp-product-list-actions a{
  color:#fff !important;
  border-color:rgba(255,255,255,.24) !important;
}

/* Product catalog shell/panels dark correction */
body.site-masterpalm #site-main .ses-products-index,
body.masterpalm-theme #site-main .ses-products-index,
#site-main .ses-products-index{
  background:linear-gradient(180deg,#07090b,#0b0f12) !important;
  color:#fff !important;
}
body.site-masterpalm #site-main .ses-product-filter-form,
body.site-masterpalm #site-main .ses-product-results-bar,
body.masterpalm-theme #site-main .ses-product-filter-form,
body.masterpalm-theme #site-main .ses-product-results-bar,
#site-main .ses-product-filter-form,
#site-main .ses-product-results-bar{
  background:linear-gradient(180deg,#141a20,#080b0d) !important;
  color:#fff !important;
  border:1px solid rgba(255,255,255,.12) !important;
  border-radius:0 !important;
}
body.site-masterpalm #site-main .ses-product-filter-form input,
body.site-masterpalm #site-main .ses-product-filter-form select,
body.masterpalm-theme #site-main .ses-product-filter-form input,
body.masterpalm-theme #site-main .ses-product-filter-form select,
#site-main .ses-product-filter-form input,
#site-main .ses-product-filter-form select{
  background:#0b0f12 !important;
  color:#fff !important;
  border-color:rgba(255,255,255,.16) !important;
}
body.site-masterpalm #site-main .ses-product-filter-form label,
body.site-masterpalm #site-main .ses-product-results-bar h2,
body.masterpalm-theme #site-main .ses-product-filter-form label,
body.masterpalm-theme #site-main .ses-product-results-bar h2,
#site-main .ses-product-filter-form label,
#site-main .ses-product-results-bar h2{
  color:#fff !important;
}

/* =============================
   Pagination / paging controls
============================= */
body.site-masterpalm #site-main .pagination,
body.site-masterpalm #site-main .ses-pagination,
body.site-masterpalm #site-main .pager,
body.masterpalm-theme #site-main .pagination,
body.masterpalm-theme #site-main .ses-pagination,
body.masterpalm-theme #site-main .pager,
#site-main .pagination,
#site-main .ses-pagination,
#site-main .pager{
  display:flex !important;
  flex-wrap:wrap !important;
  gap:8px !important;
  justify-content:center !important;
  margin:30px 0 0 !important;
}
body.site-masterpalm #site-main .page-link,
body.site-masterpalm #site-main .pagination a,
body.site-masterpalm #site-main .pagination span,
body.site-masterpalm #site-main .ses-pagination a,
body.site-masterpalm #site-main .ses-pagination span,
body.site-masterpalm #site-main .pager a,
body.site-masterpalm #site-main .pager span,
body.masterpalm-theme #site-main .page-link,
body.masterpalm-theme #site-main .pagination a,
body.masterpalm-theme #site-main .pagination span,
body.masterpalm-theme #site-main .ses-pagination a,
body.masterpalm-theme #site-main .ses-pagination span,
body.masterpalm-theme #site-main .pager a,
body.masterpalm-theme #site-main .pager span,
#site-main .page-link,
#site-main .pagination a,
#site-main .pagination span,
#site-main .ses-pagination a,
#site-main .ses-pagination span,
#site-main .pager a,
#site-main .pager span{
  min-width:40px !important;
  min-height:40px !important;
  display:inline-flex !important;
  align-items:center !important;
  justify-content:center !important;
  padding:8px 13px !important;
  background:#0b0f12 !important;
  color:#fff !important;
  border:1px solid rgba(255,255,255,.18) !important;
  border-radius:0 !important;
  text-decoration:none !important;
  font-weight:900 !important;
}
body.site-masterpalm #site-main .page-item.active .page-link,
body.site-masterpalm #site-main .pagination .active,
body.site-masterpalm #site-main .ses-pagination .active,
body.site-masterpalm #site-main .pager .active,
body.masterpalm-theme #site-main .page-item.active .page-link,
body.masterpalm-theme #site-main .pagination .active,
body.masterpalm-theme #site-main .ses-pagination .active,
body.masterpalm-theme #site-main .pager .active,
#site-main .page-item.active .page-link,
#site-main .pagination .active,
#site-main .ses-pagination .active,
#site-main .pager .active{
  background:#d71920 !important;
  color:#fff !important;
  border-color:#d71920 !important;
}
body.site-masterpalm #site-main .page-link:hover,
body.site-masterpalm #site-main .pagination a:hover,
body.site-masterpalm #site-main .ses-pagination a:hover,
body.site-masterpalm #site-main .pager a:hover,
body.masterpalm-theme #site-main .page-link:hover,
body.masterpalm-theme #site-main .pagination a:hover,
body.masterpalm-theme #site-main .ses-pagination a:hover,
body.masterpalm-theme #site-main .pager a:hover,
#site-main .page-link:hover,
#site-main .pagination a:hover,
#site-main .ses-pagination a:hover,
#site-main .pager a:hover{
  background:#161b20 !important;
  color:#fff !important;
  border-color:rgba(255,255,255,.36) !important;
}

@media (max-width:991.98px){
  body.site-masterpalm #site-main .mp-product-shell,
  body.masterpalm-theme #site-main .mp-product-shell,
  #site-main .mp-product-shell{
    grid-template-columns:1fr !important;
  }
  body.site-masterpalm #site-main .mp-product-video-grid,
  body.masterpalm-theme #site-main .mp-product-video-grid,
  #site-main .mp-product-video-grid,
  body.site-masterpalm #site-main .ses-products-index .ses-product-catalog-list,
  body.masterpalm-theme #site-main .ses-products-index .ses-product-catalog-list,
  #site-main .ses-products-index .ses-product-catalog-list,
  body.site-masterpalm #site-main .mp-category-product-page .mp-category-products-grid,
  body.masterpalm-theme #site-main .mp-category-product-page .mp-category-products-grid,
  #site-main .mp-category-product-page .mp-category-products-grid{
    grid-template-columns:repeat(2,minmax(0,1fr)) !important;
  }
}
@media (max-width:767.98px){
  body.site-masterpalm #site-main .mp-product-video-grid,
  body.masterpalm-theme #site-main .mp-product-video-grid,
  #site-main .mp-product-video-grid,
  body.site-masterpalm #site-main .ses-products-index .ses-product-catalog-list,
  body.masterpalm-theme #site-main .ses-products-index .ses-product-catalog-list,
  #site-main .ses-products-index .ses-product-catalog-list,
  body.site-masterpalm #site-main .mp-category-product-page .mp-category-products-grid,
  body.masterpalm-theme #site-main .mp-category-product-page .mp-category-products-grid,
  #site-main .mp-category-product-page .mp-category-products-grid,
  body.site-masterpalm #site-main .mp-product-page .mp-product-thumbs,
  body.masterpalm-theme #site-main .mp-product-page .mp-product-thumbs,
  #site-main .mp-product-page .mp-product-thumbs{
    grid-template-columns:1fr !important;
  }
  body.site-masterpalm #site-main .mp-product-videos,
  body.masterpalm-theme #site-main .mp-product-videos,
  #site-main .mp-product-videos{
    padding:16px !important;
  }
}
