/* ==========================================================================
   DOUTOR NATURE — Meus Pedidos

   Estrutura:
     1. Reset & variáveis globais
     2. Layout (body, header, main, footer)
     3. Componentes reutilizáveis (cards, inputs, botões, feedbacks)
     4. Páginas (Consulta CPF · Lista de Pedidos)
     5. Responsivo
   ========================================================================== */


/* --------------------------------------------------
   1. RESET & GLOBAIS
   -------------------------------------------------- */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "Inter", "Segoe UI", Roboto, sans-serif;
    background-color: #f1f1f1;
    color: #1e293b;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}


/* --------------------------------------------------
   2. LAYOUT — Header
   -------------------------------------------------- */
.header-logo {
    padding: 22px 0 10px;
}

.header-logo .container {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.header-side {
    flex: 1;
}

.header-side--right {
    display: flex;
    justify-content: flex-end;
}

.header-logo .logo {
    height: 28px;
    width: auto;
    flex-shrink: 0;
}

.header-logo .header-exit {
    display: flex;
    flex: 1;
    justify-content: flex-end;
}

/* --------------------------------------------------
   2. LAYOUT — Main
   -------------------------------------------------- */
.main-content {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px 16px 44px;
}

.main-content .container {
    max-width: 760px;
}

/* --------------------------------------------------
   2. LAYOUT — Footer
   -------------------------------------------------- */
.footer-dn {
    background-color: transparent;
    padding: 24px 0;
    margin-top: auto;
}

.footer-content {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 40px;
    flex-wrap: wrap;
}

.footer-logo {
    height: 22px;
    width: auto;
    opacity: 0.5;
}

.footer-text {
    font-size: 0.82rem;
    color: #64748b;
    margin: 0;
}

.footer-text a {
    color: #64748b;
    text-decoration: underline;
    transition: color 0.2s;
}

.footer-text a:hover {
    color: #334155;
}


/* --------------------------------------------------
   3. COMPONENTES — Card
   -------------------------------------------------- */
.card-dn {
    max-width: 460px;
    margin: 0 auto;
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    padding: 40px 36px 26px;
    box-shadow:
        0 1px 3px rgba(15, 23, 42, 0.04),
        0 6px 20px rgba(15, 23, 42, 0.06);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.card-dn form {
    width: 100%;
}

/* --------------------------------------------------
   3. COMPONENTES — Títulos internos
   -------------------------------------------------- */
.page-title {
    font-size: 1.65rem;
    font-weight: 700;
    color: #3B4157;
    text-align: center;
    margin-bottom: 8px;
    letter-spacing: -0.025em;
}

.form-label-text {
    text-align: center;
    color: #64748b;
    font-size: 0.95rem;
    margin-bottom: 24px;
}

/* --------------------------------------------------
   3. COMPONENTES — Inputs
   -------------------------------------------------- */
.input-dn {
    display: block;
    width: 100%;
    background-color: #f8fafc;
    border: 1.5px solid #cbd5e1;
    border-radius: 6px;
    padding: 14px 18px;
    font-size: 1.1rem;
    color: #1e293b;
    font-weight: 600;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.input-dn::-moz-placeholder {
    color: #94a3b8;
    font-weight: 400;
}

.input-dn:-ms-input-placeholder {
    color: #94a3b8;
    font-weight: 400;
}

.input-dn::placeholder {
    color: #94a3b8;
    font-weight: 400;
}

.input-dn:focus {
    background-color: #fff;
    border-color: #94a3b8;
    box-shadow: 0 0 0 3px rgba(100, 116, 139, 0.12);
    outline: none;
}

.input-dn.is-invalid {
    border-color: #ef4444;
    box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.1);
}

.input-dn.is-valid {
    border-color: #22c55e;
    box-shadow: 0 0 0 3px rgba(34, 197, 94, 0.1);
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='20' height='20' viewBox='0 0 24 24' fill='none' stroke='%2322c55e' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='20 6 9 17 4 12'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 14px center;
    background-size: 20px;
    padding-right: 44px;
}

.invalid-feedback {
    text-align: center;
    font-size: 0.88rem;
    color: #ef4444;
    margin-top: 8px;
}

/* --------------------------------------------------
   3. COMPONENTES — Botões
   -------------------------------------------------- */
.btn-dn {
    display: block;
    width: 100%;
    margin: 0 auto;
    padding: 15px;
    font-size: 1.05rem;
    font-weight: 600;
    color: #fff;
    background-color: #1e293b;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    letter-spacing: 0.01em;
    transition: background-color 0.2s, opacity 0.2s, box-shadow 0.2s;
}

.btn-dn:hover:not(:disabled) {
    background-color: #334155;
    box-shadow: 0 4px 14px rgba(30, 41, 59, 0.22);
    color: #fff;
}

.btn-dn:active:not(:disabled) {
    background-color: #0f172a;
}

.btn-dn:disabled {
    background-color: #cbd5e1;
    cursor: not-allowed;
    color: #f8fafc;
    box-shadow: none;
}

/* --------------------------------------------------
   3. COMPONENTES — CAPTCHA
   -------------------------------------------------- */
.captcha-wrapper {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    margin-bottom: 14px;
}

.captcha-help {
    margin: 0;
    font-size: 0.92rem;
    color: #64748b;
    text-align: center;
}

.captcha-feedback {
    margin: 0;
    font-size: 0.95rem;
    color: #c0392b;
    text-align: center;
}

/* --------------------------------------------------
   3. COMPONENTES — Sticky action
   -------------------------------------------------- */
.sticky-action {
    position: -webkit-sticky;
    position: sticky;
    bottom: 14px;
    padding-top: 6px;
    padding-bottom: 6px;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0), rgba(255, 255, 255, 0.92) 38%, rgba(255, 255, 255, 1));
}


