/* ===== Bloques Amazon – estilos base ===== */
.ba-block { margin: 1.25rem 0; }

/* Botón genérico */
.ba-btn, .ba-cta a {
  display: inline-block;
  padding: .6rem .9rem;
  border: 1px solid #111827;
  border-radius: .5rem;
  text-decoration: none;
  line-height: 1.2;
}
.ba-btn:hover, .ba-cta a:hover { opacity: .9; }
.ba-btn:focus-visible, .ba-cta a:focus-visible {
  outline: 2px solid #111827; outline-offset: 2px;
}

/* Imagen comodín */
.ba-block img { max-width: 100%; height: auto; display: block; }

/* Texto auxiliar */
.ba-updated, .ba-updated-inline { color: #6b7280; font-size: .85em; margin-top: .35rem; }

/* ===== 1) Tarjeta (ba-card) ===== */
.ba-card { border: 1px solid #e5e7eb; border-radius: .75rem; padding: 1rem; background: #fff; }
.ba-card-img { width: 100%; height: auto; border-radius: .5rem; }
.ba-card-title { margin: .6rem 0; font-size: 1.05rem; line-height: 1.3; }
.ba-card-price { font-weight: 600; margin: .25rem 0 .5rem; }

/* ===== 2) Horizontal (ba-horizontal) ===== */
.ba-horizontal { display: grid; grid-template-columns: 120px 1fr; gap: 1rem; align-items: start; border: 1px solid #e5e7eb; border-radius: .75rem; padding: 1rem; background: #fff; }
.ba-horizontal-img { width: 100%; border-radius: .5rem; }
.ba-horizontal .ba-price { font-weight: 600; margin: .25rem 0 .5rem; }
@media (max-width: 640px){ .ba-horizontal { grid-template-columns: 1fr; } }

/* ===== 3) Caja con borde (ba-box) ===== */
.ba-box { border: 1px solid #e5e7eb; border-radius: .75rem; background: #fff; overflow: hidden; }
.ba-box-header { padding: .8rem 1rem; border-bottom: 1px solid #e5e7eb; background: #f9fafb; }
.ba-box-body { padding: 1rem; }
.ba-box-body img { border-radius: .5rem; }
.ba-box-footer { padding: .8rem 1rem; border-top: 1px solid #e5e7eb; display:flex; gap:.75rem; align-items:center; flex-wrap:wrap; }

/* ===== 4) Ítem de lista (ba-list-item) ===== */
.ba-list-item { display: grid; grid-template-columns: 96px 1fr; gap: .8rem; align-items: start; border: 1px dashed #e5e7eb; border-radius: .75rem; padding: .75rem; background: #fff; }
.ba-list-img { width: 100%; border-radius: .5rem; }
.ba-list-info h4 { margin: .2rem 0 .25rem; font-size: 1rem; }
.ba-list-item .ba-price { font-weight: 600; margin: .15rem 0 .35rem; }
@media (max-width: 640px){ .ba-list-item { grid-template-columns: 1fr; } }

/* ===== 5) Destacado (ba-featured) ===== */
.ba-featured { position: relative; border-radius: 1rem; overflow: hidden; }
.ba-featured-img { width: 100%; display: block; }
.ba-featured-overlay {
  position: absolute; inset: auto 0 0 0; padding: 1rem;
  background: linear-gradient(180deg, rgba(0,0,0,0) 0%, rgba(0,0,0,.55) 60%, rgba(0,0,0,.8) 100%);
  color: #fff;
}
.ba-featured-overlay h2 { margin: 0 0 .35rem; font-size: 1.15rem; }
.ba-featured .ba-price, .ba-featured .ba-update { margin: .1rem 0; }
.ba-featured .ba-btn { border-color: #fff; color: #fff; }

/* ===== Tabla comparativa ===== */
.ba-compare .ba-table { width: 100%; border-collapse: collapse; background:#fff; border:1px solid #e5e7eb; border-radius:.5rem; overflow:hidden; }
.ba-compare .ba-table th, .ba-compare .ba-table td { padding: .75rem; border-bottom: 1px solid #f3f4f6; vertical-align: middle; }
.ba-compare .ba-img img { max-width: 120px; height: auto; }
@media (max-width: 640px){ .ba-compare .ba-img img { max-width: 80px; } }
.ba-compare .ba-pagination { margin-top: .5rem; }
.ba-compare .ba-pagination a { margin-right: .4rem; text-decoration: none; border: 1px solid #e5e7eb; padding: .25rem .5rem; border-radius: .35rem; }
.ba-compare .ba-pagination a.is-active { font-weight: 600; }

/* ===== Modo oscuro suave (si el theme lo usa) ===== */
@media (prefers-color-scheme: dark) {
  .ba-card, .ba-horizontal, .ba-box, .ba-list-item, .ba-compare .ba-table { background:#0b0b0b; border-color:#2a2a2a; }
  .ba-box-header { background:#141414; border-color:#2a2a2a; }
  .ba-box-footer { border-color:#2a2a2a; }
  .ba-updated, .ba-updated-inline { color:#9ca3af; }
  .ba-btn, .ba-cta a { border-color:#e5e7eb; color:#e5e7eb; }
  .ba-btn:focus-visible, .ba-cta a:focus-visible { outline-color:#e5e7eb; }
}

/* ===== Crossfiteros commercial blocks ===== */
.ba-cfs-product-card,
.ba-cfs-text-box {
  margin: 1.5rem 0;
  border: 1px solid #e2e8f0;
  border-left: 4px solid var(--sp-primary, #f97316);
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 8px 20px rgba(15, 23, 42, .05);
}

.ba-cfs-product-card {
  display: grid;
  grid-template-columns: minmax(150px, 220px) 1fr;
  gap: 1rem;
  padding: 1rem;
  align-items: center;
}

.ba-cfs-product-card--no-image {
  grid-template-columns: 1fr;
  padding: 1.05rem 1.15rem;
}

.ba-cfs-product-card:has(.ba-cfs-product-media:empty) {
  grid-template-columns: 1fr;
}

.ba-cfs-product-card--no-image .ba-cfs-product-media {
  display: none !important;
}

.ba-cfs-product-media {
  min-height: 120px;
  display: grid;
  place-items: center;
  border-radius: 6px;
  background: #f8fafc;
}

.ba-cfs-product-media:empty::before {
  content: "";
}

.ba-cfs-product-media:empty {
  display: none !important;
}

.ba-cfs-product-body h3,
.ba-cfs-text-box h3 {
  margin: .2rem 0 .55rem;
  font-size: 1.15rem;
  line-height: 1.3;
}

.ba-cfs-eyebrow {
  margin: 0 0 .25rem;
  color: #ea580c;
  font-size: .78rem;
  font-weight: 800;
  letter-spacing: .04em;
  text-transform: uppercase;
}

.ba-cfs-copy {
  margin: 0 0 .8rem;
  color: #334155;
  line-height: 1.6;
}

.ba-cfs-product-meta {
  min-height: 1.2rem;
  margin: .25rem 0 .7rem;
  color: #0f172a;
  font-weight: 800;
}

.ba-cfs-button,
.ba-cfs-mini-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: fit-content;
  max-width: 100%;
  min-height: 42px;
  padding: .68rem 1.05rem;
  border-radius: 6px;
  background: var(--sp-primary, #f97316);
  color: #fff !important;
  font-weight: 800;
  line-height: 1.1;
  text-decoration: none !important;
  border: 1px solid var(--sp-primary, #f97316);
  box-shadow: 0 6px 14px rgba(249, 115, 22, .18);
  transition: background-color .18s ease, border-color .18s ease, color .18s ease, transform .18s ease, box-shadow .18s ease;
}

.ba-cfs-button:hover,
.ba-cfs-mini-button:hover {
  background: #ea580c;
  border-color: #ea580c;
  color: #fff !important;
  text-decoration: none !important;
  transform: translateY(-1px);
  box-shadow: 0 8px 18px rgba(249, 115, 22, .22);
}

.ba-cfs-button:focus,
.ba-cfs-mini-button:focus {
  outline: 2px solid rgba(249, 115, 22, .35);
  outline-offset: 2px;
}

.ba-cfs-mini-button {
  min-height: 34px;
  padding: .4rem .65rem;
  font-size: .9rem;
}

.ba-cfs-note {
  margin: .65rem 0 0;
  color: #64748b;
  font-size: .84rem;
}

.ba-cfs-text-box {
  padding: 1rem;
}

.ba-cfs-search-cta {
  margin: 1.65rem 0;
  padding: 1.05rem 1.15rem;
  border: 1px solid #fed7aa;
  border-left: 4px solid var(--sp-primary, #f97316);
  border-radius: 8px;
  background: linear-gradient(180deg, #fffaf5 0%, #fff 100%);
  box-shadow: 0 10px 24px rgba(15, 23, 42, .06);
}

.ba-cfs-search-cta h3 {
  margin: .2rem 0 .5rem;
  font-size: 1.15rem;
  line-height: 1.3;
}

.ba-cfs-search-cta p:not(.ba-cfs-eyebrow) {
  margin: 0 0 .9rem;
  color: #334155;
  line-height: 1.6;
}

.ba-cfs-compare {
  margin: 1.5rem 0;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  overflow: hidden;
  background: #fff;
  box-shadow: 0 10px 24px rgba(15, 23, 42, .06);
}

.ba-cfs-compare-head,
.ba-cfs-compare-row {
  display: grid;
  grid-template-columns: 46px minmax(180px, 1.6fr) minmax(150px, 1fr) minmax(90px, .7fr) 72px;
  gap: .75rem;
  align-items: center;
  padding: .8rem 1rem;
}

.ba-cfs-compare-head {
  background: #0f172a;
  color: #fff;
  font-size: .78rem;
  font-weight: 800;
  letter-spacing: .04em;
  text-transform: uppercase;
}

.ba-cfs-compare-row + .ba-cfs-compare-row {
  border-top: 1px solid #e2e8f0;
}

.ba-cfs-rank {
  display: inline-grid;
  place-items: center;
  width: 30px;
  height: 30px;
  border-radius: 999px;
  background: #f97316;
  color: #111827;
  font-weight: 900;
}

.ba-cfs-product-title {
  font-weight: 800;
  line-height: 1.3;
}

.ba-cfs-compare > .ba-cfs-note {
  padding: 0 1rem 1rem;
}

.ba-affiliate-disclosure {
  margin: 1.5rem 0;
  padding: .85rem 1rem;
  border-left: 4px solid #f97316;
  background: #fff7ed;
  color: #431407;
  font-size: .92rem;
  line-height: 1.55;
}

@media (max-width: 720px) {
  .ba-cfs-product-card {
    grid-template-columns: 1fr;
  }

  .ba-cfs-compare-head {
    display: none;
  }

  .ba-cfs-compare-row {
    grid-template-columns: 38px 1fr;
  }

  .ba-cfs-compare-row span:nth-child(3),
  .ba-cfs-compare-row span:nth-child(4),
  .ba-cfs-compare-row span:nth-child(5) {
    grid-column: 2;
  }
}
