/* MGPLITKA Solution Gallery Controls 2.2.2
 * Detail page view selector aligned with the working homepage Smart Studio control.
 * Presentation only: no gallery/calculator/cart/business logic is replaced.
 */

/* The homepage works through the bottom view buttons, so the detail page uses the
   same interaction model. Keep the existing JS click handlers on .mgsp-thumb. */
.mgsp-detail .mgsp-main-image .mgsp-gprev,
.mgsp-detail .mgsp-main-image .mgsp-gnext,
.mgsp-detail .mgsp-main-image .mgsp-counter{
  display:none!important;
}

.mgsp-detail .mgsp-thumbs{
  display:flex!important;
  align-items:stretch!important;
  gap:8px!important;
  margin-top:8px!important;
  padding:0 0 2px!important;
  overflow-x:auto!important;
  overflow-y:hidden!important;
  -webkit-overflow-scrolling:touch;
  scrollbar-width:thin;
}

.mgsp-detail .mgsp-thumb{
  appearance:none!important;
  -webkit-appearance:none!important;
  position:relative!important;
  flex:1 0 0!important;
  min-width:170px!important;
  width:auto!important;
  height:54px!important;
  aspect-ratio:auto!important;
  display:flex!important;
  align-items:center!important;
  gap:10px!important;
  margin:0!important;
  padding:6px 10px 6px 6px!important;
  overflow:hidden!important;
  border:1px solid #ded9d3!important;
  border-radius:0!important;
  background:#fff!important;
  color:#555!important;
  box-shadow:none!important;
  cursor:pointer!important;
  text-align:left!important;
  font:inherit!important;
}

.mgsp-detail .mgsp-thumb img{
  position:static!important;
  inset:auto!important;
  flex:0 0 56px!important;
  width:56px!important;
  height:36px!important;
  min-width:56px!important;
  max-width:56px!important;
  max-height:36px!important;
  aspect-ratio:16/9!important;
  object-fit:cover!important;
  object-position:50% 50%!important;
  border:0!important;
  border-radius:0!important;
  transform:none!important;
}

.mgsp-detail .mgsp-thumb span{
  display:block!important;
  min-width:0!important;
  padding:0!important;
  margin:0!important;
  color:#555!important;
  font-size:12px!important;
  font-weight:400!important;
  line-height:1.15!important;
  white-space:normal!important;
  overflow:hidden!important;
  text-overflow:ellipsis!important;
}

.mgsp-detail .mgsp-thumb.is-active{
  border-color:#ded9d3!important;
  border-bottom:3px solid #d71920!important;
  padding-bottom:4px!important;
  color:#222!important;
  box-shadow:none!important;
}
.mgsp-detail .mgsp-thumb.is-active span{
  color:#222!important;
  font-weight:500!important;
}

.mgsp-detail .mgsp-thumb:focus-visible{
  outline:2px solid #d71920!important;
  outline-offset:2px!important;
}

@media (hover:hover) and (pointer:fine){
  .mgsp-detail .mgsp-thumb:hover{
    background:#faf9f7!important;
    border-color:#cfc9c3!important;
  }
  .mgsp-detail .mgsp-thumb.is-active:hover{
    border-bottom-color:#d71920!important;
  }
}

@media(max-width:760px){
  .mgsp-detail .mgsp-thumbs{
    gap:7px!important;
    margin-top:7px!important;
    padding-bottom:5px!important;
  }
  .mgsp-detail .mgsp-thumb{
    flex:0 0 158px!important;
    min-width:158px!important;
    height:52px!important;
    padding:6px 8px 6px 6px!important;
  }
  .mgsp-detail .mgsp-thumb img{
    flex-basis:52px!important;
    width:52px!important;
    min-width:52px!important;
    max-width:52px!important;
    height:34px!important;
    max-height:34px!important;
  }
  .mgsp-detail .mgsp-thumb span{
    font-size:11px!important;
  }
}
