.product-detail__media-gallery {
  --padding-inline-start: calc(
    var(--detail-padding-inline-start, 0px) + var(--page-padding, 0px)
  );
  --padding-inline-end: calc(
    var(--detail-padding-inline-end, 0px) + var(--page-padding, 0px)
  );
  display: block;
}

@media (max-width: 959px) {
  .product-detail__media-gallery {
    margin-inline: unset;
  }
}

.product-detail__media-gallery .media-gallery__placeholder {
  width: 100%;
  cursor: default;
  background-color: rgb(var(--color-image-background));
}

.product-detail__media-gallery .media-gallery__placeholder svg {
  width: 100%;
  height: 100%;
}

.product-detail__media-gallery .media-gallery__content {
  display: flex;
  flex-direction: column;
  gap: 14px;
  align-items: center;
  width: 100%;
}

.product-detail__media-gallery .media-gallery__list-wrapper {
  --gap: 12px;

  width: 100%;
}

.product-detail__media-gallery .media-gallery__sticky-wrapper {
  position: relative;
}
.media-gallery__sticky-wrapper .product-detail__media-gallery-layer .zg-new-or-best-seller-tag {
  opacity: 0.8;
  text-align: center;
  font-family: NeutrafaceText-Book;
  position: absolute;
  top: 20px;
  right: 15px;
  background-color: rgb(255, 255, 255);
  padding: 5px 15px;
  font-size: 14px;
  font-weight: 400;
  color: rgb(0, 0, 0);
  border-radius: 30px;
  border: 1px solid rgb(229, 229, 229);
  z-index: 2;
}

.product-detail__media-gallery .media-gallery__list {
  gap: var(--gap, 0);
  align-items: center;
  width: 100%;
  padding: 0;
  margin: 0;
  overflow-y: hidden;
  list-style: none;
}

@media (min-width: 960px) {
  .product-detail__media-gallery .media-gallery__list {
    scroll-behavior: auto;
  }
}

.product-detail__media-gallery .media-gallery__list::before {
  display: block;
  flex-shrink: 0;
  width: 100%;
  height: auto;
  aspect-ratio: var(--min-aspect-ratio);
  content: "";
}

.product-detail__media-gallery .media-gallery__preview-icon {
  position: absolute;
  inset-block-end: 20px;
  inset-inline-end: 20px;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 10%;
  min-width: 30px;
  max-width: 60px;
  pointer-events: none;
  transition: opacity 0.2s;
}

@media (min-width: 960px) {
  .product-detail__media-gallery .media-gallery__preview-icon {
    opacity: 0;
  }
}

.product-detail__media-gallery .media-gallery__preview-icon .icon {
  width: 100%;
  height: 100%;
}

.product-detail__media-gallery
  .media-gallery__item:hover
  .media-gallery__preview-icon {
  opacity: 1;
}

@media (max-width: 959px) {
  .product-detail__media-gallery
    .media-gallery__item:not(
      [data-media-type="video"],
      [data-media-type="external_video"]
    )
    .media-gallery__media::after {
    position: absolute;
    inset-block-start: 0;
    inset-inline-start: 0;
    z-index: 2;
    display: block;
    width: 100%;
    height: 100%;
    content: "";
    opacity: 0;
  }
}

.product-detail__media-gallery .media-gallery__media {
  position: relative;
  width: 100%;
  overflow: hidden;
}

.product-detail__media-gallery .media-gallery__image {
  display: block;
  width: 100%;
  height: auto;
}

.product-detail__media-gallery
  .media-gallery__video[data-loaded]
  + .media-gallery__preview-icon {
  display: none;
}

.product-detail__media-gallery .media-gallery__arrows {
  display: flex;
  gap: 14px;
  align-items: center;
  justify-content: center;
}

.product-detail__media-gallery .media-gallery__arrow {
  display: flex;
  align-items: center;
  padding: 6px;
  line-height: 1;
  cursor: pointer;
  background: none;
  border: none;
  justify-content: center;
}

.product-detail__media-gallery .media-gallery__arrow .icon {
  width: 10px;
  height: 10px;
}

.product-detail__media-gallery .media-gallery__arrow[name="previous"] .icon {
  transform: rotate(90deg);
}

.product-detail__media-gallery .media-gallery__arrow[name="next"] .icon {
  transform: rotate(-90deg);
}

.product-detail__media-gallery .media-gallery__arrow:disabled {
  cursor: not-allowed;
}

.product-detail__media-gallery .media-gallery__status {
  display: flex;
  align-items: center;
  line-height: 1;
}

