/* ============================================================
   Header: brand flush left + floating quick links
   Loaded on every page by inc/nav-fab.php.
   ============================================================ */

/* ---------- Brand logo against the left edge ---------- */

/* styles.css centres .center-brand .navbar-brand with left/right:0 + margin:auto.
   Anchor it to the left instead, and drop the mobile indent, so the logo sits
   on the very edge of the bar with no gutter. */
.site-header .center-brand .navbar-brand {
    left: 0;
    right: auto;
    margin: 0;
    padding: 0;
    text-align: left;
}

/* ---------- Floating stack (bottom right) ---------- */

.hbk-fab {
    position: fixed;
    right: 20px;
    bottom: calc(22px + env(safe-area-inset-bottom, 0px));
    z-index: 9990; /* under the side menu (99999) and the admin bar */
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 10px;
    pointer-events: none; /* the gaps stay click-through */
}

.hbk-fab__btn {
    position: relative;
    display: grid;
    place-items: center;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: #2e1b0e;
    color: #fdf6e3;
    font-size: 21px;
    line-height: 1;
    text-decoration: none;
    box-shadow: 0 10px 22px rgba(38, 20, 8, .24), 0 2px 4px rgba(38, 20, 8, .16);
    pointer-events: auto;
    transition: transform .18s ease, box-shadow .18s ease, background-color .18s ease;
}

.hbk-fab__btn:hover,
.hbk-fab__btn:focus-visible {
    color: #fdf6e3;
    transform: translateY(-2px);
    box-shadow: 0 14px 26px rgba(38, 20, 8, .3), 0 2px 4px rgba(38, 20, 8, .18);
}

.hbk-fab__btn:focus-visible {
    outline: 2px solid #eec643;
    outline-offset: 3px;
}

/* Colour per action */
.hbk-fab__btn--wa        { background: #25d366; color: #fff; }
.hbk-fab__btn--wa:hover,
.hbk-fab__btn--wa:focus-visible { background: #1fbe5b; color: #fff; }

.hbk-fab__btn--cart      { background: #eec643; color: #2e1b0e; }
.hbk-fab__btn--cart:hover,
.hbk-fab__btn--cart:focus-visible { background: #f5d35f; color: #2e1b0e; }

.hbk-fab__btn--account   { background: #fdf6e3; color: #2e1b0e; border: 1px solid rgba(46, 27, 14, .14); }
.hbk-fab__btn--account:hover,
.hbk-fab__btn--account:focus-visible { background: #fffdf7; color: #2e1b0e; }

/* Cart and account only appear once the cart holds something */
.hbk-fab__btn--cart,
.hbk-fab__btn--account {
    display: none;
}

.hbk-fab--has-cart .hbk-fab__btn--cart,
.hbk-fab--has-cart .hbk-fab__btn--account {
    display: grid;
}

/* Item count on the cart button */
.hbk-fab__count {
    position: absolute;
    top: -3px;
    right: -3px;
    min-width: 21px;
    height: 21px;
    padding: 0 5px;
    border-radius: 999px;
    background: #2e1b0e;
    color: #fdf6e3;
    font: 700 11px/21px "Roboto Condensed", sans-serif;
    letter-spacing: .02em;
    text-align: center;
    box-shadow: 0 0 0 2px #fdf6e3;
}

.hbk-fab__count[hidden] {
    display: none;
}

/* Hover label, pointing left away from the stack */
.hbk-fab__btn::after {
    content: attr(data-label);
    position: absolute;
    top: 50%;
    right: calc(100% + 12px);
    padding: 8px 10px;
    border-radius: 4px;
    background: #2e1b0e;
    color: #fdf6e3;
    font: 600 12px/1 "Roboto Condensed", sans-serif;
    letter-spacing: .08em;
    text-transform: uppercase;
    white-space: nowrap;
    opacity: 0;
    transform: translate(6px, -50%);
    transition: opacity .18s ease, transform .18s ease;
    pointer-events: none;
}

.hbk-fab__btn:hover::after,
.hbk-fab__btn:focus-visible::after {
    opacity: 1;
    transform: translate(0, -50%);
}

/* ---------- Small screens ---------- */

@media (max-width: 767px) {
    .hbk-fab {
        right: 13px;
        bottom: calc(14px + env(safe-area-inset-bottom, 0px));
        gap: 8px;
    }

    .hbk-fab__btn {
        width: 44px;
        height: 44px;
        font-size: 19px;
    }

    /* No room for hover labels on touch */
    .hbk-fab__btn::after {
        display: none;
    }
}

@media (prefers-reduced-motion: reduce) {
    .hbk-fab__btn,
    .hbk-fab__btn::after {
        transition: none;
    }

    .hbk-fab__btn:hover,
    .hbk-fab__btn:focus-visible {
        transform: none;
    }
}

@media print {
    .hbk-fab {
        display: none;
    }
}
