/* Desktop thumbnail rail follows the photo grid row. */
.shopds-product-gallery__rail-arrow {
  display: none;
}

@media (min-width: 1280px) {
  body .shopds-product-page.shopds-pdp-desktop .shopds-product-gallery__thumbnails {
    contain: size;
    align-self: stretch;
    min-height: 0;
    max-height: none !important;
    scrollbar-width: none;
    scroll-snap-type: none;
  }
  .shopds-product-page.shopds-pdp-desktop .shopds-product-gallery__rail {
    position: relative;
    grid-column: 1;
    grid-row: 1;
    align-self: start;
    height: var(--pdp-thumbnail-rail-height, 100%);
    min-height: 0;
    contain: size;
  }
  .shopds-product-gallery__rail > .shopds-product-gallery__thumbnails {
    height: 100%;
    scroll-padding-block: 32px;
  }
  .shopds-product-gallery__rail > .shopds-product-gallery__thumbnails::-webkit-scrollbar {
    display: none;
  }
  .shopds-product-gallery__rail > .shopds-product-gallery__thumbnails:focus-visible {
    outline: 2px solid var(--pdp-active-line);
    outline-offset: 2px;
  }
  .shopds-product-gallery__rail-arrow:not([hidden]) {
    position: absolute;
    z-index: 3;
    display: grid;
    place-items: center;
    left: 50%;
    transform: translateX(-50%);
    width: 32px;
    height: 32px;
    padding: 0;
    border: 1px solid var(--pdp-line);
    border-radius: 50%;
    color: var(--pdp-text);
    background: var(--pdp-surface);
    box-shadow: 0 3px 10px #0007;
    cursor: pointer;
  }
  .shopds-product-gallery__rail-arrow:hover {
    background: var(--pdp-surface-raised);
  }
  .shopds-product-gallery__rail-arrow:focus-visible {
    outline: 2px solid var(--pdp-active-line);
    outline-offset: 2px;
  }
  .shopds-product-gallery__rail-arrow--up {
    top: 4px;
  }
  .shopds-product-gallery__rail-arrow--down {
    bottom: 4px;
  }
  .shopds-product-gallery__rail-arrow svg {
    width: 18px;
    height: 18px;
  }
  body .shopds-product-page.shopds-pdp-desktop .shopds-product-gallery__thumbnail-button {
    position: relative;
    padding: 2px 2px 2px 9px;
    border: 0 !important;
    border-radius: 0;
    background: transparent !important;
  }
  body .shopds-product-page.shopds-pdp-desktop .shopds-product-gallery__thumbnail-button::before {
    content: "";
    position: absolute;
    left: 0;
    top: 8px;
    bottom: 8px;
    width: 2px;
    background: var(--brand-shop-gradient);
    opacity: 0;
    pointer-events: none;
  }
  body .shopds-product-page.shopds-pdp-desktop .shopds-product-gallery__thumbnail-button:is([aria-pressed="true"], :hover)::before {
    opacity: .5;
  }
}