.product-detail__media-gallery .media-gallery__pagination {
  display: flex;
  gap: 3px;
  align-items: center;
  justify-content: center;
  max-width: 85%;
  padding: 2px 0;
}

.product-detail__media-gallery .media-gallery__pagination button[name="pager"] {
  flex: 1 0 0;
  width: 30px;
  max-width: 30px;
  height: 2px;
  background-color: rgba(var(--color-text), 0.2);
  border: none;
  transition: background-color 0.3s;
}

.product-detail__media-gallery
  .media-gallery__pagination
  button[name="pager"].is-active {
  background-color: rgb(var(--color-text));
}

.product-detail__media-gallery .media-gallery__thumbnails {
  position: relative;
  display: block;
  width: 100%;
  padding: 0 32px;
}

.product-detail__media-gallery .media-gallery__thumbnail-list {
  --gap: 14px;
  --columns: 5.6;
  --gap-columns: 6;

  gap: var(--gap, 0);
  width: 100%;
}

@media (max-width: 959px) {
  .product-detail__media-gallery
    .media-gallery__video
    + .media-gallery__preview-icon {
    display: none;
  }

  .product-detail__media-gallery
    .media-gallery__video
    .theme-video-media__play-button {
    inset-block-start: unset;
    inset-block-end: 20px;
    inset-inline-start: unset;
    inset-inline-end: 20px;
    width: 10%;
    min-width: 30px;
    max-width: 60px;
    transform: none;
  }
}

@media (max-width: 959px) {
  .product-detail__media-gallery .media-gallery__thumbnail-list {
    --columns: 4;
    --gap-columns: 4;
    --gap: 4px;
  }
  .product-detail__media-gallery .media-gallery__thumbnails {
    padding: 0;
  }

  .product-detail__media-gallery .media-gallery__arrow {
    padding: 12px 4px;
    height: 44px;
    width: 30px;
    background-color: rgba(255, 255, 255, .68);
  }
  
}

.product-detail__media-gallery .media-gallery__thumbnail {
  position: relative;
  width: 65px;
  aspect-ratio: 1;
  padding: 0;
  background: none;
  border: none;
  outline: none;
}

.product-detail__media-gallery .media-gallery__thumbnail img {
  aspect-ratio: 1;
}

@media (max-width: 960px) {
  .product-detail__media-gallery .media-gallery__thumbnail {
    width: calc((100vw - 8px * 3 - var(--page-padding) * 2) / 4);
  }
}

.product-detail__media-gallery .media-gallery__thumbnail::after {
  position: absolute;
  inset-block-start: 0;
  inset-inline-start: 0;
  display: block;
  width: 100%;
  height: 100%;
  cursor: pointer;
  content: "";
  box-shadow: inset 0 0 0 var(--border-thickness, 0) #3d3819;
  transition: box-shadow 0.1s;
}

.product-detail__media-gallery .media-gallery__thumbnail:hover,
.product-detail__media-gallery .media-gallery__thumbnail:focus,
.product-detail__media-gallery .media-gallery__thumbnail.is-select {
  --border-thickness: 2px;
}

.product-detail__media-gallery .media-gallery__thumbnail-image {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  aspect-ratio: 1;
}

.product-detail__media-gallery .media-gallery__thumbnail:hover .media-gallery__thumbnail-image,
.product-detail__media-gallery .media-gallery__thumbnail:focus .media-gallery__thumbnail-image,
.product-detail__media-gallery .media-gallery__thumbnail.is-select .media-gallery__thumbnail-image{
  transform: scale(0.9);
}

.product-detail__media-gallery
  .media-gallery__thumbnail-arrows
  button[name="previous"],
.product-detail__media-gallery
  .media-gallery__thumbnail-arrows
  button[name="next"] {
  position: absolute;
  inset-block-start: 50%;
  transform: translate(-50%, -50%);
}

.product-detail__media-gallery
  .media-gallery__thumbnail-arrows
  button[name="previous"] {
  inset-inline-start: 16px;
}

.product-detail__media-gallery
  .media-gallery__thumbnail-arrows
  button[name="next"] {
  inset-inline-start: calc(100% - 16px);
}

.product-detail__media-gallery .media-gallery__thumbnail-play-icon {
  position: absolute;
  inset-block-start: 10px;
  inset-inline-end: 10px;
  width: 22px;
  height: 22px;
  background-color: #fff;
  border-radius: 50%;
}

.product-detail__media-gallery[data-init="true"] .media-gallery__item,
.product-detail__media-gallery .media-gallery__item.is-active {
  display: flex;
}