/* --------------------------------------------------
   4. PÁGINA — Consulta CPF
   -------------------------------------------------- */
.cpf-input {
    text-align: center;
    letter-spacing: 0.06em;
}


/* --------------------------------------------------
   4. PÁGINA — Lista de Pedidos
   -------------------------------------------------- */
.main-content--list {
    align-items: flex-start;
}

.main-content--list .container {
    max-width: 620px;
}

/* ---- Compre novamente ---- */
.compre-novamente {
    margin-bottom: 32px;
}

.produtos-grid {
    display: flex;
    gap: 16px;
}

.produto-thumb {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    padding: 16px 12px 14px;
    text-decoration: none;
    transition: box-shadow 0.2s, border-color 0.2s;
}

.produto-thumb:hover {
    border-color: #94a3b8;
    box-shadow: 0 4px 14px rgba(15, 23, 42, 0.08);
}

.produto-thumb img {
    width: 100%;
    max-width: 120px;
    height: auto;
    -o-object-fit: contain;
       object-fit: contain;
    margin-bottom: 10px;
}

.produto-nome {
    font-size: 0.82rem;
    font-weight: 600;
    color: #3B4157;
    text-align: center;
    line-height: 1.3;
}

/* ---- Pedidos section ---- */
.pedidos-section .form-label-text {
    text-align: left;
    margin-bottom: 16px;
}

/* Card de pedido */
.pedido-card {
    display: block;
    align-items: stretch;
    max-width: 100%;
    padding: 24px 28px 20px;
    margin-bottom: 16px;
}

/* Header do pedido: status + data */
.pedido-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 6px;
}

.pedido-status {
    display: inline-block;
    font-size: 0.82rem;
    font-weight: 700;
    letter-spacing: 0.02em;
    text-transform: uppercase;
    padding: 4px 10px;
    border-radius: 4px;
    line-height: 1;
    white-space: nowrap;
}

.status-preparacao {
    background-color: #fef3c7;
    color: #92400e;
}

.status-aguardando {
    background-color: #ffedd5;
    color: #9a3412;
}

.status-transito {
    background-color: #dbeafe;
    color: #1e40af;
}

.status-entregue {
    background-color: #dcfce7;
    color: #166534;
}

.status-cancelado {
    background-color: #fee2e2;
    color: #991b1b;
}

.pedido-data {
    font-size: 0.88rem;
    color: #64748b;
    white-space: nowrap;
}

/* Resumo */
.pedido-resumo {
    font-size: 0.92rem;
    color: #475569;
    margin-bottom: 14px;
    line-height: 1.4;
    font-style: italic;
}

/* Lista de produtos */
.pedido-produtos {
    border-top: 1px solid #e2e8f0;
    padding-top: 12px;
}

.pedido-produtos-titulo {
    display: block;
    font-size: 0.8rem;
    font-weight: 600;
    color: #64748b;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    margin-bottom: 6px;
}

.pedido-lista {
    list-style: none;
    padding: 0;
    margin: 0;
}

.pedido-lista li {
    font-size: 0.92rem;
    color: #1e293b;
    padding: 3px 0;
    line-height: 1.4;
}

.pedido-lista li::before {
    content: "·";
    color: #94a3b8;
    font-weight: 700;
    margin-right: 8px;
}

.pedido-lista li em {
    color: #64748b;
    font-style: italic;
}

/* Seção destaque produtos */
.destaque-produtos {
    margin-bottom: 32px;
}

.section-title {
    font-size: 1.15rem;
    font-weight: 700;
    color: #3B4157;
    margin-bottom: 16px;
    letter-spacing: -0.02em;
}

.destaque-grid {
    display: flex;
    gap: 14px;
}

.destaque-item {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    padding: 14px 10px 12px;
    text-decoration: none;
    transition: box-shadow 0.2s, border-color 0.2s, transform 0.2s;
}

.destaque-item:hover {
    border-color: #3B4157;
    box-shadow: 0 6px 20px rgba(15, 23, 42, 0.12);
    transform: translateY(-2px);
}

.destaque-img {
    width: 100%;
    aspect-ratio: 1 / 1;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 10px;
    overflow: hidden;
}

.destaque-img img {
    width: 100%;
    height: 100%;
    -o-object-fit: contain;
       object-fit: contain;
}

.destaque-nome {
    font-size: 0.84rem;
    font-weight: 700;
    color: #3B4157;
    text-align: center;
    line-height: 1.3;
    margin-bottom: 4px;
}

.destaque-desc {
    font-size: 0.74rem;
    color: #64748b;
    text-align: center;
    line-height: 1.3;
    margin-bottom: 10px;
}

.destaque-badge {
    font-size: 0.68rem;
    font-weight: 700;
    color: #166534;
    background: #dcfce7;
    border-radius: 20px;
    padding: 2px 10px;
    margin-bottom: 6px;
    white-space: nowrap;
}

.destaque-btn {
    display: inline-block;
    font-size: 0.76rem;
    font-weight: 600;
    color: #fff;
    background: #3B4157;
    border-radius: 6px;
    padding: 6px 16px;
    text-decoration: none;
    margin-top: auto;
    transition: background 0.2s;
}

.destaque-btn:hover {
    background: #2d3245;
    color: #fff;
}

