/* --- Instagram-style modal transition for mobile --- */
.product-modal.animating {
  pointer-events: none;
}
/* Animação mais lenta (0.45s) */
/* Animação mais lenta (0.65s) */
.product-modal.slide-out-up {
  animation: modalSlideOutUp 0.65s cubic-bezier(.4,.8,.4,1) forwards;
}
.product-modal.slide-out-down {
  animation: modalSlideOutDown 0.65s cubic-bezier(.4,.8,.4,1) forwards;
}
.product-modal.slide-in-up {
  animation: modalSlideInUp 0.65s cubic-bezier(.4,.8,.4,1) forwards;
}
.product-modal.slide-in-down {
  animation: modalSlideInDown 0.65s cubic-bezier(.4,.8,.4,1) forwards;
}

@keyframes modalSlideOutUp {
  0% { transform: translateY(0); opacity: 1; }
  100% { transform: translateY(-100%); opacity: 0.7; }
}
@keyframes modalSlideOutDown {
  0% { transform: translateY(0); opacity: 1; }
  100% { transform: translateY(100%); opacity: 0.7; }
}
@keyframes modalSlideInUp {
  0% { transform: translateY(100%); opacity: 0.7; }
  100% { transform: translateY(0); opacity: 1; }
}
@keyframes modalSlideInDown {
  0% { transform: translateY(-100%); opacity: 0.7; }
  100% { transform: translateY(0); opacity: 1; }
}
.product-modal__slider::after {
  content: '';
  position: absolute;
  inset: 16px;
  border-radius: 16px;
  pointer-events: none;
  background: rgba(0,0,0,0.04);
  mix-blend-mode: multiply;
}
.produtos-page .hero-about .hero-bg {
  background: linear-gradient(120deg, rgba(0,0,0,0.65), rgba(0,0,0,0.25)), url('../Fotos/produtos.webp') center/cover;
}

.produtos-page .catalog {
  padding: 90px 0 130px;
}

.catalog-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 24px;
  margin-bottom: 32px;
}

.catalog-title {
  font-size: clamp(2rem, 3vw, 2.6rem);
  font-weight: 700;
}

.catalog-description {
  max-width: 34rem;
  color: rgba(0,0,0,0.68);
  font-weight: 400;
}

.catalog-utilities {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 12px;
  margin-bottom: 28px;
}

.catalog-search {
  flex: 1 1 28px;
  display: flex;
  flex-direction: column;
  gap: 0;
  width: 100%;
  position: relative;
  margin: 0;
}

.catalog-search__label {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.catalog-search__input {
  width: 100%;
  padding: 14px 18px;
  border-radius: 18px;
  border: 1px solid rgba(0,0,0,0.12);
  background: #fff;
  font: inherit;
  font-size: 1rem;
  box-shadow: 0 10px 24px rgba(0,0,0,0.08);
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.catalog-search__input::placeholder {
  color: rgba(0,0,0,0.45);
}

.catalog-search__input:focus-visible {
  outline: none;
  border-color: rgba(0,0,0,0.35);
  box-shadow: 0 12px 32px rgba(0,0,0,0.14);
}

.catalog-presets {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  justify-content: flex-start;
  align-items: center;
  width: 100%;
  margin-top: 0;
}

.catalog-preset {
  border: 1px solid rgba(0,0,0,0.12);
  border-radius: 999px;
  padding: 10px 20px;
  background: rgba(0,0,0,0.04);
  color: rgba(0,0,0,0.72);
  font-weight: 600;
  font-size: 0.92rem;
  letter-spacing: 0.01em;
  cursor: pointer;
  flex: 0 1 auto;
  transition: background 0.2s ease, color 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

.catalog-preset:hover,
.catalog-preset:focus-visible {
  outline: none;
  border-color: rgba(0,0,0,0.35);
  background: rgba(0,0,0,0.08);
  color: rgba(0,0,0,0.85);
  box-shadow: 0 12px 28px rgba(0,0,0,0.1);
}

.catalog-preset.is-active {
  background: linear-gradient(135deg, #111, #2a2a2a);
  color: #fff;
  border-color: rgba(255,255,255,0.28);
  box-shadow: 0 18px 40px rgba(0,0,0,0.24);
}

.products-feedback {
  font-weight: 600;
  color: rgba(0,0,0,0.6);
  margin-bottom: 16px;
}

.products-feedback[hidden] {
  display: none;
}

.products-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 320px));
  justify-content: center;
  gap: 18px;
}

.product-card {
  position: relative;
  width: 100%;
  max-width: 340px;
  border-radius: 24px;
  overflow: hidden;
  cursor: pointer;
  background: transparent;
  box-shadow: 0 18px 36px rgba(0,0,0,0.22);
  transition: transform 0.28s ease, box-shadow 0.28s ease;
}

.product-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 30px 60px rgba(0,0,0,0.28);
}

