/* MSWI Product Compare — styles
 * Palette matched to masterspaswi.com: blue #14759f, orange CTA #e43700.
 */

.mswi-compare,
.mswi-bar,
.mswi-select {
	--mswi-blue: #14759f;
	--mswi-blue-dark: #0f5c7d;
	--mswi-orange: #e43700;
	--mswi-orange-dark: #c22f00;
	--mswi-line: #dfe4e8;
	--mswi-alt: #f4f7f9;
	--mswi-ink: #333;
	font-family: Arial, Helvetica, sans-serif;
	color: var(--mswi-ink);
	box-sizing: border-box;
}
.mswi-compare *,
.mswi-select * { box-sizing: border-box; }

/* ---------- Comparison table ---------- */
.mswi-compare__scroll {
	width: 100%;
	overflow-x: auto;
	-webkit-overflow-scrolling: touch;
}
.mswi-compare__table {
	border-collapse: collapse;
	width: 100%;
	min-width: 640px; /* forces horizontal scroll on mobile instead of stacking */
	table-layout: fixed;
}
.mswi-compare__table th,
.mswi-compare__table td {
	border: 1px solid var(--mswi-line);
	padding: 12px 14px;
	vertical-align: top;
	text-align: left;
	word-wrap: break-word;
}

/* sticky product header row on desktop */
.mswi-compare__head th {
	position: -webkit-sticky;
	position: sticky;
	top: 0;
	z-index: 3;
	background: #fff;
}
.mswi-compare__corner {
	z-index: 4;
	background: #fff;
}
.mswi-compare__rowlabel {
	width: 190px;
	background: var(--mswi-alt);
	font-weight: 700;
	position: -webkit-sticky;
	position: sticky;
	left: 0;
	z-index: 2;
}
.mswi-compare__head .mswi-compare__corner {
	left: 0;
}

.mswi-compare__col { text-align: center; }
.mswi-compare__img img {
	max-width: 100%;
	height: auto;
	display: block;
	margin: 6px auto 10px;
}
.mswi-compare__name {
	display: block;
	font-weight: 700;
	color: var(--mswi-blue);
	text-decoration: none;
	font-size: 15px;
	line-height: 1.3;
	margin-bottom: 6px;
}
.mswi-compare__name:hover { text-decoration: underline; }
.mswi-compare__price {
	font-size: 13px;
	color: #555;
	margin-bottom: 10px;
}
.mswi-compare__remove {
	background: none;
	border: 0;
	color: #999;
	cursor: pointer;
	font-size: 12px;
	float: right;
	padding: 0;
}
.mswi-compare__remove:hover { color: var(--mswi-orange); }
.mswi-compare__reset {
	font-size: 13px;
	color: var(--mswi-blue);
	text-decoration: none;
}

/* section group header */
.mswi-compare__grouplabel {
	background: var(--mswi-blue);
	color: #fff;
	font-size: 15px;
	letter-spacing: .02em;
	text-transform: uppercase;
	left: 0;
}
.mswi-compare__row.is-alt .mswi-compare__cell,
.mswi-compare__row.is-alt .mswi-compare__rowlabel { background: var(--mswi-alt); }
.mswi-compare__cell { text-align: center; font-size: 14px; line-height: 1.5; }

