.product-gallery {
  display: flex;
  flex-direction: row;
  align-items: flex-start;
  gap: 1rem;
}
.product-image {
  order: 1;
  width: 100%;
  flex: 1;

  display: flex;
}

.product-image img {
  width: 100%;
  display: block;
  border-radius: 18px;
  transition:
    opacity 0.25s ease,
    transform 0.25s ease;
  cursor: pointer;
}

.product-gallery-thumbs-wrapper {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
}

.product-gallery-viewport {
  flex: 1;

  overflow-x: hidden;
  overflow-y: auto;

  scrollbar-width: none;
  -ms-overflow-style: none;
}

.product-gallery-viewport::-webkit-scrollbar {
  display: none;
}

.product-gallery-thumbs {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  width: max-content;
  /* flex-shrink: 0; */
}

.gallery-thumb {
  flex: 0 0 78px;
  width: 78px;
  height: 78px;
  padding: 4px;
  border: 2px solid transparent;
  border-radius: 14px;
  background: #fff;
  cursor: pointer;
  overflow: hidden;
  transition: 0.25s ease;
}
.gallery-scroll:disabled {
  opacity: 0.35;

  cursor: default;

  pointer-events: none;

  box-shadow: none;
}

.gallery-thumb:hover {
  transform: translateY(-2px);
  border-color: var(--bs-primary);
}

.gallery-thumb.active {
  border-color: var(--bs-primary);
  box-shadow: 0 0 0 0.15rem rgba(var(--bs-primary-rgb), 0.2);
}

.gallery-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 15px;
  display: block;
}

.product-image img:hover {
  transform: scale(1.01);
}

.gallery-scroll {
  width: 38px;
  height: 38px;

  flex: 0 0 38px;

  display: flex;
  justify-content: center;
  align-items: center;

  border: none;
  border-radius: 50%;

  background: #fff;

  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.12);

  cursor: pointer;
}
.gallery-scroll:disabled {
  opacity: 0.35;

  cursor: default;

  pointer-events: none;

  box-shadow: none;
}

/* ==========================================
   Gallery Filters
========================================== */

.gallery-filters {
  padding-bottom: 3rem;
  padding-top: 3rem;
}

.gallery-filter-list {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.75rem;
}

.gallery-filter {
  padding: 0.5rem 2rem;

  border: 1px solid var(--color-primary);

  border-radius: 0.85rem;

  background: transparent;

  color: var(--color-primary);

  font-weight: 500;

  transition: all 0.25s ease;

  cursor: pointer;
}

.gallery-filter:hover {
  background: var(--color-primary);

  color: #fff;

  border-color: var(--color-primary);
}

.gallery-filter.active {
  background: var(--color-primary);

  color: #fff;

  border-color: var(--color-primary);
}

/* ==================================================
   Gallery Grid
================================================== */

.gallery-masonry {
  padding-bottom: 5rem;
}

.gallery-grid {
  columns: 4;
  column-gap: 0.5rem;
}

.gallery-item {
  overflow: hidden;
  break-inside: avoid;
  margin-bottom: 1.5rem;

  border-radius: 1rem;
}

.gallery-card {
  display: block;
  width: 100%;
  border: none;
  padding: 0;
  background: transparent;
  position: relative;
  overflow: hidden;
  border-radius: 1rem;
  transition:
    transform 0.3s ease,
    box-shadow 0.3s ease;

  border: 2px solid transparent;
  transition:
    border-color 0.25s ease,
    transform 0.25s ease;
}

.gallery-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 0 0 2px rgba(217, 119, 106, 0.15);
  border-color: rgba(217, 119, 106, 0.35);
}

.gallery-card img {
  display: block;
  width: 100%;
  height: auto;

  cursor: zoom-in;

  transition: transform 0.25s ease;
}

/* ==================================================
   Gallery External Zoom — Foto de origem
================================================== */

.gallery-item {
  transition:
    opacity 0.3s ease,
    transform 0.3s ease;
}

.gallery-item.is-zoom-source {
  opacity: 0.07;
  transform: scale(0.97);
}

.gallery-intro-content {
  max-width: 600px;

  margin: auto;

  text-align: center;
}

/*titulo*/
.gallery-overlay h3 {
  margin: 0;

  color: #fff;

  font-family: var(--bs-body-font-family);

  font-size: 0.7rem;
  font-weight: 400;

  line-height: 1.3;

  text-shadow: 0 2px 20px rgba(0, 0, 0, 0.6);
}
/*descricao*/
.gallery-overlay p {
  margin: 0.45rem 0 0;

  color: rgba(255, 255, 255, 0.9);

  font-size: 0.9rem;

  line-height: 1.5;
}

.text-center h2 {
  margin: 1rem;

  color: #d9776a;

  font-size: 1.25rem;

  font-weight: 600;

  font-family: var(--bs-body-font-family);

  line-height: 1.3;
}

.btn.btn-primary {
  padding: 0.5rem 2rem;
  border-radius: 1.4rem;

  margin: 1rem;
}

/* ==========================================
   Ajustes do Page Header da Galeria
========================================== */

.gallery-page .page-header {
  padding: 0;
  font-family: var(--font-heading);
}

