/* ==== APP VENDEDOR ====
   Folha de estilo isolada do app de força de vendas. Não depende de
   styles.css nem é usada por nenhuma página do cliente final — remover este
   arquivo junto com os vendedor-*.html/.js é suficiente para tirar o app do
   vendedor do projeto sem afetar o restante do site. */

:root {
    --vd-red: #ee161f;
    --vd-red-dark: #770b10;
    --vd-gray: #4e4e4e;
    --vd-bg: #f4f4f5;
    --vd-border: #e2e2e4;
    --vd-text: #2c2c2e;
    --vd-text-muted: #6b6b6f;
    --vd-radius: 14px;
}

* {
    box-sizing: border-box;
}

body.vd-body {
    margin: 0;
    background: var(--vd-bg);
    color: var(--vd-text);
    font-family: "Roboto Slab", "Segoe UI", sans-serif;
    -webkit-tap-highlight-color: transparent;
}

.vd-screen {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.vd-center-screen {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px 16px;
}

.vd-login-card {
    width: 100%;
    max-width: 360px;
    background: #fff;
    border-radius: var(--vd-radius);
    padding: 32px 24px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.08);
    text-align: center;
}

.vd-logo {
    max-width: 180px;
    width: 100%;
    height: auto;
    object-fit: contain;
    margin: 0 auto 20px;
    display: block;
}

.vd-login-card h1 {
    font-size: 18px;
    margin: 0 0 20px;
    color: var(--vd-text);
}

.vd-field {
    text-align: left;
    margin-bottom: 14px;
}

.vd-field label {
    display: block;
    font-size: 13px;
    color: var(--vd-text-muted);
    margin-bottom: 6px;
}

.vd-field input,
.vd-select,
.vd-textarea {
    width: 100%;
    padding: 13px 14px;
    border: 1px solid var(--vd-border);
    border-radius: 10px;
    font-size: 16px;
    background: #fff;
    color: var(--vd-text);
}

.vd-textarea {
    resize: vertical;
    min-height: 70px;
    font-family: inherit;
}

.vd-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
    padding: 14px 16px;
    border: none;
    border-radius: 10px;
    background: var(--vd-red);
    color: #fff;
    font-size: 16px;
    font-weight: 700;
    text-decoration: none;
    cursor: pointer;
}

.vd-btn:disabled {
    opacity: 0.6;
    cursor: default;
}

.vd-btn.vd-btn-outline {
    background: transparent;
    color: var(--vd-red);
    border: 1px solid var(--vd-red);
}

.vd-btn.vd-btn-secondary {
    background: var(--vd-gray);
}

.vd-error {
    background: #fdeced;
    color: #a3222a;
    border: 1px solid #f3c0c3;
    border-radius: 10px;
    padding: 10px 12px;
    font-size: 13px;
    margin-bottom: 14px;
    text-align: left;
}

.vd-hidden {
    display: none !important;
}

/* Barra superior fixa (usada nas telas de catálogo/resumo) — flutua como um
   card, no mesmo padrão visual dos cards de produto (cantos arredondados,
   sombra suave, respiro em relação às bordas da tela). */
.vd-topbar {
    position: sticky;
    top: 0;
    z-index: 20;
    background: var(--vd-red-dark);
    color: #fff;
    margin: 10px 14px 0;
    padding: 12px 14px;
    border-radius: 16px;
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.18);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    font-size: 13px;
}

.vd-topbar-info {
    display: flex;
    flex-direction: column;
    min-width: 0;
    overflow: hidden;
    flex: 1;
    background: none;
    border: none;
    padding: 0;
    margin: 0;
    color: inherit;
    font: inherit;
    text-align: left;
    cursor: pointer;
}

.vd-topbar-label {
    font-size: 11px;
    opacity: 0.8;
}

.vd-topbar-name {
    font-weight: 700;
    font-size: 14px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.vd-topbar-pricetable {
    display: none;
    font-size: 12px;
    opacity: 0.85;
    margin-top: 2px;
}

.vd-topbar.is-expanded .vd-topbar-info {
    overflow: visible;
}

.vd-topbar.is-expanded .vd-topbar-name {
    white-space: normal;
    overflow: visible;
    text-overflow: unset;
}

.vd-topbar.is-expanded .vd-topbar-pricetable {
    display: block;
}

.vd-topbar-action {
    background: rgba(255, 255, 255, 0.15);
    border: none;
    color: #fff;
    padding: 8px 12px;
    border-radius: 8px;
    font-size: 13px;
    flex-shrink: 0;
}

.vd-topbar-actions {
    display: flex;
    align-items: center;
    gap: 6px;
    flex-shrink: 0;
}

/* Cabeçalho das telas do vendedor: de ponta a ponta, colado no topo (como o
   rodapé do catálogo na base), com rótulo em caixa alta, nome em até 2
   linhas e ações só com ícone. Vale para o card do cliente
   (.vd-topbar--full) e para a barra das telas do vendedor (.vd-header-bar). */
.vd-topbar--full,
.vd-header-bar {
    margin: 0;
    padding: calc(14px + env(safe-area-inset-top, 0px)) 16px 16px;
    border-radius: 0 0 18px 18px;
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.18);
    align-items: flex-end;
    gap: 10px;
}

.vd-topbar--full .vd-topbar-label,
.vd-header-bar .vd-topbar-label {
    font-size: 10.5px;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    opacity: 0.75;
    margin-bottom: 4px;
}

/* Card do cliente: nome em 1 linha com "..."; o nome inteiro e o código
   aparecem só ao tocar no card (.is-expanded). */
.vd-topbar--full .vd-topbar-name {
    font-size: 15px;
    line-height: 1.25;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.vd-header-bar .vd-header-info h1 {
    font-size: 15px;
    line-height: 1.25;
    white-space: normal;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.vd-topbar--full.is-expanded .vd-topbar-name {
    white-space: normal;
    overflow: visible;
    text-overflow: unset;
}

.vd-topbar--full:not(.is-expanded) .vd-topbar-code {
    display: none;
}

.vd-topbar-code {
    margin-top: 3px;
    font-size: 12px;
    color: #f4b9bc;
}

.vd-topbar-code:empty {
    display: none;
}

.vd-topbar--full .vd-topbar-actions {
    gap: 8px;
}

/* Voltar só com o ícone: discreto, no mesmo lugar da antiga pílula. */
.vd-topbar-icon-btn {
    width: 34px;
    height: 34px;
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    cursor: pointer;
}

.vd-search-wrap--icon .vd-search {
    padding-left: 42px;
    border: none;
    border-radius: 12px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.06);
}

.vd-search-icon {
    position: absolute;
    left: 14px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--vd-text-muted);
    pointer-events: none;
}

.vd-sticky-header {
    position: sticky;
    top: 0;
    z-index: 20;
    background: var(--vd-bg);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.vd-header-bar {
    position: sticky;
    top: 0;
    z-index: 10;
    background: var(--vd-red-dark);
    color: #fff;
    display: flex;
    justify-content: space-between;
}

.vd-header-bar h1 {
    font-size: 16px;
    margin: 0;
}

.vd-header-info {
    display: flex;
    flex-direction: column;
    min-width: 0;
    overflow: hidden;
}

.vd-header-info h1 {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.vd-content {
    flex: 1;
    padding: 14px;
    padding-bottom: 112px;
}

.vd-search {
    width: 100%;
    padding: 13px 14px;
    border: 1px solid var(--vd-border);
    border-radius: 10px;
    font-size: 16px;
    background: #fff;
}

.vd-search-row {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 14px;
    background: var(--vd-bg);
}

.vd-search-row .vd-search {
    margin-bottom: 0;
    flex: 1;
    border: none;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.06);
}

.vd-search-wrap {
    position: relative;
    flex: 1;
}

.vd-search-wrap .vd-search {
    width: 100%;
    padding-right: 42px;
}

/* "×" de apagar a busca (vendedor-offline.js): fixo enquanto houver texto;
   o "×" nativo do type=search (só aparece em foco) fica escondido. */
.vd-search::-webkit-search-cancel-button {
    -webkit-appearance: none;
    appearance: none;
    display: none;
}

.vd-search-clear {
    position: absolute;
    right: 4px;
    top: 50%;
    transform: translateY(-50%);
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: none;
    border-radius: 50%;
    background: transparent;
    color: var(--vd-red-dark);
    padding: 0;
    cursor: pointer;
}

.vd-search-clear[hidden] {
    display: none;
}

.vd-search-wrap.has-voice .vd-search-clear {
    right: 38px;
}

.vd-search-wrap.has-voice .vd-search {
    padding-right: 76px;
}

.vd-voice-btn {
    position: absolute;
    right: 4px;
    top: 50%;
    transform: translateY(-50%);
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: none;
    background: transparent;
    color: var(--vd-text-muted);
    font-size: 16px;
    line-height: 1;
    border-radius: 50%;
    cursor: pointer;
}

.vd-voice-btn.is-listening {
    background: var(--vd-red);
    color: #fff;
    animation: vd-voice-pulse 1.2s ease-in-out infinite;
}

@keyframes vd-voice-pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.6; }
}

