.vhc {
	--vc-bg: #ffffff;
	--vc-bg-alt: #f7f7f7;
	--vc-ink: #211e1e;
	--vc-ink-muted: rgba(33, 30, 30, 0.62);
	--vc-ink-faint: rgba(33, 30, 30, 0.4);
	--vc-line: rgba(33, 30, 30, 0.12);
	--vc-sand: #c9b79c;
	--vc-sand-light: #dcc8a8;
	--vc-sand-soft: #efe7da;
	--vc-rust: #ad5207;
	--vc-rust-soft: #f6e6d8;
	--vc-shadow: rgba(33, 30, 30, 0.08);
	--vc-shadow-strong: rgba(33, 30, 30, 0.16);
	--vc-radius: 6px;
	--vc-font-h: "Helvetica Neue", Helvetica, Arial, sans-serif;
	--vc-font-b: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;

	background: var(--vc-bg);
	color: var(--vc-ink);
	font-family: var(--vc-font-b);
	font-size: 15px;
	line-height: 1.45;
	-webkit-font-smoothing: antialiased;
	max-width: 1180px;
	margin: 0 auto;
	padding: 48px 24px 80px;
}
.vhc *, .vhc *::before, .vhc *::after { box-sizing: border-box; }
.vhc p { margin: 0; }
.vhc [hidden] { display: none !important; }

/* Neutraliza los estilos de botones y campos del tema (Hello Elementor). */
.vhc button {
	font-family: inherit; font-size: inherit; line-height: 1.2; text-transform: none; letter-spacing: normal;
	border: 0; border-radius: var(--vc-radius); background: none; color: inherit; padding: 0; margin: 0;
	box-shadow: none; cursor: pointer; min-height: 0; width: auto; text-decoration: none;
}
.vhc button:hover, .vhc button:focus { background: none; color: inherit; }
.vhc button:focus-visible, .vhc input:focus-visible { outline: 2px solid var(--vc-rust); outline-offset: 2px; }
.vhc input[type="text"], .vhc input[type="search"] {
	font-family: inherit; font-size: 15px; color: var(--vc-ink); background: var(--vc-bg);
	border: 1px solid var(--vc-line); border-radius: var(--vc-radius); padding: 8px 10px; margin: 0;
	box-shadow: none; width: 100%; min-height: 0; line-height: 1.3;
}
.vhc input[type="text"]:focus, .vhc input[type="search"]:focus { border-color: var(--vc-rust); outline: none; }

/* ---------- cabecera ---------- */
.vhc-header {
	display: flex; justify-content: space-between; align-items: flex-end; gap: 24px; flex-wrap: wrap;
	margin-bottom: 32px;
}
.vhc-logo { height: 30px; width: auto; color: var(--vc-ink); display: block; margin-bottom: 22px; }
.vhc-eyebrow {
	font-family: var(--vc-font-h); font-weight: 600; font-size: 12px; letter-spacing: 0.16em;
	text-transform: uppercase; color: var(--vc-rust); margin-bottom: 10px !important;
}
.vhc .vhc-title {
	font-family: var(--vc-font-h); font-weight: 600; font-size: clamp(24px, 3.2vw, 34px);
	line-height: 1.2; letter-spacing: -0.01em; margin: 0; max-width: 560px; color: var(--vc-ink);
}
.vhc-lede { color: var(--vc-ink-muted); margin-top: 10px !important; max-width: 560px; }
.vhc-toolbar { display: flex; gap: 8px; flex-wrap: wrap; }

.vhc .vhc-btn {
	font-family: var(--vc-font-h); font-weight: 600; font-size: 13px; white-space: nowrap;
	background: var(--vc-sand); color: var(--vc-ink); padding: 11px 18px; border: 1px solid var(--vc-sand);
	transition: background 0.2s ease, border-color 0.2s ease;
}
.vhc .vhc-btn:hover { background: var(--vc-sand-light); border-color: var(--vc-sand-light); color: var(--vc-ink); }
.vhc .vhc-btn-ghost { background: transparent; border-color: var(--vc-line); color: var(--vc-ink-muted); }
.vhc .vhc-btn-ghost:hover { background: var(--vc-bg-alt); border-color: var(--vc-line); color: var(--vc-ink); }

