/* Reset Básico e Fontes */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Poppins', sans-serif; /* Fonte profissional */
    background-color: #f4f7f9; /* Fundo suave */
    color: #333;
    line-height: 1.6;
}

.container {
    width: 90%;
    max-width: 1200px;
    margin: 0 auto;
}

/* Container Principal */
.feedback-container {
    padding: 40px 20px;
    text-align: center;
    font-family: 'Inter', sans-serif;
    color: #333;
}

/* Animação do Checkmark (Ícone de Sucesso) */
.icon-wrapper {
    display: flex;
    justify-content: center;
    margin-bottom: 20px;
}

.checkmark-circle {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    background: #e8f5e9;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto;    /* Centraliza o círculo no container */
}

.checkmark-img {
    width: 50px;       /* Tamanho reduzido para caber no círculo */
    height: 50px;
    object-fit: contain; /* Garante que a imagem não distorça */
}
/* Tipografia */
.feedback-header h2 {
    color: #1b5e20;
    margin-bottom: 8px;
    font-size: 24px;
}

.feedback-header p {
    color: #666;
    margin-bottom: 30px;
}

/* Card de Detalhes do Pedido */
.order-card {
    background: #f8f9fa;
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 25px;
    border: 1px solid #eee;
}

.order-row {
    display: flex;
    justify-content: space-between;
    margin-bottom: 10px;
    font-size: 14px;
}

.order-row:last-child {
    margin-bottom: 0;
    padding-top: 10px;
    border-top: 1px dashed #ccc;
}

/* Informações de Envio */
.notification-info {
    font-size: 13px;
    color: #888;
    margin-bottom: 30px;
}

/* Botão Moderno */
.btn-primary-success {
    background-color: #2e7d32;
    color: white;
    border: none;
    padding: 14px 32px;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.3s ease;
    width: 100%;
}

.btn-primary-success:hover {
    background-color: #1b5e20;
}
/* --- Cabeçalho e Menu --- */
.main-header {
    background-color: #ffffff;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
    padding: 15px 0;
    position: sticky;
    top: 0;
    z-index: 1000;
}

.main-header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 15px; /* Espaçamento de segurança nas bordas */
}

.logo {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 40px;
}

.logo img {
    height: 100%;        /* mantém o header SEMPRE igual */
    width: auto;         /* mantém proporção da imagem */
    object-fit: contain; /* evita distorção */
    display: block;
}

.logo b {
    color: #333; /* Detalhe do Tech em outra cor */
}

.main-nav ul {
    list-style: none;
    display: flex;
}

.main-nav ul li a {
    text-decoration: none;
    color: #555;
    font-weight: 500;
    padding: 10px 15px;
    transition: color 0.3s;
}

.main-nav ul li a:hover {
    color: #007bff;
}

.nav-icons i {
    font-size: 1.2em;
    margin-left: 20px;
    cursor: pointer;
    color: #555;
    transition: color 0.3s;
}

.nav-icons i:hover {
    color: #007bff;
}


/* --- Layout de Produtos --- */
h1 {
    text-align: center;
    padding: 40px 0 20px;
    font-weight: 600;
}
.product-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr); /* SEMPRE 2 COLUNAS */
    gap: 30px;
    padding-bottom: 50px;
}

.product-card {
    background: #fff;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.08);
    transition: transform 0.3s, box-shadow 0.3s;
    text-align: center;

    position: relative; /* IMPORTANTE */
}

.info-bar {
    width: 100%;
    background: #00a650; /* verde Mercado Livre */
    color: #fff;
    text-align: center;
    padding: 10px 0;
    font-size: 0.95em;
    font-weight: 700;
    letter-spacing: 0.5px;
    border-bottom: 3px solid #008f45; /* linha mais escura embaixo */
}


.product-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.12);
}

/* --- Imagem e Zoom (MUITO IMPORTANTE) --- */
.image-container {
    position: relative;
    height: 250px;
    overflow: hidden;
    cursor: zoom-in;
    z-index: 1;
}