.vd-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

/* Mesmo respiro do topo do catálogo: fundo cinza em volta da busca, com
   folga igual em cima e embaixo, e sombra separando da lista. */
.vd-sticky-top {
    position: sticky;
    top: 0;
    z-index: 10;
    background: var(--vd-bg);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.vd-search-bar {
    padding: 10px 14px;
}

.vd-edit-banner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    background: #fff4e5;
    color: #7a4b00;
    padding: 10px 14px;
    font-size: 13px;
}

.vd-edit-banner button {
    border: none;
    background: none;
    color: var(--vd-red);
    font-size: 13px;
    font-weight: 700;
    text-decoration: underline;
    cursor: pointer;
    flex-shrink: 0;
    padding: 0;
}

.vd-card {
    background: #fff;
    border: 1px solid var(--vd-border);
    border-radius: var(--vd-radius);
    padding: 14px;
    text-align: left;
    width: 100%;
    cursor: pointer;
}

.vd-card-title {
    font-weight: 700;
    font-size: 15px;
    margin-bottom: 4px;
}

.vd-card-sub {
    font-size: 13px;
    color: var(--vd-text-muted);
}

.vd-card-last-purchase {
    display: inline-block;
    margin-top: 8px;
    padding: 2px 8px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 700;
}

.vd-card-last-purchase.is-ok {
    background: #e6f4ea;
    color: #1e6b34;
}

.vd-card-last-purchase.is-warn {
    background: #fff4d6;
    color: #8a5a00;
}

.vd-card-last-purchase.is-alert {
    background: #fde8e8;
    color: #a3131a;
}

.vd-card-last-purchase.is-none {
    background: #eef0f3;
    color: #5b6470;
}

.vd-menu-card {
    padding: 18px 16px;
}

.vd-order-card {
    position: relative;
    cursor: default;
    padding-right: 64px;
}

.vd-order-card-actions {
    position: absolute;
    top: 4px;
    right: 4px;
    display: flex;
    align-items: center;
    gap: 2px;
}

/* Card de pedido que abre o resumo (tela Pedidos). */
.vd-card.vd-order-clickable {
    cursor: pointer;
}

.vd-card.vd-order-clickable:active {
    background: #f7f7f7;
}

.vd-order-summary-meta {
    font-size: 12px;
    color: var(--vd-text-muted);
    margin-bottom: 8px;
}

.vd-order-summary-list {
    list-style: none;
    margin: 0;
    padding: 0;
}

.vd-order-summary-list li {
    padding: 8px 0;
    border-top: 1px solid var(--vd-border);
}

.vd-order-summary-name {
    font-size: 13px;
    font-weight: 600;
    color: var(--vd-text);
}

.vd-order-summary-line {
    display: flex;
    justify-content: space-between;
    gap: 8px;
    margin-top: 2px;
    font-size: 12px;
    color: var(--vd-text-muted);
}

.vd-order-summary-line strong {
    color: var(--vd-text);
    white-space: nowrap;
}

.vd-modal-footer.vd-order-summary-total {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 14px;
}

.vd-menu-card .vd-card-title {
    font-size: 17px;
}

.vd-empty,
.vd-loading,
.vd-message {
    text-align: center;
    color: var(--vd-text-muted);
    padding: 30px 10px;
    font-size: 14px;
}

/* Item de produto (lista) do catálogo — mesmo visual dos cards de item do
   pedido (nome, código, preço "por unidade", stepper e bloco "Total"). */
.vd-product-list-item {
    position: relative;
    background: #fff;
    border-radius: 16px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.06);
    padding: 14px 16px;
}

.vd-product-list-item.is-in-cart {
    box-shadow: 0 0 0 1px var(--vd-red), 0 2px 10px rgba(238, 22, 31, 0.15);
}

/* Miniatura do produto à esquerda do card; o conteúdo abre espaço para ela. */
.vd-product-list-item.has-thumb {
    padding-left: 90px;
    /* Foto (14 + 64) + 14px de respiro até a borda de baixo. */
    min-height: 92px;
}

.vd-product-thumb {
    position: absolute;
    top: 14px;
    left: 14px;
    width: 64px;
    height: 64px;
    padding: 0;
    border: 1px solid var(--vd-border);
    border-radius: 10px;
    background: #fff;
    overflow: hidden;
    cursor: zoom-in;
}

.vd-product-thumb img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.vd-product-thumb.is-empty {
    display: flex;
    align-items: center;
    justify-content: center;
    background: #f3f4f6;
    color: #b0b6bf;
    cursor: default;
}

.vd-photo-body {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 240px;
}

.vd-photo-img {
    display: block;
    max-width: 100%;
    max-height: 60vh;
    object-fit: contain;
}

.vd-photo-img[hidden],
.vd-photo-status[hidden] {
    display: none;
}

.vd-photo-status {
    margin: 0;
    color: var(--vd-text-muted);
    font-size: 13px;
}

.vd-order-item-price.is-loading {
    font-size: 12px;
    font-weight: 500;
    color: var(--vd-text-muted);
}

.vd-product-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

/* Marcador simples que subdivide a lista: mais comprados / catálogo completo. */
.vd-list-divider {
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 6px 2px 0;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: var(--vd-text-muted);
}

.vd-list-divider::after {
    content: "";
    flex: 1;
    height: 1px;
    background: var(--vd-border);
}

.vd-product-list-name {
    font-size: 14px;
    font-weight: 800;
    text-transform: uppercase;
    line-height: 1.3;
}

/* Código do produto na mesma linha do nome, logo depois dele. */
.vd-product-list-code {
    font-size: 12px;
    font-weight: 500;
    text-transform: none;
    color: var(--vd-text-muted);
    white-space: nowrap;
}

.vd-product-list-meta {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
    font-size: 13px;
    color: var(--vd-text-muted);
    margin-top: 2px;
}

/* Estoque no catálogo: chip com a soma das empresas; tocar abre o saldo de
   cada empresa logo abaixo (dados de produtos_estoque via /api/vendedor/stock). */
.vd-stock-chip {
    border: 1px solid var(--vd-border);
    background: #f4f4f5;
    color: var(--vd-text);
    border-radius: 999px;
    padding: 2px 10px;
    font: inherit;
    font-size: 12px;
    font-weight: 700;
    cursor: pointer;
}

/* Catálogo: chip de estoque | preço por unidade | Total. O chip tem
   largura fixa e o Total sempre reserva o espaço; o preço fica com o que
   sobra e quebra linha em celular estreito em vez de invadir o Total. */
/* Os três blocos esticam até a mesma altura e centralizam o conteúdo.
   Chip e Total têm largura fixa (o Total reserva o espaço mesmo sem
   quantidade), então o preço fica centralizado entre os dois e não se
   mexe quando o Total aparece. Total acima de ~R$ 9.999 alarga a coluna
   e o preço cede um pouco. */
.vd-product-list-item .vd-order-item-bottom.has-stock {
    display: grid;
    grid-template-columns: 60px minmax(0, 1fr) minmax(104px, max-content);
    align-items: stretch;
    gap: 8px;
}

.vd-order-item-bottom.has-stock > .vd-order-item-unit {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
}

.vd-order-item-bottom.has-stock > .vd-order-item-total-box {
    justify-content: center;
}

