/* ================================================================
   carrinho.css
   Ordem: variáveis → barra de volume → layout → cards → sidebar
          → frete → botão flutuante → modais → mobile
================================================================ */

/* ================================================================
   1. VARIÁVEIS
================================================================ */
:root {
    --cart-verde:      #0b7d3a;
    --cart-verde-esc:  #0b4d1c;
    --cart-verde-bg:   #f3faf5;
    --cart-verde-leve: #e6f4ea;
    --cart-borda:      #eef2ef;
    --cart-radius:     22px;
    --cart-shadow:     0 12px 30px rgba(0,0,0,.06);
    --float-h:         72px; /* altura da barra flutuante */
}

/* ================================================================
   2. BARRA DE VOLUME — topo, full-width
================================================================ */
.vol-bar-wrap {
    background: #fff;
    border-bottom: 1px solid var(--cart-borda);
    padding: 14px 0 10px;
}

.vol-bar-inner {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.vol-track-row {
    display: flex;
    align-items: center;
    gap: 14px;
}

.vol-label {
    font-size: 12px;
    font-weight: 600;
    color: #555;
    white-space: nowrap;
}

.vol-track {
    flex: 1;
    position: relative;
}

.vol-track-bg {
    height: 12px;
    background: #e6efe9;
    border-radius: 999px;
    overflow: hidden;
    position: relative;
}

.vol-fill {
    height: 12px;
    border-radius: 999px;
    background: #c0392b;
    transition: width .5s cubic-bezier(.34,1.3,.64,1), background .4s ease;
    position: relative;
}

.vol-fill::after {
    content: attr(data-label);
    position: absolute;
    right: 0;
    top: -26px;
    font-size: 11px;
    font-weight: 700;
    color: #1c1c1c;
    background: #fff;
    border: 1px solid #d0d7d3;
    padding: 2px 7px;
    border-radius: 6px;
    white-space: nowrap;
    transform: translateX(50%);
    pointer-events: none;
}

.vol-track-row .vol-fill-wrap {
    height: 12px;
    background: #e6efe9;
    border-radius: 999px;
    overflow: hidden;
    flex: 1;
}

.vol-markers {
    display: flex;
    position: relative;
    height: 32px;
    margin-top: 6px;
}

.vol-marker {
    position: absolute;
    transform: translateX(-50%);
    text-align: center;
}

.vm-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #ccc;
    margin: 0 auto 3px;
    border: 2px solid #fff;
    box-shadow: 0 0 0 1px #ccc;
    transition: background .3s, box-shadow .3s;
}

.vm-dot.ativo {
    background: var(--cart-verde);
    box-shadow: 0 0 0 1px var(--cart-verde);
}

.vm-txt {
    font-size: 10px;
    color: #888;
    line-height: 1.3;
    white-space: nowrap;
}

.vm-txt small {
    color: #aaa;
    font-size: 9px;
}

.vol-kg-label {
    font-size: 13px;
    font-weight: 700;
    color: #1c1c1c;
    white-space: nowrap;
    min-width: 80px;
    text-align: right;
}

/* Bloco mobile do medidor — oculto no desktop */
.vol-mobile-block {
    display: none;
}

.vol-status {
    font-size: 13px;
    font-weight: 600;
    padding: 8px 14px;
    border-radius: 8px;
    line-height: 1.5;
    transition: background .3s, color .3s;
}

.vol-status.vs-danger {
    background: #fff0ef;
    color: #a32d2d;
    border: 1px solid #f09595;
}

.vol-status.vs-warn {
    background: #faeeda;
    color: #633806;
    border: 1px solid #fac775;
}

.vol-status.vs-ok {
    background: #eaf3de;
    color: #27500a;
    border: 1px solid #c0dd97;
}

/* ================================================================
   3. PÁGINA — espaço extra para a barra flutuante no rodapé
================================================================ */
.cart-page {
    padding: 32px 24px calc(var(--float-h) + 40px);
    overflow-x: hidden;
}

/* ================================================================
   4. GRID PRINCIPAL (desktop: 2fr + sidebar | mobile: 1 col)
================================================================ */
.cart-grid {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 30px;
    align-items: start;
}

