/* Cabecera de la tienda: cuenta (menu "Hola, Nombre" con punto de notificaciones) y bolsa siempre a la vista en PC y
   celular, logo mas grande y cabecera compacta al bajar (js/site.js agrega .is-compacta). Views/Shared/_Layout.cshtml */

.navbar-acciones { display: flex; align-items: center; gap: 10px; flex: 0 0 auto; }
.navbar-header .container, .navbar-header .site-logo { transition: padding .2s ease, height .2s ease; }

/* Boton de la cuenta */
.cuenta-boton {
    position: relative; display: inline-flex; align-items: center; gap: 7px;
    border: 1px solid var(--line); background: #fff; color: var(--ink) !important; border-radius: 50px;
    padding: 7px 13px; font: 500 .76rem var(--sans); letter-spacing: .02em; white-space: nowrap; cursor: pointer;
    text-decoration: none; line-height: 1.2;
}
.cuenta-boton:hover, .cuenta-boton[aria-expanded="true"] { border-color: var(--wine); color: var(--wine) !important; }
.cuenta-boton:focus-visible { outline: 2px solid var(--wine); outline-offset: 2px; }
.cuenta-ingresar { border-color: var(--wine); color: var(--wine) !important; text-transform: uppercase; letter-spacing: .06em; font-size: .72rem; }
.cuenta-icono { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; flex: 0 0 auto; }
.cuenta-flecha { width: 10px; height: 10px; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.cuenta-boton[aria-expanded="true"] .cuenta-flecha { transform: rotate(180deg); }
.cuenta-punto {
    position: absolute; top: -6px; right: -6px; min-width: 18px; height: 18px; padding: 0 5px; border-radius: 9px;
    background: #c0304a; color: #fff; font: 600 .62rem/18px var(--sans); text-align: center; box-shadow: 0 0 0 2px #fff;
}

/* Menu de la cuenta (tambien en el celular: no toma el estilo "plano" del menu hamburguesa) */
.navbar-acciones .cuenta { position: relative; }
/* en la cabecera Bootstrap no usa Popper: el menu se alinea a la derecha del boton */
.navbar-acciones .cuenta-menu { position: absolute !important; top: 100% !important; right: 0 !important; left: auto !important; transform: none !important; }
.navbar-acciones .cuenta-menu {
    min-width: 220px; margin-top: 8px !important; padding: 6px !important; text-align: left;
    background: #fff !important; border: 1px solid var(--line) !important; border-radius: 10px !important;
    box-shadow: 0 12px 30px #34242a26 !important;
}
.cuenta-saludo { padding: 8px 12px 10px; font-size: .74rem; color: var(--muted); border-bottom: 1px solid var(--line); margin-bottom: 4px; }
.cuenta-menu .dropdown-item {
    display: flex; align-items: center; justify-content: space-between; gap: 8px; width: 100%;
    padding: 10px 12px; border-radius: 6px; font-size: .82rem; color: var(--ink); background: none; border: 0; text-align: left;
}
.cuenta-menu .dropdown-item:hover, .cuenta-menu .dropdown-item:focus { background: #fcf5f7; color: var(--wine); }
.cuenta-menu form { margin: 0; }
.cuenta-salir { color: var(--muted) !important; }

/* Bolsa con icono */
.navbar-acciones .cart-button { display: inline-flex; align-items: center; gap: 6px; white-space: nowrap; }
.cart-icono { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linejoin: round; flex: 0 0 auto; }
.navbar-acciones .cart-button #cartCount { margin-left: 0; }
/* el texto "Bolsa" no es el circulo del contador (site.css pinta todos los span del boton) */
.navbar-acciones .cart-button .cart-texto { display: inline; width: auto; height: auto; margin: 0; border-radius: 0; background: none; color: inherit; font-size: inherit; }

/* PC: logo | enlaces | cuenta + bolsa */
@media (min-width: 992px) {
    .navbar-header .navbar-brand { order: 0; }
    .navbar-header #mainNav { order: 1; flex-grow: 1; }
    .navbar-header .navbar-acciones { order: 2; margin-left: 10px; }
    .site-logo { height: 60px; max-width: 200px; }
    .navbar-header.is-compacta .container { padding-top: 6px; padding-bottom: 6px; }
    .navbar-header.is-compacta .site-logo { height: 44px; }
}

/* Celular y tablet: logo | cuenta + bolsa + menu; los enlaces en el menu hamburguesa */
@media (max-width: 991.98px) {
    .navbar-header .navbar-brand { order: 0; max-width: none; min-width: 0; flex: 0 1 auto; }
    .navbar-header .navbar-acciones { order: 1; margin-left: auto; gap: 8px; }
    .navbar-header #mainNav { order: 2; }
    .navbar-acciones .cart-button { display: inline-flex !important; width: auto !important; margin: 0 !important; padding: 8px 11px; }
    .navbar-acciones .dropdown:not(.cuenta-solo) .cuenta-nombre,
    .navbar-acciones .dropdown .cuenta-flecha { display: none; }
    .cuenta-boton { padding: 8px 10px; }
    /* el menu de la cuenta se alinea al borde derecho de la barra (no del boton): no se sale por la izquierda */
    .navbar-header .navbar-acciones { position: relative; }
    .navbar-acciones .cuenta { position: static; }
    .navbar-acciones .cuenta-menu { max-width: calc(100vw - 28px); }
    .cuenta-ingresar { padding: 8px 12px; }
    .navbar-header.is-compacta .container { padding-top: 5px; padding-bottom: 5px; }
    .navbar-header.is-compacta .site-logo { height: 34px; }
}
@media (max-width: 374.98px) {
    .navbar-acciones .cart-button .cart-texto { display: none; }
}
@media (max-width: 360px) {
    .cuenta-ingresar .cuenta-nombre { display: none; }
    .site-logo { max-width: 120px; }
}

/* Guirnalda del tema de temporada: mas delgada en el celular */
@media (max-width: 767.98px) {
    html:not([data-tema=anionuevo]) .tema-guirnalda { height: 16px; bottom: -15px; background-size: auto 16px; }
}

/* Temas de cabecera oscura (Halloween, Cyber) */
html[data-tema=halloween] .cuenta-boton, html[data-tema=cyber] .cuenta-boton {
    background: transparent; border-color: var(--cab-acento); color: var(--cab-acento) !important;
}
html[data-tema=halloween] .cuenta-punto, html[data-tema=cyber] .cuenta-punto { box-shadow: none; }