.product-card:focus-visible {
  outline: 2px solid rgba(255,255,255,0.9);
  outline-offset: -6px;
  box-shadow: 0 0 0 4px rgba(255,255,255,0.32), 0 26px 64px rgba(0,0,0,0.32);
}

.product-card__thumb {
  position: relative;
  padding-top: 132%;
  background: #0c0c0c;
}

.product-card__thumb::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(0,0,0,0) 45%, rgba(0,0,0,0.82) 100%);
  z-index: 1;
  pointer-events: none;
}

.product-card__thumb img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transform: scale(1);
  transition: transform 0.32s ease;
}

.product-card:hover .product-card__thumb img {
  transform: scale(1.05);
}

.product-card__info {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  padding: 22px 20px 20px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  z-index: 2;
  color: #fff;
  text-shadow: 0 10px 20px rgba(0,0,0,0.45);
}

.product-card__info h3 {
  font-size: 1.08rem;
  font-weight: 700;
  margin: 0;
}

.product-card__meta {
  font-size: 0.92rem;
  font-weight: 600;
  color: rgba(255,255,255,0.82);
}

.product-modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.85);
  backdrop-filter: blur(2px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 32px;
  z-index: 999;
}

.product-modal-backdrop[hidden] {
  display: none;
}

.product-modal {
  position: relative;
  width: min(960px, 100%);
  max-height: 90vh;
  background: #fff;
  border-radius: 28px;
  padding: 36px;
  display: flex;
  flex-direction: column;
  gap: 24px;
  box-shadow: 0 32px 70px rgba(0,0,0,0.3);
}

.product-modal__content {
  display: flex;
  gap: 32px;
  align-items: stretch;
}

.product-modal__details {
  flex: 1 1 38%;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.product-modal__details h3 {
  font-size: 1.6rem;
  font-weight: 700;
}

.product-modal__description {
  color: rgba(0,0,0,0.7);
  line-height: 1.6;
  font-size: 1rem;
  white-space: pre-line;
}

.product-modal__close {
  position: absolute;
  top: 12px;
  right: 12px;
  width: 36px;
  height: 36px;
  border: none;
  background: transparent;
  color: #111;
  font-size: 1.6rem;
  line-height: 1;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.2s ease;
}

.product-modal__close img {
  width: 18px;
  height: 18px;
  object-fit: contain;
}

.product-modal__close:hover,
.product-modal__close:focus-visible {
  transform: scale(1.08);
  outline: none;
}

.product-modal__counter {
  font-weight: 600;
  color: rgba(0,0,0,0.6);
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-top: auto;
}


.product-modal__slider {
  position: relative;
  flex: 0 0 auto;
  width: clamp(260px, 28vw, 360px);
  max-width: 100%;
  aspect-ratio: 9 / 16;
  max-height: min(70vh, 640px);
  height: auto;
  align-self: center;
  z-index: 1;
}

.product-modal__slider::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: 20px;
  pointer-events: none;
  background: rgba(0,0,0,0);
  transition: background 0.3s ease;
  z-index: 1;
}

