.mimidog-product-gallery {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
  padding: 18px;
}

.mimidog-product-gallery__stage {
  position: relative;
  overflow: hidden;
  border-radius: 22px;
  background: linear-gradient(135deg, #edf3ee 0%, #f7f2ea 100%);
  min-height: 520px;
}

.mimidog-product-gallery__track {
  position: relative;
  min-height: 520px;
}

.mimidog-product-gallery__slide {
  display: none;
  height: 100%;
}

.mimidog-product-gallery__slide.is-active {
  display: block;
}

.mimidog-product-gallery__image-button {
  display: block;
  width: 100%;
  height: 520px;
  padding: 0;
  border: 0;
  background: #f3f5f2;
  cursor: zoom-in;
}

.mimidog-product-gallery__slide img,
.mimidog-product-gallery__video-wrap,
.mimidog-product-gallery__video {
  width: 100%;
  height: 520px;
}

.mimidog-product-gallery__slide img {
  display: block;
  object-fit: contain;
  object-position: center;
  background: #f3f5f2;
}

.mimidog-product-gallery__video-wrap {
  position: relative;
  background: #000;
  overflow: hidden;
}

.mimidog-product-gallery__video {
  display: block;
  object-fit: contain;
  object-position: center;
  background: #000;
}

.mimidog-product-gallery__open-overlay {
  position: absolute;
  top: 16px;
  right: 16px;
  z-index: 5;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 42px;
  padding: 0;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.72);
  background: rgba(255, 255, 255, 0.92);
  color: #111;
  font-size: 18px;
  font-weight: 700;
  line-height: 1;
  box-shadow: 0 10px 22px rgba(0, 0, 0, 0.16);
  backdrop-filter: blur(8px);
  cursor: zoom-in;
  transition: transform 0.18s ease, box-shadow 0.18s ease, background-color 0.18s ease;
}

.mimidog-product-gallery__open-overlay:hover {
  transform: scale(1.04);
  box-shadow: 0 12px 26px rgba(0, 0, 0, 0.18);
}

.mimidog-product-gallery__status {
  position: absolute;
  top: 16px;
  left: 16px;
  z-index: 4;
}

.mimidog-gallery-arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 6;
  width: 46px;
  height: 46px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.65);
  background: rgba(255, 255, 255, 0.9);
  color: #111;
  font-size: 18px;
  font-weight: 700;
  line-height: 1;
  box-shadow: 0 10px 22px rgba(0, 0, 0, 0.12);
  backdrop-filter: blur(8px);
  cursor: pointer;
  transition: transform 0.18s ease, box-shadow 0.18s ease, background-color 0.18s ease;
}

.mimidog-gallery-arrow:hover {
  transform: translateY(-50%) scale(1.03);
  box-shadow: 0 12px 26px rgba(0, 0, 0, 0.14);
}

.mimidog-gallery-arrow--prev {
  left: 16px;
}

.mimidog-gallery-arrow--next {
  right: 16px;
}

.mimidog-product-gallery__thumbs {
  margin-top: 14px;
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 10px;
}

.mimidog-product-gallery__thumb {
  position: relative;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 16px;
  overflow: hidden;
  background: #fff;
  cursor: pointer;
  transition: transform 0.18s ease, border-color 0.18s ease, box-shadow 0.18s ease;
}

.mimidog-product-gallery__thumb:hover {
  transform: translateY(-1px);
}

.mimidog-product-gallery__thumb.is-active {
  border-color: var(--primary);
  box-shadow: 0 0 0 2px rgba(35, 98, 63, 0.18);
}

.mimidog-product-gallery__thumb img {
  width: 100%;
  height: 92px;
  object-fit: cover;
  display: block;
  background: #f3f5f2;
}

