/* ==========================================================================
   Frequently Bought Together — Pharmavida
   Paleta: #87B13B (primary), #295441 (dark green), #FFA41C (accent)
   ========================================================================== */

/* ── Secção principal ──────────────────────────────────────────────────── */
.pv-fbt {
  margin-top: 32px;
  padding: 20px 22px 18px;
  background: #f8fbf2;
  border: 1px solid rgba(135, 177, 59, 0.25);
  border-radius: 10px;
  font-size: 13px;
  color: #282828;
}

/* ── Título ────────────────────────────────────────────────────────────── */
.pv-fbt__title {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0 0 18px;
  font-size: 15px;
  font-weight: 700;
  color: #295441;
}

.pv-fbt__title-icon {
  flex-shrink: 0;
  color: #87B13B;
}

/* ── Grid de produtos ──────────────────────────────────────────────────── */
.pv-fbt__products {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 16px;
}

/* Separador "+" */
.pv-fbt__plus {
  display: flex;
  align-items: center;
  align-self: center;
  font-size: 22px;
  font-weight: 300;
  color: #87B13B;
  line-height: 1;
  padding-top: 18px; /* alinhar visualmente com centro do card */
  flex-shrink: 0;
}

/* ── Item individual ───────────────────────────────────────────────────── */
.pv-fbt__item {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  flex: 0 0 auto;
  max-width: 160px;
}

/* Label do checkbox (envolvente clicável) */
.pv-fbt__check-wrap {
  display: flex;
  align-items: flex-start;
  margin-top: 8px;
  cursor: pointer;
  flex-shrink: 0;
}

/* Input nativo escondido */
.pv-fbt__checkbox {
  position: absolute;
  opacity: 0;
  width: 0;
  height: 0;
}

/* Checkbox visual */
.pv-fbt__check-mark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 18px;
  height: 18px;
  border: 2px solid rgba(135, 177, 59, 0.6);
  border-radius: 4px;
  background: #fff;
  flex-shrink: 0;
  transition: all 0.15s;
}

.pv-fbt__checkbox:checked + .pv-fbt__check-mark {
  background: #87B13B;
  border-color: #87B13B;
}

.pv-fbt__checkbox:checked + .pv-fbt__check-mark::after {
  content: '';
  display: block;
  width: 5px;
  height: 9px;
  border: 2px solid #fff;
  border-top: none;
  border-left: none;
  transform: rotate(45deg) translateY(-1px);
}

.pv-fbt__checkbox:disabled + .pv-fbt__check-mark {
  background: #295441;
  border-color: #295441;
  cursor: not-allowed;
}

.pv-fbt__checkbox:disabled + .pv-fbt__check-mark::after {
  content: '';
  display: block;
  width: 5px;
  height: 9px;
  border: 2px solid #fff;
  border-top: none;
  border-left: none;
  transform: rotate(45deg) translateY(-1px);
}

/* Card do produto */
.pv-fbt__card {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-decoration: none;
  color: inherit;
  gap: 6px;
  text-align: center;
}

.pv-fbt__card:hover .pv-fbt__name {
  color: #87B13B;
}

/* Imagem */
.pv-fbt__img {
  width: 100px;
  height: 100px;
  object-fit: contain;
  border-radius: 6px;
  background: #fff;
  border: 1px solid rgba(0,0,0,0.06);
}

.pv-fbt__img--placeholder {
  display: block;
  background: #e8ede4;
}

/* Nome do produto */
.pv-fbt__name {
  font-size: 12px;
  line-height: 1.4;
  color: #333;
  max-width: 120px;
  transition: color 0.15s;
}

/* Preço */
.pv-fbt__price {
  font-size: 13px;
  font-weight: 700;
  color: #295441;
}

/* Produto actual: destaque subtil */
.pv-fbt__item--current .pv-fbt__img {
  border-color: rgba(135, 177, 59, 0.3);
  box-shadow: 0 0 0 2px rgba(135, 177, 59, 0.1);
}

/* ── Rodapé: total + botão ─────────────────────────────────────────────── */
.pv-fbt__footer {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  padding-top: 14px;
  border-top: 1px solid rgba(135, 177, 59, 0.2);
}

.pv-fbt__total-label {
  color: #555;
  font-size: 13px;
}

.pv-fbt__total {
  font-size: 20px;
  font-weight: 700;
  color: #295441;
  min-width: 70px;
}

/* Botão "Adicionar ao carrinho" */
.pv-fbt__btn {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  margin-left: auto;
  padding: 10px 20px;
  background: #87B13B;
  color: #fff;
  border: none;
  border-radius: 6px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.2s;
  white-space: nowrap;
}

.pv-fbt__btn:hover {
  background: #6a9a2a;
}

.pv-fbt__btn:disabled {
  background: #b8c8a0;
  cursor: not-allowed;
}

/* ── Feedback ──────────────────────────────────────────────────────────── */
.pv-fbt__feedback {
  margin: 10px 0 0;
  padding: 8px 12px;
  border-radius: 4px;
  font-size: 12px;
}

.pv-fbt__feedback--success {
  background: rgba(135, 177, 59, 0.15);
  color: #295441;
}

.pv-fbt__feedback--error {
  background: rgba(255, 164, 28, 0.15);
  color: #7a4a00;
}

/* ── Responsivo ────────────────────────────────────────────────────────── */
@media (max-width: 768px) {
  .pv-fbt {
    padding: 16px 14px 14px;
  }

  .pv-fbt__products {
    gap: 8px;
  }

  .pv-fbt__item {
    max-width: 130px;
  }

  .pv-fbt__img {
    width: 80px;
    height: 80px;
  }

  .pv-fbt__btn {
    width: 100%;
    justify-content: center;
    margin-left: 0;
    margin-top: 4px;
  }

  .pv-fbt__footer {
    flex-direction: column;
    align-items: flex-start;
  }

  .pv-fbt__plus {
    padding-top: 12px;
    font-size: 18px;
  }
}
