.product-gallery {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.product-gallery-main {
  position: relative;
  aspect-ratio: 1;
  border: 1px solid #d3dad9;
  border-radius: 13px;
  overflow: hidden;
  background: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: box-shadow 0.24s ease, border-color 0.24s ease;

  img,
  video,
  object {
    width: 100%;
    height: 100%;
    object-fit: contain;
    border: 0;
  }
}

.product-gallery-toolbar {
  position: absolute;
  top: 10px;
  right: 10px;
  z-index: 2;
  display: flex;
  gap: 8px;
}

.toolbar-btn {
  min-height: 30px;
  border: 1px solid rgba(30, 60, 56, 0.25);
  background: rgba(255, 255, 255, 0.9);
  color: #1e3c38;
  border-radius: 999px;
  padding: 0 10px;
  font-weight: 700;
  cursor: pointer;
}

.document-viewer {
  display: grid;
  place-items: center;
  gap: 10px;
  padding: 16px;
  text-align: center;

  p {
    margin: 0;
    color: #1e3c38;
    font-weight: 700;
  }

  a {
    min-height: 38px;
    border-radius: 999px;
    border: 1px solid #497671;
    color: #2e5e59;
    text-decoration: none;
    padding: 0 14px;
    display: inline-flex;
    align-items: center;
    font-weight: 700;
  }
}

.product-gallery-thumbs {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(72px, 1fr));
  gap: 10px;
}

.product-gallery-thumb {
  position: relative;
  aspect-ratio: 1;
  border: 1px solid #d3dad9;
  border-radius: 10px;
  overflow: hidden;
  background: #fff;
  cursor: pointer;
  transition: transform 0.2s ease, border-color 0.2s ease;

  &.active {
    border-color: #497671;
    box-shadow: 0 0 0 3px rgba(73, 118, 113, 0.18);
  }

  &:hover {
    transform: translateY(-1px);
    border-color: #497671;
  }

  img {
    width: 100%;
    height: 100%;
    object-fit: cover;
  }
}

.product-gallery-video {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(30, 60, 56, 0.48);
  color: #fff;
  z-index: 1;
}

.product-gallery-doc {
  position: absolute;
  left: 6px;
  bottom: 6px;
  z-index: 1;
  background: rgba(30, 60, 56, 0.78);
  color: #fff;
  border-radius: 999px;
  padding: 2px 8px;
  font-size: 0.7rem;
  text-transform: uppercase;
}

@media (max-width: 640px) {
  .product-gallery-thumbs {
    grid-template-columns: repeat(auto-fill, minmax(58px, 1fr));
    gap: 8px;
  }
}
