/* Estilos propios del artículo woocommerce-vs-shopify-chile (prefijo ba-).
   Código de color: WooCommerce navy, Shopify lima y el plan medio de Shopify azul niebla.
   Los anchos responden al cuerpo del artículo (consulta de contenedor ga-body de blog-geo.css). */

/* Todas las secciones numeradas en lima (blog-geo.css pinta la 01 y la 02 con los colores de su artículo) */
.bl-body > .ga-sec:nth-of-type(n) { --sec-c: var(--lime); --sec-on: var(--on-lime); }
html.dark .bl-body > .ga-sec:nth-of-type(n) { --sec-c: var(--lime); }

/* «En corto» trae dos párrafos */
.bl-body .ga-intro .answer-first p + p { margin-top: .8em; }

/* Colores de cada plataforma */
.ba-woo { --ba: var(--navy); --ba-on: var(--lime); --ba-bar: var(--navy); }
.ba-shop { --ba: var(--lime); --ba-on: var(--on-lime); --ba-bar: var(--lime); }
.ba-mid { --ba: #aeb9c7; --ba-on: var(--on-lime); --ba-bar: #aeb9c7; }
html.dark .ba-woo { --ba: #3a4f70; --ba-bar: #7d93b4; }

.ba-pill { display: inline-flex; align-items: center; padding: 3px 12px; border-radius: 999px; background: var(--ba); color: var(--ba-on); font-size: .8125rem; font-weight: 600; letter-spacing: .02em; line-height: 1.5; white-space: nowrap; }

/* 01 · Resumen: dos tarjetas lado a lado */
.bl-body .ba-duo > * + * { margin-top: 12px; }
.bl-body .ba-duo-k { margin: 0; }
.ba-duo-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.ba-card { position: relative; display: flex; flex-direction: column; align-items: flex-start; gap: 12px; padding: clamp(20px, 2.4vw, 28px); border-radius: 20px; transition: translate .25s var(--ease-out); }
.ba-card:hover { translate: 0 -4px; }
.ba-card.ba-woo { background: var(--navy); color: #f2f5f8; }
.ba-card.ba-shop { background: #eff3cf; color: var(--ink); }
html.dark .ba-card.ba-woo { background: #22324a; }
html.dark .ba-card.ba-shop { background: #1d2410; }
.bl-body .ba-card p { margin: 0; font-size: 1.0625rem; line-height: 1.55; }
.bl-body .ba-card.ba-woo p { color: #dbe2ea; }
.bl-body .ba-card.ba-woo strong { color: #fff; }
.ba-card-h { display: block; margin-bottom: 4px; font-size: clamp(1.375rem, 1.2rem + .6vw, 1.625rem); letter-spacing: -0.025em; line-height: 1.1; }
.bl-body .ba-card.ba-woo .ba-card-h { color: var(--lime); }
.ba-card-ic { display: grid; place-items: center; width: 46px; height: 46px; border-radius: 14px; transform-origin: 50% 60%; }
.ba-card.ba-woo .ba-card-ic { background: rgba(255, 255, 255, .1); color: var(--lime); }
.ba-card.ba-shop .ba-card-ic { background: var(--lime); color: var(--on-lime); }
.ba-card-ic svg { width: 22px; height: 22px; }
.ba-card-tag { order: -1; padding: 3px 12px; border-radius: 999px; font-size: .8125rem; font-weight: 600; line-height: 1.5; }
.ba-card.ba-woo .ba-card-tag { background: rgba(200, 212, 0, .16); color: var(--lime); }
.ba-card.ba-shop .ba-card-tag { background: var(--tile); color: var(--ink); }
.ba-card .ba-card-ic { order: -2; }
.bl-body p.ba-duo-foot { display: flex; align-items: flex-start; gap: 12px; padding: 16px 20px; border-radius: 16px; background: var(--surface); font-size: 1.0625rem; line-height: 1.55; font-weight: 600; }
.ba-duo-foot svg { flex: none; width: 24px; height: 24px; margin-top: 1px; color: var(--brand); }

/* 05 · Mantenimiento y 09 · Conclusión: la misma pareja de tarjetas, más compacta */
.ba-maint .ba-card, .ba-end .ba-card { gap: 10px; }
.bl-body .ba-maint .ba-card p, .bl-body .ba-end .ba-card p { font-size: 1rem; }
.ba-end .ba-card.ba-woo .ba-pill { --ba: var(--lime); --ba-on: var(--on-lime); }
.ba-end .ba-card.ba-shop .ba-pill { --ba: var(--navy); --ba-on: var(--lime); }

/* Barras comparativas (costo total del año 1 y PageSpeed en móvil) */
.ba-range { --name-w: 160px; --val-w: 150px; --col-gap: 14px; padding: clamp(18px, 2.4vw, 26px); border-radius: 20px; background: var(--surface); }
.bl-body p.ba-range-h { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 12px; margin: 0 0 16px; }
.bl-body .ba-range-h .ga-label { margin: 0; font-size: 1.0625rem; color: var(--ink); }
.ba-range-sub { font-size: .875rem; color: var(--soft); }
.ba-range-rows { display: grid; gap: 14px; }
.ba-range-row { display: grid; grid-template-columns: var(--name-w) minmax(0, 1fr) var(--val-w); align-items: center; gap: var(--col-gap); }
.ba-range-name { font-size: .9375rem; font-weight: 600; line-height: 1.25; color: var(--ink); }
.ba-range-track { position: relative; height: 16px; border-radius: 999px; background-color: color-mix(in srgb, var(--ink) 7%, var(--tile)); background-image: repeating-linear-gradient(90deg, transparent 0 calc(20% - 1px), color-mix(in srgb, var(--ink) 12%, transparent) calc(20% - 1px) 20%); }
.ba-range-bar { position: absolute; top: 0; bottom: 0; left: var(--a); width: calc(var(--b) - var(--a)); border-radius: 999px; background: var(--ba-bar); transform-origin: 0 50%; }
.ba-range-row.ba-shop .ba-range-bar { box-shadow: inset 0 0 0 1px rgba(29, 42, 61, .12); }
.ba-range-val { font-size: .9375rem; font-weight: 600; font-variant-numeric: tabular-nums; color: var(--ink); white-space: nowrap; }
.ba-range-axis { position: relative; height: 1.3em; margin: 8px calc(var(--val-w) + var(--col-gap)) 0 calc(var(--name-w) + var(--col-gap)); font-size: .75rem; color: var(--soft); font-variant-numeric: tabular-nums; }
.ba-range-axis span { position: absolute; top: 0; translate: -50% 0; }
.ba-range-axis span:nth-child(1) { left: 0; translate: 0 0; }
.ba-range-axis span:nth-child(2) { left: 20%; }
.ba-range-axis span:nth-child(3) { left: 40%; }
.ba-range-axis span:nth-child(4) { left: 60%; }
.ba-range-axis span:nth-child(5) { left: 80%; }
.ba-range-axis span:nth-child(6) { left: 100%; translate: -100% 0; }
.ba-speed { --val-w: 64px; }

/* Tabla de costos: encabezado con la pastilla de cada plataforma y la fila del total destacada */
.bl-body .ba-table thead th { background: var(--surface); color: var(--ink); padding-block: 14px; }
.bl-body .ba-table thead th:first-child { color: var(--soft); font-weight: 600; }
.bl-body .ba-table tbody th { background: transparent; color: var(--ink); border-top: 1px solid var(--border); font-weight: 600; width: 24%; }
.bl-body .ba-table tbody tr:nth-child(even) th { background: color-mix(in srgb, var(--surface) 45%, transparent); }
.bl-body .ba-table tr.ba-total-row th, .bl-body .ba-table tr.ba-total-row td { background: #eff3cf; border-top: 2px solid var(--lime); }
html.dark .bl-body .ba-table tr.ba-total-row th, html.dark .bl-body .ba-table tr.ba-total-row td { background: #1d2410; }
.bl-body .ba-table tr.ba-total-row th span { display: block; margin-top: 2px; font-size: .8125rem; font-weight: 400; color: var(--soft); }
.bl-body .ba-table tr.ba-total-row td strong { color: var(--ink); white-space: nowrap; }

/* La comisión del 2 %: texto y mini calculadora */
.ba-fee { display: grid; grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr); gap: clamp(16px, 2.4vw, 28px); align-items: center; }
.bl-body .ba-fee-txt { margin: 0; }
.ba-calc, .ba-needs { --ui-bg: var(--surface); --ui-ink: var(--ink); --ui-soft: var(--soft); --ui-line: var(--border); border-radius: 18px; padding: 18px 20px; }
.ba-calc { display: grid; gap: 10px; }
.ba-calc-row, .ba-calc-tot { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; }
.ba-calc-row > span { color: var(--ui-soft); font-size: .875rem; }
.ba-calc-row b { font-variant-numeric: tabular-nums; }
.ba-calc-line { display: block; height: 2px; border-radius: 2px; background: var(--ui-ink); opacity: .7; transform-origin: 0 50%; }
.ba-calc-tot > span { font-weight: 600; }
.ba-calc-n { padding: 4px 12px; border-radius: 10px; background: var(--lime); color: var(--on-lime); font-size: 1.375rem; letter-spacing: -0.02em; font-variant-numeric: tabular-nums; }

/* Dos columnas: pagos y SEO de cada plataforma */
.ba-cols { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; align-items: start; }
.ba-col { position: relative; min-width: 0; padding: clamp(18px, 2.2vw, 24px); border-radius: 20px; background: var(--surface); overflow: hidden; }
.ba-col::before { content: ''; position: absolute; left: 0; right: 0; top: 0; height: 6px; background: var(--ba); transform-origin: 0 50%; transform: scaleX(var(--ba-top, 1)); }
.bl-body .ba-col h3 { display: flex; align-items: center; gap: 10px; margin: 4px 0 14px; font-size: clamp(1.0625rem, 1rem + .3vw, 1.25rem); }
.ba-col-ic { flex: none; display: grid; place-items: center; width: 36px; height: 36px; border-radius: 11px; background: var(--ba); color: var(--ba-on); }
.ba-col-ic svg { width: 18px; height: 18px; }
.bl-body .ba-list { gap: .7em; }
.bl-body .ba-list > li { font-size: 1rem; line-height: 1.5; overflow-wrap: anywhere; }
.bl-body .ba-col .ba-list > li::before { background: var(--ba); box-shadow: 0 0 0 3px color-mix(in srgb, var(--ba) 28%, transparent); }
.bl-body .ba-list code { background: var(--tile); }
.bl-body .ba-list > li.ba-no { padding: 12px 14px 12px 44px; border-radius: 14px; background: color-mix(in srgb, #d64545 11%, var(--tile)); }
.bl-body .ba-col .ba-list > li.ba-no::before { left: 14px; top: 15px; width: 20px; height: 20px; border-radius: 50%; box-shadow: none; background: #c93a3a url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='3' stroke-linecap='round'%3E%3Cpath d='M7 7l10 10M17 7 7 17'/%3E%3C/svg%3E") center / 12px no-repeat; }

/* 05 · Quién gestiona: íconos en vez de letras */
.ba-who .ga-pillar-n svg { width: 20px; height: 20px; }
.ba-to { color: var(--brand); font-weight: 600; }

/* 06 · Escalabilidad: tarjeta con las necesidades que piden flexibilidad */
.ba-needs { display: flex; flex-wrap: wrap; gap: 8px; align-self: center; }
.ba-needs-h { display: flex; align-items: center; gap: 8px; width: 100%; margin-bottom: 4px; font-weight: 600; font-size: .9375rem; }
.ba-needs-h svg { width: 18px; height: 18px; color: var(--brand); }
.ba-chip { display: inline-flex; align-items: center; gap: 6px; padding: 7px 12px; border-radius: 999px; background: var(--tile); border: 1px solid var(--border); font-size: .875rem; font-weight: 600; line-height: 1.2; }
.ba-chip svg { width: 15px; height: 15px; color: var(--brand); stroke-width: 3; }
.ba-needs-foot { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; width: 100%; margin-top: 6px; padding-top: 12px; border-top: 1px solid var(--border); font-size: .875rem; color: var(--ui-soft); }

/* 07 · Cuándo elegir: dos columnas de tarjetas */
.bl-body p.ba-pick-legend { display: flex; flex-wrap: wrap; gap: 6px 18px; margin-bottom: 4px; font-size: .8125rem; color: var(--soft); }
.ba-pick-legend span { display: inline-flex; align-items: center; gap: 6px; }
.ba-pick-legend span::before { content: ''; width: 18px; height: 6px; border-radius: 3px; }
.ba-lg-s::before { background: var(--ink); }
.ba-lg-w::before { background: color-mix(in srgb, var(--ink) 30%, transparent); }
.ba-pick { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; align-items: start; }
.ba-pick-col { display: grid; gap: 8px; padding: 14px; border-radius: 22px; background: var(--surface); }
.bl-body p.ba-pick-h { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px; margin: 2px 4px 6px; }
.ba-pick-k { font-size: .8125rem; font-weight: 600; color: var(--soft); }
.ba-pick-h .ba-pill { font-size: .9375rem; padding: 4px 14px; }
.ba-pick-card { position: relative; display: flex; flex-direction: column; align-items: flex-start; gap: 4px; padding: 14px 16px 14px 20px; border-radius: 14px; background: var(--tile); overflow: hidden; transition: translate .25s var(--ease-out); }
.ba-pick-card:hover { translate: 0 -3px; }
.ba-pick-card::before { content: ''; position: absolute; left: 0; top: 0; bottom: 0; width: 5px; background: var(--ba); }
.ba-pick-card strong { font-size: 1rem; line-height: 1.35; color: var(--ink); }
.ba-pick-card > span:last-child { font-size: .9375rem; line-height: 1.45; color: var(--soft); }
.ba-pick-tag { margin-bottom: 2px; padding: 1px 10px; border-radius: 999px; background: var(--lime); color: var(--on-lime); font-size: .75rem; font-weight: 600; line-height: 1.6; }

/* 08 · Mitos: tarjeta «Mito / Realidad» */
.ba-myths { display: grid; gap: 12px; }
.ba-myth { display: grid; grid-template-columns: minmax(0, .85fr) minmax(0, 1.15fr); border-radius: 22px; overflow: hidden; background: var(--surface); }
.ba-myth-top { display: flex; flex-direction: column; align-items: flex-start; gap: 12px; padding: clamp(18px, 2.4vw, 26px); background: var(--navy); color: #f2f5f8; }
html.dark .ba-myth-top { background: #22324a; }
.ba-myth-bot { display: flex; flex-direction: column; align-items: flex-start; gap: 10px; padding: clamp(18px, 2.4vw, 26px); }
.ba-myth-k { display: inline-flex; align-items: center; gap: 6px; padding: 3px 12px 3px 8px; border-radius: 999px; background: rgba(255, 255, 255, .12); color: #f2f5f8; font-size: .8125rem; font-weight: 600; line-height: 1.5; }
.ba-myth-k svg { width: 15px; height: 15px; stroke-width: 3; }
.ba-myth-k.ba-real { background: var(--lime); color: var(--on-lime); }
.bl-body .ba-myth h3 { display: block; margin: 0; font-size: clamp(1.1875rem, 1.05rem + .5vw, 1.4375rem); line-height: 1.25; color: #fff; }
.ba-strike { --ba-s: 100%; background: linear-gradient(var(--lime), var(--lime)) no-repeat 0 58% / var(--ba-s) 3px; }
.bl-body .ba-myth p { margin: 0; font-size: 1rem; line-height: 1.6; }

/* 09 · Conclusión */
.ba-quote-k { color: var(--brand); }

/* Cuerpo angosto */
@container ga-body (max-width: 640px) {
  .ba-fee { grid-template-columns: minmax(0, 1fr); }
  .ba-myth { grid-template-columns: minmax(0, 1fr); }
  .ba-needs { margin-top: 4px; }
}

/* Celular */
@container ga-body (max-width: 560px) {
  .ba-duo-grid, .ba-cols, .ba-pick { grid-template-columns: minmax(0, 1fr); }
  .ba-range { --name-w: auto; padding: 16px; }
  .ba-range-row { grid-template-columns: minmax(0, 1fr) auto; grid-template-areas: "name val" "track track"; gap: 6px 10px; }
  .ba-range-name { grid-area: name; }
  .ba-range-val { grid-area: val; font-size: .875rem; }
  .ba-range-track { grid-area: track; }
  .ba-range-axis { margin: 8px 0 0; }

  /* La tabla de costos pasa a una tarjeta por concepto */
  .bl-body .ba-table { overflow: visible; }
  .bl-body .ba-table table, .bl-body .ba-table tbody, .bl-body .ba-table tr, .bl-body .ba-table th, .bl-body .ba-table td { display: block; width: auto; }
  .bl-body .ba-table table { border-radius: 0; overflow: visible; }
  .bl-body .ba-table thead { display: none; }
  .bl-body .ba-table tbody { display: grid; gap: 10px; }
  .bl-body .ba-table tbody tr { padding: 6px 0 8px; border-radius: 18px; background: var(--surface); overflow: hidden; }
  .bl-body .ba-table tbody th, .bl-body .ba-table tbody tr:nth-child(even) th { width: auto; border: 0; padding: 12px 16px 6px; background: transparent; font-size: 1.0625rem; }
  .bl-body .ba-table td, .bl-body .ba-table tr:nth-child(even) td { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; padding: 7px 16px; border: 0; background: transparent; text-align: right; }
  .bl-body .ba-table td::before { content: attr(data-l); flex: none; padding: 1px 10px; border-radius: 999px; background: var(--ba, var(--lime)); color: var(--ba-on, var(--on-lime)); font-size: .75rem; font-weight: 600; text-align: left; }
  .bl-body .ba-table td:nth-of-type(1) { --ba: var(--navy); --ba-on: var(--lime); }
  .bl-body .ba-table td:nth-of-type(2) { --ba: var(--lime); --ba-on: var(--on-lime); }
  .bl-body .ba-table td:nth-of-type(3) { --ba: #aeb9c7; --ba-on: var(--on-lime); }
  html.dark .bl-body .ba-table td:nth-of-type(1) { --ba: #3a4f70; }
  .bl-body .ba-table tr.ba-total-row { background: #eff3cf; }
  html.dark .bl-body .ba-table tr.ba-total-row { background: #1d2410; }
  .bl-body .ba-table tr.ba-total-row th, .bl-body .ba-table tr.ba-total-row td { border: 0; background: transparent; }
  .bl-body .ba-table tr.ba-total-row td strong { white-space: normal; }

  .bl-body .ba-list > li.ba-no { padding-left: 40px; }
  .bl-body .ba-col .ba-list > li.ba-no::before { left: 12px; }
}