.product-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.3s; /* Para o efeito de reset visual */
}

.magnifier-lens {
    position: absolute;
    border: 1px solid #007bff;
    border-radius: 50%; /* Lente circular, estilo mais moderno */
    width: 150px;
    height: 150px;
    background-repeat: no-repeat;
    display: none; /* Escondido por padrão, mostrado pelo JS */
    pointer-events: none; /* Para não interferir na detecção do mouse */
    z-index: 10;
    opacity: 0.9;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.3);
}

/* --- Detalhes e Selo FULL --- */
.details {
    padding: 20px;
    position: relative; /* garante que o conteúdo não “tape” o FULL */
    z-index: 1;
}
.full-tag {
    background-color: #ffffff;
    color: #00a650;
    font-weight: 700;
    font-style: italic;
    padding: 4px 10px;
    border-radius: 5px;
    font-size: 0.85em;

    position: absolute;
    top: 10px;
    right: 10px;

    z-index: 50; /* Fica acima da imagem */
    display: inline-flex !important;
    align-items: center;
    gap: 5px;

    border: 1px solid #00a65033;
    pointer-events: none; /* Não interfere no hover */
}


.full-tag i {
    color: #00a650;
    font-size: 0.9em;
}


.product-name {
    font-size: 1.3em;
    font-weight: 600;
    margin: 10px 0 5px;
    color: #333;
}

.product-description {
    font-size: 0.9em;
    color: #777;
    margin-bottom: 15px;
}

.current-price {
    font-size: 1.5em;
    font-weight: 700;
    color: #007bff;
    display: block;
    margin-bottom: 15px;
}

.add-to-cart {
    background-color: #007bff;
    color: white;
    border: none;
    padding: 10px 20px;
    font-size: 1em;
    font-weight: 600;
    border-radius: 5px;
    cursor: pointer;
    transition: background-color 0.3s, transform 0.1s;
    width: 100%;
}

.add-to-cart:hover {
    background-color: #0056b3;
}

.add-to-cart:active {
    transform: scale(0.98);
}
/* Garantir que o footer fique no final */
html, body {
    height: 100%;
}

body {
    display: flex;
    flex-direction: column;
}

/* --- Footer Moderno --- */
footer {
    margin-top: auto;
    background: linear-gradient(to right, #007bff, #0056b3);
    padding: 25px 0;
    text-align: center;
    color: white;
    font-weight: 500;
    letter-spacing: 0.5px;
    box-shadow: 0 -2px 10px rgba(0,0,0,0.15);
}

footer p {
    font-size: 1em;
}

.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.6);
    display: none;
    justify-content: center;
    align-items: center;
    padding: 10px; /* importante para telas pequenas */
    z-index: 9999;
}

.modal-overlay.show {
    display: flex;
}

.modal-product {
    background: #fff;
    width: 900px;
    max-width: 100%;
    /* Alterado: de height fixo para max-height */
    max-height: 95vh; 
    /* Alterado: permite scroll vertical se o conteúdo crescer */
    overflow-y: auto; 
    border-radius: 12px;
    padding: 20px;
    box-shadow: 0 0 25px rgba(0,0,0,0.3);
    position: relative;
    display: flex;
    flex-direction: column;
}


.close-modal {
    position: absolute;
    right: 15px;
    top: 10px;
    font-size: 2.1em;
    cursor: pointer;
    
    /* SOLUÇÃO AQUI: */
    z-index: 100;          /* Garante que fique acima de tudo */
    line-height: 1;        /* Centraliza o X verticalmente */
    padding: 10px;         /* Aumenta a área de clique */
    color: #333;           /* Cor padrão */
    transition: color 0.2s;
}

.close-modal:hover {
    color: #ff3838;        /* Fica vermelho ao passar o mouse */
}

/* --- Ajustes Gerais --- */
.header-grid {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
}

.menu-mobile-btn {
    display: none; /* Escondido por padrão no PC */
    font-size: 1.5rem;
    cursor: pointer;
    color: #333;
    padding: 5px;
    min-width: 40px; /* Garante área de clique */
}