.vd-order-item-bottom.has-stock > .vd-stock-chip {
    display: flex;
    flex-direction: column;
    justify-content: center;
    min-width: 0;
    padding: 2px 4px;
    border-radius: 10px;
    font-size: 12px;
    line-height: 15px;
    text-align: center;
    white-space: nowrap;
}

/* Celular estreito (360px): fontes e respiros menores para chip, preço e
   Total caberem na linha; preço de 4 dígitos quebra após o "R$". Fica
   depois das regras acima para valer sobre elas. */
@media (max-width: 380px) {
    .vd-product-list-item .vd-order-item-bottom.has-stock {
        grid-template-columns: 52px minmax(0, 1fr) minmax(92px, max-content);
        gap: 6px;
    }

    .vd-order-item-bottom.has-stock .vd-order-item-price,
    .vd-order-item-bottom.has-stock .vd-total-value {
        font-size: 14px;
    }

    .vd-order-item-bottom.has-stock > .vd-order-item-total-box {
        padding: 3px 6px;
    }
}

.vd-stock-chip-label,
.vd-stock-chip-qty {
    display: block;
}

.vd-stock-chip-label {
    font-size: 10px;
    font-weight: 500;
    line-height: 12px;
    color: var(--vd-text-muted);
}

.vd-stock-chip.is-empty {
    color: var(--vd-red-dark);
}

.vd-stock-chip.is-loading,
.vd-stock-chip:disabled {
    font-weight: 500;
    color: var(--vd-text-muted);
    cursor: default;
}

/* Popup do saldo por empresa: pequeno, abre por cima do próprio card
   (posição absoluta dentro dele), sem mexer no layout da lista. */
.vd-stock-detail {
    position: absolute;
    top: 8px;
    left: 8px;
    z-index: 15;
    min-width: 110px;
    padding: 5px 28px 5px 10px;
    background: #fff;
    border: 1px solid var(--vd-border);
    border-radius: 10px;
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.18);
    font-size: 12px;
}

.vd-stock-detail-close {
    position: absolute;
    top: 3px;
    right: 3px;
    border: none;
    background: none;
    color: var(--vd-text-muted);
    width: 22px;
    height: 22px;
    font-size: 16px;
    line-height: 1;
    padding: 0;
    cursor: pointer;
}

.vd-stock-detail[hidden] {
    display: none;
}

.vd-stock-detail-row {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    padding: 1px 0;
    white-space: nowrap;
}

.vd-stock-detail-row strong.is-empty {
    color: var(--vd-red-dark);
}

/* Cabeçalho do card: nome do produto + seletor de quantidade na mesma linha,
   alinhado à direita (cards de produto do catálogo, sem botão de excluir). */
.vd-order-item-top {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 10px;
}

.vd-order-item-top .vd-product-list-name,
.vd-order-item-top .vd-order-item-name {
    flex: 1;
    min-width: 0;
}

.vd-order-item-top .vd-qty-row,
.vd-order-item-top .vd-tintometric-action-row {
    flex-shrink: 0;
    margin-top: 0;
}

.vd-order-item-top .vd-item-delete {
    position: static;
    flex-shrink: 0;
}

.vd-product-list-item .vd-order-item-bottom {
    align-items: center;
    margin-top: 8px;
}

.vd-qty-row {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-top: 4px;
}

.vd-qty-btn {
    width: 32px;
    height: 32px;
    border-radius: 8px;
    border: 1px solid var(--vd-border);
    background: #fff;
    font-size: 18px;
    line-height: 1;
    cursor: pointer;
}

.vd-qty-value {
    flex: 1;
    text-align: center;
    font-weight: 700;
    font-size: 14px;
}

/* Segurar "-"/"+" repete (vendedor-catalogo.js): sem seleção de texto nem
   menu de toque longo no celular. */
.vd-qty-btn {
    touch-action: manipulation;
    user-select: none;
    -webkit-user-select: none;
    -webkit-touch-callout: none;
}

/* Rodapé fixo (catálogo -> resumo): painel colado na base, de ponta a
   ponta, com cantos de cima arredondados. Não rola nem deixa a lista
   aparecer por baixo; a faixa do mix Tigre, quando há, fica no topo. */
.vd-bottombar {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    background: #fff;
    border-radius: 18px 18px 0 0;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    box-shadow: 0 -4px 16px rgba(0, 0, 0, 0.12);
    z-index: 20;
    cursor: pointer;
    touch-action: none;
    overscroll-behavior: none;
}

.vd-bottombar-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 12px 16px calc(14px + env(safe-area-inset-bottom, 0px));
}

/* Botão discreto de voltar ao topo, logo acima da barra do pedido. */
.vd-back-to-top {
    position: fixed;
    right: 18px;
    bottom: 92px;
    width: 34px;
    height: 34px;
    border: none;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.92);
    color: var(--vd-text-muted);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.18);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    cursor: pointer;
    z-index: 19;
    opacity: 0.85;
}

.vd-back-to-top[hidden] {
    display: none;
}

.vd-back-to-top:hover,
.vd-back-to-top:focus-visible {
    opacity: 1;
    color: var(--vd-text);
}

.vd-bottombar-info {
    font-size: 13px;
    color: var(--vd-text-muted);
}

.vd-bottombar-total {
    font-size: 19px;
    font-weight: 700;
    color: var(--vd-text);
}

.vd-bottombar .vd-btn {
    width: auto;
    padding: 12px 18px;
}

.vd-bottombar .vd-bottombar-continue {
    gap: 10px;
    padding: 13px 22px;
    border-radius: 999px;
    background: var(--vd-red-dark);
}

.vd-bottombar-summary {
    display: flex;
    align-items: center;
    gap: 12px;
    min-width: 0;
    background: none;
    border: none;
    padding: 0;
    margin: 0;
    text-align: left;
    cursor: pointer;
    font: inherit;
}

/* Popup de resumo do pedido (catálogo) */
.vd-modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.45);
    display: flex;
    align-items: flex-end;
    justify-content: center;
    z-index: 50;
}

.vd-modal {
    background: #fff;
    width: 100%;
    max-width: 480px;
    max-height: 80vh;
    border-radius: 16px 16px 0 0;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.vd-modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 14px;
    border-bottom: 1px solid var(--vd-border);
    font-weight: 700;
    font-size: 14px;
}

.vd-modal-close {
    background: none;
    border: none;
    font-size: 20px;
    line-height: 1;
    color: var(--vd-text-muted);
    cursor: pointer;
    padding: 0 4px;
}

.vd-modal-body {
    padding: 10px 14px;
    overflow-y: auto;
    flex: 1;
}

.vd-modal-footer {
    padding: 10px 14px 14px;
    border-top: 1px solid var(--vd-border);
}

.vd-modal-footer .vd-totals-row.vd-totals-final {
    border-top: none;
    margin: 0 0 8px;
    padding-top: 0;
}

.vd-modal-footer .vd-btn {
    padding: 12px 16px;
}

/* Resumo do catálogo aberto: o popup encosta no rodapé do pedido, que
   segue visível com o total e o "Finalizar" (o JS ajusta o bottom do
   overlay à altura do rodapé). A faixa do mix fica só no topo do resumo. */
.vd-summary-open .vd-bottombar {
    border-radius: 0;
    box-shadow: none;
    border-top: 1px solid var(--vd-border);
}

.vd-summary-open .vd-bottombar > .vd-bottombar-mixes {
    display: none;
}

.vd-summary-open .vd-back-to-top {
    display: none;
}

#vd-summary-overlay .vd-modal {
    max-height: min(80vh, 100%);
}

/* Dialogo de confirmacao discreto (ex.: excluir orcamento) — menor que o
   modal padrao e centrado na tela, em vez do bottom-sheet usado no catalogo. */
.vd-modal-overlay.vd-confirm-overlay {
    align-items: center;
    padding: 20px;
}

.vd-confirm-modal {
    max-width: 300px;
    border-radius: 14px;
}

.vd-confirm-modal .vd-modal-header {
    padding: 12px 14px;
    font-size: 13px;
}

.vd-confirm-modal .vd-modal-body {
    padding: 2px 14px 12px;
    font-size: 13px;
    color: var(--vd-text-muted);
}

.vd-confirm-modal .vd-modal-footer {
    display: flex;
    gap: 8px;
    padding: 10px 14px 14px;
}