.product-modal__slider::after {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: 20px;
  pointer-events: none;
  box-shadow: inset 0 0 0 1px rgba(0,0,0,0.05);
  z-index: 2;
}

.product-modal__viewport {
  overflow: hidden;
  border-radius: 20px;
  position: relative;
  background: #f5f5f5;
  width: 100%;
  height: 100%;
  z-index: 0;
}

.product-modal__track {
  display: flex;
  list-style: none;
  margin: 0;
  padding: 0;
  transition: transform 0.45s ease;
  will-change: transform;
  height: 100%;
}

.product-modal__slide {
  min-width: 100%;
  position: relative;
  height: 100%;
}

.product-modal__slide img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
}

.product-modal__nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  border: none;
  background: transparent;
  padding: 0;
  width: 22px;
  height: 22px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: transform 0.2s ease;
  z-index: 4;
}


.product-modal__nav-icon {
  width: 100%;
  height: 100%;
  object-fit: contain;
  transition: transform 0.2s ease;
  transform-origin: center;
}

.product-modal__nav:focus-visible {
  outline: 2px solid #111;
  outline-offset: 4px;
}

.product-modal__nav[disabled] {
  opacity: 0.35;
  cursor: default;
  pointer-events: none;
}

.product-modal__nav--prev {
  left: -28px;
}

.product-modal__nav--prev .product-modal__nav-icon {
  transform: rotate(180deg);
}

.product-modal__nav--prev:hover .product-modal__nav-icon,
.product-modal__nav--prev:focus-visible .product-modal__nav-icon {
  transform: rotate(180deg) scale(1.08);
}

.product-modal__nav--next:hover .product-modal__nav-icon,
.product-modal__nav--next:focus-visible .product-modal__nav-icon {
  transform: scale(1.08);
}

.product-modal__nav--next {
  right: -28px;
}

.product-modal__overlay {
  display: none;
  position: absolute;
  inset: 0;
  z-index: 3;
}

.product-modal__overlay-content {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.product-modal__overlay-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}

.product-modal__overlay-title {
  font-size: 1.2rem;
  font-weight: 700;
  margin: 0;
}

.product-modal__overlay-counter {
  font-weight: 600;
  margin-left: auto;
}

.product-modal__overlay-description {
  font-size: 0.95rem;
  line-height: 1.55;
  margin: 0;
}

