/* --- CARRINHO DE COMPRAS: layout boutique, sem tabelas RWD --------------- */
.bp-cart {
    display: grid;
    gap: 32px;
    grid-template-columns: 1fr 360px;
}

.bp-cart .page-title {
    border: 0;
    grid-column: 1 / -1;
    margin: 0 0 8px;
    padding: 0;
}

.bp-cart .page-title h1 {
    color: var(--bp-text);
    font-family: var(--bp-display);
    font-size: clamp(2rem, 4vw, 3.4rem);
    font-weight: 500;
    letter-spacing: -.025em;
}

/* --- Tabela de itens (CSS grid, sem <table>) --- */
.bp-cart-table {
    border: 1px solid var(--bp-border);
    border-radius: var(--bp-radius);
    overflow: hidden;
}

.bp-cart-row {
    display: grid;
    gap: 12px;
    grid-template-columns: minmax(0, 1fr) 100px 126px 110px 32px;
    padding: 14px 16px;
}

.bp-cart-row--head {
    background: #f5f5f6;
    border-bottom: 1px solid var(--bp-border);
    padding: 12px 16px;
}

.bp-cart-row--head .bp-cart-cell {
    color: var(--bp-muted);
    font-size: .68rem;
    font-weight: 800;
    letter-spacing: .06em;
    text-transform: uppercase;
}

.bp-cart-row--item {
    align-items: center;
    border-bottom: 1px solid var(--bp-border);
}

.bp-cart-row--item:last-child {
    border-bottom: 0;
}

.bp-cart-row--actions {
    background: #f5f5f6;
    padding: 12px 16px;
}

.bp-cart-cell {
    align-items: center;
    display: flex;
    color: var(--bp-text);
    font-size: .82rem;
}

.bp-cart-cell--full {
    grid-column: 1 / -1;
    gap: 8px;
    justify-content: flex-end;
}

.bp-cart-cell--product {
    gap: 14px;
}

.bp-cart-cell--price,
.bp-cart-cell--subtotal {
    font-weight: 700;
}

/* --- Thumbnail --- */
.bp-cart-thumb {
    border-radius: 10px;
    display: block;
    flex-shrink: 0;
    height: 80px;
    overflow: hidden;
    width: 80px;
}

.bp-cart-thumb img {
    display: block;
    height: 100%;
    object-fit: cover;
    width: 100%;
}

.bp-cart-info {
    min-width: 0;
}

.bp-cart-name {
    display: block;
    font-size: .82rem;
    font-weight: 700;
    line-height: 1.3;
    margin-bottom: 3px;
}

.bp-cart-name a {
    color: var(--bp-text);
    text-decoration: none;
}

.bp-cart-name a:hover {
    color: var(--bp-primary);
}

.bp-cart-options {
    color: var(--bp-muted);
    font-size: .68rem;
    line-height: 1.4;
    margin-bottom: 5px;
}

.bp-cart-options span {
    display: block;
}

.bp-cart-actions {
    display: flex;
    gap: 12px;
}

.bp-cart-link {
    color: var(--bp-muted);
    font-size: .68rem;
    font-weight: 600;
    text-decoration: underline;
    text-underline-offset: 2px;
}

.bp-cart-link:hover {
    color: var(--bp-primary);
}

/* --- Qty stepper --- */
.bp-cart-qty {
    align-items: center;
    display: flex;
    gap: 0;
}

.bp-cart-qty-input {
    background: var(--bp-card);
    border: 1px solid var(--bp-border);
    border-radius: 0;
    color: var(--bp-text);
    font-size: .78rem;
    font-weight: 700;
    height: 36px;
    min-height: 36px;
    padding: 0;
    text-align: center;
    width: 46px;
}

.bp-cart-qty-step {
    align-items: center;
    background: var(--bp-card);
    border: 1px solid var(--bp-border);
    color: var(--bp-muted);
    cursor: pointer;
    display: flex;
    font-size: 1rem;
    height: 36px;
    justify-content: center;
    padding: 0;
    transition: background .15s ease, color .15s ease;
    width: 30px;
}

.bp-cart-qty-step:first-child {
    border-radius: 8px 0 0 8px;
    border-right: 0;
}

.bp-cart-qty-step:last-child {
    border-radius: 0 8px 8px 0;
    border-left: 0;
}

