body#product .product__right .vp-product-media { padding: 1rem 0 .8rem; }
body#product .product__right .vp-product-media h2 {
  margin: 0 0 .45rem;
  font: 400 1.12rem/1.3 Georgia, serif;
}
body#product .vp-product-media-list { gap: .5rem .75rem; }
body#product .product__right .vp-product-media-tile {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: .25rem;
  width: 78px;
  min-height: 44px;
  padding: 0;
  border: 0;
  background: transparent;
  text-align: center;
  overflow-wrap: anywhere;
}
body#product .product__right .vp-product-media-tile img {
  width: 62px;
  height: 62px;
  border: 1px solid #e3d3c3;
  border-radius: 50%;
}
body#product .product__right .vp-product-media-tile span[aria-hidden] {
  position: absolute;
  top: 41px;
  right: 7px;
  display: grid;
  place-items: center;
  width: 23px;
  height: 23px;
  border-radius: 50%;
  background: #213337;
  color: #fff9f3;
  font-size: .66rem;
}
body#product .vp-gallery-video-thumb { position: relative; }
body#product .vp-gallery-video-thumb::after {
  content: "▶";
  position: absolute;
  inset: 50% auto auto 50%;
  transform: translate(-50%, -50%);
  padding: .13rem .4rem;
  border-radius: .25rem;
  background: #213337;
  color: #fff9f3;
}

/* The slide sets the frame; the media fills it at its original proportions. */
body#product .vooby-product-layout .product__images .product__carousel .carousel-inner > .carousel-item {
  aspect-ratio: 4 / 5;
  height: auto !important;
  overflow: hidden;
}
body#product .vooby-product-layout .product__images .product__carousel .carousel-inner > .carousel-item > picture {
  position: absolute;
  inset: 0;
  display: block;
}
body#product .vooby-product-layout .product__images .product__carousel .carousel-inner > .carousel-item > picture > img,
body#product .vooby-product-layout .product__images .product__carousel .carousel-inner > .carousel-item > .vp-gallery-video {
  display: block;
  width: 100% !important;
  height: 100% !important;
  object-fit: cover !important;
  object-position: center;
}
body#product .product__right .vp-product-media-tile video {
  display: block;
  width: 100%;
  aspect-ratio: 1;
  object-fit: cover;
  border-radius: 50%;
}
body#product .vp-product-media-tile :is(img,video)[hidden] { display: none !important; }

