/* =========================================================
   COTIZADOR EN LÍNEA (cotizador.html)
   Usa los colores y tipografías de estilos.css.
   ========================================================= */
.cot { display: grid; grid-template-columns: minmax(0, 1fr) 400px; gap: 28px; align-items: start; }
.cot__catalogo, .cot__panel { min-width: 0; }

/* Filtros */
.cot__filtros { display: flex; flex-direction: column; gap: 14px; margin-bottom: 18px; }
.cot__buscar { position: relative; }
.cot__buscar svg { position: absolute; left: 14px; top: 50%; width: 18px; height: 18px; transform: translateY(-50%); color: var(--gris); }
.cot__buscar input { width: 100%; min-height: 48px; padding: 10px 14px 10px 42px; border: 1px solid var(--borde); border-radius: var(--radio-btn); font: inherit; font-size: 15px; color: var(--pizarra); background: var(--blanco); }
.cot__buscar input:focus { border-color: var(--azul); outline: none; box-shadow: 0 0 0 3px rgba(255,193,7,.45); }
.cot__chips { display: flex; flex-wrap: wrap; gap: 8px; }
.cot__chip { min-height: 38px; padding: 0 16px; border-radius: 999px; border: 1px solid var(--borde); background: var(--blanco); color: var(--azul); font: 600 14px var(--f-titulo); cursor: pointer; }
.cot__chip:hover { border-color: var(--azul); }
.cot__chip[aria-pressed="true"] { background: var(--azul); border-color: var(--azul); color: var(--blanco); }
.cot__resumen-filtro { font-size: 14px; color: var(--gris); }

