/* Announcement bar, header, search, action buttons and the mobile drawer. */

/* --------------------------------------------------------------------
 * Announcement bar
 * ----------------------------------------------------------------- */

.hb-topbar {
    position: relative;
    overflow: hidden;
    background: linear-gradient(115deg, var(--hb-burgundy) 0%, var(--hb-rose-ink) 58%, var(--hb-lilac) 130%);
    color: #fff;
}

.hb-topbar::after {
    content: '';
    position: absolute;
    top: 0;
    inset-inline-start: 0;
    width: 22%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, .16), transparent);
    animation: hb-topbar-sheen 7s ease-in-out infinite;
    pointer-events: none;
}

@keyframes hb-topbar-sheen {
    from { transform: translateX(-140%) skewX(-16deg); }
    to   { transform: translateX(560%) skewX(-16deg); }
}

.hb-topbar-track {
    position: relative;
    display: grid;
    min-height: 38px;
}

.hb-topbar-message {
    grid-area: 1 / 1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin: 0;
    padding: 9px 16px;
    font-size: 13px;
    font-weight: 700;
    opacity: 0;
    transform: translateY(6px);
    transition: opacity .45s ease, transform .45s ease;
    pointer-events: none;
}

.hb-topbar-message.is-active {
    opacity: 1;
    transform: none;
    pointer-events: auto;
}

.hb-topbar-message .hb-icon {
    flex: 0 0 auto;
    opacity: .9;
}

/* --------------------------------------------------------------------
 * Header
 * ----------------------------------------------------------------- */

.hb-header {
    position: relative;
    z-index: 50;
    background: color-mix(in srgb, var(--hb-paper) 92%, transparent);
    border-bottom: 1px solid var(--hb-line);
    backdrop-filter: blur(10px);
    transition: box-shadow .25s ease;
}

.hb-header.is-sticky {
    position: sticky;
    top: 0;
}

.hb-header.is-scrolled {
    box-shadow: 0 10px 30px rgba(var(--hb-deep-rgb, 32, 0, 0), .08);
}

.hb-header-inner {
    display: flex;
    align-items: center;
    gap: 18px;
    min-height: 80px;
}

/* Brand */
.hb-brand {
    display: flex;
    align-items: center;
    gap: 11px;
    flex: 0 0 auto;
    font-size: 21px;
    font-weight: 900;
}

.hb-brand span {
    background: linear-gradient(100deg, var(--hb-burgundy) 25%, var(--hb-rose-ink));
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    white-space: nowrap;
}

.hb-logo {
    height: var(--hb-logo-height);
    width: auto;
    object-fit: contain;
    transition: transform .3s cubic-bezier(.3, 1.3, .5, 1);
}

.hb-brand:hover .hb-logo {
    transform: rotate(-4deg) scale(1.05);
}

/* Search */
.hb-header-search {
    flex: 1 1 auto;
    min-width: 0;
    display: flex;
    justify-content: center;
}

.hb-search {
    position: relative;
    display: flex;
    align-items: center;
    gap: 8px;
    width: min(520px, 100%);
    padding: 5px 5px 5px 5px;
    padding-inline-start: 16px;
    background: var(--hb-cream);
    border: 1px solid var(--hb-line);
    border-radius: 999px;
    transition: border-color .2s ease, box-shadow .2s ease, background-color .2s ease;
}

.hb-search:focus-within {
    background: #fff;
    border-color: var(--hb-rose);
    box-shadow: 0 0 0 4px var(--hb-rose-soft);
}

.hb-search-icon {
    display: grid;
    place-items: center;
    flex: 0 0 auto;
    color: var(--hb-muted);
    transition: color .2s ease;
}

.hb-search:focus-within .hb-search-icon {
    color: var(--hb-rose);
}

.hb-search input[type="search"] {
    flex: 1 1 auto;
    min-width: 0;
    padding: 10px 0;
    background: none;
    border: 0;
    color: var(--hb-ink);
    font: inherit;
    font-size: 14px;
}

.hb-search input[type="search"]:focus {
    outline: none;
}

.hb-search input::placeholder {
    color: var(--hb-muted);
    opacity: .85;
}

.hb-search button {
    flex: 0 0 auto;
    padding: 10px 20px;
    background: linear-gradient(115deg, var(--hb-gold-ink), var(--hb-rose) 60%, var(--hb-lilac));
    border: 0;
    color: #fff;
    font: inherit;
    font-size: 13px;
    font-weight: 800;
    cursor: pointer;
    transition: filter .2s ease, transform .2s ease;
}

.hb-search button:hover {
    filter: brightness(1.07);
    transform: translateY(-1px);
}

/* Action buttons */
.hb-actions {
    display: flex;
    align-items: center;
    gap: 8px;
    flex: 0 0 auto;
}