body#product .vooby-product-layout { max-width: none; }
body#product .vp-gallery-zoom {
  position: absolute;
  inset: 0;
  z-index: 2;
  width: 100%;
  padding: 0;
  border: 0;
  background: transparent;
  cursor: zoom-in;
}
body#product .vp-gallery-zoom:focus-visible {
  outline: 2px solid #213337;
  outline-offset: -3px;
}
body#product .vooby-product-layout .product__images .product__thumbnails {
  display: none !important;
}
body#product .product__carousel .vp-gallery-progress {
  position: relative;
  inset: auto;
  gap: 4px;
  margin: 0 auto;
  max-width: 68%;
}
body#product .vp-gallery-progress button[data-bs-slide-to] {
  flex: 1 1 0;
  max-width: 42px;
  min-width: 0;
  margin: 0;
  background-color: #293b40;
  opacity: .25;
}
body#product .vp-gallery-progress button.active { opacity: 1; }
@media (min-width: 992px) {
  body#product .vooby-product-layout > .product__right {
    max-height: calc(100dvh - var(--vp-product-stick-top, 78px) - 12px);
    overflow-y: auto;
  }
  body#product .vooby-product-layout .product__images .product__carousel > .carousel-inner {
    grid-template-columns: repeat(6, minmax(0, 1fr)) !important;
  }
  body#product .vooby-product-layout .product__images .product__carousel .carousel-inner > .carousel-item {
    grid-column: span 3 !important;
  }
  body#product .vooby-product-layout .product__images .product__carousel .carousel-inner > .carousel-item:nth-child(n+5):nth-child(-n+7) {
    grid-column: span 2 !important;
  }
  body#product .vooby-product-layout .product__images .product__carousel .carousel-inner > .carousel-item:nth-child(n+10),
  body#product .vooby-product-layout .product__images .product__carousel > [data-bs-slide],
  body#product .vp-gallery-progress {
    display: none !important;
  }
}
@media (max-width: 991px) {
  body#product .vooby-product-layout .product__images .product__carousel > .carousel-inner {
    overflow: hidden !important;
  }
  body#product .vooby-product-layout .product__images .product__carousel > [data-bs-slide],
  body#product .vooby-product-layout .product__images .vp-photo-show-all,
  body#product .vp-gallery-progress[hidden] {
    display: none !important;
  }
  body#product .vooby-product-layout .product__images > .product__carousel > .carousel-inner > .carousel-item {
    aspect-ratio: 4 / 5;
    background: #f6f6f6;
  }
}
body#product #product-modal .modal-content { background: #faf8f5; }
body#product #product-modal .modal-header { justify-content: flex-end; }
body#product #product-modal .modal-header .btn-close { margin: 0; }
body#product #product-modal [data-vp-photo-scroll] {
  position: relative;
  flex: 1 1 0;
  min-height: 0;
  overflow: auto;
  padding: 0;
  overscroll-behavior: contain;
}
body#product #product-modal .vp-fullscreen-photo {
  display: grid;
  place-items: center;
  height: calc(100dvh - 65px);
}
body#product #product-modal .vp-fullscreen-photo picture,
body#product #product-modal .vp-fullscreen-photo img {
  display: block;
  width: 100%;
  height: 100%;
  min-height: 0;
  object-fit: contain;
}

/* Galerie produit en portrait, indépendamment du nombre de photos. */
@media (min-width: 992px) {
  body#product .vooby-product-layout .product__images > .product__carousel[id^="product-images-"] > .carousel-inner > .carousel-item {
    aspect-ratio: 4 / 5 !important;
    height: auto !important;
  }

  body#product .vooby-product-layout .product__images > .product__carousel[id^="product-images-"] > .carousel-inner > .carousel-item > picture > img {
    width: 100% !important;
    height: 100% !important;
    object-fit: cover !important;
  }
}