.vd-confirm-modal .vd-modal-footer .vd-btn {
    width: auto;
    flex: 1;
    padding: 9px 10px;
    font-size: 13px;
}

/* Popup de carregamento discreto (ex.: selecionar cliente) — mesma moldura
   centrada do vd-confirm-overlay, sem cabecalho/rodape de modal. */
.vd-loading-box {
    background: #fff;
    border-radius: 14px;
    padding: 22px 26px;
    max-width: 260px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    text-align: center;
    font-size: 13px;
    font-weight: 600;
    color: var(--vd-text);
}

.vd-spinner.vd-spinner-dark {
    border-color: rgba(0, 0, 0, 0.12);
    border-top-color: var(--vd-red);
}

/* Botão discreto de escolher cor tintometrica, ao lado do stepper de qtd. */
.vd-tintometric-action-row {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-top: 4px;
}

.vd-tintometric-action-row .vd-qty-row {
    flex: 1;
    margin-top: 0;
}

.vd-tintometric-icon-btn {
    width: 32px;
    height: 32px;
    flex-shrink: 0;
    border-radius: 8px;
    border: 1px solid var(--vd-border);
    background: #fff;
    font-size: 15px;
    line-height: 1;
    cursor: pointer;
}

/* Popup de escolha de cor tintometrica (catálogo) */
#vd-tintometric-search {
    position: sticky;
    top: 0;
    z-index: 2;
    background: #fff;
}

/* Com o "×" de apagar, o campo fica dentro de .vd-search-wrap: quem gruda
   no topo do popup é o wrap. */
.vd-search-wrap:has(> #vd-tintometric-search) {
    position: sticky;
    top: 0;
    z-index: 2;
    background: #fff;
}

.vd-tintometric-status {
    font-size: 13px;
    color: var(--vd-text-muted);
    margin: 10px 0;
}

.vd-tintometric-colors {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 12px;
}

.vd-tintometric-color-chip {
    padding: 8px 14px;
    border-radius: 999px;
    border: 1px solid var(--vd-border);
    background: #fff;
    color: var(--vd-text);
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
}

.vd-tintometric-color-chip.is-selected {
    outline: 3px solid var(--vd-red);
    outline-offset: 1px;
}

/* Fica no rodapé fixo do popup, acima do botão: visível em qualquer
   ponto da rolagem da lista de cores. */
.vd-tintometric-result {
    margin-bottom: 10px;
    border: 1px solid var(--vd-border);
    border-radius: var(--vd-radius);
    padding: 12px;
    background: #eaf7ee;
}

.vd-tintometric-result-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 15px;
    font-weight: 700;
}

.vd-tintometric-result-stock {
    font-size: 12px;
    color: var(--vd-text-muted);
    margin: 4px 0 10px;
}

/* Card de item do pedido (popup de resumo do catálogo e tela de resumo) */
.vd-summary-item,
.vd-order-item {
    position: relative;
    background: #fff;
    border-radius: 14px;
    padding: 10px 12px;
    margin-bottom: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.06);
}

/* Tela de resumo: botão de excluir fica solto no canto (item não tem
   vd-order-item-top), por isso precisa de espaço reservado à direita. */
.vd-order-item {
    padding-right: 34px;
}

/* Popup de resumo do catálogo: arrastar o card para a esquerda exclui o
   item (como numa lista de e-mail do Outlook), revelando este fundo. */
.vd-swipe-row {
    position: relative;
    overflow: hidden;
    border-radius: 14px;
}

/* Separador bem leve entre itens, já que o card não tem bordas visíveis. */
.vd-summary-divider {
    height: 1px;
    background: var(--vd-border);
    margin: 10px 4px;
}

.vd-swipe-delete-bg {
    position: absolute;
    inset: 1px;
    border-radius: 13px;
    background: var(--vd-red);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: flex-end;
    padding-right: 22px;
    font-weight: 700;
    font-size: 13px;
}

.vd-swipe-row .vd-summary-item {
    margin-bottom: 0;
    touch-action: pan-y;
    will-change: transform;
}

.vd-swipe-row .vd-summary-item.is-swiping {
    user-select: none;
}

.vd-order-item-name {
    font-size: 13px;
    font-weight: 800;
    text-transform: uppercase;
    line-height: 1.25;
    color: var(--vd-text);
    padding-right: 4px;
}

.vd-order-item-code {
    font-size: 11px;
    color: var(--vd-text-muted);
    margin-top: 2px;
}

.vd-item-delete {
    position: absolute;
    top: 6px;
    right: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: none;
    background: none;
    padding: 4px;
    color: #b9bac0;
    font-size: 20px;
    line-height: 1;
    cursor: pointer;
}

.vd-item-delete:hover {
    color: var(--vd-red);
}

.vd-order-card-actions .vd-item-delete {
    position: static;
}

.vd-item-edit {
    display: flex;
    align-items: center;
    justify-content: center;
    border: none;
    background: none;
    padding: 4px;
    color: #b9bac0;
    font-size: 16px;
    line-height: 1;
    cursor: pointer;
}

.vd-item-edit:hover {
    color: var(--vd-red);
}

.vd-order-item-bottom {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 10px;
    margin-top: 8px;
}

.vd-order-item-unit {
    min-width: 0;
}

.vd-order-item-price {
    font-size: 16px;
    font-weight: 800;
    color: #237339;
    line-height: 1.15;
}

.vd-order-item-price.is-unavailable {
    font-size: 12px;
    font-weight: 600;
    color: var(--vd-text-muted);
}

.vd-order-item-price-label {
    font-size: 11px;
    color: var(--vd-text-muted);
    margin-top: 1px;
}

.vd-order-item-actions {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 5px;
    flex-shrink: 0;
}

.vd-order-item-actions .vd-qty-row,
.vd-order-item-top .vd-qty-row {
    margin-top: 0;
    gap: 4px;
    background: #f4f4f5;
    border-radius: 10px;
    padding: 3px;
}

.vd-order-item-actions .vd-qty-btn,
.vd-order-item-top .vd-qty-btn {
    width: 28px;
    height: 28px;
    border: none;
    border-radius: 8px;
    background: #fff;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.08);
    font-size: 15px;
    font-weight: 700;
    color: var(--vd-text);
}

.vd-order-item-actions .vd-qty-btn[data-qty-increase],
.vd-order-item-top .vd-qty-btn[data-qty-increase] {
    background: #fde3e3;
    color: var(--vd-red-dark);
}

.vd-order-item-actions .vd-qty-value,
.vd-order-item-top .vd-qty-value {
    min-width: 18px;
    font-size: 13px;
}

.vd-order-item-qty-chip {
    text-align: center;
    background: #f4f4f5;
    border-radius: 10px;
    padding: 5px 6px;
    font-size: 12px;
    font-weight: 700;
    color: var(--vd-text);
    white-space: nowrap;
}

.vd-order-item-total-box {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    background: #eaf7ee;
    border-radius: 8px;
    padding: 3px 8px;
}

.vd-order-item-total-box[hidden] {
    display: none;
}

/* Catálogo: o bloco "Total" sempre reserva o espaço (só fica invisível sem
   quantidade), para o card e o preço por unidade não se mexerem ao tocar
   no "+" — só o total aparece. */
.vd-product-list-item .vd-order-item-total-box[hidden] {
    display: flex;
    visibility: hidden;
}

/* Vazio (antes da 1ª quantidade) o valor teria altura 0: fixa a linha. */
.vd-product-list-item .vd-order-item-total-box .vd-total-value {
    line-height: 19px;
    min-height: 19px;
}

/* Quantidade com largura fixa: "0" → "10" → "100" não alarga o seletor
   nem empurra o nome do produto para outra linha. */
.vd-product-list-item .vd-order-item-top .vd-qty-value {
    flex: 0 0 28px;
    width: 28px;
    min-width: 28px;
}

.vd-order-item-total-box .vd-total-label {
    font-size: 11px;
    color: #4c8a5a;
}

.vd-order-item-total-box .vd-total-value {
    font-size: 16px;
    font-weight: 800;
    color: #237339;
    white-space: nowrap;
}

/* Tela de resumo/checkout: lista de itens em formato de tabela compacta
   (2 linhas por item), só para consulta — diferente dos cards do catálogo
   (.vd-order-item*), que continuam interativos e mais espaçados. */