.hb-action {
    display: flex;
    align-items: center;
    gap: 9px;
    padding: 8px 10px;
    border-radius: 999px;
    color: var(--hb-burgundy);
    transition: background-color .2s ease, transform .2s ease, color .2s ease;
}

.hb-action:hover {
    background: var(--hb-rose-soft);
    color: var(--hb-rose-ink);
    transform: translateY(-2px);
}

.hb-action--icon {
    width: 42px;
    height: 42px;
    padding: 0;
    justify-content: center;
    background: var(--hb-cream);
    border: 1px solid var(--hb-line);
}

.hb-action-icon {
    position: relative;
    display: grid;
    place-items: center;
    flex: 0 0 auto;
}

.hb-action-text {
    display: flex;
    flex-direction: column;
    line-height: 1.25;
    text-align: start;
}

.hb-action-text small {
    color: var(--hb-muted);
    font-size: 11px;
    font-weight: 700;
}

.hb-action-text strong {
    font-size: 13px;
    font-weight: 900;
}

/* Cart */
.hb-cart-button {
    padding-inline: 12px 14px;
    background: var(--hb-cream);
    border: 1px solid var(--hb-line);
}

.hb-cart-button.has-items {
    background: linear-gradient(115deg, var(--hb-gold-soft), var(--hb-rose-soft));
    border-color: transparent;
}

.hb-cart-count {
    position: absolute;
    top: -7px;
    inset-inline-end: -9px;
    display: grid;
    place-items: center;
    min-width: 19px;
    height: 19px;
    padding: 0 5px;
    background: linear-gradient(135deg, var(--hb-rose), var(--hb-lilac));
    border: 2px solid var(--hb-paper);
    border-radius: 999px;
    color: #fff;
    font-size: 10px;
    font-weight: 900;
    line-height: 1;
}

.hb-cart-button.has-items .hb-cart-count {
    animation: hb-cart-pop .45s cubic-bezier(.3, 1.5, .5, 1);
}

@keyframes hb-cart-pop {
    0%   { transform: scale(.4); }
    60%  { transform: scale(1.18); }
    100% { transform: scale(1); }
}

/* Mobile-only controls */
.hb-burger,
.hb-search-toggle {
    display: none;
    place-items: center;
    width: 42px;
    height: 42px;
    padding: 0;
    flex: 0 0 auto;
    background: var(--hb-cream);
    border: 1px solid var(--hb-line);
    border-radius: 999px !important;
    color: var(--hb-burgundy);
    cursor: pointer;
}

.hb-burger:hover,
.hb-search-toggle:hover {
    background: var(--hb-rose-soft);
    color: var(--hb-rose-ink);
}

.hb-header-search-mobile {
    display: none;
    padding: 0 0 14px;
}

.hb-header-search-mobile[hidden] {
    display: none;
}

/* --------------------------------------------------------------------
 * Mobile drawer
 * ----------------------------------------------------------------- */

.hb-drawer[hidden] {
    display: none;
}

.hb-drawer {
    position: fixed;
    inset: 0;
    z-index: 200;
}

.hb-drawer-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(var(--hb-deep-rgb, 32, 0, 0), .5);
    backdrop-filter: blur(3px);
    opacity: 0;
    transition: opacity .3s ease;
}

.hb-drawer.is-open .hb-drawer-backdrop {
    opacity: 1;
}

.hb-drawer-panel {
    position: absolute;
    inset-block: 0;
    inset-inline-start: 0;
    width: min(330px, 86vw);
    display: flex;
    flex-direction: column;
    background: var(--hb-paper);
    box-shadow: 0 0 50px rgba(var(--hb-deep-rgb, 32, 0, 0), .3);
    transform: translateX(100%);
    transition: transform .32s cubic-bezier(.22, .78, .3, 1);
    overflow-y: auto;
}

html[dir="ltr"] .hb-drawer-panel {
    transform: translateX(-100%);
}

.hb-drawer.is-open .hb-drawer-panel {
    transform: none;
}

.hb-drawer-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 18px 18px 12px;
}

.hb-drawer-title {
    color: var(--hb-burgundy);
    font-size: 18px;
    font-weight: 900;
}

.hb-drawer-close {
    display: grid;
    place-items: center;
    width: 36px;
    height: 36px;
    padding: 0;
    background: var(--hb-cream);
    border: 1px solid var(--hb-line);
    border-radius: 50% !important;
    color: var(--hb-burgundy);
    cursor: pointer;
}

.hb-drawer .hb-search {
    margin: 0 18px 14px;
    width: auto;
}

.hb-drawer .hb-search button {
    padding: 9px 14px;
    font-size: 12px;
}

