/* Página do carrinho e badge do header. */

.loja-carrinho__item {
    display: flex;
    gap: 1rem;
    align-items: flex-start;
    padding: 1rem 0;
    border-bottom: 1px solid rgba(0, 0, 0, .08);
}

.loja-carrinho__item:last-child {
    border-bottom: 0;
}

.loja-carrinho__thumb {
    width: 84px;
    height: 84px;
    object-fit: contain;
    background: #fff;
    border: 1px solid rgba(0, 0, 0, .08);
    border-radius: .5rem;
    flex: 0 0 auto;
}

.loja-carrinho__nome {
    font-weight: 600;
    line-height: 1.3;
}

.loja-carrinho__variacao {
    font-size: .875rem;
    color: #6c757d;
}

.loja-carrinho__linha-total {
    white-space: nowrap;
    font-weight: 600;
}

.loja-carrinho__resumo {
    position: sticky;
    top: 1rem;
}

.loja-carrinho__resumo-linha {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    padding: .35rem 0;
}

.loja-carrinho__resumo-total {
    font-size: 1.15rem;
    font-weight: 700;
    border-top: 1px solid rgba(0, 0, 0, .1);
    margin-top: .5rem;
    padding-top: .75rem;
}

.loja-carrinho__vazio {
    text-align: center;
    padding: 3rem 1rem;
}

/* Badge do carrinho no cabeçalho. */
.loja-header__cart {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.loja-header__cart-badge {
    position: absolute;
    top: -.35rem;
    right: -.35rem;
    min-width: 1.15rem;
    height: 1.15rem;
    padding: 0 .3rem;
    border-radius: 999px;
    background: #dc3545;
    color: #fff;
    font-size: .7rem;
    line-height: 1.15rem;
    text-align: center;
    font-weight: 700;
}

.loja-header__cart-badge[hidden] {
    display: none;
}

/* Toast de "adicionado ao carrinho". */
.loja-carrinho-toast {
    position: fixed;
    right: 1rem;
    bottom: 1rem;
    z-index: 1080;
    max-width: 22rem;
}

@media (max-width: 575.98px) {
    .loja-carrinho__item {
        flex-wrap: wrap;
    }

    .loja-carrinho__resumo {
        position: static;
    }
}
