/* PBQ Produits — cartes Amazon. Identité « basse-cour & bois ». */

.pbq-card, .pbq-grid, .pbq-inline, .pbq-note, .pbq-disclosure, .pbq-card__cta {
  --pbq-paille: #EFE6D2;
  --pbq-creme: #FBF6EA;
  --pbq-bois: #3B2E22;
  --pbq-bois-doux: #5A4632;
  --pbq-terra: #C0492B;
  --pbq-terra-clair: #D96A2C;
  --pbq-rouge: #8A3216;
  --pbq-jaune: #E4A62C;
  --pbq-ligne: #DDCEB2;
}

/* Carte complète */
.pbq-card {
  display: flex;
  gap: 22px;
  align-items: center;
  background: var(--pbq-creme);
  border: 1px solid var(--pbq-ligne);
  border-left: 4px solid var(--pbq-terra);
  border-radius: 14px;
  padding: 20px 22px;
  margin: 28px 0;
  position: relative;
  font-family: inherit;
  transition: box-shadow .2s, transform .2s;
}
.pbq-card:hover { box-shadow: 0 16px 36px -22px rgba(59,46,34,.55); transform: translateY(-2px); }

.pbq-card__badge {
  position: absolute;
  top: -12px;
  left: 18px;
  background: var(--pbq-terra);
  color: #fff;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .05em;
  font-size: 11.5px;
  padding: 5px 12px;
  border-radius: 6px;
  box-shadow: 0 4px 12px -4px rgba(59,46,34,.5);
}