/* --- Cashback --- */
.cashback-bloco {
    background: #fff;
    border: 1px solid #d1d5db;
    border-left: 4px solid #16a34a;
    border-radius: 8px;
    padding: 20px 24px;
    margin-bottom: 32px;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.cashback-topo {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
}

.cashback-rodape {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
}

.cashback-header {
    display: flex;
    align-items: center;
    gap: 12px;
}

.cashback-icone {
    font-size: 1.6rem;
}

.cashback-titulo {
    font-size: 0.95rem;
    font-weight: 700;
    color: #3B4157;
    margin: 0;
}

.cashback-validade {
    font-size: 0.8rem;
    color: #64748b;
    margin: 2px 0 0;
}

.cashback-valor {
    font-size: 1.8rem;
    font-weight: 800;
    color: #16a34a;
    margin: 0;
    white-space: nowrap;
}

.cashback-valor sup {
    font-size: 0.55em;
    vertical-align: super;
}

.cashback-cupom {
    margin: 0;
}

.cashback-cupom-label {
    display: block;
    font-size: 0.78rem;
    font-weight: 600;
    color: #64748b;
    margin-bottom: 6px;
}

.cashback-cupom-campo {
    display: inline-flex;
    align-items: center;
    border: 1px dashed #cbd5e1;
    border-radius: 6px;
    overflow: hidden;
}

.cashback-cupom-codigo {
    font-size: 0.92rem;
    font-weight: 700;
    color: #1e293b;
    letter-spacing: 0.06em;
    padding: 8px 14px;
    background: #f8fafc;
}

.cashback-cupom-copiar {
    font-size: 0.78rem;
    font-weight: 600;
    color: #3B4157;
    background: #e8e9ed;
    border: none;
    padding: 8px 14px;
    cursor: pointer;
    transition: background 0.2s;
}

.cashback-cupom-copiar:hover {
    background: #d1d5db;
}

.cashback-btn {
    display: inline-block;
    margin-left: auto;
    flex-shrink: 0;
}

@media (max-width: 575.98px) {
    .cashback-topo {
        flex-direction: column;
        align-items: flex-start;
    }

    .cashback-rodape {
        flex-direction: column;
        align-items: flex-start;
    }
}

/* Ações do pedido */
.pedido-acoes {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    margin-top: 14px;
    border-top: 1px solid #e2e8f0;
    padding-top: 12px;
}

.btn-pedido-acao {
    display: inline-block;
    font-size: 0.82rem;
    font-weight: 600;
    color: #64748b;
    background-color: transparent;
    text-decoration: none;
    padding: 6px 14px;
    border: 1px solid #cbd5e1;
    border-radius: 5px;
    transition: color 0.2s, border-color 0.2s, background-color 0.2s;
}

.btn-pedido-acao:hover {
    color: #1e293b;
    border-color: #94a3b8;
    background-color: #f8fafc;
}

.btn-pedido-acao--destaque {
    color: #fff;
    background-color: #3B4157;
    border-color: #3B4157;
}

.btn-pedido-acao--destaque:hover {
    background-color: #2d3245;
    border-color: #2d3245;
    color: #fff;
}

.btn-pedido-acao--destaque:disabled {
    background-color: #cbd5e1;
    border-color: #cbd5e1;
    color: #f8fafc;
    cursor: not-allowed;
    pointer-events: none;
}

.btn-pedido-acao--verde {
    color: #fff;
    background-color: #16a34a;
    border-color: #16a34a;
    font-weight: 700;
    padding-top: 14px;
    padding-bottom: 14px;
    font-size: 0.9rem;
}

.btn-pedido-acao--verde:hover {
    background-color: #15803d;
    border-color: #15803d;
    color: #fff;
}

/* Retenção 2 — Wrapper */
.retencao2-wrapper {
    text-align: center;
}

/* Retenção 2 — Botão aceitar */
.btn-retencao2-aceitar {
    display: block;
    width: 100%;
    padding: 16px 20px;
    font-size: 1rem;
    font-weight: 700;
    color: #fff;
    background-color: #c2702a;
    border: none;
    border-radius: 28px;
    cursor: pointer;
    margin-top: 24px;
    line-height: 1.3;
}

.btn-retencao2-aceitar:hover {
    background-color: #a85d22;
}

.btn-retencao-recusar {
    display: block;
    width: 100%;
    margin-top: 12px;
    text-align: center;
}

/* Retenção 2 — Box oferta */
.retencao2-oferta-box {
    border: 2px solid #e5be6f;
    border-radius: 12px;
    background: #fef9ee;
    padding: 20px 24px;
    text-align: center;
    margin: 20px 0 0;
}

.retencao2-oferta-tag {
    display: block;
    font-size: 0.8rem;
    color: #b8860b;
    font-weight: 600;
    margin-bottom: 10px;
    letter-spacing: 0.01em;
}

.retencao2-oferta-label {
    display: block;
    font-size: 0.95rem;
    color: #3B4157;
    font-weight: 600;
    margin-bottom: 2px;
}

.retencao2-oferta-valores {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    margin-top: 4px;
}

.retencao2-oferta-anterior {
    font-size: 0.95rem;
    color: #94a3b8;
    text-decoration: line-through;
}

.retencao2-oferta-novo {
    font-size: 1.6rem;
    font-weight: 800;
    color: #3B4157;
}

/* Estado vazio */
.estado-vazio {
    text-align: center;
    padding: 48px 36px 40px;
}

.estado-vazio-icon {
    font-size: 3rem;
    display: block;
    margin-bottom: 16px;
}

.estado-vazio-titulo {
    font-size: 1.25rem;
    font-weight: 700;
    color: #3B4157;
    margin-bottom: 8px;
}

.estado-vazio-texto {
    font-size: 0.95rem;
    color: #64748b;
    margin-bottom: 24px;
}


/* --------------------------------------------------
   4. PÁGINA — Detalhe do Pedido
   -------------------------------------------------- */
.detalhe-voltar {
    display: inline-block;
    font-size: 0.88rem;
    font-weight: 600;
    color: #64748b;
    text-decoration: none;
    margin-bottom: 16px;
    transition: color 0.2s;
}

.detalhe-voltar:hover {
    color: #3B4157;
}

.detalhe-card {
    align-items: stretch;
    padding: 24px 28px 22px;
    margin-bottom: 16px;
    max-width: 100%;
}

.detalhe-card-titulo {
    font-size: 1rem;
    font-weight: 700;
    color: #3B4157;
    margin-bottom: 16px;
}

/* --- Entrega: info + steps --- */
.detalhe-entrega-info {
    margin-bottom: 20px;
}

.detalhe-entrega-info .pedido-status {
    margin-bottom: 6px;
}

.detalhe-entrega-info .pedido-resumo {
    margin-bottom: 0;
    margin-top: 8px;
}

/* Steps visuais */
.entrega-steps {
    display: flex;
    align-items: flex-start;
    position: relative;
    padding: 8px 0 0;
}

/* Linha base cinza (fundo) */
.entrega-steps::before {
    content: "";
    position: absolute;
    top: 21px;
    left: calc(12.5% + 2px);
    right: calc(12.5% + 2px);
    height: 4px;
    background: #e2e8f0;
    border-radius: 2px;
    z-index: 0;
}

.step {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    position: relative;
    z-index: 1;
    min-width: 0;
}

/* Barra azul progressiva entre steps concluídos */
.step--done+.step--done::before,
.step--done+.step--active::before,
.step--done+.step--delivered::before {
    content: "";
    position: absolute;
    top: 11px;
    right: calc(50% + 13px);
    width: calc(100% - 26px);
    height: 4px;
    background: #3B82F6;
    border-radius: 2px;
    z-index: 0;
    -webkit-animation: stepLineGrow 0.5s ease-out both;
            animation: stepLineGrow 0.5s ease-out both;
}

/* Atraso progressivo para cada barra */
.step:nth-child(2).step--done::before,
.step:nth-child(2).step--active::before,
.step:nth-child(2).step--delivered::before {
    -webkit-animation-delay: 0.3s;
            animation-delay: 0.3s;
}

.step:nth-child(3).step--done::before,
.step:nth-child(3).step--active::before,
.step:nth-child(3).step--delivered::before {
    -webkit-animation-delay: 0.6s;
            animation-delay: 0.6s;
}

.step:nth-child(4).step--done::before,
.step:nth-child(4).step--active::before,
.step:nth-child(4).step--delivered::before {
    -webkit-animation-delay: 0.9s;
            animation-delay: 0.9s;
}

.step:nth-child(5).step--done::before,
.step:nth-child(5).step--active::before,
.step:nth-child(5).step--delivered::before {
    -webkit-animation-delay: 1.2s;
            animation-delay: 1.2s;
}

@-webkit-keyframes stepLineGrow {
    from {
        transform: scaleX(0);
        transform-origin: left;
    }

    to {
        transform: scaleX(1);
        transform-origin: left;
    }
}

@keyframes stepLineGrow {
    from {
        transform: scaleX(0);
        transform-origin: left;
    }

    to {
        transform: scaleX(1);
        transform-origin: left;
    }
}

.step-circle {
    width: 26px;
    height: 26px;
    border-radius: 50%;
    background: #e2e8f0;
    border: 3px solid #e2e8f0;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 8px;
    flex-shrink: 0;
    position: relative;
    z-index: 2;
    opacity: 0;
    -webkit-animation: stepCirclePop 0.3s ease-out forwards;
            animation: stepCirclePop 0.3s ease-out forwards;
}

/* Atraso progressivo para cada círculo */
.step:nth-child(1) .step-circle {
    -webkit-animation-delay: 0s;
            animation-delay: 0s;
}

.step:nth-child(2) .step-circle {
    -webkit-animation-delay: 0.35s;
            animation-delay: 0.35s;
}

.step:nth-child(3) .step-circle {
    -webkit-animation-delay: 0.7s;
            animation-delay: 0.7s;
}

.step:nth-child(4) .step-circle {
    -webkit-animation-delay: 1.05s;
            animation-delay: 1.05s;
}

.step:nth-child(5) .step-circle {
    -webkit-animation-delay: 1.4s;
            animation-delay: 1.4s;
}

@-webkit-keyframes stepCirclePop {
    0% {
        opacity: 0;
        transform: scale(0.5);
    }

    70% {
        transform: scale(1.1);
    }

    100% {
        opacity: 1;
        transform: scale(1);
    }
}

@keyframes stepCirclePop {
    0% {
        opacity: 0;
        transform: scale(0.5);
    }

    70% {
        transform: scale(1.1);
    }

    100% {
        opacity: 1;
        transform: scale(1);
    }
}

/* Concluído: círculo azul com check */
.step--done .step-circle {
    background: #3B82F6;
    border-color: #3B82F6;
}

.step--done .step-check::after {
    content: "";
    display: block;
    width: 10px;
    height: 6px;
    border-left: 2.5px solid #fff;
    border-bottom: 2.5px solid #fff;
    transform: rotate(-45deg);
    margin-top: -2px;
}

/* Ativo: círculo maior com borda azul + pulso */
.step--active .step-circle {
    width: 30px;
    height: 30px;
    margin-top: -2px;
    background: #fff;
    border: 3px solid #3B82F6;
    box-shadow: 0 0 0 4px rgba(59, 130, 246, 0.15);
    -webkit-animation: stepCirclePop 0.3s ease-out forwards,
        stepPulse 2s ease-in-out 1.5s infinite;
            animation: stepCirclePop 0.3s ease-out forwards,
        stepPulse 2s ease-in-out 1.5s infinite;
}

@-webkit-keyframes stepPulse {

    0%,
    100% {
        box-shadow: 0 0 0 4px rgba(59, 130, 246, 0.15);
    }

    50% {
        box-shadow: 0 0 0 8px rgba(59, 130, 246, 0.25);
    }
}

@keyframes stepPulse {

    0%,
    100% {
        box-shadow: 0 0 0 4px rgba(59, 130, 246, 0.15);
    }

    50% {
        box-shadow: 0 0 0 8px rgba(59, 130, 246, 0.25);
    }
}

/* Entregue: círculo verde com check */
.step--delivered .step-circle {
    background: #22c55e;
    border-color: #22c55e;
    -webkit-animation: stepCirclePop 0.3s ease-out forwards,
        stepDeliveredPop 0.6s ease-out 1.4s both;
            animation: stepCirclePop 0.3s ease-out forwards,
        stepDeliveredPop 0.6s ease-out 1.4s both;
}

.step--delivered .step-check::after {
    content: "";
    display: block;
    width: 10px;
    height: 6px;
    border-left: 2.5px solid #fff;
    border-bottom: 2.5px solid #fff;
    transform: rotate(-45deg);
    margin-top: -2px;
}

.step--delivered .step-label {
    color: #22c55e;
    font-weight: 700;
}

@-webkit-keyframes stepDeliveredPop {
    0% {
        transform: scale(1);
        box-shadow: 0 0 0 0 rgba(34, 197, 94, 0);
    }

    40% {
        transform: scale(1.25);
        box-shadow: 0 0 0 8px rgba(34, 197, 94, 0.3);
    }

    100% {
        transform: scale(1);
        box-shadow: 0 0 0 0 rgba(34, 197, 94, 0);
    }
}

@keyframes stepDeliveredPop {
    0% {
        transform: scale(1);
        box-shadow: 0 0 0 0 rgba(34, 197, 94, 0);
    }

    40% {
        transform: scale(1.25);
        box-shadow: 0 0 0 8px rgba(34, 197, 94, 0.3);
    }

    100% {
        transform: scale(1);
        box-shadow: 0 0 0 0 rgba(34, 197, 94, 0);
    }
}

.step-label {
    font-size: 0.72rem;
    font-weight: 600;
    color: #94a3b8;
    text-align: center;
    line-height: 1.25;
    padding: 0 2px;
}

.step--done .step-label,
.step--active .step-label {
    color: #3B4157;
}

/* Cancelado: visual diferenciado */
.entrega-steps--cancelled::before {
    background: #fca5a5;
}

.entrega-steps--cancelled .step--done .step-circle {
    background: #94a3b8;
    border-color: #94a3b8;
}

.entrega-steps--cancelled .step--done+.step--done::before,
.entrega-steps--cancelled .step--done+.step--cancelled::before {
    background: #94a3b8;
}

.step--cancelled .step-circle {
    width: 30px;
    height: 30px;
    margin-top: -2px;
    background: #ef4444;
    border-color: #ef4444;
    -webkit-animation: stepCirclePop 0.3s ease-out forwards,
        stepCancelledPop 0.6s ease-out 1.4s both;
            animation: stepCirclePop 0.3s ease-out forwards,
        stepCancelledPop 0.6s ease-out 1.4s both;
}

.step--cancelled .step-circle::after {
    content: "";
    display: block;
    width: 12px;
    height: 2.5px;
    background: #fff;
    border-radius: 2px;
}

.step--cancelled .step-label {
    color: #ef4444;
    font-weight: 700;
}

@-webkit-keyframes stepCancelledPop {
    0% {
        transform: scale(1);
        box-shadow: 0 0 0 0 rgba(239, 68, 68, 0);
    }

    40% {
        transform: scale(1.2);
        box-shadow: 0 0 0 8px rgba(239, 68, 68, 0.25);
    }

    100% {
        transform: scale(1);
        box-shadow: 0 0 0 0 rgba(239, 68, 68, 0);
    }
}

@keyframes stepCancelledPop {
    0% {
        transform: scale(1);
        box-shadow: 0 0 0 0 rgba(239, 68, 68, 0);
    }

    40% {
        transform: scale(1.2);
        box-shadow: 0 0 0 8px rgba(239, 68, 68, 0.25);
    }

    100% {
        transform: scale(1);
        box-shadow: 0 0 0 0 rgba(239, 68, 68, 0);
    }
}

/* Mensagem de cancelamento */
.entrega-cancelado-msg {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    background: #fef2f2;
    border: 1px solid #fecaca;
    border-radius: 8px;
    padding: 16px;
    margin-top: 16px;
}

.entrega-cancelado-msg .cancelado-icone {
    font-size: 1.4rem;
    line-height: 1;
    flex-shrink: 0;
}

.entrega-cancelado-msg .cancelado-texto {
    font-size: 0.88rem;
    color: #991b1b;
    line-height: 1.5;
}

.entrega-cancelado-msg .cancelado-texto strong {
    display: block;
    margin-bottom: 4px;
    font-size: 0.92rem;
}

.btn-pagar-agora {
    margin-top: 14px;
    text-align: center;
}

/* --- Produtos --- */
.detalhe-produto-lista {
    list-style: none;
    padding: 0;
    margin: 0;
}

.detalhe-produto-lista li {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 0;
    border-bottom: 1px solid #f1f5f9;
    font-size: 0.92rem;
}

.detalhe-produto-lista li:last-child {
    border-bottom: none;
}

.badge-assinatura {
    display: inline-flex;
    align-items: center;
    font-size: 0.7rem;
    font-weight: 500;
    color: #64748b;
    background: #f1f5f9;
    border-radius: 20px;
    padding: 2px 9px;
    white-space: nowrap;
}

.detalhe-produto-nome {
    color: #1e293b;
    font-weight: 500;
}

.detalhe-produto-qtd {
    color: #94a3b8;
    font-size: 0.82rem;
    font-weight: 600;
    white-space: nowrap;
    margin-left: 12px;
}

/* --- Endereço --- */
.detalhe-endereco p {
    font-size: 0.92rem;
    color: #475569;
    line-height: 1.6;
    margin: 0;
}

.detalhe-endereco p strong {
    color: #1e293b;
}

/* --- Pagamento --- */
.detalhe-pagamento {
    display: flex;
    flex-direction: column;
}

.pagamento-grupo {
    background: #fff;
    border: 1px solid #d1d5db;
    border-radius: 8px;
    margin-bottom: 10px;
    overflow: hidden;
}

.pagamento-aviso {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    font-size: 0.88rem;
    color: #334155;
    background: #eff6ff;
    border: 1px solid #bfdbfe;
    border-radius: 6px;
    padding: 12px 14px;
    margin-bottom: 14px;
    line-height: 1.5;
}

.pagamento-aviso-icone {
    width: 20px;
    height: 20px;
    min-width: 20px;
    color: #3b82f6;
    margin-top: 1px;
}

.pagamento-grupo-titulo {
    font-size: 0.82rem;
    font-weight: 700;
    color: #3B4157;
    text-transform: uppercase;
    letter-spacing: 0.03em;
    padding: 10px 16px;
    margin: 0;
    background: #e8e9ed;
    border-bottom: none;
}

.pagamento-grupo-corpo {
    padding: 14px 16px;
}

.pagamento-produtos {
    list-style: none;
    padding: 0;
    margin: 0;
    padding-bottom: 10px;
    border-bottom: 1px solid #f1f5f9;
}

.pagamento-produtos li {
    font-size: 0.92rem;
    font-weight: 600;
    color: #1e293b;
    padding: 3px 0;
}

.pagamento-produtos li::before {
    content: "•";
    color: #94a3b8;
    margin-right: 8px;
}

.pagamento-linha {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    padding: 9px 0;
    border-bottom: 1px solid #f1f5f9;
}

.pagamento-linha:last-child {
    border-bottom: none;
    padding-bottom: 0;
}

.pagamento-label {
    font-size: 0.92rem;
    color: #475569;
}

.pagamento-label--destaque {
    font-weight: 700;
    color: #3B4157;
}

.pagamento-valor {
    font-size: 0.95rem;
    font-weight: 600;
    color: #1e293b;
    text-align: right;
}

.pagamento-valor sup {
    font-size: 0.65em;
    vertical-align: super;
}

.pagamento-frete-gratis {
    color: #16a34a;
    font-weight: 700;
}

.pagamento-detalhe {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
}

.pagamento-metodo {
    font-size: 0.8rem;
    color: #94a3b8;
    margin-top: 2px;
}

.pagamento-total {
    font-size: 1.05rem;
    font-weight: 700;
}

.pagamento-separador {
    height: 1px;
    background: #e2e8f0;
    margin: 4px 0;
}

/* --- Ajuda --- */
.detalhe-ajuda-lista {
    list-style: none;
    padding: 0;
    margin: 0;
}

.detalhe-ajuda-lista li {
    border-bottom: 1px solid #f1f5f9;
}

.detalhe-ajuda-lista li:last-child {
    border-bottom: none;
}

.detalhe-ajuda-lista a {
    display: flex;
    align-items: center;
    padding: 12px 0;
    font-size: 0.92rem;
    color: #3B4157;
    text-decoration: none;
    font-weight: 500;
    transition: color 0.2s;
}

.detalhe-ajuda-lista a::before {
    content: "›";
    font-size: 1.2rem;
    font-weight: 700;
    color: #94a3b8;
    margin-right: 10px;
    line-height: 1;
}

.detalhe-ajuda-lista a:hover {
    color: #1e293b;
}

.detalhe-ajuda-lista a:hover::before {
    color: #3B4157;
}

.detalhe-ajuda-btn-link {
    display: flex;
    align-items: center;
    padding: 12px 0;
    font-size: 0.92rem;
    color: #3B4157;
    font-weight: 500;
    background: none;
    border: none;
    cursor: pointer;
    width: 100%;
    text-align: left;
    transition: color 0.2s;
}

.detalhe-ajuda-btn-link::before {
    content: "›";
    font-size: 1.2rem;
    font-weight: 700;
    color: #94a3b8;
    margin-right: 10px;
    line-height: 1;
}

.detalhe-ajuda-btn-link:hover {
    color: #1e293b;
}

.detalhe-ajuda-btn-link:hover::before {
    color: #3B4157;
}

.modal-fechar {
    position: absolute;
    top: 12px;
    right: 14px;
    background: none;
    border: none;
    font-size: 1.5rem;
    line-height: 1;
    color: #94a3b8;
    cursor: pointer;
    padding: 2px 6px;
    transition: color 0.2s;
}

.modal-fechar:hover {
    color: #1e293b;
}

/* --- Rodapé do detalhe --- */
.detalhe-rodape {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    margin-top: 8px;
    margin-bottom: 16px;
}

.detalhe-rodape .btn-pedido-acao:only-child {
    width: 100%;
    text-align: center;
}

.assinatura-nota {
    font-size: 0.75rem;
    color: #94a3b8;
    margin: 12px 0 4px;
    text-align: left;
}

.assinatura-asterisco {
    color: #94a3b8;
    font-size: 0.7rem;
    margin-left: 2px;
    vertical-align: super;
}


/* --------------------------------------------------
   4.4 ASSINATURAS
   -------------------------------------------------- */
.assinatura-topo {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
}

.assinatura-topo .detalhe-card-titulo {
    margin-bottom: 0;
}

.assinatura-detalhe {
    border-top: 1px solid #f1f5f9;
}

.assinatura-info {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    padding: 10px 0;
    border-bottom: 1px solid #f1f5f9;
}

.assinatura-info:last-child {
    border-bottom: none;
    padding-bottom: 0;
}

.assinatura-label {
    font-size: 0.88rem;
    color: #64748b;
}

.assinatura-valor {
    font-size: 0.88rem;
    font-weight: 600;
    color: #1e293b;
    text-align: right;
}

.assinatura-acoes {
    margin-top: 14px;
    padding-top: 12px;
    border-top: 1px solid #f1f5f9;
    display: flex;
    justify-content: flex-end;
}

/* --- Modal Cancelamento --- */
.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(15, 23, 42, 0.5);
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.modal-caixa {
    position: relative;
    background: #fff;
    border-radius: 10px;
    width: 100%;
    max-width: 480px;
    padding: 30px 28px 24px;
    box-shadow: 0 12px 40px rgba(15, 23, 42, 0.18);
    max-height: 90vh;
    overflow-y: auto;
}

.modal-titulo {
    font-size: 1.08rem;
    font-weight: 700;
    color: #3B4157;
    margin: 0 0 6px;
}

.modal-subtitulo {
    font-size: 0.88rem;
    color: #64748b;
    margin: 0 0 18px;
}

.modal-texto {
    font-size: 0.9rem;
    color: #475569;
    line-height: 1.5;
    margin: 0 0 10px;
}

.modal-retencao-icone {
    font-size: 2rem;
    margin-bottom: 12px;
}

/* Motivos (radio list) */
.modal-motivos {
    display: flex;
    flex-direction: column;
    gap: 6px;
    margin-bottom: 22px;
}

.modal-motivo-item {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 0.88rem;
    color: #334155;
    padding: 10px 14px;
    border: 1px solid #e2e8f0;
    border-radius: 6px;
    cursor: pointer;
    transition: border-color 0.2s, background 0.2s;
}

.modal-motivo-item:hover {
    border-color: #94a3b8;
    background: #f8fafc;
}

.modal-motivo-item input[type="radio"] {
    accent-color: #3B4157;
    width: 16px;
    height: 16px;
    margin: 0;
    flex-shrink: 0;
}

/* Benefícios (retenção) */
.modal-beneficios {
    list-style: none;
    padding: 0;
    margin: 16px 0 22px;
}

.modal-beneficios li {
    display: flex;
    flex-direction: column;
    padding: 10px 0;
    border-bottom: 1px solid #f1f5f9;
}

.modal-beneficios li:last-child {
    border-bottom: none;
}

.modal-beneficios li strong {
    font-size: 0.88rem;
    color: #1e293b;
    margin-bottom: 2px;
}

.modal-beneficios li span {
    font-size: 0.82rem;
    color: #64748b;
    line-height: 1.4;
}

/* Ações do modal */
#btn-continuar-cancel, #btn-pedido-acao {
    min-width: 177px;
    text-align: center;
}