.vd-items-table {
    width: 100%;
    table-layout: fixed;
    border-collapse: collapse;
    font-size: 12px;
}

.vd-items-table th,
.vd-items-table td {
    padding: 7px 4px;
    border-bottom: 1px solid var(--vd-border);
    vertical-align: middle;
}

.vd-items-table th {
    text-align: right;
    font-size: 10.5px;
    font-weight: 700;
    color: var(--vd-text-muted);
    text-transform: uppercase;
}

.vd-items-table th:first-child,
.vd-items-table td.vd-items-product {
    text-align: left;
}

.vd-items-table th:nth-child(2),
.vd-items-table td.vd-items-qty {
    width: 28px;
}

.vd-items-table th:nth-child(3),
.vd-items-table td.vd-items-price {
    width: 58px;
}

.vd-items-table th:nth-child(4),
.vd-items-table td.vd-items-total {
    width: 64px;
    font-weight: 700;
    color: var(--vd-text);
}

.vd-items-table th:nth-child(5),
.vd-items-table td.vd-items-actions {
    width: 22px;
    text-align: center;
}

.vd-items-name {
    font-weight: 700;
    font-size: 12.5px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.vd-items-code {
    font-size: 11px;
    color: var(--vd-text-muted);
    margin-top: 1px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.vd-items-delete {
    border: none;
    background: none;
    color: #b9bac0;
    font-size: 17px;
    line-height: 1;
    padding: 2px;
    cursor: pointer;
}

.vd-items-delete:hover {
    color: var(--vd-red);
}

.vd-section-title {
    font-size: 13px;
    font-weight: 700;
    text-transform: uppercase;
    color: var(--vd-text-muted);
    margin: 18px 0 8px;
}

.vd-section-title.vd-section-title-first {
    margin-top: 0;
}

.vd-payment-dropdown + .vd-collapsible {
    margin-top: 16px;
}

/* Aviso do Pix entre Endereço e Itens do pedido: mesmo espaço de 10px
   entre cartões, com ou sem aviso visível. */
.vd-pix-stock + .vd-collapsible {
    margin-top: 10px;
}

.vd-collapsible + .vd-collapsible {
    margin-top: 4px;
}

/* Endereço recolhível logo abaixo de Entrega/Retirada: mesmo espaço de
   10px entre cartões. */
.vd-delivery-options + .vd-address-collapsible,
.vd-address-collapsible + .vd-collapsible {
    margin-top: 10px;
}

.vd-collapsible-header {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: none;
    border: none;
    padding: 0;
    cursor: pointer;
}

.vd-collapsible-arrow {
    transition: transform 0.15s ease;
    flex-shrink: 0;
}

.vd-collapsible-header[aria-expanded="false"] .vd-collapsible-arrow {
    transform: rotate(-90deg);
}

.vd-collapsible-body {
    margin-top: 10px;
}

/* Variante do collapsible em formato de card, com dica de texto — usada
   onde o cabeçalho simples (só título + seta) não deixa claro que é
   clicável, como "Itens do pedido" no resumo. */
.vd-collapsible-header.vd-collapsible-card {
    background: #fff;
    border: 1px solid var(--vd-border);
    border-radius: var(--vd-radius);
    padding: 12px 14px;
    margin: 0 0 8px;
}

.vd-collapsible-card-label {
    font-size: 13px;
    font-weight: 700;
    text-transform: uppercase;
    color: var(--vd-text-muted);
}

.vd-collapsible-card-hint {
    display: flex;
    align-items: center;
    gap: 4px;
    font-size: 12px;
    font-weight: 700;
    color: var(--vd-red);
    flex-shrink: 0;
}

.vd-collapsible-card .vd-collapsible-arrow {
    font-size: 13px;
}

.vd-totals {
    background: #fff;
    border: 1px solid var(--vd-border);
    border-radius: var(--vd-radius);
    padding: 14px;
    margin-top: 10px;
}

.vd-totals-row {
    display: flex;
    justify-content: space-between;
    font-size: 13px;
    padding: 3px 0;
    color: var(--vd-text-muted);
}

.vd-totals-row.vd-totals-final {
    font-size: 15px;
    font-weight: 700;
    color: var(--vd-text);
    border-top: 1px solid var(--vd-border);
    margin-top: 4px;
    padding-top: 6px;
}

/* Dropdown de condição de pagamento (mesmo padrão do checkout do B2B) */
.vd-payment-dropdown {
    position: relative;
}

.vd-payment-toggle {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    width: 100%;
    min-height: 48px;
    padding: 13px 14px;
    border: 1px solid var(--vd-border);
    border-radius: 10px;
    background: #fff;
    color: var(--vd-text);
    font-size: 15px;
    text-align: left;
    cursor: pointer;
}

.vd-payment-toggle-content {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 6px;
}

.vd-payment-toggle-arrow {
    color: var(--vd-text-muted);
    flex-shrink: 0;
}

.vd-payment-list {
    position: absolute;
    left: 0;
    right: 0;
    top: calc(100% + 6px);
    max-height: 280px;
    overflow-y: auto;
    background: #fff;
    border: 1px solid var(--vd-border);
    border-radius: 10px;
    box-shadow: 0 14px 30px rgba(24, 31, 41, 0.15);
    padding: 6px;
    z-index: 30;
}

.vd-payment-option {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 6px;
    width: 100%;
    border: 0;
    border-radius: 8px;
    background: #fff;
    color: var(--vd-text);
    font-size: 14px;
    line-height: 1.4;
    text-align: left;
    padding: 10px;
    cursor: pointer;
}

.vd-payment-option:hover,
.vd-payment-option:focus {
    background: #f7f8fa;
    outline: none;
}

.vd-payment-option-main {
    font-weight: 600;
}

.vd-payment-badges {
    display: inline-flex;
    flex-wrap: wrap;
    gap: 6px;
}

.vd-payment-badge {
    display: inline-flex;
    border-radius: 999px;
    font-size: 11px;
    font-weight: 700;
    line-height: 1;
    padding: 5px 8px;
}

.vd-payment-badge.is-discount {
    background: #e9f7ef;
    color: #247a51;
}

.vd-payment-badge.is-info {
    background: #eef2f7;
    color: #596270;
}

.vd-payment-option.is-selected {
    background: #fff8f8;
    font-weight: 700;
    box-shadow: inset 3px 0 0 var(--vd-red);
}

.vd-payment-option.is-disabled,
.vd-payment-option:disabled {
    background: #fafbfc;
    color: #9aa1ab;
    cursor: not-allowed;
    opacity: 0.62;
}

.vd-payment-option.is-disabled:hover,
.vd-payment-option.is-disabled:focus,
.vd-payment-option.is-disabled.is-selected {
    background: #fafbfc;
}

.vd-payment-option.is-disabled .vd-payment-badge {
    opacity: 0.75;
}

/* Entrega / retirada (mesmo padrão do checkout do B2B) */
.vd-delivery-options {
    display: grid;
    gap: 10px;
}

.vd-choice-card,
.vd-address-card {
    display: flex;
    align-items: center;
    gap: 13px;
    margin: 0;
    padding: 14px 15px;
    border: 1px solid var(--vd-border);
    border-radius: 10px;
    background: #fff;
    position: relative;
    transition: border-color 150ms ease, box-shadow 150ms ease, background-color 150ms ease;
}

.vd-choice-card,
.vd-pickup-card {
    cursor: pointer;
}

.vd-choice-card:has(input:checked),
.vd-pickup-card:has(input:checked) {
    background: #fffafa;
    border-color: var(--vd-red);
    box-shadow: 0 0 0 1px var(--vd-red);
}

.vd-choice-card > input,
.vd-pickup-card > input {
    position: absolute;
    width: 1px;
    height: 1px;
    opacity: 0;
}

.vd-choice-icon,
.vd-address-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 38px;
    height: 38px;
    border-radius: 50%;
    background: #f4f5f7;
    color: #555d68;
}

.vd-choice-card:has(input:checked) .vd-choice-icon,
.vd-pickup-card:has(input:checked) .vd-address-icon {
    background: #ffe8e9;
    color: var(--vd-red);
}

.vd-choice-copy {
    display: grid;
    flex: 1;
    gap: 3px;
}

.vd-choice-copy strong {
    color: var(--vd-text);
    font-size: 14px;
}

.vd-choice-copy small {
    color: var(--vd-text-muted);
    font-size: 12px;
}

.vd-choice-radio {
    flex: 0 0 18px;
    height: 18px;
    border: 1px solid #bfc5cc;
    border-radius: 50%;
    background: #fff;
}

input:checked ~ .vd-choice-radio {
    border: 5px solid var(--vd-red);
}

.vd-address-description {
    margin: -4px 0 10px;
    color: var(--vd-text-muted);
    font-size: 13px;
}

.vd-address-list {
    display: grid;
    gap: 10px;
}

.vd-address-card {
    align-items: flex-start;
    background: #fafbfc;
}

.vd-pickup-card {
    align-items: center;
}

.vd-address-card > div {
    flex: 1;
    min-width: 0;
}

.vd-address-card strong {
    display: block;
    color: var(--vd-text);
    font-size: 14px;
    line-height: 1.5;
    margin-bottom: 2px;
}

.vd-address-card p {
    margin: 0;
    color: var(--vd-text-muted);
    font-size: 13px;
    line-height: 1.5;
}

.vd-store-name {
    display: block;
    margin-bottom: 4px;
    color: var(--vd-red);
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.35px;
    text-transform: uppercase;
}

.vd-address-empty {
    padding: 14px 15px;
    border: 1px solid #f1dfb8;
    border-radius: 10px;
    background: #fffaf0;
    color: #8a6421;
    font-size: 13px;
}

.vd-address-empty strong {
    display: block;
    margin-bottom: 2px;
}

.vd-address-empty p {
    margin: 0;
    font-size: 12px;
    line-height: 1.5;
}

.vd-pix-box {
    background: #fff;
    border: 1px solid var(--vd-border);
    border-radius: var(--vd-radius);
    padding: 18px;
    text-align: center;
}

.vd-pix-box img {
    width: 200px;
    height: 200px;
    margin: 0 auto 12px;
    display: block;
}

.vd-pix-code {
    width: 100%;
    min-height: 70px;
    font-size: 12px;
    padding: 10px;
    border-radius: 8px;
    border: 1px solid var(--vd-border);
    margin-bottom: 10px;
}

.vd-pix-countdown {
    font-size: 13px;
    color: var(--vd-text-muted);
    margin-bottom: 12px;
}

.vd-success-box {
    background: #fff;
    border-radius: var(--vd-radius);
    padding: 26px;
    text-align: center;
}

.vd-success-icon {
    font-size: 42px;
    margin-bottom: 10px;
}

.vd-spinner {
    width: 20px;
    height: 20px;
    border: 3px solid rgba(255, 255, 255, 0.4);
    border-top-color: #fff;
    border-radius: 50%;
    animation: vd-spin 0.8s linear infinite;
    display: inline-block;
}

@keyframes vd-spin {
    to {
        transform: rotate(360deg);
    }
}

/* No desktop, simula a largura de um dispositivo mobile (mesma largura
   máxima já usada no popup de resumo do pedido) em vez de esticar o app
   para a tela inteira. */
@media (min-width: 601px) {
    body.vd-body {
        display: flex;
        justify-content: center;
        background: #fff;
        min-height: 100vh;
    }

    .vd-screen,
    .vd-center-screen {
        width: 100%;
        max-width: 480px;
        box-shadow: 0 0 40px rgba(0, 0, 0, 0.2);
    }

    .vd-bottombar {
        left: 50%;
        right: auto;
        width: 100%;
        max-width: 480px;
        transform: translateX(-50%);
    }

    .vd-back-to-top {
        right: calc(50% - 222px);
    }
}

/* ==== Modo offline ==== */
.vd-offline-banner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    background: #fff4e5;
    color: #7a4b00;
    padding: 8px 14px;
    font-size: 12.5px;
    line-height: 1.35;
}

