.product-center-gallery {
  --gallery-accent: #ae76b0;
  --gallery-accent-rgb: 174, 118, 176;
  --gallery-image-height: 520px;
  --gallery-image-scale: 1;
  --gallery-image-shift-x: 0px;
  --gallery-image-shift-y: 0px;
  position: relative;
  width: min(100%, 420px);
  margin: 0 auto;
  padding-bottom: 94px;
  z-index: 2;
}

.product-center-gallery-stage {
  position: relative;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  width: 100%;
  min-height: 560px;
  padding: 10px 0 0;
  overflow: visible;
  cursor: zoom-in;
}

.product-center-gallery-image {
  display: block;
  width: auto;
  max-width: min(100%, 320px);
  height: var(--gallery-image-height);
  object-fit: contain;
  object-position: center center;
  transform: translateX(var(--gallery-image-shift-x)) translateY(var(--gallery-image-shift-y))
    scale(var(--gallery-image-scale));
  transform-origin: center center;
  transition: transform 0.24s ease, filter 0.24s ease;
  will-change: transform, filter;
}

.product-center-gallery-stage[data-view="front"] .product-center-gallery-image {
  filter: brightness(1);
}
.product-center-gallery-stage[data-view="side"] .product-center-gallery-image {
  filter: brightness(1.04);
}
.product-center-gallery-stage[data-view="back"] .product-center-gallery-image {
  filter: brightness(0.96);
}
.product-center-gallery-stage[data-view="detail"] .product-center-gallery-image {
  filter: brightness(1.08);
}

.product-center-gallery.has-real-images .product-gallery-thumb img {
  filter: none !important;
}

.product-center-gallery-thumbs {
  position: absolute;
  left: 50%;
  bottom: 0;
  transform: translateX(-50%);
  width: fit-content;
  max-width: 100%;
  display: flex;
  align-items: stretch;
  justify-content: center;
  gap: 14px;
  flex-wrap: nowrap;
  z-index: 3;
}

.product-gallery-thumb {
  border: 1px solid rgba(var(--gallery-accent-rgb), 0.18);
  background: rgba(255, 255, 255, 0.88);
  color: #24304a;
  border-radius: 16px;
  padding: 8px 6px 10px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  box-shadow: 0 14px 32px rgba(17, 20, 31, 0.08);
  width: 92px;
  min-width: 92px;
  flex: 0 0 92px;
  cursor: pointer;
  transform: none !important;
  transition: none !important;
  animation: none !important;
}

.product-gallery-thumb.is-active {
  border-color: var(--gallery-accent);
  background: rgba(var(--gallery-accent-rgb), 0.08);
  box-shadow: 0 14px 28px rgba(var(--gallery-accent-rgb), 0.1);
}

.product-gallery-thumb:not(.is-active) {
  box-shadow: 0 14px 32px rgba(17, 20, 31, 0.08);
}

.product-gallery-thumb:hover,
.product-gallery-thumb:focus-visible {
  outline: none;
  transform: none !important;
  animation: none !important;
}

.product-gallery-thumb-image {
  width: 58px;
  height: 58px;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  border-radius: 12px;
  transform: none !important;
  transition: none !important;
  animation: none !important;
}

.product-gallery-thumb-image img {
  width: 60px;
  height: 60px;
  max-width: 100%;
  max-height: 100%;
  display: block;
  margin: 0 auto;
  object-fit: contain;
  object-position: center center;
  transform: none !important;
  filter: none !important;
  transition: none !important;
  animation: none !important;
}

.product-gallery-thumb-label {
  display: block;
  font-size: 11px;
  font-weight: 700;
  line-height: 1.2;
  text-align: center;
}

/* Zoom/selection UI exists in markup but is hidden in the template designs */
.product-center-gallery-zoom-pane,
.product-center-gallery-bounds {
  position: absolute;
  inset: 0;
  display: none !important;
}

/* Ensure the template galleries don't inherit section background images */
.shfdog.berryaa,
.berryaa,
.shfdog.aquaa,
.aquaa {
  background: none !important;
  background-image: none !important;
}

.hp-shield.solarmist.berryaa #but_to_cart,
.hp-shield.solarmist.aquaa #but_to_cart {
  display: none !important;
}

/* Floating labels: match template placement and ensure gentle motion */
.hp-shield.solarmist {
  padding: 0;
}

.hp-shield.solarmist .float-card {
  position: absolute;
  display: flex;
  align-items: center;
  gap: 10px;
  border-radius: 14px;
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.08);
  z-index: 3;
  font-size: 14px;
  white-space: nowrap;
}

.hp-shield.solarmist .float-card img {
  width: 42px;
  height: 42px;
  flex-shrink: 0;
}

.hp-shield.solarmist .float-card span {
  font-weight: 600;
}

.berryaa .product-wrap,
.aquaa .product-wrap {
  position: relative;
  display: block;
  width: min(100%, 760px);
  min-height: 760px;
  margin: 0 auto;
}

.berryaa .product-gallery-host,
.aquaa .product-gallery-host {
  position: absolute;
  left: 16%;
  top: 0;
  width: 420px;
  transform: translateX(-50%);
  display: flex;
  justify-content: center;
  z-index: 2;
  pointer-events: none;
}

.berryaa .product-center-gallery,
.aquaa .product-center-gallery {
  pointer-events: auto;
  margin: 0;
}

