
/* ==========================================================
   M3 TECHNOLOGY — CATÁLOGO POR CARROSSÉIS V1.2
   Correções de consistência:
   - títulos longos sem corte indevido
   - área "COMPRAR EM" totalmente visível
   - cards com mesma altura
   - desktop + mobile
   ========================================================== */

.catalog-carousel-section{
  overflow:hidden;
}

.catalog-row-block{
  margin-top:38px;
}

.catalog-row-title{
  display:flex;
  align-items:flex-end;
  justify-content:space-between;
  gap:18px;
  margin-bottom:16px;
}

.catalog-row-title h3{
  font-size:25px;
  margin:3px 0 0;
}

.catalog-row-actions,
.catalog-row-controls{
  display:flex;
  align-items:center;
  gap:9px;
}

.carousel-arrow{
  width:40px;
  height:40px;
  border:1px solid #dce4ee;
  background:#fff;
  border-radius:50%;
  font-size:28px;
  cursor:pointer;
}

.category-more{
  text-decoration:none;
  font-weight:800;
  font-size:13px;
  color:#078bd8;
  margin-right:8px;
}

.product-carousel{
  display:flex;
  align-items:stretch;
  gap:18px;
  overflow-x:auto;
  scroll-snap-type:x mandatory;
  scroll-behavior:smooth;
  padding:5px 3px 24px;
  scrollbar-width:none;
}

.product-carousel::-webkit-scrollbar{
  display:none;
}

/* ===== CARD PADRÃO DESKTOP ===== */
.catalog-carousel-section .product-carousel .product-card{
  flex:0 0 calc((100% - 54px)/4);
  min-width:0;
  height:510px !important;
  min-height:510px !important;
  max-height:510px !important;
  display:flex !important;
  flex-direction:column !important;
  overflow:hidden !important;
  scroll-snap-align:start;
}

.catalog-carousel-section .product-carousel .product-image{
  flex:0 0 190px !important;
  height:190px !important;
  min-height:190px !important;
  max-height:190px !important;
  display:flex !important;
  align-items:center !important;
  justify-content:center !important;
  overflow:hidden !important;
}

.catalog-carousel-section .product-carousel .product-image img{
  width:100% !important;
  height:100% !important;
  object-fit:contain !important;
}

.catalog-carousel-section .product-carousel .product-body{
  flex:1 1 auto !important;
  min-height:0 !important;
  display:flex !important;
  flex-direction:column !important;
  overflow:hidden !important;
}

/* Título: até 3 linhas, com espaço suficiente */
.catalog-carousel-section .product-carousel .product-body h3{
  min-height:66px !important;
  max-height:66px !important;
  line-height:1.28 !important;
  overflow:hidden !important;
  display:-webkit-box !important;
  -webkit-box-orient:vertical !important;
  -webkit-line-clamp:3 !important;
  margin-bottom:8px !important;
}

/* Descrição: até 3 linhas */
.catalog-carousel-section .product-carousel .product-body > p{
  min-height:58px !important;
  max-height:58px !important;
  line-height:1.4 !important;
  overflow:hidden !important;
  display:-webkit-box !important;
  -webkit-box-orient:vertical !important;
  -webkit-line-clamp:3 !important;
  margin-bottom:10px !important;
}

/* Ações sempre no mesmo nível */
.catalog-carousel-section .product-carousel .card-actions{
  margin-top:auto !important;
  flex:0 0 auto !important;
}

/* Área marketplace totalmente dentro do card */
.catalog-carousel-section .product-carousel .market-mini{
  flex:0 0 74px !important;
  min-height:74px !important;
  height:74px !important;
  padding-top:12px !important;
  padding-bottom:14px !important;
  box-sizing:border-box !important;
  overflow:visible !important;
  align-items:center !important;
}

.catalog-carousel-section .product-carousel .market-mini-links{
  display:flex !important;
  align-items:center !important;
  gap:8px !important;
  overflow:visible !important;
}

.catalog-carousel-section .product-carousel .market-icon-link{
  flex:0 0 auto !important;
  margin:0 !important;
  transform:none !important;
}