/* ================================================================
   5. COLUNA ESQUERDA — grade de 2 cards por linha
================================================================ */
.cart-left {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
    min-width: 0;
}

/* Botão "Adicionar mais" ocupa a linha inteira */
.cart-actions {
    grid-column: 1 / -1;
    display: flex;
    justify-content: center;
    padding-top: 4px;
}

/* ================================================================
   6. CARD DO PRODUTO
================================================================ */
.cart-item {
    background: #fff;
    border-radius: var(--cart-radius);
    padding: 20px;
    box-shadow: var(--cart-shadow);
    display: flex;
    flex-direction: column;
    gap: 12px;
    border: 1px solid rgba(11,125,58,.06);
    transition: transform .2s ease;
    min-width: 0;
    overflow: visible; /* permite balão sair dos limites do card */
    position: relative;
}

.cart-item:hover {
    transform: translateY(-3px);
}

/* ================================================================
   BALÃO INFORMATIVO — "aumente a quantidade e pague menos"
================================================================ */
.cart-item-balloon {
    position: absolute;
    bottom: 68px;
    left: 16px;
    transform: scale(.88);
    transform-origin: bottom left;

    background: #fffde7;
    border: 1.5px solid #f5c842;
    border-radius: 14px;
    padding: 10px 14px;
    width: max-content;
    max-width: 200px;
    text-align: left;

    font-size: 13px;
    font-weight: 700;
    color: #5a4000;
    line-height: 1.4;
    pointer-events: none;
    z-index: 10;

    opacity: 0;
    transition: opacity .2s ease, transform .2s ease;
}

/* cauda: triângulo apontando para baixo-esquerda, em direção ao input */
.cart-item-balloon::after {
    content: '';
    position: absolute;
    top: 100%;
    left: 28px;
    border: 8px solid transparent;
    border-top-color: #f5c842;
}

.cart-item-balloon::before {
    content: '';
    position: absolute;
    top: 100%;
    left: 30px;
    border: 6px solid transparent;
    border-top-color: #fffde7;
    z-index: 1;
    margin-top: -1px;
}

.cart-item-balloon.balloon-visible {
    opacity: 1;
    transform: scale(1);
}

.balloon-icon {
    display: inline-block;
    margin-right: 4px;
    font-style: normal;
}

.cart-item-top {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 8px;
}

.cart-item-category {
    font-size: 12px;
    font-weight: 600;
    color: #0f5132;
    background: var(--cart-verde-leve);
    padding: 3px 9px;
    border-radius: 999px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: calc(100% - 44px);
}

.cart-remove {
    flex-shrink: 0;
    color: #dc3545;
    text-decoration: none;
    font-size: 22px;
    line-height: 1;
    width: 30px;
    height: 30px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    background: #fff4f4;
}

.cart-item-main {
    display: grid;
    grid-template-columns: 80px 1fr;
    gap: 12px;
    align-items: start;
}

.cart-thumb-wrap {
    width: 80px;
    height: 80px;
    border-radius: 14px;
    overflow: hidden;
    background: #f4f7f4;
    border: 1px solid var(--cart-borda);
    flex-shrink: 0;
}

.cart-thumb-link,
.cart-thumb {
    display: block;
    width: 100%;
    height: 100%;
}

.cart-thumb {
    object-fit: cover;
}

.cart-item-content {
    min-width: 0;
}

.cart-item-title {
    font-size: 14px;
    font-weight: 600;
    line-height: 1.4;
    margin: 0 0 4px;
}

.cart-product-link {
    color: #1c1c1c;
    text-decoration: none;
    font-weight: 600;
    line-height: 1.4;
    transition: color .2s ease;
}

.cart-product-link:hover {
    color: var(--cart-verde);
}

.cart-item-measure {
    font-size: 13px;
    color: #27342d;
}

.cart-item-weight {
    font-size: 12px;
    color: #666;
    margin-top: 2px;
}

/* — preço unitário */
.cart-price-box {
    margin-top: 2px;
}

.price-label {
    font-size: 11px;
    color: #777;
    display: block;
    margin-bottom: 4px;
}