/* Lista de productos */
.cot__lista { display: grid; gap: 10px; }
.cot__item { display: grid; grid-template-columns: 64px minmax(0, 1fr) auto; gap: 14px; align-items: center; padding: 12px 14px; background: var(--blanco); border: 1px solid var(--borde); border-radius: var(--radio-card); }
.cot__item img { width: 64px; height: 64px; object-fit: contain; border-radius: 8px; background: var(--fondo-claro); }
.cot__nombre { font: 600 15px/1.3 var(--f-titulo); color: var(--azul); }
.cot__nombre a:hover { text-decoration: underline; }
.cot__meta { margin-top: 3px; font-size: 13px; color: var(--gris); }
.cot__precio { margin-top: 4px; font: 700 16px var(--f-titulo); color: var(--antracita); font-variant-numeric: tabular-nums; }
.cot__precio s { margin-left: 6px; font-weight: 500; font-size: 13px; color: var(--gris); }
.cot__precio--consultar { font-size: 14px; font-weight: 600; color: #8a6500; }
.cot__variante { margin-top: 6px; max-width: 240px; min-height: 38px; padding: 6px 10px; border: 1px solid var(--borde); border-radius: var(--radio-btn); font: inherit; font-size: 14px; background: var(--blanco); color: var(--pizarra); }
.cot__agregar { min-height: 42px; padding: 0 16px; border-radius: var(--radio-btn); border: 1px solid var(--azul); background: var(--blanco); color: var(--azul); font: 600 14px var(--f-titulo); cursor: pointer; white-space: nowrap; }
.cot__agregar:hover { background: var(--azul); color: var(--blanco); }
.cot__agregar[data-en-cotizacion="true"] { background: var(--verde-oscuro); border-color: var(--verde-oscuro); color: var(--blanco); }
.cot__agregar:disabled { opacity: .5; cursor: not-allowed; }
.cot__mas { margin-top: 14px; }
.cot__estado { padding: 28px; text-align: center; background: var(--blanco); border: 1px dashed var(--borde); border-radius: var(--radio-card); color: var(--gris); }
.cot__esqueleto { height: 90px; border-radius: var(--radio-card); background: linear-gradient(90deg, var(--fondo-claro), #e9edf3, var(--fondo-claro)); background-size: 200% 100%; animation: cot-brillo 1.2s infinite linear; }
@keyframes cot-brillo { to { background-position: -200% 0; } }

/* Panel de cotización */
.cot__panel { position: sticky; top: calc(var(--alto-header, 72px) + 16px); display: flex; flex-direction: column; gap: 16px; }
.cot__caja { background: var(--blanco); border: 1px solid var(--borde); border-radius: var(--radio-card); padding: 22px; display: flex; flex-direction: column; gap: 14px; }
.cot__caja h2 { font-size: 21px; display: flex; justify-content: space-between; align-items: baseline; gap: 8px; }
.cot__caja h2 small { font: 500 13px var(--f-texto); color: var(--gris); }
.cot__lineas { display: grid; gap: 10px; max-height: 340px; overflow-y: auto; }
.cot__linea { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 6px 10px; padding-bottom: 10px; border-bottom: 1px solid var(--fondo-claro); }
.cot__linea-nombre { font-size: 14px; font-weight: 600; color: var(--pizarra); line-height: 1.35; }
.cot__linea-nombre small { display: block; font-weight: 400; color: var(--gris); }
.cot__linea-total { font: 700 14px var(--f-titulo); color: var(--antracita); text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.cot__linea-acciones { grid-column: 1 / -1; display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.cot__cantidad { display: inline-flex; align-items: center; border: 1px solid var(--borde); border-radius: var(--radio-btn); }
.cot__cantidad button { width: 34px; height: 34px; border: 0; background: none; color: var(--azul); font-size: 18px; cursor: pointer; }
.cot__cantidad input { width: 52px; height: 34px; border: 0; border-inline: 1px solid var(--borde); text-align: center; font: inherit; font-size: 14px; font-variant-numeric: tabular-nums; color: var(--pizarra); -moz-appearance: textfield; }
.cot__cantidad input::-webkit-outer-spin-button, .cot__cantidad input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.cot__quitar { border: 0; background: none; color: var(--rojo); font-size: 13px; font-weight: 600; cursor: pointer; text-decoration: underline; }
.cot__unit { font-size: 12.5px; color: var(--gris); font-variant-numeric: tabular-nums; }
.cot__vacio { font-size: 14.5px; color: var(--gris); }
.cot__totales { display: grid; gap: 6px; font-size: 14.5px; font-variant-numeric: tabular-nums; }
.cot__totales div { display: flex; justify-content: space-between; gap: 12px; }
.cot__totales .cot__total { padding-top: 8px; border-top: 1px solid var(--borde); font: 700 19px var(--f-titulo); color: var(--azul); }
.cot__aviso { font-size: 13px; color: var(--gris); line-height: 1.5; }
.cot__aviso--alerta { color: #8a6500; background: #FFF4D1; border-radius: 6px; padding: 8px 10px; }
.cot__campos { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.cot__campos .campo--ancho { grid-column: 1 / -1; }
.cot__campos .campo input, .cot__campos .campo select, .cot__campos .campo textarea { min-height: 42px; }
.cot__error { font-size: 12.5px; font-weight: 500; color: var(--rojo); min-height: 0; }
.cot__acciones { display: grid; gap: 10px; }
.cot__acciones .btn { width: 100%; }

/* Mayorista */
.cot__mayorista { border-color: rgba(255, 193, 7, .7); background: #FFFBEF; }
.cot__mayorista h3 { font-size: 17px; }
.cot__mayorista p { font-size: 14px; line-height: 1.5; }
.cot__mayorista .btn { width: 100%; }
.cot__enlace-correo { font-size: 13.5px; color: var(--azul); text-decoration: underline; text-align: center; }
.cot__estado-envio { font-size: 14px; padding: 10px 12px; border-radius: 6px; background: rgba(0, 152, 121, .1); color: var(--verde-oscuro); }
.cot__estado-envio--error { background: rgba(178, 34, 34, .08); color: var(--rojo); }
.cot__estado-envio a { text-decoration: underline; }

/* Barra inferior en celular */
.cot__barra { display: none; }

@media (max-width: 1099px) {
  .cot { grid-template-columns: minmax(0, 1fr); }
  .cot__panel { position: static; }
  .cot__barra {
    display: flex; position: fixed; left: 0; right: 0; bottom: 0; z-index: 30; gap: 12px; align-items: center; justify-content: space-between;
    padding: 10px 16px calc(10px + env(safe-area-inset-bottom, 0px)); background: var(--azul-oscuro); color: var(--blanco); box-shadow: 0 -8px 24px rgba(0, 16, 42, .25);
  }
  .cot__barra[hidden] { display: none; }
  .cot__barra strong { font: 700 16px var(--f-titulo); font-variant-numeric: tabular-nums; }
  .cot__barra span { display: block; font-size: 12.5px; color: var(--texto-claro); }
  .cot__barra .btn { min-height: 42px; padding: 0 16px; font-size: 14px; }
  body.cot-con-barra .whatsapp-flotante { bottom: 84px; }
}
@media (max-width: 560px) {
  .cot__item { grid-template-columns: 56px minmax(0, 1fr); }
  .cot__item img { width: 56px; height: 56px; }
  .cot__item .cot__agregar { grid-column: 1 / -1; width: 100%; }
  .cot__campos { grid-template-columns: 1fr; }
}
@media (prefers-reduced-motion: reduce) { .cot__esqueleto { animation: none; } }
