/* BINAWATT Quotes — front end. Uses the theme's tokens when present. */
.bwq,
.bwq-add,
.bwq-header,
.bwq-toast,
.bwq-cart-banner {
	--q-navy: var(--bw-navy, #0d2c6c);
	--q-orange: var(--bw-orange, #f5821f);
	--q-orange-600: var(--bw-orange-600, #e06f0c);
	--q-ink: var(--bw-ink, #1a1f2b);
	--q-muted: var(--bw-muted, #5d6677);
	--q-line: var(--bw-line, #e3e7ee);
	--q-bg: var(--bw-bg, #f4f6f9);
}
.bwq-icon { width: 20px; height: 20px; flex: none; }

/* Buttons */
.bwq-btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 8px;
	min-height: 48px;
	padding: 0 22px;
	border: 2px solid transparent;
	border-radius: 999px;
	background: var(--q-navy);
	color: #fff;
	font-weight: 600;
	font-size: 15px;
	text-decoration: none;
	cursor: pointer;
	transition: background .18s, color .18s, border-color .18s;
}
.bwq-btn:hover { background: var(--q-orange); color: #fff; }
.bwq a.bwq-btn,
.bwq-cart-banner a.bwq-btn { text-decoration: none; }
.bwq-btn--primary { background: var(--q-orange); }
.bwq-btn--primary:hover { background: var(--q-orange-600); }
.bwq-btn--ghost { border-color: var(--q-line); background: #fff; color: var(--q-navy); }
.bwq-btn--ghost:hover { border-color: var(--q-navy); background: #fff; color: var(--q-navy); }
.bwq-btn--navy { background: var(--q-navy); }

/* Product page button */
.bwq-add {
	flex: 1 1 100%;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 10px;
	height: 52px;
	padding: 0 24px;
	border: 2px solid var(--q-navy);
	border-radius: 999px;
	background: #fff;
	color: var(--q-navy);
	font: 700 16px/1 inherit;
	font-family: inherit;
	cursor: pointer;
	transition: background .18s, color .18s;
}
.bwq-add:hover,
.bwq-add:focus-visible { background: var(--q-navy); color: #fff; }
.bwq-add.is-loading { opacity: .7; }
.bwq-add-hint { flex: 1 1 100%; margin: 0; color: var(--q-muted); font-size: 13px; text-align: center; }

/* Header link */
.bwq-header__icon { position: relative; display: inline-flex; }
.bwq-header__icon .bwq-icon { width: 28px; height: 28px; color: var(--q-navy); }
.bwq-header__count {
	position: absolute;
	top: -7px;
	right: -9px;
	min-width: 20px;
	height: 20px;
	padding: 0 5px;
	border: 2px solid #fff;
	border-radius: 999px;
	background: var(--q-navy);
	color: #fff;
	font-size: 11px;
	font-weight: 700;
	line-height: 16px;
	text-align: center;
	box-sizing: border-box;
}
.bwq-header__count.is-empty { background: #9aa3b2; }
.bwq-header__count.is-bump { animation: bwq-bump .45s ease; }
@keyframes bwq-bump { 40% { transform: scale(1.35); } }

/* Toast */
.bwq-toast {
	position: fixed;
	left: 50%;
	bottom: 24px;
	z-index: 2000;
	display: flex;
	align-items: center;
	gap: 16px;
	max-width: min(560px, calc(100vw - 32px));
	padding: 14px 16px 14px 20px;
	border-radius: 14px;
	background: var(--q-navy);
	color: #fff;
	font-size: 15px;
	box-shadow: 0 18px 40px -12px rgba(7, 26, 66, .5);
	opacity: 0;
	transform: translate(-50%, 16px);
	transition: opacity .25s, transform .25s;
}
.bwq-toast.is-visible { opacity: 1; transform: translate(-50%, 0); }
.bwq-toast.is-error { background: #b91c1c; }
.bwq-toast a {
	flex: none;
	padding: 8px 14px;
	border-radius: 999px;
	background: var(--q-orange);
	color: #fff;
	font-weight: 700;
	text-decoration: none;
}

/* Cart banner */
.bwq-cart-banner {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 16px 20px;
	margin: 24px 0;
	padding: 20px 24px;
	border: 1px dashed var(--q-navy);
	border-radius: 16px;
	background: #eef3fc;
}
.bwq-cart-banner > div { flex: 1 1 280px; }
.bwq-cart-banner strong { display: block; color: var(--q-ink); font-size: 16px; }
.bwq-cart-banner span { color: var(--q-muted); font-size: 14px; }
.bwq-cart-banner__icon { display: grid; place-items: center; width: 48px; height: 48px; border-radius: 12px; background: var(--q-navy); color: #fff; }

/* Quote page
   -------------------------------------------------------------------------- */
.page .site-main .page-content:has(.bwq) { max-width: none; }
.bwq { color: var(--q-ink); font-size: 15px; line-height: 1.55; }

.bwq-steps {
	display: grid;
	grid-template-columns: repeat(3, minmax(0, 1fr));
	gap: 12px;
	margin: 0 0 28px;
	padding: 0;
	list-style: none;
}
.bwq-steps li { display: flex; align-items: center; gap: 12px; padding: 14px 16px; border-radius: 14px; background: var(--q-bg); font-weight: 600; font-size: 14px; }
.bwq-steps strong { display: grid; place-items: center; flex: none; width: 34px; height: 34px; border-radius: 50%; background: var(--q-orange); color: #fff; }

.bwq-errors { margin-bottom: 24px; padding: 16px 20px; border-left: 4px solid #b91c1c; border-radius: 12px; background: #fef2f2; }
.bwq-errors ul { margin: 6px 0 0; padding-left: 18px; }

.bwq-layout { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr); gap: 24px; align-items: start; }
.bwq-card { padding: 24px; border: 1px solid var(--q-line); border-radius: 18px; background: #fff; }
.bwq-card--form { position: sticky; top: 160px; }
.bwq-card__head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 18px; }
.bwq-card__head--sub { margin-top: 26px; padding-top: 22px; border-top: 1px solid var(--q-line); }
.bwq-card__head h2 { margin: 0; font-size: 19px; font-weight: 800; }
.bwq-card__head a { display: inline-flex; align-items: center; gap: 6px; color: var(--q-navy); font-weight: 600; font-size: 14px; text-decoration: none; }
.bwq-card__head a .bwq-icon { width: 18px; height: 18px; color: var(--q-orange); }

[data-bwq-list] { transition: opacity .2s; }
[data-bwq-list].is-busy { opacity: .55; pointer-events: none; }

.bwq-lines { margin: 0; padding: 0; list-style: none; }
.bwq-line {
	display: grid;
	grid-template-columns: 64px minmax(0, 1fr) 90px 40px;
	align-items: center;
	gap: 14px;
	padding: 12px 0;
	border-bottom: 1px solid var(--q-line);
	transition: opacity .2s;
}
.bwq-line:first-child { padding-top: 0; }
.bwq-line.is-removing { opacity: .3; }
.bwq-line__img img { width: 64px; height: 64px; border-radius: 10px; object-fit: cover; background: var(--q-bg); }
.bwq .bwq-line__name { display: block; color: var(--q-ink); font-weight: 700; text-decoration: none; line-height: 1.35; }
.bwq-line__name:hover { color: var(--q-navy); }
.bwq-line__meta { color: var(--q-muted); font-size: 13px; }
.bwq-line__qty input {
	width: 100%;
	height: 42px;
	padding: 0 8px;
	border: 1px solid var(--q-line);
	border-radius: 10px;
	font-weight: 700;
	text-align: center;
}
.bwq-line__remove {
	display: grid;
	place-items: center;
	width: 40px;
	height: 40px;
	padding: 0;
	border: 0;
	border-radius: 50%;
	background: transparent;
	color: var(--q-muted);
	cursor: pointer;
}
.bwq-line__remove:hover { background: #fef2f2; color: #b91c1c; }

.bwq-total { display: flex; align-items: baseline; justify-content: space-between; padding-top: 16px; }
.bwq-total span { color: var(--q-muted); font-weight: 600; }
.bwq-total strong { color: var(--q-navy); font-size: 22px; font-weight: 800; }
.bwq-total-note { margin: 4px 0 0; color: var(--q-muted); font-size: 13px; text-align: right; }

.bwq-empty { display: flex; flex-direction: column; align-items: center; gap: 8px; padding: 28px 16px; border-radius: 14px; background: var(--q-bg); text-align: center; }
.bwq-empty .bwq-icon { width: 40px; height: 40px; color: var(--q-orange); }
.bwq-empty strong { font-size: 17px; }
.bwq-empty p { max-width: 420px; margin: 0 0 8px; color: var(--q-muted); }

.bwq-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.bwq-field { display: flex; flex-direction: column; gap: 6px; }
.bwq-field--full { grid-column: 1 / -1; }
.bwq-card--list .bwq-field { margin-top: 22px; }
.bwq-field > span { font-size: 13px; font-weight: 700; color: var(--q-ink); }
.bwq-field abbr { color: var(--q-orange-600); text-decoration: none; }
.bwq-field input,
.bwq-field textarea {
	width: 100%;
	padding: 11px 14px;
	border: 1px solid var(--q-line);
	border-radius: 10px;
	background: #fff;
	font-size: 15px;
	transition: border-color .15s, box-shadow .15s;
}
.bwq-field input:focus,
.bwq-field textarea:focus { border-color: var(--q-navy); outline: none; box-shadow: 0 0 0 3px rgba(13, 44, 108, .12); }
.bwq-field textarea { resize: vertical; }

.bwq-upload {
	position: relative;
	display: flex;
	align-items: center;
	gap: 14px;
	margin-top: 16px;
	padding: 16px;
	border: 2px dashed var(--q-line);
	border-radius: 14px;
	cursor: pointer;
	transition: border-color .15s, background .15s;
}
.bwq-upload:hover,
.bwq-upload:focus-within,
.bwq-upload.has-file { border-color: var(--q-orange); background: #fff8f1; }
.bwq-upload input { position: absolute; inset: 0; opacity: 0; cursor: pointer; }
.bwq-upload__icon { display: grid; place-items: center; width: 44px; height: 44px; border-radius: 12px; background: #fff4ea; color: var(--q-orange-600); }
.bwq-upload__text strong { display: block; font-size: 15px; word-break: break-all; }
.bwq-upload__text span { color: var(--q-muted); font-size: 13px; }

.bwq-hp { position: absolute !important; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.bwq-submit { width: 100%; margin-top: 24px; min-height: 54px; font-size: 16px; }
.bwq-privacy { margin: 12px 0 0; color: var(--q-muted); font-size: 12px; text-align: center; }

/* Success */
.bwq-success { max-width: 640px; margin: 20px auto; padding: 40px 32px; border: 1px solid var(--q-line); border-radius: 20px; text-align: center; }
.bwq-success__icon { display: inline-grid; place-items: center; width: 72px; height: 72px; margin-bottom: 16px; border-radius: 50%; background: #ecfdf3; color: #15803d; }
.bwq-success__icon .bwq-icon { width: 36px; height: 36px; }
.bwq-success h2 { margin: 0 0 10px; font-size: 26px; font-weight: 800; }
.bwq-success p { color: var(--q-muted); }
.bwq-success__actions { display: flex; flex-wrap: wrap; justify-content: center; gap: 12px; margin-top: 20px; }

/* My account */
.bwq-status { display: inline-block; padding: 3px 10px; border-radius: 999px; background: var(--q-bg); font-size: 12px; font-weight: 700; }
.bwq-status--new { background: #eef3fc; color: var(--q-navy); }
.bwq-status--reviewing { background: #fff4ea; color: var(--q-orange-600); }
.bwq-status--quoted { background: #f3e8ff; color: #6b21a8; }
.bwq-status--won { background: #ecfdf3; color: #15803d; }
.bwq-status--lost { background: #f4f4f5; color: #71717a; }

@media (max-width: 1024px) {
	.bwq-layout { grid-template-columns: 1fr; }
	.bwq-card--form { position: static; }
}
@media (max-width: 768px) {
	.bwq-steps { grid-template-columns: 1fr; }
	.bwq-card { padding: 18px; }
	.bwq-grid { grid-template-columns: 1fr; }
	.bwq-line { grid-template-columns: 52px minmax(0, 1fr) 70px 36px; gap: 10px; }
	.bwq-line__img img { width: 52px; height: 52px; }
	.bwq-header .bw-action__text { display: none; }
}