.price-main {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

/* Preço atual — o usuário está aqui agora */
.price-value {
    font-size: 20px;
    font-weight: 800;
    color: #b45309; /* âmbar: nem bom nem ruim, é onde está */
    transition: all .25s ease;
}

/* Quando chegou no melhor preço, fica verde */
.price-value.preco-minimo {
    color: var(--cart-verde);
}

/* Wrapper do preço-meta */
.price-goal-wrap {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    background: #f0faf4;
    border: 1px solid #c0dd97;
    border-radius: 99px;
    padding: 2px 8px 2px 6px;
}

.price-goal-label {
    font-size: 10px;
    color: #27500a;
    font-weight: 500;
    white-space: nowrap;
}

/* Melhor preço possível — verde: a meta */
.price-goal {
    font-size: 13px;
    font-weight: 700;
    color: #0b7d3a;
    white-space: nowrap;
}

/* Hint de incentivo */
.price-economy-hint {
    display: flex;
    align-items: center;
    gap: 4px;
    font-size: 11px;
    color: #27500a;
    font-weight: 600;
    margin-top: 5px;
}

/* Legado — mantido por segurança */
.price-old {
    font-size: 13px;
    font-weight: 600;
    color: #c0392b;
    text-decoration: line-through;
    opacity: .85;
}

.price-old-label {
    font-size: 10px;
    color: #999;
    font-weight: 400;
    margin-right: -4px;
}

.price-disc-badge {
    font-size: 11px;
    font-weight: 700;
    padding: 2px 7px;
    border-radius: 999px;
    background: #eaf3de;
    color: #27500a;
}

.price-value.updated {
    transform: scale(1.06);
    background: #fef3c7;
    padding: 3px 7px;
    border-radius: 8px;
}

/* — rodapé do card */
.cart-item-bottom {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    flex-wrap: nowrap;
    margin-top: 6px;
    padding-top: 10px;
    border-top: 1px solid var(--cart-borda);
}

.cart-qtd label {
    display: block;
    font-size: 12px;
    font-weight: 500;
    margin-bottom: 4px;
    color: #555;
}

.cart-qtd input {
    width: 80px;
    padding: 7px;
    border-radius: 8px;
    border: 1px solid #ccc;
    text-align: center;
    font-size: 14px;
}

.cart-subtotal-box {
    text-align: right;
    white-space: nowrap;
}

.cart-subtotal-box span {
    display: block;
    font-size: 12px;
    color: #666;
    margin-bottom: 2px;
}

.cart-subtotal-box strong {
    font-size: 17px;
    font-weight: 800;
    color: var(--cart-verde);
    white-space: nowrap;
}

.btn-add-more {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 20px;
    border-radius: 999px;
    background: #fff;
    border: 2px solid var(--cart-verde);
    color: var(--cart-verde);
    font-weight: 600;
    text-decoration: none;
    transition: all .2s ease;
    max-width: 100%;
    text-align: center;
}

.btn-add-more:hover {
    background: var(--cart-verde);
    color: #fff;
    transform: translateY(-2px);
}

/* ================================================================
   7. COLUNA DIREITA — sidebar
================================================================ */
.cart-right {
    position: sticky;
    top: 120px;
    display: flex;
    flex-direction: column;
    gap: 20px;
    min-width: 0;
}

/* — Resumo */
.cart-summary {
    background: var(--cart-verde-bg);
    border-radius: var(--cart-radius);
    padding: 20px 24px;
}

.cart-summary-line {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 8px;
    margin-bottom: 8px;
    flex-wrap: wrap;
}

.cart-summary-value {
    font-size: 22px;
    font-weight: 800;
    color: var(--cart-verde);
    white-space: nowrap;
}

/* ================================================================
   8. CARD DE FRETE — novo layout
================================================================ */
.cart-frete-card {
    background: #fff;
    border-radius: var(--cart-radius);
    padding: 22px;
    box-shadow: 0 10px 28px rgba(0,0,0,.06);
    border: 1.5px solid transparent;
    transition: border-color .35s ease, box-shadow .35s ease;
}

.cart-frete-card.frete-destacado {
    border-color: var(--cart-verde);
    box-shadow: 0 8px 32px rgba(11,125,58,.18);
}

.cart-frete-card h3 {
    font-size: 15px;
    font-weight: 700;
    margin-bottom: 14px;
    color: #1c1c1c;
}

.frete-tipo-toggle {
    display: flex;
    gap: 8px;
    margin-bottom: 12px;
}

.frete-tipo-btn {
    flex: 1;
    padding: 8px 12px;
    border-radius: 8px;
    border: 1px solid #d7ddd9;
    background: #fff;
    color: #444;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: all .2s ease;
}

.frete-tipo-btn:hover { border-color: var(--cart-verde); }

.frete-tipo-btn.active {
    border-color: var(--cart-verde-esc);
    background: var(--cart-verde-esc);
    color: #fff;
}

.frete-input-group {
    display: flex;
    gap: 10px;
    align-items: flex-end;
    flex-wrap: wrap;
}

.frete-field {
    flex: 1;
    min-width: 120px;
    display: flex;
    flex-direction: column;
}

.frete-field-uf {
    flex: 0 0 90px;
    min-width: 90px;
}

.frete-field label {
    font-size: 12px;
    font-weight: 600;
    margin-bottom: 5px;
    color: #444;
}

.frete-field input,
.frete-field select {
    padding: 11px 13px;
    border-radius: 10px;
    border: 1px solid #d7ddd9;
    font-size: 14px;
    transition: all .2s ease;
    width: 100%;
    background: #fff;
}

.frete-field input:focus,
.frete-field select:focus {
    border-color: var(--cart-verde);
    box-shadow: 0 0 0 3px rgba(11,125,58,.12);
    outline: none;
}

.btn-frete {
    height: 44px;
    padding: 0 18px;
    border-radius: 10px;
    font-size: 13px;
    font-weight: 600;
    background: var(--cart-verde-esc);
    color: #fff;
    border: none;
    cursor: pointer;
    white-space: nowrap;
    flex-shrink: 0;
    transition: opacity .2s;
}

.btn-frete:hover { opacity: .88; }

.frete-info {
    font-size: 12px;
    color: #666;
    margin-top: 10px;
    line-height: 1.5;
}

.frete-info strong {
    color: var(--cart-verde-esc);
}

/* — Resultado do frete */
.frete-result-card {
    margin-top: 16px;
    border-top: 1px solid var(--cart-borda);
    padding-top: 16px;
    animation: fadeSlideIn .3s ease;
}

@keyframes fadeSlideIn {
    from { opacity: 0; transform: translateY(8px); }
    to   { opacity: 1; transform: translateY(0); }
}

.frete-result-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
}

