/* ================================================================
   assets/css/chrome.css
   Chrome del sitio: barra de aviso, navegación, buscador y menús.
   (generado desde header.php)
   ================================================================ */

/* =========================================================
   ANNOUNCE BAR
========================================================= */

.announce-bar {
    background: rgba(10,10,10,.82);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    color: rgba(255,255,255,.88);
    font-size: .7rem;
    font-weight: 500;
    letter-spacing: .07em;
    text-transform: uppercase;
    display: flex;
    align-items: center;
    overflow: hidden;
    height: 32px;
}

.announce-track {
    display: flex;
    white-space: nowrap;
    animation: marquee 32s linear infinite;
    will-change: transform;
}

.announce-track:hover {
    animation-play-state: paused;
}

.announce-item {
    display: flex;
    align-items: center;
    gap: .6rem;
    padding: 0 2rem;
    flex-shrink: 0;
}

.announce-sep {
    width: 3px;
    height: 3px;
    background: rgba(255,255,255,.35);
    border-radius: 50%;
    flex-shrink: 0;
}

@keyframes marquee {
    0% {
        transform: translateX(0);
    }

    100% {
        transform: translateX(-50%);
    }
}


/* =========================================================
   TOP UTILITY BAR
========================================================= */

.top-bar {
    background: #fff;
    border-bottom: 1px solid rgba(0,0,0,.07);
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 2rem;
    height: 34px;
    font-size: .7rem;
    color: #555;
}

.top-bar-links {
    display: flex;
    gap: 1.75rem;
    align-items: center;
}

.top-bar-links a {
    color: #555;
    text-decoration: none;
    transition: color .18s;
    white-space: nowrap;
}

.top-bar-links a:hover {
    color: #111;
}

.top-bar-social {
    display: flex;
    gap: .9rem;
    align-items: center;
}

.top-bar-social a {
    color: #555;
    text-decoration: none;
    line-height: 1;
    transition: color .18s, transform .18s;
    display: flex;
    align-items: center;
    justify-content: center;
}

.top-bar-social a:hover {
    color: #111;
    transform: translateY(-1px);
}


/* =========================================================
   SITE HEADER
========================================================= */

.site-header {
    background: #fff;
    border-bottom: 1px solid rgba(0,0,0,.07);
    position: sticky;
    top: 0;
    z-index: 200;
    box-shadow: 0 1px 8px rgba(0,0,0,.05);
}


/* =========================================================
   HEADER TOP
========================================================= */

.header-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: .8rem 2rem;
    position: relative;
}

.header-logo {
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    align-items: center;
    text-decoration: none;
    z-index: 1;
}

.header-logo-img {
    height: 48px;
    width: auto;
    object-fit: contain;
    max-width: 180px;
}

.header-left-placeholder,
.header-right-actions {
    display: flex;
    align-items: center;
    gap: .6rem;
    min-width: 88px;
}

.header-right-actions {
    justify-content: flex-end;
}


/* =========================================================
   CATEGORY NAV
========================================================= */

.cat-nav {
    border-top: 1px solid rgba(0,0,0,.06);
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 0;
    padding: 0 1rem;
    overflow-x: auto;
    scrollbar-width: none;
}

.cat-nav::-webkit-scrollbar {
    display: none;
}

.cat-nav a {
    font-size: .72rem;
    font-weight: 600;
    letter-spacing: .09em;
    text-transform: uppercase;
    color: #333;
    text-decoration: none;
    padding: .65rem 1.1rem;
    border-bottom: 2px solid transparent;
    white-space: nowrap;
    transition: color .18s, border-color .18s;
    flex-shrink: 0;
}

.cat-nav a:hover,
.cat-nav a.active {
    color: #111;
    border-bottom-color: #111;
}


/* =========================================================
   HEADER ICON BUTTONS
========================================================= */

.header-icon-btn {
    background: none;
    border: 1px solid transparent;
    cursor: pointer;
    position: relative;
    color: #333;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    transition:
        color .18s,
        background .18s,
        border-color .18s,
        transform .18s;
    display: flex;
    align-items: center;
    justify-content: center;
}

.header-icon-btn:hover {
    color: #111;
    background: #f3f1ef;
    border-color: rgba(0,0,0,.07);
}

.header-icon-btn:active {
    transform: scale(.94);
}

.header-icon-btn.cart-btn {
    color: #111;
    border-color: rgba(0,0,0,.10);
}

.header-icon-btn.cart-btn:hover {
    background: #111;
    color: #fff;
    border-color: #111;
}


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

.cart-badge {
    position: absolute;
    top: -4px;
    right: -4px;
    background: #111;
    color: #fff;
    font-size: .625rem;
    font-weight: 700;
    min-width: 17px;
    height: 17px;
    padding: 0 3px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 2px solid #fff;
    transition: background .18s;
}

.header-icon-btn.cart-btn:hover .cart-badge {
    background: #111;
    border-color: #111;
}


/* =========================================================
   HAMBURGER
========================================================= */

.hamburger {
    display: none;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 5px;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: none;
    border: none;
    cursor: pointer;
    transition: background .18s;
}

.hamburger:hover {
    background: #f3f1ef;
}

.hamburger span {
    width: 22px;
    height: 1.5px;
    background: #333;
    border-radius: 2px;
    display: block;
    transition: transform .22s ease, opacity .18s ease;
}

/* Con el menú abierto el botón se vuelve X. Antes no cambiaba nada: el
   panel entraba y el botón seguía siendo tres rayitas, así que no había
   forma de saber que estaba abierto ni de cerrar el menú desde el botón.
   La de arriba baja y las dos de abajo cruzan. */
.hamburger.is-open span:nth-child(1) {
    transform: translateY(6.5px) rotate(45deg);
}