.vd-offline-banner.is-online {
    background: #e8f5e9;
    color: #1b5e20;
}

.vd-offline-banner button {
    border: none;
    background: none;
    color: inherit;
    font-size: 12.5px;
    font-weight: 700;
    text-decoration: underline;
    cursor: pointer;
    flex-shrink: 0;
    padding: 0;
}

.vd-sync-panel {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    margin: 10px 14px 0;
    padding: 10px 12px;
    background: #fff;
    border: 1px solid var(--vd-border);
    border-radius: 10px;
    font-size: 12.5px;
    color: var(--vd-text-muted);
}

.vd-sync-panel-text {
    min-width: 0;
}

.vd-sync-panel-text strong {
    display: block;
    color: var(--vd-text);
    font-size: 13px;
}

.vd-sync-panel button {
    flex-shrink: 0;
    border: 1px solid var(--vd-red-dark);
    background: #fff;
    color: var(--vd-red-dark);
    border-radius: 8px;
    padding: 7px 10px;
    font-size: 12.5px;
    font-weight: 700;
    cursor: pointer;
}

.vd-sync-panel button:disabled {
    opacity: 0.55;
    cursor: default;
}

.vd-offline-note {
    margin: 0 0 10px;
    padding: 10px 12px;
    border-radius: 10px;
    background: #fff4e5;
    color: #7a4b00;
    font-size: 13px;
    line-height: 1.4;
}

/* ==== Fila de envio (pedidos guardados sem conexão) ==== */
.vd-queue-panel {
    margin: 10px 14px 0;
    padding: 10px 12px;
    background: #fff;
    border: 1px solid var(--vd-border);
    border-radius: 10px;
}

.vd-queue-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    font-size: 13px;
    margin-bottom: 6px;
}

.vd-queue-header button,
.vd-queue-item-actions button {
    border: 1px solid var(--vd-red-dark);
    background: #fff;
    color: var(--vd-red-dark);
    border-radius: 8px;
    padding: 6px 10px;
    font-size: 12.5px;
    font-weight: 700;
    cursor: pointer;
}

.vd-queue-item-actions button.is-danger {
    border-color: var(--vd-border);
    color: var(--vd-text-muted);
}

.vd-queue-item {
    border-top: 1px solid var(--vd-border);
    padding: 8px 0;
    font-size: 12.5px;
    color: var(--vd-text-muted);
}

.vd-queue-item-title {
    font-weight: 700;
    font-size: 13px;
    color: var(--vd-text);
}

.vd-queue-item-status {
    margin-top: 3px;
}

.vd-queue-item.is-revisar .vd-queue-item-status {
    color: #7a4b00;
    font-weight: 700;
}

.vd-queue-item.is-enviado .vd-queue-item-status {
    color: #1b5e20;
}

.vd-queue-item-changes {
    margin: 4px 0 0;
    padding-left: 18px;
}

.vd-queue-item-actions {
    display: flex;
    gap: 8px;
    margin-top: 6px;
}

/* ==== Tela inicial ==== */
.vd-home-badge {
    display: inline-block;
    min-width: 20px;
    margin-left: 6px;
    padding: 1px 7px;
    border-radius: 10px;
    background: var(--vd-red-dark);
    color: #fff;
    font-size: 12px;
    text-align: center;
    vertical-align: middle;
}

.vd-page-note {
    margin: 0;
    font-size: 13px;
    line-height: 1.45;
    color: var(--vd-text-muted);
}

.vd-qty-btn:disabled {
    cursor: not-allowed;
    opacity: 0.35;
}

/* Toque não deixa contorno de foco preso no botão; teclado continua vendo. */
.vd-qty-btn:focus:not(:focus-visible) {
    outline: none;
}

.vd-qty-btn:focus-visible {
    outline: 2px solid var(--vd-red-dark);
    outline-offset: 1px;
}

/* Item sem preço para o cliente: card esmaecido e etiqueta "Indisponível"
   no lugar do seletor (o seletor volta se o item já estiver no carrinho). */
.vd-unavailable-tag {
    display: none;
    flex-shrink: 0;
    align-self: flex-start;
    padding: 5px 10px;
    border-radius: 999px;
    background: #ececee;
    color: var(--vd-text-muted);
    font-size: 11px;
    font-weight: 700;
    line-height: 18px;
}