.frete-result-title {
    font-size: 13px;
    font-weight: 700;
    color: #1c1c1c;
}

.frete-veiculo-badge {
    font-size: 11px;
    font-weight: 600;
    background: var(--cart-verde-leve);
    color: var(--cart-verde-esc);
    padding: 3px 10px;
    border-radius: 999px;
}

.frete-result-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px 14px;
    margin-bottom: 12px;
}

.frg-item {}

.frg-label {
    display: block;
    font-size: 10px;
    color: #999;
    margin-bottom: 2px;
    text-transform: uppercase;
    letter-spacing: .03em;
}

.frg-value {
    display: block;
    font-size: 13px;
    font-weight: 600;
    color: #1c1c1c;
}

.frete-valor-destaque {
    background: var(--cart-verde-leve);
    border-radius: 10px;
    padding: 12px 14px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.fvd-label {
    font-size: 12px;
    font-weight: 600;
    color: #27500a;
}

.fvd-value {
    font-size: 20px;
    font-weight: 800;
    color: var(--cart-verde);
}

.frete-promo-msg {
    margin-top: 10px;
    background: #faeeda;
    border: 1px solid #fac775;
    border-radius: 8px;
    padding: 9px 12px;
    font-size: 12px;
    color: #633806;
    line-height: 1.5;
}

.frete-disclaimer {
    margin-top: 8px;
    font-size: 11px;
    color: #aaa;
}

.frete-erro {
    background: #fff3f3;
    border: 1px solid #ffd6d6;
    color: #b00000;
    padding: 12px;
    border-radius: 8px;
    font-weight: 500;
    font-size: 13px;
    margin-top: 12px;
}

/* ================================================================
   9. BOTÃO FINALIZAR — sidebar (secundário, sem destaque)
================================================================ */
.finalizar-box {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.btn-finalizar-whatsapp {
    padding: 16px;
    font-size: 16px;
    font-weight: 700;
    background: linear-gradient(135deg, #1dbf73, #0b7d3a);
    color: #fff;
    border: none;
    border-radius: 999px;
    cursor: pointer;
    transition: opacity .2s ease, transform .2s ease;
    width: 100%;
}

.btn-finalizar-whatsapp:disabled {
    background: #ccc;
    cursor: not-allowed;
    opacity: .7;
}

.btn-finalizar-whatsapp:not(:disabled):hover {
    transform: translateY(-2px);
    opacity: .92;
}

.whatsapp-helper {
    font-size: 12px;
    color: #666;
    line-height: 1.5;
    text-align: center;
}

.whatsapp-helper.aviso {
    color: #a32d2d;
    font-weight: 600;
}

/* ================================================================
   10. BARRA FLUTUANTE — CTA fixo no rodapé
================================================================ */
.float-cta-bar {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 900;
    background: #fff;
    border-top: 1px solid var(--cart-borda);
    box-shadow: 0 -6px 20px rgba(0,0,0,.08);
    height: var(--float-h);
    display: flex;
    align-items: center;
}

.float-cta-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
}

.float-cta-info {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.float-cta-total {
    font-size: 20px;
    font-weight: 800;
    color: var(--cart-verde);
    line-height: 1;
}

.float-cta-status {
    font-size: 12px;
    color: #888;
    line-height: 1.3;
}

.float-cta-status.status-danger { color: #a32d2d; font-weight: 600; }
.float-cta-status.status-warn   { color: #633806; }
.float-cta-status.status-ok     { color: var(--cart-verde); }

.btn-float-finalizar {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 14px 24px;
    border-radius: 999px;
    border: none;
    font-size: 15px;
    font-weight: 700;
    cursor: pointer;
    white-space: nowrap;
    transition: opacity .2s ease, transform .2s ease, background .3s ease;
    background: #128C7E;
    color: #fff;
}

.btn-float-finalizar:disabled {
    background: #ccc;
    color: #888;
    cursor: not-allowed;
}

.btn-float-finalizar:not(:disabled):hover {
    opacity: .9;
    transform: translateY(-1px);
}

/* ================================================================
   11. MODAIS
================================================================ */
.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,.55);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    padding: 16px;
}

.modal-overlay.active { display: flex; }

.modal-box {
    background: #fff;
    width: 100%;
    max-width: 460px;
    border-radius: 18px;
    overflow: hidden;
    position: relative;
    animation: modalFade .25s ease;
}

@keyframes modalFade {
    from { opacity: 0; transform: translateY(15px); }
    to   { opacity: 1; transform: translateY(0); }
}

/* — Header verde */
.modal-header {
    background: #1B4D2E;
    padding: 24px 28px 20px;
}

.modal-header-top {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
}

.modal-badge {
    display: flex;
    align-items: center;
    gap: 7px;
    margin-bottom: 6px;
}

.modal-badge-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #5DCAA5;
    flex-shrink: 0;
}

.modal-badge span {
    font-size: 11px;
    color: #9FE1CB;
    letter-spacing: 0.06em;
    font-weight: 600;
    text-transform: uppercase;
}

.modal-header h3 {
    margin: 0 0 8px;
    font-size: 20px;
    font-weight: 600;
    color: #fff;
    line-height: 1.3;
}

.modal-sub {
    font-size: 13px;
    color: #9FE1CB;
    margin: 0;
    line-height: 1.5;
}

.modal-close {
    background: rgba(255,255,255,.15);
    border: none;
    color: #fff;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    transition: background .2s;
}

.modal-close:hover { background: rgba(255,255,255,.25); }

/* — Body */
.modal-body {
    padding: 20px 28px 24px;
}

/* — Status card */
.modal-status-card {
    background: #f5f7f5;
    border-radius: 10px;
    padding: 12px 14px;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 10px;
    border: 1px solid #e0e8e2;
}

.modal-status-icon {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: #E1F5EE;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.modal-status-icon svg { display: block; }

.modal-status-text p:first-child {
    margin: 0 0 2px;
    font-size: 11px;
    color: #888;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.modal-status-text p:last-child {
    margin: 0;
    font-size: 13px;
    font-weight: 600;
    color: #1B4D2E;
}

/* — Form */
.form-group {
    display: flex;
    flex-direction: column;
    gap: 5px;
    margin-bottom: 14px;
}

.form-group label {
    font-size: 13px;
    font-weight: 600;
    color: #444;
}

.form-group label .label-hint {
    font-weight: 400;
    color: #999;
}

.form-group input {
    padding: 11px 14px;
    border-radius: 10px;
    border: 1px solid #d7ddd9;
    font-size: 14px;
    transition: all .2s ease;
    color: #222;
}

.form-group input::placeholder { color: #bbb; }

.form-group input:focus {
    border-color: #1B4D2E;
    outline: none;
    box-shadow: 0 0 0 3px rgba(27,77,46,.1);
}

.btn-modal-enviar {
    width: 100%;
    background: #1B4D2E;
    color: #fff;
    border: none;
    padding: 13px;
    border-radius: 10px;
    font-weight: 600;
    cursor: pointer;
    margin-top: 4px;
    font-size: 15px;
    transition: background .2s;
    letter-spacing: 0.01em;
}

.btn-modal-enviar:hover { background: #0F6E56; }

/* — Footer garantias */
.modal-helper {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 12px;
    margin-top: 14px;
}

.modal-helper-item {
    display: flex;
    align-items: center;
    gap: 5px;
}

.modal-helper-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: #5DCAA5;
    flex-shrink: 0;
}

.modal-helper-item span {
    font-size: 11px;
    color: #999;
}

.modal-helper-sep {
    width: 1px;
    height: 12px;
    background: #e0e0e0;
}

/* — Modal sucesso */
.modal-sucesso {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,.55);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    padding: 16px;
}

.modal-sucesso.active { display: flex; }

.modal-sucesso-content {
    background: #fff;
    padding: 35px;
    border-radius: 16px;
    width: 100%;
    max-width: 420px;
    text-align: center;
    animation: fadeUp .3s ease;
}

.check-icon {
    width: 60px;
    height: 60px;
    margin: 0 auto 15px;
    background: #25D366;
    color: #fff;
    font-size: 30px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.btn-whats {
    background: #25D366;
    color: #fff;
    border: none;
    padding: 12px 18px;
    border-radius: 8px;
    cursor: pointer;
    margin-top: 18px;
    font-weight: 600;
    display: none;
}

.contador {
    margin-top: 15px;
    font-size: 14px;
    opacity: .7;
}

@keyframes fadeUp {
    from { transform: translateY(10px); opacity: 0; }
    to   { transform: translateY(0);    opacity: 1; }
}

/* ================================================================
   12. ALERT
================================================================ */
.alert-error {
    background: #fff3f3;
    border: 1px solid #ffd6d6;
    color: #b00000;
    padding: 14px 18px;
    border-radius: 10px;
    font-weight: 500;
}

.cart-empty {
    text-align: center;
    font-size: 18px;
    color: #666;
    padding: 60px 0;
}

/* ================================================================
   13. RESPONSIVO — tablet (≤ 1100px)
================================================================ */
@media (max-width: 1100px) {
    .cart-grid {
        grid-template-columns: 1.5fr 1fr;
    }

    .cart-left {
        grid-template-columns: 1fr;
    }
}

/* ================================================================
   14. RESPONSIVO — tablet médio (≤ 900px): sidebar abaixo
================================================================ */
@media (max-width: 900px) {
    .cart-grid {
        grid-template-columns: 1fr;
    }

    .cart-right {
        position: static;
    }

    .cart-left {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* ================================================================
   15. MOBILE — ≤ 600px
   Barra de volume redesenhada + cards ampliados
================================================================ */
@media (max-width: 600px) {

    /* ── PÁGINA ── */
    .cart-page {
        padding: 16px 12px calc(var(--float-h) + 28px);
    }

    /* ── GRADE: 1 coluna ── */
    .cart-left {
        grid-template-columns: 1fr;
        gap: 14px;
    }

    /* ────────────────────────────────────────────────────────────
       BARRA DE VOLUME — redesign mobile
       No mobile a track horizontal fica minúscula.
       Trocamos por um layout vertical tipo "medidor de tanque"
       com círculo de progresso + texto de status centralizado.
    ─────────────────────────────────────────────────────────── */
    .vol-bar-wrap {
        padding: 16px 0 14px;
    }

    .vol-bar-inner {
        gap: 12px;
    }

    /* Esconde a linha horizontal */
    .vol-track-row {
        display: none;
    }

    /* Mostra o bloco mobile no lugar */
    .vol-mobile-block {
        display: flex !important;
        align-items: center;
        gap: 16px;
        padding: 0 4px;
    }

    /* Círculo de progresso SVG */
    .vol-ring-wrap {
        flex-shrink: 0;
        position: relative;
        width: 72px;
        height: 72px;
    }

    .vol-ring-svg {
        width: 72px;
        height: 72px;
        transform: rotate(-90deg);
    }

    .vol-ring-track {
        fill: none;
        stroke: #e6efe9;
        stroke-width: 6;
    }

    .vol-ring-fill {
        fill: none;
        stroke-width: 6;
        stroke-linecap: round;
        transition: stroke-dashoffset .6s cubic-bezier(.34,1.3,.64,1), stroke .4s ease;
    }

    .vol-ring-label {
        position: absolute;
        inset: 0;
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        line-height: 1.1;
    }

    .vol-ring-kg {
        font-size: 13px;
        font-weight: 800;
        color: #1c1c1c;
    }

    .vol-ring-unit {
        font-size: 9px;
        color: #888;
        font-weight: 500;
    }

    /* Texto ao lado do anel */
    .vol-mobile-text {
        flex: 1;
        min-width: 0;
    }

    .vol-mobile-pct {
        font-size: 22px;
        font-weight: 800;
        color: #1c1c1c;
        line-height: 1;
        margin-bottom: 2px;
    }

    .vol-mobile-sub {
        font-size: 12px;
        color: #666;
        line-height: 1.4;
    }

    /* Marcos de referência em linha */
    .vol-mobile-milestones {
        display: flex;
        gap: 8px;
        margin-top: 6px;
    }

    .vol-milestone-pill {
        display: inline-flex;
        align-items: center;
        gap: 4px;
        font-size: 10px;
        font-weight: 600;
        padding: 2px 8px;
        border-radius: 99px;
    }

    .vol-milestone-pill.atingido {
        background: #eaf3de;
        color: #27500a;
    }

    .vol-milestone-pill.pendente {
        background: #f0f0ef;
        color: #888;
    }

    .vol-milestone-dot {
        width: 6px;
        height: 6px;
        border-radius: 50%;
        flex-shrink: 0;
    }

    .vol-milestone-pill.atingido .vol-milestone-dot { background: #0b7d3a; }
    .vol-milestone-pill.pendente .vol-milestone-dot  { background: #bbb; }

    /* Status message — mantém como está mas ajusta fontes */
    .vol-status {
        font-size: 13px;
        padding: 10px 14px;
        border-radius: 10px;
    }

    /* ────────────────────────────────────────────────────────────
       CARD DE PRODUTO — ampliado para mobile
    ─────────────────────────────────────────────────────────── */
    .cart-item {
        padding: 18px 16px;
        border-radius: 18px;
    }

    /* Categoria maior */
    .cart-item-category {
        font-size: 13px;
        padding: 5px 12px;
    }

    /* Foto maior — ocupa mais espaço */
    .cart-item-main {
        grid-template-columns: 100px 1fr;
        gap: 14px;
        align-items: start;
    }

    .cart-thumb-wrap {
        width: 100px;
        height: 100px;
        border-radius: 14px;
    }

    /* Título maior */
    .cart-item-title {
        font-size: 16px;
        margin-bottom: 6px;
    }

    .cart-product-link {
        font-size: 16px;
    }

    /* Medida e peso maiores */
    .cart-item-measure {
        font-size: 14px;
        margin-bottom: 2px;
    }

    .cart-item-weight {
        font-size: 13px;
    }

    /* Preço unitário maior */
    .price-label {
        font-size: 13px;
        margin-bottom: 3px;
    }

    .price-value {
        font-size: 26px;
        font-weight: 800;
    }

    .price-old {
        font-size: 14px;
    }

    .price-disc-badge {
        font-size: 12px;
        padding: 3px 8px;
    }

    /* Linha de quantidade e subtotal — empilhada */
    .cart-item-bottom {
        flex-direction: column;
        align-items: stretch;
        gap: 12px;
        margin-top: 14px;
        padding-top: 14px;
    }

    .cart-qtd label {
        font-size: 14px;
        margin-bottom: 6px;
    }

    .cart-qtd input {
        width: 100%;
        padding: 12px;
        font-size: 18px;
        border-radius: 10px;
    }

    /* Subtotal mais destaque */
    .cart-subtotal-box {
        display: flex;
        justify-content: space-between;
        align-items: center;
        background: var(--cart-verde-leve);
        border-radius: 10px;
        padding: 10px 14px;
        text-align: left;
    }

    .cart-subtotal-box span {
        font-size: 14px;
        color: #27500a;
        font-weight: 600;
        margin-bottom: 0;
        display: inline;
    }

    .cart-subtotal-box strong {
        font-size: 20px;
    }

    /* ── BARRA FLUTUANTE ── */
    .float-cta-inner {
        gap: 10px;
    }

    .float-cta-total {
        font-size: 16px;
    }

    .float-cta-status {
        font-size: 11px;
    }

    .btn-float-finalizar {
        font-size: 13px;
        padding: 12px 14px;
        gap: 6px;
        white-space: nowrap;
    }

    /* ── FRETE ── */
    .frete-input-group {
        flex-direction: column;
        gap: 10px;
    }

    .frete-field-uf {
        flex: 1 1 auto;
        width: 100%;
    }

    .frete-field input,
    .frete-field select {
        font-size: 16px; /* evita zoom no iOS */
        padding: 13px 14px;
    }

    .btn-frete {
        width: 100%;
        height: 50px;
        font-size: 15px;
        border-radius: 12px;
    }

    /* Resultado do frete — layout mobile */
    .frete-result-card {
        margin-top: 14px;
        padding-top: 14px;
    }

    .frete-result-header {
        flex-direction: row;
        align-items: center;
        margin-bottom: 10px;
    }

    .frete-result-title {
        font-size: 14px;
    }

    .frete-veiculo-badge {
        font-size: 12px;
        padding: 4px 10px;
    }

    /* Grid 1 coluna no mobile para mais espaço */
    .frete-result-grid {
        grid-template-columns: 1fr 1fr;
        gap: 10px 16px;
        margin-bottom: 12px;
    }

    .frg-label {
        font-size: 10px;
        margin-bottom: 1px;
    }

    .frg-value {
        font-size: 14px;
    }

    /* Destaque do valor — empilhado verticalmente */
    .frete-valor-destaque {
        flex-direction: column;
        align-items: flex-start;
        gap: 4px;
        padding: 12px 14px;
        border-radius: 10px;
    }

    .fvd-label {
        font-size: 12px;
    }

    .fvd-value {
        font-size: 24px;
    }

    /* Disclaimer menor */
    .frete-disclaimer {
        font-size: 10px;
        margin-top: 6px;
    }

    /* Card de frete destacado — borda mais grossa no mobile */
    .cart-frete-card.frete-destacado {
        border-width: 2px;
    }

    /* Resumo sidebar */
    .cart-summary {
        padding: 16px;
    }

    .cart-summary-value {
        font-size: 24px;
    }

    /* Botão finalizar sidebar — desnecessário no mobile pois há o flutuante */
    .finalizar-box {
        display: none;
    }
}

/* ================================================================
   16. MOBILE PEQUENO — ≤ 400px
================================================================ */
@media (max-width: 400px) {
    .cart-item {
        padding: 14px 12px;
    }

    .cart-item-main {
        grid-template-columns: 84px 1fr;
        gap: 10px;
    }

    .cart-thumb-wrap {
        width: 84px;
        height: 84px;
    }

    .price-value {
        font-size: 22px;
    }

    .cart-subtotal-box strong {
        font-size: 18px;
    }

    .btn-float-finalizar {
        padding: 10px 12px;
        font-size: 12px;
    }

    .vol-ring-wrap {
        width: 60px;
        height: 60px;
    }

    .vol-ring-svg {
        width: 60px;
        height: 60px;
    }

    .vol-ring-kg {
        font-size: 11px;
    }

    .vol-mobile-pct {
        font-size: 18px;
    }
}