/* ============================================================
 * CityHub product compare — card toggle, floating tray, /compare/ table.
 * Brand tokens come from catalogue.css.
 * ============================================================ */

/* ---------- Toggle ---------- */
.nv-compare-btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 6px;
	background: none;
	border: 0;
	padding: 6px 0 0;
	margin: 0;
	font: inherit;
	font-size: 13px;
	font-weight: 600;
	color: var(--nv-muted);
	cursor: pointer;
	line-height: 1.2;
	transition: color .15s;
}
.nv-compare-btn svg { width: 16px; height: 16px; flex: 0 0 auto; }
.nv-compare-btn:hover { color: var(--nv-blue); }
.nv-compare-btn.is-active { color: var(--nv-orange-dark); }
.nv-compare-btn:focus-visible { outline: 2px solid var(--nv-blue); outline-offset: 2px; border-radius: 2px; }

/* On cards: centred under the cart button */
.woocommerce ul.products li.product .nv-compare-btn--card { align-self: center; padding-top: 9px; }

/* Single product action row: match the Share button */
.novelty-sp-actions .nv-compare-btn { padding: 0; }

/* ---------- Floating tray ---------- */
.nv-ctray {
	position: fixed;
	left: 50%;
	bottom: 16px;
	transform: translateX(-50%);
	z-index: 9990;
	width: min(760px, calc(100% - 24px));
	background: #fff;
	border: 1px solid var(--nv-line);
	border-top: 3px solid var(--nv-orange);
	border-radius: 8px;
	box-shadow: 0 12px 32px rgba(0, 27, 63, .22);
}
.nv-ctray[hidden] { display: none; }
.nv-ctray__inner {
	display: flex;
	align-items: center;
	gap: 16px;
	padding: 12px 14px;
}
.nv-ctray__text { flex: 0 0 auto; display: flex; flex-direction: column; min-width: 150px; }
.nv-ctray__text strong { color: var(--nv-navy); font-size: 14.5px; }
.nv-ctray__text span { color: var(--nv-muted); font-size: 12.5px; max-width: 220px; }
.nv-ctray__items { display: flex; gap: 8px; flex: 1 1 auto; }
.nv-ctray__item {
	position: relative;
	width: 52px;
	height: 52px;
	border: 1px solid var(--nv-line);
	border-radius: 6px;
	background: #fff;
	flex: 0 0 auto;
}
.nv-ctray__item img { width: 100%; height: 100%; object-fit: contain; border-radius: 6px; }
.nv-ctray__item--empty { border-style: dashed; background: #f7f8fa; }
.nv-ctray__x {
	position: absolute;
	top: -7px;
	right: -7px;
	width: 20px;
	height: 20px;
	padding: 0;
	border: 0;
	border-radius: 50%;
	background: var(--nv-navy);
	color: #fff;
	font-size: 14px;
	line-height: 20px;
	cursor: pointer;
}
.nv-ctray__actions { display: flex; align-items: center; gap: 10px; flex: 0 0 auto; }
.nv-ctray__clear {
	background: none;
	border: 0;
	color: var(--nv-muted);
	font-size: 13px;
	font-weight: 600;
	cursor: pointer;
	padding: 6px;
}
.nv-ctray__clear:hover { color: #dc2626; }
.nv-ctray__go {
	display: inline-block;
	background: var(--nv-blue);
	color: #fff !important;
	font-weight: 700;
	font-size: 14px;
	padding: 11px 18px;
	border-radius: 4px;
	text-decoration: none;
	white-space: nowrap;
}
.nv-ctray__go:hover { background: var(--nv-navy); }
.nv-ctray__go.is-disabled { background: #cbd2dc; cursor: not-allowed; }

/* Keep Shoptimizer's sticky mobile bars / back-to-top clear of the tray */
@media (max-width: 640px) {
	.nv-ctray { bottom: 8px; }
	.nv-ctray__inner { flex-wrap: wrap; gap: 10px; padding: 10px 12px; }
	.nv-ctray__text { min-width: 0; flex: 1 1 auto; }
	.nv-ctray__items { order: 3; flex: 1 1 100%; justify-content: space-between; }
	.nv-ctray__item { width: calc((100% - 24px) / 4); height: 56px; }
}

/* ---------- /compare/ page ---------- */
.nv-cmp-wrap { max-width: 1170px; margin: 0 auto; padding: 24px 0 56px; }
.nv-cmp-head {
	display: flex;
	align-items: flex-end;
	justify-content: space-between;
	gap: 12px 24px;
	flex-wrap: wrap;
	margin-bottom: 20px;
}
.nv-cmp-head h1 { margin: 0 0 4px; font-size: clamp(24px, 1.3rem + 1vw, 32px); font-weight: 800; color: var(--nv-navy); }
.nv-cmp-head p { margin: 0; color: var(--nv-muted); }
.nv-cmp-head__actions { display: flex; gap: 16px; align-items: center; }
.nv-cmp-link { font-weight: 700; color: var(--nv-blue); text-decoration: none; }
.nv-cmp-clear { background: none; border: 0; color: var(--nv-muted); font-weight: 600; cursor: pointer; padding: 0; }
.nv-cmp-clear:hover { color: #dc2626; }

.nv-cmp-scroll { overflow-x: auto; border: 1px solid var(--nv-line); border-radius: 8px; background: #fff; }
.nv-cmp-table { width: 100%; border-collapse: collapse; table-layout: fixed; min-width: calc(160px + var(--cols) * 220px); margin: 0; }
.nv-cmp-table th,
.nv-cmp-table td {
	padding: 14px 16px;
	border-bottom: 1px solid var(--nv-line);
	border-left: 1px solid var(--nv-line);
	vertical-align: top;
	text-align: left;
	font-size: 14px;
	color: #374151;
	background: #fff;
}
.nv-cmp-table tbody tr:nth-child(even) td,
.nv-cmp-table tbody tr:nth-child(even) th { background: #f9fafb; }
.nv-cmp-table tr:last-child td,
.nv-cmp-table tr:last-child th { border-bottom: 0; }
.nv-cmp-label {
	width: 160px;
	border-left: 0 !important;
	font-weight: 700;
	color: var(--nv-navy) !important;
	position: sticky;
	left: 0;
	z-index: 1;
}
.nv-cmp-product { position: relative; text-align: center !important; }
.nv-cmp-img { display: block; margin: 0 auto 10px; max-width: 160px; }
.nv-cmp-img img { width: 100%; height: auto; aspect-ratio: 1; object-fit: contain; }
.nv-cmp-name {
	display: -webkit-box;
	-webkit-line-clamp: 3;
	-webkit-box-orient: vertical;
	overflow: hidden;
	font-weight: 700;
	color: var(--nv-ink);
	text-decoration: none;
	margin-bottom: 12px;
	line-height: 1.35;
}
.nv-cmp-name:hover { color: var(--nv-blue); }
.nv-cmp-cart .button {
	display: inline-flex !important;
	width: 100%;
	justify-content: center;
	background: var(--nv-blue) !important;
	color: #fff !important;
	border-radius: 4px;
	padding: 10px 12px !important;
	font-weight: 700;
}
.nv-cmp-cart .button:hover { background: var(--nv-navy) !important; }
.nv-cmp-remove {
	position: absolute;
	top: 8px;
	right: 8px;
	width: 28px;
	height: 28px;
	border: 1px solid var(--nv-line);
	border-radius: 50%;
	background: #fff;
	color: var(--nv-muted);
	font-size: 18px;
	line-height: 1;
	cursor: pointer;
	padding: 0;
}
.nv-cmp-remove:hover { color: #dc2626; border-color: #dc2626; }
.nv-cmp-price { font-weight: 800; font-size: 16px; color: var(--nv-navy); }
.nv-cmp-price del { color: #9ca3af; font-weight: 400; font-size: 13px; }
.nv-cmp-price ins { text-decoration: none; color: var(--nv-orange-dark); }
.nv-cmp-stock { font-weight: 700; }
.nv-cmp-stock.is-in { color: var(--nv-green); }
.nv-cmp-stock.is-out { color: #dc2626; }
.nv-cmp-muted { color: #9ca3af; }
.nv-cmp-table .novelty-sp-brand--logo img { max-height: 34px; width: auto; }

.nv-cmp-empty {
	text-align: center;
	border: 1px dashed #cdd6e0;
	border-radius: 8px;
	padding: 56px 20px;
	background: #f9fafb;
}
.nv-cmp-empty svg { width: 44px; height: 44px; color: var(--nv-blue); }
.nv-cmp-empty h2 { margin: 12px 0 6px; font-size: 20px; color: var(--nv-navy); }
.nv-cmp-empty p { color: var(--nv-muted); margin: 0 0 20px; }
.nv-cmp-btn {
	display: inline-block;
	background: var(--nv-blue);
	color: #fff !important;
	font-weight: 700;
	padding: 12px 22px;
	border-radius: 4px;
	text-decoration: none;
}
.nv-cmp-btn:hover { background: var(--nv-navy); }

@media (max-width: 1220px) { .nv-cmp-wrap { padding-left: 24px; padding-right: 24px; } }
@media (max-width: 600px) {
	.nv-cmp-wrap { padding: 16px 15px 40px; }
	.nv-cmp-label { width: 110px; }
	.nv-cmp-table { min-width: calc(110px + var(--cols) * 170px); }
	.nv-cmp-table th, .nv-cmp-table td { padding: 10px; font-size: 13px; }
}
