/* vs.css: visual comparison blocks for "A vs B" pages (nhánh VS).
   Adapted from aff-toolkit.html (versus table, pros/cons, criteria bars) to Kudomax tokens in blog.css.
   Load after blog.css, only on VS pages. Product A = lime, product B = orange, everywhere.
   No scores, countdowns or coupons: every bar and edge mark comes from a published spec or price. */

.vs-hero { display: grid; grid-template-columns: 1fr auto 1fr; gap: 14px; align-items: stretch; margin-top: 28px; }
.vs-card { background: #fff; border: 1px solid var(--card-line); border-top: 5px solid var(--lime); border-radius: 14px; padding: 18px; display: flex; flex-direction: column; gap: 6px; }
.vs-card.b { border-top-color: var(--cta); }
.vs-img { background: #fff; border-radius: 10px; height: 190px; display: flex; align-items: center; justify-content: center; }
.vs-img img { max-height: 190px; width: auto; height: auto; object-fit: contain; }
.vs-name { font-family: 'Barlow Condensed', sans-serif; font-weight: 800; font-size: 24px; line-height: 1.05; text-transform: uppercase; margin-top: 6px; }
.vs-type { font-size: 13.5px; color: var(--muted); font-weight: 600; }
.vs-price { font-family: 'Barlow Condensed', sans-serif; font-weight: 800; font-size: 28px; line-height: 1.1; margin-top: 4px; }
.vs-price small { display: block; font-family: 'Barlow', sans-serif; font-weight: 500; font-size: 12px; color: var(--faint); }
.vs-best { font-size: 14.5px; line-height: 1.5; color: #2A2F36; flex: 1; }
.vs-best b { color: var(--lime-ink); }
.vs-card.b .vs-best b { color: #A85A00; }
.vs-card .btn-cta { margin-top: 8px; padding: 12px 16px; font-size: 15px; }
.vs-badge { align-self: center; width: 54px; height: 54px; border-radius: 50%; background: var(--dark); color: var(--lime); display: flex; align-items: center; justify-content: center; font-family: 'Barlow Condensed', sans-serif; font-weight: 800; font-style: italic; font-size: 22px; letter-spacing: 1px; box-shadow: 0 0 0 5px var(--paper); }
.art .vs-note { font-size: 13px; line-height: 1.5; color: var(--faint); margin-top: 10px; }

/* Versus table: add class="win" to the cell with the spec edge */
.vs-table th .vs-th { display: flex; align-items: center; gap: 8px; }
.vs-table th .vs-th i { width: 10px; height: 10px; border-radius: 3px; background: var(--lime); flex: 0 0 auto; }
.vs-table th.b .vs-th i { background: var(--cta); }
.vs-table td:first-child { font-weight: 700; color: var(--ink); width: 28%; }
.vs-table td.win { background: var(--lime-bg); }
.vs-table td.win::before { content: "✓ "; color: var(--lime-ink); font-weight: 800; }
.vs-table td.win.b { background: #FFF1E0; }
.vs-table td.win.b::before { color: #A85A00; }
.art .vs-legend { font-size: 12.5px; line-height: 1.5; color: var(--faint); margin-top: 8px; }

/* Number bars: --w is the share of the longest value in the group (longest = 100%) */
.vs-bars { background: #fff; border: 1px solid var(--card-line); border-radius: 14px; padding: 18px 20px; margin-top: 18px; }
.vs-bars + .vs-bars { margin-top: 12px; }
.vs-bars-h { font-family: 'Barlow Condensed', sans-serif; font-weight: 800; font-size: 19px; text-transform: uppercase; letter-spacing: .5px; }
.vs-bars-sub { font-size: 13px; color: var(--faint); margin-top: 2px; }
.vs-bar-row { display: grid; grid-template-columns: 150px 1fr 96px; gap: 12px; align-items: center; margin-top: 12px; }
.vs-bar-label { font-size: 14px; font-weight: 600; }
.vs-bar { height: 14px; background: #EEF0EA; border-radius: 7px; overflow: hidden; }
.vs-bar i { display: block; height: 100%; width: var(--w); background: var(--lime); border-radius: 7px; }
.vs-bar-row.b .vs-bar i { background: var(--cta); }
.vs-bar-val { font-family: 'Barlow Condensed', sans-serif; font-weight: 800; font-size: 19px; text-align: right; }
.vs-bars-foot { font-size: 12.5px; color: var(--faint); margin-top: 12px; line-height: 1.5; }

/* Edge board: data-edge="a" | "b" | "tie" puts the marker on that side */
.vs-edge { background: #fff; border: 1px solid var(--card-line); border-radius: 14px; overflow: hidden; margin-top: 18px; }
.vs-edge-head, .vs-edge-row { display: grid; grid-template-columns: 92px 1fr 92px; gap: 10px; align-items: center; padding: 12px 16px; }
.vs-edge-head { background: var(--dark); color: #fff; font-family: 'Barlow Condensed', sans-serif; font-weight: 700; letter-spacing: 1px; font-size: 14px; text-transform: uppercase; }
.vs-edge-head span:nth-child(2) { text-align: center; }
.vs-edge-head .a { color: var(--lime); }
.vs-edge-head .b { color: var(--cta); text-align: right; }
.vs-edge-row { border-top: 1px solid #EEF0EA; }
.vs-cat { text-align: center; font-weight: 700; font-size: 15px; }
.vs-cat small { display: block; font-weight: 500; font-size: 13px; color: var(--muted); margin-top: 2px; line-height: 1.45; }
.vs-mark { font-family: 'Barlow Condensed', sans-serif; font-weight: 800; font-size: 14px; text-transform: uppercase; letter-spacing: .5px; visibility: hidden; border-radius: 20px; padding: 4px 10px; justify-self: start; }
.vs-mark.a { background: var(--lime); color: var(--dark); }
.vs-mark.b { background: var(--cta); color: #131313; justify-self: end; }
.vs-edge-row[data-edge="a"] .vs-mark.a, .vs-edge-row[data-edge="b"] .vs-mark.b { visibility: visible; }
.vs-edge-row[data-edge="tie"] .vs-cat::after { content: "Even"; display: inline-block; margin-top: 6px; font-family: 'Barlow Condensed', sans-serif; font-weight: 800; font-size: 13px; text-transform: uppercase; letter-spacing: .5px; background: #EEF0EA; color: var(--muted); border-radius: 20px; padding: 2px 10px; }
.vs-edge-foot { font-size: 12.5px; color: var(--faint); padding: 10px 16px 14px; border-top: 1px solid #EEF0EA; }

/* Pick A if / Pick B if */
.vs-pick { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-top: 18px; }
.vs-pick > div { background: #fff; border: 1px solid var(--card-line); border-top: 5px solid var(--lime); border-radius: 14px; padding: 18px; display: flex; flex-direction: column; }
.vs-pick > div.b { border-top-color: var(--cta); }
.vs-pick-h { display: flex; align-items: center; gap: 12px; font-family: 'Barlow Condensed', sans-serif; font-weight: 800; font-size: 21px; text-transform: uppercase; line-height: 1.05; }
.vs-pick-h img { width: 56px; height: 56px; object-fit: contain; flex: 0 0 auto; }
.vs-pick ul { margin: 12px 0 0; padding: 0; list-style: none; flex: 1; }
.vs-pick li { position: relative; padding-left: 22px; margin-top: 8px; font-size: 15px; line-height: 1.55; }
.vs-pick li::before { content: "→"; position: absolute; left: 0; font-weight: 800; color: var(--lime-ink); }
.vs-pick > div.b li::before { color: #A85A00; }
.vs-pick .btn-cta { margin-top: 14px; padding: 12px 16px; font-size: 15px; }

/* Pros and cons per product, with ✓ / ✕ markers */
.vs-pc { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-top: 18px; }
.vs-pc > div { background: #fff; border: 1px solid var(--card-line); border-radius: 14px; padding: 18px; }
.vs-pc-h { font-family: 'Barlow Condensed', sans-serif; font-weight: 800; font-size: 20px; text-transform: uppercase; padding-bottom: 8px; border-bottom: 3px solid var(--lime); }
.vs-pc > div.b .vs-pc-h { border-bottom-color: var(--cta); }
.vs-pc ul { margin: 10px 0 0; padding: 0; list-style: none; }
.vs-pc li { position: relative; padding-left: 22px; margin-top: 7px; font-size: 14.5px; line-height: 1.5; }
.vs-pc li.y::before { content: "✓"; position: absolute; left: 0; color: var(--lime-ink); font-weight: 800; }
.vs-pc li.n::before { content: "✕"; position: absolute; left: 0; color: #B54747; font-weight: 800; }

@media (max-width: 700px) {
  .vs-hero { grid-template-columns: 1fr; }
  .vs-badge { justify-self: center; margin: -6px 0; }
  .vs-pick, .vs-pc { grid-template-columns: 1fr; }
  .vs-bar-row { grid-template-columns: 1fr 84px; }
  .vs-bar-label { grid-column: 1 / -1; margin-bottom: -6px; }
  .vs-edge-head, .vs-edge-row { grid-template-columns: 64px 1fr 64px; padding: 12px; }
  .vs-mark { font-size: 12px; padding: 3px 7px; }
}
