/* LMS_SHOP_DIRECTORY_COVER_PARITY_V1
   Task 40. All boutique directory rows share the 1180px content frame.
   Public shop covers get the same full-height dark edge dissolve as detail
   photos/videos, with a restrained brand-red shadow near the transition.
   No image scaling/cropping, and no impact on ordinary member profiles. */

/* The directory used to cap search/listings at 1100px while the hero is 1180px.
   Keep search, result count, cards and pagination on exactly the same rail. */
html body.lms-navigation-v2.page-shell.route-boutiques
>main.explore-page.boutiques-page{
  box-sizing:border-box!important;
  width:var(--lms-site-content-frame,min(1180px,calc(100vw - 32px)))!important;
  max-width:var(--lms-site-content-max,1180px)!important;
  min-width:0!important;
  margin-left:auto!important;margin-right:auto!important;
  padding-left:0!important;padding-right:0!important;
}
html body.lms-navigation-v2.page-shell.route-boutiques
>main.explore-page.boutiques-page>:is(
  .lms-editorial-intro,.explore-searchbar,.explore-results-row,
  .boutiques-grid,.explore-pagination,.explore-empty-state
){
  box-sizing:border-box!important;
  width:100%!important;max-width:100%!important;min-width:0!important;
  margin-left:0!important;margin-right:0!important;
  left:auto!important;right:auto!important;transform:none!important;
}
html body.lms-navigation-v2.page-shell.route-boutiques
>main.explore-page.boutiques-page>.boutiques-grid>.boutique-card{
  box-sizing:border-box!important;
  width:100%!important;max-width:100%!important;min-width:0!important;
}
/* The search form should use the same row as the two-up directory grid. */
html body.lms-navigation-v2.page-shell.route-boutiques
>main.explore-page.boutiques-page>.explore-searchbar>form{
  box-sizing:border-box!important;
  width:100%!important;max-width:100%!important;min-width:0!important;
}

/* The public shop COVER uses the fixed responsive frame rather than the original media ratio. */
html body.lms-navigation-v2.page-shell.route-profil
>main.public-profile-page.premium-profile>.premium-cover:not(.has-no-cover){
  box-sizing:border-box!important;
  position:relative!important;
  isolation:isolate!important;
  width:var(--lms-site-content-frame,min(1180px,calc(100vw - 32px)))!important;
  max-width:var(--lms-site-content-max,1180px)!important;
  min-width:0!important;
  height:auto!important;
  aspect-ratio:16/9!important;
  max-height:none!important;min-height:0!important;
  margin-left:auto!important;margin-right:auto!important;
  left:auto!important;right:auto!important;transform:none!important;
  border:0!important;border-radius:0!important;
  background-color:#000!important;
  overflow:visible!important;
}
/* Restore the cover's fade: a late old dark-mode rule had disabled ::after.
   Since inset is 0, both edges fade the complete ACTUAL cover height. */
html body.lms-navigation-v2.page-shell.route-profil
>main.public-profile-page.premium-profile>.premium-cover:not(.has-no-cover)::after{
  content:""!important;display:block!important;
  position:absolute!important;inset:0!important;
  top:0!important;right:0!important;bottom:0!important;left:0!important;
  width:100%!important;height:100%!important;min-height:0!important;
  border:0!important;border-radius:0!important;
  z-index:5!important;opacity:1!important;
  pointer-events:none!important;
  filter:none!important;
  background:linear-gradient(90deg,
    #000 0%,rgba(0,0,0,.89) 3%,rgba(42,0,0,.68) 7%,
    rgba(145,17,21,.20) 12%,transparent 19%,transparent 81%,
    rgba(145,17,21,.20) 88%,rgba(42,0,0,.68) 93%,
    rgba(0,0,0,.89) 97%,#000 100%)!important;
}
/* Keep the uploaded image sharp and intact, even on hover.
   The fade is on the cover overlay, not a permanent image mask. */
html body.lms-navigation-v2.page-shell.route-profil
>main.public-profile-page.premium-profile>.premium-cover:not(.has-no-cover)>img.premium-cover-image,
html body.lms-navigation-v2.page-shell.route-profil
>main.public-profile-page.premium-profile>.premium-cover:not(.has-no-cover)>img.premium-cover-image:hover{
  display:block!important;
  position:relative!important;
  z-index:2!important;
  flex:0 0 auto!important;
  width:auto!important;height:100%!important;
  max-width:100%!important;max-height:100%!important;
  object-fit:contain!important;object-position:center center!important;
  transform:none!important;
  filter:none!important;opacity:1!important;
  mask-image:none!important;-webkit-mask-image:none!important;
}
/* Controls must stay clickable ABOVE the visual-only fade. */
html body.lms-navigation-v2.page-shell.route-profil
>main.public-profile-page.premium-profile>.premium-cover>.shop-public-actions{
  z-index:8!important;
  pointer-events:auto!important;
}
@media(max-width:640px){
  html body.lms-navigation-v2.page-shell.route-boutiques
  >main.explore-page.boutiques-page{
    width:calc(100vw - 32px)!important;
    max-width:calc(100vw - 32px)!important;
  }
  html body.lms-navigation-v2.page-shell.route-boutiques
  >main.explore-page.boutiques-page>.boutiques-grid{
    grid-template-columns:minmax(0,1fr)!important;
  }
  html body.lms-navigation-v2.page-shell.route-profil
  >main.public-profile-page.premium-profile>.premium-cover:not(.has-no-cover){
    aspect-ratio:4/3!important;
  }
  html body.lms-navigation-v2.page-shell.route-profil
  >main.public-profile-page.premium-profile>.premium-cover:not(.has-no-cover)::after{
    background:linear-gradient(90deg,
      #000 0%,rgba(0,0,0,.80) 4%,rgba(145,17,21,.16) 8%,
      transparent 13%,transparent 87%,rgba(145,17,21,.16) 92%,
      rgba(0,0,0,.80) 96%,#000 100%)!important;
  }
}


/* Public cover actions must remain legible against a dark photograph in both themes. */
html body.lms-navigation-v2.page-shell.route-profil
>main.public-profile-page.premium-profile>.premium-cover .shop-public-share.share-button{
  box-sizing:border-box!important;display:inline-flex!important;align-items:center!important;
  justify-content:center!important;width:36px!important;height:36px!important;min-width:36px!important;
  padding:7px!important;background:rgba(15,18,24,.88)!important;
  border:1px solid rgba(255,255,255,.68)!important;border-radius:8px!important;
  color:#fff!important;opacity:1!important;
}
html body.lms-navigation-v2.page-shell.route-profil
>main.public-profile-page.premium-profile>.premium-cover .shop-public-share.share-button svg{
  display:block!important;width:19px!important;height:19px!important;
  color:#fff!important;stroke:#fff!important;stroke-width:1.9!important;fill:none!important;opacity:1!important;
}
html body.lms-navigation-v2.page-shell.route-profil
>main.public-profile-page.premium-profile>.premium-cover .shop-public-share.share-button :is(path,polyline,line,circle,rect){
  stroke:currentColor!important;fill:none!important;
}
html body.lms-navigation-v2.page-shell.route-profil
>main.public-profile-page.premium-profile>.premium-cover .shop-public-share.share-button:is(:hover,:focus-visible){
  background:#CA2314!important;border-color:#CA2314!important;
}

/* Owner's single management menu also opens when no cover photo exists. */
html body.lms-navigation-v2.page-shell.route-profil
>main.public-profile-page.premium-profile>.premium-cover.has-no-cover{
  overflow:visible!important;
}