.mimidog-product-gallery__thumb-badge {
  position: absolute;
  left: 8px;
  bottom: 8px;
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  padding: 0 8px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.94);
  border: 1px solid rgba(255, 255, 255, 0.7);
  color: #111;
  font-size: 11px;
  font-weight: 700;
  line-height: 1;
  box-shadow: 0 6px 14px rgba(0, 0, 0, 0.1);
}

.mimidog-product-gallery__overlay {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background: rgba(0, 0, 0, 0.9);
}

.mimidog-product-gallery__overlay[hidden] {
  display: none;
}

.mimidog-product-gallery__overlay-content {
  position: relative;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: center;
  max-width: calc(100vw - 48px);
  max-height: calc(100vh - 48px);
}

.mimidog-product-gallery__overlay-image,
.mimidog-product-gallery__overlay-video {
  display: block;
  width: auto;
  height: auto;
  max-width: calc(100vw - 48px);
  max-height: calc(100vh - 48px);
  object-fit: contain;
  object-position: center;
}

.mimidog-product-gallery__overlay-video {
  background: #000;
}

.mimidog-product-gallery__overlay-close,
.mimidog-product-gallery__overlay-arrow {
  position: absolute;
  z-index: 3;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.45);
  background: rgba(255, 255, 255, 0.92);
  color: #111;
  font-weight: 800;
  line-height: 1;
  box-shadow: 0 14px 34px rgba(0, 0, 0, 0.22);
  cursor: pointer;
  transition: transform 0.18s ease, background-color 0.18s ease, box-shadow 0.18s ease;
}

.mimidog-product-gallery__overlay-close:hover,
.mimidog-product-gallery__overlay-arrow:hover {
  transform: scale(1.04);
  box-shadow: 0 16px 38px rgba(0, 0, 0, 0.26);
}

.mimidog-product-gallery__overlay-close {
  top: 18px;
  right: 18px;
  width: 48px;
  height: 48px;
  font-size: 30px;
}

.mimidog-product-gallery__overlay-arrow {
  top: 50%;
  width: 52px;
  height: 52px;
  font-size: 22px;
}

.mimidog-product-gallery__overlay-arrow--prev {
  left: 18px;
  transform: translateY(-50%);
}

.mimidog-product-gallery__overlay-arrow--next {
  right: 18px;
  transform: translateY(-50%);
}

.mimidog-product-gallery__overlay-arrow--prev:hover,
.mimidog-product-gallery__overlay-arrow--next:hover {
  transform: translateY(-50%) scale(1.04);
}

html.mimidog-gallery-overlay-is-open,
body.mimidog-gallery-overlay-is-open {
  overflow: hidden;
}

.mimidog-product-gallery .status-badge {
  display: inline-flex;
  align-items: center;
  min-height: 34px;
  padding: 0 12px;
  border-radius: 999px;
  border: 1px solid transparent;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.01em;
}

.mimidog-product-gallery .status-badge--available {
  background: #eaf6ef;
  border-color: #cfe7d8;
  color: #1f5a3a;
}

.mimidog-product-gallery .status-badge--reserved {
  background: #fbf3e3;
  border-color: #e8d6a8;
  color: #8a6420;
}

.mimidog-product-gallery .status-badge--sold {
  background: #f1eeea;
  border-color: #d8d1c7;
  color: #6a6258;
}

.mimidog-product-gallery .status-badge--announcement {
  background: #eef1f7;
  border-color: #d5dbe8;
  color: #4f5f7a;
}

@media (max-width: 1200px) {
  .mimidog-product-gallery__stage,
  .mimidog-product-gallery__track,
  .mimidog-product-gallery__image-button,
  .mimidog-product-gallery__slide img,
  .mimidog-product-gallery__video-wrap,
  .mimidog-product-gallery__video {
    min-height: 480px;
    height: 480px;
  }
}

