/* Novo catalogue cards: compact grid, full-width imagery and one visual axis. */
.layout-full-width .products,
.layout-left-column .products,
.layout-right-column .products,
.layout-both-columns .products {
  column-gap: 0.75rem;
  row-gap: 1rem;
}

.product-miniature__top,
.product-miniature__image-container,
.product-miniature__image-link,
.product-miniature__image {
  width: 100%;
}

.product-miniature__bottom {
  align-items: center;
  padding: 0.75rem 0.25rem;
  text-align: center;
}

.product-miniature__infos,
.product-miniature__actions {
  width: 100%;
}

.product-miniature__prices,
.product-miniature__variants,
.product-miniature__actions,
.product-miniature__form,
.product-miniature .product-list-review {
  justify-content: center;
}

/* Skip layout and paint work for cards that are still well below the fold. */
@supports (content-visibility: auto) {
  .page-category .products > .product-miniature:nth-child(n + 5) {
    content-visibility: auto;
    contain-intrinsic-size: auto 34rem;
  }
}

@media (min-width: 576px) {
  .layout-full-width .products,
  .layout-left-column .products,
  .layout-right-column .products,
  .layout-both-columns .products {
    column-gap: 1rem;
    row-gap: 1.25rem;
  }
}

/* Curated homepage cards use the same square, compact and centred system. */
.novofeatured {
  padding-inline: max(0.75rem, calc((100% - 82rem) / 2));
}

.novofeatured__grid {
  gap: 1rem;
}

.novofeatured__image-link {
  aspect-ratio: 1;
}

.novofeatured__image-link img {
  transform: scale(1);
}

.novofeatured__image-link:hover img,
.novofeatured__image-link:focus-visible img {
  transform: scale(1.04);
}

.novofeatured__card-body {
  text-align: center;
}

.novofeatured__card-meta {
  flex-direction: column;
  justify-content: center;
}

/* Product gallery list semantics and marketplace seller contrast (WCAG AA). */
.page-product .product__thumbnail-item {
  min-width: 0;
  list-style: none;
}

.page-product .product__thumbnail-item > .product__thumbnail {
  width: 100%;
}

/* Compact product gallery: one horizontal row, fixed access to the full
 * lightbox and an optional video tile. The image carousel and PrestaShop's
 * combination refresh remain the source of truth. */
.page-product .novo-product-gallery {
  display: grid;
  grid-template-columns: 2.5rem minmax(0, 1fr) 2.5rem 5.5rem;
  gap: 0.625rem;
  align-items: stretch;
  margin-top: 1rem;
}

.page-product .novo-product-gallery__strip {
  min-width: 0;
  margin: 0;
  overflow-x: auto;
  overflow-y: hidden;
  overscroll-behavior-inline: contain;
  scroll-behavior: smooth;
  scroll-snap-type: inline proximity;
  scrollbar-width: none;
}

.page-product .novo-product-gallery__strip::-webkit-scrollbar {
  display: none;
}

.page-product .novo-product-gallery .product__thumbnails-list {
  display: flex;
  flex-wrap: nowrap;
  gap: 0.625rem;
  width: max-content;
  margin: 0;
  padding: 0;
}

.page-product .novo-product-gallery .product__thumbnail-item {
  flex: 0 0 5.25rem;
  width: 5.25rem;
  scroll-snap-align: start;
}

.page-product .novo-product-gallery .product__thumbnail,
.page-product .novo-product-gallery__all,
.page-product .marketplaceebikes-video__button {
  aspect-ratio: 1;
  min-height: 0;
  border: 1px solid var(--bs-border-color);
  border-radius: var(--bs-border-radius);
  background: var(--bs-body-bg);
}

.page-product .novo-product-gallery .product__thumbnail.active,
.page-product .novo-product-gallery .product__thumbnail:hover,
.page-product .novo-product-gallery .product__thumbnail:focus-visible {
  border-color: var(--bs-primary);
}

.page-product .novo-product-gallery__scroll {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 2.5rem;
  padding: 0;
  border: 1px solid var(--bs-border-color);
  background: var(--bs-body-bg);
  color: var(--bs-body-color);
  font-size: 2rem;
  line-height: 1;
}

.page-product .novo-product-gallery__scroll:disabled {
  opacity: 0.35;
  cursor: default;
}

.page-product .novo-product-gallery__all,
.page-product .marketplaceebikes-video__button {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.125rem;
  width: 100%;
  padding: 0.375rem;
  color: var(--bs-primary);
  text-align: center;
}

.page-product .novo-product-gallery__all-count,
.page-product .marketplaceebikes-video__play {
  font-size: 1.125rem;
  font-weight: 700;
  line-height: 1;
}

.page-product .novo-product-gallery__all-label,
.page-product .marketplaceebikes-video__label {
  font-size: 0.75rem;
  line-height: 1.1;
}

.page-product .novo-product-gallery .marketplaceebikes-video {
  margin: 0;
  height: 100%;
}

/* The full video block also contains SEO copy and a transcript. Inside the
 * compact thumbnail rail only the poster/play control belongs in the tile;
 * leaving the supporting copy in-flow makes the whole rail hundreds of
 * pixels tall. */
.page-product .novo-product-gallery .marketplaceebikes-video__button {
  position: relative;
  overflow: hidden;
  padding: 0;
}

.page-product .novo-product-gallery .marketplaceebikes-video__thumbnail-wrap {
  display: block;
  flex: 1 1 100%;
  width: 100%;
  height: 100%;
  aspect-ratio: 1;
  overflow: hidden;
  position: relative;
}

.page-product .novo-product-gallery .marketplaceebikes-video__thumbnail {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.page-product .novo-product-gallery .marketplaceebikes-video__play {
  position: absolute;
  top: 50%;
  left: 50%;
  display: flex;
  width: 2.5rem;
  height: 2.5rem;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.72);
  color: #fff;
  transform: translate(-50%, -50%);
}

.page-product .novo-product-gallery .marketplaceebikes-video__copy,
.page-product .novo-product-gallery .marketplaceebikes-video__description,
.page-product .novo-product-gallery .marketplaceebikes-video__transcript {
  display: none;
}

@media (max-width: 767.98px) {
  .page-product .novo-product-gallery {
    grid-template-columns: minmax(0, 1fr) 4.75rem;
    gap: 0.5rem;
  }

  .page-product .novo-product-gallery__scroll {
    display: none;
  }

  .page-product .novo-product-gallery .product__thumbnail-item {
    flex-basis: 4.75rem;
    width: 4.75rem;
  }
}

.page-product .mp_shop_seller_detail .product_review_shop .col,
.page-product .mp_shop_seller_detail .product_review_shop .col span,
.page-product .mp_shop_seller_detail a.mp_link_contact_form:not(:hover) {
  color: #595959;
}

/* Keep long sort labels inside the mobile catalogue viewport. */
@media (max-width: 575.98px) {
  .products__sort-dropdown {
    width: 100%;
    max-width: 100%;
    min-width: 0;
  }

  .products__sort-dropdown-button {
    width: 100%;
    max-width: 100%;
    min-width: 0;
    justify-content: space-between;
    text-align: left;
    white-space: normal;
  }

  #searchCanvas {
    width: 100vw;
    max-width: 100vw;
  }
}

@media (min-width: 40rem) {
  .novofeatured__grid {
    gap: 1.25rem 1rem;
  }
}
