/* ==========================================================
   SECTIONS › CART
   Página do carrinho de compras
   ========================================================== */

.cart-page,
.checkout-page,
.success-page {
    max-width: 1120px;
    margin: 0 auto;
    padding: 58px 24px;
    display: grid;
    grid-template-columns: 1fr 340px;
    gap: 28px;
    align-items: start;
}

.cart-page > .flash { grid-column: 1 / -1; }

.cart-table {
    display: grid;
    gap: 14px;
    transition: opacity 0.2s ease;
}

.cart-table.is-updating { opacity: 0.65; }

.cart-item {
    display: grid;
    grid-template-columns: 84px minmax(180px, 1fr) 130px 120px auto;
    align-items: center;
    gap: 18px;
    padding: 18px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #fff;
    box-shadow: 0 12px 34px rgba(0, 44, 27, 0.08);
}

.cart-item-image {
    width: 84px;
    height: 84px;
    display: grid;
    place-items: center;
    overflow: hidden;
    border-radius: 14px;
    background: #f1f7f3;
}

.cart-item-image img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.cart-item-info > strong { color: var(--green-950); }

.cart-item span {
    display: block;
    margin-top: 5px;
    color: var(--muted);
    font-weight: 600;
}

.cart-actions {
    display: flex;
    justify-content: space-between;
    gap: 14px;
    flex-wrap: wrap;
}

.cart-summary,
.checkout-summary,
.success-card,
.empty-state {
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #fff;
    box-shadow: 0 12px 34px rgba(0, 44, 27, 0.08);
    padding: 24px;
}

.cart-summary h2,
.checkout-summary h2,
.success-card h2 {
    margin-top: 0;
    color: var(--green-950);
}

.cart-summary div,
.checkout-summary div {
    display: flex;
    justify-content: space-between;
    gap: 18px;
    margin: 12px 0;
}

.cart-summary .btn,
.checkout-summary .btn { width: 100%; margin-top: 16px; }

.cart-summary .cart-summary-total {
    margin-top: 16px;
    padding-top: 16px;
    border-top: 1px solid #dce8e1;
    font-size: 1.1rem;
    color: var(--green-950);
}
