/* =================== hc-pdp-gallery.css =================== */
/* hc-pdp-gallery - premium PDP gallery: tabs (Фото/360/Видео), big main image
 * with subtle gold-tinted bg and zoom-on-hover, thumbnail grid below with
 * gold-accent active state, and empty-state SVG placeholder when no images.
 * Strictly .hc-pdp-gallery / .hc-pdp-gallery__*. */

.hc-pdp-gallery {
position: relative;
  min-width: 0;
}

/* tabs (Фото / 360° / Видео / Схема) */
.hc-pdp-gallery__tabs {
display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 16px;
}
.hc-pdp-gallery__tab {
display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 16px;
  background: rgba(255, 252, 247, 0.86);
  border: 0.5px solid rgba(141, 109, 71, 0.18);
  border-radius: var(--hc-r-pill, 999px);
  font: inherit;
  font-family: var(--hc-mono, "JetBrains Mono", monospace);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--hc-ink-soft, rgba(26, 23, 20, 0.62));
  cursor: pointer;
  transition: background 0.18s ease, border-color 0.18s ease, color 0.18s ease, transform 0.18s ease;
}
.hc-pdp-gallery__tab:hover {
background: rgba(212, 184, 150, 0.16);
  border-color: var(--hc-gold-border, rgba(212, 184, 150, 0.4));
  color: var(--hc-ink, #1a1714);
}
.hc-pdp-gallery__tab.is-active {
background: linear-gradient(180deg, rgba(28, 24, 20, 0.98), rgba(17, 14, 12, 1));
  color: var(--hc-paper, #ffffff);
  border-color: rgba(0, 0, 0, 0.5);
  box-shadow: 0 4px 10px -2px rgba(0, 0, 0, 0.28);
}

/* main image — large, premium gold-tinted bg, smooth hover zoom */
.hc-pdp-gallery__main {
position: relative;
  aspect-ratio: 1 / 1;
  padding: clamp(8px, 1.8vw, 20px);
  background:
    radial-gradient(circle at 50% 108%, rgba(199, 155, 96, 0.12), transparent 58%),
    linear-gradient(160deg, #fffdf8 0%, #f6efe2 100%);
  border: 1px solid rgba(141, 109, 71, 0.22);
  border-radius: clamp(20px, 2vw, 28px);
  overflow: hidden;
  isolation: isolate;
  cursor: zoom-in;
  box-shadow:
    0 1px 2px rgba(40, 30, 15, 0.03),
    0 28px 70px -28px rgba(40, 30, 15, 0.22);
}
.hc-pdp-gallery__main::before {
content: "";
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background: radial-gradient(circle at 30% 28%, rgba(255, 255, 255, 0.65), transparent 55%);
}
.hc-pdp-gallery__main--empty {
cursor: default;
}
.hc-pdp-gallery__main--zoomable {
--hc-zoom-x: 50%;
  --hc-zoom-y: 50%;
}
.hc-pdp-gallery__main img, .hc-pdp-gallery__img {
  position: relative;
  z-index: 1;
  width: 100%;
  height: 100%;
  object-fit: contain;
  transform-origin: var(--hc-zoom-x, 50%) var(--hc-zoom-y, 50%);
  transition:
    transform 0.55s cubic-bezier(0.22, 1, 0.36, 1),
    opacity 0.25s ease,
    filter 0.55s ease;
}
.hc-pdp-gallery__main:hover img {
transform: scale(1.06);
  filter: drop-shadow(0 28px 50px rgba(40, 30, 15, 0.22));
}


.hc-pdp-gallery__zoom {
position: absolute;
  top: 16px;
  right: 16px;
  z-index: 2;
  width: 38px;
  height: 38px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: rgba(255, 255, 255, 0.96);
  border: 0.5px solid rgba(141, 109, 71, 0.18);
  border-radius: 50%;
  color: var(--hc-ink, #1a1714);
  pointer-events: none;
  box-shadow: 0 6px 14px -4px rgba(40, 30, 15, 0.18);
  opacity: 0.85;
  transition: opacity 0.22s ease;
}

.hc-pdp-gallery__counter {
position: absolute;
  right: 16px;
  bottom: 16px;
  z-index: 2;
  padding: 6px 12px;
  background: rgba(26, 23, 20, 0.84);
  color: var(--hc-paper, #ffffff);
  border-radius: var(--hc-r-pill);
  font-family: var(--hc-mono);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.06em;
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
}
.hc-pdp-gallery__sale {
position: absolute;
  top: 16px;
  left: 16px;
  z-index: 2;
}


/* thumbnails grid — tight 7-column row под gallery, по mock M1.
   Лишние превью (>7) скрываются вместо переноса во вторую строку. */
.hc-pdp-gallery__thumbs {
display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 8px;
  margin-top: 14px;
  padding-bottom: 0;
}
.hc-pdp-gallery__thumbs > :nth-child(n+8) {
display: none;
}
.hc-pdp-gallery__thumb {
aspect-ratio: 1;
  padding: 6px;
  background: var(--hc-paper-3, #f2efe9);
  border: 1px solid rgba(141, 109, 71, 0.14);
  border-radius: 10px;
  overflow: hidden;
  cursor: pointer;
  transition:
    border-color 0.22s ease,
    transform 0.22s ease,
    box-shadow 0.22s ease;
}
.hc-pdp-gallery__thumb img {
width: 100%;
  height: 100%;
  object-fit: contain;
}
.hc-pdp-gallery__thumb:hover {
transform: translateY(-2px);
  border-color: var(--hc-gold-border, rgba(212, 184, 150, 0.55));
  box-shadow: 0 8px 18px -8px rgba(184, 154, 111, 0.32);
}
.hc-pdp-gallery__thumb.is-active {
border-color: var(--hc-accent, #8b7355);
  background: rgba(212, 184, 150, 0.18);
  box-shadow: 0 8px 22px -6px rgba(139, 115, 85, 0.32);
}

/* empty state — no images, SVG placeholder + CTA */
.hc-pdp-gallery__empty {
display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 18px;
  width: 100%;
  min-height: 420px;
  padding: clamp(24px, 4vw, 48px);
  background: linear-gradient(160deg, #fcfaf6 0%, #f0e6d3 100%);
  border: 0.5px solid rgba(141, 109, 71, 0.18);
  border-radius: clamp(20px, 2vw, 28px);
  color: var(--hc-ink-mid);
  text-align: center;
}
.hc-pdp-gallery__empty-art {
width: 100%;
  max-width: 420px;
  margin: 0 auto;
  opacity: 0.85;
}
.hc-pdp-gallery__empty-msg {
display: flex;
  flex-direction: column;
  gap: 8px;
  align-items: center;
  padding: 8px 16px;
  text-align: center;
}
.hc-pdp-gallery__empty-msg strong {
display: block;
  font-family: var(--hc-serif, "Playfair Display", serif);
  font-weight: 500;
  font-size: 17px;
  color: var(--hc-ink, #1a1714);
  margin-bottom: 4px;
}
.hc-pdp-gallery__empty-msg span {
display: block;
  max-width: 44ch;
  font-size: 13px;
  line-height: 1.55;
  color: var(--hc-ink-soft, rgba(26, 23, 20, 0.62));
  margin-bottom: 10px;
}

@media (max-width: 1024px) {
  .hc-pdp-gallery__img.hc-img-broken { display: none; }
  .hc-pdp-gallery__thumbs {
    grid-template-columns: repeat(5, 1fr);
    gap: 6px;
  }
  .hc-pdp-gallery__thumbs > :nth-child(n+6) {
    display: none;
  }
}

@media (max-width: 480px) {
  .hc-pdp-gallery__main { padding: clamp(10px, 3vw, 18px); }
  .hc-pdp-gallery__zoom { width: 32px; height: 32px; top: 12px; right: 12px; }
}

.hc-pdp-gallery__main:hover .hc-pdp-gallery__img {
  transform: scale(1.06);
  filter: drop-shadow(0 28px 50px rgba(40, 30, 15, 0.22));
}
.hc-pdp-gallery__main.is-zooming .hc-pdp-gallery__img {
  transform: scale(2.2);
}
.hc-pdp-gallery__main:hover .hc-pdp-gallery__zoom {
  opacity: 1;
}