.bp-cart-qty-step:hover {
    background: var(--bp-soft);
    color: var(--bp-text);
}

/* --- Remove button --- */
.bp-cart-remove {
    align-items: center;
    border-radius: 50%;
    color: var(--bp-muted);
    display: flex;
    font-size: 1.25rem;
    height: 28px;
    justify-content: center;
    text-decoration: none;
    transition: background .15s ease, color .15s ease;
    width: 28px;
}

.bp-cart-remove:hover {
    background: color-mix(in srgb, var(--bp-primary) 12%, transparent);
    color: var(--bp-primary);
}

/* --- Botoes de acao --- */
.bp-cart-btn {
    align-items: center;
    border: 1px solid var(--bp-border);
    border-radius: 8px;
    color: var(--bp-text);
    cursor: pointer;
    display: inline-flex;
    font-family: var(--bp-sans);
    font-size: .72rem;
    font-weight: 700;
    gap: 6px;
    justify-content: center;
    min-height: 34px;
    padding: 5px 14px;
    text-decoration: none;
    transition: background .15s ease, border-color .15s ease, color .15s ease;
}

.bp-cart-btn:hover {
    background: var(--bp-soft);
    color: var(--bp-primary);
}

.bp-cart-btn--update {
    background: var(--bp-primary);
    border-color: var(--bp-primary);
    color: var(--bp-on-primary);
}

.bp-cart-btn--update:hover {
    background: var(--bp-accent);
    border-color: var(--bp-accent);
    color: var(--bp-on-accent);
}

.bp-cart-btn--empty {
    color: var(--bp-muted);
}

