/* =========== */
/* PRODUTOS.CSS */
/* =========== */


/* ================================ */
/* Hero + category nav (merged)     */
/* ================================ */

/* Tighten the hero padding and remove bottom gap —
   the nav sits flush at the bottom as a divider */
.prod-hero{
  padding-bottom: 16px !important;
}

.prod-hero .hero-centered{
  gap: 10px;
}

.prod-hero .hero-subtitle{
  margin-bottom: 28px;
}

.prod-nav{
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  justify-content: center;
  /* Top divider separates text from nav; bottom merges into page */
  padding: 14px 0 0;
  margin-top: 4px;
  border-top: 1px solid var(--line);
  width: 100%;
}

.prod-nav-item{
  display: inline-flex;
  align-items: center;
  padding: 8px 20px;
  border-radius: 999px;
  font-size: 14px;
  font-weight: 700;
  color: rgba(15,23,42,.72);
  border: 1px solid transparent;
  transition: background 0.25s ease, border-color 0.25s ease, color 0.25s ease;
  text-decoration: none;
}

.prod-nav-item:hover{
  background: rgba(69,117,180,.08);
  border-color: rgba(69,117,180,.22);
  color: var(--blue);
  text-decoration: none;
}


/* ================================ */
/* Category label (above h2)        */
/* ================================ */

.prod-cat-label{
  display: inline-block;
  font-size: 20px;
  font-weight: 800;
  letter-spacing: .10em;
  text-transform: uppercase;
  color: var(--blue);
  margin-bottom: 10px;
}


/* ================================ */
/* Product grid — 4 columns, centered orphans */
/* ================================ */

.prod-grid{
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 14px;
  margin-top: 28px;
}

.prod-card{
  flex: 0 0 calc(25% - 11px);
}


/* ================================ */
/* Product card — overlay pattern   */
/* ================================ */

.prod-card{
  position: relative;
  border-radius: var(--r);
  overflow: hidden;
  aspect-ratio: 1 / 1;
  border: 1px solid var(--glass-card-border);
  box-shadow: var(--glass-card-shadow);
  cursor: pointer;
}

/* Real photo — fills the card */
.prod-img{
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  display: block;
  transition: transform 0.40s ease;
}

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

/* Placeholder shown until photo is available */
.prod-img-placeholder{
  position: absolute;
  inset: 0;
  background:
    repeating-linear-gradient(
      -45deg,
      rgba(69,117,180,.06) 0px,
      rgba(69,117,180,.06) 1px,
      transparent 1px,
      transparent 10px
    ),
    rgba(69,117,180,.04);
}

.prod-img-placeholder::after{
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 40px;
  height: 40px;
  background-repeat: no-repeat;
  background-size: contain;
  opacity: 0.30;
}


/* ================================ */
/* Slideshow                        */
/* ================================ */

/* Strip that holds all slides side-by-side */
.prod-slides{
  position: absolute;
  inset: 0;
  display: flex;
  width: 100%;
  height: 100%;
  transition: transform 0.55s cubic-bezier(0.25, 0.46, 0.45, 0.94);
  will-change: transform;
}

/* Each slide fills the card exactly */
.prod-slide{
  flex: 0 0 100%;
  width: 100%;
  height: 100%;
  position: relative;
  overflow: hidden;
}

.prod-slide .prod-img{
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  display: block;
  transition: transform 0.40s ease;
}

.prod-card:hover .prod-slide .prod-img{
  transform: scale(1.05);
}

.prod-slide .prod-img-placeholder{
  position: absolute;
  inset: 0;
}

/* ---- Arrows ---- */
.prod-arrow{
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 10;
  width: 28px;
  height: 28px;
  border-radius: 999px;
  border: none;
  cursor: pointer;
  display: grid;
  place-items: center;
  background: rgba(15,23,42,.42);
  color: #fff;
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  transition: background 0.20s ease, opacity 0.28s ease;
  padding: 0;
  line-height: 1;
}