.product-modal__overlay-toggle {
  border: none;
  background: none;
  font: inherit;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.product-modal__overlay-toggle[disabled] {
  opacity: 0.5;
  cursor: default;
}

.product-modal__overlay-toggle:focus-visible {
  outline: 2px solid currentColor;
  outline-offset: 4px;
}

body.modal-open {
  overflow: hidden;
}

@media (max-width: 900px) {
  .product-modal {
    padding: 28px 20px 24px;
    border-radius: 24px;
  }

  .product-modal__content {
    flex-direction: column;
    gap: 24px;
  }

  .product-modal__slider {
    width: min(100%, 320px);
  }

  .product-modal__close {
    width: 32px;
    height: 32px;
    font-size: 1.4rem;
    top: 10px;
    right: 10px;
  }

  .product-modal__nav--prev {
    left: -26px;
  }

  .product-modal__nav--next {
    right: -26px;
  }
}

@media (max-width: 1024px) {
  .produtos-page .catalog {
    padding: 60px 0 90px;
  }

  .catalog-head {
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
  }

  .catalog-utilities {
    flex-direction: column;
    align-items: stretch;
    gap: 20px;
  }

  .catalog-presets {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
    justify-content: stretch;
    gap: 10px;
    grid-auto-rows: 1fr;
  }

  .catalog-preset {
    flex: initial;
    width: 100%;
    max-width: none;
    min-width: 0;
    text-align: center;
    padding: 8px 10px;
    font-size: 0.8rem;
    min-height: 21px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
  }

  .products-feedback {
    margin-bottom: 12px;
  }

  .products-grid {
    grid-template-columns: minmax(0, 1fr);
    justify-content: center;
    justify-items: center;
  }

  .product-card {
    width: min(100%, 340px);
  }

  .product-modal-backdrop {
    padding: 0;
  }

  .product-modal {
    width: 100%;
    height: 100vh;
    max-height: none;
    padding: 0;
    background: transparent;
    box-shadow: none;
    border-radius: 0;
  }

  .product-modal__content {
    width: 100%;
    height: 100%;
  }

  .product-modal__slider {
    width: 100%;
    height: 100%;
    max-height: none;
    aspect-ratio: unset;
    border-radius: 0;
    flex: 1 1 auto;
  }

  .product-modal__nav--prev {
    left: -22px;
  }

  .product-modal__nav--next {
    right: -22px;
  }

  .product-modal__slide img {
    max-height: none;
  }

  .product-modal__close {
    width: 44px;
    height: 44px;
    font-size: 1.35rem;
    top: calc(env(safe-area-inset-top, 0px) + 52px);
    right: 16px;
    color: #fff;
    background: rgba(0,0,0,0.55);
    border-radius: 999px;
    border: 1px solid rgba(255,255,255,0.32);
    backdrop-filter: blur(6px);
    box-shadow: 0 10px 30px rgba(0,0,0,0.35);
    z-index: 12;
  }

  .product-modal__close img {
    display: none;
  }

  .product-modal__close::after {
    content: '\2715';
    font-size: 1.2rem;
    color: #fff;
    font-weight: 700;
  }

  .product-modal__details {
    display: none;
  }

  .product-modal__content {
    gap: 0;
    flex: 1;
  }

  .product-modal__overlay {
    display: flex;
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    padding: 24px 18px calc(64px + env(safe-area-inset-bottom, 24px));
    background: linear-gradient(180deg, rgba(0,0,0,0) 0%, rgba(0,0,0,0.82) 80%);
    color: #fff;
    justify-content: flex-end;
    flex-direction: column;
    border-radius: 20px;
  }

  .product-modal__overlay-content {
    gap: 10px;
    width: 100%;
  }

  .product-modal__overlay-title {
    font-size: 1.15rem;
  }

  .product-modal__overlay-counter {
    font-size: 0.9rem;
    color: rgba(255,255,255,0.8);
  }

  .product-modal__overlay-description {
    font-size: 0.95rem;
    max-height: 4.5rem;
    overflow: hidden;
    padding-right: 4px;
  }

  .product-modal__overlay-toggle {
    color: #fff;
    font-size: 0.8rem;
    margin-top: 4px;
  }

  .product-modal__overlay-toggle:focus-visible {
    outline-color: #fff;
  }

  .product-modal--description-expanded .product-modal__slider::before {
    background: rgba(0,0,0,0.45);
  }

  .product-modal--description-expanded .product-modal__overlay {
    top: 0;
    bottom: 0;
    background: linear-gradient(180deg, rgba(0,0,0,0.35) 0%, rgba(0,0,0,0.75) 55%, rgba(0,0,0,0.92) 100%);
    padding: 62px 22px calc(70px + env(safe-area-inset-bottom, 24px));
  }

  .product-modal--description-expanded .product-modal__overlay-description {
    max-height: calc(100% - 140px);
    overflow-y: auto;
  }

  .product-modal__slider::before,
  .product-modal__slider::after,
  .product-modal__overlay {
    border-radius: 0;
  }

  .product-modal__viewport {
    border-radius: 0;
    height: 100%;
  }

  .product-modal__nav {
    display: none;
  }
}

@media (max-width: 540px) {
  .catalog-presets {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 8px;
  }

  .catalog-preset {
    font-size: 0.72rem;
    padding: 6px 8px;
    line-height: 1.3;
  }

  .catalog-preset:nth-child(-n+2) {
    order: 2;
    grid-column: span 2;
  }

  .catalog-preset:nth-child(n+3) {
    order: 1;
  }
}

@media (prefers-reduced-motion: reduce) {
  .product-card,
  .product-modal__track {
    transition: none;
  }
}