/* ============================= */
/* HEADER HERRAMIN - custom.css  */
/* ============================= */

/* Contenedor principal: permitir dos filas (logo+buscador+iconos / navegación) */
#html-body #header .container {
    flex-wrap: wrap !important;
    align-items: center !important;
}

/* Logo más pequeño */
#header .container a[aria-label="Go to Home page"] img {
    max-width: 120px !important;
    height: auto !important;
}

/* Buscador siempre visible al centro (custom.js lo mueve dentro del container) */
#header .container > #search-content {
    display: block !important;
    position: static !important;
    order: 1;
    flex: 1 1 auto;
    width: auto !important;
    max-width: 620px;
    margin: 0 32px;
    border: 0 !important;
    box-shadow: none !important;
    background: transparent !important;
}

/* Quitar padding/centrado del contenedor interno del buscador */
#header #search-content > .container {
    padding: 0 !important;
    margin: 0 !important;
    max-width: none !important;
}

/* Ocultar atajo Ctrl+K */
#header #search-content kbd {
    display: none !important;
}

/* Input del buscador */
#header #search-content input#search {
    border: 1px solid #d1d5db !important;
    border-right: 0 !important;
    border-radius: 4px 0 0 4px !important;
    height: 44px !important;
    font-size: 14px !important;
    box-shadow: none !important;
}

/* Botón Buscar (el texto lo pone custom.js) */
#header #search-content button[type="submit"] {
    background-color: #1890CA !important;
    border: 1px solid #1890CA !important;
    color: #ffffff !important;
    font-size: 14px !important;
    font-weight: 600 !important;
    padding: 0 28px !important;
    height: 44px !important;
    border-radius: 0 4px 4px 0 !important;
}

#header #search-content button[type="submit"]:hover {
    background-color: #147aab !important;
    border-color: #147aab !important;
}

/* Ocultar lupa toggle y comparador */
#header #menu-search-icon,
#header #compare-link {
    display: none !important;
}

/* Iconos de la derecha */
#header .container > div.flex.items-center {
    order: 2;
    gap: 16px !important;
}

/* Ocultar el botón de cuenta con dropdown original */
#header div:has(> #customer-menu) {
    display: none !important;
}

/* Enlaces directos de cuenta (los crea custom.js) */
#header-account-links {
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

#header-account-links .account-icon {
    display: inline-flex;
    color: #1a1a1a;
}

#header-account-links .header-login-text {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    text-align: left;
    line-height: 1.25;
}

#header-account-links .login-line {
    font-size: 13px;
    font-weight: 600;
    color: #1890CA;
    text-decoration: none;
}

#header-account-links .login-line:hover {
    text-decoration: underline;
}

#header-account-links .register-line {
    font-size: 12px;
    color: #9ca3af;
    text-decoration: none;
}

#header-account-links .register-line:hover {
    color: #666666;
}

/* Navegación: fila completa debajo, con línea separadora */
#header .container > .navigation {
    order: 3;
    width: 100% !important;
    border-top: 1px solid #ececec;
    margin-top: 10px;
}

#header .container > .navigation > div {
    padding-left: 0 !important;
    padding-right: 0 !important;
    width: 100% !important;
}

#header .navigation nav ul {
    padding-top: 14px !important;
    padding-bottom: 14px !important;
    gap: 36px !important;
    justify-content: center !important;
}

#header .navigation nav a.level-0 {
    text-transform: uppercase !important;
    font-size: 14px !important;
    font-weight: 500 !important;
    color: #1a1a1a !important;
    padding: 0 !important;
}

#header .navigation nav a.level-0:hover {
    color: #1890CA !important;
}

/* Visibilidad Header: Desktop vs Mobile */
@media (min-width: 1024px) {
    #header [x-data="initMobileMenu"],
    #header .lg\:hidden {
        display: none !important;
    }

    #header .navigation,
    #header [x-data="initMenuDesktop"] {
        display: block !important;
    }

    #header .navigation > div,
    #header .navigation nav {
        display: flex !important;
    }

    #header .container > #search-content {
        order: 1;
        flex: 1 1 auto;
        max-width: 620px;
        margin: 0 32px;
    }
}

@media (max-width: 1023px) {
    #header .navigation,
    #header [x-data="initMenuDesktop"] {
        display: none !important;
    }

    #header [x-data="initMobileMenu"] {
        display: block !important;
    }

    #header .container > #search-content {
        order: 4;
        flex: 1 1 100%;
        max-width: none;
        margin: 10px 0 4px 0;
    }
}