/* Tablet */
@media(max-width:1000px){
  .catalog-carousel-section .product-carousel .product-card{
    flex-basis:calc((100% - 36px)/3);
  }
}

/* ===== MOBILE ===== */
@media(max-width:760px){
  .catalog-row-block{
    margin-top:30px;
  }

  .catalog-row-title{
    align-items:center;
    margin-bottom:12px;
  }

  .catalog-row-title h3{
    font-size:21px;
  }

  .catalog-row-controls{
    display:none;
  }

  .category-more{
    font-size:12px;
    margin-right:0;
  }

  .product-carousel{
    gap:12px;
    padding:5px 18px 22px 0;
  }

  .catalog-carousel-section .product-carousel .product-card{
    flex:0 0 84% !important;
    width:84% !important;
    min-width:84% !important;
    max-width:84% !important;

    height:570px !important;
    min-height:570px !important;
    max-height:570px !important;

    scroll-snap-align:start;
  }

  .catalog-carousel-section .product-carousel .product-image{
    flex-basis:210px !important;
    height:210px !important;
    min-height:210px !important;
    max-height:210px !important;
  }

  /* Mobile: título de até 3 linhas sem cortar letras */
  .catalog-carousel-section .product-carousel .product-body h3{
    min-height:84px !important;
    max-height:84px !important;
    line-height:1.22 !important;
    -webkit-line-clamp:3 !important;
    margin-bottom:10px !important;
  }

  /* Mobile: descrição com espaço consistente */
  .catalog-carousel-section .product-carousel .product-body > p{
    min-height:82px !important;
    max-height:82px !important;
    line-height:1.42 !important;
    -webkit-line-clamp:3 !important;
    margin-bottom:10px !important;
  }

  /* Reserva real para marketplace e evita o corte inferior */
  .catalog-carousel-section .product-carousel .market-mini{
    flex:0 0 82px !important;
    min-height:82px !important;
    height:82px !important;
    padding-top:14px !important;
    padding-bottom:18px !important;
    overflow:visible !important;
  }

  .catalog-carousel-section .product-carousel .market-mini-links{
    overflow:visible !important;
  }

  .catalog-carousel-section .product-carousel .market-icon-link{
    transform:none !important;
  }
}

@media(max-width:390px){
  .catalog-carousel-section .product-carousel .product-card{
    height:556px !important;
    min-height:556px !important;
    max-height:556px !important;
  }

  .catalog-carousel-section .product-carousel .product-image{
    flex-basis:200px !important;
    height:200px !important;
    min-height:200px !important;
    max-height:200px !important;
  }

  .catalog-carousel-section .product-carousel .product-body h3{
    min-height:80px !important;
    max-height:80px !important;
  }

  .catalog-carousel-section .product-carousel .product-body > p{
    min-height:78px !important;
    max-height:78px !important;
  }
}


/* ==========================================================
   M3 TECHNOLOGY — V1.3
   MOBILE: centralização vertical da faixa "COMPRAR EM"
   A distância da linha superior e da base do card fica equilibrada.
   ========================================================== */
@media(max-width:760px){

  .catalog-carousel-section .product-carousel .market-mini{
    flex:0 0 72px !important;
    min-height:72px !important;
    height:72px !important;

    display:flex !important;
    align-items:center !important;
    justify-content:space-between !important;

    padding:12px 10px !important;
    margin:0 !important;

    box-sizing:border-box !important;
    overflow:visible !important;
  }

  .catalog-carousel-section .product-carousel .market-mini > span{
    display:flex !important;
    align-items:center !important;
    align-self:center !important;
    margin:0 !important;
    line-height:1.2 !important;
  }

  .catalog-carousel-section .product-carousel .market-mini-links{
    height:100% !important;
    display:flex !important;
    align-items:center !important;
    justify-content:flex-end !important;
    align-self:center !important;
    gap:8px !important;
    margin:0 !important;
    overflow:visible !important;
  }

  .catalog-carousel-section .product-carousel .market-icon-link{
    align-self:center !important;
    margin:0 !important;
    transform:none !important;
  }
}
