/**
 * Ozado V2 - Header rediseñado (v3)
 *
 * Breakpoints del proyecto:
 *   Móvil:     0 – 479px   →  Logo + Hamburguesa (buscador via modal lupa)
 *   Tablet:    480 – 1023px →  Logo + Buscador + Hamburguesa
 *   Laptop:    1024 – 1365px → Header completo (menú compacto)
 *   Ordenador: ≥ 1366px      → Header completo cómodo
 *
 * Sobrescribe reglas viejas del tema con !important y selectores con alta
 * especificidad (html body #masthead.ozado-header …).
 */

/* =========================================================================
 * TOP BAR
 * ========================================================================= */
.ozado-topbar {
    background: #014a6d;
    color: #ffffff;
    font-size: 0.85rem;
    padding: 8px 0;
}
.ozado-topbar a {
    color: #ffffff;
    text-decoration: none;
}
.ozado-topbar a:hover { color: #ffffff; opacity: 0.85; }
.ozado-topbar__row {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    align-items: center;
    gap: 24px;
}
.ozado-topbar__item,
.ozado-topbar__item .widget,
.ozado-topbar__item .widget_text,
.ozado-topbar__item .textwidget,
.ozado-topbar__item p {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin: 0;
    padding: 0;
}
.ozado-topbar__item img,
.ozado-topbar__item svg {
    width: 16px;
    height: 16px;
    flex: 0 0 auto;
}
@media (max-width: 1023.98px) {
    .ozado-topbar { font-size: 0.78rem; padding: 6px 0; }
    .ozado-topbar__row { gap: 14px; }
}
@media (max-width: 479.98px) {
    .ozado-topbar { font-size: 0.7rem; padding: 6px 0; }
    .ozado-topbar__row {
        flex-direction: column;
        gap: 4px;
    }
}

/* =========================================================================
 * RESET reglas viejas del tema (custom.css/mobile.css)
 * ========================================================================= */
html body #masthead.ozado-header {
    background: #ffffff !important;
    padding: 14px 0 !important;
    border-bottom: 1px solid #eef1f4 !important;
    box-shadow: 0 1px 3px rgba(16, 24, 40, 0.04) !important;
    overflow: visible !important;
}
html body #masthead.ozado-header .custom-logo-link {
    background: transparent !important;
    width: auto !important;
    position: static !important;
    top: auto !important;
    left: auto !important;
    z-index: auto !important;
    padding: 0 !important;
    border-radius: 0 !important;
    box-shadow: none !important;
    display: inline-block !important;
}
html body #masthead.ozado-header a {
    color: inherit;
}
html body #masthead.ozado-header .main-navigation a {
    margin-left: 0 !important;
}
html body #masthead.ozado-header .btn-menu {
    border: 0 !important;
    background: transparent !important;
    padding: 6px 8px !important;
}
html body #masthead.ozado-header .btn-menu .widget { margin: 0 !important; }
html body #masthead.ozado-header > .container { max-width: 1320px !important; }

/* =========================================================================
 * LAYOUT default: ORDENADOR (≥1366) — 4 columnas grid
 * ========================================================================= */
html body #masthead.ozado-header .ozado-header__row {
    display: grid !important;
    grid-template-columns: 200px minmax(280px, 1fr) auto auto !important;
    grid-template-areas: "brand search nav cta" !important;
    column-gap: 24px !important;
    align-items: center !important;
    width: 100% !important;
}
html body #masthead.ozado-header .ozado-header__brand   { grid-area: brand;  min-width: 0; display: flex !important; }
html body #masthead.ozado-header .ozado-header__search  { grid-area: search; min-width: 0; display: block !important; }
html body #masthead.ozado-header .ozado-header__nav     { grid-area: nav;    min-width: 0; display: flex !important; }
html body #masthead.ozado-header .ozado-header__cta     { grid-area: cta;    display: inline-flex !important; }
html body #masthead.ozado-header .ozado-header__mobile  { display: none !important; }

/* =========================================================================
 * TABLET + LAPTOP (480-1365): Logo + Buscador + Hamburguesa
 * El menú horizontal y el botón cotización se acceden por la hamburguesa.
 * El menú horizontal completo solo aparece en ORDENADOR (≥1366).
 * ========================================================================= */