.hamburger.is-open span:nth-child(2) {
    opacity: 0;
    transform: scaleX(0);
}

.hamburger.is-open span:nth-child(3) {
    transform: translateY(-6.5px) rotate(-45deg);
}


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

.mobile-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,.38);
    z-index: 399;
}

.mobile-overlay.open {
    display: block;
}


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

.mobile-menu {
    position: fixed;
    top: 0;
    right: 0;
    bottom: 0;
    width: min(300px, 84vw);
    background: #fff;
    z-index: 400;
    display: flex;
    flex-direction: column;
    padding: 3.5rem 1.5rem 2rem;
    gap: .15rem;
    box-shadow: -4px 0 20px rgba(0,0,0,.12);
    transform: translateX(100%);
    visibility: hidden;
    transition: transform .26s ease;
}

.mobile-menu.open {
    transform: translateX(0);
    visibility: visible;
}

.mobile-menu a {
    font-size: .875rem;
    font-weight: 500;
    color: #222;
    text-decoration: none;
    padding: .65rem 0;
    border-bottom: 1px solid rgba(0,0,0,.05);
}

.mobile-menu a:hover {
    color: #111;
}

.mobile-menu-footer {
    margin-top: auto;
    font-size: .72rem;
    color: #bbb;
    padding-top: 1rem;
}

.mobile-menu-search {
    display: flex;
    align-items: center;
    gap: .6rem;
    border: 1px solid rgba(0,0,0,.12);
    border-radius: 999px;
    padding: .6rem 1rem;
    margin-bottom: 1.25rem;
    color: #999;
}

.mobile-menu-search input {
    flex: 1;
    min-width: 0;
    border: none;
    outline: none;
    background: none;
    font-size: .875rem;
    color: #111;
}

.mobile-menu-search input::placeholder {
    color: #aaa;
}


/* =========================================================
   SEARCH PANEL
========================================================= */

.search-panel {
    position: absolute;
    left: 0;
    right: 0;
    top: 100%;
    background: #fff;
    border-top: 1px solid rgba(0,0,0,.05);
    box-shadow: 0 24px 48px -24px rgba(0,0,0,.28);
    opacity: 0;
    visibility: hidden;
    transform: translateY(-8px);
    transition: opacity .2s ease, transform .2s ease, visibility 0s linear .2s;
}

.search-panel.open {
    opacity: 1;
    visibility: visible;
    transform: none;
    transition: opacity .2s ease, transform .2s ease;
}

.search-panel-inner {
    max-width: var(--max-w);
    margin: 0 auto;
    padding: 1.75rem 2rem 2rem;
}

.search-form {
    display: flex;
    align-items: center;
    gap: .75rem;
    border: 1px solid rgba(0,0,0,.14);
    border-radius: 999px;
    padding: .5rem .5rem .5rem 1.35rem;
    transition: border-color .18s, box-shadow .18s;
}

.search-form:focus-within {
    border-color: #111;
    box-shadow: 0 0 0 3px rgba(17,17,17,.06);
}

.search-form svg {
    color: #999;
    flex-shrink: 0;
}

.search-form input {
    flex: 1;
    min-width: 0;
    border: none;
    outline: none;
    background: none;
    font-size: 1rem;
    color: #111;
    padding: .6rem 0;
}

.search-form input::placeholder {
    color: #aaa;
}

.search-submit {
    flex-shrink: 0;
    background: #111;
    color: #fff;
    border: none;
    border-radius: 999px;
    padding: .75rem 1.6rem;
    font-size: .68rem;
    font-weight: 600;
    letter-spacing: .13em;
    text-transform: uppercase;
    cursor: pointer;
    transition: background .18s;
}

.search-submit:hover {
    background: #333;
}

.search-quick {
    display: flex;
    align-items: center;
    gap: .5rem;
    flex-wrap: wrap;
    margin-top: 1.1rem;
    font-size: .72rem;
    color: #999;
}

.search-quick a {
    color: #555;
    text-decoration: none;
    border: 1px solid rgba(0,0,0,.10);
    border-radius: 999px;
    padding: .32rem .8rem;
    transition: border-color .18s, color .18s, background .18s;
}

.search-quick a:hover {
    border-color: #111;
    color: #111;
    background: #f7f7f7;
}

/* Ubicación del local, junto a la marca del pie */
.footer-where {
    display: flex;
    align-items: flex-start;
    gap: .5rem;
    margin: 0 0 1.5rem;
    font-size: .8125rem;
    line-height: 1.5;
    color: rgba(255,255,255,.55);
    max-width: 260px;
}

.footer-where svg {
    flex-shrink: 0;
    margin-top: .2rem;
    color: rgba(255,255,255,.4);
}


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

@media (max-width: 860px) {

    .top-bar {
        display: none;
    }

    .cat-nav {
        display: none;
    }

    .hamburger {
        display: flex;
    }

    .header-top {
        padding: .65rem 1.1rem;
    }

    .search-panel-inner {
        padding: 1.25rem 1.1rem 1.5rem;
    }

    /* En el dedo los enlaces del pie y las sugerencias quedaban en 17 y 30 px
       de alto. Con padding dejan de ser blancos pequeños. */
    .footer-col ul { gap: 0; }

    .footer-col li a {
        display: block;
        padding: .55rem 0;
        font-size: .9375rem;
    }

    .search-quick a {
        padding: .5rem .9rem;
        font-size: .8125rem;
    }
}

/* El carrito cerrado está fuera de pantalla pero seguía siendo tabulable.
   El retardo en visibility deja terminar la animación de salida. */
.cart-drawer {
    transition: transform 550ms var(--ease-out), visibility 0s linear 550ms;
}

.cart-drawer.open {
    visibility: visible;
    transition: transform 550ms var(--ease-out), visibility 0s;
}