.product-detail__media-gallery[data-init="true"] .media-gallery__list::before {
  display: none;
}

.product-detail__media-gallery[data-disabled-preview="true"]
  .media-gallery__item {
  cursor: default;
}

.product-detail__media-gallery[data-disabled-preview="true"]
  .media-gallery__preview-icon {
  display: none;
}
.zg-pdp-media .media-gallery__sticky-wrapper .media-gallery__thumbnail {
  width: 100%;
}
.zg-pdp-media .media-gallery__sticky-wrapper .media-gallery__thumbnail.is-select {
  transform:none;
}
.zg-pdp-media .media-gallery__sticky-wrapper .media-gallery__thumbnail::after {
  box-shadow: none;
}

.media-gallery__thumbnails[data-direction="horizontal"] .carousel__track {
  height: fit-content;
}

@media (min-width: 960px) {
  .product-detail__media-gallery[data-desktop-layout="thumbnail-flatten"] .media-gallery__list-wrapper {
    flex: 1;
  }
  .product-detail__media-gallery[data-desktop-layout="thumbnail-flatten"]
    .media-gallery__list,
  .product-detail__media-gallery[data-desktop-layout="thumbnail-carousel"]
    .media-gallery__list {
    aspect-ratio: var(--aspect-ratio);
  }

  .product-detail__media-gallery[data-desktop-layout="thumbnail-flatten"]
    .media-gallery__item,
  .product-detail__media-gallery[data-desktop-layout="thumbnail-carousel"]
    .media-gallery__item {
    height: 100%;
  }
  .product-detail__media-gallery[data-desktop-layout="thumbnail-flatten"]
    .media-gallery__thumbnails {
    flex-wrap: wrap;
    padding: 0;
  }

  .product-detail__media-gallery[data-desktop-layout="thumbnail-flatten"]
    .media-gallery__thumbnail-list {
    --columns: 6;
    --gap-columns: 6;
  }

  .product-detail__media-gallery[data-desktop-layout="thumbnail-flatten"]
    .media-gallery__thumbnail-arrows {
    display: none;
  }

  .product-detail__media-gallery[data-desktop-layout="thumbnail-flatten"]
    .media-gallery__arrows {
    display: none;
  }

  .product-detail__media-gallery[data-desktop-layout="thumbnail-flatten"]
    .media-gallery__pagination {
    display: none;
  }
  .product-detail__media-gallery[data-desktop-layout="thumbnail-carousel"]
    .media-gallery__arrows {
    display: none;
  }

  .product-detail__media-gallery[data-desktop-layout="thumbnail-carousel"]
    .media-gallery__pagination {
    display: none;
  }
  .product-detail__media-gallery[data-desktop-layout="two-columns"]
    .media-gallery__list-wrapper {
    --gap: 4px;
  }

  .product-detail__media-gallery[data-desktop-layout="two-columns"]
    .media-gallery__item,
  .product-detail__media-gallery[data-desktop-layout="two-columns"]
    .media-gallery__sticky-wrapper {
    align-items: flex-start;
    width: calc((100% - var(--gap, 0)) / 2);
  }

  .product-detail__media-gallery[data-desktop-layout="two-columns"]
    .media-gallery__arrows {
    display: none;
  }

  .product-detail__media-gallery[data-desktop-layout="two-columns"]
    .media-gallery__pagination {
    display: none;
  }

  .product-detail__media-gallery[data-desktop-layout="two-columns"]
    .media-gallery__thumbnails {
    display: none;
  }
  .product-detail__media-gallery[data-desktop-layout="two-columns"][data-media-total="1"]
    .media-gallery__item,
  .product-detail__media-gallery[data-desktop-layout="two-columns"][data-media-total="1"]
    .media-gallery__sticky-wrapper {
    width: 100%;
  }
  .product-detail__media-gallery[data-desktop-layout="flatten"]
    .media-gallery__list-wrapper {
    display: flex;
    flex-wrap: wrap;
    gap: var(--gap, 0);
  }

  .product-detail__media-gallery[data-desktop-layout="flatten"]
    .media-gallery__item {
    align-items: flex-start;
    width: calc((100% - var(--gap, 0)) / 2);
  }

  .product-detail__media-gallery[data-desktop-layout="flatten"]
    .media-gallery__sticky-wrapper {
    width: 100%;
  }

  .product-detail__media-gallery[data-desktop-layout="flatten"]
    .media-gallery__arrows {
    display: none;
  }

  .product-detail__media-gallery[data-desktop-layout="flatten"]
    .media-gallery__pagination {
    display: none;
  }

  .product-detail__media-gallery[data-desktop-layout="flatten"]
    .media-gallery__thumbnails {
    display: none;
  }
  .product-detail__media-gallery[data-desktop-layout="two-columns"]
    .media-gallery__list-wrapper,
  .product-detail__media-gallery[data-desktop-layout="flatten"]
    .media-gallery__list-wrapper {
    display: flex;
    flex-wrap: wrap;
    gap: var(--gap, 0);
    align-items: flex-start;
  }

  .product-detail__media-gallery[data-desktop-layout="two-columns"]
    .media-gallery__sticky-wrapper,
  .product-detail__media-gallery[data-desktop-layout="flatten"]
    .media-gallery__sticky-wrapper {
    display: block;
  }

  .product-detail__media-gallery[data-desktop-layout="two-columns"]
    .media-gallery__sticky-wrapper
    .media-gallery__item,
  .product-detail__media-gallery[data-desktop-layout="flatten"]
    .media-gallery__sticky-wrapper
    .media-gallery__item {
    display: flex;
    width: 100%;
  }

  .product-detail__media-gallery[data-desktop-layout="two-columns"]
    .media-gallery__list,
  .product-detail__media-gallery[data-desktop-layout="flatten"]
    .media-gallery__list {
    display: contents;
  }

  .product-detail__media-gallery[data-desktop-layout="two-columns"]
    .media-gallery__list::before,
  .product-detail__media-gallery[data-desktop-layout="flatten"]
    .media-gallery__list::before {
    content: unset;
  }

  .product-detail__media-gallery[data-desktop-layout="two-columns"]
    .media-gallery__list
    .is-select,
  .product-detail__media-gallery[data-desktop-layout="flatten"]
    .media-gallery__list
    .is-select {
    display: none;
  }

  .product-detail__media-gallery[data-desktop-layout="two-columns"]
    .media-gallery__item,
  .product-detail__media-gallery[data-desktop-layout="flatten"]
    .media-gallery__item {
    display: flex;
  }
}

