/* ===== HEADER FIJO ===== */

.ah-new-header {
    width: 100%;
    background: #fff;
    border-bottom: 1px solid #e5e5e5;
    position: fixed;
    top: 0;
    left: 0;
    z-index: 999;
}

/* Evita que el contenido quede debajo del header */
body {
    padding-top: 72px;
}

@media (max-width: 900px) {
    body {
        padding-top: 108px;
    }
}

/* ===== GLOBAL ===== */

.ah-new-header,
.ah-new-header * {
    box-sizing: border-box;
}

/* ===== CONTAINER ===== */

.ah-new-header__inner {
    width: 100%;
    min-height: 72px;
    padding: 0 38px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    position: relative;
}

/* ===== LOGO ===== */

.ah-new-header__logo {
    display: inline-flex;
    align-items: center;
    text-decoration: none;
}

.ah-new-header__logo img {
    width: 115px;
    max-height: 66px;
    object-fit: contain;
}

/* ===== NAV DESKTOP ===== */

.ah-new-header__nav {
    display: flex;
    align-items: center;
    gap: 34px;
}

.ah-new-header__nav a {
    color: #111;
    text-decoration: none;
    font-size: 16px;
    font-weight: 500;
    transition: .2s ease;
}

.ah-new-header__nav a:hover,
.ah-new-header__nav a.is-active {
    color: #cd1218;
}

/* ===== ACTIONS ===== */

.ah-new-header__actions {
    display: flex;
    align-items: center;
    gap: 22px;
}

/* ===== USER ===== */

.ah-new-user {
    position: relative;
}

.ah-new-user__btn {
    border: none;
    background: transparent;
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    font-size: 16px;
    color: #111;
}

.ah-new-user__avatar {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    border: 1.5px solid #777;
    overflow: hidden;
}

.ah-new-user__avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* ===== DROPDOWN ===== */

.ah-new-user__menu {
    position: absolute;
    top: calc(100% + 18px);
    right: -12px;
    width: 215px;
    background: #fff;
    padding: 18px 20px;
    box-shadow: 0 16px 32px rgba(0,0,0,.18);
    opacity: 0;
    visibility: hidden;
    transform: translateY(8px);
    transition: .22s ease;
    z-index: 999999;
}

.ah-new-user:hover .ah-new-user__menu,
.ah-new-user.is-open .ah-new-user__menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

/* ===== ITEMS MENU ===== */

.ah-new-user__menu a,
.ah-new-user__menu button,
.ah-new-mobile-user-menu a,
.ah-new-mobile-user-menu button {
    width: 100%;
    border: none;
    background: transparent;
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 0;
    color: #777;
    text-decoration: none;
    font-size: 17px;
    cursor: pointer;
    transition: .2s ease;
}

.ah-new-user__menu a:hover,
.ah-new-user__menu button:hover,
.ah-new-user__menu a.is-active,
.ah-new-mobile-user-menu a:hover,
.ah-new-mobile-user-menu a.is-active {
    color: #cd1218;
}

/* ===== ADD SPOT ===== */

.ah-new-add-spot {
    height: 40px;
    padding: 0 18px;
    border: 1.5px solid #cd1218;
    border-radius: 999px;
    color: #cd1218;
    background: #fff;
    display: flex;
    align-items: center;
    gap: 8px;
    text-decoration: none;
    font-size: 13px;
    font-weight: 700;
    transition: .25s ease;
}

.ah-new-add-spot:hover,
.ah-new-add-spot.is-active {
    background: #cd1218;
    color: #fff;
    box-shadow: 0 8px 18px rgba(205,18,24,.2);
}

/* ===== CART ===== */

.ah-new-cart {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: #ffffff;
    color: #111;
    border: #962179 1px solid;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 28px;
    position: relative;
    box-shadow: none;
    transition: .25s ease;
}

.ah-new-cart:hover {
    background: #fff;
    color: #962179;
    transform: translateY(-2px);
    box-shadow: 0 8px 22px rgba(0,0,0,.18);
}

