.wildhood-color-product-gallery {
  opacity: 1;
}

.wildhood-color-product-gallery .woocommerce-product-gallery__wrapper {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.wildhood-color-product-gallery .woocommerce-product-gallery__image {
  float: none !important;
  width: 100% !important;
  margin: 0;
  cursor: zoom-in;
}

.wildhood-color-product-gallery .woocommerce-product-gallery__image:focus-visible {
  outline: 2px solid currentColor;
  outline-offset: -2px;
}

.wildhood-color-product-gallery .woocommerce-product-gallery__image img {
  display: block;
  width: 100%;
  height: auto;
}

.wildhood-color-product-gallery .woocommerce-product-gallery__image--placeholder img {
  background: #f2f2f2;
}

@media (max-width: 1204px) {
  .wildhood-color-product-gallery.swiper {
    position: relative;
    width: 100%;
    overflow: hidden;
  }

  .wildhood-color-product-gallery.swiper .woocommerce-product-gallery__wrapper {
    flex-direction: row;
    gap: 0;
  }

  .wildhood-color-product-gallery.swiper .woocommerce-product-gallery__image {
    flex: 0 0 100%;
  }

  .wildhood-color-product-gallery__pagination.swiper-pagination {
    --swiper-pagination-color: #262b24;
    --swiper-pagination-bullet-inactive-color: #262b24;
    --swiper-pagination-bullet-inactive-opacity: 0.7;
    position: absolute;
    right: auto;
    bottom: 12px;
    left: 50%;
    z-index: 20;
    display: flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 auto;
    width: auto;
    gap: 8px;
    min-height: 12px;
    margin: 0;
    padding: 6px 8px;
    background: rgba(249, 247, 242, 0.82);
    border-radius: 999px;
    box-shadow: 0 2px 8px rgba(38, 43, 36, 0.12);
    line-height: 0;
    transform: translateX(-50%);
    pointer-events: auto;
  }

  .wildhood-color-product-gallery__pagination .swiper-pagination-bullet {
    width: 8px;
    height: 8px;
    margin: 0 !important;
    background: #262b24;
    opacity: 0.7;
  }

  .wildhood-color-product-gallery__pagination .swiper-pagination-bullet-active {
    background: #262b24;
    opacity: 1;
  }
}

body.wildhood-gallery-modal-open {
  overflow: hidden;
}

.wildhood-gallery-modal {
  position: fixed;
  inset: 0;
  z-index: 11000;
  background: #f8f6f1;
  visibility: hidden;
  opacity: 0;
  pointer-events: none;
  overflow-x: hidden;
  overflow-y: auto;
  overscroll-behavior: contain;
  scrollbar-width: none;
  transition: visibility 0s linear 280ms, opacity 280ms ease;
}

.wildhood-gallery-modal::-webkit-scrollbar {
  display: none;
}

.wildhood-gallery-modal.is-open {
  visibility: visible;
  opacity: 1;
  pointer-events: auto;
  transition-delay: 0s;
}

.wildhood-gallery-modal__dialog {
  width: 100%;
  min-height: 100%;
}

.wildhood-gallery-modal__dialog {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 8px;
  opacity: 0;
  transform: translateY(12px);
  transition: opacity 240ms ease, transform 280ms ease;
}

.wildhood-gallery-modal.is-open .wildhood-gallery-modal__dialog {
  opacity: 1;
  transform: translateY(0);
}

.wildhood-gallery-modal__item {
  width: 100%;
  margin: 0;
}

.wildhood-gallery-modal__image {
  display: block;
  width: 100%;
  height: auto;
}

.wildhood-gallery-modal__close {
  position: fixed;
  top: max(16px, env(safe-area-inset-top));
  right: max(16px, env(safe-area-inset-right));
  z-index: 2;
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  padding: 0;
  border: 1px solid rgba(38, 43, 36, 0.18);
  border-radius: 50%;
  color: #262b24;
  background: rgba(248, 246, 241, 0.9);
  font: inherit;
  font-size: 32px;
  line-height: 1;
  cursor: pointer;
  backdrop-filter: blur(8px);
}

.wildhood-gallery-modal__close:focus-visible {
  outline: 2px solid #ce4d28;
  outline-offset: 3px;
}

@media (prefers-reduced-motion: reduce) {
  .wildhood-gallery-modal,
  .wildhood-gallery-modal__dialog {
    transition: none;
  }
}
