/* Header */
.bsb-header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    padding: 1rem 0;
    z-index: 1000;
    pointer-events: none;
}

.header-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: 100%;
}

@media (min-width: 1660px) {
    .header-container {
        padding-left: 10rem;
        padding-right: 10rem;
    }

    .bsb-left-sidebar {
        left: calc(10rem + 25px) !important;
    }
}

.bsb-header-logo {
    pointer-events: auto;
    width: 80px;
    /* Constrained explicitly to 80px */
}

.bsb-header-logo img {
    width: 100%;
    height: auto;
}

.bsb-menu-toggle,
.bsb-menu-close {
    pointer-events: auto;
    background: none;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    outline: none;
}

.bsb-header-actions {
    display: flex;
    align-items: center;
    gap: 1.25rem;
    pointer-events: auto;
}

.bsb-bag-toggle {
    display: flex;
    align-items: center;
    justify-content: center;
    pointer-events: auto;
}

.bsb-bag-wrapper {
    position: relative;
    display: inline-flex;
}

.bsb-bag-count {
    position: absolute;
    top: -7px;
    left: -9px;
    min-width: 16px;
    height: 16px;
    background: #e02020;
    color: #ffffff;
    font-size: 10px;
    font-weight: 700;
    border-radius: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 3px;
    line-height: 1;
    pointer-events: none;
}

.bsb-bag-icon {
    width: 26px;
    height: auto;
    transition: opacity 0.3s ease;
}

.bsb-bag-toggle:hover .bsb-bag-icon {
    opacity: 0.7;
}

.bsb-menu-toggle {
    z-index: 1001;
}

.bsb-menu-icon {
    width: 35px;
    height: auto;
    transition: opacity 0.3s ease;
}

/* Off-Canvas Menu completely covers header properly upon slide-in to fix layering bleed */
.bsb-offcanvas-menu {
    position: fixed;
    top: 0;
    right: 0;
    width: 100vw;
    max-width: 50%;
    height: 100vh;
    background-color: #000000;
    z-index: 2000;
    /* Force fully over header logic unconditionally */
    display: flex;
    align-items: center;
    transform: translateX(100%);
    /* box-shadow: -10px 0 30px rgba(0, 0, 0, 0.5); */
    visibility: hidden;
}

.bsb-menu-close {
    position: absolute;
    top: 3.5rem;
    left: 4rem;
    z-index: 2001;
}

.bsb-offcanvas-bag {
    position: absolute;
    top: 3.75rem;
    right: 10rem;
    z-index: 2001;
    display: flex;
    align-items: center;
    justify-content: center;
}

.bsb-offcanvas-bag .bsb-bag-icon {
    width: 26px;
    filter: brightness(0) invert(1);
}

.bsb-offcanvas-bag:hover .bsb-bag-icon {
    opacity: 0.7;
    transform: scale(1.1);
}

/* Reduced size accurately */
.bsb-close-icon {
    width: 26px;
    /* Matched to design scale strictly smaller */
    filter: brightness(0) invert(1);
    transition: transform 0.3s cubic-bezier(0.87, 0, 0.13, 1);
}

.bsb-menu-close:hover .bsb-close-icon {
    transform: scale(1.15) rotate(90deg);
}

.bsb-menu-inner {
    padding-left: 7rem;
    width: 100%;
}

.bsb-menu-list {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.bsb-menu-item {
    overflow: hidden;
}

.bsb-menu-link {
    display: inline-block;
    text-decoration: none;
    color: #ffffff;
    font-family: var(--bsb-font-display);
    font-size: 1.4rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.15em;
    position: relative;
    transform: translateY(100%);
    transition: color 0.3s ease;
}

.bsb-menu-link::after {
    content: '';
    position: absolute;
    top: calc(50% - 4px);
    left: -15px;
    width: calc(100% + 30px);
    height: 2px;
    background-color: var(--theme-pink);
    transform: scaleX(0) translateY(50%);
    transform-origin: left;
    transition: transform 0.3s ease;
}

.bsb-menu-link:hover::after {
    transform: scaleX(1) translateY(50%);
}

/* Left Sidebar - Fixed global presence for brand continuity */
.bsb-left-sidebar {
    position: fixed;
    /* left: calc(50% - 700px + 25px); */
    left: 40px;
    /* Aligned with the 1400px container grid */
    top: 0;
    height: 100vh;
    /* Viewport height for fixed positioning */
    width: 30px;
    z-index: 50;
    /* Above sections, below header overlays if any */
    pointer-events: none;
}

@media (max-width: 1440px) {
    .bsb-left-sidebar {
        left: 25px;
    }
}

.bsb-sidebar-text {
    position: absolute;
    top: 50vh;
    left: 50%;
    transform: translate(-50%, -50%) rotate(180deg);
    pointer-events: auto;
    font-family: var(--bsb-font-primary);
    font-size: 1.1rem;
    font-weight: 500;
    text-transform: none;
    letter-spacing: 0.15em;
    writing-mode: vertical-rl;
    white-space: nowrap;
    opacity: 0.95;
    color: #ffffff;
    transition: color 0.4s ease;
}

.bsb-social-icons {
    position: absolute;
    bottom: 4rem;
    /* Pinned near the bottom to match design snapshot */
    left: 50%;
    transform: translateX(-50%);
    pointer-events: auto;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 1.5rem;
}

.bsb-social-icons a {
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0.8;
    transition: all 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.bsb-social-icons a:hover {
    opacity: 1;
    transform: scale(1.15) translateY(-2px);
}

.bsb-social-icons img {
    /* Scale gracefully within perfect explicitly boxed container */
    max-width: 100%;
    max-height: 100%;
    height: auto;
    filter: brightness(0) invert(1);
    transition: filter 0.4s ease;
}

/* Sidebar Dynamic States — mirrors header is-light/is-dark logic */
.bsb-left-sidebar.is-dark .bsb-sidebar-text {
    color: var(--bsb-color-text);
}

.bsb-left-sidebar.is-dark .bsb-social-icons img {
    filter: brightness(0);
}

.bsb-left-sidebar.is-light .bsb-sidebar-text {
    color: #ffffff;
}

.bsb-left-sidebar.is-light .bsb-social-icons img {
    filter: brightness(0) invert(1);
}

/* Responsive adjustments */
@media (max-width: 1024px) {
    .bsb-left-sidebar {
        display: none;
    }
}

@media (max-width: 768px) {
    .bsb-offcanvas-menu {
        width: 100vw;
        max-width: 100vw;
    }

    .bsb-menu-inner {
        padding-left: 3rem;
    }

    .bsb-menu-link {
        font-size: 1.2rem;
    }

    .bsb-menu-close {
        left: 2rem;
    }

    .bsb-offcanvas-bag {
        right: 2rem;
    }
}

/* Dynamic Header States (Logo, Toggle, and Bag) */
.bsb-header.is-light .bsb-header-logo img,
.bsb-header.is-light .bsb-menu-icon,
.bsb-header.is-light .bsb-bag-toggle .bsb-bag-icon {
    filter: brightness(0) invert(1);
    /* Force White */
}

.bsb-header.is-dark .bsb-header-logo img,
.bsb-header.is-dark .bsb-menu-icon,
.bsb-header.is-dark .bsb-bag-toggle .bsb-bag-icon {
    filter: brightness(0);
    /* Force Black/Dark */
}