/* Ubhaya header: announcement → logo/search/actions → maroon nav with hamburger. */

/* Icons without an explicit size paint at the browser default (300×150) and cover the page. */
svg:not([width]) {
    width: 24px;
    height: 24px;
    max-width: 24px;
    max-height: 24px;
    flex: 0 0 auto;
}

@media (min-width: 901px) {
    .mobile-bottom-nav {
        display: none !important;
    }
}

.site-breadcrumb-band,
.site-breadcrumb {
    display: none !important;
}

.announcement-bar {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: clamp(14px, 2vw, 32px);
    width: 100%;
    min-height: 36px;
    height: 36px;
    padding: 0 16px;
    border-bottom: 1px solid #e7d7b7;
    background: linear-gradient(90deg, #f8f0e2 0%, #fffaf1 50%, #f8f0e2 100%);
    color: #651434;
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.announcement-bar > i {
    color: #b28b50;
    font-style: normal;
}

.announcement-benefit {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    white-space: nowrap;
}

.announcement-benefit svg {
    width: 16px;
    height: 16px;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.8;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.menu-button-icon {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    width: 18px;
    height: 14px;
}

.menu-button-icon span {
    display: block;
    width: 100%;
    height: 2px;
    border-radius: 2px;
    background: currentColor;
}

/* ========== Desktop / laptop ========== */
@media (min-width: 901px) {
    .header {
        display: grid !important;
        grid-template-columns: minmax(200px, 260px) minmax(0, 1fr) max-content !important;
        grid-template-rows: 68px 44px !important;
        align-items: center !important;
        column-gap: clamp(16px, 2vw, 28px) !important;
        row-gap: 0 !important;
        width: 100% !important;
        height: auto !important;
        min-height: 0 !important;
        margin: 0 !important;
        padding: 0 clamp(18px, 2.4vw, 40px) !important;
        border: 0 !important;
        background: #fff !important;
        box-shadow: none !important;
        overflow: visible !important;
    }

    .header > .brand {
        grid-column: 1 !important;
        grid-row: 1 !important;
        position: relative !important;
        left: auto !important;
        top: auto !important;
        transform: none !important;
        z-index: 10 !important;
        display: flex !important;
        align-items: center !important;
        gap: 10px !important;
        width: max-content !important;
        max-width: 100% !important;
        min-width: 0 !important;
        height: 70px !important;
        justify-self: start !important;
        margin: 0 !important;
        padding: 0 !important;
        transform: none !important;
        text-decoration: none !important;
    }

    .header > .brand .brand-mark {
        position: relative !important;
        display: block !important;
        flex: 0 0 58px !important;
        width: 58px !important;
        height: 58px !important;
        overflow: hidden !important;
        border-radius: 4px !important;
    }

    .header > .brand .brand-mark img {
        position: absolute !important;
        top: 50% !important;
        left: 50% !important;
        width: 58px !important;
        max-width: none !important;
        height: 58px !important;
        max-height: none !important;
        object-fit: cover !important;
        transform: translate(-50%, -50%) !important;
    }

    .header > .brand .brand-wordmark {
        display: flex !important;
        flex-direction: column !important;
        align-items: flex-start !important;
        gap: 2px !important;
        color: #651434 !important;
        line-height: 1 !important;
    }

    .header > .brand .brand-wordmark strong {
        font: 600 clamp(20px, 1.7vw, 26px)/1 Georgia, "Times New Roman", serif !important;
        letter-spacing: 0.03em !important;
    }

    .header > .brand .brand-wordmark small {
        color: #ad8547 !important;
        font: 600 9px/1 Arial, Helvetica, sans-serif !important;
        letter-spacing: 0.38em !important;
    }

    .header > .desktop-header-search,
    .header form.desktop-header-search {
        grid-column: 2 !important;
        grid-row: 1 !important;
        display: grid !important;
        grid-template-columns: minmax(0, 1fr) 52px !important;
        width: 100% !important;
        max-width: 500px !important;
        justify-self: end !important;
        height: 42px !important;
        min-height: 42px !important;
        max-height: 42px !important;
        margin: 0 !important;
        padding: 0 !important;
        overflow: hidden !important;
        border: 1px solid #ded9dc !important;
        border-radius: 10px !important;
        background: #fff !important;
        box-shadow: 0 2px 8px rgb(40 30 36 / 7%) !important;
    }

    .header form.desktop-header-search > input[type="search"] {
        width: 100% !important;
        min-width: 0 !important;
        height: 100% !important;
        margin: 0 !important;
        padding: 0 16px !important;
        border: 0 !important;
        outline: 0 !important;
        background: #fff !important;
        color: #393239 !important;
        font-size: 14px !important;
    }

    .header form.desktop-header-search > input[type="search"]::placeholder {
        color: #8f878d !important;
        opacity: 1 !important;
    }

    .header form.desktop-header-search > button[type="submit"] {
        position: static !important;
        top: auto !important;
        right: auto !important;
        display: grid !important;
        place-items: center !important;
        width: 52px !important;
        min-width: 52px !important;
        height: 100% !important;
        margin: 0 !important;
        padding: 0 !important;
        border: 0 !important;
        border-radius: 0 !important;
        background: #a00054 !important;
        color: #fff !important;
        box-shadow: none !important;
        cursor: pointer !important;
    }

    .header form.desktop-header-search > button[type="submit"] svg {
        width: 22px !important;
        height: 22px !important;
        fill: none !important;
        stroke: currentColor !important;
        stroke-width: 2 !important;
    }

    .header > .header-actions {
        position: relative !important;
        top: auto !important;
        right: auto !important;
        left: auto !important;
        transform: none !important;
        grid-column: 3 !important;
        grid-row: 1 !important;
        display: flex !important;
        align-items: center !important;
        justify-content: flex-end !important;
        gap: clamp(14px, 1.6vw, 24px) !important;
        width: max-content !important;
        justify-self: end !important;
        height: 68px !important;
        margin: 0 !important;
        padding: 0 !important;
        z-index: 20 !important;
    }

    .header .header-actions > .header-search-button,
    .header .header-actions > .customer-notification-menu {
        display: none !important;
    }

    /* Guest login stays an icon. The signed-in pill is styled below. */
    .header .header-actions > a.header-account-icon {
        display: inline-flex !important;
        align-items: center !important;
        justify-content: center !important;
        width: 40px !important;
        min-width: 40px !important;
        height: 46px !important;
        padding: 0 !important;
        border: 0 !important;
        background: transparent !important;
        color: #26232a !important;
    }

    .header .header-actions > .wishlist-header-icon,
    .header .header-actions > .cart-icon {
        display: inline-flex !important;
        flex-direction: row !important;
        align-items: center !important;
        gap: 7px !important;
        width: auto !important;
        min-width: 0 !important;
        height: 46px !important;
        min-height: 46px !important;
        padding: 0 !important;
        border: 0 !important;
        border-radius: 0 !important;
        background: transparent !important;
        color: #26232a !important;
        box-shadow: none !important;
        font-size: 13px !important;
        font-weight: 500 !important;
        text-decoration: none !important;
        white-space: nowrap !important;
    }

    .header .header-actions > a.header-account-icon > svg,
    .header .header-actions > .wishlist-header-icon > svg,
    .header .header-actions > .cart-icon > svg {
        width: 24px !important;
        height: 24px !important;
        flex: 0 0 24px !important;
    }

    .header .header-actions .header-action-label {
        display: inline !important;
        font-size: 13px !important;
        font-weight: 500 !important;
    }

    .header .header-actions .header-action-chevron {
        display: block !important;
        width: 13px !important;
        height: 13px !important;
        flex: 0 0 13px !important;
        fill: none !important;
        stroke: currentColor !important;
        stroke-width: 1.8 !important;
    }

    .header .header-actions .header-icon-count {
        top: -2px !important;
        right: auto !important;
        left: 16px !important;
        min-width: 18px !important;
        height: 18px !important;
        border: 0 !important;
        background: #d50062 !important;
        font-size: 10px !important;
        line-height: 18px !important;
    }

    .header .header-actions .account-menu {
        position: relative !important;
        z-index: 30 !important;
    }

    .header .header-actions .account-menu-toggle {
        display: inline-flex !important;
        align-items: center !important;
        justify-content: flex-start !important;
        gap: 8px !important;
        width: auto !important;
        min-width: 0 !important;
        max-width: 220px !important;
        height: 44px !important;
        min-height: 44px !important;
        padding: 4px 12px 4px 4px !important;
        border: 1px solid #ecc9d6 !important;
        border-radius: 999px !important;
        background: #fff !important;
        color: #3a1b27 !important;
        box-shadow: 0 1px 3px rgb(104 20 46 / 10%) !important;
        cursor: pointer !important;
    }

    .header .header-actions .account-menu-toggle:hover,
    .header .header-actions .account-menu.is-open .account-menu-toggle {
        border-color: #a00054 !important;
        background: #fff7fa !important;
        color: #a00054 !important;
    }

    .header .account-menu-avatar {
        display: grid !important;
        place-items: center !important;
        width: 36px !important;
        height: 36px !important;
        flex: 0 0 36px !important;
        border-radius: 50% !important;
        background: #a00054 !important;
        color: #fff !important;
    }

    .header .account-menu-avatar svg {
        width: 18px !important;
        height: 18px !important;
        stroke: currentColor !important;
    }

    .header .header-actions .account-menu-name {
        display: inline-block !important;
        max-width: 130px !important;
        overflow: hidden !important;
        color: inherit !important;
        font-size: 14px !important;
        font-weight: 600 !important;
        line-height: 1 !important;
        text-overflow: ellipsis !important;
        white-space: nowrap !important;
    }

    .header .header-actions .account-menu-toggle-chevron {
        display: block !important;
        width: 14px !important;
        height: 14px !important;
        flex: 0 0 14px !important;
        margin-left: 2px !important;
        fill: none !important;
        stroke: currentColor !important;
    }

    /* Keep desktop navigation in its own second row, separate from the logo/search row. */
    .header > .header-nav-bar {
        grid-column: 1 / -1 !important;
        grid-row: 2 !important;
        display: grid !important;
        grid-template-columns: 48px 1fr !important;
        align-items: center !important;
        width: auto !important;
        max-width: none !important;
        height: 44px !important;
        margin-left: calc(-1 * clamp(18px, 2.4vw, 40px)) !important;
        margin-right: calc(-1 * clamp(18px, 2.4vw, 40px)) !important;
        padding: 0 14px !important;
        background: #a00054 !important;
        visibility: visible !important;
        opacity: 1 !important;
    }

    .header .header-nav-bar > .menu-button {
        position: relative !important;
        z-index: 51 !important;
        display: inline-flex !important;
        align-items: center !important;
        justify-content: center !important;
        width: 36px !important;
        min-width: 36px !important;
        height: 36px !important;
        margin: 0 !important;
        padding: 0 !important;
        border: 0 !important;
        border-radius: 6px !important;
        background: #fff !important;
        color: #2a2227 !important;
        cursor: pointer !important;
        font-size: 0 !important;
        box-shadow: 0 1px 3px rgb(0 0 0 / 12%) !important;
    }

    .header .header-nav-bar > .menu-button:hover,
    .header .header-nav-bar > .menu-button:focus-visible {
        background: #fff4f8 !important;
        color: #a00054 !important;
    }

    .header .header-nav-bar .desktop-primary-nav {
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
        gap: clamp(14px, 2vw, 34px) !important;
        width: 100% !important;
        min-width: 0 !important;
        height: 44px !important;
        margin: 0 !important;
        padding: 0 8px !important;
        background: transparent !important;
    }

    .header .header-nav-bar .desktop-primary-nav > a {
        position: relative !important;
        display: inline-flex !important;
        align-items: center !important;
        min-height: 48px !important;
        padding: 0 4px !important;
        color: #fff !important;
        font: 500 13px/1 Arial, Helvetica, sans-serif !important;
        text-decoration: none !important;
        white-space: nowrap !important;
        background: transparent !important;
        border-radius: 0 !important;
        box-shadow: none !important;
    }

    .header .header-nav-bar .desktop-primary-nav > a::after {
        position: absolute !important;
        right: 2px !important;
        bottom: 0 !important;
        left: 2px !important;
        display: block !important;
        height: 3px !important;
        border-radius: 3px 3px 0 0 !important;
        background: #f4d68e !important;
        content: "" !important;
        transform: scaleX(0) !important;
        transition: transform 0.18s ease !important;
    }

    .header .header-nav-bar .desktop-primary-nav > a.is-active::after,
    .header .header-nav-bar .desktop-primary-nav > a:hover::after,
    .header .header-nav-bar .desktop-primary-nav > a:focus-visible::after {
        transform: scaleX(1) !important;
    }

    .header .header-nav-bar .desktop-primary-nav > a:hover,
    .header .header-nav-bar .desktop-primary-nav > a.is-active {
        color: #ffe7b6 !important;
    }
}

@media (min-width: 901px) and (max-width: 1100px) {
    .header {
        grid-template-columns: minmax(180px, 230px) minmax(220px, 1fr) max-content !important;
        column-gap: 12px !important;
        padding-inline: 14px !important;
    }

    .header > .header-nav-bar {
        margin-left: -14px !important;
        margin-right: -14px !important;
    }

    .header > .brand .brand-mark {
        flex-basis: 48px !important;
        width: 48px !important;
        height: 48px !important;
    }

    .header > .brand .brand-mark img {
        width: 48px !important;
        height: 48px !important;
    }

    .header > .brand .brand-wordmark strong {
        font-size: 18px !important;
    }

    .header form.desktop-header-search {
        height: 44px !important;
        min-height: 44px !important;
        max-height: 44px !important;
        grid-template-columns: minmax(0, 1fr) 46px !important;
    }

    .header .header-actions {
        gap: 10px !important;
    }

    .header .header-actions .header-action-label {
        font-size: 12px !important;
    }

    .header .header-nav-bar .desktop-primary-nav {
        gap: 12px !important;
    }

    .header .header-nav-bar .desktop-primary-nav > a {
        font-size: 12px !important;
    }
}

/* ========== Tablet & phone ========== */
@media (max-width: 900px) {
    /* Fit all announcement benefits on one line on mobile; no horizontal scrolling. */
    .announcement-bar {
        display: flex !important;
        flex-wrap: nowrap !important;
        justify-content: space-between !important;
        align-items: center !important;
        gap: 4px !important;
        width: 100% !important;
        height: 30px !important;
        min-height: 30px !important;
        padding: 0 6px !important;
        overflow: hidden !important;
        font-size: clamp(6px, 1.65vw, 9px) !important;
        letter-spacing: 0 !important;
        line-height: 1 !important;
        white-space: nowrap !important;
    }

    .announcement-bar > i {
        display: none !important;
    }

    .announcement-benefit {
        display: inline-flex !important;
        flex: 0 1 auto !important;
        min-width: 0 !important;
        justify-content: center !important;
        gap: 3px !important;
        white-space: nowrap !important;
    }

    .announcement-benefit svg {
        flex: 0 0 auto !important;
        width: 11px !important;
        height: 11px !important;
    }

    /* Mobile: compact single-row header; hamburger left, centered brand, actions right. */
    .header {
        position: relative !important;
        display: grid !important;
        grid-template-columns: 40px minmax(0, 1fr) auto !important;
        grid-template-rows: 56px !important;
        align-items: center !important;
        column-gap: 6px !important;
        row-gap: 0 !important;
        width: 100% !important;
        height: auto !important;
        min-height: 0 !important;
        padding: 0 12px 0 !important;
        background: #fff !important;
        border: 0 !important;
        box-shadow: 0 1px 0 #efe6ea !important;
        overflow: visible !important;
    }

    .header > .brand {
        grid-column: 2 !important;
        grid-row: 1 !important;
        position: absolute !important;
        display: flex !important;
        align-items: center !important;
        gap: 8px !important;
        justify-content: center !important;
        width: max-content !important;
        max-width: calc(100% - 150px) !important;
        min-width: 0 !important;
        height: 48px !important;
        margin: 0 !important;
        padding: 0 !important;
        transform: translate(-50%, -50%) !important;
        left: calc(50% - 28px) !important;
        top: 50% !important;
    }

    .header > .brand .brand-mark {
        position: relative !important;
        display: block !important;
        flex: 0 0 40px !important;
        width: 40px !important;
        height: 40px !important;
        overflow: hidden !important;
        border-radius: 4px !important;
    }

    .header > .brand .brand-mark img {
        position: absolute !important;
        top: 50% !important;
        left: 50% !important;
        width: 40px !important;
        max-width: none !important;
        height: 40px !important;
        max-height: none !important;
        object-fit: cover !important;
        transform: translate(-50%, -50%) !important;
    }

    .header > .brand .brand-wordmark {
        display: flex !important;
        flex-direction: column !important;
        gap: 1px !important;
        min-width: 0 !important;
        overflow: hidden !important;
        color: #651434 !important;
    }

    .header > .brand .brand-wordmark strong {
        /* Match the desktop UBHAYA wordmark styling, scaled to fit mobile. */
        font: 600 18px/1 Georgia, "Times New Roman", serif !important;
        letter-spacing: 0.03em !important;
        white-space: nowrap !important;
        overflow: hidden !important;
        text-overflow: ellipsis !important;
    }

    .header > .brand .brand-wordmark small {
        color: #ad8547 !important;
        font: 600 7px/1 Arial, Helvetica, sans-serif !important;
        letter-spacing: 0.38em !important;
        white-space: nowrap !important;
    }

    .header > .desktop-header-search,
    .header form.desktop-header-search {
        display: none !important;
        grid-column: 1 / -1 !important;
        grid-row: 2 !important;
        display: grid !important;
        grid-template-columns: minmax(0, 1fr) 44px !important;
        width: 100% !important;
        max-width: none !important;
        height: 42px !important;
        min-height: 42px !important;
        max-height: 42px !important;
        margin: 0 0 6px !important;
        padding: 0 !important;
        overflow: hidden !important;
        border: 1px solid #ded9dc !important;
        border-radius: 10px !important;
        background: #fff !important;
        box-shadow: none !important;
    }

    .header form.desktop-header-search > input[type="search"] {
        width: 100% !important;
        min-width: 0 !important;
        height: 100% !important;
        margin: 0 !important;
        padding: 0 12px !important;
        border: 0 !important;
        outline: 0 !important;
        background: #fff !important;
        font-size: 13px !important;
    }

    .header form.desktop-header-search > button[type="submit"] {
        display: grid !important;
        place-items: center !important;
        width: 44px !important;
        min-width: 44px !important;
        height: 100% !important;
        margin: 0 !important;
        padding: 0 !important;
        border: 0 !important;
        border-radius: 0 !important;
        background: #a00054 !important;
        color: #fff !important;
        box-shadow: none !important;
    }

    .header form.desktop-header-search > button[type="submit"] svg {
        width: 18px !important;
        height: 18px !important;
        fill: none !important;
        stroke: currentColor !important;
        stroke-width: 2 !important;
    }

    .header > .header-actions {
        grid-column: 3 !important;
        grid-row: 1 !important;
        display: flex !important;
        align-items: center !important;
        justify-content: flex-end !important;
        gap: 2px !important;
        width: auto !important;
        min-width: 0 !important;
        height: 56px !important;
        margin: 0 !important;
        padding: 0 !important;
    }

    .header .header-actions > .customer-notification-menu,
    .header .header-actions > .header-search-button {
        display: none !important;
    }

    .header .header-actions > a.header-account-icon,
    .header .header-actions > .wishlist-header-icon,
    .header .header-actions > .cart-icon {
        display: inline-flex !important;
        align-items: center !important;
        justify-content: center !important;
        width: 38px !important;
        min-width: 38px !important;
        height: 38px !important;
        min-height: 38px !important;
        padding: 0 !important;
        border: 0 !important;
        border-radius: 50% !important;
        background: transparent !important;
        color: #2f2429 !important;
        box-shadow: none !important;
    }

    .header .header-actions .header-action-label,
    .header .header-actions .header-action-chevron {
        display: none !important;
    }

    .header .header-actions > a.header-account-icon > svg,
    .header .header-actions > .wishlist-header-icon > svg,
    .header .header-actions > .cart-icon > svg {
        width: 22px !important;
        height: 22px !important;
    }

    .header .header-actions .account-menu-toggle {
        height: 40px !important;
        min-height: 40px !important;
        max-width: 168px !important;
        padding: 3px 10px 3px 3px !important;
    }

    .header .account-menu-avatar {
        width: 32px !important;
        height: 32px !important;
        flex-basis: 32px !important;
    }

    .header .header-actions .header-icon-count {
        top: 2px !important;
        right: 2px !important;
        left: auto !important;
    }

    .header > .header-nav-bar {
        position: absolute !important;
        z-index: 50 !important;
        left: 10px !important;
        top: 50% !important;
        transform: translateY(-50%) !important;
        grid-column: 1 !important;
        grid-row: 1 !important;
        display: flex !important;
        align-items: center !important;
        justify-content: flex-start !important;
        gap: 0 !important;
        width: 40px !important;
        min-width: 40px !important;
        margin: 0 !important;
        height: 44px !important;
        padding: 0 !important;
        background: transparent !important;
    }

    .header .header-nav-bar > .menu-button {
        display: inline-flex !important;
        align-items: center !important;
        justify-content: center !important;
        flex: 0 0 34px !important;
        width: 34px !important;
        min-width: 34px !important;
        height: 34px !important;
        margin: 0 !important;
        padding: 0 !important;
        border: 0 !important;
        border-radius: 6px !important;
        background: #fff !important;
        color: #2a2227 !important;
        font-size: 0 !important;
        box-shadow: 0 1px 3px rgb(0 0 0 / 12%) !important;
    }

    .header .header-nav-bar .desktop-primary-nav {
        display: none !important;
    }

    .header .header-nav-bar::after {
        display: none !important;
        content: none !important;
    }
}

@media (max-width: 600px) {
    .header {
        grid-template-columns: 38px minmax(0, 1fr) auto !important;
        grid-template-rows: 52px !important;
        padding-inline: 10px !important;
    }

    .header > .header-nav-bar {
        width: 38px !important;
        min-width: 38px !important;
        height: 42px !important;
    }

    .header > .brand {
        left: calc(50% - 24px) !important;
        top: 50% !important;
        transform: translate(-50%, -50%) !important;
        justify-content: center !important;
        gap: 6px !important;
        max-width: calc(100% - 112px) !important;
        z-index: 20 !important;
    }

    .header .header-actions {
        gap: 0 !important;
    }

    .header > .brand .brand-wordmark small {
        display: block !important;
        font-size: 6px !important;
        letter-spacing: 0.24em !important;
        line-height: 1.2 !important;
        overflow: visible !important;
        text-overflow: clip !important;
    }

    .header > .brand .brand-wordmark strong {
        font-size: 14px !important;
    }

    .header > .brand .brand-mark {
        flex-basis: 36px !important;
        width: 36px !important;
        height: 36px !important;
    }

    .header > .brand .brand-mark img {
        width: 36px !important;
        height: 36px !important;
    }

    .header .header-actions > .wishlist-header-icon {
        display: none !important;
    }

    .header .header-actions > a.header-account-icon,
    .header .header-actions > .cart-icon {
        width: 36px !important;
        min-width: 36px !important;
        height: 36px !important;
        min-height: 36px !important;
    }

    .header .header-actions .account-menu .account-menu-toggle {
        gap: 6px !important;
        padding: 3px 10px 3px 3px !important;
    }

    .header .header-actions .account-menu .account-menu-toggle-chevron {
        display: block !important;
    }

    .header form.desktop-header-search {
        height: 40px !important;
        min-height: 40px !important;
        max-height: 40px !important;
        grid-template-columns: minmax(0, 1fr) 42px !important;
        margin-bottom: 4px !important;
    }

    .header form.desktop-header-search > button[type="submit"] {
        width: 42px !important;
        min-width: 42px !important;
    }

    .header > .header-nav-bar {
        height: 44px !important;
        margin-left: -10px !important;
        margin-right: -10px !important;
        padding-inline: 10px !important;
    }

    .header .header-nav-bar::after {
        content: "Browse collection";
        font-size: 11px;
        letter-spacing: 0.06em;
    }
}

@media (max-width: 380px) {
    .header > .brand .brand-wordmark strong {
        font-size: 13px !important;
    }

    .header .header-nav-bar::after {
        content: "Menu";
    }
}


/* Keep the complete header together while scrolling. */
.header {
    position: sticky !important;
    top: 0 !important;
    z-index: 1000 !important;
    transition: box-shadow 180ms ease !important;
}

.header.is-scrolled {
    box-shadow: 0 8px 24px rgb(40 10 28 / 14%) !important;
}

/* Desktop header request: icon-only wishlist/cart. */
@media (min-width: 901px) {
    .header .header-actions > .wishlist-header-icon .header-action-label,
    .header .header-actions > .cart-icon .header-action-label {
        display: none !important;
    }

    .header .header-actions > .wishlist-header-icon,
    .header .header-actions > .cart-icon {
        position: relative !important;
        display: inline-flex !important;
        align-items: center !important;
        justify-content: center !important;
        flex: 0 0 36px !important;
        width: 36px !important;
        min-width: 36px !important;
        height: 42px !important;
        min-height: 42px !important;
        margin: 0 !important;
        padding: 0 !important;
    }

    .header .header-actions > .wishlist-header-icon > svg,
    .header .header-actions > .cart-icon > svg {
        display: block !important;
        width: 23px !important;
        height: 23px !important;
    }

}


/* Mobile-only: replace the always-visible header search field with a search icon.
   The existing headerSearchPanel opens as a popup when the icon is tapped. */
@media (max-width: 900px) {
    .header > form.desktop-header-search {
        display: none !important;
    }

    .header .header-actions > .header-search-button {
        display: inline-flex !important;
        align-items: center !important;
        justify-content: center !important;
        flex: 0 0 38px !important;
        width: 38px !important;
        min-width: 38px !important;
        max-width: 38px !important;
        height: 38px !important;
        min-height: 38px !important;
        margin: 0 !important;
        padding: 0 !important;
        border: 0 !important;
        border-radius: 50% !important;
        background: transparent !important;
        color: #2f2429 !important;
        box-shadow: none !important;
        cursor: pointer !important;
    }

    .header .header-actions > .header-search-button svg {
        display: block !important;
        width: 23px !important;
        height: 23px !important;
    }
}


/* Definitive mobile header fix: reserve separate space for the brand and account.
   Keep the signed-in name in the account dropdown on narrow screens. */
@media (max-width: 600px) {
    .header {
        position: relative !important;
        display: flex !important;
        align-items: center !important;
    }

    .header > .brand {
        position: absolute !important;
        left: 50% !important;
        transform: translateX(-50%) !important;
        width: auto !important;
        max-width: calc(100% - 190px) !important;
        min-width: 0 !important;
        z-index: 1 !important;
    }

    .header > .brand .brand-wordmark {
        min-width: 0 !important;
        overflow: hidden !important;
    }

    .header > .brand .brand-wordmark strong,
    .header > .brand .brand-wordmark small {
        overflow: hidden !important;
        text-overflow: ellipsis !important;
        white-space: nowrap !important;
    }

    .header .header-actions .account-menu {
        flex: 0 0 40px !important;
        width: 40px !important;
        min-width: 40px !important;
        max-width: 40px !important;
    }

    .header .header-actions .account-menu .account-menu-toggle {
        width: 40px !important;
        min-width: 40px !important;
        max-width: 40px !important;
        height: 40px !important;
        padding: 0 !important;
        justify-content: center !important;
        gap: 0 !important;
        overflow: hidden !important;
    }

    .header .header-actions .account-menu .account-menu-name,
    .header .header-actions .account-menu .account-menu-toggle-chevron {
        display: none !important;
    }
}

@media (max-width: 380px) {
    .header > .brand {
        max-width: calc(100% - 176px) !important;
    }
}


/* Final mobile header layout: one compact row, search visible, actions on the right.
   Override older mobile rules that moved the logo below the icon row. */
@media (max-width: 900px) {
    .header {
        position: relative !important;
        display: flex !important;
        align-items: center !important;
        justify-content: space-between !important;
        gap: 0 !important;
        box-sizing: border-box !important;
        width: 100% !important;
        height: 68px !important;
        min-height: 68px !important;
        padding: 0 14px !important;
        overflow: visible !important;
    }

    .header > .brand {
        position: absolute !important;
        top: 50% !important;
        left: 50% !important;
        transform: translate(-50%, -50%) !important;
        display: flex !important;
        align-items: center !important;
        gap: 6px !important;
        width: max-content !important;
        max-width: 42% !important;
        height: 56px !important;
        margin: 0 !important;
        padding: 0 !important;
        z-index: 2 !important;
    }

    .header > .brand .brand-mark {
        display: block !important;
        flex: 0 0 42px !important;
        width: 42px !important;
        height: 42px !important;
        overflow: hidden !important;
    }

    .header > .brand .brand-mark img {
        width: 42px !important;
        height: 42px !important;
        max-width: none !important;
        max-height: none !important;
        object-fit: contain !important;
    }

    .header > .brand .brand-wordmark {
        display: flex !important;
        flex-direction: column !important;
        gap: 2px !important;
        min-width: 0 !important;
        overflow: hidden !important;
    }

    .header > .brand .brand-wordmark strong {
        font-size: 16px !important;
        line-height: 1 !important;
        white-space: nowrap !important;
    }

    .header > .brand .brand-wordmark small {
        font-size: 7px !important;
        line-height: 1 !important;
        letter-spacing: .28em !important;
        white-space: nowrap !important;
    }

    .header > form.desktop-header-search {
        display: none !important;
    }

    .header > .header-actions {
        position: relative !important;
        display: flex !important;
        align-items: center !important;
        justify-content: flex-end !important;
        gap: 6px !important;
        width: auto !important;
        height: 100% !important;
        margin-left: auto !important;
        padding: 0 !important;
        z-index: 4 !important;
    }

    .header .header-actions > .header-search-button {
        display: inline-flex !important;
        flex: 0 0 36px !important;
        align-items: center !important;
        justify-content: center !important;
        width: 36px !important;
        min-width: 36px !important;
        max-width: 36px !important;
        height: 40px !important;
        min-height: 40px !important;
        margin: 0 !important;
        padding: 0 !important;
        border: 0 !important;
        background: transparent !important;
        color: #30252b !important;
        visibility: visible !important;
        opacity: 1 !important;
    }

    .header .header-actions > .header-search-button svg {
        display: block !important;
        width: 23px !important;
        height: 23px !important;
    }

    .header .header-actions > .account-menu {
        display: inline-flex !important;
        flex: 0 0 38px !important;
        width: 38px !important;
        min-width: 38px !important;
        max-width: 38px !important;
    }

    .header .header-actions > .account-menu .account-menu-toggle {
        display: inline-flex !important;
        justify-content: center !important;
        width: 38px !important;
        min-width: 38px !important;
        max-width: 38px !important;
        height: 40px !important;
        min-height: 40px !important;
        padding: 0 !important;
        border-radius: 50% !important;
        gap: 0 !important;
    }

    .header .header-actions > .account-menu .account-menu-name,
    .header .header-actions > .account-menu .account-menu-toggle-chevron {
        display: none !important;
    }

    .header .header-actions > .customer-notification-menu {
        display: none !important;
    }

    .header .header-actions > .wishlist-header-icon,
    .header .header-actions > .cart-icon {
        display: inline-flex !important;
        flex: 0 0 36px !important;
        width: 36px !important;
        min-width: 36px !important;
        max-width: 36px !important;
        height: 40px !important;
        align-items: center !important;
        justify-content: center !important;
        margin: 0 !important;
        padding: 0 !important;
    }
}

/* On very narrow phones, keep the centered logo compact and preserve all actions. */
@media (max-width: 380px) {
    .header { padding-inline: 10px !important; }
    .header > .brand { max-width: 38% !important; gap: 4px !important; }
    .header > .brand .brand-mark { flex-basis: 36px !important; width: 36px !important; height: 36px !important; }
    .header > .brand .brand-mark img { width: 36px !important; height: 36px !important; }
    .header > .brand .brand-wordmark strong { font-size: 14px !important; }
    .header .header-actions { gap: 2px !important; }
}


/* Mobile header refinement: remove cart/wishlist from the top row.
   Keep these destinations in the bottom navigation and style the signed-in
   account control as a subtle, polished avatar instead of a large outlined circle. */
@media (max-width: 900px) {
    .header .header-actions > .wishlist-header-icon,
    .header .header-actions > .cart-icon {
        display: none !important;
    }

    .header .header-actions > .account-menu {
        display: inline-flex !important;
        flex: 0 0 36px !important;
        width: 36px !important;
        min-width: 36px !important;
        max-width: 36px !important;
        margin: 0 0 0 2px !important;
    }

    .header .header-actions > .account-menu .account-menu-toggle {
        display: inline-flex !important;
        align-items: center !important;
        justify-content: center !important;
        box-sizing: border-box !important;
        width: 34px !important;
        min-width: 34px !important;
        max-width: 34px !important;
        height: 34px !important;
        min-height: 34px !important;
        padding: 0 !important;
        border: 1px solid #ead4dd !important;
        border-radius: 50% !important;
        background: linear-gradient(145deg, #fff8fb, #f7e7ee) !important;
        color: #78183f !important;
        box-shadow: 0 2px 6px rgb(83 23 49 / 8%) !important;
        gap: 0 !important;
        overflow: hidden !important;
    }

    .header .header-actions > .account-menu .account-menu-avatar {
        display: inline-flex !important;
        align-items: center !important;
        justify-content: center !important;
        width: 20px !important;
        height: 20px !important;
        margin: 0 !important;
        padding: 0 !important;
        background: transparent !important;
        border: 0 !important;
        box-shadow: none !important;
    }

    .header .header-actions > .account-menu .account-menu-avatar svg {
        display: block !important;
        width: 20px !important;
        height: 20px !important;
        stroke: currentColor !important;
        stroke-width: 1.8 !important;
    }

    .header .header-actions > .account-menu .account-menu-name,
    .header .header-actions > .account-menu .account-menu-toggle-chevron {
        display: none !important;
    }

    .header .header-actions {
        gap: 5px !important;
    }
}
