/* =====================================================
   ESTILOS PÁGINA MEUS PEDIDOS - IziStyle
   ===================================================== */

/* Loading */
.loading-page {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 60vh;
    gap: 20px;
}

.loading-page i {
    font-size: 3em;
    color: var(--primary-color, #f70a31);
}

.loading-page p {
    color: #666;
    font-size: 1.1em;
}

/* Layout Principal */
.pedidos-section {
    padding: 60px 20px;
    background: #f5f5f5;
    min-height: calc(100vh - 200px);
}

.pedidos-container {
    max-width: 1000px;
    margin: 0 auto;
}

/* Header da Página */
.pedidos-header {
    background: white;
    border-radius: 12px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.08);
    padding: 30px;
    margin-bottom: 30px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.pedidos-header h1 {
    font-size: 1.8em;
    color: #333;
    margin: 0;
    display: flex;
    align-items: center;
    gap: 12px;
}

.pedidos-header h1 i {
    color: var(--primary-color, #f70a31);
}

.pedidos-count {
    background: #f5f5f5;
    padding: 8px 16px;
    border-radius: 20px;
    font-size: 0.9em;
    color: #666;
}

/* Lista de Pedidos */
.pedidos-list {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

/* Card do Pedido */
.pedido-card {
    background: white;
    border-radius: 12px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.08);
    overflow: hidden;
    transition: transform 0.3s, box-shadow 0.3s;
}

.pedido-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.12);
}

/* Header do Card */
.pedido-card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 25px;
    border-bottom: 1px solid #eee;
    background: #fafafa;
}

.pedido-info {
    display: flex;
    align-items: center;
    gap: 20px;
}

.pedido-numero {
    font-weight: 700;
    color: #333;
    font-size: 1.1em;
}

.pedido-data {
    color: #999;
    font-size: 0.9em;
}

.pedido-status {
    padding: 6px 14px;
    border-radius: 20px;
    font-size: 0.85em;
    font-weight: 600;
    color: white;
}

/* Body do Card */
.pedido-card-body {
    padding: 25px;
}

/* Itens do Pedido */
.pedido-itens {
    margin-bottom: 20px;
}

.pedido-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 0;
    border-bottom: 1px solid #f0f0f0;
}

.pedido-item:last-child {
    border-bottom: none;
}

.item-info {
    flex: 1;
}

.item-nome {
    font-weight: 500;
    color: #333;
    margin-bottom: 4px;
}

.item-detalhes {
    font-size: 0.85em;
    color: #999;
}

.item-preco {
    font-weight: 600;
    color: #333;
    text-align: right;
}

/* Totais */
.pedido-totais {
    background: #f9f9f9;
    border-radius: 8px;
    padding: 15px 20px;
    margin-top: 15px;
}

.pedido-totais-row {
    display: flex;
    justify-content: space-between;
    padding: 5px 0;
    color: #666;
    font-size: 0.95em;
}

.pedido-totais-row.total {
    border-top: 1px solid #ddd;
    margin-top: 10px;
    padding-top: 10px;
    font-weight: 700;
    color: #333;
    font-size: 1.1em;
}

/* Footer do Card */
.pedido-card-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 25px;
    background: #fafafa;
    border-top: 1px solid #eee;
}

.pedido-rastreio {
    display: flex;
    align-items: center;
    gap: 10px;
}