@media (max-width: 1024px) {
  .mimidog-product-gallery__stage,
  .mimidog-product-gallery__track,
  .mimidog-product-gallery__image-button,
  .mimidog-product-gallery__slide img,
  .mimidog-product-gallery__video-wrap,
  .mimidog-product-gallery__video {
    min-height: 440px;
    height: 440px;
  }

  .mimidog-product-gallery__thumbs {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}

@media (max-width: 640px) {
  .mimidog-product-gallery {
    padding: 12px;
    border-radius: 20px;
  }

  .mimidog-product-gallery__stage {
    border-radius: 18px;
  }

  .mimidog-product-gallery__stage,
  .mimidog-product-gallery__track,
  .mimidog-product-gallery__image-button,
  .mimidog-product-gallery__slide img,
  .mimidog-product-gallery__video-wrap,
  .mimidog-product-gallery__video {
    min-height: 320px;
    height: 320px;
  }

  .mimidog-product-gallery__thumbs {
    margin-top: 10px;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 8px;
  }

  .mimidog-product-gallery__thumb {
    border-radius: 12px;
  }

  .mimidog-product-gallery__thumb img {
    height: 72px;
  }

  .mimidog-product-gallery__thumb-badge {
    left: 6px;
    bottom: 6px;
    min-height: 22px;
    padding: 0 7px;
    font-size: 10px;
  }

  .mimidog-gallery-arrow {
    width: 40px;
    height: 40px;
    font-size: 16px;
  }

  .mimidog-gallery-arrow--prev {
    left: 10px;
  }

  .mimidog-gallery-arrow--next {
    right: 10px;
  }

  .mimidog-product-gallery__open-overlay {
    top: 10px;
    right: 10px;
    width: 38px;
    height: 38px;
    font-size: 16px;
  }

  .mimidog-product-gallery__status {
    top: 10px;
    left: 10px;
  }

  .mimidog-product-gallery__overlay {
    padding: 12px;
  }

  .mimidog-product-gallery__overlay-content,
  .mimidog-product-gallery__overlay-image,
  .mimidog-product-gallery__overlay-video {
    max-width: calc(100vw - 24px);
    max-height: calc(100vh - 24px);
  }

  .mimidog-product-gallery__overlay-close {
    top: 12px;
    right: 12px;
    width: 42px;
    height: 42px;
    font-size: 26px;
  }

  .mimidog-product-gallery__overlay-arrow {
    width: 42px;
    height: 42px;
    font-size: 18px;
  }

  .mimidog-product-gallery__overlay-arrow--prev {
    left: 12px;
  }

  .mimidog-product-gallery__overlay-arrow--next {
    right: 12px;
  }
}
/* ---- Горизонтальная лента миниатюр (работает на всех разрешениях) ---- */
.mimidog-product-gallery__thumbs {
  display: flex;
  flex-wrap: nowrap;
  overflow-x: auto;
  gap: 10px;
  margin-top: 14px;
  padding-bottom: 8px;       /* чтобы скроллбар не наезжал на миниатюры */
  scroll-behavior: smooth;   /* плавная прокрутка (если нет JS) */
  -webkit-overflow-scrolling: touch;
}

.mimidog-product-gallery__thumb {
  flex: 0 0 auto;
  width: 90px;              /* подберите под свой вкус */
  border: 1px solid var(--line);
  border-radius: 16px;
  overflow: hidden;
  background: #fff;
  cursor: pointer;
  transition: transform 0.18s ease, border-color 0.18s ease, box-shadow 0.18s ease;
}

.mimidog-product-gallery__thumb img {
  width: 100%;
  height: 90px;
  object-fit: cover;
  display: block;
  background: #f3f5f2;
}

/* При желании убрать полосу прокрутки визуально (но прокрутка останется) */
.mimidog-product-gallery__thumbs::-webkit-scrollbar {
  height: 4px;
}
.mimidog-product-gallery__thumbs::-webkit-scrollbar-thumb {
  background: #ccc;
  border-radius: 2px;
}

/* Если на мобильных вы хотите оставить 4 колонки в сетке, 
   можете обернуть эти стили в @media (min-width: 641px) { ... } */
