/* ============================================================
   COTIZADOR AIREVIA MX — cotizador.css
   ============================================================ */

/* ── Overlays ───────────────────────────────────────────────── */
#catalogo-overlay,
#cotizador-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(10, 20, 50, 0.6);
    z-index: 2000;
    justify-content: center;
    align-items: flex-start;
    padding: 20px;
    overflow-y: auto;
    opacity: 0;
    transition: opacity 0.3s ease;
}
#catalogo-overlay.activo,
#cotizador-overlay.activo { opacity: 1; }

.catalogo-card,
.cotizador-card {
    box-sizing: border-box;
    background: #fff;
    border-radius: 20px;
    padding: 32px;
    width: 100%;
    max-width: 1100px;
    margin: auto;
    position: relative;
    box-shadow: 0 20px 60px rgba(0,0,0,0.2);
}

.cotizador-card { max-width: 1200px; }

/* ── Toast ──────────────────────────────────────────────────── */
.cot-toast {
    position: fixed;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%) translateY(20px);
    background: #1F376D;
    color: #fff;
    padding: 12px 24px;
    border-radius: 12px;
    font-family: 'Exo 2', sans-serif;
    font-size: 0.9rem;
    font-weight: 600;
    z-index: 9999;
    opacity: 0;
    transition: all 0.3s ease;
    white-space: nowrap;
}
.cot-toast.visible {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
}

/* ============================================================
   CATÁLOGO
   ============================================================ */