.berryaa .product-gallery-host::before {
  content: "";
  position: absolute;
  left: 50%;
  top: 18px;
  width: 520px;
  height: 542px;
  transform: translateX(-56%);
  background: url("../images/berryblast-bg-icon.png") center / contain no-repeat;
  z-index: -1;
  pointer-events: none;
}

.aquaa .product-gallery-host::before {
  content: "";
  position: absolute;
  left: 50%;
  top: 18px;
  width: 520px;
  height: 542px;
  transform: translateX(-56%);
  background: url("../images/aqua-zephyr-bg-icon.png") center / contain no-repeat;
  z-index: -1;
  pointer-events: none;
}

.berryaa .float-card,
.aquaa .float-card {
  max-width: 260px;
  padding: 8px 12px;
  white-space: normal;
  background: rgba(255, 255, 255, 0.58);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
}

.berryaa .float-card span,
.aquaa .float-card span {
  font-size: 14px;
  line-height: 1.25;
}

.berryaa .l1,
.aquaa .l1 {
  top: 160px;
  left: 10px;
}
.berryaa .l2,
.aquaa .l2 {
  top: 272px;
  left: -10px;
}
.berryaa .r1,
.aquaa .r1 {
  top: 130px;
  right: 6px;
}
.berryaa .r2,
.aquaa .r2 {
  top: 244px;
  right: 0;
}
.berryaa .r3,
.aquaa .r3 {
  top: 392px;
  right: 4px;
}

.berryaa .berry-hpf-badge,
.aquaa .aqua-hpf-badge {
  position: absolute;
  top: 0px;
  right: 112px;
  width: 105px;
  height: auto;
  z-index: 3;
  pointer-events: none;
  transition: opacity 0.2s ease, visibility 0.2s ease;
}

.berryaa .product-wrap.is-detail-view .berry-hpf-badge,
.aquaa .product-wrap.is-detail-view .aqua-hpf-badge {
  opacity: 0;
  visibility: hidden;
}

@keyframes iv-float-soft {
  0% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-8px);
  }
  100% {
    transform: translateY(0);
  }
}

.float-card.animate1,
.berry-hpf-badge.animate1,
.aqua-hpf-badge.animate1 {
  animation: iv-float-soft 3.6s ease-in-out infinite;
}

.float-card.animate2 {
  animation: iv-float-soft 4.6s ease-in-out infinite;
}

@media (max-width: 767px) {
  .berryaa .product-wrap,
  .aquaa .product-wrap {
    width: min(100%, 360px);
    min-height: 650px;
    margin: 0 auto;
  }

  .berryaa .product-gallery-host,
  .aquaa .product-gallery-host {
    position: absolute;
    right: 0;
    left: auto;
    top: 0;
    width: 100%;
    transform: none;
    justify-content: flex-end;
  }

  .berryaa .product-gallery-host::before,
  .aquaa .product-gallery-host::before {
    left: auto;
    right: -2px;
    top: 22px;
    width: 390px;
    max-width: 419px;
    height: 528px;
    transform: none;
    background-position: right center;
  }

  .berryaa .float-card,
  .aquaa .float-card {
    display: none !important;
  }

  .product-center-gallery {
    --gallery-image-height: 390px;
    width: min(100%, 330px);
    padding-bottom: 92px;
    margin-left: auto;
    margin-right: 0;
  }

  .product-center-gallery-thumbs {
    left: 0;
    transform: none;
    width: 100%;
    padding: 0 6px;
    gap: 8px;
    flex-wrap: nowrap;
    justify-content: space-between;
  }

  .product-gallery-thumb {
    border-radius: 14px;
    padding: 7px 5px 8px;
    width: auto;
    min-width: 0;
    flex: 1 1 0;
  }

  .product-gallery-thumb-image {
    width: 50px;
    height: 50px;
  }

  .product-gallery-thumb-image img {
    width: 44px;
    height: 44px;
  }

  .product-gallery-thumb-label {
    font-size: 10px;
  }

  .product-center-gallery-stage {
    min-height: 520px;
    padding: 8px 0 0;
    justify-content: flex-end;
  }

  .product-center-gallery-image {
    max-width: min(100%, 220px);
  }

  .berryaa .berry-hpf-badge,
  .aquaa .aqua-hpf-badge {
    top: 210px;
    right: -11px;
    width: 76px;
  }
}

@media (max-width: 991px) and (min-width: 768px) {
  .berryaa .float-card,
  .aquaa .float-card {
    display: none;
  }

  .berryaa .product-wrap,
  .aquaa .product-wrap {
    width: min(100%, 520px);
    min-height: 720px;
    margin: 0 auto;
  }

  .berryaa .product-gallery-host,
  .aquaa .product-gallery-host {
    position: relative;
    left: auto;
    top: auto;
    width: 100%;
    transform: none;
    justify-content: center;
    pointer-events: none;
  }

  .berryaa .product-gallery-host::before,
  .aquaa .product-gallery-host::before {
    left: 50%;
    right: auto;
    top: 22px;
    width: 560px;
    max-width: 100%;
    height: 560px;
    transform: translateX(-50%);
    background-position: center;
  }

  .product-center-gallery {
    --gallery-image-height: 460px;
    width: min(100%, 380px);
    margin-left: auto;
    margin-right: auto;
  }
}