.hb-drawer-nav ul {
    margin: 0;
    padding: 0 10px 24px;
    list-style: none;
}

.hb-drawer-row {
    display: flex;
    align-items: center;
    gap: 4px;
}

.hb-drawer-row a {
    display: flex;
    align-items: center;
    gap: 11px;
    flex: 1;
    padding: 12px;
    border-radius: 12px;
    color: var(--hb-burgundy);
    font-size: 15px;
    font-weight: 800;
}

.hb-drawer-row a:hover {
    background: var(--hb-rose-soft);
    color: var(--hb-rose-ink);
}

.hb-drawer-icon {
    display: grid;
    place-items: center;
    width: 38px;
    height: 38px;
    flex: 0 0 auto;
    background: linear-gradient(145deg, var(--hb-gold-soft), var(--hb-rose-soft));
    border-radius: 50%;
    color: var(--hb-gold-ink);
}

.hb-drawer-toggle {
    width: 34px;
    height: 34px;
    padding: 0;
    flex: 0 0 auto;
    background: none;
    border: 0;
    border-radius: 50% !important;
    color: var(--hb-muted);
    font-size: 13px;
    cursor: pointer;
    transition: transform .25s ease, background-color .2s ease;
}

.hb-drawer-toggle[aria-expanded="true"] {
    background: var(--hb-rose-soft);
    color: var(--hb-rose-ink);
    transform: rotate(180deg);
}

.hb-drawer-sub {
    display: none;
    padding: 2px 50px 8px !important;
}

.hb-drawer-sub.is-open {
    display: block;
}

.hb-drawer-sub a {
    display: block;
    padding: 9px 10px;
    border-radius: 9px;
    color: var(--hb-muted);
    font-size: 13px;
    font-weight: 700;
}

.hb-drawer-sub a:hover {
    background: var(--hb-line-soft);
    color: var(--hb-rose-ink);
}

.hb-drawer-foot {
    margin-top: auto;
    padding: 14px 18px 20px;
    border-top: 1px solid var(--hb-line);
    background: var(--hb-cream);
}

.hb-drawer-foot a {
    display: flex;
    align-items: center;
    gap: 11px;
    padding: 11px 6px;
    color: var(--hb-burgundy);
    font-size: 14px;
    font-weight: 700;
}

.hb-drawer-foot a:hover {
    color: var(--hb-rose-ink);
}

.hb-drawer-foot strong {
    margin-inline-start: auto;
    min-width: 22px;
    padding: 1px 7px;
    background: linear-gradient(135deg, var(--hb-rose), var(--hb-lilac));
    border-radius: 999px;
    color: #fff;
    font-size: 11px;
    font-weight: 900;
    text-align: center;
}

.hb-drawer-extra {
    padding: 4px 18px 8px;
}

.hb-drawer-extra-title {
    display: block;
    margin-bottom: 6px;
    color: var(--hb-muted);
    font-size: 12px;
    font-weight: 800;
}

.hb-drawer-links {
    margin: 0;
    padding: 0;
    list-style: none;
}

.hb-drawer-links a {
    display: block;
    padding: 9px 6px;
    color: var(--hb-ink);
    font-size: 14px;
    font-weight: 600;
}

.hb-drawer-links a:hover {
    color: var(--hb-rose-ink);
}

/* --------------------------------------------------------------------
 * Breakpoints
 * ----------------------------------------------------------------- */

@media (max-width: 1024px) {
    .hb-action-text {
        display: none;
    }

    .hb-cart-button {
        width: 42px;
        height: 42px;
        padding: 0;
        justify-content: center;
    }
}

@media (max-width: 860px) {
    .hb-header-inner {
        min-height: 68px;
        gap: 10px;
    }

    .hb-burger,
    .hb-search-toggle {
        display: grid;
    }

    .hb-header-search {
        display: none;
    }

    .hb-header-search-mobile {
        display: block;
    }

    .hb-header-search-mobile[hidden] {
        display: none;
    }

    .hb-brand {
        flex: 1 1 auto;
        font-size: 18px;
        gap: 9px;
    }

    .hb-logo {
        height: calc(var(--hb-logo-height) * .8);
    }

    .hb-actions {
        gap: 6px;
    }

    .hb-action--icon:not(.hb-cart-button) {
        display: none;
    }
}

@media (max-width: 420px) {
    .hb-brand span {
        font-size: 16px;
    }
}

@media (prefers-reduced-motion: reduce) {
    .hb-topbar::after,
    .hb-cart-button.has-items .hb-cart-count {
        animation: none;
    }

    .hb-topbar-message,
    .hb-drawer-panel,
    .hb-drawer-backdrop,
    .hb-action,
    .hb-logo {
        transition-duration: .01ms !important;
    }
}