.modal-acoes {
    display: flex;
    gap: 10px;
    justify-content: flex-end;
    margin-top: 6px;
}

.modal-acoes--center {
    justify-content: center;
}

.modal-btn-cancelar {
    color: #991b1b;
    border-color: #fecaca;
}

.modal-btn-cancelar:hover {
    background: #fef2f2;
    border-color: #fca5a5;
    color: #991b1b;
}

/* Loading / Spinner */
.modal-loading {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 30px 0;
    gap: 16px;
}

.modal-spinner {
    width: 36px;
    height: 36px;
    border: 3px solid #e2e8f0;
    border-top-color: #3B4157;
    border-radius: 50%;
    -webkit-animation: modalSpin 0.7s linear infinite;
            animation: modalSpin 0.7s linear infinite;
}

@-webkit-keyframes modalSpin {
    to {
        transform: rotate(360deg);
    }
}

@keyframes modalSpin {
    to {
        transform: rotate(360deg);
    }
}

/* Form dentro do modal */
.modal-form {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-bottom: 20px;
}

.modal-campo {
    display: flex;
    flex-direction: column;
    flex: 1;
}

.modal-campo-label {
    font-size: 0.78rem;
    font-weight: 600;
    color: #64748b;
    margin-bottom: 4px;
}

.modal-campo .input-dn:disabled {
    background: #f8fafc;
    color: #94a3b8;
    cursor: not-allowed;
}

