/* BetterCompared – estilos. Paleta propia: verde petróleo + ámbar sobre papel cálido. */
:root {
  --bc-ink: #16242a;
  --bc-mut: #5f6c72;
  --bc-paper: #fbf8f3;
  --bc-card: #ffffff;
  --bc-line: #e5dfd4;
  --bc-deep: #0d3138;
  --bc-deep2: #134750;
  --bc-on-deep: #eef6f5;
  --bc-mut-deep: #a9c3c4;
  --bc-accent: #f2a93b;
  --bc-win: #0f766e;
  --bc-p0: #f2a93b;
  --bc-p1: #2ec4b6;
  --bc-p2: #a57bea;
  --bc-p3: #f0647b;
  --bc-p4: #5aa9e6;
  --bc-p5: #a3c644;
}
.bc-p0 { --c: var(--bc-p0); }
.bc-p1 { --c: var(--bc-p1); }
.bc-p2 { --c: var(--bc-p2); }
.bc-p3 { --c: var(--bc-p3); }
.bc-p4 { --c: var(--bc-p4); }
.bc-p5 { --c: var(--bc-p5); }

.bc { color: var(--bc-ink); font-size: 16px; line-height: 1.5; margin: 1.5rem 0; }
.bc *, .bc-modal *, .bc-fab * { box-sizing: border-box; }
.bc a { color: inherit; }
.bc-kicker { display: block; margin: 0 0 .5rem; font-size: .75rem; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: var(--bc-accent); }
.bc-h2 { margin: 0 0 .35rem; font-size: clamp(1.3rem, 2.4vw, 1.75rem); font-weight: 800; line-height: 1.2; letter-spacing: -.01em; }
.bc-sub { margin: 0 0 1rem; color: var(--bc-mut); font-size: .92rem; }
.bc-sec { margin-top: 2.5rem; }
.bc-notice { padding: 1rem 1.25rem; border-left: 4px solid var(--bc-accent); background: var(--bc-paper); border-radius: 0 10px 10px 0; }

