/* ==========================================================================
   BA Liquidation discovery: one-of-a-kind urgency, product video,
   recently-viewed rail, and the compare tray + drawer. Uses :root tokens
   from main.css.
   ========================================================================== */

/* ---------- one-of-a-kind urgency (PDP) ---------- */
.pdp-oneofone {
	display: flex; gap: 10px; align-items: flex-start;
	background: var(--sale-bg); border: 1px solid rgba(192, 57, 43, .25);
	border-radius: 12px; padding: 12px 14px; margin: 4px 0 14px;
	font-size: 14px; color: var(--body); line-height: 1.5;
}
.pdp-oneofone strong { color: var(--sale); }
.ooo-dot {
	flex: 0 0 auto; width: 10px; height: 10px; border-radius: 50%; margin-top: 5px;
	background: var(--sale); box-shadow: 0 0 0 4px rgba(192, 57, 43, .16);
	animation: ooo-pulse 1.8s ease-in-out infinite;
}
@keyframes ooo-pulse { 0%, 100% { transform: scale(1); opacity: 1; } 50% { transform: scale(1.25); opacity: .7; } }

/* ---------- product video ---------- */
.pdp-video-wrap { margin-top: 14px; }
.pdp-video-label {
	display: inline-flex; align-items: center; gap: 6px; font-family: var(--sans);
	font-weight: 700; font-size: 12px; color: var(--navy); margin-bottom: 8px;
}
.pdp-video { position: relative; width: 100%; padding-top: 56.25%; border-radius: 12px; overflow: hidden; background: #000; border: 1px solid var(--line); }
.pdp-video iframe, .pdp-video video { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; display: block; object-fit: cover; }

/* Compare toggle on product cards is styled in main.css (inline control). */

/* ---------- compare line on the PDP ---------- */
.pdp-compare-line { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; font-size: 13px; color: var(--muted); margin: -2px 0 0; }
.pdp-compare-btn {
	font-family: var(--sans); font-weight: 700; font-size: 13px; color: var(--navy);
	background: #fff; border: 1.5px solid var(--line); border-radius: 8px; padding: 6px 12px; cursor: pointer; transition: .15s;
}
.pdp-compare-btn:hover { border-color: var(--navy); }
.pdp-compare-btn.is-on { background: var(--navy); color: #fff; border-color: var(--navy); }

/* ---------- recently viewed rail ---------- */
.ba-rv-card {
	display: block; text-decoration: none; border: 1px solid var(--line); border-radius: 12px;
	overflow: hidden; background: #fff; transition: box-shadow .15s, transform .15s;
}
.ba-rv-card:hover { box-shadow: 0 8px 22px rgba(16, 32, 43, .10); transform: translateY(-2px); text-decoration: none; }
.ba-rv-img { background: var(--bg-3); }
.ba-rv-img img { width: 100%; aspect-ratio: 1 / 1; object-fit: cover; display: block; }
.ba-rv-body { padding: 10px 12px 12px; }
.ba-rv-title { display: block; font-family: var(--sans); font-weight: 600; font-size: 13.5px; color: var(--ink); line-height: 1.3; margin-bottom: 4px; }
.ba-rv-price { font-family: var(--sans); font-weight: 800; font-size: 15px; color: var(--navy); }

/* ---------- compare bar ---------- */
.ba-cmp-bar {
	position: fixed; left: 50%; bottom: 16px; transform: translate(-50%, 130%);
	z-index: 70; display: flex; align-items: center; gap: 16px; flex-wrap: wrap;
	background: #fff; border: 1px solid var(--line); border-radius: 14px;
	box-shadow: 0 12px 34px rgba(16, 32, 43, .18); padding: 10px 14px; max-width: min(920px, calc(100vw - 24px));
	transition: transform .28s cubic-bezier(.2, .8, .2, 1); opacity: 0;
}
.ba-cmp-bar.is-in { transform: translate(-50%, 0); opacity: 1; }
.ba-cmp-bar.has-sticky { bottom: 84px; }
.ba-cmp-chips { display: flex; gap: 8px; flex-wrap: wrap; flex: 1 1 auto; min-width: 0; }
.ba-cmp-chip {
	display: inline-flex; align-items: center; gap: 7px; background: var(--bg-2); border: 1px solid var(--line);
	border-radius: 999px; padding: 4px 6px 4px 4px; font-size: 12px; color: var(--body); max-width: 210px;
}
.ba-cmp-chip img { width: 28px; height: 28px; object-fit: cover; border-radius: 50%; flex: 0 0 auto; }
.ba-cmp-chip span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ba-cmp-chip button { border: none; background: none; color: var(--muted); font-size: 16px; line-height: 1; cursor: pointer; padding: 0 2px; flex: 0 0 auto; }
.ba-cmp-chip button:hover { color: var(--sale); }
.ba-cmp-cta { display: flex; align-items: center; gap: 10px; flex: 0 0 auto; }
.ba-cmp-cta .btn[disabled] { opacity: .5; cursor: default; }
.ba-cmp-clear { border: none; background: none; color: var(--muted); font-family: var(--sans); font-weight: 600; font-size: 13px; cursor: pointer; }
.ba-cmp-clear:hover { color: var(--ink); }

/* ---------- compare drawer ---------- */
.ba-cmp-overlay {
	position: fixed; inset: 0; z-index: 120; background: rgba(16, 32, 43, .5);
	display: flex; align-items: center; justify-content: center; padding: 20px;
	opacity: 0; visibility: hidden; transition: opacity .2s;
}
.ba-cmp-overlay.is-in { opacity: 1; visibility: visible; }
.ba-cmp-panel {
	background: #fff; border-radius: 16px; width: 100%; max-width: 900px; max-height: 88vh;
	display: flex; flex-direction: column; overflow: hidden; box-shadow: 0 24px 60px rgba(16, 32, 43, .3);
	transform: translateY(10px); transition: transform .2s;
}
.ba-cmp-overlay.is-in .ba-cmp-panel { transform: none; }
.ba-cmp-head { display: flex; align-items: center; justify-content: space-between; padding: 16px 20px; border-bottom: 1px solid var(--line); }
.ba-cmp-head h2 { margin: 0; font-size: 18px; color: var(--ink); }
.ba-cmp-x { border: none; background: var(--bg-2); width: 34px; height: 34px; border-radius: 50%; font-size: 22px; line-height: 1; color: var(--muted); cursor: pointer; }
.ba-cmp-x:hover { color: var(--ink); background: var(--bg-3); }
.ba-cmp-scroll { overflow: auto; -webkit-overflow-scrolling: touch; padding: 4px; }
.ba-cmp-loading { padding: 40px 20px; text-align: center; color: var(--muted); }

.ba-cmp-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.ba-cmp-table th, .ba-cmp-table td { padding: 10px 12px; border-bottom: 1px solid var(--line-2); text-align: left; vertical-align: middle; }
.ba-cmp-table thead th { position: sticky; top: 0; background: #fff; z-index: 2; border-bottom: 2px solid var(--line); }
.ba-cmp-rowh { font-weight: 700; color: var(--muted); background: var(--bg-2); white-space: nowrap; position: sticky; left: 0; z-index: 1; }
.ba-cmp-ph { display: flex; flex-direction: column; align-items: center; gap: 6px; text-decoration: none; color: var(--ink); min-width: 130px; }
.ba-cmp-ph img { width: 84px; height: 84px; object-fit: cover; border-radius: 10px; border: 1px solid var(--line); background: var(--bg-3); }
.ba-cmp-ph span { font-family: var(--sans); font-weight: 700; font-size: 12.5px; text-align: center; line-height: 1.3; }
.ba-cmp-price { font-family: var(--sans); font-weight: 800; color: var(--navy); font-size: 15px; }
.ba-cmp-was { text-decoration: line-through; color: var(--faint); font-size: 12px; }
.ba-cmp-priceRow td { background: var(--good-bg); }
.ba-cmp-ctaRow td { text-align: center; }

/* ---------- compare toast ---------- */
.ba-cmp-toast {
	position: fixed; left: 50%; bottom: 84px; transform: translate(-50%, 12px); z-index: 130;
	background: var(--ink); color: #fff; font-family: var(--sans); font-weight: 600; font-size: 13px;
	padding: 10px 16px; border-radius: 10px; opacity: 0; transition: .25s; pointer-events: none; max-width: 88vw; text-align: center;
}
.ba-cmp-toast.is-in { opacity: 1; transform: translate(-50%, 0); }

@media (max-width: 600px) {
	.ba-cmp-bar { left: 12px; right: 12px; transform: translateY(130%); max-width: none; }
	.ba-cmp-bar.is-in { transform: translateY(0); }
	.ba-cmp-chips { order: 2; width: 100%; }
	.ba-cmp-cta { order: 1; width: 100%; justify-content: space-between; }
}

/* ==========================================================================
   Dedicated compare page (/compare/). Mobile-friendly side-by-side table with
   a sticky label column and horizontal scroll.
   ========================================================================== */
.cmp-empty { max-width: 62ch; }
.cmp-empty p { color: var(--body); margin: 0 0 12px; }

.cmp-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; border: 1px solid var(--line); border-radius: 14px; background: #fff; }
.cmp-table { border-collapse: collapse; width: 100%; min-width: 480px; font-size: 14px; }
.cmp-col-label { width: 118px; }
.cmp-col-unit { min-width: 168px; }
.cmp-table th, .cmp-table td { padding: 12px 14px; border-bottom: 1px solid var(--line-2); text-align: left; vertical-align: top; }
.cmp-table td { color: var(--body); }

/* sticky label column */
.cmp-rowh { position: sticky; left: 0; background: var(--bg-2); color: var(--muted); font-weight: 700; white-space: nowrap; z-index: 2; }
.cmp-head-row th { background: #fff; border-bottom: 2px solid var(--line); vertical-align: bottom; }
.cmp-head-row .cmp-rowh { background: #fff; }

.cmp-unit-link { display: inline-flex; flex-direction: column; gap: 8px; text-decoration: none; color: var(--ink); }
.cmp-unit-img { position: relative; width: 120px; max-width: 100%; }
.cmp-unit-img img { width: 120px; height: 120px; object-fit: cover; border-radius: 10px; border: 1px solid var(--line); background: var(--bg-3); display: block; }
.cmp-sold { position: absolute; top: 6px; left: 6px; background: var(--sale); color: #fff; font-size: 11px; font-weight: 700; padding: 2px 7px; border-radius: 6px; }
.cmp-unit-title { font-family: var(--sans); font-weight: 700; font-size: 13.5px; line-height: 1.3; color: var(--ink); }

.cmp-price-row td { background: var(--good-bg); }
.cmp-now { font-family: var(--sans); font-weight: 800; color: var(--navy); font-size: 18px; }
.cmp-was { color: var(--faint); text-decoration: line-through; font-size: 13px; margin-left: 6px; }
.cmp-save { color: var(--good); font-weight: 700; }
.cmp-instock { color: var(--good); font-weight: 700; }
.cmp-na { color: var(--faint); }
.cmp-nospecs { color: var(--muted); }

.cmp-section th { position: static; background: var(--navy); color: #fff; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; font-size: 12px; }
.cmp-actions-row td { background: #fff; }
.cmp-actions-row .btn { white-space: nowrap; }

.cmp-foot { margin-top: 16px; }
.cmp-foot a { color: var(--navy); font-weight: 600; text-decoration: none; }
.cmp-foot a:hover { text-decoration: underline; }

/* ---------- compare page: AI advisor ---------- */
.cmp-advisor { margin-top: 26px; border: 1px solid var(--line); border-radius: 16px; background: #eef4fb; padding: 20px 20px 18px; }
.cmp-adv-head { display: flex; align-items: flex-start; gap: 12px; }
.cmp-adv-badge { flex: 0 0 auto; display: inline-flex; align-items: center; justify-content: center; width: 34px; height: 34px; border-radius: 9px; background: var(--navy); color: #fff; font-family: var(--sans); font-weight: 800; font-size: 13px; }
.cmp-adv-head h2 { margin: 0 0 3px; font-size: 18px; color: var(--ink); }
.cmp-adv-head p { margin: 0; font-size: 14px; color: var(--body); line-height: 1.5; }
.cmp-adv-chips { display: flex; flex-wrap: wrap; gap: 8px; margin: 14px 0 4px; }
.cmp-adv-chips button { font-family: var(--sans); font-weight: 600; font-size: 13px; color: var(--navy); background: #fff; border: 1.5px solid var(--line); border-radius: 999px; padding: 7px 13px; cursor: pointer; transition: .15s; }
.cmp-adv-chips button:hover { border-color: var(--navy); }
.cmp-adv-log { display: flex; flex-direction: column; gap: 10px; margin: 14px 0; max-height: 360px; overflow-y: auto; }
.cmp-adv-log:empty { display: none; }
.cmp-adv-msg { max-width: 88%; padding: 11px 14px; border-radius: 14px; font-size: 14px; line-height: 1.55; white-space: pre-wrap; }
.cmp-adv-user { align-self: flex-end; background: var(--navy); color: #fff; border-bottom-right-radius: 4px; }
.cmp-adv-bot { align-self: flex-start; background: #fff; color: var(--body); border: 1px solid var(--line); border-bottom-left-radius: 4px; }
.cmp-adv-bot.is-thinking { color: var(--muted); font-style: italic; }
.cmp-adv-bot.is-error { color: var(--sale); }
.cmp-adv-form { display: flex; gap: 8px; }
.cmp-adv-form input { flex: 1; min-width: 0; border: 1.5px solid var(--line); border-radius: 10px; padding: 11px 14px; font: inherit; font-size: 15px; color: var(--ink); background: #fff; outline: none; }
.cmp-adv-form input:focus { border-color: var(--navy); box-shadow: 0 0 0 3px rgba(0, 59, 128, .14); }
.cmp-adv-form .btn { flex: 0 0 auto; }
.cmp-adv-note { margin: 12px 0 0; font-size: 12px; color: var(--muted); }
.cmp-adv-note a { color: var(--navy); }
.cmp-advisor-plain { background: var(--bg-2); }
.cmp-advisor-plain h2 { margin: 0 0 6px; font-size: 18px; color: var(--ink); }
.cmp-advisor-plain p { margin: 0 0 14px; color: var(--body); }
.cmp-adv-cta { display: flex; gap: 10px; flex-wrap: wrap; }