.modal-campo-row {
    display: flex;
    gap: 10px;
}


/* ===== Oferta de desconto (modal retenção) ===== */

.oferta-comparativo {
    display: flex;
    flex-direction: column;
    gap: 0;
    margin: 20px 0;
    border-radius: 8px;
    overflow: hidden;
    border: 1px solid #e2e8f0;
}

.oferta-linha {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 16px;
    font-size: 0.9rem;
}

.oferta-linha--original {
    background: #f8fafc;
    color: #94a3b8;
}

.oferta-linha--original .oferta-valor {
    text-decoration: line-through;
    color: #94a3b8;
}

.oferta-linha--atual {
    background: #f1f5f9;
    color: #475569;
}

.oferta-linha--novo {
    background: #f0fdf4;
    color: #166534;
    font-weight: 600;
}

.oferta-valor {
    font-weight: 600;
    white-space: nowrap;
}

.oferta-valor--destaque {
    font-size: 1.1rem;
    color: #16a34a;
}

.oferta-tag {
    display: inline-block;
    font-size: 0.7rem;
    font-weight: 700;
    padding: 2px 6px;
    border-radius: 4px;
    background: #e2e8f0;
    color: #475569;
    vertical-align: middle;
    margin-left: 4px;
}

.oferta-tag--destaque {
    background: #dcfce7;
    color: #16a34a;
}

