/* ==========================================================================
   cotizador-vasitos.css
   Estilo Vasitos para el cotizador (docs/cotizador.html).
   Solo afecta a lo que cuelga de .cz / .cz-topbar: la hoja de PDF
   (#presupuesto-vista) y el resto de paginas (resumen, precios) no cambian.
   ========================================================================== */

body.cz-body {
  background: #F6F4F0;
  color: #1B1411;
  padding: 0 0 80px;
  font-family: "IBM Plex Sans", -apple-system, "Segoe UI", sans-serif;
}

/* --- Barra superior ------------------------------------------------------ */
.cz-topbar { background: #fff; border-bottom: 1px solid #E7E2DA; }
.cz-topbar-inner {
  max-width: 1240px; margin: 0 auto; padding: 14px 28px;
  display: flex; align-items: center; justify-content: space-between; gap: 20px; flex-wrap: wrap;
}
.cz-topbar img { height: 30px; width: auto; display: block; }
.cz-topnav { display: flex; gap: 22px; flex-wrap: wrap; }
.cz-topnav a {
  font-family: "Barlow Condensed", sans-serif; text-transform: uppercase; letter-spacing: .06em;
  font-weight: 600; font-size: 15px; color: #1B1411; text-decoration: none; padding: 4px 0;
  border-bottom: 2px solid transparent;
}
.cz-topnav a:hover { color: #C9451C; border-bottom-color: #F46036; }

/* --- Contenedor y variables locales --------------------------------------- */
.cz {
  --panel: #fff; --panel-2: #F6F4F0; --border: #E7E2DA; --text: #1B1411; --muted: #7A7168;
  --accent: #C9451C; --accent-ink: #fff; --accent-soft: #FCEBE4;
  --head-bg: #F0EDE8; --head-text: #1B1411;
  --good: #1F7A3D; --good-bg: #EAF6EE; --good-border: #BFE3CB; --bad: #C23B2C;
  --shadow: 0 1px 2px rgba(27,20,17,.04), 0 10px 28px rgba(27,20,17,.06);
  max-width: 1240px; margin: 0 auto; padding: 28px 28px 0; color: var(--text);
  font-family: "IBM Plex Sans", -apple-system, "Segoe UI", sans-serif;
}
.cz-titulo { margin: 0 0 22px; }
.cz-titulo .cz-eyebrow {
  font-family: "IBM Plex Mono", monospace; font-size: 11px; letter-spacing: .12em; text-transform: uppercase;
  color: #C9451C; font-weight: 600; margin: 0 0 6px;
}
.cz-titulo h1 {
  font-family: "Barlow Condensed", sans-serif; text-transform: uppercase; font-weight: 800;
  font-size: clamp(34px, 4.2vw, 48px); line-height: 1; letter-spacing: .01em; margin: 0 0 8px;
}
.cz-titulo p { margin: 0; color: var(--muted); font-size: 14px; }

/* --- Rejilla de dos columnas ---------------------------------------------- */
.cz-layout { display: grid; grid-template-columns: minmax(0, 1fr) 390px; gap: 24px; align-items: start; }
.cz-main, .cz-side { min-width: 0; }
.cz .cz-card { min-width: 0; }
.cz-side { position: sticky; top: 16px; max-height: calc(100vh - 32px); overflow-y: auto; padding-bottom: 4px; }
@media (max-width: 1020px) {
  .cz-layout { grid-template-columns: minmax(0, 1fr); }
  .cz-side { position: static; max-height: none; overflow: visible; }
}

/* --- Tarjetas -------------------------------------------------------------- */
.cz .cz-card {
  background: var(--panel); border: 1px solid var(--border); border-radius: 14px;
  box-shadow: var(--shadow); padding: 22px 24px; margin-bottom: 18px;
}
.cz .cz-card h2 {
  font-family: "Barlow Condensed", sans-serif; text-transform: uppercase; letter-spacing: .03em;
  font-weight: 700; font-size: 21px; margin: 0 0 4px; display: flex; align-items: center; gap: 10px;
}
.cz .cz-num {
  display: inline-flex; align-items: center; justify-content: center; width: 26px; height: 26px;
  border-radius: 50%; background: #F46036; color: #fff; font-size: 14px; font-weight: 700;
}
.cz .cz-card .desc { color: var(--muted); font-size: 12.5px; margin: 0 0 16px; line-height: 1.5; }
.cz .cz-sub {
  font-family: "Barlow Condensed", sans-serif; text-transform: uppercase; letter-spacing: .05em;
  font-weight: 600; font-size: 14px; color: var(--muted); margin: 20px 0 10px;
  padding-top: 16px; border-top: 1px solid var(--border);
}
.cz .cz-sub:first-of-type { border-top: none; padding-top: 0; margin-top: 4px; }

/* --- Campos ---------------------------------------------------------------- */
.cz .cz-grid { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: 14px 16px; align-items: end; }
.cz .s3 { grid-column: span 3; } .cz .s4 { grid-column: span 4; } .cz .s5 { grid-column: span 5; }
.cz .s6 { grid-column: span 6; } .cz .s8 { grid-column: span 8; } .cz .s12 { grid-column: span 12; }
@media (max-width: 760px) {
  .cz-topnav { gap: 8px 16px; }
  .cz details.cz-card > summary { align-items: flex-start; }
  .cz summary .cz-hint { display: block; margin: 4px 0 0; }
  .cz .cz-calc-row { grid-template-columns: 1fr; }
  .cz #q-resultado .stat .valor { font-size: 22px; } .cz .cz-grid > * { grid-column: span 12 !important; } .cz { padding: 20px 16px 0; } .cz-topbar-inner { padding: 12px 16px; } }

.cz .field { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.cz .field label {
  font-family: "IBM Plex Sans", sans-serif; font-size: 12px; font-weight: 600; text-transform: none;
  letter-spacing: 0; color: var(--muted);
}
.cz select, .cz input[type="text"], .cz input[type="number"] {
  width: 100%; min-width: 0; height: 42px; padding: 0 12px; font-size: 14px; font-family: inherit;
  color: var(--text); background: #fff; border: 1px solid var(--border); border-radius: 8px;
  transition: border-color .15s, box-shadow .15s;
}
.cz select:hover, .cz input:hover { border-color: #CFC8BD; }
.cz select:focus, .cz input:focus { outline: none; border-color: #F46036; box-shadow: 0 0 0 3px #FCEBE4; }
.cz input::placeholder { color: #B4ADA3; }
.cz .check-line { display: flex; align-items: center; gap: 8px; font-size: 13px; font-weight: 500; color: var(--text); cursor: pointer; }
.cz .check-line input { width: 18px; height: 18px; accent-color: #C9451C; }

/* --- Botones --------------------------------------------------------------- */
.cz button.primary, .cz .cz-btn {
  font-family: "Barlow Condensed", sans-serif; text-transform: uppercase; letter-spacing: .05em;
  font-weight: 700; font-size: 16px; line-height: 1; padding: 13px 22px; border-radius: 10px; border: none;
  background: #C9451C; color: #fff; cursor: pointer; box-shadow: 0 4px 14px rgba(201,69,28,.22);
  transition: background .15s, transform .05s;
}
.cz button.primary:hover { background: #B03A16; filter: none; }
.cz button.primary:active { transform: translateY(1px); }
.cz button.cz-btn-sec {
  background: #fff; color: var(--text); border: 1px solid #CFC8BD; box-shadow: none;
}
.cz button.cz-btn-sec:hover { background: #F6F4F0; border-color: #1B1411; }
.cz .add-tramo {
  font-family: "IBM Plex Sans", sans-serif; font-size: 13px; font-weight: 600; color: #C9451C; background: #fff;
  border: 1px dashed #E3B7A6; border-radius: 8px; padding: 8px 14px; cursor: pointer; margin-top: 10px;
}
.cz .add-tramo:hover { background: #FCEBE4; }
.cz button:focus-visible, .cz summary:focus-visible, .cz a:focus-visible { outline: 2px solid #F46036; outline-offset: 2px; }

/* --- Tablas editables ------------------------------------------------------ */
.cz .tabla-tramos { width: 100%; border-collapse: separate; border-spacing: 0; font-size: 13px; margin-top: 4px;
  border: 1px solid var(--border); border-radius: 10px; overflow: hidden; }
.cz .tabla-tramos th {
  background: #F0EDE8; color: var(--text); font-family: "Barlow Condensed", sans-serif; text-transform: uppercase;
  letter-spacing: .05em; font-weight: 600; font-size: 13px; padding: 9px 12px; text-align: left; border: none;
}
.cz .tabla-tramos td { border: none; border-top: 1px solid var(--border); padding: 4px 8px; background: #fff; }
.cz .tabla-tramos td input, .cz .tabla-tramos td select {
  height: 36px; border-color: transparent; background: transparent; padding: 0 6px;
}
.cz .tabla-tramos td input:hover, .cz .tabla-tramos td select:hover { border-color: var(--border); background: #fff; }
.cz .tabla-tramos td input:focus, .cz .tabla-tramos td select:focus { background: #fff; }
.cz .tabla-tramos button.del { background: none; border: none; color: #B4ADA3; cursor: pointer; font-size: 16px; padding: 4px 8px; }
.cz .tabla-tramos button.del:hover { color: #C23B2C; }
.cz .tabla-scroll { overflow-x: auto; }

/* --- Secciones plegables ------------------------------------------------------ */
.cz details.cz-card > summary {
  list-style: none; cursor: pointer; display: flex; align-items: center; justify-content: space-between; gap: 12px;
  font-family: "Barlow Condensed", sans-serif; text-transform: uppercase; letter-spacing: .03em;
  font-weight: 700; font-size: 21px; color: #1B1411; margin: 0;
}
.cz details.cz-card > summary::-webkit-details-marker { display: none; }
.cz details.cz-card > summary::after {
  content: "+"; font-family: "IBM Plex Sans", sans-serif; font-size: 22px; font-weight: 500; color: #C9451C;
  width: 30px; height: 30px; border-radius: 50%; background: #FCEBE4; display: inline-flex;
  align-items: center; justify-content: center; flex-shrink: 0; line-height: 1;
}
.cz details.cz-card[open] > summary::after { content: "–"; }
.cz details.cz-card > .cz-body-details { margin-top: 14px; }
.cz summary .cz-hint { font-family: "IBM Plex Sans", sans-serif; text-transform: none; letter-spacing: 0; font-size: 12.5px;
  font-weight: 400; color: var(--muted); margin-left: 8px; }

/* --- Resultado --------------------------------------------------------------- */
.cz .cz-resultado { border-top: 4px solid #F46036; }
.cz .cz-calc-row { display: grid; grid-template-columns: 1fr auto; gap: 12px; align-items: end; margin-top: 12px; }
.cz #q-referencia-precios { color: var(--muted); font-size: 12.5px; margin: 12px 0 0; line-height: 1.5; }
.cz #q-resultado { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 14px; }
.cz #q-resultado:empty { display: none; }
.cz .stat { background: #F6F4F0; border: 1px solid var(--border); border-radius: 10px; padding: 10px 12px; }
.cz .stat .label {
  font-family: "IBM Plex Sans", sans-serif; font-size: 11.5px; font-weight: 600; text-transform: none;
  letter-spacing: 0; color: var(--muted);
}
.cz .stat .valor { font-family: "Barlow Condensed", sans-serif; font-size: 26px; font-weight: 700; margin-top: 2px; letter-spacing: .01em; }
.cz .stat.principal { grid-column: 1 / -1; background: #1B1411; border-color: #1B1411; }
.cz .stat.principal .label { color: #CFC8BD; }
.cz .stat.principal .valor { color: #fff; font-size: 38px; }
.cz .stat.principal .sub { color: #CFC8BD; }
.cz .stat .sub { font-size: 11.5px; color: var(--muted); margin-top: 1px; }
.cz .stat.ancho { grid-column: 1 / -1; background: #fff; }
.cz table.mini { width: 100%; border-collapse: collapse; margin-top: 6px; font-size: 12.5px; }
.cz table.mini td { border: none; border-bottom: 1px solid #F0EDE8; padding: 5px 2px; background: none; }
.cz table.mini td:last-child { text-align: right; font-variant-numeric: tabular-nums; }
.cz table.mini tr.tot td { font-weight: 700; border-bottom: none; padding-top: 7px; }
.cz .stat.destacado { background: #EAF6EE; border-color: #BFE3CB; }
.cz .stat.destacado .valor { color: #1F7A3D; }

/* --- Competencia compacta ------------------------------------------------------ */
.cz .cz-comp h2 { font-size: 18px; }
.cz .cz-comp table { width: 100%; border-collapse: collapse; font-size: 12.5px; margin-top: 8px; }
.cz .cz-comp th {
  background: none; color: var(--muted); border: none; border-bottom: 1px solid var(--border);
  font-family: "IBM Plex Sans", sans-serif; font-size: 11.5px; font-weight: 600; text-transform: none; letter-spacing: 0; padding: 6px 4px;
}
.cz .cz-comp td { border: none; border-bottom: 1px solid #F0EDE8; padding: 7px 4px; }
.cz .cz-comp tr:first-child + tr td { font-weight: 600; color: #1F7A3D; }

/* --- Guardar / PDF -------------------------------------------------------------- */
.cz .cz-acciones { display: flex; flex-direction: column; gap: 10px; margin-top: 4px; }
.cz .cz-acciones .fila { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.cz .cz-acciones button { width: 100%; }
.cz .cz-link { font-size: 13px; font-weight: 600; color: #C9451C; text-decoration: none; text-align: center; padding: 6px 0; }
.cz .cz-link:hover { text-decoration: underline; }
.cz .cz-ayuda { margin-top: 12px; font-size: 12px; color: var(--muted); }
.cz .cz-ayuda summary { cursor: pointer; font-weight: 600; color: var(--muted); }
.cz .cz-ayuda p { margin: 8px 0 0; line-height: 1.55; }
.cz #q-descarga-estado, .cz #q-guardar-resultado { font-size: 12.5px; color: var(--muted); margin: 8px 0 0; }
.cz #q-editando-banner {
  margin: 0 0 18px; padding: 12px 16px; border: 1px solid #F46036; border-radius: 10px;
  background: #FCEBE4; font-size: 13.5px; color: #1B1411;
}
.cz #estado { color: var(--muted); font-size: 12.5px; margin-top: 4px; }

/* --- Impresion: no mostrar nada de esta pantalla, solo la hoja del presupuesto ----- */
@media print {
  .cz, .cz-topbar { display: none !important; }
  #presupuesto-vista .hoja:nth-of-type(n+2) { display: none !important; }
  body.cz-body { background: #fff; padding: 0; }
}

/* --- Colores del vaso y de las tintas (los mismos que en vasitos.es) ------------- */
.cz .cz-label-bloque { display: block; font-size: 12px; font-weight: 600; color: var(--muted); margin: 2px 0 8px; }
.cz .cz-celda-color { display: flex; align-items: center; gap: 8px; min-width: 0; }
.cz .cz-celda-color select { flex: 1; min-width: 0; }
.cz .cz-dot {
  width: 22px; height: 22px; border-radius: 50%; flex-shrink: 0; border: 1px solid rgba(27,20,17,.25);
  display: inline-flex; align-items: center; justify-content: center; font-size: 11px; font-weight: 700; color: #C9451C;
  box-shadow: inset 0 0 0 2px rgba(255,255,255,.35);
}
.cz .cz-ink-groups { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 12px 16px; }
.cz .cz-ink { display: flex; flex-direction: column; gap: 6px; padding: 12px 14px; background: #F6F4F0; border: 1px solid var(--border); border-radius: 10px; }
.cz .cz-ink-label { font-family: "Barlow Condensed", sans-serif; text-transform: uppercase; letter-spacing: .05em; font-weight: 600; font-size: 13px; color: var(--muted); }
.cz .cz-aviso {
  margin: 12px 0 0; padding: 10px 14px; border-radius: 10px; background: #FCEBE4; border: 1px solid #F3C4B3;
  font-size: 12.5px; line-height: 1.5; color: #1B1411;
}
.cz .tabla-tramos td input:disabled { background: transparent; color: #B4ADA3; cursor: not-allowed; }

/* --- Desglose del PDF (pantalla y transporte aparte) ------------------------------ */
.cz .cz-desglose { margin-top: 14px; padding-top: 14px; border-top: 1px solid var(--border); }
.cz .cz-desglose .field label { font-size: 11.5px; }

/* --- Botones de la tarjeta de precio ------------------------------------------------ */
.cz .cz-botones-precio { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; margin-top: 14px; }
.cz .cz-botones-precio button { padding: 10px 14px; font-size: 14px; }
.cz .cz-igualar { display: flex; align-items: center; gap: 8px; font-size: 12.5px; color: var(--muted); }
.cz .cz-igualar input { width: 64px; height: 38px; text-align: center; padding: 0 6px; }

/* --- Formulario reordenado: cajas, cuentas y coste por color ------------------------------ */
.cz textarea {
  width: 100%; padding: 10px 12px; font-size: 14px; font-family: inherit; line-height: 1.5; color: var(--text);
  background: #fff; border: 1px solid var(--border); border-radius: 8px; resize: vertical;
}
.cz textarea:focus { outline: none; border-color: #F46036; box-shadow: 0 0 0 3px #FCEBE4; }
.cz .cz-uds { font-variant-numeric: tabular-nums; white-space: nowrap; font-weight: 600; }
.cz .cz-uds-caja { font-weight: 400; color: var(--muted); font-size: 12px; }
.cz .cz-coste-color { display: grid; grid-template-columns: 22px 1fr 150px auto; gap: 10px; align-items: center; padding: 6px 0; border-bottom: 1px solid #F0EDE8; }
.cz .cz-coste-color input { height: 36px; }
.cz .cz-coste-nombre { font-size: 13.5px; font-weight: 600; }
.cz .cz-coste-unidad { font-size: 12px; color: var(--muted); }