.prod-arrow:hover{
  background: rgba(15,23,42,.68);
}

.prod-card[data-slides="1"] .prod-arrow{
  display: none;
}

.prod-arrow-prev{ left: 8px; }
.prod-arrow-next{ right: 8px; }

.prod-arrow svg{
  width: 14px;
  height: 14px;
  stroke: currentColor;
  fill: none;
  stroke-width: 2.2;
  stroke-linecap: round;
  stroke-linejoin: round;
  flex-shrink: 0;
}

/* ---- Dots ---- */
.prod-dots{
  position: absolute;
  bottom: 8px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 10;
  display: flex;
  gap: 5px;
  align-items: center;
}

.prod-card[data-slides="1"] .prod-dots{
  display: none;
}

.prod-dot{
  width: 6px;
  height: 6px;
  border-radius: 999px;
  background: rgba(255,255,255,.45);
  border: none;
  padding: 0;
  cursor: pointer;
  transition: background 0.20s ease, transform 0.20s ease;
  flex-shrink: 0;
}

.prod-dot.is-active{
  background: #fff;
  transform: scale(1.35);
}


/* ================================ */
/* Overlay panel                    */
/* ================================ */

.prod-overlay{
  position: absolute;
  inset: 0;
  z-index: 5;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 14px 16px;

  /* Static gradient — deepened enough for desc to stay legible on hover */
  background: linear-gradient(
    to top,
    rgba(15,23,42,.72) 0%,
    rgba(15,23,42,.38) 45%,
    rgba(15,23,42,0) 72%
  );
}

/* Title — always visible */
.prod-title{
  margin: 0;
  font-size: 15px;
  letter-spacing: -.01em;
  color: #fff;
  text-shadow: 0 1px 4px rgba(15,23,42,.40);
}

/* Description — hidden at rest, slides up on hover */
.prod-desc{
  margin: 0;
  font-size: 13px;
  color: rgba(255,255,255,.82);
  line-height: 1.5;

  max-height: 0;
  opacity: 0;
  overflow: hidden;
  transform: translateY(6px);
  transition: max-height 0.32s ease, opacity 0.28s ease 0.06s, transform 0.30s ease;
}

.prod-card:hover .prod-desc{
  max-height: 6em;
  opacity: 1;
  transform: translateY(0);
}


/* Touch tap-to-reveal — JS adds .is-tapped on touch devices */
.prod-card.is-tapped .prod-desc{
  max-height: 6em;
  opacity: 1;
  transform: translateY(0);
}

/* Arrows fade out when description is revealed on touch —
   JS also sets inert + pointer-events:none so they can't intercept taps */
.prod-card.is-tapped .prod-arrow{
  opacity: 0;
}


/* ================================ */
/* Responsive                       */
/* ================================ */

@media (max-width: 1100px){
  .prod-card{
    flex: 0 0 calc(33.333% - 10px);
  }
}

@media (max-width: 720px){
  .prod-card{
    flex: 0 0 calc(50% - 7px);
  }
}

@media (max-width: 560px){
  .prod-card{
    flex: 0 0 calc(50% - 7px);
  }

  .prod-nav{
    gap: 6px;
  }

  .prod-nav-item{
    font-size: 13px;
    padding: 7px 13px;
  }

  .prod-overlay{
    background: linear-gradient(
      to top,
      rgba(15,23,42,.70) 0%,
      rgba(15,23,42,.36) 55%,
      rgba(15,23,42,0) 80%
    );
  }

  .prod-title{
    font-size: 13px;
  }

  .prod-desc{
    color: rgba(255,255,255,.82);
    font-size: 12px;
  }
}


/* ================================ */
/* Reduced motion                   */
/* ================================ */

@media (prefers-reduced-motion: reduce){
  .prod-card:hover .prod-img{ transform: none; }
  .prod-img,
  .prod-overlay,
  .prod-title,
  .prod-desc{ transition: none; }
  .prod-card:hover .prod-desc{
    max-height: 6em;
    opacity: 1;
    transform: none;
  }
}