/* ============================================================
   UPSEX — AJUSTE PUNTUAL HEADER + HERO V3.24
   Solo tablet y PC.
   No modifica móvil, imágenes, módulos, productos ni footer.
   ============================================================ */

@media (min-width:768px){

    /* ========================================================
       1. CUENTA Y CARRITO JUNTOS, AL LADO DERECHO
       ======================================================== */

    html body #upsex-desktop-header-v1 .upsex-v32-actions,
    html body #upsex-desktop-header-v1 .upsex-v321-actions,
    html body #upsex-desktop-header-v1 .upsex-v323-actions{
        display:flex!important;
        align-items:center!important;
        justify-content:flex-end!important;
        gap:14px!important;

        width:auto!important;
        min-width:132px!important;
        max-width:none!important;

        margin-right:0!important;
        margin-left:clamp(24px,3vw,48px)!important;
        padding:0!important;

        flex:0 0 auto!important;
        justify-self:end!important;
    }

    html body #upsex-desktop-header-v1 .upsex-v321-account-item,
    html body #upsex-desktop-header-v1 .upsex-v321-cart-item,
    html body #upsex-desktop-header-v1 .upsex-v323-account-item,
    html body #upsex-desktop-header-v1 .upsex-v323-cart-item{
        position:relative!important;

        display:flex!important;
        align-items:center!important;
        justify-content:center!important;

        width:58px!important;
        min-width:58px!important;
        max-width:58px!important;

        margin:0!important;
        padding:0!important;

        flex:0 0 58px!important;
    }

    html body #upsex-desktop-header-v1 .upsex-v321-account-item > a,
    html body #upsex-desktop-header-v1 .upsex-v321-cart-item > a,
    html body #upsex-desktop-header-v1 .upsex-v323-account-item > a,
    html body #upsex-desktop-header-v1 .upsex-v323-cart-item > a{
        display:flex!important;
        flex-direction:column!important;
        align-items:center!important;
        justify-content:center!important;
        gap:3px!important;

        width:58px!important;
        min-width:58px!important;
        margin:0!important;
        padding:2px 0!important;

        text-align:center!important;
    }

    /* Punto de estado de sesión */

    html body
    #upsex-desktop-header-v1
    .upsex-v322-login-status{
        position:absolute!important;
        z-index:20!important;

        top:1px!important;
        right:7px!important;
        bottom:auto!important;
        left:auto!important;

        display:block!important;
        visibility:visible!important;
        opacity:1!important;

        width:9px!important;
        height:9px!important;

        margin:0!important;
        padding:0!important;

        border:2px solid #4d423f!important;
        border-radius:50%!important;

        transform:none!important;
        box-shadow:
            0 0 0 1px rgba(255,250,241,.82),
            0 2px 7px rgba(35,23,18,.22)!important;
    }

    html body
    #upsex-desktop-header-v1
    .is-logged-out
    .upsex-v322-login-status{
        background:#9b8e88!important;
    }

    html body
    #upsex-desktop-header-v1
    .is-logged-in
    .upsex-v322-login-status{
        background:#FEC400!important;
    }

    /* ========================================================
       2. BUSCADOR LIMPIO Y SIN CORTE EN EL LADO DERECHO
       ======================================================== */

    html body #upsex-desktop-header-v1 .upsex-v321-search{
        position:relative!important;

        width:100%!important;
        max-width:680px!important;
        min-width:260px!important;

        margin:0!important;
        padding:0!important;

        border:0!important;
        border-radius:15px!important;

        background:transparent!important;
        box-shadow:none!important;

        overflow:visible!important;
        clip-path:none!important;
        mask:none!important;
    }

    html body
    #upsex-desktop-header-v1
    .upsex-v321-search:not(form),

    html body
    #upsex-desktop-header-v1
    .upsex-v321-search
    .input-group{
        position:relative!important;

        display:flex!important;
        align-items:stretch!important;

        width:100%!important;
        height:46px!important;

        margin:0!important;
        padding:0!important;

        border:1px solid rgba(184,138,0,.48)!important;
        border-radius:15px!important;

        background:#fffaf1!important;

        overflow:hidden!important;
        clip-path:none!important;
        mask:none!important;

        box-shadow:
            0 7px 18px rgba(38,25,20,.14),
            inset 0 1px 0 rgba(255,255,255,.74)!important;
    }

    html body
    #upsex-desktop-header-v1
    .upsex-v321-search
    input{
        display:block!important;

        width:100%!important;
        min-width:0!important;
        height:44px!important;

        margin:0!important;
        padding:0 17px!important;

        border:0!important;
        border-radius:14px 0 0 14px!important;
        outline:0!important;

        background:#fffaf1!important;
        color:#4d423f!important;

        font-family:Manrope,Arial,sans-serif!important;
        font-size:14px!important;
        font-weight:500!important;

        box-shadow:none!important;
        clip-path:none!important;
        mask:none!important;

        flex:1 1 auto!important;
    }

    html body
    #upsex-desktop-header-v1
    .upsex-v321-search
    input::placeholder{
        color:#7c706b!important;
        opacity:.88!important;
    }

    html body
    #upsex-desktop-header-v1
    .upsex-v321-search
    .input-group-btn{
        position:static!important;

        display:flex!important;
        width:48px!important;
        min-width:48px!important;
        height:44px!important;

        margin:0!important;
        padding:0!important;

        border:0!important;

        flex:0 0 48px!important;
    }

    html body
    #upsex-desktop-header-v1
    .upsex-v321-search
    button,

    html body
    #upsex-desktop-header-v1
    .upsex-v321-search
    .btn{
        position:static!important;

        display:flex!important;
        align-items:center!important;
        justify-content:center!important;

        width:48px!important;
        min-width:48px!important;
        height:44px!important;

        margin:0!important;
        padding:0!important;

        border:0!important;
        border-left:1px solid rgba(184,138,0,.28)!important;
        border-radius:0 14px 14px 0!important;

        background:#F3E4B8!important;
        color:#7A5A18!important;

        transform:none!important;
        clip-path:none!important;
        mask:none!important;

        overflow:hidden!important;
        box-shadow:none!important;

        flex:0 0 48px!important;
    }

    html body
    #upsex-desktop-header-v1
    .upsex-v321-search
    button::before,

    html body
    #upsex-desktop-header-v1
    .upsex-v321-search
    button::after,

    html body
    #upsex-desktop-header-v1
    .upsex-v321-search
    .btn::before,

    html body
    #upsex-desktop-header-v1
    .upsex-v321-search
    .btn::after{
        display:none!important;
        content:none!important;
    }

    /* Reemplaza la línea larga y descentrada */

    html body
    #upsex-desktop-header-v1
    .upsex-v321-search::before{
        display:none!important;
        content:none!important;
    }

    html body
    #upsex-desktop-header-v1
    .upsex-v321-search::after{
        content:""!important;

        position:absolute!important;
        z-index:4!important;

        top:auto!important;
        right:auto!important;
        bottom:-10px!important;
        left:50%!important;

        display:block!important;

        width:min(42%,220px)!important;
        height:2px!important;

        margin:0!important;
        padding:0!important;

        border:0!important;
        border-radius:999px!important;

        background:
            linear-gradient(
                90deg,
                rgba(210,173,82,0) 0%,
                rgba(210,173,82,.68) 20%,
                #B88A00 50%,
                rgba(210,173,82,.68) 80%,
                rgba(210,173,82,0) 100%
            )!important;

        transform:translateX(-50%)!important;

        box-shadow:
            0 2px 8px rgba(184,138,0,.16)!important;

        pointer-events:none!important;
    }

    /* ========================================================
       3. TEXTO DEL HERO MÁS ARRIBA
       La imagen y la altura del banner NO se modifican.
       ======================================================== */

    html body.common-home
    #upsex-home-slider-v1
    .upsex-slide__content{
        position:absolute!important;

        top:clamp(34px,6vw,86px)!important;
        right:auto!important;
        bottom:auto!important;
        left:clamp(34px,6vw,92px)!important;

        width:min(46%,590px)!important;
        max-width:590px!important;

        margin:0!important;
        padding:0!important;

        transform:none!important;
        text-align:left!important;
    }

    html body.common-home
    #upsex-home-slider-v1
    .upsex-slide__content
    > :first-child{
        margin-top:0!important;
    }

    /* Compatibilidad con el slider Nivo anterior */

    html body.common-home
    #plaza-slider
    .nivo-caption
    .slider-content{
        position:absolute!important;

        top:clamp(34px,6vw,86px)!important;
        right:auto!important;
        bottom:auto!important;
        left:clamp(34px,6vw,92px)!important;

        width:min(46%,590px)!important;
        max-width:590px!important;

        margin:0!important;
        padding:0!important;

        transform:none!important;
        text-align:left!important;
    }

    html body.common-home
    #plaza-slider
    .nivo-caption
    .slide-title{
        margin-top:0!important;
    }
}