/* --- Responsividade Mobile (Máximo 768px) --- */
@media (max-width: 768px) {
        .main-header .container {
        justify-content: center;
    }

    .header-grid {
        display: flex;
        align-items: center;
        width: 100%;
    }
    .menu-mobile-btn {
        display: flex;
        align-items: center;
        justify-content: center;
        width: 50px;          /* controla distância da logo */
        order: 1;
    }
    .logo {
        flex: 1;
        order: 2;
        display: flex;
        justify-content: center;
        max-width: 180px;
    }

    .nav-icons {
        display: flex;
        align-items: center;
        justify-content: center;
        width: 50px;          /* controla distância da logo */
        order: 3;
    }

    /* Estilo da Navegação Lateral/Suspensa */
    .main-nav {
        display: none; 
        position: absolute;
        top: 100%; /* Aparece abaixo do header branco */
        left: 0;
        width: 100%;
        background: #ffffff;
        box-shadow: 0 4px 10px rgba(0,0,0,0.1);
        z-index: 1000;
        padding: 10px 0;
    }

    .main-nav.active {
        display: block; /* Mostra quando clicado */
    }

    .main-nav ul {
        flex-direction: column;
        align-items: center;
    }

    .main-nav ul li {
        text-align: center;
        border-bottom: 1px solid #eee;
    }

    .main-nav ul li a {
        padding: 12px 20px;
        display: block;
        width: 100%;
        text-align: center;
        border-bottom: 1px solid #f0f0f0;
    }
    #cartCount {
        right: -5px; 
        top: -5px;
    }
}
.modal-content {
    flex: 1;
    display: flex;
    gap: 30px;
    /* Alterado: removido overflow: hidden para permitir que o conteúdo se expanda */
    overflow: visible; 
}

.nav-icons {
    display: flex;
    align-items: center;
    min-width: 40px; /* Equilibra o lado oposto ao hamburguer */
}

.nav-icons i {
    font-size: 1.2em;
    cursor: pointer;
    color: #555;
    margin-left: 0; /* Removido o margin-left que causava corte */
}
.modal-left {
    flex: 1;
    min-width: 350px;
    display: flex;
    justify-content: center;
    align-items: flex-start !important; /* 👈 ESSA LINHA CORRIGE TUDO */
    height: 100%;
}

.modal-left img {
    width: 100%;
    max-width: 340px;
    height: auto;
    border-radius: 10px;
    object-fit: cover;
}
.modal-right {
    flex: 1.2;
    min-width: 280px;
    /* Alterado: removido overflow: hidden */
    display: flex;
    flex-direction: column;
}

.frete-box {
    background: #f4f7f9;
    padding: 15px;
    margin-top: 20px;
    border-radius: 10px;
}

.frete-box input {
    width: 100%;
    padding: 12px;
    margin: 6px 0;
    border: 1px solid #ccc;
    border-radius: 6px;
}

.frete-box button {
    width: 100%;
    padding: 12px;
    background: #007bff;
    color: #fff;
    border: none;
    border-radius: 6px;
    font-weight: 600;
    cursor: pointer;
}
.frete-animation {
    margin-top: 15px;
    text-align: center;
}

.truck {
    display: flex;
    align-items: center;
    gap: 10px;
}

.truck-icon {
    font-size: 2.5em;
}

.truck-bar {
    flex: 1;
    height: 14px;
    background: #ddd;
    border-radius: 10px;
    overflow: hidden;
}