@media (max-width: 959px) {
  .product-detail__media-gallery[data-mobile-layout="two-columns"]
    .media-gallery__list {
    padding: 0 var(--padding-inline-start);
    scroll-padding-left: var(--padding-inline-start);
  }

  .product-detail__media-gallery[data-mobile-layout="two-columns"]
    .media-gallery__item,
  .product-detail__media-gallery[data-mobile-layout="two-columns"]
    .media-gallery__list::before {
    width: calc((100% - var(--gap, 0)) / 2);
  }

  .product-detail__media-gallery[data-mobile-layout="two-columns"]
    .media-gallery__pagination {
    display: none;
  }

  .product-detail__media-gallery[data-mobile-layout="two-columns"]
    .media-gallery__thumbnails {
    display: none;
  }
  .product-detail__media-gallery[data-mobile-layout="two-columns"][data-media-total="1"]
    .media-gallery__item,
  .product-detail__media-gallery[data-mobile-layout="two-columns"][data-media-total="1"]
    .media-gallery__list::before {
    width: 100%;
  }
  .product-detail__media-gallery[data-mobile-layout="two-columns"]:not(
      [data-init="true"]
    )
    .media-gallery__item.is-active
    + .media-gallery__item {
    display: flex;
  }
  .product-detail__media-gallery[data-mobile-layout="hide-thumbnail"]
    .media-gallery__list {
    padding: 0 var(--padding-inline-start);
    scroll-padding-left: var(--padding-inline-start);
  }

  .product-detail__media-gallery[data-mobile-layout="hide-thumbnail"]
    .media-gallery__pagination {
    display: none;
  }

  .product-detail__media-gallery[data-mobile-layout="hide-thumbnail"]
    .media-gallery__thumbnails {
    display: none;
  }
  .product-detail__media-gallery[data-mobile-layout="show-thumbnail"]
    .media-gallery__list,
  .product-detail__media-gallery[data-mobile-layout="show-thumbnail-flatten"]
    .media-gallery__list {
    padding: 0 var(--padding-inline-start);
    scroll-padding-left: var(--padding-inline-start);
  }

  .product-detail__media-gallery[data-mobile-layout="show-thumbnail"]
    .media-gallery__arrows,
  .product-detail__media-gallery[data-mobile-layout="show-thumbnail-flatten"]
    .media-gallery__arrows {
    display: none;
  }

  .product-detail__media-gallery[data-mobile-layout="show-thumbnail"]
    .media-gallery__pagination,
  .product-detail__media-gallery[data-mobile-layout="show-thumbnail-flatten"]
    .media-gallery__pagination {
    display: none;
  }
  .product-detail__media-gallery[data-mobile-layout="show-thumbnail-flatten"]
    .media-gallery__list {
    padding: 0;
    scroll-padding-left: 0;
  }

  .product-detail__media-gallery[data-mobile-layout="show-thumbnail-flatten"]
    .media-gallery__thumbnails {
    flex-wrap: wrap;
    padding: 0;
  }

  .product-detail__media-gallery[data-mobile-layout="show-thumbnail-flatten"]
    .media-gallery__thumbnail-arrows {
    display: none;
  }

  .product-detail__media-gallery[data-mobile-layout="fullscreen"] {
    margin-block-start: calc(-1 * var(--padding-block-start));
  }
  .product-detail__media-gallery[data-mobile-layout="fullscreen"]
    .media-gallery__arrows {
    display: none;
  }

  /* .product-detail__media-gallery[data-mobile-layout="fullscreen"]
    .media-gallery__thumbnails {
    display: none;
  } */
  .product-detail__media-gallery .media-gallery__thumbnail-arrows svg {
    fill: #000;
    width: 20px;
    height: 20px;
  }
}