/* overlay*/
.gallery-overlay {
  position: absolute;
  inset: 0;

  display: flex;
  flex-direction: column;
  justify-content: flex-end;

  padding: 1.5rem;

  /*sombra ao passar  o mouse*/
  /* background: linear-gradient(
    to top,
    rgba(0, 0, 0, 0.75) 0%,
    rgba(0, 0, 0, 0.35) 45%,
    rgba(0, 0, 0, 0) 100%
  ); */

  opacity: 0;
  transition: opacity 0.3s ease;
  pointer-events: none;
}

.gallery-card:hover .gallery-overlay {
  opacity: 1;
}

/* ==================================================
   Gallery External Zoom
================================================== */

.gallery-zoom-overlay {
  position: fixed;
  inset: 0;

  z-index: 2000;

  display: flex;
  align-items: center;
  justify-content: center;

  padding: 2rem;

  background: transparent;

  opacity: 0;
  visibility: hidden;

  pointer-events: none;

  transition:
    opacity 0.2s ease,
    visibility 0.2s ease;
}

.gallery-zoom-overlay.is-visible {
  opacity: 1;
  visibility: visible;

  pointer-events: auto;
}

.gallery-zoom-image {
  display: block;

  width: auto;
  height: auto;

  max-width: 90vw;
  max-height: 90vh;

  object-fit: contain;

  border-radius: 1rem;

  box-shadow:
    0 18px 50px rgba(0, 0, 0, 0.22),
    0 4px 16px rgba(0, 0, 0, 0.12);

  cursor: zoom-out;

  transform: scale(0.94);

  transition: transform 0.2s ease;
}

.gallery-zoom-overlay.is-visible .gallery-zoom-image {
  transform: scale(1);
}

/* ==================================================
   Gallery External Zoom — Mobile
================================================== */

@media (max-width: 767.98px) {
  .gallery-zoom-overlay {
    padding: 1rem;
  }

  .gallery-zoom-image {
    max-width: 94vw;
    max-height: 86vh;

    border-radius: 0.85rem;
  }
}

/*--------------------------------------------------
|                                                  |
|                     MOBILE                       |
|                                                  |
|-------------------------------------------------*/

@media (max-width: 767.98px) {
  .product-gallery {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 1rem;
  }

  .product-image {
    order: 1;
    width: 100%;
    flex: none;
  }

  .product-image img {
    width: 100%;
    display: block;
  }
  .product-gallery-thumbs-wrapper {
    order: 2;

    display: flex;
    flex-direction: row;

    align-items: center;
    justify-content: space-between;

    width: 100%;
    gap: 0.5rem;
  }

  .gallery-grid {
    columns: 3;
    column-gap: 0.6rem;
  }

  .product-gallery-viewport {
    flex: 1;
    max-width: calc((96px * 3) + (0.75rem * 2));
    margin-inline: 0.5rem;
    max-width: calc(100vw - 120px);

    overflow-x: auto;
    overflow-y: hidden;

    scrollbar-width: none;
    -ms-overflow-style: none;
  }

  .gallery-filter-list {
    flex-wrap: nowrap;
    justify-content: flex-start;
    overflow-x: auto;

    padding-inline: 0.5rem;
    padding-bottom: 0.5rem;

    scrollbar-width: none;
    -ms-overflow-style: none;
  }

  .product-gallery-viewport::-webkit-scrollbar {
    display: none;
  }

  .gallery-filter {
    flex: 0 0 auto;
    white-space: nowrap;
  }

  .product-gallery-thumbs {
    display: flex;
    flex-direction: row;
    gap: 0.75rem;

    width: max-content;
  }

  .gallery-thumb {
    flex: 0 0 72px;
    width: 72px;
    height: 72px;
  }
}

/* ==========================
   Lightbox Tablet / Mobile
   ========================== */

@media (max-width: 992px) {
  .lightbox {
    padding: 1rem;
  }

  .lightbox-dialog {
    flex-direction: column;
    align-items: stretch;
    justify-content: center;
    gap: 0.75rem;

    width: 100%;
    max-width: 100%;
    max-height: 100%;
  }

  /* ==========================
       IMAGEM
       ========================== */

  .lightbox-stage {
    order: 1;

    width: 100%;
    max-width: 100%;

    padding-inline: 0;
  }

  .lightbox-image {
    display: block;

    width: auto;
    max-width: 100%;

    max-height: 72vh;

    object-fit: contain;
  }

  /* ==========================
       MINIATURAS
       ========================== */

  .lightbox-thumbs {
    order: 2;

    display: flex;
    flex-direction: row;

    width: 100%;
    max-width: 100%;

    overflow-x: auto;
    overflow-y: hidden;

    justify-content: flex-start;
    align-items: center;

    gap: 0.75rem;

    padding: 0.25rem 0 0.5rem;

    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
  }

  .lightbox-thumbs::-webkit-scrollbar {
    display: none;
  }

  .lightbox-thumb {
    flex: 0 0 72px;

    width: 72px;
    height: 72px;
  }

  /* ==========================
       SETAS
       ========================== */

  .lightbox-prev,
  .lightbox-next {
    width: 48px;
    height: 48px;

    font-size: 1.15rem;
  }

  .lightbox-prev {
    left: 0.25rem;
  }

  .lightbox-next {
    right: 0.25rem;
  }

  /* ==========================
       FECHAR
       ========================== */

  .lightbox-close {
    top: 12px;
    right: 12px;

    width: 48px;
    height: 48px;
  }
}