@media (min-width: 480px) and (max-width: 1365.98px) {
    html body #masthead.ozado-header .ozado-header__row {
        grid-template-columns: auto minmax(0, 1fr) auto !important;
        grid-template-areas: "brand search mobile" !important;
        column-gap: 16px !important;
    }
    html body #masthead.ozado-header .ozado-header__nav    { display: none !important; visibility: hidden !important; }
    html body #masthead.ozado-header .ozado-header__cta    { display: none !important; visibility: hidden !important; }
    html body #masthead.ozado-header .ozado-header__brand  { grid-area: brand; }
    html body #masthead.ozado-header .ozado-header__search { grid-area: search; display: block !important; max-width: 480px; }
    html body #masthead.ozado-header .ozado-header__mobile {
        grid-area: mobile;
        display: flex !important;
        gap: 6px;
        align-items: center;
    }
}

/* =========================================================================
 * MÓVIL (< 480): Logo + Hamburguesa (buscador por modal con lupa)
 * Nav, CTA y buscador desktop ocultos.
 * ========================================================================= */
@media (max-width: 479.98px) {
    html body #masthead.ozado-header { padding: 10px 0 !important; }
    html body #masthead.ozado-header .ozado-header__row {
        grid-template-columns: auto auto !important;
        grid-template-areas: "brand mobile" !important;
        column-gap: 8px !important;
        justify-content: space-between !important;
    }
    html body #masthead.ozado-header .ozado-header__search { display: none !important; visibility: hidden !important; }
    html body #masthead.ozado-header .ozado-header__nav    { display: none !important; visibility: hidden !important; }
    html body #masthead.ozado-header .ozado-header__cta    { display: none !important; visibility: hidden !important; }
    html body #masthead.ozado-header .ozado-header__brand  { grid-area: brand; }
    html body #masthead.ozado-header .ozado-header__mobile {
        grid-area: mobile;
        display: flex !important;
        gap: 4px;
        align-items: center;
    }
}

/* =========================================================================
 * LOGO
 * ========================================================================= */
html body #masthead.ozado-header .ozado-header__brand {
    flex-direction: column;
    justify-content: center;
    max-width: 220px;
}
html body #masthead.ozado-header .ozado-header__brand .custom-logo-link img,
html body #masthead.ozado-header .ozado-header__brand .custom-logo {
    max-width: 100% !important;
    max-height: 56px !important;
    width: auto !important;
    height: auto !important;
    display: block !important;
}
html body #masthead.ozado-header .ozado-header__brand .site-title {
    position: absolute !important;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
}
html body #masthead.ozado-header .ozado-header__brand .site-description {
    font-size: 0.7rem;
    color: #475569;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin: 4px 0 0;
    line-height: 1.2;
}
@media (max-width: 1023.98px) {
    html body #masthead.ozado-header .ozado-header__brand .custom-logo-link img,
    html body #masthead.ozado-header .ozado-header__brand .custom-logo {
        max-height: 44px !important;
    }
    html body #masthead.ozado-header .ozado-header__brand .site-description { display: none !important; }
}

/* =========================================================================
 * BUSCADOR
 * ========================================================================= */
