/* Shared thumbnail surface. Pages can set placement and size with the custom properties below. */
.banner-preview {
  --banner-preview-width: 116px;
  --banner-preview-height: 64px;
  --banner-preview-gap: 8px;
  position: relative;
  z-index: 12;
  width: max-content;
  max-width: calc(100% - 32px);
  padding: 9px;
  display: flex;
  align-items: center;
  gap: var(--banner-preview-gap);
  overflow-x: auto;
  overscroll-behavior-inline: contain;
  border: 1px solid rgba(255, 255, 255, .76);
  border-radius: 15px;
  background: rgba(246, 248, 250, .68);
  box-shadow: 0 16px 42px rgba(25, 38, 49, .18);
  -webkit-backdrop-filter: blur(16px) saturate(120%);
  backdrop-filter: blur(16px) saturate(120%);
  scrollbar-width: none;
  touch-action: pan-x;
}
.banner-preview::-webkit-scrollbar { display: none; }
.banner-preview > button {
  position: relative;
  flex: 0 0 var(--banner-preview-width);
  width: var(--banner-preview-width);
  height: var(--banner-preview-height);
  padding: 0;
  display: block;
  overflow: hidden;
  border: 2px solid rgba(255, 255, 255, .9);
  border-radius: 8px;
  background: #edf0f2;
  box-shadow: 0 2px 8px rgba(16, 28, 38, .15);
  cursor: pointer;
  transition: border-color .2s ease, box-shadow .2s ease, transform .2s ease;
}
.banner-preview > button:hover {
  transform: translateY(-2px);
  box-shadow: 0 5px 14px rgba(16, 28, 38, .22);
}
.banner-preview > button.is-active {
  border-color: #ed1c24;
  box-shadow: 0 0 0 1px rgba(237, 28, 36, .35), 0 5px 14px rgba(25, 38, 49, .2);
}
.banner-preview > button:focus-visible {
  outline: 2px solid #ed1c24;
  outline-offset: 2px;
}
.banner-preview > button img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
}
.banner-preview > button:not(.is-active) img { opacity: .83; }
.banner-preview > button:hover img,
.banner-preview > button:focus-visible img { opacity: 1; }

:is(.visual-products-page, .linex-page) .home-showcase-preview {
  position: absolute;
  left: 50%;
  bottom: -42px;
  transform: translateX(-50%);
}
@media (min-width: 761px) {
  :is(.visual-products-page, .linex-page) .home-showcase.product-banner {
    z-index: 1;
    overflow: visible;
  }
  :is(.visual-products-page, .linex-page) .home-showcase-shell { overflow: visible; }
}

html[data-theme="dark"] .banner-preview {
  border-color: rgba(255, 255, 255, .2);
  background: rgba(12, 17, 22, .7);
  box-shadow: 0 16px 42px rgba(0, 0, 0, .35);
}
html[data-theme="dark"] .banner-preview > button {
  border-color: rgba(255, 255, 255, .35);
  background: #101820;
}
html[data-theme="dark"] .banner-preview > button.is-active { border-color: #ed1c24; }

@media (max-width: 760px) {
  .banner-preview {
    --banner-preview-width: 88px;
    --banner-preview-height: 49px;
    max-width: calc(100% - 24px);
    padding: 7px;
    border-radius: 12px;
  }
  :is(.visual-products-page, .linex-page) .home-showcase-preview {
    position: relative;
    left: auto;
    bottom: auto;
    width: max-content;
    margin: 9px auto 13px;
    transform: none;
  }
}

@supports not ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) {
  .banner-preview { background: rgba(246, 248, 250, .96); }
  html[data-theme="dark"] .banner-preview { background: rgba(12, 17, 22, .96); }
}
@media (prefers-reduced-transparency: reduce) {
  .banner-preview { background: rgba(246, 248, 250, .96); -webkit-backdrop-filter: none; backdrop-filter: none; }
  html[data-theme="dark"] .banner-preview { background: rgba(12, 17, 22, .96); }
}
@media (prefers-reduced-motion: reduce) {
  .banner-preview > button { transition: none; }
}