.oferta-nota {
    font-size: 0.85rem;
    color: #64748b;
    margin-top: 12px;
}

.oferta-nota strong {
    color: #16a34a;
}


/* --------------------------------------------------
   5. RESPONSIVO
   -------------------------------------------------- */
@media (max-width: 576px) {
    .header-logo {
        padding-top: 18px;
    }

    .header-logo .logo {
        height: auto;
        width: 160px;
    }

    .header-logo .container {
        justify-content: space-evenly;
    }

    .header-logo .header-span {
        display: none;
    }

    .header-logo .header-exit {
        display: contents;
        flex: auto;
    }

    .main-content {
        align-items: center;
        padding-top: 16px;
    }

    .card-dn {
        border-radius: 8px;
        padding: 28px 20px 18px;
        box-shadow:
            0 1px 2px rgba(0, 0, 0, 0.05),
            0 4px 16px rgba(0, 0, 0, 0.07);
    }

    .page-title {
        font-size: 1.6rem;
    }

    .btn-dn {
        width: 100%;
    }

    .footer-content {
        flex-direction: column;
        gap: 12px;
        text-align: center;
    }

    .sticky-action {
        bottom: 10px;
    }

    .g-recaptcha {
        transform: scale(0.92);
        transform-origin: center top;
    }

    /* Pedidos — mobile */
    .pedido-card {
        padding: 18px 16px 16px;
    }

    .pedido-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 4px;
    }

    .pedido-status {
        font-size: 0.78rem;
    }

    .destaque-grid {
        gap: 10px;
    }

    .destaque-grid.owl-loaded {
        display: block;
        gap: 0;
    }

    #destaque-carousel .owl-stage-outer {
        overflow: visible;
    }

    #destaque-carousel .owl-stage-outer .owl-stage {
        padding-top: 4px;
    }

    .destaque-grid.owl-loaded .destaque-item {
        flex: none;
    }

    #destaque-carousel .owl-dot,
    #destaque-carousel .owl-dot.active {
        width: 12px !important;
        height: 12px !important;
        margin: 0 5px !important;
    }

    #destaque-carousel .owl-theme .owl-nav.disabled+.owl-dots {
        margin-top: 3px !important;
    }

    .destaque-item {
        padding: 10px 6px 10px;
    }

    .destaque-nome {
        font-size: 0.75rem;
    }

    #btn-continuar-cancel, #btn-pedido-acao {
        min-width: 125px;
        text-align: center;
    }

}

