/* ============================================================
 * TP V4 — Bottom mobile bar (Ignavo-style)
 * Visível só em <768px. 5 quick actions na safe area.
 * ============================================================ */

.tp4-bottombar {
    position: fixed; left: 0; right: 0; bottom: 0;
    display: none;
    z-index: 80;
    background: rgba(255, 255, 255, 0.96);
    backdrop-filter: saturate(180%) blur(14px);
    -webkit-backdrop-filter: saturate(180%) blur(14px);
    border-top: 1px solid var(--tp4-border);
    box-shadow: 0 -4px 20px rgba(15, 17, 21, 0.08);
    padding-bottom: env(safe-area-inset-bottom);
}

@media (max-width: 767px) {
    .tp4-bottombar { display: grid; grid-template-columns: repeat(5, 1fr); }
    /* Reserve scroll space para o bar */
    body.tp4-theme { padding-bottom: calc(64px + env(safe-area-inset-bottom)); }
}

.tp4-bottombar__item {
    appearance: none; border: none; background: transparent; cursor: pointer;
    text-decoration: none;
    display: flex; flex-direction: column; align-items: center; justify-content: center;
    gap: 0.15rem;
    padding: 0.55rem 0.25rem 0.6rem;
    color: var(--tp4-text-soft);
    font-size: 10.5px; font-weight: var(--tp4-fw-semi); letter-spacing: 0.02em;
    transition: color var(--tp4-dur) var(--tp4-ease-out);
}
.tp4-bottombar__item:hover { color: var(--tp4-c-brand); }
.tp4-bottombar__item.is-active { color: var(--tp4-c-brand); }
.tp4-bottombar__item.is-active::before {
    content: ''; position: absolute; top: 0; left: 20%; right: 20%; height: 3px;
    background: var(--tp4-c-brand); border-radius: 0 0 3px 3px;
}
.tp4-bottombar__item { position: relative; }

.tp4-bottombar__icon { position: relative; line-height: 0; }
.tp4-bottombar__icon svg { stroke-width: 1.7; }

.tp4-bottombar__label { line-height: 1; }

/* CTA central (Pesquisar) — pílula destacada estilo Ignavo */
.tp4-bottombar__item--cta {
    position: relative;
}
.tp4-bottombar__item--cta .tp4-bottombar__icon {
    width: 48px; height: 48px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--tp4-c-brand), #e88450);
    color: #fff;
    display: inline-flex; align-items: center; justify-content: center;
    margin-top: -22px;
    box-shadow: 0 8px 18px rgba(194, 84, 27, 0.40);
    transition: transform var(--tp4-dur) var(--tp4-ease-out);
}
.tp4-bottombar__item--cta:hover .tp4-bottombar__icon { transform: translateY(-2px); }
.tp4-bottombar__item--cta .tp4-bottombar__label { color: var(--tp4-text); margin-top: 0.1rem; }

/* Cart badge — visual igual ao cart-btn__count */
.tp4-bottombar__badge {
    position: absolute; top: -4px; right: -8px;
    min-width: 18px; height: 18px; padding: 0 4px;
    background: var(--tp4-c-brand); color: #fff;
    border-radius: var(--tp4-r-pill);
    font-size: 10px; font-weight: var(--tp4-fw-bold);
    display: inline-flex; align-items: center; justify-content: center;
    line-height: 1;
    border: 2px solid #fff;
}
.tp4-bottombar__badge[data-empty="1"] { display: none; }
