/* BargainArmy site layer on top of REHub. Mobile-first. */
:root {
	--ba-ink: #111827;
	--ba-ink-2: #374151;
	--ba-muted: #6b7280;
	--ba-line: #e5e7eb;
	--ba-bg-soft: #f6f7f9;
	--ba-accent: #ea580c;
	--ba-accent-ink: #c2410c;
	--ba-buy: #15803d;
	--ba-decent: #b45309;
	--ba-skip: #6b7280;
	--ba-radius: 10px;
}

body { background: #fff; color: var(--ba-ink); }
a { color: var(--ba-accent-ink); }

/* ── Hero ─────────────────────────────────────────────────────────── */
.ba-hero {
	background: var(--ba-ink);
	color: #fff;
	padding: 28px 0 22px;
	margin-bottom: 8px;
}
.ba-hero .rh-container { padding: 0 16px; }
.ba-hero__eyebrow {
	color: #fdba74;
	font-size: 13px;
	font-weight: 600;
	letter-spacing: .04em;
	text-transform: uppercase;
	margin: 0 0 6px;
}
.ba-hero__title {
	color: #fff;
	font-size: 26px;
	line-height: 1.2;
	margin: 0 0 10px;
	font-weight: 800;
}
.ba-hero__lede {
	color: #d1d5db;
	font-size: 16px;
	line-height: 1.5;
	max-width: 680px;
	margin: 0 0 16px;
}
.ba-hero__lede strong { color: #fff; }

/* ── Chips (battery platforms) ────────────────────────────────────── */
.ba-chips {
	display: flex;
	gap: 8px;
	overflow-x: auto;
	padding-bottom: 4px;
	scrollbar-width: none;
	-webkit-overflow-scrolling: touch;
}
.ba-chips::-webkit-scrollbar { display: none; }
.ba-chip {
	flex: 0 0 auto;
	padding: 7px 14px;
	border-radius: 999px;
	border: 1px solid rgba(255,255,255,.25);
	color: #fff !important;
	font-size: 14px;
	font-weight: 600;
	text-decoration: none;
	white-space: nowrap;
}
.ba-chip:hover { background: var(--ba-accent); border-color: var(--ba-accent); }
.ba-chips--light { margin: 4px 0 18px; }
.ba-chips--light .ba-chip { border-color: var(--ba-line); color: var(--ba-ink) !important; background: #fff; }
.ba-chips--light .ba-chip:hover { color: #fff !important; }

/* ── Sections ─────────────────────────────────────────────────────── */
.ba-home .rh-container,
.ba-hub .rh-container { padding: 0 16px; }
.ba-section { margin: 26px 0; }
.ba-section__head {
	display: flex;
	align-items: baseline;
	justify-content: space-between;
	gap: 12px;
	border-bottom: 2px solid var(--ba-ink);
	padding-bottom: 6px;
	margin-bottom: 14px;
}
.ba-section__title { font-size: 20px; margin: 0; font-weight: 800; }
.ba-section__more { font-size: 14px; font-weight: 600; text-decoration: none; white-space: nowrap; }
.ba-section__sub { color: var(--ba-muted); margin: -6px 0 14px; font-size: 14px; }

/* ── Tool-type tiles ──────────────────────────────────────────────── */
.ba-tiles {
	list-style: none;
	margin: 0;
	padding: 0;
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: 10px;
}
.ba-tiles li { margin: 0; }
.ba-tile {
	display: flex;
	flex-direction: column;
	gap: 2px;
	height: 100%;
	padding: 14px;
	border: 1px solid var(--ba-line);
	border-radius: var(--ba-radius);
	background: var(--ba-bg-soft);
	color: var(--ba-ink) !important;
	text-decoration: none;
}
.ba-tile:hover { border-color: var(--ba-accent); }
.ba-tile__name { font-weight: 700; font-size: 15px; }
.ba-tile__count { font-size: 13px; color: var(--ba-muted); }

/* ── Guides ───────────────────────────────────────────────────────── */
.ba-guides { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; }
.ba-guide a {
	display: block;
	padding: 16px;
	border: 1px solid var(--ba-line);
	border-left: 4px solid var(--ba-accent);
	border-radius: var(--ba-radius);
	text-decoration: none;
	color: var(--ba-ink) !important;
}
.ba-guide__title { display: block; font-weight: 700; font-size: 16px; margin-bottom: 4px; }
.ba-guide__desc { display: block; color: var(--ba-muted); font-size: 14px; line-height: 1.45; }

/* ── How we pick ──────────────────────────────────────────────────── */
.ba-how__list { margin: 0; padding-left: 20px; display: grid; gap: 8px; color: var(--ba-ink-2); line-height: 1.5; }

/* ── Alert CTA ────────────────────────────────────────────────────── */
.ba-alert {
	display: flex;
	flex-direction: column;
	gap: 12px;
	padding: 20px;
	margin: 26px 0;
	border-radius: var(--ba-radius);
	background: var(--ba-bg-soft);
	border: 1px solid var(--ba-line);
}
.ba-alert__title { font-size: 18px; margin: 0 0 4px; }
.ba-alert p { margin: 0; color: var(--ba-ink-2); }
.ba-btn {
	display: inline-block;
	padding: 11px 18px;
	border-radius: 8px;
	background: var(--ba-accent);
	color: #fff !important;
	font-weight: 700;
	text-decoration: none;
	text-align: center;
}
.ba-btn:hover { background: var(--ba-accent-ink); }

/* ── Hubs ─────────────────────────────────────────────────────────── */
.ba-crumbs { font-size: 13px; color: var(--ba-muted); margin: 14px 0 8px; display: flex; flex-wrap: wrap; gap: 6px; }
.ba-crumbs a { color: var(--ba-muted); }
.ba-hub__head { margin-bottom: 10px; }
.ba-hub__title { font-size: 26px; line-height: 1.2; font-weight: 800; margin: 0 0 4px; }
.ba-hub__updated { color: var(--ba-muted); font-size: 13px; margin: 0 0 10px; }
.ba-hub__intro { color: var(--ba-ink-2); line-height: 1.55; max-width: 760px; }
.ba-hub__intro p:last-child { margin-bottom: 0; }
.ba-empty { padding: 20px; border: 1px dashed var(--ba-line); border-radius: var(--ba-radius); color: var(--ba-ink-2); }
.ba-search { max-width: 520px; margin-top: 12px; }
.ba-prose { max-width: 760px; line-height: 1.65; color: var(--ba-ink-2); }
.ba-prose h2 { font-size: 20px; margin: 24px 0 8px; color: var(--ba-ink); }
.ba-prose h3 { font-size: 17px; margin: 18px 0 6px; color: var(--ba-ink); }

.ba-disclosure { font-size: 12px; color: var(--ba-muted); margin: 24px 0 32px; }

/* ── Verdict pill (deal pages and grid) ───────────────────────────── */
.ba-verdict {
	display: inline-block;
	padding: 3px 10px;
	border-radius: 999px;
	font-size: 13px;
	font-weight: 700;
	color: #fff;
}
.ba-verdict--buy { background: var(--ba-buy); }
.ba-verdict--decent { background: var(--ba-decent); }
.ba-verdict--skip { background: var(--ba-skip); }

/* ── Deal cards ───────────────────────────────────────────────────
   Phone: horizontal rows (thumb left). >=640px: vertical card grid. */
.ba-cards { display: grid; gap: 10px; grid-template-columns: 1fr; }
.ba-card {
	position: relative;
	display: grid;
	grid-template-columns: 96px 1fr;
	gap: 12px;
	padding: 10px;
	background: #fff;
	border: 1px solid var(--ba-line);
	border-radius: var(--ba-radius);
	transition: border-color .15s, box-shadow .15s;
}
.ba-card:hover { border-color: #cbd5e1; box-shadow: 0 4px 14px rgba(17,24,39,.07); }
.ba-card.is-expired { opacity: .6; }
.ba-card__media {
	position: relative;
	display: flex;
	align-items: center;
	justify-content: center;
	aspect-ratio: 1 / 1;
	background: #fff;
	border-radius: 8px;
	overflow: hidden;
}
.ba-card__media img { width: 100%; height: 100%; object-fit: contain; }
.ba-card__noimg { width: 100%; height: 100%; background: var(--ba-bg-soft); }
.ba-card__off {
	position: absolute;
	top: 4px;
	left: 4px;
	padding: 2px 6px;
	border-radius: 6px;
	background: var(--ba-accent);
	color: #fff;
	font-size: 12px;
	font-weight: 800;
	line-height: 1.4;
}
.ba-card__body { display: flex; flex-direction: column; min-width: 0; gap: 4px; }
.ba-card__meta { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; font-size: 12px; color: var(--ba-muted); }
.ba-card__meta .ba-verdict { font-size: 11px; padding: 2px 8px; }
.ba-card__store { font-weight: 600; color: var(--ba-ink-2); }
.ba-card__flag { font-weight: 700; color: var(--ba-skip); text-transform: uppercase; font-size: 11px; }
.ba-card__title { margin: 0; font-size: 14px; line-height: 1.35; font-weight: 600; }
.ba-card__title a {
	color: var(--ba-ink) !important;
	text-decoration: none;
	display: -webkit-box;
	-webkit-line-clamp: 2;
	-webkit-box-orient: vertical;
	overflow: hidden;
}
.ba-card__title a::after { content: ""; position: absolute; inset: 0; z-index: 1; }
.ba-card__price { display: flex; align-items: baseline; flex-wrap: wrap; gap: 8px; }
.ba-card__price strong { font-size: 18px; font-weight: 800; color: var(--ba-ink); }
.ba-card__price del { font-size: 13px; color: var(--ba-muted); }
.ba-card__coupon { font-size: 11px; font-weight: 700; color: var(--ba-accent-ink); border: 1px dashed var(--ba-accent); border-radius: 4px; padding: 0 5px; }
.ba-card__foot { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-top: auto; }
.ba-card__time { font-size: 12px; color: var(--ba-muted); }
.ba-card__cta {
	position: relative;
	z-index: 2;
	padding: 6px 12px;
	border-radius: 7px;
	background: var(--ba-ink);
	color: #fff !important;
	font-size: 13px;
	font-weight: 700;
	text-decoration: none;
	white-space: nowrap;
}
.ba-card__cta:hover { background: var(--ba-accent); }
.screen-reader-text { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(1px,1px,1px,1px); white-space: nowrap; }

@media (min-width: 640px) {
	.ba-cards { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
	.ba-card { grid-template-columns: 1fr; padding: 12px; gap: 10px; }
	.ba-card__media { aspect-ratio: 4 / 3; }
	.ba-card__title { font-size: 15px; min-height: 2.7em; }
}
@media (min-width: 960px) {
	.ba-cards { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (min-width: 1200px) {
	.ba-cards { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}

/* ── Pagination, more links ───────────────────────────────────────── */
.ba-more { text-align: center; margin: 18px 0 0; }
.ba-btn--ghost { background: #fff; color: var(--ba-ink) !important; border: 1px solid var(--ba-ink); }
.ba-btn--ghost:hover { background: var(--ba-ink); color: #fff !important; }
.ba-pager ul { list-style: none; display: flex; flex-wrap: wrap; justify-content: center; gap: 6px; margin: 22px 0 0; padding: 0; }
.ba-pager li { margin: 0; }
.ba-pager a, .ba-pager span {
	display: inline-block;
	min-width: 40px;
	padding: 8px 12px;
	border: 1px solid var(--ba-line);
	border-radius: 8px;
	text-align: center;
	text-decoration: none;
	color: var(--ba-ink) !important;
	font-weight: 600;
}
.ba-pager .current { background: var(--ba-ink); border-color: var(--ba-ink); color: #fff !important; }

/* ── Brand directory ──────────────────────────────────────────────── */
.ba-brands { list-style: none; margin: 18px 0 32px; padding: 0; display: grid; gap: 12px; }
.ba-brand { margin: 0; padding: 16px; border: 1px solid var(--ba-line); border-radius: var(--ba-radius); }
.ba-brand__name { font-size: 18px; font-weight: 800; color: var(--ba-ink) !important; text-decoration: none; }
.ba-brand__desc { margin: 6px 0 10px; color: var(--ba-ink-2); font-size: 14px; line-height: 1.5; }
.ba-brand__platforms { display: flex; flex-wrap: wrap; gap: 6px; }
.ba-brand__platforms a { font-size: 13px; font-weight: 600; padding: 4px 10px; border-radius: 999px; background: var(--ba-bg-soft); text-decoration: none; color: var(--ba-ink) !important; }
.ba-brand__platforms a:hover { background: var(--ba-accent); color: #fff !important; }
@media (min-width: 769px) { .ba-brands { grid-template-columns: repeat(2, minmax(0, 1fr)); } }

/* ── Articles (guides, About, policies) ───────────────────────────── */
.ba-page .rh-container { padding: 0 16px; }
.ba-article { max-width: 760px; margin: 0 auto 40px; }
.ba-article__title { font-size: 28px; line-height: 1.2; font-weight: 800; margin: 6px 0 6px; }
.ba-article__meta { color: var(--ba-muted); font-size: 13px; margin: 0 0 18px; }
.ba-prose { font-size: 17px; }
.ba-prose p, .ba-prose li { line-height: 1.7; }
.ba-prose ul, .ba-prose ol { padding-left: 22px; }
.ba-prose table { width: 100%; border-collapse: collapse; font-size: 15px; display: block; overflow-x: auto; }
.ba-prose th, .ba-prose td { border: 1px solid var(--ba-line); padding: 8px 10px; text-align: left; vertical-align: top; }
.ba-prose th { background: var(--ba-bg-soft); }
.ba-prose blockquote, .ba-callout { border-left: 4px solid var(--ba-accent); background: #fff7ed; padding: 12px 16px; margin: 18px 0; border-radius: 0 8px 8px 0; }
.ba-guides--page { margin-top: 28px; }
@media (min-width: 769px) { .ba-article__title { font-size: 36px; } .ba-guides--page { grid-template-columns: repeat(2, minmax(0, 1fr)); } }

/* ── Single deal ──────────────────────────────────────────────────── */
.ba-deal .rh-container { padding: 0 16px; }
.ba-deal__top { display: grid; gap: 18px; margin: 6px 0 22px; }
.ba-deal__media {
	position: relative;
	margin: 0;
	display: flex;
	align-items: center;
	justify-content: center;
	background: #fff;
	border: 1px solid var(--ba-line);
	border-radius: var(--ba-radius);
	padding: 12px;
	aspect-ratio: 4 / 3;
}
.ba-deal__media img { max-width: 100%; max-height: 100%; width: auto; height: auto; object-fit: contain; }
.ba-deal__media .ba-card__off { top: 10px; left: 10px; font-size: 14px; padding: 3px 8px; }
.ba-deal__info { display: flex; flex-direction: column; gap: 10px; }
.ba-deal__title { font-size: 22px; line-height: 1.25; font-weight: 800; margin: 0; }
.ba-deal__price { display: flex; flex-wrap: wrap; align-items: baseline; gap: 10px; }
.ba-deal__price strong { font-size: 32px; font-weight: 800; color: var(--ba-ink); }
.ba-deal__price del { font-size: 17px; color: var(--ba-muted); }
.ba-deal__save { font-size: 14px; font-weight: 700; color: var(--ba-buy); }
.ba-deal__context { margin: 0; padding: 10px 12px; background: var(--ba-bg-soft); border-radius: 8px; color: var(--ba-ink-2); line-height: 1.5; }
.ba-deal__fine { margin: 0; font-size: 12px; color: var(--ba-muted); line-height: 1.5; }
.ba-deal__body { max-width: 760px; margin-bottom: 10px; }
.ba-deal__body h2 { font-size: 20px; }
.ba-tag { font-size: 12px; font-weight: 600; padding: 2px 8px; border-radius: 999px; background: var(--ba-bg-soft); color: var(--ba-ink) !important; text-decoration: none; }
.ba-btn--xl { padding: 15px 22px; font-size: 17px; border-radius: 10px; }
.ba-coupon { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; padding: 10px 12px; border: 1px dashed var(--ba-accent); border-radius: 8px; background: #fff7ed; font-size: 14px; }
.ba-coupon code { font-size: 16px; font-weight: 800; background: #fff; padding: 2px 8px; border-radius: 4px; letter-spacing: .03em; }
.ba-coupon__copy { margin-left: auto; padding: 6px 12px; border: 0; border-radius: 6px; background: var(--ba-ink); color: #fff; font-weight: 700; cursor: pointer; }
.ba-expired-note { margin: 4px 0 14px; padding: 12px 14px; border-radius: 8px; background: #fef2f2; border: 1px solid #fecaca; color: #7f1d1d; font-size: 14px; }
.ba-deal.is-expired .ba-deal__price strong { color: var(--ba-muted); }
.ba-sticky-cta { display: none; }

@media (min-width: 769px) {
	.ba-deal__top { grid-template-columns: minmax(0, 5fr) minmax(0, 6fr); gap: 32px; align-items: start; }
	.ba-deal__title { font-size: 28px; }
	.ba-btn--xl { align-self: flex-start; min-width: 280px; }
}
@media (max-width: 768px) {
	body.single-post .footer-mobile { display: none; }
	.ba-sticky-cta {
		position: fixed;
		left: 0;
		right: 0;
		bottom: 0;
		z-index: 9999;
		display: flex;
		align-items: center;
		justify-content: space-between;
		gap: 12px;
		padding: 10px 16px calc(10px + env(safe-area-inset-bottom, 0px));
		background: #fff;
		border-top: 1px solid var(--ba-line);
		box-shadow: 0 -2px 10px rgba(0,0,0,.08);
	}
	.ba-sticky-cta__price { display: flex; flex-direction: column; line-height: 1.2; }
	.ba-sticky-cta__price strong { font-size: 20px; }
	.ba-sticky-cta__price span { font-size: 12px; color: var(--ba-muted); }
	.ba-sticky-cta .ba-btn { flex: 0 0 auto; padding: 12px 22px; }
}

/* ── Footer ───────────────────────────────────────────────────────── */
.ba-footer { background: var(--ba-ink); color: #9ca3af; padding: 32px 0 24px; margin-top: 24px; }
.ba-footer .rh-container { padding: 0 16px; }
.ba-footer__grid { display: grid; gap: 24px; }
.ba-footer__brand p { margin: 10px 0 0; font-size: 14px; line-height: 1.55; max-width: 360px; }
.ba-footer__col { display: flex; flex-direction: column; gap: 8px; }
.ba-footer__col h2 { color: #fff; font-size: 14px; text-transform: uppercase; letter-spacing: .05em; margin: 0 0 4px; }
.ba-footer__col a { color: #d1d5db !important; text-decoration: none; font-size: 14px; }
.ba-footer__col a:hover { color: #fdba74 !important; }
.ba-footer__legal { border-top: 1px solid #1f2937; margin: 24px 0 0; padding-top: 16px; font-size: 12px; line-height: 1.5; }
@media (min-width: 769px) { .ba-footer__grid { grid-template-columns: 2fr 1fr 1fr; } }
@media (max-width: 768px) { .ba-footer { padding-bottom: 88px; } }

/* ── Retained from v1: offer buttons, available-at, mobile footer ─── */
#wpadminbar { display: none !important; }
html.wp-toolbar { padding-top: 0 !important; }
.btn_offer_block, a.btn_offer_block, .wpsm_btn, a.wpsm_btn,
.priced_block a, .priced_block .wpsm_btn, .wpsm_score_box .priced_block a, .buttons_col a.wpsm_btn {
	text-transform: none !important;
	letter-spacing: 0 !important;
}
.rh-available-at { font-size: 13px; color: #666; }
.rh-available-at-link { color: #555; text-decoration: none; border-bottom: 1px dashed #bbb; }
.rh-available-at strong { color: #333; font-weight: 600; }

@media (min-width: 769px) {
	.footer-mobile { display: none; }
	.ba-hero { padding: 44px 0 34px; }
	.ba-hero__title { font-size: 38px; }
	.ba-hero__lede { font-size: 18px; }
	.ba-chips { flex-wrap: wrap; overflow: visible; }
	.ba-tiles { grid-template-columns: repeat(4, minmax(0, 1fr)); }
	.ba-guides { grid-template-columns: repeat(3, minmax(0, 1fr)); }
	.ba-alert { flex-direction: row; align-items: center; justify-content: space-between; }
	.ba-hub__title { font-size: 32px; }
}

@media (max-width: 768px) {
	body { padding-bottom: 64px; }
	.btn_offer_block, a.btn_offer_block, .wpsm_btn.btn_offer_block, .priced_block .wpsm_btn {
		font-size: .91em !important;
		padding-top: .55em !important;
		padding-bottom: .55em !important;
	}
	.footer-mobile {
		position: fixed;
		bottom: 0;
		left: 0;
		right: 0;
		z-index: 9999;
		display: flex;
		background: #fff;
		border-top: 1px solid var(--ba-line);
		box-shadow: 0 -2px 8px rgba(0,0,0,.07);
	}
	.mobile-footer-icons {
		display: flex;
		justify-content: space-around;
		align-items: center;
		width: 100%;
		padding: 6px 0 env(safe-area-inset-bottom, 4px);
	}
	.mobile-footer-icons a {
		display: flex;
		flex-direction: column;
		align-items: center;
		gap: 2px;
		color: var(--ba-muted);
		font-size: 11px;
		font-weight: 600;
		text-decoration: none;
		padding: 4px 8px;
		border-radius: 8px;
		min-width: 52px;
		-webkit-tap-highlight-color: transparent;
	}
	.mobile-footer-icons a .rhicon { font-size: 21px; line-height: 1; }
	.mobile-footer-icons a.rh-footer-active,
	.mobile-footer-icons a.rh-footer-active .rhicon { color: var(--ba-accent-ink); }
}

/* Deal cards embedded in guides: never more than 2 columns in the article column. */
.ba-prose .ba-cards--embed { margin: 14px 0 24px; }
@media (min-width: 640px) { .ba-prose .ba-cards--embed { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.ba-prose .ba-card__title { font-size: 15px; }
.ba-prose .ba-card p { margin: 0; }
.ba-embed-title { font-size: 17px; margin: 22px 0 6px; }

.ba-embed-empty { padding: 10px 12px; border: 1px dashed var(--ba-line); border-radius: 8px; font-size: 15px; }

/* Stacked table rows on phones (labels come from data-label). */
@media (max-width: 639px) {
	.ba-prose table.ba-table { display: block; border: 0; overflow: visible; }
	.ba-prose table.ba-table thead { display: none; }
	.ba-prose table.ba-table tbody, .ba-prose table.ba-table tr { display: block; }
	.ba-prose table.ba-table tr { border: 1px solid var(--ba-line); border-radius: var(--ba-radius); padding: 10px 12px; margin-bottom: 10px; }
	.ba-prose table.ba-table td { display: grid; grid-template-columns: 9.5em 1fr; gap: 8px; border: 0; padding: 4px 0; font-size: 15px; }
	.ba-prose table.ba-table td::before { content: attr(data-label); font-weight: 700; color: var(--ba-muted); font-size: 13px; }
	.ba-prose table.ba-table td:first-child { display: block; font-size: 17px; font-weight: 800; padding-bottom: 6px; }
	.ba-prose table.ba-table td:first-child::before { content: none; }
}

/* REHub resets list styles; restore them in written content. */
.ba-prose ul { list-style: disc; }
.ba-prose ol { list-style: decimal; }
.ba-prose li { margin-bottom: 6px; }
.ba-prose ul.ba-guides, .ba-prose .ba-cards { list-style: none; }
