/* ==========================================================================
   MÓDULO: CABECERA PERSONALIZADA AZUL ZEBRIONIX (#26ADEB) - VERSIÓN FINAL
   ========================================================================== */

/* --- Bloquear elementos nativos de Astra --- */
.ast-main-header-wrap,
.ast-primary-header-bar,
.ast-above-header-bar,
.ast-below-header-bar,
.site-header .ast-builder-menu,
.ast-mobile-header-wrap {
    display: none !important;
}

/* --- Contenedor Principal de la Cabecera (Fijo) --- */
.custom-temu-header {
    background-color: #26ADEB !important;
    width: 100%;
    padding: 8px 0;
    box-shadow: 0 4px 12px rgba(0,0,0,0.12);
    position: fixed;
    top: 0;
    left: 0;
    z-index: 9999;
}

/* Ajuste automático cuando estás logueado en WordPress (Barra Admin) */
body.admin-bar .custom-temu-header {
    top: 32px !important;
}
@media screen and (max-width: 782px) {
    body.admin-bar .custom-temu-header {
        top: 46px !important;
    }
}

.custom-header-container {
    width: 100%;
    max-width: 100%;
    margin: 0;
    padding: 0 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 15px;
    box-sizing: border-box;
}

/* 1. Logo */
.header-logo {
    display: flex;
    align-items: center;
    flex-shrink: 0;
}

.header-logo img,
.header-logo .custom-logo {
    max-height: 45px !important;
    height: auto !important;
    width: auto !important;
    display: block;
}

.site-title-link {
    color: #ffffff !important;
    font-size: 20px;
    font-weight: bold;
    text-decoration: none !important;
}

/* 2. Buscador redondeado estilo píldora */
.header-search {
    flex: 1;
    max-width: 600px;
}

.custom-search-form {
    display: flex;
    align-items: center;
    background-color: #ffffff;
    border-radius: 25px;
    padding: 2px 4px 2px 15px;
    box-sizing: border-box;
    margin: 0;
    width: 100%;
}

.custom-search-form input.search-field {
    width: 100%;
    border: none !important;
    outline: none !important;
    background: transparent !important;
    padding: 5px 0 !important;
    font-size: 13px;
    color: #333333;
    box-shadow: none !important;
}

.custom-search-form .search-btn {
    background-color: #1a7eb0 !important;
    border: none !important;
    border-radius: 50% !important;
    width: 32px !important;
    height: 32px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    cursor: pointer;
    flex-shrink: 0;
    padding: 0 !important;
    transition: background-color 0.2s ease;
}

.custom-search-form .search-btn:hover {
    background-color: #135d83 !important;
}

.custom-search-form .search-btn svg {
    display: block;
    width: 16px;
    height: 16px;
}

/* 3. Acciones de Usuario (Cuenta, Ayuda y Carrito) */
.header-actions {
    display: flex;
    align-items: center;
    gap: 15px;
    flex-shrink: 0;
}

.action-item {
    color: #ffffff !important;
    text-decoration: none !important;
    display: flex;
    align-items: center;
    gap: 6px;
}

.account-item .account-text {
    display: flex;
    flex-direction: column;
    line-height: 1.2;
    max-width: 150px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.account-item .sub-text {
    font-size: 10px;
    opacity: 0.9;
}

.account-item .main-text {
    font-size: 12px;
    font-weight: bold;
}

.help-item span {
    font-size: 12px;
    font-weight: bold;
}

.cart-icon-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}

.cart-count {
    position: absolute;
    top: -6px;
    right: -8px;
    background-color: #ffffff;
    color: #26ADEB;
    font-size: 10px;
    font-weight: bold;
    border-radius: 10px;
    padding: 1px 5px;
    min-width: 14px;
    text-align: center;
}

/* ==========================================================================
   ADAPTACIÓN MÓVIL OPTIMIZADA (Una sola línea fluida o empaquetada limpia)
   ========================================================================== */
@media (max-width: 768px) {
    /* Permitimos que el header en móvil sea compacto sin apilarse feo */
    .custom-header-container {
        flex-wrap: nowrap; /* Evita que el buscador salte abajo y deforme todo */
        gap: 8px;
        padding: 0 10px;
    }
    
    .header-search {
        max-width: none;
    }

    .custom-search-form input.search-field {
        font-size: 12px;
        padding: 4px 0 !important;
    }

    /* Ocultamos textos secundarios en móvil para que quepa todo perfecto en una línea */
    .account-text, .help-item span {
        display: none !important;
    }

    /* Espacio superior exacto para que el contenido no quede tapado en móvil */
    body {
        padding-top: 60px !important;
    }
}

/* Espacio superior para escritorio */
@media (min-width: 769px) {
    body {
        padding-top: 10px !important;
    }
}