/* ---- Link secundário em modais ---- */
.modal-link-secundario {
    font-size: 0.82rem;
    color: #94a3b8;
    text-decoration: none;
    margin-top: 20px;
    cursor: pointer;
    text-align: center;
    padding: 8px 0;
}

.modal-link-secundario:hover {
    color: #64748b;
    text-decoration: underline;
}

.modal-acoes--vertical {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0;
}

.modal-acoes--vertical .btn-pedido-acao--verde {
    width: 100%;
    text-align: center;
}

.modal-acoes--vertical .btn-pedido-acao:not(.btn-pedido-acao--verde) {
    width: 100%;
    text-align: center;
    margin-top: 12px;
    box-sizing: border-box;
}

/* ---- Upload de fotos (problema com produto) ---- */
.problema-fotos-grid {
    display: flex;
    gap: 12px;
    margin: 16px 0 8px;
}

.problema-foto-slot {
    width: 90px;
    height: 90px;
    border: 2px dashed #cbd5e1;
    border-radius: 8px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: border-color 0.2s, background 0.2s;
    position: relative;
    overflow: hidden;
}

.problema-foto-slot:hover {
    border-color: #94a3b8;
    background: #f8fafc;
}

.problema-foto-slot--preenchido {
    border-style: solid;
    border-color: #16a34a;
    cursor: default;
}