.vd-product-list-item.is-unavailable {
    background: #f7f7f8;
    box-shadow: inset 0 0 0 1px #ececee;
}

.vd-product-list-item.is-unavailable .vd-unavailable-tag {
    display: inline-block;
}

.vd-product-list-item.is-unavailable .vd-qty-row,
.vd-product-list-item.is-unavailable .vd-tintometric-icon-btn {
    display: none;
}

.vd-product-list-item.is-unavailable .vd-product-list-name {
    color: var(--vd-text-muted);
}

.vd-product-list-item.is-unavailable .vd-product-thumb {
    opacity: 0.55;
}

/* ==== Trava de estoque do Pix (resumo do pedido) ==== */
.vd-pix-stock:not(:empty) {
    margin-top: 10px;
}

.vd-pix-stock-notice {
    margin: 0 0 8px;
    padding: 10px 12px;
    border: 1px solid #bfe3cd;
    border-radius: 10px;
    background: #e9f7ef;
    color: #247a51;
    font-size: 13px;
    font-weight: 700;
}

.vd-pix-stock-notice:last-child {
    margin-bottom: 0;
}

.vd-pix-stock-status {
    margin: 0;
    color: #6b7178;
    font-size: 12px;
}

.vd-pix-stock-alert {
    padding: 12px;
    border: 1px solid #f3c0c3;
    border-radius: 10px;
    background: #fdeced;
    color: #a3222a;
    font-size: 13px;
}

.vd-pix-stock-alert > strong {
    display: block;
    margin-bottom: 2px;
}

.vd-pix-stock-alert p {
    margin: 0;
    font-size: 12px;
    line-height: 1.5;
}

.vd-pix-stock-list {
    list-style: none;
    margin: 10px 0 0;
    padding: 0;
}

.vd-pix-stock-list li {
    padding: 9px 0;
    border-top: 1px solid #f3c0c3;
    font-size: 12px;
}

.vd-pix-stock-list li > span {
    display: block;
}

.vd-pix-stock-list li > .vd-pix-stock-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.vd-pix-stock-btn {
    min-height: 36px;
    margin-top: 6px;
    padding: 7px 12px;
    border: 1px solid currentColor;
    border-radius: 8px;
    background: #fff;
    color: inherit;
    font-size: 12px;
    font-weight: 700;
}

/* ==== Mix Produtos (perfis de mix, ex.: Tigre extrusão x injeção) — carrinho do catálogo ==== */
/* Faixa do mix no topo do rodapé: ícone, texto com a barra e o % de
   extrusão à direita. */
.vd-bottombar-mix {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 16px;
    font-size: 12.5px;
    font-weight: 700;
}

.vd-bottombar-mix-icon {
    flex-shrink: 0;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    background: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
}

.vd-bottombar-mix-main {
    flex: 1;
    min-width: 0;
}

.vd-bottombar-mix-text {
    display: block;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.vd-bottombar-mix-percent {
    flex-shrink: 0;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    line-height: 1.15;
}

.vd-bottombar-mix-percent strong {
    font-size: 14px;
}

.vd-bottombar-mix-percent small {
    font-size: 10.5px;
    font-weight: 600;
    opacity: 0.8;
}

.vd-mix-tigre-bar-over {
    position: absolute;
    top: 0;
    bottom: 0;
    background: #c62828;
}

.vd-bottombar-mix .vd-mix-tigre-bar {
    height: 5px;
    margin: 5px 0 0;
    border: none;
    border-radius: 3px;
    background: rgba(0, 0, 0, 0.1);
}

.vd-bottombar-mix .vd-mix-tigre-bar-fill {
    opacity: 1;
}

/* Faixas do mix no rodapé (uma por perfil fora do mix), empilhadas. */
.vd-bottombar-mixes[hidden] {
    display: none;
}

.vd-bottombar-mixes > .vd-bottombar-mix + .vd-bottombar-mix {
    border-top: 1px solid rgba(0, 0, 0, 0.06);
}

/* Com as faixas do mix, o rodapé fica mais alto: sobe o botão de voltar ao
   topo e o espaço no fim da lista (cerca de 50px por faixa). */
.vd-body:has(.vd-bottombar > .vd-bottombar-mixes:not([hidden])) .vd-back-to-top {
    bottom: calc(92px + 50px * var(--vd-mix-strips, 1));
}

.vd-body:has(.vd-bottombar > .vd-bottombar-mixes:not([hidden])) .vd-content {
    padding-bottom: calc(112px + 48px * var(--vd-mix-strips, 1));
}

.vd-bottombar-mix[hidden] {
    display: none;
}

.vd-bottombar-mix.is-ok {
    background: #e9f7ef;
    color: #247a51;
}

.vd-bottombar-mix.is-out {
    background: #fdf1e2;
    color: #9a5100;
}

/* "Continuar" travado pelo mix: o toque abre o resumo com o aviso. */
.vd-btn.is-blocked {
    opacity: 0.55;
}

.vd-mix-tigre {
    flex-shrink: 0;
    padding: 10px 14px;
    border-bottom: 1px solid var(--vd-border);
    font-size: 13px;
}

.vd-mix-tigre[hidden] {
    display: none;
}

.vd-mix-tigre.is-ok {
    background: #e9f7ef;
    color: #247a51;
}

.vd-mix-tigre.is-out {
    background: #fdeced;
    color: #a3222a;
}

.vd-mix-tigre.is-attention {
    animation: vd-mix-tigre-attention 0.5s ease;
}

@keyframes vd-mix-tigre-attention {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-6px); }
    75% { transform: translateX(6px); }
}

.vd-mix-tigre-head {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 8px;
}

.vd-mix-tigre-head span {
    font-size: 12px;
    color: var(--vd-text-muted);
}

.vd-mix-tigre-bar {
    position: relative;
    height: 8px;
    margin: 8px 0 6px;
    border-radius: 4px;
    background: #ffffff;
    border: 1px solid currentColor;
    overflow: hidden;
}

.vd-mix-tigre-bar-fill {
    position: absolute;
    inset: 0 auto 0 0;
    background: currentColor;
    opacity: 0.55;
}

.vd-mix-tigre-bar-limit {
    position: absolute;
    top: 0;
    bottom: 0;
    width: 2px;
    margin-left: -1px;
    background: var(--vd-text);
}

.vd-mix-tigre-values {
    display: flex;
    justify-content: space-between;
    gap: 8px;
    font-size: 12px;
    color: var(--vd-text);
}

.vd-mix-tigre-message {
    margin: 6px 0 0;
    font-weight: 700;
}

/* Resumo do catálogo: a mesma faixa do rodapé, no topo do popup. */
.vd-summary-mix {
    flex-shrink: 0;
    border-bottom: 1px solid var(--vd-border);
}

.vd-summary-mix[hidden] {
    display: none;
}

.vd-summary-mix.is-ok {
    background: #e9f7ef;
    color: #247a51;
}

.vd-summary-mix.is-out {
    background: #fdf1e2;
    color: #9a5100;
}

.vd-summary-mix.is-attention {
    animation: vd-mix-tigre-attention 0.5s ease;
}

/* Mais de um perfil no pedido: uma faixa por perfil. */
.vd-summary-mix > .vd-bottombar-mix + .vd-bottombar-mix {
    border-top: 1px solid rgba(0, 0, 0, 0.06);
}

.vd-summary-mix-action {
    padding: 0 16px 10px;
}

.vd-mix-tigre-note {
    margin: 2px 0 0;
    font-size: 12px;
    color: var(--vd-text-muted);
}

.vd-mix-tigre-label {
    display: block;
    margin: 8px 0 4px;
    font-size: 12px;
    color: var(--vd-text);
}

.vd-textarea.vd-mix-tigre-justification {
    min-height: 56px;
    padding: 9px 11px;
    /* 16px: abaixo disso o iOS dá zoom ao focar o campo. */
    font-size: 16px;
}

/* Catálogo: sem o "quique" da rolagem no fim da lista, que descolava o
   rodapé fixo da base da tela. */
html:has(.vd-bottombar),
body.vd-body:has(.vd-bottombar) {
    overscroll-behavior-y: none;
}