@media (min-width: 960px) {
  .zg-pdp-media.product-detail__media-gallery .media-gallery__content {
    flex-direction: row-reverse;
    align-items: flex-start;
  }
  .zg-pdp-media.product-detail__media-gallery .media-gallery__thumbnails {
    flex: 0 0 96px;
    padding: 0;
  }
  .zg-pdp-media.product-detail__media-gallery .media-gallery__thumbnail-list {
    width: 100%;
    overflow-y: auto;
  }
  .zg-pdp-media.product-detail__media-gallery .media-gallery__thumbnail {
    width: 100%;
  }
  .zg-pdp-media.product-detail__media-gallery .media-gallery__thumbnail-arrows button[name="previous"] {
    inset-inline-start: 50%;
    inset-block-start: 1rem;
    background: rgba(255, 255, 255, .68);
    transform: translateX(-50%);
  }

  .zg-pdp-media.product-detail__media-gallery .media-gallery__thumbnail-arrows button[name="next"] {
    inset-inline-start: 50%;
    inset-block-start: unset;
    inset-block-end: .5rem;
    background: rgba(255,255,255,.68);
    transform: translateX(-50%);
  }

  .zg-pdp-media.product-detail__media-gallery .media-gallery__thumbnail-arrows button {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 4px 12px;
    height: 30px;
    width: 60px;
  }
  .zg-pdp-media.product-detail__media-gallery .media-gallery__thumbnail-arrows button[name="previous"] svg{
    transform: rotate(180deg);
  }
  .zg-pdp-media.product-detail__media-gallery .media-gallery__thumbnail-arrows button[name="next"] svg {
    transform: rotate(0deg);
  }
  .zg-pdp-media .media-gallery__sticky-wrapper {
    display: block;
  }
  .zg-pdp-media .media-gallery__thumbnails.pc-hidden {
    display: none;
  }
  .zg-pdp-media .media-gallery__thumbnails.mobile-hidden {
    display: block;
  }
}

@media (max-width: 959px) {
  .zg-pdp-media .media-gallery__sticky-wrapper {
    display: block;
  }
  .media-gallery__arrows {
    display: none;
  }
  .media-gallery__list-wrapper .media-gallery__sticky-wrapper .media-gallery__item {
    width: 100%;
  }
  .zg-pdp-media .media-gallery__thumbnails.mobile-hidden {
    display: none;
  }
  .zg-pdp-media .media-gallery__thumbnails.pc-hidden {
    display: block;
  }
  .product-detail__media-gallery .media-gallery__thumbnail-arrows button[name="next"] {
    inset-inline-start: calc(100% - 28px);
  }
  .product-detail__media-gallery .media-gallery__thumbnail-arrows button[name="previous"] {
    inset-inline-start: 20px;
  }
}


@media (min-width: 1801px) {
  .media-gallery__thumbnails[data-direction="vertical"] .carousel__track {
    height: 700px;
  }
}
@media (min-width: 960px) and (max-width: 1800px) {
  .media-gallery__thumbnails[data-direction="vertical"] .carousel__track {
    height: 600px;
  }
}

.media-gallery__list-wrapper .carousel__track.media-gallery__list {
  display: none;
}
 