html body #masthead.ozado-header .ozado-header__search {
    position: relative;
    overflow: visible !important;
}
html body #masthead.ozado-header .asl_w,
html body #masthead.ozado-header .asl_w.ozado-asl {
    width: 100% !important;
    max-width: 100% !important;
}
html body #masthead.ozado-header .probox,
html body #masthead.ozado-header div.asl_w .probox,
html body #search-mobile .probox,
html body #search-mobile div.asl_w .probox {
    background: #f4f6f8 !important;
    border: 1px solid #e2e6ea !important;
    border-radius: 999px !important;
    padding: 0 16px !important;
    height: 44px !important;
    width: 100% !important;
    max-width: 100% !important;
    box-shadow: none !important;
    display: flex !important;
    align-items: center !important;
    box-sizing: border-box !important;
    overflow: hidden !important;
}
html body #masthead.ozado-header div.asl_w .probox:focus-within,
html body #search-mobile div.asl_w .probox:focus-within {
    border-color: var(--theme-color-1, #005b77) !important;
    background: #ffffff !important;
    box-shadow: 0 0 0 3px rgba(0, 91, 119, 0.10) !important;
}
html body #masthead.ozado-header div.asl_w .probox .proinput,
html body #search-mobile div.asl_w .probox .proinput {
    flex: 1 1 0 !important;
    width: 100% !important;
    min-width: 0 !important;
    max-width: 100% !important;
    margin: 0 !important;
    padding: 0 !important;
    order: 5 !important;
    height: 100% !important;
    overflow: hidden !important;
    box-sizing: border-box !important;
}
html body #masthead.ozado-header div.asl_w .probox .proinput form,
html body #search-mobile div.asl_w .probox .proinput form {
    width: 100% !important;
    height: 100% !important;
    margin: 0 !important;
    padding: 0 !important;
    display: flex !important;
    align-items: center !important;
    position: relative !important;
    box-sizing: border-box !important;
}
html body #masthead.ozado-header div.asl_w .probox .proinput input.orig,
html body #masthead.ozado-header div.asl_w .probox .proinput input[name="phrase"],
html body #masthead.ozado-header div.asl_w .probox .proinput input[type="search"],
html body #search-mobile div.asl_w .probox .proinput input.orig {
    width: 100% !important;
    min-width: 100% !important;
    max-width: 100% !important;
    flex: 1 1 100% !important;
    height: 100% !important;
    background: transparent !important;
    border: 0 !important;
    box-shadow: none !important;
    color: #1f2937 !important;
    font-size: 0.95rem !important;
    padding: 0 !important;
    margin: 0 !important;
    outline: 0 !important;
    box-sizing: border-box !important;
    appearance: none !important;
    -webkit-appearance: none !important;
}
html body #masthead.ozado-header div.asl_w .probox .proinput input::placeholder,
html body #search-mobile div.asl_w .probox .proinput input::placeholder {
    color: #94a3b8 !important;
    opacity: 1 !important;
}
html body #masthead.ozado-header div.asl_w .probox .proinput input.autocomplete,
html body #masthead.ozado-header div.asl_w .probox .proinput input[type="submit"],
html body #search-mobile div.asl_w .probox .proinput input.autocomplete,
html body #search-mobile div.asl_w .probox .proinput input[type="submit"] {
    position: absolute !important;
    width: 100% !important;
    height: 100% !important;
    top: 0 !important;
    left: 0 !important;
    z-index: 0 !important;
    pointer-events: none !important;
    opacity: 0 !important;
}
html body #masthead.ozado-header div.asl_w .probox .promagnifier,
html body #search-mobile div.asl_w .probox .promagnifier {
    order: 0 !important;
    flex: 0 0 22px !important;
    width: 22px !important;
    height: 22px !important;
    margin-right: 10px !important;
    background: transparent !important;
    border: 0 !important;
    padding: 0 !important;
    cursor: pointer;
}
html body #masthead.ozado-header div.asl_w .probox .promagnifier .innericon,
html body #search-mobile div.asl_w .probox .promagnifier .innericon {
    width: 100% !important;
    height: 100% !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
}
html body #masthead.ozado-header div.asl_w .probox .promagnifier .innericon svg,
html body #search-mobile div.asl_w .probox .promagnifier .innericon svg {
    display: inline-block !important;
    fill: #6b7280 !important;
    width: 18px !important;
    height: 18px !important;
}
html body #masthead.ozado-header div.asl_w .probox .promagnifier .innericon:after,
html body #search-mobile div.asl_w .probox .promagnifier .innericon:after {
    display: none !important;
}
html body #masthead.ozado-header div.asl_w .probox .prosettings,
html body #search-mobile div.asl_w .probox .prosettings {
    display: none !important;
}

/* =========================================================================
 * MENÚ HORIZONTAL
 * ========================================================================= */