/* ==== Promoções no catálogo e card expandido (vendedor-catalogo.js) ==== */
.vd-promo-tag {
    display: flex;
    width: fit-content;
    margin-top: 4px;
    padding: 2px 8px;
    border-radius: 999px;
    background: #f7e9ea;
    color: var(--vd-red-dark);
    border: 1px solid #e6c4c6;
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 0.02em;
    text-transform: uppercase;
    white-space: nowrap;
}

/* Item em promoção: etiqueta vinho (cor da marca) no canto de cima da
   foto. No card da cor tintométrica, que não tem foto, vai na linha do
   código. */
.vd-promo-badge {
    display: inline-flex;
    align-items: center;
    padding: 2px 6px;
    border-radius: 6px;
    background: var(--vd-red-dark);
    color: #fff;
    font-size: 11px;
    font-weight: 800;
    line-height: 14px;
    letter-spacing: 0.01em;
    text-transform: uppercase;
    white-space: nowrap;
    pointer-events: none;
}

.vd-product-list-item.has-thumb > .vd-promo-badge {
    position: absolute;
    top: 9px;
    left: 9px;
    z-index: 1;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
}

.vd-order-item-price-label .vd-price-old {
    font-size: inherit;
    margin-right: 2px;
}


.vd-detail-title .vd-promo-tag {
    display: inline-flex;
    margin: 0 0 0 6px;
    vertical-align: middle;
}

.vd-price-old {
    font-size: 12px;
    font-weight: 600;
    color: var(--vd-text-muted);
    text-decoration: line-through;
}

.vd-promo-note {
    margin-top: 2px;
    font-size: 11px;
    font-weight: 700;
    color: var(--vd-red-dark);
}

.vd-promo-note.is-off {
    color: var(--vd-text-muted);
}

/* O card inteiro abre o painel: seta no pé, dentro do padding do card. */
.vd-product-list-item {
    cursor: pointer;
}

.vd-detail-toggle {
    position: absolute;
    left: 50%;
    bottom: 0;
    transform: translateX(-50%);
    width: 44px;
    height: 16px;
    padding: 0;
    border: 0;
    background: transparent;
    color: #a1a1a6;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
}

.vd-detail-toggle svg {
    transition: transform 0.18s ease;
}

.vd-product-list-item.is-expanded .vd-detail-toggle svg {
    transform: rotate(180deg);
}

.vd-product-detail {
    margin-top: 12px;
    padding-top: 10px;
    border-top: 1px dashed var(--vd-border);
    cursor: default;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.vd-product-detail[hidden] {
    display: none;
}

.vd-detail-section {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.vd-detail-title {
    font-size: 12px;
    font-weight: 800;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: var(--vd-text);
}

.vd-detail-muted {
    margin: 0;
    font-size: 12px;
    color: var(--vd-text-muted);
}

.vd-promo-rule {
    margin: 0;
    font-size: 13px;
}

.vd-promo-tiers {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.vd-promo-tiers li {
    display: flex;
    justify-content: space-between;
    gap: 8px;
    padding: 4px 8px;
    border-radius: 8px;
    font-size: 13px;
    background: #f7f7f8;
}

.vd-promo-tiers li.is-current {
    background: #f7e9ea;
    color: var(--vd-red-dark);
    font-weight: 700;
}

/* Resumo do pedido: nota da promoção de cada item. */
.vd-items-promo {
    margin-top: 2px;
    font-size: 11px;
    font-weight: 700;
    color: var(--vd-red-dark);
}

.vd-items-promo.is-off {
    color: var(--vd-text-muted);
}

.vd-items-price .vd-price-old {
    display: block;
}

/* Catálogo: paleta contida — verde só nos valores (por unidade e total),
   total em caixa neutra, e o item no pedido marcado só pela borda fina
   vermelha. */
.vd-product-list-item.is-in-cart {
    box-shadow: 0 0 0 1px var(--vd-red), 0 2px 10px rgba(0, 0, 0, 0.06);
}

.vd-product-list-item .vd-order-item-total-box {
    background: #f4f4f5;
}

.vd-product-list-item .vd-order-item-total-box .vd-total-label {
    color: var(--vd-text-muted);
}


/* Barra do pedido: carrinho com a quantidade de itens, total e, abaixo, o
   total à vista (condição com desconto), sem aumentar a barra. */
.vd-cart-icon {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    width: 42px;
    height: 42px;
    border-radius: 12px;
    background: #f4f4f5;
    color: var(--vd-red-dark);
}

.vd-cart-badge {
    position: absolute;
    top: -5px;
    right: -6px;
    min-width: 19px;
    height: 19px;
    padding: 0 5px;
    border-radius: 999px;
    border: 2px solid #fff;
    background: var(--vd-red-dark);
    color: #fff;
    font-size: 10px;
    font-weight: 800;
    line-height: 15px;
    text-align: center;
}

.vd-cart-badge[hidden] {
    display: none;
}

.vd-bottombar-values {
    display: flex;
    flex-direction: column;
    min-width: 0;
}

.vd-bottombar-values .vd-bottombar-total {
    line-height: 1.15;
}

.vd-bottombar-cash {
    margin-top: 1px;
    font-size: 12px;
    color: var(--vd-text-muted);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.vd-bottombar-cash strong {
    color: #237339;
    font-weight: 800;
}

.vd-bottombar-cash[hidden] {
    display: none;
}

/* Desconto da condição à vista: etiqueta verde junto do valor. */
.vd-bottombar-cash-rate {
    display: inline-block;
    margin-left: 4px;
    padding: 0 5px;
    border-radius: 999px;
    background: #e8f5ec;
    color: #237339;
    font-size: 11px;
    font-weight: 800;
    line-height: 16px;
    vertical-align: 1px;
}

/* Resumo do catálogo: item compacto em duas linhas — nome e quantidade;
   código/preço unitário e total da linha alinhado à direita. */
.vd-summary-item.vd-sum-item {
    padding: 6px 4px;
    border-radius: 0;
    box-shadow: none;
}

.vd-sum-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
}

.vd-sum-row--price {
    margin-top: 3px;
    align-items: baseline;
}

.vd-sum-row .vd-sum-name,
.vd-sum-row .vd-sum-meta {
    flex: 1;
    min-width: 0;
}

.vd-sum-name {
    font-size: 12.5px;
    font-weight: 700;
    line-height: 1.25;
    text-transform: uppercase;
    color: var(--vd-text);
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.vd-sum-meta {
    font-size: 11.5px;
    color: var(--vd-text-muted);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.vd-sum-meta .vd-price-old {
    font-size: 11px;
}

.vd-sum-unit {
    color: #237339;
    font-weight: 700;
}

.vd-sum-unavailable {
    font-weight: 600;
}

.vd-sum-item .vd-promo-note {
    margin-top: 1px;
    font-size: 10.5px;
}

/* Mesma largura da pílula de quantidade (84px), centrado embaixo dela. */
.vd-sum-total {
    flex-shrink: 0;
    min-width: 84px;
    text-align: center;
    font-size: 14px;
    font-weight: 800;
    color: #237339;
    line-height: 1.1;
}

/* Seletor de quantidade como pílula única, igual ao dos cards do catálogo. */
.vd-sum-row .vd-qty-row {
    flex-shrink: 0;
    margin-top: 0;
    gap: 2px;
    padding: 2px;
    background: #f4f4f5;
    border-radius: 9px;
}

.vd-sum-row .vd-qty-btn {
    width: 26px;
    height: 24px;
    border: none;
    border-radius: 7px;
    background: #fff;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.08);
    font-size: 15px;
    font-weight: 700;
    color: var(--vd-text);
}

.vd-sum-row .vd-qty-btn[data-qty-increase] {
    background: #fde3e3;
    color: var(--vd-red-dark);
}

.vd-sum-row .vd-qty-value {
    flex: 0 0 auto;
    min-width: 24px;
    font-size: 13px;
}

#vd-summary-items .vd-summary-divider {
    margin: 2px 4px;
}

#vd-summary-items .vd-swipe-row,
#vd-summary-items .vd-swipe-delete-bg {
    border-radius: 8px;
}

/* Card da linha tintométrica: quadrado igual ao botão 🎨 da base, com a cor
   escolhida de fundo (inline). Só mostra a cor, não abre nada. */
.vd-tintometric-swatch {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: default;
    box-shadow: inset 0 0 0 2px #fff;
}