.truck-fill {
    width: 0%;
    height: 100%;
    background: linear-gradient(90deg, #00a650, #00d18a);
    transition: width 0.25s ease-in-out;
}
@media (max-width: 768px) {
    .modal-product {
            height: auto; /* Deixa o conteúdo ditar a altura */
            max-height: 90vh;
            margin: 20px auto;
        }

    .modal-content {
            flex-direction: column;
            overflow-y: visible;
        }

    .modal-left img {
        max-width: 100%;
    }

    .modal-left {
        min-width: 100%;
        height: 250px; /* Altura fixa para a imagem no mobile não ocupar a tela toda */
    }

    .close-modal {
        top: 5px;
        right: 10px;
    }
}

@media (max-width: 768px) {
    .product-grid {
        grid-template-columns: 1fr; /* apenas 1 coluna no celular */
    }
}


@media (max-width: 480px) {
    .modal-left img {
        max-width: 260px;
    }

    .modal-product {
        padding: 10px;
    }

    h2, h3, p {
        text-align: center;
    }
}
.checkout-step {
    animation: fadeIn 0.25s ease;
}

.hidden {
    display: none !important;
}

.prosseguir-btn {
    width: 100%;
    padding: 14px;
    background: #00a650;
    border: none;
    color: #fff;
    border-radius: 6px;
    margin-top: 20px;
    font-size: 1em;
    cursor: pointer;
}

.endereco-confirmado {
    background: #eef6ff;
    padding: 10px;
    border-radius: 6px;
    margin-bottom: 12px;
    border-left: 3px solid #007bff;
}

.steps-container {
    position: relative;
    width: 100%;
    /* Removido height: 100% e overflow: hidden */
}

.checkout-step {
    /* Alterado: Removido position: absolute e inset: 0 */
    display: none; /* Oculto por padrão */
    width: 100%;
    animation: fadeIn 0.25s ease;
}
.checkout-step.active-step {
    display: block; /* Mostra apenas o ativo ocupando espaço real */
    opacity: 1;
    pointer-events: all;
}
.btn-primary {
    width: 100%;
    padding: 14px;
    background: #007bff;
    color: #fff;
    border: none;
    border-radius: 8px;
    font-size: 1em;
    font-weight: 600;
    cursor: pointer;
    margin-top: 15px;
    transition: background .2s;
}
.btn-primary:hover {
    background: #005fcc;
}

.btn-success {
    width: 100%;
    padding: 14px;
    background: #00a650;
    color: #fff;
    border: none;
    border-radius: 8px;
    font-size: 1em;
    font-weight: 600;
    cursor: pointer;
    margin-top: 18px;
    transition: background .2s;
}
.btn-success:hover {
    background: #008b42;
}
.checkout-step input {
    width: 100%;
    padding: 14px;
    border-radius: 8px;
    border: 1px solid #dcdcdc;
    margin: 8px 0;
    background: #fafafa;
    font-size: .95em;
    transition: border .2s, background .2s;
}
.checkout-step input:focus {
    border-color: #007bff;
    background: #fff;
    outline: none;
}
.qrcode-box {
    width: 230px;
    margin: 20px auto;
}
.pix-info {
    font-size: 1em;
    color: #444;
    margin-bottom: 5px;
    text-align: center;
}
.pix-observacao {
    text-align: center;
    margin-top: 12px;
    color: #666;
    font-size: .9em;
}
@media (max-width: 768px) {
    .steps-container {
            min-height: auto; 
        }
}
.barra-expressa {
    width: 100%;
    background: #00b44b; /* verde EMI Plastic */
    color: #fff;
    text-align: center;
    font-weight: 700;
    padding: 6px 0;
    font-size: 15px;
    letter-spacing: 1px;
    display: none; /* escondida até o JS permitir mostrar */
}
.product-actions {
    display: flex;
    gap: 10px;
    margin-top: 10px;
}

.add-to-cart {
    flex: 1;
}

.buy-now {
    flex: 1;
    background: #28a745;   /* verde bonito */
    color: white;
    border: none;
    padding: 10px 0;
    border-radius: 6px;
    cursor: pointer;
    font-size: 16px;
    font-weight: 600;
    transition: 0.2s;
}

.buy-now:hover {
    background: #218838;
}
.cart-wrapper {
    position: relative;
    cursor: pointer;
    display: inline-block;
}

.cart-wrapper i {
    font-size: 1.2em;
    color: #555;
    transition: color 0.3s;
    margin-left: 0;
}

.cart-wrapper i:hover {
    color: #007bff;
}

#cartCount {
    position: absolute;
    top: -8px;
    right: -10px;
    background: #ff3838;
    color: #fff;
    padding: 2px 7px;
    border-radius: 50%;
    font-size: 11px;
    font-weight: bold;
    line-height: 1;
    min-width: 18px;
    text-align: center;
    display: inline-block;
}
#cartModal.show {
    display: flex !important;
}