/* Fullscreen gallery controls on desktop and mobile. */
@media all{
 body#product #product-modal.vp-desktop-photo-viewer{position:fixed!important;inset:0!important;z-index:2147483647!important;width:100vw!important;height:100dvh!important;padding:0!important;overflow:hidden!important;background:#faf8f5}
 body#product #product-modal.vp-desktop-photo-viewer .modal-dialog{width:100%!important;max-width:none!important;height:100%!important;margin:0!important;transform:none!important}
 body#product #product-modal.vp-desktop-photo-viewer .modal-content{display:flex!important;flex-direction:column!important;width:100%!important;height:100%!important;min-height:0!important;overflow:hidden!important;border:0!important;border-radius:0!important}
 body#product #product-modal.vp-desktop-photo-viewer .modal-header{display:flex!important;align-items:center!important;justify-content:space-between!important;flex:0 0 56px!important;min-height:56px!important;padding:6px 20px!important;border:0!important}
 body#product #product-modal.vp-desktop-photo-viewer .modal-header .btn-close{width:40px!important;height:40px!important;box-sizing:border-box!important;margin:0!important;opacity:1}
 body#product #product-modal.vp-desktop-photo-viewer [data-vp-photo-scroll]{position:relative!important;display:block!important;flex:1 1 0!important;min-height:0!important;overflow:hidden!important;padding:0 76px!important;overscroll-behavior:contain}
 body#product #product-modal.vp-desktop-photo-viewer .vp-fullscreen-photos,body#product #product-modal.vp-desktop-photo-viewer .vp-fullscreen-photo-list{width:100%!important;height:100%!important;min-height:0!important}
 body#product #product-modal.vp-desktop-photo-viewer .vp-fullscreen-photo{height:100%!important;width:100%!important;min-height:0!important;place-items:center!important;overflow:hidden!important}
 body#product #product-modal.vp-desktop-photo-viewer .vp-fullscreen-photo[hidden]{display:none!important}
 body#product #product-modal.vp-desktop-photo-viewer .vp-photo-current{display:grid!important}
 body#product #product-modal.vp-desktop-photo-viewer .vp-fullscreen-photo picture{display:flex!important;align-items:center!important;justify-content:center!important;max-width:100%!important;height:100%!important;min-height:0!important}
 body#product #product-modal.vp-desktop-photo-viewer .vp-fullscreen-photo img{width:100%!important;height:100%!important;max-height:100%!important;max-width:100%!important;object-fit:contain!important;object-position:center!important}
 body#product #product-modal.vp-desktop-photo-viewer .vp-photo-step{position:absolute;top:50%;transform:translateY(-50%);z-index:3;display:grid;place-items:center;width:48px;height:56px;border:1px solid #d5ccc1;border-radius:8px;background:#fffaf6;color:#213337;font:38px/1 Arial,sans-serif;cursor:pointer}
 body#product #product-modal.vp-desktop-photo-viewer .vp-photo-previous{left:16px}body#product #product-modal.vp-desktop-photo-viewer .vp-photo-next{right:16px}
 body#product #product-modal.vp-desktop-photo-viewer .vp-photo-counter{font:600 14px/1.5 Arial,sans-serif;color:#213337}
 body#product #product-modal.vp-desktop-photo-viewer .vp-photo-caption{flex:0 0 auto;margin:0;padding:10px 24px 4px;max-width:100%;overflow:hidden;white-space:nowrap;text-overflow:ellipsis;text-align:center;font:13px/1.5 Arial,sans-serif;color:#465652}
 body#product #product-modal.vp-desktop-photo-viewer .vp-photo-navigation{display:flex;flex:0 0 auto;gap:8px;max-width:100%;overflow-x:auto;margin:0 auto;padding:8px 20px 14px}
 body#product #product-modal.vp-desktop-photo-viewer .vp-photo-navigation button{flex:0 0 40px;height:40px;min-width:40px;padding:0;border:1px solid #d8cfc4;border-radius:6px;background:#fffaf6;color:#213337;font:14px Arial,sans-serif;cursor:pointer}
 body#product #product-modal.vp-desktop-photo-viewer .vp-photo-navigation button[aria-current="true"]{background:#213337;color:#fffaf6;border-color:#213337}
 body#product #product-modal.vp-desktop-photo-viewer :is(.vp-photo-step,.vp-photo-navigation)[hidden]{display:none!important}
 body#product #product-modal.vp-desktop-photo-viewer button:focus-visible{outline:3px solid #a4774d;outline-offset:3px}
}
@media(max-width:991px){
 body#product #product-modal.vp-desktop-photo-viewer [data-vp-photo-scroll]{padding:0 40px!important;touch-action:pan-y pinch-zoom}
 body#product #product-modal.vp-desktop-photo-viewer .vp-photo-step{width:34px;height:48px;font-size:30px}
 body#product #product-modal.vp-desktop-photo-viewer .vp-photo-previous{left:3px}
 body#product #product-modal.vp-desktop-photo-viewer .vp-photo-next{right:3px}
 body#product #product-modal.vp-desktop-photo-viewer .vp-photo-caption{font-size:11px;padding:5px 12px}
 body#product #product-modal.vp-desktop-photo-viewer .vp-photo-navigation{gap:5px;padding:6px 10px 12px}
 body#product #product-modal.vp-desktop-photo-viewer .vp-photo-navigation button{flex-basis:36px;min-width:36px;height:36px}
}