.ah-new-cart span {
    position: absolute;
    top: -6px;
    right: 5px;
    width: 22px;
    height: 22px;
    border-radius: 50%;
    background: #d71920;
    color: #fff;
    font-size: 11px;
    font-weight: bold;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* ===== MOBILE ===== */

.ah-new-header__mobile {
    display: none;
    align-items: center;
    gap: 20px;
}

.ah-new-mobile-user-btn {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    border: 1.5px solid #777;
    overflow: hidden;
}

.ah-new-mobile-menu-btn {
    width: 46px;
    height: 42px;
    background: transparent;
    border: none;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.ah-new-mobile-menu-btn span {
    width: 32px;
    height: 4px;
    background: #777;
    border-radius: 2px;
}

/* ===== MOBILE NAV ===== */

.ah-new-mobile-nav,
.ah-new-mobile-user-menu {
    display: none;
    position: absolute;
    top: calc(100% - 18px);
    background: #fbf7ff;
    border-radius: 16px;
    box-shadow: 0 12px 28px rgba(0,0,0,.26);
    z-index: 999999;
}

.ah-new-mobile-nav {
    right: 35px;
    width: 210px;
    padding: 8px;
}

.ah-new-mobile-nav a {
    display: block;
    padding: 13px;
    border-radius: 10px;
    font-size: 14px;
    font-weight: 700;
    text-decoration: none;
    color: #222;
    transition: .2s;
}

.ah-new-mobile-nav a:hover,
.ah-new-mobile-nav a.is-active {
    background: #ffd5e1;
}

/* ===== OPEN STATES ===== */

.ah-new-mobile-nav.is-open,
.ah-new-mobile-user-menu.is-open {
    display: block;
}

/* ===== RESPONSIVE ===== */

@media (max-width: 900px) {
    .ah-new-header__inner {
        min-height: 108px;
    }

    .ah-new-header__nav,
    .ah-new-header__actions {
        display: none;
    }

    .ah-new-header__mobile {
        display: flex;
    }
}


/* ===== AJUSTES MOBILE HEADER ===== */

@media (max-width: 900px) {
    .ah-new-header__inner {
        min-height: 96px;
        padding: 0 28px;
        gap: 18px;
    }

    .ah-new-header__logo img {
        width: 150px;
        max-height: 58px;
    }

    .ah-new-header__mobile {
        gap: 24px;
        margin-left: auto;
    }

    .ah-new-mobile-user-btn {
        width: 42px;
        height: 42px;
        flex: 0 0 42px;
    }

    .ah-new-mobile-menu-btn {
        width: 42px;
        flex: 0 0 42px;
        align-items: center;
    }

    .ah-new-mobile-menu-btn span {
        width: 30px;
        height: 4px;
    }

    body {
        padding-top: 96px;
    }
}

/* ===== MENÚ USUARIO MOBILE MÁS ANCHO ===== */

@media (max-width: 900px) {
    .ah-new-mobile-user-menu {
        width: 280px;
        max-width: calc(100vw - 32px);
        padding: 20px 26px;
        left: 50%;
        top: calc(100% + 8px);
        transform: translateX(-50%);
        border-radius: 0;
        background: #fff;
    }

    .ah-new-mobile-user-menu a,
    .ah-new-mobile-user-menu button {
        padding: 13px 0;
        gap: 16px;
        font-size: 18px;
        white-space: nowrap;
    }

    .ah-new-mobile-user-menu i {
        width: 24px;
        min-width: 24px;
        text-align: center;
    }

    .ah-new-mobile-add {
        width: 100%;
        justify-content: flex-start;
        height: auto;
        padding: 12px 0;
        border: none;
        color: #777;
        background: transparent;
        font-size: 18px;
        font-weight: 400;
        box-shadow: none;
        transform: none;
    }

    .ah-new-mobile-add:hover,
    .ah-new-mobile-add.is-active {
        background: transparent;
        color: #cd1218;
        box-shadow: none;
        transform: none;
    }
}

/* ===== AJUSTE PARA PANTALLAS MUY CHICAS ===== */

@media (max-width: 430px) {
    .ah-new-header__inner {
        padding: 0 18px;
        gap: 12px;
    }

    .ah-new-header__logo img {
        width: 140px;
        max-height: 54px;
    }

    .ah-new-header__mobile {
        gap: 18px;
    }

    .ah-new-mobile-user-btn {
        width: 39px;
        height: 39px;
        flex-basis: 39px;
    }

    .ah-new-mobile-menu-btn {
        width: 38px;
        flex-basis: 38px;
    }

    .ah-new-mobile-menu-btn span {
        width: 27px;
        height: 4px;
    }

    .ah-new-mobile-user-menu {
        width: 270px;
        left: 50%;
    }
}


/* ===== FIX ALINEACIÓN AVATAR + HAMBURGUESA ===== */

/* En desktop debe estar oculto */
.ah-new-header__mobile {
    display: none;
    align-items: center;
}

/* Solo en mobile/tablet se muestra */
@media (max-width: 900px) {
    .ah-new-header__mobile {
        display: flex;
        align-items: center;
    }

    .ah-new-mobile-user-btn,
    .ah-new-mobile-menu-btn {
        display: flex;
        align-items: center;
        justify-content: center;
    }

    .ah-new-mobile-menu-btn {
        height: 42px;
        transform: translateY(1px);
    }

    .ah-new-mobile-menu-btn span {
        margin: 0 auto;
    }
}