.bp-cart-btn--empty:hover {
    background: color-mix(in srgb, #d94f70 10%, transparent);
    border-color: #d94f70;
    color: #d94f70;
}

/* --- Sidebar --- */
.bp-cart-sidebar {
    display: flex;
    flex-direction: column;
    gap: 18px;
}

.bp-cart-sidebar__section {
    background: #f5f5f6;
    border-radius: var(--bp-radius);
    padding: 20px;
}

.bp-cart-sidebar__totals {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

/* --- Cupom --- */
.bp-coupon__label {
    color: var(--bp-text);
    display: block;
    font-size: .78rem;
    font-weight: 800;
    margin-bottom: 8px;
}

.bp-coupon__fields {
    display: flex;
    gap: 8px;
}

.bp-coupon__input {
    background: var(--bp-card);
    border: 1px solid var(--bp-border);
    border-radius: 10px;
    color: var(--bp-text);
    flex: 1;
    font-size: .76rem;
    min-height: 40px;
    padding: 8px 12px;
}

.bp-coupon__btn {
    align-items: center;
    background: var(--bp-primary);
    border: 1px solid var(--bp-primary);
    border-radius: 10px;
    color: var(--bp-on-primary);
    cursor: pointer;
    display: inline-flex;
    font-family: var(--bp-sans);
    font-size: .72rem;
    font-weight: 700;
    justify-content: center;
    min-height: 40px;
    padding: 0 14px;
    transition: background .15s ease;
}

.bp-coupon__btn:hover {
    background: var(--bp-accent);
    border-color: var(--bp-accent);
}

.bp-coupon__btn--remove {
    background: transparent;
    border-color: var(--bp-border);
    color: var(--bp-muted);
}

.bp-coupon__btn--remove:hover {
    background: var(--bp-soft);
    color: var(--bp-text);
}

/* --- Frete --- */
.bp-shipping__title {
    color: var(--bp-text);
    display: block;
    font-size: .78rem;
    font-weight: 800;
    margin-bottom: 10px;
}

.bp-shipping__fields {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.bp-shipping__row {
    display: flex;
    gap: 8px;
}

.bp-shipping__row select,
.bp-shipping__input {
    background: var(--bp-card);
    border: 1px solid var(--bp-border);
    border-radius: 10px;
    color: var(--bp-text);
    flex: 1;
    font-size: .76rem;
    min-height: 40px;
    padding: 8px 12px;
}

.bp-shipping__btn {
    align-items: center;
    background: transparent;
    border: 1px solid var(--bp-border);
    border-radius: 10px;
    color: var(--bp-muted);
    cursor: pointer;
    display: inline-flex;
    font-family: var(--bp-sans);
    font-size: .72rem;
    font-weight: 700;
    justify-content: center;
    min-height: 40px;
    padding: 0 14px;
    transition: background .15s ease, border-color .15s ease, color .15s ease;
}

.bp-shipping__btn:hover {
    background: var(--bp-soft);
    border-color: var(--bp-primary);
    color: var(--bp-primary);
}

.bp-shipping__btn--update {
    background: var(--bp-primary);
    border-color: var(--bp-primary);
    color: var(--bp-on-primary);
    margin-top: 10px;
}

.bp-shipping__btn--update:hover {
    background: var(--bp-accent);
    border-color: var(--bp-accent);
}

.bp-shipping__methods {
    list-style: none;
    margin: 12px 0 0;
    padding: 0;
}

.bp-shipping__methods li {
    margin-bottom: 4px;
}

.bp-shipping__method {
    align-items: center;
    color: var(--bp-text);
    cursor: pointer;
    display: flex;
    font-size: .74rem;
    gap: 8px;
}

.bp-shipping__method-price {
    color: var(--bp-primary);
    font-weight: 700;
    margin-left: auto;
}

/* --- Checkout button --- */
.bp-cart-checkout {
    list-style: none;
    margin: 0;
    padding: 0;
}

.bp-cart-checkout .btn-checkout {
    background: var(--bp-primary);
    border: 1px solid var(--bp-primary);
    border-radius: 999px;
    color: var(--bp-on-primary);
    cursor: pointer;
    display: block;
    font-family: var(--bp-sans);
    font-size: .88rem;
    font-weight: 800;
    letter-spacing: .02em;
    min-height: 48px;
    padding: 0 24px;
    text-align: center;
    text-decoration: none;
    text-transform: none;
    transition: background .2s ease, transform .2s ease, box-shadow .2s ease;
    width: 100%;
    line-height: 46px;
}

.bp-cart-checkout .btn-checkout:hover {
    background: var(--bp-accent);
    border-color: var(--bp-accent);
    box-shadow: 0 10px 24px rgba(40, 20, 26, .16);
    transform: translateY(-1px);
}

/* --- Conceituar estilos de totais herdados --- */
.cart-totals table {
    width: 100%;
}

.cart-totals td,
.cart-totals th {
    padding: 6px 0;
    font-size: .78rem;
    color: var(--bp-text);
}

.cart-totals .grand-total td,
.cart-totals .grand-total th {
    border-top: 1px solid var(--bp-border);
    font-size: 1.05rem;
    font-weight: 800;
    padding-top: 12px;
}

.cart-totals .price {
    font-weight: 800;
    white-space: nowrap;
}

/* --- Mensagens --- */
.bp-cart .messages {
    grid-column: 1 / -1;
    margin: 0;
    max-width: none;
}

.bp-cart .item-msg {
    color: var(--bp-muted);
    font-size: .7rem;
    margin: 4px 0 0;
}

/* --- RESPONSIVO --- */
@media (max-width: 960px) {
    .bp-cart {
        gap: 24px;
        grid-template-columns: 1fr;
    }

    .bp-cart-sidebar {
        order: 2;
    }

    .bp-cart-row--head {
        display: none;
    }

    .bp-cart-row--item {
        align-items: start;
        gap: 8px;
        grid-template-columns: 1fr;
        padding: 16px 12px;
        position: relative;
    }

    .bp-cart-cell[data-label]::before {
        content: attr(data-label) ": ";
        color: var(--bp-muted);
        font-size: .68rem;
        font-weight: 700;
    }

    .bp-cart-cell--price,
    .bp-cart-cell--qty,
    .bp-cart-cell--subtotal {
        display: flex;
    }

    .bp-cart-cell--remove {
        position: absolute;
        right: 12px;
        top: 14px;
    }

    .bp-cart-thumb {
        height: 64px;
        width: 64px;
    }

    .bp-cart-row--actions {
        justify-content: stretch;
    }

    .bp-cart-cell--full {
        flex-wrap: wrap;
    }
}

@media (max-width: 770px) {
    .bp-cart-sidebar__section {
        padding: 16px;
    }

    .bp-coupon__fields {
        flex-wrap: wrap;
    }

    .bp-shipping__row {
        flex-wrap: wrap;
    }
}