/* CTA buttons (orange) */
.mswi-compare__cta {
	display: inline-block;
	background: var(--mswi-orange);
	color: #fff !important;
	text-decoration: none;
	padding: 8px 14px;
	border-radius: 3px;
	font-size: 13px;
	font-weight: 700;
	line-height: 1.2;
}
.mswi-compare__cta:hover { background: var(--mswi-orange-dark); color: #fff; }
.mswi-compare__row--cta .mswi-compare__cell { padding: 16px 14px; }

/* ---------- Floating bar ---------- */
.mswi-bar {
	position: fixed;
	left: 0; right: 0; bottom: 0;
	z-index: 99998;
	background: var(--mswi-blue);
	color: #fff;
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 16px;
	padding: 12px 16px;
	box-shadow: 0 -2px 8px rgba(0,0,0,.2);
	font-size: 15px;
}
.mswi-bar__count { font-weight: 700; }
.mswi-bar__view {
	background: var(--mswi-orange);
	color: #fff;
	border: 0;
	padding: 9px 18px;
	border-radius: 3px;
	font-weight: 700;
	cursor: pointer;
	font-size: 14px;
}
.mswi-bar__view:hover { background: var(--mswi-orange-dark); }
.mswi-bar__clear {
	background: none;
	border: 0;
	color: #cfe4ee;
	font-size: 22px;
	line-height: 1;
	cursor: pointer;
	padding: 0 4px;
}
.mswi-bar__clear:hover { color: #fff; }

/* ---------- Selector (Flow B) ---------- */
.mswi-select__title { color: var(--mswi-blue); margin: 0 0 4px; }
.mswi-select__sub { margin: 0 0 18px; color: #666; }

/* Dropdown category filter */
.mswi-select__filterbar {
	display: flex;
	align-items: center;
	gap: 10px;
	margin-bottom: 20px;
	flex-wrap: wrap;
}
.mswi-select__filterlabel {
	font-weight: 700;
	font-size: 13px;
	color: var(--mswi-ink);
}
.mswi-select__dropdown {
	appearance: none;
	-webkit-appearance: none;
	background: #fff url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath fill='%2314759f' d='M6 8L0 0h12z'/%3E%3C/svg%3E") no-repeat right 14px center;
	border: 1px solid var(--mswi-blue);
	color: var(--mswi-blue);
	font-weight: 700;
	font-size: 15px;
	padding: 10px 38px 10px 14px;
	border-radius: 4px;
	min-width: 260px;
	cursor: pointer;
}
.mswi-select__dropdown:focus {
	outline: none;
	box-shadow: 0 0 0 3px rgba(20,117,159,.2);
}
.mswi-select__empty {
	color: #777;
	font-style: italic;
	padding: 24px 0;
}

.mswi-select__grid {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
	gap: 16px;
	align-items: stretch;
}
.mswi-select__card {
	border: 1px solid var(--mswi-line);
	border-radius: 6px;
	padding: 14px 12px 16px;
	text-align: center;
	cursor: pointer;
	display: flex;
	flex-direction: column;
	position: relative;
	transition: border-color .15s, box-shadow .15s;
	background: #fff;
}
.mswi-select__card:hover { border-color: var(--mswi-blue); box-shadow: 0 2px 10px rgba(0,0,0,.06); }
.mswi-select__check {
	position: absolute;
	top: 10px; left: 10px;
	width: 18px; height: 18px;
	margin: 0;
	cursor: pointer;
	z-index: 2;
}
.mswi-select__check:checked ~ .mswi-select__cardname { color: var(--mswi-blue); }
.mswi-select__card:has(.mswi-select__check:checked) {
	border-color: var(--mswi-blue);
	box-shadow: 0 0 0 2px rgba(20,117,159,.28);
}
/* fixed image area — same height whether or not a thumbnail exists */
.mswi-select__cardimg {
	display: flex;
	align-items: center;
	justify-content: center;
	height: 130px;
	margin-bottom: 10px;
	background: var(--mswi-alt);
	border-radius: 4px;
	overflow: hidden;
}
.mswi-select__cardimg img { max-width: 100%; max-height: 130px; height: auto; width: auto; display: block; }
/* placeholder icon when there is no image */
.mswi-select__cardimg:empty::after {
	content: "No image";
	font-size: 12px;
	color: #9aa7af;
}
.mswi-select__cardname {
	display: block;
	font-weight: 700;
	font-size: 14px;
	line-height: 1.3;
	margin-top: auto; /* pin name to bottom so all names align */
}

.mswi-select__bar {
	position: fixed;
	left: 0; right: 0; bottom: 0;
	z-index: 99998;
	background: var(--mswi-blue);
	color: #fff;
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 16px;
	padding: 12px 16px;
	box-shadow: 0 -2px 8px rgba(0,0,0,.2);
}
.mswi-select__count { font-weight: 700; }
.mswi-select__go {
	background: var(--mswi-orange);
	color: #fff;
	border: 0;
	padding: 9px 18px;
	border-radius: 3px;
	font-weight: 700;
	cursor: pointer;
}
.mswi-select__go:hover:not(:disabled) { background: var(--mswi-orange-dark); }
.mswi-select__go:disabled { opacity: .5; cursor: not-allowed; }

/* ---------- Mobile ---------- */
@media (max-width: 600px) {
	.mswi-compare__rowlabel { width: 130px; }
	.mswi-compare__name { font-size: 14px; }
	.mswi-bar, .mswi-select__bar { flex-wrap: wrap; gap: 10px; font-size: 14px; }
}
