/* CatalogoPRO — buscador compacto para header (solo móvil)
   Estilo alineado con el buscador grande (Vico) */

/* Oculto por defecto (desktop) */
.catpro-hdr { display: none; }

/* Visible solo en móvil */
@media (max-width: 1024px) {
    .catpro-hdr {
        display: block;
        position: relative;
        width: 100%;
        max-width: 100%;
        box-sizing: border-box;
        font-family: inherit;
    }
}

/* Barra — mismo lenguaje que el grande (borde 2px, radius 16, sombra suave) */
.catpro-hdr-box {
    position: relative;
    display: flex;
    align-items: center;
    gap: 10px;
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    padding: 3px 16px;
    transition: border-color .2s, box-shadow .2s;
    box-shadow: 0 2px 8px rgba(0,0,0,.04);
}
.catpro-hdr-box:focus-within {
    border-color: var(--catpro-color, #F28F22);
    box-shadow: 0 0 0 4px rgba(242,143,34,.12);
}

.catpro-hdr-icon {
    color: #9ca3af;
    flex-shrink: 0;
}

/* Input — forzado sin estilos del tema, igual que el grande */
.catpro-hdr-input,
input.catpro-hdr-input[type="text"] {
    flex: 1 !important;
    border: none !important;
    outline: none !important;
    box-shadow: none !important;
    background: transparent !important;
    padding: 7px 0 !important;
    margin: 0 !important;
    font-size: 15px !important;
    font-weight: 600 !important;
    line-height: 1.4 !important;
    color: #111827 !important;
    width: auto !important;
    height: auto !important;
    min-height: 0 !important;
    border-radius: 0 !important;
    -webkit-appearance: none !important;
    appearance: none !important;
}
.catpro-hdr-input:focus {
    border: none !important;
    outline: none !important;
    box-shadow: none !important;
    background: transparent !important;
}
.catpro-hdr-input::placeholder {
    color: #6b7280 !important;
    opacity: 1;
    font-weight: 600 !important;
    font-size: 15px !important;
}

/* Resultados desplegables */
.catpro-hdr-results {
    display: none;
    position: absolute;
    top: calc(100% + 10px);
    left: 0;
    right: 0;
    background: transparent;
    max-height: 70vh;
    overflow-y: auto;
    z-index: 99999;
    -webkit-overflow-scrolling: touch;
    display: none;
    flex-direction: column;
    gap: 12px;
}
.catpro-hdr-results.open { display: flex; }

/* Card — mismo lenguaje que el grande (imagen con fondo gris + padding,
   nombre negro, código monospace, borde naranja al tocar) */
.catpro-hdr-item {
    display: flex;
    align-items: stretch;
    gap: 0;
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 16px;
    overflow: hidden;
    text-decoration: none;
    color: inherit;
    box-shadow: 0 1px 3px rgba(0,0,0,.05);
    transition: border-color .15s, box-shadow .15s;
}
.catpro-hdr-item:active {
    border-color: var(--catpro-color, #F28F22);
    box-shadow: 0 8px 20px rgba(0,0,0,.1);
}

.catpro-hdr-item-img {
    width: 90px;
    min-width: 90px;
    background: #f9fafb;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    padding: 10px;
    box-sizing: border-box;
}
.catpro-hdr-item-img img {
    max-width: 100%;
    max-height: 70px;
    object-fit: contain;
}
.catpro-hdr-item-noimg {
    width: 90px; min-width: 90px;
    background: #f9fafb;
    display: flex; align-items: center; justify-content: center;
    color: #d1d5db; font-size: 20px;
}

.catpro-hdr-item-txt {
    padding: 14px 16px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    min-width: 0;
    flex: 1;
}
.catpro-hdr-item-nombre {
    font-size: 15px;
    font-weight: 700;
    color: #111827;
    line-height: 1.3;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.catpro-hdr-item-codigo {
    font-size: 12px;
    font-weight: 600;
    color: #9ca3af;
    font-family: ui-monospace, monospace;
    margin-top: 6px;
}

.catpro-hdr-msg {
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 16px;
    padding: 18px 14px;
    text-align: center;
    color: #6b7280;
    font-size: 14px;
    box-shadow: 0 1px 3px rgba(0,0,0,.05);
}
