/* ── Screen base ── */
.screen { padding-bottom: 80px; }

/* ── Fixed bottom action bar (replaces Telegram MainButton for styled screens) ── */
.screen-footer {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 10px 16px;
    padding-bottom: calc(10px + env(safe-area-inset-bottom, 0px));
    background: var(--bg);
    border-top: 1px solid var(--brd);
    z-index: 50;
}

/* ── Header ── */
header {
    position: sticky;
    top: 0;
    z-index: 200;
    background: var(--bg);
    border-bottom: 1px solid var(--brd-strong);
}

.hdr-row {
    display: grid;
    grid-template-columns: 64px 1fr 64px;
    align-items: center;
    height: 64px;
}

.hdr-left {
    display: flex;
    align-items: center;
    justify-content: center;
}

.hdr-right {
    display: flex;
    align-items: center;
    justify-content: center;
}

.hdr-icon-btn {
    all: unset;
    cursor: pointer;
    color: var(--text);
    display: flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    -webkit-tap-highlight-color: transparent;
    transition: opacity .12s;
}
.hdr-icon-btn:active { opacity: .5; }
.hdr-icon-btn:focus  { outline: none; }

#header-title {
    font-family: var(--font-ui);
    font-style: normal;
    font-weight: 500;
    font-size: 24px;
    line-height: 1;
    text-align: center;
    color: var(--text);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

#cart-btn { position: relative; }

#cart-badge {
    position: absolute;
    top: 2px; right: 2px;
    background: var(--red);
    color: var(--red-txt);
    font-size: 10px;
    font-weight: 700;
    border-radius: var(--r-sm);
    min-width: 16px;
    height: 16px;
    line-height: 16px;
    text-align: center;
    padding: 0 3px;
    display: none;
}

/* ── Breadcrumb bar ── */
#breadcrumb-bar {
    position: sticky;
    top: 64px;
    z-index: 150;
    background: var(--bg);
    border-bottom: 1px solid var(--brd);
    height: 40px;
    display: flex;
    align-items: center;
    padding: 0 16px;
    gap: 4px;
    overflow: hidden;
}

.bc-item {
    all: unset;
    font-family: var(--font-ui);
    font-size: 12px;
    line-height: 16px;
    color: var(--hint);
    cursor: pointer;
    white-space: nowrap;
    flex-shrink: 0;
    -webkit-tap-highlight-color: transparent;
}
.bc-item:active { opacity: .6; }

.bc-sep {
    color: var(--hint);
    font-size: 11px;
    flex-shrink: 0;
    user-select: none;
    line-height: 1;
}

.bc-active {
    font-family: var(--font-ui);
    font-size: 12px;
    font-weight: 500;
    color: var(--btn);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    min-width: 0;
}
