/* Keep the original desktop controls; account labels may contain a full name. */
@media (min-width: 1024px) {
    .store-header-actions .store-account > span { max-width: 170px; }
    .store-header-actions .store-account small {
        max-width: 170px;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
    }
}

/* Anchor the item count to the shopping bag, including multi-digit counts. */
.modern-storefront .store-header-actions .store-cart {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 44px;
    width: 44px;
    height: 44px;
    gap: 0;
}

.modern-storefront .store-header-actions .store-cart > svg {
    width: 32px;
    height: 32px;
}

.modern-storefront .store-header-actions .store-cart .cart-count,
.modern-storefront .store-header-actions .store-cart .indicator__value {
    position: absolute !important;
    top: -1px;
    right: -3px;
    display: grid;
    place-items: center;
    width: auto;
    min-width: 21px;
    height: 21px;
    padding: 0 4px;
    border: 2px solid #fff;
    border-radius: 999px;
    font-size: 10px;
    line-height: 1;
    font-weight: 600;
}

@media (max-width: 767px) {
    .modern-storefront .store-header-actions .store-cart {
        flex-basis: 36px;
        width: 36px;
        height: 40px;
    }

    .modern-storefront .store-header-actions .store-cart > svg {
        width: 28px;
        height: 28px;
    }
}

/* Match the homepage header across server-rendered storefront pages. */
.modern-storefront .store-header {
    font-family: Inter, "Noto Sans Bengali", Arial, sans-serif;
    font-size: 14px;
    line-height: 1.6;
}
.modern-storefront .store-topbar { font-family: Inter, "Noto Sans Bengali", Arial, sans-serif; }
.store-header :is(button, input, select) { font-family: inherit; }
.store-header .interface-language-switcher { display: flex; align-items: center; margin: 0; }
.store-header .interface-language-switcher select {
    font: inherit;
    font-size: 12px;
    padding: 7px 9px;
    border: 1px solid var(--border, #e4dfd7);
    border-radius: 8px;
    color: inherit;
    background: #fff;
    max-width: 120px;
    cursor: pointer;
}
.store-header .currency-switcher { display: flex; align-items: center; gap: 10px; margin: 0; }
.store-header .currency-switcher select {
    font: inherit;
    font-size: 12px;
    min-height: 34px;
    padding: 7px 9px;
    border: 1px solid var(--border, #e4dfd7);
    border-radius: 8px;
    background: #fff;
    color: inherit;
    cursor: pointer;
}
.store-header :is(.currency-switcher, .interface-language-switcher) select:focus-visible {
    outline: none;
    border-color: var(--store-green, #f28c28);
    box-shadow: none;
}
@media (max-width: 767px) {
    .store-header .currency-switcher-desktop { display: none; }
}
@media (max-width: 700px) {
    .store-header .interface-language-switcher select { font-size: 11px; max-width: 94px; padding: 6px; }
}

/* Keep the private edit shortcut beside the announcement, without an extra header row. */
[data-store-edit-tools][hidden] { display: none !important; }
.store-topbar > .container > .store-topbar-intro {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 6px 14px;
    padding-block: 4px;
}
.store-topbar .store-edit-link {
    display: inline-flex;
    align-items: center;
    flex-shrink: 0;
    gap: 5px;
    padding: 3px 8px;
    border: 1px solid #a76c38;
    border-radius: 5px;
    color: #ffdfb8;
    font-size: 11px;
    font-weight: 600;
    line-height: 1.4;
    white-space: nowrap;
    text-decoration: none;
}
.store-topbar .store-edit-link:hover,
.store-topbar .store-edit-link:focus-visible {
    color: #fff;
    border-color: #f28c28;
    outline: none;
    box-shadow: none;
}
.store-edit-link svg { flex-shrink: 0; }
@media (max-width: 767px) {
    .store-topbar > .container { flex-wrap: wrap; gap: 2px 10px; }
    .store-topbar > .container > .store-topbar-intro { gap: 5px 8px; }
    .store-topbar .store-edit-link:last-child { display: inline-flex; font-size: 10px; }
}