/* Botones */
.bc-btn { display: inline-flex; align-items: center; gap: .45rem; padding: .6rem 1.1rem; border: 2px solid var(--bc-accent); border-radius: 999px; background: var(--bc-accent); color: #1c1403; font: inherit; font-weight: 700; font-size: .92rem; line-height: 1.1; white-space: nowrap; text-decoration: none; cursor: pointer; transition: transform .12s, filter .12s; }
.bc-btn:hover { filter: brightness(1.06); transform: translateY(-1px); }
.bc-btn:focus-visible, .bc-fab:focus-visible, .bc-modal button:focus-visible, .bc-modal input:focus-visible { outline: 3px solid #fff; outline-offset: 2px; box-shadow: 0 0 0 5px var(--bc-win); }
.bc-btn-ghost { background: transparent; color: inherit; border-color: currentColor; }
.bc-btn[disabled] { opacity: .45; cursor: not-allowed; transform: none; }
.bc-vs-mark { font-weight: 900; font-style: italic; letter-spacing: -.04em; }

/* Cabecera */
.bc-hero { padding: clamp(1.25rem, 3vw, 2.25rem); border-radius: 18px; background: linear-gradient(150deg, var(--bc-deep2), var(--bc-deep) 70%); color: var(--bc-on-deep); }
.bc-cards { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr); gap: .9rem; }
.bc-card { position: relative; display: flex; flex-direction: column; align-items: center; gap: .65rem; padding: 1.1rem .8rem 1.2rem; border-radius: 14px; background: rgba(255, 255, 255, .06); border-top: 4px solid var(--c); text-align: center; min-width: 0; }
.bc-card-img { display: flex; align-items: center; justify-content: center; width: 100%; height: clamp(90px, 16vw, 170px); }
.bc-card-img img { max-width: 100%; max-height: 100%; object-fit: contain; border-radius: 8px; }
.bc-noimg { display: flex; align-items: center; justify-content: center; width: 72px; height: 72px; border-radius: 50%; background: var(--c); color: var(--bc-deep); font-size: 2rem; font-weight: 800; }
.bc-card-name { margin: 0; font-size: clamp(.98rem, 1.7vw, 1.3rem); font-weight: 800; line-height: 1.2; overflow-wrap: anywhere; }
.bc-card-name a { text-decoration: none; }
.bc-card-name a:hover { text-decoration: underline; }
.bc-ring { position: relative; width: 64px; height: 64px; flex: none; }
.bc-ring svg { width: 100%; height: 100%; }
.bc-ring circle { fill: none; stroke-width: 6; }
.bc-ring-bg { stroke: rgba(255, 255, 255, .16); }
.bc-ring-fg { stroke: var(--c); stroke-linecap: round; }
.bc-ring span { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; font-size: 1.25rem; font-weight: 800; }
.bc-badge { padding: .2rem .6rem; border-radius: 999px; background: var(--c); color: var(--bc-deep); font-size: .72rem; font-weight: 800; letter-spacing: .03em; text-transform: uppercase; }
.bc-verdict { margin: 1.5rem 0 .3rem; font-size: clamp(1.05rem, 2vw, 1.4rem); font-weight: 600; line-height: 1.35; }
.bc-verdict strong { color: var(--bc-accent); }
.bc-basis { margin: 0; color: var(--bc-mut-deep); font-size: .86rem; }
.bc-more { margin: 1rem 0 0; }
.bc-solo .bc-cards { grid-auto-flow: row; grid-template-columns: minmax(0, 1fr); }
.bc-solo .bc-card { flex-flow: row wrap; justify-content: center; gap: 1.2rem; }
.bc-solo .bc-card-img { width: auto; flex: 0 1 240px; }

/* Radar + barras */
.bc-legend { display: flex; flex-wrap: wrap; gap: .4rem 1.1rem; margin: 0 0 .8rem; font-size: .9rem; font-weight: 600; }
.bc-legend i, .bc-table thead th i { display: inline-block; width: .7rem; height: .7rem; margin-right: .4rem; border-radius: 50%; background: var(--c); }
.bc-glance { display: grid; grid-template-columns: minmax(0, 360px) minmax(0, 1fr); gap: 1.5rem 2.5rem; align-items: center; padding: 1.25rem; border: 1px solid var(--bc-line); border-radius: 16px; background: var(--bc-paper); }
.bc-radar svg { display: block; width: 100%; height: auto; overflow: visible; }
.bc-grid { fill: none; stroke: #cfc8ba; stroke-width: 1; }
.bc-axis { fill: var(--bc-mut); font-size: 12px; font-weight: 600; }
.bc-shape { fill: var(--c); fill-opacity: .16; stroke: var(--c); stroke-width: 2.5; stroke-linejoin: round; }
.bc-area-row { display: grid; grid-template-columns: minmax(0, 11rem) minmax(0, 1fr); gap: .3rem 1rem; align-items: center; padding: .55rem 0; border-bottom: 1px solid var(--bc-line); }
.bc-area-row:last-child { border-bottom: 0; }
.bc-area-label { font-weight: 700; font-size: .92rem; text-decoration: none; }
.bc-area-label:hover { text-decoration: underline; }
.bc-bars { display: grid; gap: 4px; }
.bc-bar { position: relative; height: 16px; border-radius: 8px; background: #ece6da; }
.bc-bar span { display: block; height: 100%; min-width: 4px; border-radius: 8px; background: var(--c); opacity: .5; }
.bc-bar.bc-win span { opacity: 1; }
.bc-bar b { position: absolute; right: 6px; top: 0; font-size: .72rem; line-height: 16px; font-weight: 800; }

/* Tablas */
.bc-scroll { overflow-x: auto; -webkit-overflow-scrolling: touch; border: 1px solid var(--bc-line); border-radius: 14px; background: var(--bc-card); }
.bc-table { width: 100%; margin: 0; border-collapse: collapse; font-size: .93rem; }
.bc-table th, .bc-table td { padding: .7rem .9rem; border: 0; border-bottom: 1px solid var(--bc-line); text-align: left; vertical-align: top; background: none; }
.bc-table tbody tr:last-child th, .bc-table tbody tr:last-child td { border-bottom: 0; }
.bc-table thead th { font-size: .82rem; font-weight: 800; background: var(--bc-paper); white-space: nowrap; }
.bc-table tbody th { width: 38%; min-width: 9.5rem; font-weight: 600; }
.bc-table tbody th small { display: block; margin-top: .15rem; color: var(--bc-mut); font-size: .8rem; font-weight: 400; line-height: 1.35; }
.bc-v { min-width: 6.5rem; color: var(--bc-mut); }
.bc-v.bc-won { color: var(--bc-ink); font-weight: 800; box-shadow: inset 3px 0 0 var(--c); }
.bc-v.bc-yes::before, .bc-v.bc-no::before { content: ""; display: inline-block; width: .6rem; height: .6rem; margin-right: .4rem; border-radius: 50%; border: 2px solid #b9b2a4; }
.bc-v.bc-yes::before { background: var(--c); border-color: var(--c); }
.bc-v.bc-yes { color: var(--bc-ink); }
.bc-v.bc-na { font-style: italic; opacity: .75; }
.bc-note { color: var(--bc-win); font-weight: 800; text-decoration: none; cursor: help; }
.bc-mg { width: 1%; text-align: right !important; white-space: nowrap; }
.bc-chip { display: inline-block; padding: .12rem .55rem; border-radius: 999px; background: color-mix(in srgb, var(--c) 28%, #fff); font-size: .8rem; font-weight: 800; }
.bc-even { color: var(--bc-mut); font-size: .8rem; }

/* Áreas desplegables */
.bc-area { margin-top: .7rem; border: 1px solid var(--bc-line); border-radius: 14px; background: var(--bc-card); scroll-margin-top: 90px; }
.bc-area > summary { display: flex; align-items: center; gap: .7rem; padding: .95rem 1.1rem; cursor: pointer; list-style: none; font-weight: 800; }
.bc-area > summary::-webkit-details-marker { display: none; }
.bc-area > summary::after { content: ""; flex: none; width: .55rem; height: .55rem; margin-left: .3rem; border-right: 2px solid var(--bc-mut); border-bottom: 2px solid var(--bc-mut); transform: rotate(45deg); transition: transform .15s; }
.bc-area[open] > summary::after { transform: rotate(225deg); }
.bc-area-n { display: inline-flex; align-items: center; justify-content: center; flex: none; width: 1.7rem; height: 1.7rem; border-radius: 50%; background: var(--bc-deep); color: #fff; font-size: .82rem; }
.bc-area-t { flex: 1; font-size: 1.05rem; }
.bc-pill { padding: .2rem .7rem; border-radius: 999px; background: color-mix(in srgb, var(--c) 30%, #fff); border: 1.5px solid var(--c); font-size: .78rem; font-weight: 800; text-align: center; }
.bc-pill-even { background: #efeae0; border-color: #d8d1c3; color: var(--bc-mut); }
.bc-area .bc-scroll { border: 0; border-top: 1px solid var(--bc-line); border-radius: 0 0 14px 14px; }

/* Botón flotante */
.bc-fab { position: fixed; right: 18px; bottom: 18px; z-index: 9990; display: inline-flex; align-items: center; gap: .5rem; padding: .7rem 1.05rem; border: 0; border-radius: 999px; background: var(--bc-deep); color: #fff; font: 800 1.05rem/1 system-ui, sans-serif; box-shadow: 0 8px 24px rgba(13, 49, 56, .35); cursor: pointer; }
.bc-fab:hover { background: var(--bc-deep2); }
.bc-fab-n { min-width: 1.5rem; padding: .2rem .4rem; border-radius: 999px; background: var(--bc-accent); color: #1c1403; font-size: .8rem; font-style: normal; text-align: center; }
.bc-fab-n[hidden] { display: none; }

/* Ventana VS */
html.bc-lock { overflow: hidden; }
.bc-modal { position: fixed; inset: 0; z-index: 99999; display: flex; justify-content: center; align-items: flex-start; padding: 4vh 16px; background: rgba(6, 26, 30, .72); overflow-y: auto; }
.bc-modal[hidden] { display: none; }
.bc-modal-box { width: 100%; max-width: 640px; padding: 1.4rem; border-radius: 18px; background: var(--bc-deep); color: var(--bc-on-deep); font: 16px/1.4 system-ui, -apple-system, "Segoe UI", sans-serif; box-shadow: 0 24px 60px rgba(0, 0, 0, .4); }
.bc-modal-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 1rem; }
.bc-modal-head h2 { margin: 0; color: inherit; font-size: 1.3rem; font-weight: 800; }
.bc-modal-x { width: 2.4rem; height: 2.4rem; border: 0; border-radius: 50%; background: rgba(255, 255, 255, .1); color: #fff; font-size: 1.5rem; line-height: 1; cursor: pointer; }
.bc-chosen, .bc-results { margin: 0; padding: 0; list-style: none; }
.bc-chosen li { display: flex; align-items: center; gap: .7rem; padding: .6rem .3rem .6rem .7rem; border-left: 3px solid var(--bc-accent); border-bottom: 1px solid rgba(255, 255, 255, .22); }
.bc-chosen li + li { margin-top: 1.5rem; position: relative; }
.bc-chosen li + li::after { content: "VS"; position: absolute; left: 0; top: -1.3rem; font-size: .7rem; font-weight: 900; font-style: italic; color: var(--bc-mut-deep); }
.bc-chosen-t { flex: 1; min-width: 0; font-weight: 600; overflow-wrap: anywhere; }
.bc-chosen-x { width: 2.2rem; height: 2.2rem; border: 0; background: none; color: var(--bc-mut-deep); font-size: 1.4rem; cursor: pointer; }
.bc-chosen-x:hover { color: #fff; }
.bc-thumb { display: flex; align-items: center; justify-content: center; flex: none; width: 2.4rem; height: 2.4rem; border-radius: 8px; background: #fff; color: var(--bc-deep); font-weight: 800; overflow: hidden; }
.bc-thumb img { width: 100%; height: 100%; object-fit: contain; }
.bc-search { margin-top: 1.3rem; }
.bc-search[hidden] { display: none; }
.bc-search input { width: 100%; padding: .8rem .2rem; border: 0; border-bottom: 2px solid #fff; border-radius: 0; background: none; color: #fff; font: inherit; font-size: 1.05rem; }
.bc-search input::placeholder { color: var(--bc-mut-deep); }
.bc-modal .screen-reader-text { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
.bc-modal-msg { min-height: 1.2rem; margin: .6rem 0; color: var(--bc-mut-deep); font-size: .86rem; }
.bc-btn-go { width: 100%; justify-content: center; padding: .9rem; font-size: 1.05rem; }
.bc-modal-k { margin: 1.5rem 0 .4rem; color: var(--bc-mut-deep); font-size: .74rem; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; }
.bc-modal-k:empty { display: none; }
.bc-results li { display: flex; align-items: center; gap: .8rem; padding: .6rem 0; border-bottom: 1px solid rgba(255, 255, 255, .1); }
.bc-results .bc-thumb { width: 3rem; height: 3rem; }
.bc-res-t { flex: 1; min-width: 0; }
.bc-res-t b { display: block; overflow-wrap: anywhere; }
.bc-res-t small { color: var(--bc-mut-deep); }
.bc-res-add { flex: none; padding: .45rem .8rem; border: 1.5px solid rgba(255, 255, 255, .6); border-radius: 999px; background: none; color: #fff; font: inherit; font-size: .82rem; font-weight: 700; cursor: pointer; }
.bc-res-add:hover { background: #fff; color: var(--bc-deep); }
.bc-empty { color: var(--bc-mut-deep); }

/* Móvil */
@media (max-width: 760px) {
  .bc-glance { grid-template-columns: 1fr; padding: 1rem; }
  .bc-radar { max-width: 340px; margin: 0 auto; width: 100%; }
  .bc-area-row { grid-template-columns: 1fr; }
  .bc-hero { border-radius: 14px; }
  .bc-table th, .bc-table td { padding: .6rem .65rem; }
  .bc-table tbody th { position: sticky; left: 0; z-index: 1; width: auto; min-width: 8.2rem; max-width: 42vw; background: var(--bc-card); box-shadow: 1px 0 0 var(--bc-line); }
  .bc-table thead th:first-child { position: sticky; left: 0; z-index: 2; }
  .bc-v { min-width: 5.6rem; }
  .bc-area > summary { padding: .85rem .9rem; gap: .5rem; }
  .bc-area-t { font-size: .98rem; }
  .bc-table tbody th small { display: none; }
  .bc-card .bc-btn { padding: .5rem .7rem; font-size: .82rem; }
  .bc-modal { padding: 0; }
  .bc-modal-box { max-width: none; min-height: 100%; border-radius: 0; padding: 1.1rem; }
  .bc-fab { right: 12px; bottom: 12px; }
}
/* Con 3 o más productos en pantallas estrechas, las tarjetas se deslizan en horizontal. */
@media (max-width: 760px) {
  .bc-n3 .bc-cards, .bc-n4 .bc-cards, .bc-n5 .bc-cards, .bc-n6 .bc-cards { display: flex; overflow-x: auto; scroll-snap-type: x mandatory; padding-bottom: .4rem; }
  .bc-n3 .bc-card, .bc-n4 .bc-card, .bc-n5 .bc-card, .bc-n6 .bc-card { flex: 0 0 44%; scroll-snap-align: start; }
}
@media (min-width: 761px) and (max-width: 1100px) {
  .bc-n5 .bc-cards, .bc-n6 .bc-cards { grid-auto-flow: row; grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (prefers-reduced-motion: reduce) {
  .bc-btn, .bc-area > summary::after { transition: none; }
}
