/* Grid de comparação */
.ce-comp-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr); /* desktop: 3 colunas */
  gap: 20px;
}

@media (max-width: 768px) {
  .ce-comp-grid {
    grid-template-columns: repeat(2, 1fr); /* mobile: 2 colunas */
  }
}

/* Item de comparação */
.ce-comp-item {
  position: relative;
  border: 1px solid #e6e6e6;
  border-radius: 10px;
  padding: 12px;
  cursor: pointer;
  background: #fff;
  transition: box-shadow .2s, border-color .2s;
}
.ce-comp-item:hover {
  box-shadow: 0 4px 16px rgba(0,0,0,0.08);
  border-color: #dcdcdc;
}
.ce-comp-item img {
  width: 90%;
  height: 140px;
  object-fit: contain;
  display: block;
  margin: 0 auto 8px;
}
.ce-comp-item.is-selected { 
  outline: 2px solid #0ea5e9; 
}

/* Checkbox / seleção */
.ce-comp-check-input {
  display: none;
}
.ce-comp-check {
  position: absolute;
  top: 10px; 
  left: 10px;
  width: 22px; 
  height: 22px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #fff;
}
.ce-comp-check { width: 18px; }
.ce-comp-item.is-selected .ce-comp-check {
  background: url('https://laboraltec.com.br/wp-content/uploads/2025/09/check-popup-comparador.svg')
              center/contain no-repeat;
}

/* Footer */
.ce-comp-footer {
  position: sticky;
  bottom: 8px;
  left: 0;
  right: 0;
  background: #b5e4f7;
  border-top: 1px solid #e5e7eb;
  padding: 12px 16px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  z-index: 100;
  border-radius: 8px;
}

/* Botões */
.ce-comp-btn {
  padding: 10px 18px !important;
  border-radius: 60px !important;
  background: #00A3DA !important;
  color: #fff !important; 
  border: 0 !important;
  cursor: pointer !important;
  padding: 8px 32px !important;
  font-weight: 300 !important;
  text-transform: uppercase !important;
  font-size: 14px !important;
}
.ce-comp-btn[disabled] {
  opacity: .5 !important;
  cursor: not-allowed !important;
  background-color: #00A3DA !important;
  border: 0 !important;
  color: #fff !important;
  border-radius: 60px !important;
  padding: 8px 32px !important;
  font-weight: 300 !important;
  text-transform: uppercase;
  font-size: 14px !important;
}

/* Tabela de comparação */
.ce-comp-table {
  width: 100%;
  border-collapse: collapse;
  table-layout: fixed; /* força respeitar os widths */
}
.ce-comp-table th, 
.ce-comp-table td {
  vertical-align: top;
  text-align: center;
  padding: 8px 12px;
  background: #fff;
  border: 1px solid #eee;
}
.ce-comp-table {
  border-collapse: separate;
  border-spacing: 0;
  width: 100%;
  table-layout: fixed;
}

/* Cabeçalho fixo da tabela */
.ce-comp-table .ce-comp-head th{
  position: sticky;
  top: 20px;
  background: #fff;
  z-index: 4;
  border-top: 2px solid #009fe3b5;
  border-bottom: 2px solid #009fe3b5;
  border-right: 2px solid #009fe3b5;
  border-left: 0;
}
table thead:first-child tr:first-child th
 {
    border-block-start: 2px solid #009fe3b5 !important;
}
.ce-comp-table .ce-comp-head {
  position: sticky !important;
  top: 0 !important;
  z-index: 12 !important;
  background: #fff !important;
}
.ce-comp-table .ce-comp-head th:first-child{
  border-left: 2px solid #009fe3b5;
}

/* Hover da tabela */
.page-id-18220 table tbody tr:hover>td, 
table tbody tr:hover>th {
  background-color: hsl(198deg 100% 45% / 5%);
}

/* Elementos da tabela */
.ce-comp-head { background:#fff; }
.ce-comp-attr { 
  background:#f8fafc; 
  font-weight:600; 
  text-align: left !important;
}
.ce-comp-title {
  font-size:16px; 
  margin-top:6px; 
  margin-bottom: 12px;
  text-align: center;
}
.ce-comp-price {
  font-size:13px; 
  color:#334155; 
  margin-top:4px; 
}
.ce-comp-thumb { 
  max-width: 100px;
  margin-left: auto;
  margin-right: auto;
}
.ce-comp-links {
  display: flex;
  gap: 20px;
  justify-content: center;
  align-items: center;
}
.ce-comp-links a {
  color: #0063B9;
  font-size: 14px;
  font-weight: 300;
  text-align: center;
}
.ce-comp-product, 
.ce-comp-head .ce-comp-info { 
  justify-items: center;
  padding: 20px;
  vertical-align: middle !important;
  text-align: center !important;
}
.ce-comp-selected {
  display: flex;
  flex-direction: column;
  align-items: center;
  vertical-align: middle;
  text-align: center;
}
.ce-comp-table p {
  display: flex;
  align-items: center;
  gap: 8px;
  justify-content: center;
}

/* Larguras da tabela */
.ce-comp-table th.ce-comp-info,
.ce-comp-table td.ce-comp-attr {
  min-width: 200px;
  width: 200px; 
}
.ce-comp-table.ce-comp-produtos-2 th.ce-comp-product,
.ce-comp-table.ce-comp-produtos-2 td.ce-comp-product {
  min-width: 300px;
  width: 500px;
}
.ce-comp-table.ce-comp-produtos-3 th.ce-comp-product,
.ce-comp-table.ce-comp-produtos-3 td.ce-comp-product {
  min-width: auto;
  width: auto;
}

/* Responsividade */
@media (max-width: 1024px) {
  .ce-comp-table td.ce-comp-attr,
  .ce-comp-table th.ce-comp-info {
    position: sticky;
    left: 0;
    z-index: 11;
    background: #fff !important;
    min-width: 120px !important;
    max-width: 120px !important;
    width: 120px !important;
    white-space: normal;
  }
  .ce-comp-table th, 
  .ce-comp-table td {
    text-align: left !important;
    font-size: 12px !important;
  }
  .ce-comp-table {
    min-width: 600px;
    border-collapse: separate;
  }
  .ce-comp-attr {
    font-size: 12px !important;
  }
  .ce-comp-table p {
    justify-content: flex-start !important;
    font-size: 12px !important;
  }
  .ce-comp-table .ce-comp-head th {
    top: 0px;
  }
 .ce-comp-table th.ce-comp-info,
.ce-comp-table td.ce-comp-attr {
 text-align: left !important;
}

@media (max-width: 768px) {
  /* anula regra do desktop para 3 produtos */
  .ce-comp-table.ce-comp-produtos-3 th.ce-comp-product,
  .ce-comp-table.ce-comp-produtos-3 td.ce-comp-product {
    min-width: 260px;
    width: auto;
  }
  /* mesma lógica para 2 produtos */
  .ce-comp-table.ce-comp-produtos-2 th.ce-comp-product,
  .ce-comp-table.ce-comp-produtos-2 td.ce-comp-product {
    min-width: 260px;
    width: auto;
  }
}