/* ================================
   MODAL DO CARRINHO
================================ */
#cartModal {
    display: none; /* escondido por padrão */
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.6);
    backdrop-filter: blur(4px);
    justify-content: center;
    align-items: center;
    z-index: 9999;
}

#cartModal.show {
    display: flex;
}

.modal-cart {
    width: 600px;
    max-height: 95vh;
    background: #fff;
    border-radius: 12px;
    padding: 20px;
    overflow-y: auto;
    position: relative;
    box-shadow: 0 8px 40px rgba(0,0,0,0.25);
}

/* Botão fechar */
.modal-cart .close-modal {
    position: absolute;
    top: 12px;
    right: 15px;
    font-size: 24px;
    cursor: pointer;
    color: #333;
}

/* Ítens do carrinho */
.cart-item {
    display: flex;
    align-items: center;
    margin-bottom: 14px;
    border-bottom: 1px solid #eee;
    padding-bottom: 10px;
}

.cart-item img {
    width: 55px;
    height: auto;
    margin-right: 10px;
}

.item-info {
    flex: 1;
    font-size: 14px;
}

.qty-control {
    display: flex;
    align-items: center;
    gap: 5px;
}

.qty-btn {
    width: 24px;
    height: 24px;
    background: #ddd;
    border: none;
    cursor: pointer;
    border-radius: 4px;
}

.qty-input {
    width: 32px;
    text-align: center;
    border: 1px solid #ccc;
}

.cart-footer {
    text-align: center;
    margin-top: 20px;
}

.cart-footer .btn-success {
    width: 100%;
}
/* Aviso de limite */
#cartLimitWarning {
    display: none;
    color: #d62828;
    font-weight: 600;
    text-align: center;
    margin-top: 10px;
    margin-bottom: 5px;
    opacity: 0;
    transition: opacity 0.4s ease;
}

#cartLimitWarning.show {
    display: block;
    opacity: 1;
}

/* Botão + desabilitado */
.qty-btn.disabled {
    opacity: 0.4;
    cursor: not-allowed !important;
}
.subinfo {
    color: #555;
    font-size: 13px;
    margin-top: 3px;
    display: block;
}

#modal-left-produto,
#modal-left-carrinho {
    flex: 1;
    min-width: 350px;
    display: flex;
    justify-content: center;
    align-items: flex-start; /* imagem começa lá em cima */
    height: 100%;
    padding-top: 0;          /* evita espaço */
}
#modal-left-produto img {
    width: 100% !important;        /* Força largura total */
    height: 100% !important;       /* Força altura total */
    max-width: none !important;    /* Remove a trava de 340px */
    max-height: none !important;   /* Remove travas de altura */
    margin: 0 !important;          /* Remove margens */
    
    /* IMPORTANTE: 
       'cover' = Cobre tudo, corta as sobras mas mantém a imagem bonita (Recomendado).
       'fill'  = Estica a imagem distorcendo ela para caber exato (Fica "achatada").
    */
    object-fit: cover !important; 
}
#modal-left-produto {
    padding: 0 !important;          /* Remove padding para encostar nas bordas */
    align-items: stretch !important; /* Força o alinhamento total */
    justify-content: center;
    overflow: hidden;                /* Garante que nada saia do quadrado */
    border-radius: 10px 0 0 10px;    /* Arredonda só o lado esquerdo */
}
.frete-valor {
    margin-top: 12px;
    font-size: 1.15em;
    font-weight: 600;
    color: #007bff; /* azul bonito */
    text-align: center;
    letter-spacing: .3px;
}