html body #masthead.ozado-header .ozado-header__nav {
    align-items: center;
    justify-content: flex-start;
}
html body #masthead.ozado-header ul.ozado-menu {
    display: flex !important;
    align-items: center;
    gap: 22px !important;
    list-style: none !important;
    margin: 0 !important;
    padding: 0 !important;
}
html body #masthead.ozado-header ul.ozado-menu > li {
    position: relative;
    margin: 0 !important;
    padding: 0 !important;
    list-style: none !important;
}
html body #masthead.ozado-header ul.ozado-menu > li > a {
    display: inline-block !important;
    padding: 8px 0 !important;
    color: #1f2937 !important;
    font-size: 0.95rem !important;
    font-weight: 500 !important;
    text-decoration: none !important;
    border-bottom: 2px solid transparent !important;
    margin: 0 !important;
    white-space: nowrap;
    transition: color 0.15s ease, border-color 0.15s ease;
}
html body #masthead.ozado-header ul.ozado-menu > li > a:hover,
html body #masthead.ozado-header ul.ozado-menu > li.current-menu-item > a,
html body #masthead.ozado-header ul.ozado-menu > li.current_page_item > a,
html body #masthead.ozado-header ul.ozado-menu > li.current-menu-ancestor > a {
    color: var(--theme-color-1, #005b77) !important;
    border-bottom-color: var(--theme-color-1, #005b77) !important;
}
html body #masthead.ozado-header ul.ozado-menu > li.menu-item-has-children > a::after {
    content: "";
    display: inline-block;
    margin-left: 6px;
    border: 4px solid transparent;
    border-top-color: currentColor;
    vertical-align: middle;
    transform: translateY(2px);
}
html body #masthead.ozado-header ul.ozado-menu .sub-menu {
    position: absolute;
    top: 100%;
    left: 0;
    min-width: 220px;
    list-style: none;
    margin: 0;
    padding: 8px 0;
    background: #ffffff;
    border: 1px solid #eef1f4;
    border-radius: 10px;
    box-shadow: 0 8px 24px rgba(16, 24, 40, 0.10);
    opacity: 0;
    visibility: hidden;
    transform: translateY(6px);
    transition: opacity 0.15s ease, transform 0.15s ease, visibility 0.15s;
    z-index: 1000;
}
html body #masthead.ozado-header ul.ozado-menu > li:hover > .sub-menu,
html body #masthead.ozado-header ul.ozado-menu > li:focus-within > .sub-menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}
html body #masthead.ozado-header ul.ozado-menu .sub-menu li a {
    display: block;
    padding: 8px 16px;
    color: #1f2937;
    font-size: 0.92rem;
    text-decoration: none;
}
html body #masthead.ozado-header ul.ozado-menu .sub-menu li a:hover {
    background: #f4f6f8;
    color: var(--theme-color-1, #005b77);
}

/* =========================================================================
 * BOTÓN COTIZACIÓN
 * ========================================================================= */
html body #masthead.ozado-header .ozado-header__cta {
    align-items: center;
    gap: 8px;
    background: #f97316 !important;
    color: #ffffff !important;
    padding: 10px 18px !important;
    border-radius: 999px !important;
    font-size: 0.9rem !important;
    font-weight: 600 !important;
    text-decoration: none !important;
    white-space: nowrap;
    box-shadow: 0 2px 6px rgba(249, 115, 22, 0.30) !important;
    transition: background 0.15s ease, transform 0.15s ease;
}
html body #masthead.ozado-header .ozado-header__cta:hover,
html body #masthead.ozado-header .ozado-header__cta:focus {
    background: #ea580c !important;
    color: #ffffff !important;
    text-decoration: none !important;
    transform: translateY(-1px);
}
html body #masthead.ozado-header .ozado-header__cta-icon { flex: 0 0 auto; }

/* =========================================================================
 * BOTONES HAMBURGUESA (móvil/tablet/laptop)
 * ========================================================================= */
html body #masthead.ozado-header .ozado-header__mobile .btn-menu img {
    width: 26px;
    height: 26px;
}
/* Botones con ícono SVG fijo: lupa + hamburguesa. */
html body #masthead.ozado-header .ozado-header__mobile .ozado-burger-btn {
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
    width: 42px;
    height: 42px;
    padding: 0 !important;
    margin: 0;
    background: transparent !important;
    border: 1px solid #e2e6ea !important;
    border-radius: 10px !important;
    color: var(--theme-color-1, #005b77) !important;
    cursor: pointer;
    transition: background 0.15s ease, border-color 0.15s ease;
    -webkit-tap-highlight-color: transparent;
}
html body #masthead.ozado-header .ozado-header__mobile .ozado-burger-btn:hover,
html body #masthead.ozado-header .ozado-header__mobile .ozado-burger-btn:focus {
    background: #f4f6f8 !important;
    border-color: var(--theme-color-1, #005b77) !important;
    outline: 0;
}
html body #masthead.ozado-header .ozado-header__mobile .ozado-burger-btn svg {
    display: block;
    stroke: currentColor;
}
/* El botón lupa SOLO se muestra en móvil (<480). En tablet/laptop el
   buscador ya está visible, así que la lupa sobra. */
html body #masthead.ozado-header .ozado-header__mobile .ozado-burger-btn--search {
    display: none !important;
}
@media (max-width: 479.98px) {
    html body #masthead.ozado-header .ozado-header__mobile .ozado-burger-btn--search {
        display: inline-flex !important;
    }
}
