/* V19.16 — recorte interno dos cards de produto e reorganização das categorias */

/*
 * A borda externa do card volta a ser o limite visual absoluto.
 * O conteúdo interno, inclusive fundos, mockups, sombras e ampliações no hover,
 * permanece recortado pelo raio do próprio card.
 */
.ct-product-card,
.ct-product-link,
.center-tech-home #catalogo .catalog-grid > .product-card{
  position:relative;
  isolation:isolate;
  overflow:hidden!important;
  clip-path:inset(0 round 14px);
}

.ct-product-card .product-image,
.ct-product-link .product-image,
.center-tech-home #catalogo .product-image{
  overflow:hidden!important;
  max-width:100%;
  contain:paint;
}

/* Primeiro e-book: mockup contido dentro da moldura do card. */
.ct-product-link[data-product-id="fundamentos-contextos-avaliacao-imobiliaria-v1"] .product-image{
  border-radius:13px 0 0 13px;
}
.ct-product-link[data-product-id="fundamentos-contextos-avaliacao-imobiliaria-v1"] .product-image img{
  top:3%!important;
  right:4%!important;
  height:94%!important;
  max-width:68%!important;
}
.ct-product-link[data-product-id="fundamentos-contextos-avaliacao-imobiliaria-v1"]:hover .product-image img,
.ct-product-link[data-product-id="fundamentos-contextos-avaliacao-imobiliaria-v1"]:focus-visible .product-image img{
  transform:perspective(650px) rotateY(-2deg) rotateZ(.35deg) translateY(-2px) scale(1.015)!important;
}

/* Materiais gratuitos aparece primeiro no bloco de navegação. */
.center-tech-home #categorias .free-hub-panel{
  margin:0 0 18px!important;
}

/*
 * Sete categorias: quatro na primeira linha e três centralizadas na segunda.
 * A malha de oito colunas permite margens iguais nas laterais da última linha.
 */
.center-tech-home .category-grid-seven{
  display:grid!important;
  grid-template-columns:repeat(8,minmax(0,1fr))!important;
  gap:15px!important;
  align-items:stretch!important;
}
.center-tech-home .category-grid-seven > .category-card{
  grid-column:span 2!important;
  width:100%!important;
  min-width:0!important;
}
.center-tech-home .category-grid-seven > .category-card:nth-child(5){
  grid-column:2 / span 2!important;
}
.center-tech-home .category-grid-seven > .category-card:nth-child(6),
.center-tech-home .category-grid-seven > .category-card:nth-child(7){
  grid-column:span 2!important;
}

@media(max-width:1050px){
  .center-tech-home .category-grid-seven{
    grid-template-columns:repeat(2,minmax(0,1fr))!important;
  }
  .center-tech-home .category-grid-seven > .category-card,
  .center-tech-home .category-grid-seven > .category-card:nth-child(5),
  .center-tech-home .category-grid-seven > .category-card:nth-child(6),
  .center-tech-home .category-grid-seven > .category-card:nth-child(7){
    grid-column:auto!important;
  }
  .center-tech-home .category-grid-seven > .category-card:last-child{
    grid-column:1 / -1!important;
    width:calc(50% - 7.5px)!important;
    justify-self:center!important;
  }
}

@media(max-width:760px){
  .ct-product-link[data-product-id="fundamentos-contextos-avaliacao-imobiliaria-v1"] .product-image{
    border-radius:13px 13px 0 0;
  }
  .ct-product-link[data-product-id="fundamentos-contextos-avaliacao-imobiliaria-v1"] .product-image img{
    top:3%!important;
    right:5%!important;
    height:94%!important;
    max-width:66%!important;
  }
}

@media(max-width:560px){
  .center-tech-home .category-grid-seven{
    grid-template-columns:1fr!important;
  }
  .center-tech-home .category-grid-seven > .category-card,
  .center-tech-home .category-grid-seven > .category-card:nth-child(5),
  .center-tech-home .category-grid-seven > .category-card:nth-child(6),
  .center-tech-home .category-grid-seven > .category-card:nth-child(7),
  .center-tech-home .category-grid-seven > .category-card:last-child{
    grid-column:auto!important;
    width:100%!important;
  }
  .center-tech-home #categorias .free-hub-panel{
    margin-bottom:14px!important;
  }
}
