/* HighlightCard.css */

/* ── Card base — visual moderno, sombra suave, hover elegante ── */
.highlightCard {
  display: flex;
  flex-direction: column;
  width: 100%;
  background-color: #fff;
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04), 0 4px 14px rgba(0, 0, 0, 0.04);
  border: 1px solid #f0f0f0;
  transition: transform 0.35s ease, box-shadow 0.35s ease, border-color 0.25s ease;
  cursor: pointer;
  position: relative;
  box-sizing: border-box;
}

.highlightCard:hover {
  transform: translateY(-6px);
  border-color: rgba(187, 6, 6, 0.18);
  box-shadow:
    0 2px 4px rgba(0, 0, 0, 0.05),
    0 22px 44px -12px rgba(187, 6, 6, 0.18);
}

/* ── Imagem com proporção responsiva ── */
.highlightImage {
  position: relative;
  width: 100%;
  overflow: hidden;
  border-radius: 16px 16px 0 0;
  background: linear-gradient(135deg, #f7f7f7, #efefef);
  padding-top: 100%; /* quadrado — combina com imagens 1:1 sem cortar */
  flex-shrink: 0;
}

.highlightImage img {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;   /* mostra a imagem inteira; sobra vai pro fundo */
  padding: 10px;          /* respiro leve dentro do quadrado */
  box-sizing: border-box;
  transition: transform 0.45s ease;
  border-radius: 0;
  display: block;
}

.highlightCard:hover .highlightImage img {
  transform: scale(1.05);
}

/* ── Tags de condição ── */
.highlightTags {
  position: absolute;
  top: 10px;
  left: 10px;
  right: 10px;
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  z-index: 2;
  pointer-events: none;
}

.highlightTags > div:first-child {
  pointer-events: auto;
}

.tag {
  display: inline-block;
  padding: 3px 8px;
  border-radius: 20px;
  color: #fff;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.4px;
  text-transform: uppercase;
}

.new     { background-color: #BB0606; }
.premium { background-color: #b8860b; }
.eco     { background-color: #555; }

/* ── Ícones de variação ── */
.iconContainer {
  display: flex;
  align-items: center;
  gap: 4px;
  pointer-events: auto;
}

.tooltipContainer {
  position: relative;
  display: inline-block;
  cursor: default;
}

.variationIcon {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background-color: rgba(255, 255, 255, 0.92);
  padding: 3px;
  box-sizing: border-box;
  box-shadow: 0 1px 4px rgba(0,0,0,0.15);
}

.tooltip {
  visibility: hidden;
  width: 150px;
  background-color: #111;
  color: #fff;
  text-align: center;
  border-radius: 6px;
  padding: 5px 8px;
  font-size: 11px;
  line-height: 1.4;
  position: absolute;
  bottom: 130%;
  left: 50%;
  transform: translateX(-50%);
  opacity: 0;
  transition: opacity 0.2s, visibility 0.2s;
  pointer-events: none;
  white-space: normal;
  z-index: 1000;
}

.tooltipContainer:hover .tooltip {
  visibility: visible;
  opacity: 1;
}

/* ── Detalhes ── */
.highlightDetails {
  padding: 14px 14px 10px;
  display: flex;
  flex-direction: column;
  flex: 1;
  text-align: left;
}

/* ── Título ── */
.highlightTitle {
  font-size: 14px;
  font-weight: 700;
  color: #111;
  margin: 0 0 6px;
  overflow: hidden;
  text-overflow: ellipsis;
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  line-clamp: 2;
  line-height: 1.35;
  min-height: 38px;
}

/* ── Descrição ── */
.highlightDescription {
  font-size: 12px;
  color: #666;
  overflow: hidden;
  text-overflow: ellipsis;
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  line-clamp: 2;
  line-height: 1.5;
  margin: 0 0 8px;
  flex-grow: 1;
}

/* ── Variações ── */
.variationsContainer {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  min-height: 26px;
  margin-bottom: 8px;
  flex-shrink: 0;
}

.variationItem {
  display: inline-block;
  background-color: #fff;
  color: #444;
  border: 1px solid #ddd;
  border-radius: 5px;
  padding: 3px 8px;
  font-size: 11px;
  font-weight: 600;
  cursor: pointer;
  transition: border-color 0.2s ease, background-color 0.2s ease;
}

.variationItem:hover {
  border-color: #BB0606;
  background-color: #fff5f5;
}

.variationItem.selected {
  border-color: #BB0606;
  background-color: #fff5f5;
  color: #BB0606;
}

.placeholder {
  height: 26px;
  flex-shrink: 0;
}

/* ── Botão Ver Produto ── */
.highlightButton {
  background: none;
  color: #BB0606;
  border: none;
  padding: 5px 0 4px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.4px;
  text-transform: uppercase;
  transition: color 0.2s ease, gap 0.2s ease;
  align-self: flex-start;
  flex-shrink: 0;
}

.highlightButton:hover {
  color: #9a0505;
  gap: 7px;
}

.buttonIcon {
  font-size: 14px;
  line-height: 1;
}

/* ── Responsividade ── */
@media (max-width: 768px) {
  .highlightCard {
    border-radius: 12px;
  }

  .highlightImage {
    padding-top: 100%;
    border-radius: 12px 12px 0 0;
  }

  .highlightDetails {
    padding: 12px 12px 8px;
  }

  .highlightTitle {
    font-size: 13px;
    min-height: 35px;
  }

  .highlightDescription {
    font-size: 12px;
  }

  .tag {
    font-size: 9px;
    padding: 2px 6px;
  }

  .variationIcon {
    width: 20px;
    height: 20px;
  }

  .highlightButton {
    font-size: 11px;
  }
}
