/* Supplemental styles for the laptop-power-bank comparison page only.
   Reuses color variables and base classes from ../assets/styles.css —
   this file is additive and never overrides the shared stylesheet.
   Written to be reusable for future /compare/ pages, not just this one. */

/* Product image size variants for this page — the shared .product-img-wrap
   base rule (fixed aspect-ratio box, object-fit: contain, neutral bg) lives
   in ../assets/styles.css since the homepage's featured card uses it too. */
.pick-card-img { aspect-ratio: 1 / 1; width: 100%; margin-bottom: 4px; }
.table-thumb-wrap { width: 88px; height: 88px; flex-shrink: 0; }
.mobile-card-img { width: 100%; height: 180px; margin-bottom: 10px; }
.detail-img-wrap { aspect-ratio: 4 / 3; width: 100%; max-width: 260px; margin-bottom: 12px; }
.alt-card-img { width: 56px; height: 56px; flex-shrink: 0; }

.product-name-cell {
  display: flex;
  align-items: center;
  gap: 10px;
}
.product-name-cell .name-text { display: flex; flex-direction: column; }

.alt-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 0;
}
.alt-item .alt-text { flex: 1; }

.summary-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 16px;
  margin: 14px 0 0;
  font-size: 0.86rem;
  color: var(--muted);
}
.summary-meta strong { color: var(--text); }

.pick-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
}
.pick-card {
  padding: 20px;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-sm);
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.pick-card h3 { font-size: 1.05rem; margin: 4px 0 0; }
.pick-reason { margin: 0; color: var(--muted); font-size: 0.86rem; line-height: 1.55; flex-grow: 1; }
.price-value-sm { font-size: 1.3rem; margin: 0; }
.pick-cta { align-self: flex-start; font-size: 0.84rem; }

.buying-basics-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}
.buying-basics-grid .card { padding: 18px; }
.buying-basics-grid h4 { font-size: 0.96rem; margin: 0 0 6px; }
.buying-basics-grid p { margin: 0; color: var(--muted); font-size: 0.88rem; line-height: 1.6; }

.table-wrap { overflow-x: auto; }
#compare-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.88rem;
}
#compare-table th, #compare-table td {
  padding: 10px 14px;
  border-bottom: 1px solid var(--line);
  text-align: left;
  white-space: nowrap;
}
#compare-table thead th { color: var(--muted); font-weight: 800; background: var(--bg-surface); }
#compare-table th[scope="row"] { color: var(--text-tertiary, var(--muted)); font-weight: 700; background: var(--bg-surface); text-align: left; }
/* Best-value cell tint — spec §5 Comparison Table: only the single best
   cell in a row is tinted, never the whole row/column. Currently applied
   only to the total-score row's max-value cell (see render_table in each
   compare-page builder) — a conservative, unambiguous "higher is better"
   case. Per-metric (price/weight/etc.) direction is genuinely
   product-dependent and was deliberately NOT auto-highlighted to avoid
   implying an editorial judgement the data doesn't support on its own. */
#compare-table td.best-value, .quick-decision-table td.best-value {
  background: var(--accent-soft);
  font-weight: 700;
}

.mobile-compare-cards { display: none; }
.mobile-compare-card {
  padding: 16px;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  margin-bottom: 12px;
}
.mobile-compare-card h4 { margin: 0 0 10px; }
.mobile-compare-grid {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 4px 12px;
  font-size: 0.86rem;
  margin-bottom: 10px;
}
.mobile-compare-grid span { color: var(--muted); }
.mobile-compare-grid strong { text-align: right; }

.product-detail-card { margin-top: 18px; }
.product-detail-head {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 16px;
  align-items: flex-start;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--line);
  margin-bottom: 16px;
}
.product-detail-text { flex: 1 1 240px; }
.product-detail-head h3 { margin: 6px 0 4px; font-size: 1.2rem; }
.model-number { margin: 0; color: var(--muted); font-size: 0.84rem; }
.price-block { text-align: right; min-width: 180px; }
.price-value { font-size: 1.6rem; font-weight: 900; letter-spacing: -0.03em; }
.price-label { color: var(--muted); font-size: 0.78rem; }
.price-checked { color: var(--muted); font-size: 0.76rem; margin: 2px 0 6px; }