/* ---------- layout ---------- */
.vhc-layout { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 28px; align-items: start; }
.vhc-side { position: sticky; top: 24px; }
.admin-bar .vhc-side { top: 56px; }

.vhc-card {
	background: var(--vc-bg-alt); border-radius: 10px; box-shadow: 0 1px 2px var(--vc-shadow);
}

/* ---------- m² construidos ---------- */
.vhc-house { padding: 20px 22px; margin-bottom: 20px; }
.vhc-house-head { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.vhc-house-label {
	font-family: var(--vc-font-h); font-weight: 600; font-size: 12px; letter-spacing: 0.16em;
	text-transform: uppercase; color: var(--vc-rust);
}
.vhc-house-input { display: flex; align-items: center; gap: 8px; }
.vhc .vhc-house-input input {
	width: 120px; font-family: var(--vc-font-h); font-size: 22px; font-weight: 700; text-align: right;
	font-variant-numeric: tabular-nums; padding: 6px 10px;
}
.vhc-house-input span { font-weight: 600; color: var(--vc-ink-muted); }
.vhc-house-hint { margin-top: 10px !important; font-size: 13px; color: var(--vc-ink-muted); }

.vhc .vhc-range {
	-webkit-appearance: none; appearance: none; width: 100%; height: 22px; margin: 14px 0 0; padding: 0;
	background: transparent; border: 0; cursor: pointer;
}
.vhc .vhc-range::-webkit-slider-runnable-track { height: 4px; border-radius: 4px; background: var(--vc-sand-light); }
.vhc .vhc-range::-moz-range-track { height: 4px; border-radius: 4px; background: var(--vc-sand-light); }
.vhc .vhc-range::-webkit-slider-thumb {
	-webkit-appearance: none; width: 20px; height: 20px; border-radius: 50%; background: var(--vc-rust);
	border: 3px solid var(--vc-bg); box-shadow: 0 1px 4px var(--vc-shadow-strong); margin-top: -8px;
}
.vhc .vhc-range::-moz-range-thumb {
	width: 14px; height: 14px; border-radius: 50%; background: var(--vc-rust);
	border: 3px solid var(--vc-bg); box-shadow: 0 1px 4px var(--vc-shadow-strong);
}

/* ---------- chips ---------- */
.vhc .vhc-chip {
	display: inline-block; font-family: var(--vc-font-b); font-size: 10px; font-weight: 700; letter-spacing: 0.06em;
	text-transform: uppercase; padding: 2px 7px; border-radius: 999px; vertical-align: 1px;
	background: transparent; color: var(--vc-ink-muted); border: 1px dashed var(--vc-ink-faint);
}
.vhc .vhc-chip.vhc-chip-on, .vhc .vhc-chip-static { background: var(--vc-rust-soft); color: var(--vc-rust); border: 1px solid transparent; }
.vhc button.vhc-chip:hover { border-color: var(--vc-rust); color: var(--vc-rust); }

/* ---------- filtros ---------- */
.vhc-filters { display: flex; align-items: center; gap: 14px; margin-bottom: 14px; flex-wrap: wrap; }
.vhc .vhc-search { flex: 1 1 200px; width: auto; }
.vhc-check { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; color: var(--vc-ink-muted); cursor: pointer; margin: 0; }
.vhc-check input { accent-color: var(--vc-rust); margin: 0; }
.vhc .vhc-link { font-size: 13px; font-weight: 600; color: var(--vc-rust); }
.vhc .vhc-link:hover { color: var(--vc-rust); text-decoration: underline; }
.vhc-empty { padding: 30px 0; text-align: center; color: var(--vc-ink-muted); }

/* ---------- secciones ---------- */
.vhc-group { margin-bottom: 12px; border-radius: 10px; border: 1px solid var(--vc-line); background: var(--vc-bg); scroll-margin-top: 24px; }
.vhc .vhc-group-head {
	position: relative; width: 100%; display: flex; align-items: center; justify-content: space-between; gap: 12px;
	padding: 16px 18px; text-align: left; border-radius: 10px;
}
.vhc .vhc-group-head:hover { background: var(--vc-bg-alt); }
.vhc-group-name {
	font-family: var(--vc-font-h); font-weight: 600; font-size: 12.5px; letter-spacing: 0.14em;
	text-transform: uppercase; color: var(--vc-rust);
}
.vhc-group-meta { display: flex; align-items: center; gap: 12px; }
.vhc-group-count { font-size: 12px; color: var(--vc-ink-faint); white-space: nowrap; }
.vhc-group-total { font-family: var(--vc-font-h); font-weight: 700; font-size: 16px; font-variant-numeric: tabular-nums; white-space: nowrap; }
.vhc-chev { color: var(--vc-ink-faint); transition: transform 0.2s ease; flex: none; }
.vhc-group[data-open="true"] .vhc-chev, .vhc-group.vhc-forced-open .vhc-chev { transform: rotate(180deg); }
.vhc-group-progress { position: absolute; left: 18px; right: 18px; bottom: 0; height: 2px; background: transparent; overflow: hidden; border-radius: 2px; }
.vhc-group-progress span { display: block; height: 100%; background: var(--vc-sand); transition: width 0.3s ease; }
.vhc-group-body { display: none; padding: 6px 12px 12px; }
.vhc-group[data-open="true"] .vhc-group-body, .vhc-group.vhc-forced-open .vhc-group-body { display: block; }

/* ---------- partidas ---------- */
.vhc-row {
	display: grid; grid-template-columns: 36px minmax(0, 1fr) auto auto 112px; align-items: center; gap: 16px;
	background: var(--vc-bg-alt); border-radius: var(--vc-radius); padding: 12px 16px 12px 12px; margin-top: 8px;
	border-left: 3px solid transparent; transition: box-shadow 0.2s ease, border-color 0.2s ease, opacity 0.2s ease;
}
.vhc-row:hover { box-shadow: 0 6px 16px var(--vc-shadow-strong); }
.vhc-row.vhc-has { border-left-color: var(--vc-rust); }
.vhc-row.vhc-off { opacity: 0.45; }
.vhc-row.vhc-off .vhc-sub-amount { text-decoration: line-through; }
.vhc-row-flat { grid-template-columns: 36px minmax(0, 1fr) auto 112px; }

.vhc-row-name { font-family: var(--vc-font-h); font-weight: 600; font-size: 15px; line-height: 1.3; }
.vhc-row-unit {
	display: block; font-family: var(--vc-font-b); font-weight: 500; font-size: 11px; letter-spacing: 0.04em;
	text-transform: uppercase; color: var(--vc-ink-muted); margin-top: 4px;
}

.vhc-switch { position: relative; display: inline-block; width: 32px; height: 18px; cursor: pointer; margin: 0; }
.vhc-switch input { position: absolute; opacity: 0; width: 100%; height: 100%; margin: 0; cursor: pointer; }
.vhc-switch span { position: absolute; inset: 0; border-radius: 999px; background: var(--vc-ink-faint); transition: background 0.2s ease; pointer-events: none; }
.vhc-switch span::after {
	content: ""; position: absolute; top: 2px; left: 2px; width: 14px; height: 14px; border-radius: 50%;
	background: #fff; transition: transform 0.2s ease;
}
.vhc-switch input:checked + span { background: var(--vc-rust); }
.vhc-switch input:checked + span::after { transform: translateX(14px); }
.vhc-switch input:focus-visible + span { outline: 2px solid var(--vc-rust); outline-offset: 2px; }

.vhc-field { display: flex; flex-direction: column; gap: 4px; }
.vhc-field label {
	font-weight: 600; font-size: 10px; letter-spacing: 0.06em; text-transform: uppercase; color: var(--vc-ink-muted); margin: 0;
}
.vhc-affix { position: relative; display: flex; align-items: center; }
.vhc-affix > span { position: absolute; right: 9px; font-size: 11px; color: var(--vc-ink-muted); pointer-events: none; }
.vhc .vhc-affix input { width: 104px; text-align: right; padding: 7px 28px 7px 8px; font-variant-numeric: tabular-nums; }
.vhc .vhc-affix input.vhc-edited { border-color: var(--vc-rust); background: var(--vc-rust-soft); }

.vhc-stepper { display: flex; align-items: stretch; }
.vhc .vhc-stepper .vhc-affix input { width: 92px; border-radius: 0; }
.vhc .vhc-stepper button {
	width: 30px; border: 1px solid var(--vc-line); background: var(--vc-bg); color: var(--vc-ink-muted);
	font-size: 16px; font-weight: 600;
}
.vhc .vhc-stepper button:first-child { border-radius: var(--vc-radius) 0 0 var(--vc-radius); border-right: 0; }
.vhc .vhc-stepper button:last-child { border-radius: 0 var(--vc-radius) var(--vc-radius) 0; border-left: 0; }
.vhc .vhc-stepper button:hover { background: var(--vc-sand-soft); color: var(--vc-ink); }

.vhc .vhc-reset { font-size: 11px; font-weight: 600; color: var(--vc-rust); text-align: left; }
.vhc .vhc-reset:hover { color: var(--vc-rust); text-decoration: underline; }

.vhc-sub { text-align: right; }
.vhc-sub-amount {
	display: block; font-family: var(--vc-font-h); font-variant-numeric: tabular-nums; font-size: 16px;
	font-weight: 700; color: var(--vc-ink-faint); white-space: nowrap;
}
.vhc-has .vhc-sub-amount { color: var(--vc-rust); }
.vhc-sub-cap { display: block; font-size: 9.5px; letter-spacing: 0.08em; text-transform: uppercase; color: var(--vc-ink-muted); margin-top: 2px; }

@keyframes vhc-flash { from { box-shadow: 0 0 0 3px var(--vc-sand); } to { box-shadow: 0 0 0 3px transparent; } }
.vhc-flash { animation: vhc-flash 0.9s ease; }

/* ---------- resumen ---------- */
.vhc-summary { background: var(--vc-ink); color: var(--vc-bg-alt); padding: 22px; box-shadow: 0 12px 28px var(--vc-shadow-strong); scroll-margin-top: 24px; }
.vhc-sum-label { font-family: var(--vc-font-h); font-weight: 600; font-size: 12px; letter-spacing: 0.1em; text-transform: uppercase; opacity: 0.7; }
.vhc-sum-total { font-family: var(--vc-font-h); font-variant-numeric: tabular-nums; font-size: 30px; font-weight: 700; letter-spacing: -0.01em; margin-top: 6px !important; line-height: 1.15; }
.vhc-sum-sub { font-size: 12.5px; opacity: 0.65; margin-top: 6px !important; }
.vhc-sum-head { font-family: var(--vc-font-h); font-weight: 600; font-size: 11px; letter-spacing: 0.12em; text-transform: uppercase; opacity: 0.55; margin: 22px 0 6px !important; }

.vhc-bars { list-style: none; margin: 0; padding: 0; }
.vhc-bars li { margin: 0; padding: 0; }
.vhc .vhc-bars button { display: block; width: 100%; padding: 7px 6px; margin: 0 -6px; width: calc(100% + 12px); text-align: left; color: var(--vc-bg-alt); border-radius: 6px; }
.vhc .vhc-bars button:hover { background: rgba(255, 255, 255, 0.07); color: var(--vc-bg-alt); }
.vhc-bar-top { display: flex; justify-content: space-between; gap: 10px; font-size: 12.5px; }
.vhc-bar-name { opacity: 0.85; }
.vhc-bar-val { font-variant-numeric: tabular-nums; font-weight: 600; white-space: nowrap; }
.vhc-bar-val em { font-style: normal; font-weight: 500; opacity: 0.55; margin-left: 4px; }
.vhc-bar-track { display: block; height: 6px; margin-top: 5px; border-radius: 4px; background: rgba(255, 255, 255, 0.08); }
.vhc-bar-track span { display: block; height: 100%; border-radius: 4px; background: var(--vc-sand); transition: width 0.35s ease; }
.vhc-bar-zero .vhc-bar-name { opacity: 0.45; }

.vhc-footer { margin-top: 28px !important; font-size: 12px; color: var(--vc-ink-muted); text-align: center; }

/* ---------- barra inferior (móvil) ---------- */
.vhc-dock { display: none; }

/* ---------- aviso ---------- */
.vhc-toast {
	position: fixed; left: 50%; bottom: 24px; transform: translate(-50%, 20px); opacity: 0; pointer-events: none;
	background: var(--vc-ink); color: #fff; font-size: 13.5px; padding: 11px 18px; border-radius: 8px;
	box-shadow: 0 10px 24px var(--vc-shadow-strong); transition: opacity 0.2s ease, transform 0.2s ease; z-index: 100000;
	max-width: calc(100vw - 32px); text-align: center;
}
.vhc-toast.vhc-toast-on { opacity: 1; transform: translate(-50%, 0); }

.vhc-print { display: none; }

/* ---------- responsive ---------- */
@media (max-width: 980px) {
	.vhc-layout { grid-template-columns: 1fr; }
	.vhc-side { position: static; order: 2; }
	.vhc-dock {
		display: flex; position: sticky; bottom: 12px; z-index: 50; margin-top: 20px;
		align-items: center; justify-content: space-between; gap: 12px;
		background: var(--vc-ink); color: #fff; border-radius: 10px; padding: 12px 14px 12px 18px;
		box-shadow: 0 12px 28px var(--vc-shadow-strong);
	}
	.vhc-dock-label { display: block; font-size: 10.5px; letter-spacing: 0.1em; text-transform: uppercase; opacity: 0.65; }
	.vhc-dock-total { display: block; font-family: var(--vc-font-h); font-weight: 700; font-size: 20px; font-variant-numeric: tabular-nums; }
	.vhc-toast { bottom: 90px; }
}
@media (max-width: 720px) {
	.vhc { padding: 32px 16px 40px; font-size: 14px; }
	.vhc-header { align-items: flex-start; }
	.vhc-toolbar { width: 100%; }
	.vhc-toolbar .vhc-btn { flex: 1; padding: 10px 8px; }
	.vhc-row, .vhc-row-flat {
		grid-template-columns: 36px minmax(0, 1fr) minmax(0, 1fr); gap: 10px 12px; padding: 12px;
	}
	/* Hijos: interruptor, nombre, cantidad, precio, subtotal (sin cantidad en precio cerrado). */
	.vhc-row > .vhc-row-name { grid-column: 2 / -1; }
	.vhc-row > :nth-child(3) { grid-column: 2; }
	.vhc-row > :nth-child(4) { grid-column: 3; }
	.vhc-row-flat > :nth-child(3) { grid-column: 2 / -1; }
	.vhc-row > .vhc-sub { grid-column: 2 / -1; text-align: left; display: flex; align-items: baseline; gap: 8px; }
	.vhc-field { min-width: 0; }
	.vhc-stepper .vhc-affix { flex: 1; min-width: 0; }
	.vhc .vhc-affix input, .vhc .vhc-stepper .vhc-affix input { width: 100%; }
	.vhc-stepper .vhc-affix { flex: 1; }
	.vhc .vhc-group-head { flex-wrap: wrap; }
	.vhc-group-count { display: none; }
}

@media (prefers-reduced-motion: reduce) {
	.vhc *, .vhc *::before, .vhc *::after { transition: none !important; animation: none !important; }
}

/* ---------- impresión / PDF ---------- */
@media print {
	body * { visibility: hidden !important; }
	.vhc-print, .vhc-print * { visibility: visible !important; }
	.vhc-print { display: block !important; position: absolute; left: 0; top: 0; width: 100%; color: #000; font-family: var(--vc-font-b); font-size: 11.5px; }
	.vhc-print h2 { font-family: var(--vc-font-h); font-size: 18px; margin: 0 0 4px; }
	.vhc-print-meta { color: #555; margin: 0 0 14px !important; }
	.vhc-print table { width: 100%; border-collapse: collapse; margin-bottom: 14px; }
	.vhc-print th, .vhc-print td { text-align: right; padding: 5px 6px; border-bottom: 1px solid #ddd; }
	.vhc-print th:first-child, .vhc-print td:first-child { text-align: left; }
	.vhc-print thead th { font-size: 10px; text-transform: uppercase; letter-spacing: 0.05em; color: #555; border-bottom: 1.5px solid #000; }
	.vhc-print .vhc-print-group th { padding-top: 12px; color: #ad5207; text-transform: uppercase; font-size: 10.5px; letter-spacing: 0.08em; }
	.vhc-print tfoot th { font-size: 13px; border-top: 2px solid #000; border-bottom: 0; padding-top: 8px; }
	.vhc-print tbody { break-inside: avoid; }
}