.pedido-rastreio a {
    color: var(--primary-color, #f70a31);
    text-decoration: none;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 6px;
}

.pedido-rastreio a:hover {
    text-decoration: underline;
}

.btn-detalhes {
    background: var(--primary-color, #f70a31);
    color: white;
    padding: 10px 20px;
    border: none;
    border-radius: 6px;
    font-size: 0.9em;
    font-weight: 600;
    cursor: pointer;
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: all 0.3s;
}

.btn-detalhes:hover {
    background: #d60929;
    transform: translateY(-1px);
}

/* Estado Vazio */
.pedidos-empty {
    background: white;
    border-radius: 12px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.08);
    padding: 60px 40px;
    text-align: center;
}

.pedidos-empty i {
    font-size: 4em;
    color: #ddd;
    margin-bottom: 20px;
}

.pedidos-empty h2 {
    color: #333;
    margin: 0 0 10px 0;
    font-size: 1.5em;
}

.pedidos-empty p {
    color: #666;
    margin: 0 0 25px 0;
}

.btn-shop {
    background: var(--primary-color, #f70a31);
    color: white;
    padding: 12px 30px;
    border: none;
    border-radius: 6px;
    font-size: 1em;
    font-weight: 600;
    cursor: pointer;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 10px;
    transition: all 0.3s;
}

.btn-shop:hover {
    background: #d60929;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(247, 10, 49, 0.3);
}

/* Mensagem de Erro */
.pedidos-error {
    background: #fff5f6;
    border: 1px solid #f70a31;
    border-radius: 12px;
    padding: 30px;
    text-align: center;
    color: #d60929;
}

.pedidos-error i {
    font-size: 2em;
    margin-bottom: 15px;
}

/* Modal de Detalhes */
.modal-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.6);
    z-index: 9999;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.modal-overlay.active {
    display: flex;
}

.modal-content {
    background: white;
    border-radius: 12px;
    max-width: 600px;
    width: 100%;
    max-height: 80vh;
    overflow-y: auto;
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 25px;
    border-bottom: 1px solid #eee;
}

.modal-header h2 {
    margin: 0;
    font-size: 1.3em;
    color: #333;
}

.modal-close {
    background: none;
    border: none;
    font-size: 1.5em;
    color: #999;
    cursor: pointer;
    padding: 5px;
}

.modal-close:hover {
    color: #333;
}

.modal-body {
    padding: 25px;
}

/* Timeline de Status */
.status-timeline {
    margin: 20px 0;
    padding-left: 30px;
    border-left: 2px solid #eee;
}

.timeline-item {
    position: relative;
    padding-bottom: 20px;
}

.timeline-item:last-child {
    padding-bottom: 0;
}

.timeline-item::before {
    content: '';
    position: absolute;
    left: -36px;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: #ddd;
}

.timeline-item.active::before {
    background: var(--primary-color, #f70a31);
}

.timeline-item.completed::before {
    background: #28a745;
}

.timeline-titulo {
    font-weight: 600;
    color: #333;
    margin-bottom: 4px;
}

.timeline-data {
    font-size: 0.85em;
    color: #999;
}

/* Responsividade */
@media (max-width: 768px) {
    .pedidos-header {
        flex-direction: column;
        gap: 15px;
        text-align: center;
    }

    .pedido-card-header {
        flex-direction: column;
        gap: 15px;
        text-align: center;
    }

    .pedido-info {
        flex-direction: column;
        gap: 8px;
    }

    .pedido-card-footer {
        flex-direction: column;
        gap: 15px;
    }

    .btn-detalhes {
        width: 100%;
        justify-content: center;
    }

    .pedido-item {
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
    }

    .item-preco {
        text-align: left;
    }
}

@media (max-width: 480px) {
    .pedidos-section {
        padding: 30px 15px;
    }

    .pedidos-header {
        padding: 20px;
    }

    .pedidos-header h1 {
        font-size: 1.4em;
    }

    .pedido-card-body {
        padding: 20px;
    }
}

/* =====================================================
   BOTAO DE RASTREAR
   ===================================================== */
.btn-rastrear {
    background: transparent;
    border: 2px solid var(--primary-color, #f70a31);
    color: var(--primary-color, #f70a31);
    padding: 8px 16px;
    border-radius: 6px;
    font-size: 0.9em;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: all 0.3s;
}

.btn-rastrear:hover {
    background: var(--primary-color, #f70a31);
    color: white;
}

.btn-rastrear i {
    font-size: 1.1em;
}

/* =====================================================
   MODAL DE RASTREAMENTO
   ===================================================== */
.modal-rastreamento {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.7);
    z-index: 10000;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.modal-rastreamento.ativo {
    display: flex;
}

.modal-rastreamento-content {
    background: white;
    border-radius: 12px;
    max-width: 500px;
    width: 100%;
    max-height: 80vh;
    overflow: hidden;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
    animation: modalSlideIn 0.3s ease;
}

@keyframes modalSlideIn {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.modal-rastreamento-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 25px;
    border-bottom: 1px solid #eee;
    background: #fafafa;
}

.modal-rastreamento-header h2 {
    margin: 0;
    font-size: 1.3em;
    color: #333;
    display: flex;
    align-items: center;
    gap: 10px;
}

.modal-rastreamento-header h2 i {
    color: var(--primary-color, #f70a31);
}

.modal-rastreamento-header .modal-close {
    background: none;
    border: none;
    font-size: 2em;
    color: #999;
    cursor: pointer;
    padding: 0;
    line-height: 1;
    transition: color 0.2s;
}

.modal-rastreamento-header .modal-close:hover {
    color: #333;
}

.modal-rastreamento-body {
    padding: 25px;
    max-height: calc(80vh - 80px);
    overflow-y: auto;
}

/* Codigo do Rastreamento */
.rastreamento-codigo {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 15px;
    background: #f5f5f5;
    border-radius: 8px;
    margin-bottom: 25px;
}

.rastreamento-codigo span {
    color: #666;
}

.rastreamento-codigo strong {
    font-family: monospace;
    font-size: 1.1em;
    color: #333;
    letter-spacing: 1px;
}

.rastreamento-codigo a {
    color: var(--primary-color, #f70a31);
    margin-left: auto;
    font-size: 1.1em;
}

.rastreamento-codigo a:hover {
    color: #d60929;
}

/* Loading do Rastreamento */
.rastreamento-loading {
    text-align: center;
    padding: 40px 20px;
    color: #666;
}

.rastreamento-loading i {
    font-size: 2.5em;
    color: var(--primary-color, #f70a31);
    margin-bottom: 15px;
}

.rastreamento-loading p {
    margin: 0;
}

/* Estado Vazio/Erro */
.rastreamento-empty,
.rastreamento-erro {
    text-align: center;
    padding: 30px 20px;
}

.rastreamento-empty i,
.rastreamento-erro i {
    font-size: 2.5em;
    margin-bottom: 15px;
    display: block;
}

.rastreamento-empty i {
    color: #ffc107;
}

.rastreamento-erro i {
    color: #dc3545;
}

.rastreamento-empty p,
.rastreamento-erro p {
    margin: 0 0 10px 0;
    color: #666;
}

.btn-link-correios {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-top: 15px;
    padding: 10px 20px;
    background: var(--primary-color, #f70a31);
    color: white;
    text-decoration: none;
    border-radius: 6px;
    font-weight: 600;
    transition: all 0.3s;
}

.btn-link-correios:hover {
    background: #d60929;
    transform: translateY(-1px);
}

/* Timeline de Rastreamento */
.rastreamento-timeline .timeline {
    position: relative;
    padding-left: 30px;
}

.rastreamento-timeline .timeline::before {
    content: '';
    position: absolute;
    left: 12px;
    top: 8px;
    bottom: 8px;
    width: 2px;
    background: #ddd;
}

.rastreamento-timeline .timeline-item {
    position: relative;
    padding-bottom: 25px;
}

.rastreamento-timeline .timeline-item:last-child {
    padding-bottom: 0;
}

.rastreamento-timeline .timeline-marker {
    position: absolute;
    left: -30px;
    width: 26px;
    height: 26px;
    border-radius: 50%;
    background: #ddd;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 0.7em;
}

.rastreamento-timeline .timeline-item.atual .timeline-marker {
    background: var(--primary-color, #f70a31);
    box-shadow: 0 0 0 4px rgba(247, 10, 49, 0.2);
}

.rastreamento-timeline .timeline-content {
    background: #f9f9f9;
    border-radius: 8px;
    padding: 15px;
    border-left: 3px solid #ddd;
}

.rastreamento-timeline .timeline-item.atual .timeline-content {
    border-left-color: var(--primary-color, #f70a31);
    background: #fff5f6;
}

.rastreamento-timeline .timeline-data {
    font-size: 0.85em;
    color: #999;
    margin-bottom: 5px;
}

.rastreamento-timeline .timeline-descricao {
    font-weight: 600;
    color: #333;
    margin-bottom: 5px;
}

.rastreamento-timeline .timeline-local {
    font-size: 0.85em;
    color: #666;
    display: flex;
    align-items: center;
    gap: 5px;
}

.rastreamento-timeline .timeline-local i {
    color: var(--primary-color, #f70a31);
}

/* Responsivo Modal */
@media (max-width: 480px) {
    .modal-rastreamento {
        padding: 10px;
    }

    .modal-rastreamento-content {
        max-height: 90vh;
    }

    .modal-rastreamento-header {
        padding: 15px 20px;
    }

    .modal-rastreamento-body {
        padding: 20px;
    }

    .rastreamento-codigo {
        flex-wrap: wrap;
    }

    .rastreamento-codigo a {
        margin-left: 0;
        margin-top: 10px;
        width: 100%;
        text-align: right;
    }

    .btn-rastrear {
        width: 100%;
        justify-content: center;
    }
}

/* ===== Acompanhar pedido (29/10/2026) ===== */
#rastreamento-codigo-valor { font-family: inherit; letter-spacing: 0; }
.acomp-etapas { list-style: none; margin: 4px 0 22px; padding: 0; }
.acomp-etapa { position: relative; display: flex; gap: 14px; padding-bottom: 18px; }
.acomp-etapa:last-child { padding-bottom: 0; }
.acomp-etapa:not(:last-child)::before { content: ""; position: absolute; left: 15px; top: 32px; bottom: 0; width: 2px; background: #e3e3e8; }
.acomp-etapa.feito:not(:last-child)::before { background: #1f9d55; }
.acomp-marca { flex: none; display: grid; place-items: center; width: 32px; height: 32px; border-radius: 50%; background: #f0f0f3; color: #a0a0aa; font-size: 13px; }
.acomp-etapa.feito .acomp-marca { background: #e7f6ee; color: #1f9d55; }
.acomp-etapa.atual .acomp-marca { background: #1f9d55; color: #fff; box-shadow: 0 0 0 5px rgba(31, 157, 85, 0.15); }
.acomp-etapa.erro .acomp-marca { background: #e74c3c; color: #fff; }
.acomp-texto { padding-top: 4px; min-width: 0; }
.acomp-texto strong { display: block; color: #1d1d24; font-size: 15px; }
.acomp-etapa.pendente .acomp-texto strong { color: #9a9aa3; }
.acomp-data { display: block; margin-top: 1px; color: #6b6b76; font-size: 12px; }
.acomp-texto p { margin: 3px 0 0; color: #6b6b76; font-size: 13px; line-height: 1.45; }
.acomp-envio { margin-top: 6px; padding: 16px 18px; border: 1px solid #ececf1; border-radius: 12px; background: #fafafc; }
.acomp-envio h3 { display: flex; align-items: center; gap: 8px; margin: 0 0 10px; font-size: 15px; }
.acomp-envio h4 { margin: 16px 0 8px; font-size: 13px; text-transform: uppercase; letter-spacing: 0.05em; color: #6b6b76; }
.acomp-envio dl { display: grid; gap: 8px; margin: 0; }
.acomp-envio dl div { display: flex; justify-content: space-between; gap: 12px; font-size: 14px; }
.acomp-envio dt { color: #6b6b76; }
.acomp-envio dd { margin: 0; text-align: right; font-weight: 600; color: #1d1d24; }
.acomp-codigo { font-family: Consolas, monospace; letter-spacing: 0.04em; }
.acomp-copiar { margin-left: 6px; padding: 3px 8px; border: 1px solid #d6d7df; border-radius: 6px; background: #fff; font-size: 12px; cursor: pointer; }
.acomp-aviso { display: flex; gap: 10px; padding: 12px 14px; border-radius: 10px; background: #fff6e6; color: #7a5200; font-size: 13px; line-height: 1.5; }
.acomp-aviso p { margin: 0; }
.acomp-link { display: inline-flex; align-items: center; gap: 8px; margin-top: 14px; padding: 10px 16px; border-radius: 8px; background: #111; color: #fff !important; font-size: 14px; font-weight: 700; text-decoration: none; }
.acomp-dica { margin: 8px 0 0; color: #8a8a93; font-size: 12px; }
.acomp-ajuda { display: flex; align-items: center; gap: 10px; margin-top: 18px; padding-top: 14px; border-top: 1px solid #ececf1; color: #4a4a52; font-size: 14px; }
.acomp-ajuda .fa-whatsapp { color: #25d366; font-size: 20px; }
.acomp-ajuda a { color: #1f9d55; font-weight: 700; }
@media (max-width: 480px) {
    .acomp-envio dl div { flex-direction: column; gap: 2px; }
    .acomp-envio dd { text-align: left; }
}