.problema-foto-icone {
    font-size: 1.5rem;
    color: #94a3b8;
    line-height: 1;
}

.problema-foto-label {
    font-size: 0.65rem;
    color: #94a3b8;
    margin-top: 4px;
    text-align: center;
}

.problema-foto-preview {
    width: 100%;
    height: 100%;
    -o-object-fit: cover;
       object-fit: cover;
    position: absolute;
    top: 0;
    left: 0;
}

.problema-foto-remover {
    position: absolute;
    top: 4px;
    right: 4px;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: rgba(0, 0, 0, 0.6);
    color: #fff;
    border: none;
    font-size: 0.65rem;
    font-weight: 700;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2;
    line-height: 1;
}

@media (max-width: 576px) {
    .destaque-desc {
        font-size: 0.68rem;
    }

    .produtos-grid {
        gap: 10px;
    }

    .produto-thumb {
        padding: 12px 8px 10px;
    }

    .produto-thumb img {
        max-width: 80px;
    }

    .produto-nome {
        font-size: 0.75rem;
    }

    .destaque-img {
        width: 60%;
    }

    /* Detalhe do pedido — mobile */
    .detalhe-card {
        padding: 20px 18px 18px;
    }

    .step-label {
        font-size: 0.65rem;
    }

    .step-circle {
        width: 22px;
        height: 22px;
    }

    .detalhe-rodape {
        flex-direction: column;
        align-items: flex-end;
    }

    .detalhe-rodape .btn-pedido-acao {
        text-align: center;
    }


}

@media(max-width: 360px) {
    .g-recaptcha {
        transform: scale(0.80);
    }
}
