/* ============================================================
   MHDCommerce — Página de Carrinho
   Arquivo: wwwroot/css/carrinho.css
   Carregado SÓ na view do Carrinho (@section Styles), não no _Layout.
   Drawer de revisão e .spinner ficam no add-carrinho.css (globais).
   ============================================================ */

.content { max-width: 1200px; margin: 0 auto; padding: 28px 32px 60px; }
.page-title { font-family: 'Sora', sans-serif; font-size: 26px; font-weight: 700; margin-bottom: 4px; }
.page-sub { font-size: 14px; color: var(--muted); margin-bottom: 24px; }

.cart-layout { display: grid; grid-template-columns: 1fr 340px; gap: 24px; align-items: start; }

/* ── Lista de itens ── */
.cart-items { display: flex; flex-direction: column; gap: 12px; }
.cart-item { background: var(--white); border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 16px; display: flex; gap: 16px; align-items: flex-start; position: relative; transition: opacity .2s; }
.cart-item.removendo { opacity: .4; pointer-events: none; }
.ci-thumb { width: 88px; height: 88px; border-radius: var(--radius-md); background: white; flex-shrink: 0; display: flex; align-items: center; justify-content: center; font-size: 42px; position: relative; overflow: hidden; }
.ci-thumb img { width: 100%; height: 100%; object-fit: contain; padding: 6px; }
.ci-clube-selo { position: absolute; bottom: 2px; left: 2px; width: 20px; height: 20px; border-radius: 99px; background: var(--clube); color: #fff; display: flex; align-items: center; justify-content: center; font-size: 9px; font-weight: 700; border: 2px solid #fff; }
.ci-info { flex: 1; min-width: 0; }
.ci-badges { display: flex; gap: 5px; margin-bottom: 5px; flex-wrap: wrap; }
.ci-badge { font-size: 9px; font-weight: 700; padding: 2px 7px; border-radius: 99px; text-transform: uppercase; letter-spacing: .3px; }
.ci-badge.oferta { background: var(--brand-light); color: var(--brand-dark); }
.ci-badge.exclusivo { background: var(--brand-dark); color: #fff; }
.ci-badge.clube { background: var(--clube-light); color: var(--clube); }
.ci-badge.atacarejo { background: var(--atacarejo-light); color: var(--atacarejo); }
.ci-nome { font-family: 'Sora', sans-serif; font-size: 15px; font-weight: 600; line-height: 1.3; margin-bottom: 4px; }
.ci-preco-unit { font-size: 13px; color: var(--muted); }
.ci-preco-unit b { color: var(--brand); font-weight: 700; }
.ci-obs { margin-top: 8px; font-size: 12px; color: var(--text-2); background: var(--bg); border-radius: var(--radius-sm); padding: 6px 10px; display: inline-flex; gap: 6px; align-items: center; }
.ci-obs .ico { color: var(--muted); }

.ci-right { display: flex; flex-direction: column; align-items: flex-end; gap: 12px; flex-shrink: 0; }
.ci-remover { background: none; border: none; cursor: pointer; color: var(--muted); font-size: 12px; display: flex; align-items: center; gap: 4px; padding: 4px; }
.ci-remover:hover { color: var(--red); }
.ci-qtd { display: flex; align-items: center; background: var(--white); border: 1.5px solid var(--border); border-radius: var(--radius-md); overflow: hidden; }
.ci-qtd-btn { width: 36px; height: 36px; border: none; background: var(--white); cursor: pointer; font-size: 17px; color: var(--brand); display: flex; align-items: center; justify-content: center; }
.ci-qtd-btn:hover:not(:disabled) { background: var(--brand-light); }
.ci-qtd-btn:disabled { color: #ccc; cursor: not-allowed; }
.ci-qtd-value { width: 64px; height: 36px; border: none; border-left: 1.5px solid var(--border); border-right: 1.5px solid var(--border); text-align: center; font-family: 'Sora', sans-serif; font-size: 14px; font-weight: 600; }
.ci-total { font-family: 'Sora', sans-serif; font-size: 19px; font-weight: 700; color: var(--text); }

/* ── Resumo (sticky) ── */
.cart-summary { background: var(--white); border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 22px; position: sticky; top: 20px; }
.cs-title { font-family: 'Sora', sans-serif; font-size: 17px; font-weight: 700; margin-bottom: 16px; }
.cs-row { display: flex; justify-content: space-between; font-size: 14px; color: var(--text-2); padding: 7px 0; }
.cs-row.economia { color: var(--brand); font-weight: 600; }
.cs-divider { height: 1px; background: var(--border); margin: 12px 0; }
.cs-total { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 18px; }
.cs-total-label { font-size: 15px; font-weight: 600; }
.cs-total-valor { font-family: 'Sora', sans-serif; font-size: 26px; font-weight: 700; color: var(--brand); }
.cs-btn { width: 100%; height: 52px; background: var(--brand); color: #fff; border: none; border-radius: var(--radius-md); font-family: 'DM Sans', sans-serif; font-size: 16px; font-weight: 700; cursor: pointer; display: flex; align-items: center; justify-content: center; gap: 8px; }
.cs-btn:hover { background: var(--brand-mid); }
.cs-continuar { display: block; text-align: center; margin-top: 12px; font-size: 13px; color: var(--brand); text-decoration: none; font-weight: 600; }
.cs-continuar:hover { text-decoration: underline; }
.cs-selo { margin-top: 16px; padding-top: 16px; border-top: 1px solid var(--border); font-size: 12px; color: var(--muted); display: flex; align-items: center; gap: 8px; }

/* ── Estado vazio ── */
.cart-vazio { text-align: center; padding: 80px 20px; }
.cart-vazio-ico { font-size: 64px; margin-bottom: 16px; }
.cart-vazio-titulo { font-family: 'Sora', sans-serif; font-size: 22px; font-weight: 700; margin-bottom: 8px; }
.cart-vazio-sub { font-size: 14px; color: var(--muted); margin-bottom: 24px; }
.cart-vazio-btn { display: inline-flex; background: var(--brand); color: #fff; border: none; border-radius: var(--radius-md); padding: 14px 28px; font-family: 'DM Sans', sans-serif; font-size: 15px; font-weight: 700; cursor: pointer; text-decoration: none; }

/* ── Responsivo: resumo vira barra fixa no rodapé ── */
@media (max-width: 900px) {
    .cart-layout { grid-template-columns: 1fr; }
    .cart-summary { position: fixed; left: 0; right: 0; bottom: 0; top: auto; border-radius: var(--radius-xl) var(--radius-xl) 0 0; border: none; border-top: 1px solid var(--border); box-shadow: 0 -8px 30px rgba(0,0,0,.1); padding: 16px 20px; z-index: 100; }
    .cart-summary { bottom: var(--bn-altura, 0px); }   /* acima da barra inferior; entre 769 e 900px não há barra */
    .cs-title, .cs-selo, .cs-rows-detalhe, .cs-divider { display: none; }
    .cs-total { margin-bottom: 12px; }
    .content { padding-bottom: 180px; }
    .cart-item { padding: 12px; gap: 12px; }
    .ci-thumb { width: 70px; height: 70px; }
}
@media (max-width: 520px) {
    .content { padding-left: 16px; padding-right: 16px; }
    .ci-right { gap: 8px; }
    .ci-total { font-size: 17px; }
}

.cs-btn.carregando {
    opacity: .9;
    cursor: wait;
}