.pbq-card__media {
  flex: none;
  width: 162px;
  height: 162px;
  border-radius: 10px;
  overflow: hidden;
  background: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--pbq-ligne);
}
.pbq-card__media img { max-width: 100%; max-height: 100%; width: auto; height: auto; object-fit: contain; display: block; padding: 8px; }
/* Placeholder produit (pas encore de photo — remplacé auto par l'image Amazon quand l'API est active) */
.pbq-card__media--ph { background: linear-gradient(135deg, #F7F0E1, #E9DFC8); }
.pbq-ph-icon { width: 46px; height: 46px; opacity: .55; background: center/contain no-repeat url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23C0492B' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 2 3 6v14a2 2 0 0 0 2 2h14a2 2 0 0 0 2-2V6l-3-4z'/%3E%3Cpath d='M3 6h18'/%3E%3Cpath d='M16 10a4 4 0 0 1-8 0'/%3E%3C/svg%3E"); }

.pbq-card__body { flex: 1; min-width: 0; }

.pbq-card__kicker {
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .12em;
  font-size: 11.5px;
  color: var(--pbq-terra);
  display: block;
  margin-bottom: 5px;
}

.pbq-card__title { margin: 0 0 8px; font-size: 20px; line-height: 1.22; font-weight: 700; }
.pbq-card__title a { color: var(--pbq-bois); text-decoration: none; border: 0; }
.pbq-card__title a:hover { color: var(--pbq-rouge); }

/* Notre note (étoiles éditoriales — jamais les étoiles Amazon) */
.pbq-note { display: inline-flex; align-items: center; gap: 8px; margin: 2px 0 10px; font-size: 13.5px; color: var(--pbq-bois-doux); }
.pbq-stars { --pct: 100%; position: relative; display: inline-block; font-size: 16px; line-height: 1; letter-spacing: 2px; }
.pbq-stars::before { content: "★★★★★"; color: #D8C9A8; }
.pbq-stars__on { position: absolute; top: 0; left: 0; height: 100%; width: var(--pct); overflow: hidden; white-space: nowrap; }
.pbq-stars__on::before { content: "★★★★★"; color: var(--pbq-jaune); }
.pbq-note__val { font-weight: 700; color: var(--pbq-bois); }
.pbq-note__lbl { font-size: 11px; text-transform: uppercase; letter-spacing: .08em; color: #9a8f79; }

/* Points forts */
.pbq-card__pros { list-style: none; margin: 0 0 12px; padding: 0; display: flex; flex-direction: column; gap: 4px; }
.pbq-card__pros li { position: relative; padding-left: 22px; font-size: 14px; color: var(--pbq-bois-doux); line-height: 1.4; }
.pbq-card__pros li::before { content: "✔"; position: absolute; left: 0; top: 0; color: var(--pbq-vert, #5B7A3A); font-weight: 700; }

.pbq-card__foot { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; }
.pbq-card__price { font-weight: 700; font-size: 22px; color: var(--pbq-rouge); white-space: nowrap; }
.pbq-card__old { color: var(--pbq-bois-doux); font-weight: 600; font-size: 15px; text-decoration: line-through; margin-right: 6px; opacity: .8; }

.pbq-card__cta {
  display: inline-flex; align-items: center; gap: 8px;
  background: var(--pbq-terra); color: #fff !important; text-decoration: none;
  font-weight: 800; text-transform: uppercase; letter-spacing: .05em; font-size: 16px;
  padding: 15px 26px; border-radius: 9px; border: 0;
  box-shadow: 0 8px 20px -8px rgba(192,73,43,.7);
  text-shadow: 0 1px 2px rgba(90,20,5,.35);
  transition: background .16s, transform .16s, box-shadow .16s;
}
.pbq-card__cta::after { content: "→"; font-size: 1.05em; transition: transform .16s; }
/* Variante inline (bouton [pbq_lien] au fil du texte) : un peu plus compacte */
.pbq-card__cta--inline { font-size: 14px; padding: 11px 20px; margin: 4px 0; vertical-align: middle; }
/* Bouton [pbq_lien bouton="1"] : bloc sur sa propre ligne (jamais collé à un titre/texte voisin) */
.pbq-cta-wrap { display: block; clear: both; margin: 20px 0; }
.post-body .pbq-cta-wrap { margin: 20px 0; }
.post-body .pbq-cta-wrap a { border-bottom: 0 !important; }
.pbq-card__cta:hover { background: var(--pbq-terra-clair); transform: translateY(-2px); box-shadow: 0 12px 26px -8px rgba(192,73,43,.75); }
.pbq-card__cta:hover::after { transform: translateX(3px); }

.pbq-card__note-meta { margin: 10px 0 0; font-size: 12px; color: #9a8f79; }

/* Variante mini (sans image) */
.pbq-card--mini { gap: 0; padding: 14px 16px; }
.pbq-card--mini .pbq-card__title { font-size: 16px; margin-bottom: 8px; }

/* Grille */
.pbq-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 20px; margin: 28px 0; }
.pbq-grid .pbq-card { margin: 0; flex-direction: column; align-items: stretch; }
.pbq-grid .pbq-card__media { width: 100%; height: 190px; }
.pbq-grid .pbq-card__foot { margin-top: auto; }

/* Lien enrichi inline */
.pbq-inline { color: var(--pbq-rouge); font-weight: 600; text-decoration: none; border-bottom: 1.5px solid var(--pbq-terra); }
.pbq-inline:hover { background: var(--pbq-paille); }

/* Podium : note sous le titre */
.pod-note { margin: 2px 0 8px; }

/* Divulgation affiliation */
.pbq-disclosure {
  margin: 32px 0 0; padding: 12px 16px;
  background: var(--pbq-paille); border: 1px dashed var(--pbq-ligne); border-radius: 8px;
  font-size: 12.5px; color: var(--pbq-bois-doux); line-height: 1.5;
}

/* ============================================================
   Overrides : le style de lien générique du thème (.post-body a)
   ne doit PAS polluer les liens des composants produit
   (sinon boutons illisibles + soulignements parasites).
   ============================================================ */
.post-body .pbq-card a, .post-body .pbq-grid a, .post-body .podium a { border-bottom: 0 !important; }
.post-body .pbq-card__title a, .post-body .podium h3 a { color: var(--kaki) !important; font-weight: 700; }
.post-body .pbq-card__title a:hover, .post-body .podium h3 a:hover { color: var(--rouille) !important; background: transparent !important; }
.post-body .pod .pbtn, .post-body .pod .pbtn:hover { color: #fff !important; font-weight: 800 !important; }
.post-body .pbq-card__cta, .post-body .pbq-card__cta:hover { color: #fff !important; font-weight: 800 !important; }

/* Responsive */
@media (max-width: 540px) {
  .pbq-card { flex-direction: column; align-items: stretch; }
  .pbq-card__media { width: 100%; height: 200px; }
}