/* Header */
.cat-header { margin-bottom: 24px; }
.cat-header-top {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    flex-wrap: wrap;
    gap: 12px;
}
.cat-titulo-bloque {
    display: flex;
    align-items: center;
    gap: 14px;
}
.cat-icon-wrap {
    width: 56px; height: 56px;
    background: #deeaf7;
    border-radius: 14px;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 1.4rem;
    color: #5895CE;
    flex-shrink: 0;
}
.cat-header-sep {
    width: 3px; height: 52px;
    background: #5895CE;
    border-radius: 2px;
    flex-shrink: 0;
}
.cat-titulo {
    font-size: 1.8rem;
    font-weight: 800;
    color: #1F376D;
    margin: 0 0 4px;
}
.cat-subtitulo { font-size: 0.9rem; color: #666; margin: 0; }

/* Botón ir al cotizador */
.cat-btn-cotizador {
    display: flex;
    align-items: center;
    gap: 8px;
    background: #1F376D;
    color: #fff;
    border: none;
    border-radius: 12px;
    padding: 12px 20px;
    font-family: 'Exo 2', sans-serif;
    font-size: 0.9rem;
    font-weight: 700;
    cursor: pointer;
    transition: background 0.2s;
    position: relative;
}
.cat-btn-cotizador:hover { background: #5895CE; }

.cot-honeypot {
    position: absolute;
    width: 1px;
    height: 1px;
    margin: -1px;
    padding: 0;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    border: 0;
    white-space: nowrap;
}

.catalogo-card *,
.cotizador-card * { box-sizing: border-box; }

.cot-turnstile-wrap {
    display: flex;
    justify-content: flex-end;
    margin: 16px 0 8px;
}
.cat-badge {
    background: #e74c3c;
    color: #fff;
    border-radius: 50%;
    width: 20px; height: 20px;
    font-size: 0.7rem;
    display: inline-flex;
    justify-content: center;
    align-items: center;
    font-weight: 800;
}

/* Filtros */
.cat-filtros {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}
.cat-buscador-wrap {
    flex: 1;
    min-width: 200px;
    position: relative;
    display: flex;
    align-items: center;
}
.cat-buscador-wrap i {
    position: absolute;
    left: 14px;
    color: #999;
    font-size: 0.9rem;
}
.cat-buscador-wrap input {
    width: 100%;
    padding: 11px 14px 11px 38px;
    border: 1.5px solid #e0e6f0;
    border-radius: 12px;
    font-family: 'Exo 2', sans-serif;
    font-size: 0.9rem;
    outline: none;
    transition: border-color 0.2s;
}
.cat-buscador-wrap input:focus { border-color: #5895CE; }

#cat-categoria {
    padding: 11px 16px;
    border: 1.5px solid #e0e6f0;
    border-radius: 12px;
    font-family: 'Exo 2', sans-serif;
    font-size: 0.9rem;
    outline: none;
    cursor: pointer;
    background: #fff;
    min-width: 200px;
    transition: border-color 0.2s;
}
#cat-categoria:focus { border-color: #5895CE; }

/* Grid de productos */
.cat-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 16px;
    margin-bottom: 20px;
}

/* Loading / vacío / error */
.cat-loading,
.cat-vacio,
.cat-error {
    grid-column: 1 / -1;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    padding: 60px 20px;
    color: #999;
    font-size: 1rem;
}
.cat-loading i,
.cat-vacio i,
.cat-error i { font-size: 2.5rem; color: #5895CE; }
.cat-error i { color: #e74c3c; }

/* Cards de producto */
.cat-card {
    background: #fff;
    border: 1.5px solid #eef0f4;
    border-radius: 16px;
    padding: 18px;
    display: flex;
    flex-direction: column;
    gap: 12px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
    transition: transform 0.22s ease, box-shadow 0.22s ease, border-color 0.22s ease;
    position: relative;
    overflow: hidden;
}
.cat-card::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 3px;
    background: linear-gradient(90deg, #5895CE, #1F376D);
    opacity: 0;
    transition: opacity 0.25s;
}
.cat-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 28px rgba(88,149,206,0.12);
    border-color: #c8dff6;
}
.cat-card:hover::before { opacity: 1; }

.cat-card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 8px;
}
.cat-categoria-tag {
    font-size: 0.68rem;
    font-weight: 700;
    color: #5895CE;
    background: #eaf2fb;
    border: 1px solid #c8dff6;
    border-radius: 20px;
    padding: 3px 10px;
}
.cat-codigo {
    font-size: 0.7rem;
    color: #999;
    font-family: monospace;
}
.cat-nombre {
    font-size: 0.92rem;
    font-weight: 700;
    color: #1F376D;
    margin: 0;
    line-height: 1.3;
}
.cat-modelo {
    font-size: 0.82rem;
    color: #666;
    margin: 0;
    display: flex;
    align-items: center;
    gap: 6px;
}
.cat-modelo i { color: #5895CE; font-size: 0.75rem; }

/* Specs técnicas */
.cat-specs {
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
}
.cat-specs span {
    font-size: 0.68rem;
    color: #555;
    background: #f4f7f9;
    border-radius: 8px;
    padding: 3px 8px;
    display: flex;
    align-items: center;
    gap: 4px;
}
.cat-specs span i { color: #5895CE; font-size: 0.6rem; }

/* Footer de card */
.cat-card-footer {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    gap: 8px;
    margin-top: auto;
}
.cat-precios {
    display: flex;
    flex-direction: column;
    gap: 3px;
}
.cat-precio {
    font-size: 0.82rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 4px;
}
.cat-precio.mxp { color: #1F376D; }
.cat-precio.usd { color: #27ae60; }
.cat-precio i   { font-size: 0.7rem; }

/* Botón agregar */
.cat-btn-agregar {
    display: flex;
    align-items: center;
    gap: 6px;
    background: #1F376D;
    color: #fff;
    border: none;
    border-radius: 10px;
    padding: 9px 14px;
    font-family: 'Exo 2', sans-serif;
    font-size: 0.8rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s;
    white-space: nowrap;
}
.cat-btn-agregar:hover    { background: #5895CE; }
.cat-btn-agregar.en-carrito {
    background: #27ae60;
    cursor: default;
}

/* Paginación */
.cat-paginacion { margin-top: 8px; }
.cat-pag-wrap {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 12px;
}
.cat-pag-info { font-size: 0.85rem; color: #666; }
.cat-pag-btns { display: flex; gap: 6px; flex-wrap: wrap; }
.cat-pag-btn {
    width: 36px; height: 36px;
    border: 1.5px solid #e0e6f0;
    border-radius: 8px;
    background: #fff;
    color: #1F376D;
    font-family: 'Exo 2', sans-serif;
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
}
.cat-pag-btn:hover:not(:disabled) {
    background: #1F376D;
    color: #fff;
    border-color: #1F376D;
}
.cat-pag-btn.activo {
    background: #1F376D;
    color: #fff;
    border-color: #1F376D;
}
.cat-pag-btn:disabled { opacity: 0.4; cursor: not-allowed; }
.cat-pag-dots { display: flex; align-items: center; color: #999; font-size: 0.85rem; }

/* ============================================================
   COTIZADOR
   ============================================================ */

/* Header */
.cot-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 24px;
    flex-wrap: wrap;
    gap: 12px;
}
.cot-titulo-bloque {
    display: flex;
    align-items: center;
    gap: 14px;
}
.cot-icon-wrap {
    width: 56px; height: 56px;
    background: #deeaf7;
    border-radius: 14px;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 1.4rem;
    color: #5895CE;
    flex-shrink: 0;
}
.cot-header-sep {
    width: 3px; height: 52px;
    background: #5895CE;
    border-radius: 2px;
}
.cot-titulo {
    font-size: 1.8rem;
    font-weight: 800;
    color: #1F376D;
    margin: 0 0 4px;
}
.cot-subtitulo { font-size: 0.9rem; color: #666; margin: 0; }

.cot-btn-catalogo {
    display: flex;
    align-items: center;
    gap: 8px;
    background: #f4f7f9;
    color: #1F376D;
    border: 1.5px solid #e0e6f0;
    border-radius: 12px;
    padding: 11px 18px;
    font-family: 'Exo 2', sans-serif;
    font-size: 0.9rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s;
}
.cot-btn-catalogo:hover {
    background: #1F376D;
    color: #fff;
    border-color: #1F376D;
}

/* Secciones */
.cot-seccion {
    margin-bottom: 24px;
}
.cot-seccion-titulo {
    font-size: 1rem;
    font-weight: 700;
    color: #1F376D;
    margin: 0 0 14px;
    display: flex;
    align-items: center;
    gap: 8px;
    padding-bottom: 8px;
    border-bottom: 2px solid #eef0f4;
}
.cot-seccion-titulo i { color: #5895CE; }
.cot-num-productos {
    margin-left: auto;
    font-size: 0.8rem;
    font-weight: 600;
    color: #5895CE;
    background: #eaf2fb;
    border-radius: 20px;
    padding: 3px 10px;
}

/* Formulario cliente */
.cot-form-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 14px;
}
.cot-field {
    display: flex;
    flex-direction: column;
    gap: 6px;
}
.cot-field label {
    font-size: 0.8rem;
    font-weight: 700;
    color: #1F376D;
}
.cot-field input,
.cot-field select {
    padding: 10px 14px;
    border: 1.5px solid #e0e6f0;
    border-radius: 10px;
    font-family: 'Exo 2', sans-serif;
    font-size: 0.88rem;
    outline: none;
    transition: border-color 0.2s;
}
.cot-field input:focus,
.cot-field select:focus { border-color: #5895CE; }
.cot-field input[readonly] { color: #4b5e77; background: #f3f6fa; cursor: default; }

/* Tabla */
.cot-tabla-wrap {
    overflow-x: auto;
    border-radius: 12px;
    border: 1.5px solid #eef0f4;
}
.cot-tabla {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.82rem;
}
.cot-tabla thead tr {
    background: #1F376D;
    color: #fff;
}
.cot-tabla th {
    padding: 10px 8px;
    text-align: center;
    font-weight: 700;
    font-size: 0.75rem;
    white-space: nowrap;
}
.cot-tabla td {
    padding: 8px;
    text-align: center;
    border-bottom: 1px solid #eef0f4;
    vertical-align: middle;
}
.cot-tabla tbody tr:hover { background: #f4f7f9; }
.cot-tabla tbody tr:last-child td { border-bottom: none; }
.cot-td-modelo { font-weight: 700; color: #1F376D; }
.cot-td-nombre { text-align: left !important; max-width: 200px; }
.cot-td-num    { color: #999; font-weight: 700; }

/* Controles moneda */
.cot-moneda-btns {
    display: flex;
    gap: 4px;
    justify-content: center;
}
.cot-moneda-btn {
    padding: 4px 8px;
    border: 1.5px solid #e0e6f0;
    border-radius: 6px;
    font-family: 'Exo 2', sans-serif;
    font-size: 0.7rem;
    font-weight: 700;
    cursor: pointer;
    background: #fff;
    color: #666;
    transition: all 0.2s;
}
.cot-moneda-btn.activo {
    background: #1F376D;
    color: #fff;
    border-color: #1F376D;
}

/* Controles cantidad */
.cot-cant-ctrl {
    display: flex;
    align-items: center;
    gap: 6px;
    justify-content: center;
}
.cot-cant-ctrl button {
    width: 24px; height: 24px;
    border: 1.5px solid #e0e6f0;
    border-radius: 6px;
    background: #fff;
    cursor: pointer;
    font-size: 0.9rem;
    font-weight: 700;
    color: #1F376D;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
}
.cot-cant-ctrl button:hover {
    background: #1F376D;
    color: #fff;
    border-color: #1F376D;
}
.cot-cant-ctrl span {
    font-weight: 700;
    color: #1F376D;
    min-width: 20px;
    text-align: center;
}

/* Botón eliminar */
.cot-btn-eliminar {
    width: 28px; height: 28px;
    border: none;
    border-radius: 8px;
    background: #fdecea;
    color: #e74c3c;
    cursor: pointer;
    font-size: 0.85rem;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
    margin: auto;
}
.cot-btn-eliminar:hover {
    background: #e74c3c;
    color: #fff;
}

/* Carrito vacío */
.cot-vacio {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 14px;
    padding: 50px 20px;
    color: #999;
}
.cot-vacio i { font-size: 3rem; color: #ddd; }
.cot-vacio p { font-size: 1rem; margin: 0; }
.cot-btn-ir-catalogo {
    display: flex;
    align-items: center;
    gap: 8px;
    background: #1F376D;
    color: #fff;
    border: none;
    border-radius: 12px;
    padding: 12px 24px;
    font-family: 'Exo 2', sans-serif;
    font-size: 0.9rem;
    font-weight: 700;
    cursor: pointer;
    transition: background 0.2s;
}
.cot-btn-ir-catalogo:hover { background: #5895CE; }

/* Totales */
.cot-totales {
    display: flex;
    gap: 16px;
    justify-content: flex-end;
    margin-bottom: 24px;
    flex-wrap: wrap;
}
.cot-total-bloque {
    min-width: 220px;
    border-radius: 14px;
    overflow: hidden;
    border: 1.5px solid #eef0f4;
}
.cot-total-titulo {
    padding: 12px 16px;
    font-weight: 700;
    font-size: 0.9rem;
    display: flex;
    align-items: center;
    gap: 8px;
}
.cot-total-bloque.mxp .cot-total-titulo {
    background: #1F376D;
    color: #fff;
}
.cot-total-bloque.usd .cot-total-titulo {
    background: #27ae60;
    color: #fff;
}
.cot-total-fila {
    display: flex;
    justify-content: space-between;
    padding: 8px 16px;
    font-size: 0.85rem;
    border-bottom: 1px solid #eef0f4;
}
.cot-total-fila.total {
    font-weight: 800;
    font-size: 1rem;
    color: #1F376D;
    background: #f4f7f9;
    border-bottom: none;
}
.cot-total-bloque.usd .cot-total-fila.total { color: #27ae60; }

/* Notas */
.cot-notas {
    width: 100%;
    padding: 12px 14px;
    border: 1.5px solid #e0e6f0;
    border-radius: 12px;
    font-family: 'Exo 2', sans-serif;
    font-size: 0.88rem;
    outline: none;
    resize: vertical;
    transition: border-color 0.2s;
    box-sizing: border-box;
}
.cot-notas:focus { border-color: #5895CE; }

/* Botones finales */
.cot-botones {
    display: flex;
    justify-content: flex-end;
    gap: 12px;
    margin-top: 8px;
}
.cot-btn-limpiar {
    display: flex;
    align-items: center;
    gap: 8px;
    background: #fff;
    color: #e74c3c;
    border: 1.5px solid #e74c3c;
    border-radius: 12px;
    padding: 12px 22px;
    font-family: 'Exo 2', sans-serif;
    font-size: 0.9rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s;
}
.cot-btn-limpiar:hover {
    background: #e74c3c;
    color: #fff;
}
.cot-btn-borrador {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px 22px;
    border: 1.5px solid #1f6f59;
    border-radius: 12px;
    color: #1f6f59;
    background: #fff;
    font-family: 'Exo 2', sans-serif;
    font-size: 0.9rem;
    font-weight: 700;
    cursor: pointer;
}
.cot-btn-borrador:hover { color: #fff; background: #1f6f59; }
.cot-btn-borrador:disabled { opacity: .55; cursor: wait; }
.cot-btn-pdf {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    background: #1F376D;
    color: #fff;
    border: none;
    border-radius: 12px;
    padding: 12px 28px;
    font-family: 'Exo 2', sans-serif;
    font-size: 0.9rem;
    font-weight: 700;
    cursor: pointer;
    transition: background 0.2s;
    text-decoration: none;
}
.cot-btn-pdf:hover { background: #5895CE; }
.cot-btn-pdf-ready { background: #1f6f59; }
.cot-btn-pdf-ready:hover { background: #288b70; }

/* ── Responsive ─────────────────────────────────────────────── */
@media (max-width: 768px) {
    .catalogo-card,
    .cotizador-card  { padding: 20px 16px; }
    .cat-grid        { grid-template-columns: 1fr; }
    .cot-form-grid   { grid-template-columns: 1fr; }
    .cot-totales     { justify-content: stretch; }
    .cot-total-bloque{ min-width: 100%; }
    .cot-botones     { flex-direction: column; }
    .cot-btn-limpiar,
    .cot-btn-borrador,
    .cot-btn-pdf     { width: 100%; justify-content: center; }
    .cat-header-top  { flex-direction: column; align-items: flex-start; }
    .cot-tabla th,
    .cot-tabla td    { padding: 6px 4px; font-size: 0.7rem; }
}

/* Grid de 4 columnas para incluir el campo Altitud */
.cot-form-grid {
    grid-template-columns: repeat(4, 1fr) !important;
}
 
/* Campo requerido asterisco */
.cot-requerido {
    color: #e74c3c;
    font-size: 0.75rem;
    margin-left: 2px;
}
 
/* Mensaje de error debajo del input */
.cot-error-msg {
    font-size: 0.72rem;
    color: #e74c3c;
    font-weight: 600;
    min-height: 14px;
    display: block;
    margin-top: 2px;
}
 
/* Input con error */
.cot-input-error {
    border-color: #e74c3c !important;
    background: #fff8f8 !important;
}
.cot-input-error:focus {
    border-color: #e74c3c !important;
    box-shadow: 0 0 0 3px rgba(231, 76, 60, 0.12) !important;
}
 
/* ── Banner de error de validación ── */
.cot-error-banner {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    background: #fff2f2;
    border: 1.5px solid #e74c3c;
    border-left: 5px solid #e74c3c;
    border-radius: 8px;
    padding: 14px 16px;
    margin: 0 0 16px 0;
    animation: bannerEntrar 0.25s ease;
}
 
@keyframes bannerEntrar {
    from { opacity: 0; transform: translateY(-8px); }
    to   { opacity: 1; transform: translateY(0);    }
}
 
.cot-error-banner > i.fa-circle-exclamation {
    color: #e74c3c;
    font-size: 1.2rem;
    margin-top: 2px;
    flex-shrink: 0;
}
 
.cot-error-banner > div {
    flex: 1;
}
 
.cot-error-banner strong {
    display: block;
    color: #c0392b;
    font-size: 0.85rem;
    margin-bottom: 6px;
}
 
.cot-error-banner ul {
    margin: 0;
    padding-left: 18px;
    color: #c0392b;
    font-size: 0.82rem;
    line-height: 1.7;
}
 
.cot-error-cerrar {
    background: none;
    border: none;
    color: #e74c3c;
    cursor: pointer;
    font-size: 1rem;
    padding: 0 2px;
    flex-shrink: 0;
    opacity: 0.7;
    transition: opacity 0.2s;
}
 
.cot-error-cerrar:hover {
    opacity: 1;
}
@media (max-width: 768px) {
    .cot-form-grid {
        grid-template-columns: 1fr !important;
    }
}
 
/* ── Botón enviar por correo ── */
.cot-btn-email {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: linear-gradient(135deg, #27ae60, #2ecc71);
    color: #fff;
    border: none;
    border-radius: 8px;
    padding: 10px 22px;
    font-size: 0.9rem;
    font-weight: 700;
    font-family: 'Exo 2', sans-serif;
    cursor: pointer;
    transition: all 0.2s ease;
    box-shadow: 0 3px 10px rgba(39, 174, 96, 0.3);
}
 
.cot-btn-email:hover {
    background: linear-gradient(135deg, #219a52, #27ae60);
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(39, 174, 96, 0.4);
}
 
.cot-btn-email:disabled {
    opacity: 0.7;
    cursor: not-allowed;
    transform: none;
}
 
.cot-btn-email.enviado {
    background: linear-gradient(135deg, #1a7a42, #219a52);
}

/* Refuerzos responsive para modales, tablas y pantallas angostas */
@media (max-width: 820px) {
    #catalogo-overlay,
    #cotizador-overlay {
        padding: 12px;
    }

    .catalogo-card,
    .cotizador-card {
        width: min(100%, calc(100vw - 24px));
        margin: 0 auto;
        padding: 20px 16px;
        border-radius: 12px;
    }

    .cat-header-top,
    .cot-header {
        align-items: stretch;
        flex-direction: column;
    }

    .cat-titulo-bloque,
    .cot-titulo-bloque {
        width: 100%;
        min-width: 0;
        gap: 10px;
    }

    .cat-icon-wrap,
    .cot-icon-wrap {
        width: 44px;
        height: 44px;
        border-radius: 10px;
        font-size: 1.1rem;
    }

    .cat-header-sep,
    .cot-header-sep {
        height: 42px;
    }

    .cat-titulo,
    .cot-titulo {
        overflow-wrap: anywhere;
        font-size: 1.45rem;
        line-height: 1.12;
    }

    .cat-subtitulo,
    .cot-subtitulo {
        overflow-wrap: anywhere;
    }

    .cat-buscador-wrap,
    #cat-categoria,
    .cat-btn-cotizador,
    .cot-btn-catalogo {
        width: 100%;
        min-width: 0;
        justify-content: center;
    }

    .cot-seccion-titulo {
        align-items: flex-start;
        flex-wrap: wrap;
    }

    .cot-form-grid {
        width: 100%;
        min-width: 0;
        grid-template-columns: minmax(0, 1fr) !important;
    }

    .cot-field,
    .cot-field input,
    .cot-field select {
        width: 100%;
        min-width: 0;
    }

    .cot-num-productos {
        margin-left: 0;
    }

    .cot-tabla-wrap {
        overflow: visible;
        border: 0;
        border-radius: 0;
    }

    .cot-tabla,
    .cot-tabla thead,
    .cot-tabla tbody,
    .cot-tabla tr,
    .cot-tabla td {
        display: block;
        width: 100%;
    }

    .cot-tabla {
        border-collapse: separate;
    }

    .cot-tabla thead {
        display: none;
    }

    .cot-tabla tbody {
        display: grid;
        gap: 12px;
    }

    .cot-tabla tr {
        overflow: hidden;
        border: 1.5px solid #eef0f4;
        border-radius: 12px;
        background: #fff;
        box-shadow: 0 4px 16px rgba(31, 55, 109, 0.08);
    }

    .cot-tabla td {
        display: grid;
        grid-template-columns: minmax(90px, 38%) minmax(0, 1fr);
        align-items: center;
        gap: 10px;
        padding: 10px 12px;
        border-bottom: 1px solid #eef0f4;
        text-align: right;
        overflow-wrap: anywhere;
    }

    .cot-tabla td::before {
        content: attr(data-label);
        color: #1F376D;
        font-weight: 800;
        text-align: left;
    }

    .cot-tabla td:last-child {
        border-bottom: 0;
    }

    .cot-td-nombre {
        max-width: none;
        text-align: right !important;
    }

    .cot-moneda-btns,
    .cot-cant-ctrl {
        justify-content: flex-end;
    }

    .cot-btn-eliminar {
        margin: 0 0 0 auto;
    }

    .cot-turnstile-wrap {
        justify-content: center;
        overflow: hidden;
    }

    .cot-turnstile-wrap > div {
        transform: scale(0.9);
        transform-origin: top center;
    }

    .cot-toast {
        width: calc(100vw - 32px);
        max-width: 340px;
        white-space: normal;
        text-align: center;
    }
}

@media (max-width: 360px) {
    .catalogo-card,
    .cotizador-card {
        padding: 18px 14px;
    }

    .cat-icon-wrap,
    .cot-icon-wrap,
    .cat-header-sep,
    .cot-header-sep {
        display: none;
    }

    .cot-tabla td {
        grid-template-columns: 1fr;
        text-align: left;
    }

    .cot-moneda-btns,
    .cot-cant-ctrl {
        justify-content: flex-start;
    }

    .cot-btn-eliminar {
        margin-left: 0;
    }

    .cot-turnstile-wrap > div {
        transform: scale(0.82);
    }
}

/* Catalogos administrativos de materiales y mano de obra */
.cat-tabs {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 6px;
    margin: 20px 0 14px;
    padding: 5px;
    border: 1px solid #dbe5f0;
    border-radius: 7px;
    background: #f4f7fb;
}

.cat-tab {
    min-height: 42px;
    border: 0;
    border-radius: 5px;
    color: #526172;
    background: transparent;
    font: inherit;
    font-weight: 700;
    cursor: pointer;
}

.cat-tab i { margin-right: 7px; }
.cat-tab:hover { color: #1f376d; background: #e8f1fa; }
.cat-tab.activo { color: #fff; background: #1f376d; box-shadow: 0 3px 10px rgba(31, 55, 109, .18); }

.cat-btn-nuevo {
    min-height: 42px;
    padding: 0 16px;
    border: 0;
    border-radius: 6px;
    color: #fff;
    background: #1f376d;
    font: inherit;
    font-weight: 800;
    white-space: nowrap;
    cursor: pointer;
}

.cat-btn-nuevo[hidden] { display: none; }
.cat-btn-nuevo:hover { background: #2b4d8c; }
.cat-concept-card { min-height: 250px; }
.cat-concept-description {
    display: -webkit-box;
    overflow: hidden;
    margin: 8px 0 12px;
    color: #687585;
    font-size: .82rem;
    line-height: 1.45;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 3;
}

.cot-admin-concept { min-width: 260px; }
.cot-admin-concept > strong,
.cot-admin-concept > span,
.cot-internal-price { display: block; }
.cot-admin-concept > span { margin-top: 4px; color: #687585; font-size: .78rem; line-height: 1.35; }
.cot-internal-price { margin-top: 7px; color: #7a5c19; font-size: .72rem; }

.cot-item-type {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 5px 8px;
    border-radius: 5px;
    font-size: .74rem;
    font-weight: 800;
    white-space: nowrap;
}

.cot-item-producto { color: #1f5b93; background: #e8f2fb; }
.cot-item-material { color: #17603b; background: #e5f5ec; }
.cot-item-mano_obra { color: #80560b; background: #fff2d6; }

.cot-number-input {
    width: 100px;
    min-height: 36px;
    padding: 6px 8px;
    border: 1px solid #cbd8e6;
    border-radius: 5px;
    color: #1f376d;
    background: #fff;
    font: inherit;
    font-weight: 700;
}

.cot-price-edit { display: flex; align-items: center; gap: 6px; }
.cot-price-edit > span { color: #697788; font-size: .72rem; font-weight: 800; }

@media (max-width: 768px) {
    .cat-tabs { grid-template-columns: 1fr; }
    .cat-tab { text-align: left; padding: 0 14px; }
    .cat-btn-nuevo { width: 100%; }
    .cot-admin-concept { min-width: 0; }
    .cot-number-input { width: min(100%, 160px); margin-left: auto; }
    .cot-price-edit { justify-content: flex-end; }
}

@media (max-width: 360px) {
    .cot-number-input { margin-left: 0; }
    .cot-price-edit { justify-content: flex-start; }
}
