/* Mi encabezado del sitio: uno solo para la portada y para las páginas de contenido.

   Va aparte de los dos CSS que ya hay (el de la tienda y el del sitio de referencia) porque
   ninguno de los dos está cargado en todas las páginas, y así el encabezado se ve exactamente
   igual en todas. El color de acento sale de mi color primario de la tienda (--enc-primario y
   --enc-oscuro se los paso desde la vista). */

@font-face {
    font-family: 'Encabezado';
    src: url('../fonts/nosotros/Montserrat-Regular-Cyjg2l_H.woff2') format('woff2');
    font-weight: 400;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'Encabezado';
    src: url('../fonts/nosotros/Montserrat-Bold-wxX70Ed7.woff2') format('woff2');
    font-weight: 700;
    font-style: normal;
    font-display: swap;
}

.enc-cabecera {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 90;
    background: #ffffff;
    color: #252525;
    font-family: 'Encabezado', ui-sans-serif, system-ui, sans-serif;
    font-size: 13px;
}

/* Aviso de arriba (envío gratis): solo lo lleva la portada. */
.enc-franja {
    background: var(--enc-primario, #252525);
    color: #ffffff;
    padding: 11px 18px;
    text-align: center;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.03em;
}

.enc-barra {
    display: flex;
    align-items: center;
    gap: 18px;
    width: 100%;
    max-width: 1320px;
    min-height: 68px;
    margin: 0 auto;
    padding: 0 20px;
    border-bottom: 1px solid #ececec;
}

.enc-marca {
    display: flex;
    align-items: center;
    flex-shrink: 0;
    color: #252525;
    text-decoration: none;
}

.enc-marca img {
    display: block;
    height: 42px;
    width: auto;
    max-width: 190px;
    object-fit: contain;
}

.enc-marca span {
    font-size: 20px;
    font-weight: 700;
    letter-spacing: -0.01em;
}

.enc-buscador {
    display: flex;
    align-items: center;
    gap: 9px;
    flex: 0 1 300px;
    padding: 10px 16px;
    border: 1px solid #e8e8e8;
    border-radius: 999px;
    background: #fafafa;
    color: #8b8b8b;
    font-size: 13px;
    text-decoration: none;
}

.enc-buscador input {
    width: 100%;
    border: 0;
    background: transparent;
    outline: none;
    color: #252525;
    font: inherit;
}

.enc-menu {
    display: flex;
    align-items: center;
    gap: 24px;
    margin-left: auto;
}

.enc-menu a {
    position: relative;
    padding: 4px 0;
    color: #252525;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    text-decoration: none;
    white-space: nowrap;
}

.enc-menu a:hover {
    color: var(--enc-oscuro, #252525);
}

.enc-menu a.enc-activo::after {
    content: '';
    position: absolute;
    left: 0;
    right: 0;
    bottom: -2px;
    height: 2px;
    background: #252525;
}

.enc-acciones {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-left: auto;
}

.enc-icono {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 42px;
    height: 42px;
    padding: 0;
    border: 1px solid #ececec;
    border-radius: 999px;
    background: #ffffff;
    color: #252525;
    cursor: pointer;
    text-decoration: none;
}

.enc-icono:hover {
    background: #f7f7f7;
    color: var(--enc-oscuro, #252525);
}

.enc-contador {
    position: absolute;
    top: -5px;
    right: -3px;
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 19px;
    height: 19px;
    padding: 0 5px;
    border-radius: 999px;
    background: var(--enc-primario, #252525);
    color: #ffffff;
    font-size: 11px;
    font-weight: 700;
}

.enc-hamburguesa {
    display: none;
}

.enc-barras {
    display: block;
    position: relative;
    width: 18px;
    height: 12px;
}

.enc-barras i {
    position: absolute;
    left: 0;
    width: 100%;
    height: 2px;
    background: currentColor;
}

.enc-barras i:nth-child(1) { top: 0; }
.enc-barras i:nth-child(2) { top: 5px; }
.enc-barras i:nth-child(3) { top: 10px; }

/* Menú desplegable del móvil */
.enc-desplegable {
    max-height: 0;
    overflow: hidden;
    background: #ffffff;
    transition: max-height 0.35s ease;
}

.enc-desplegable.enc-abierto {
    max-height: 80vh;
    overflow-y: auto;
    border-bottom: 1px solid #ececec;
}

.enc-desplegable a.enc-enlace {
    display: block;
    padding: 16px 20px;
    border-top: 1px solid #f2f2f2;
    color: #252525;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    text-decoration: none;
}

.enc-desplegable a.enc-enlace:hover {
    background: #fafafa;
}

.enc-desplegable a.enc-enlace.enc-activo {
    color: var(--enc-oscuro, #252525);
}

.enc-atajos {
    display: flex;
    flex-direction: column;
    gap: 10px;
    padding: 16px 20px 22px;
}

.enc-atajo {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    padding: 13px 16px;
    border: 1px solid #ececec;
    border-radius: 12px;
    background: #ffffff;
    color: #252525;
    font-family: inherit;
    font-size: 13px;
    font-weight: 700;
    text-decoration: none;
    cursor: pointer;
}

.enc-atajo:hover {
    border-color: var(--enc-primario, #ececec);
}

/* El hueco que deja el encabezado fijo: lo mide el script de la vista. */
.enc-espacio {
    height: 68px;
}

@media (min-width: 1200px) {
    .enc-menu + .enc-acciones {
        margin-left: 0;
    }

    .enc-hamburguesa {
        display: none;
    }

    .enc-desplegable {
        display: none;
    }
}

@media (max-width: 1199px) {
    .enc-menu {
        display: none;
    }

    .enc-acciones {
        margin-left: auto;
    }

    .enc-hamburguesa {
        display: inline-flex;
    }
}

@media (max-width: 1023px) {
    .enc-buscador {
        display: none;
    }

    .enc-marca img {
        height: 36px;
        max-width: 160px;
    }

    .enc-barra {
        min-height: 60px;
        gap: 12px;
    }

    .enc-espacio {
        height: 60px;
    }
}