.product-detail-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 20px;
  margin-bottom: 16px;
}
.spec-list { margin: 0; padding-left: 18px; color: var(--muted); font-size: 0.88rem; line-height: 1.8; }
.unconfirmed-note {
  margin-top: 10px;
  padding: 8px 10px;
  border-radius: 10px;
  background: var(--warning-soft);
  color: var(--warning);
  font-size: 0.78rem;
}

.score-row { display: grid; grid-template-columns: 110px 1fr 50px; align-items: center; gap: 8px; margin-bottom: 6px; }
.score-label { font-size: 0.78rem; color: var(--muted); }
.score-bar { height: 8px; border-radius: 999px; background: #f1ede2; overflow: hidden; }
.score-bar-fill { height: 100%; background: var(--primary); border-radius: 999px; }
.score-value { font-size: 0.78rem; text-align: right; font-weight: 700; }

.product-detail-notes {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  margin-bottom: 14px;
}
.product-detail-notes strong { display: block; font-size: 0.82rem; margin-bottom: 4px; }
.product-detail-notes p { margin: 0; color: var(--muted); font-size: 0.84rem; line-height: 1.55; }

.source-line { font-size: 0.8rem; color: var(--muted); margin: 0 0 14px; }
.source-line a { text-decoration: underline; }

.buy-cta { width: 100%; justify-content: center; }
.affiliate-note {
  margin: 8px 0 0;
  font-size: 0.76rem;
  color: var(--muted);
  line-height: 1.5;
  text-align: center;
}

.alt-list { margin: 10px 0 0; padding-left: 0; list-style: none; color: var(--muted); font-size: 0.9rem; line-height: 1.6; }
.alt-list a { font-weight: 700; }
.alt-list .alt-item:not(:last-child) { border-bottom: 1px dashed var(--line); }

.overall-pick-head { display: flex; align-items: center; gap: 16px; }
.overall-pick-head .detail-img-wrap { max-width: 140px; margin-bottom: 0; }
.overall-pick-head h3 { margin: 0; }

.budget-table-wrap { overflow-x: auto; }
.budget-table { width: 100%; border-collapse: collapse; font-size: 0.9rem; }
.budget-table th, .budget-table td { padding: 10px 12px; border-bottom: 1px solid var(--line); text-align: left; }
.budget-table th { color: var(--muted); }

.quick-decision-table { width: 100%; border-collapse: collapse; font-size: 0.9rem; }
.quick-decision-table th, .quick-decision-table td {
  padding: 10px 14px; border-bottom: 1px solid var(--line); text-align: left;
}
.quick-decision-table thead th { color: var(--muted); background: var(--bg-surface); }

/* CSS-first product image fallback (see styles.css for .product-img-wrap /
   .product-img-fallback / .product-img-photo base rules). */
.pick-card-img { aspect-ratio: 1 / 1; width: 100%; margin-bottom: 4px; }

@media (max-width: 900px) {
  .pick-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .product-detail-grid { grid-template-columns: 1fr; }
  .product-detail-notes { grid-template-columns: 1fr; }
  .primary-pick-card { flex-direction: column; align-items: center; text-align: left; }
}
@media (max-width: 780px) {
  .buying-basics-grid { grid-template-columns: 1fr; }
  .table-wrap { display: none; }
  .mobile-compare-cards { display: block; }
  .product-detail-head { flex-direction: column; }
  .price-block { text-align: left; }
}
@media (max-width: 560px) {
  .pick-grid { grid-template-columns: 1fr; }
  .primary-pick-img { width: 160px; height: 160px; }
}
