/* =========================================================================
   ESTILIZAÇÃO PREMIUM COMPATÍVEL COM O MOCKUP REAL
   ========================================================================= */
.customizer-page-wrapper {
    background: #09090e; /* Fundo escuro absoluto */
    padding: 40px 30px !important; /* 🚀 Adiciona 30px de espaçamento nas bordas e anula o tema */
    width: 100%;
    box-sizing: border-box; /* Garante que o padding não deforma a largura */
}

.customizer-container {
    max-width: 1260px;
    margin: 0 auto;
    padding: 0 20px;
    font-family: sans-serif;
    box-sizing: border-box;
}

/* Títulos de introdução */
.customizer-intro h1 {
    color: #fff;
    font-size: 2.2rem;
    margin: 0 0 5px 0;
}
.customizer-intro p {
    color: #8a8a9e;
    font-size: 0.95rem;
    margin: 0 0 25px 0;
}

/* Passos do Topo */
.customizer-steps {
    display: flex;
    gap: 30px;
    margin-bottom: 30px;
}
.customizer-steps .step {
    display: flex;
    align-items: center;
    gap: 8px;
    color: #4a4a5a;
    font-weight: bold;
    font-size: 0.9rem;
}
.customizer-steps .step.active { color: #a14cfc; }
.customizer-steps .step-num {
    width: 24px;
    height: 24px;
    background: #1c1c24;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.8rem;
    color: #7a7a8a;
}
.customizer-steps .step.active .step-num {
    background: #6a1b9a;
    color: #fff;
}

/* Área de Trabalho */
.customizer-workspace {
    display: flex;
    gap: 30px;
    align-items: flex-start;
    background-color: white;
    border-radius:20px;
}

/* Coluna de Controlos (Fundo Claro de Personalização) */
.controls-column {
    flex: 1;
    background: #f4f5f9; /* Cinza muito claro e limpo do mockup */
    border-radius: 20px 0 0 20px;
    padding: 30px;
    display: flex;
    flex-direction: column;
    gap: 30px;

}

.section-box {
    background: transparent;
}
.section-box h2 {
    font-size: 1.05rem;
    color: #111;
    margin: 0 0 15px 0;
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: bold;
}
.section-box h2 i { color: #6a1b9a; }

.form-grid { display: flex; gap: 15px; }
.form-group { flex: 1; display: flex; flex-direction: column; gap: 6px; }
.form-group label { font-size: 0.8rem; color: #666; font-weight: bold; }
.form-group select {
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 6px;
    background: #fff;
    font-size: 0.9rem;
}

/* Grelha de Capas */
.case-types-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 15px;
}
.case-card {
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    padding: 15px 10px;
    text-align: center;
    cursor: pointer;
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
}
.case-card.active {
    border: 2px solid #6a1b9a;
}
.badge-check {
    position: absolute;
    top: -8px; right: -8px;
    background: #6a1b9a;
    color: #fff;
    width: 20px; height: 20px;
    border-radius: 50%;
    font-size: 0.75rem;
    display: flex; align-items: center; justify-content: center;
}
.case-img-placeholder {
    width: 45px; height: 80px;
    border-radius: 6px;
    background: #ddd;
    margin-bottom: 4px;
}
.transparent-case { background: linear-gradient(135deg, #fff 25%, #f0f0f0 25%, #f0f0f0 50%, #fff 50%, #fff 75%, #f0f0f0 75%); background-size: 10px 10px; border: 1px solid #ccc; }
.black-case { background: #1a1a1a; }
.tough-case { background: #333; border: 2px solid #111; }
.wallet-case { background: #4a3b32; position: relative; }

.case-name { font-size: 0.8rem; font-weight: bold; color: #222; }
.case-price { font-size: 0.8rem; color: #6a1b9a; font-weight: bold; }

/* Ações de Design */
.design-actions { display: flex; gap: 10px; }
.btn-action {
    flex: 1;
    padding: 12px;
    background: #fff;
    border: 1px solid #ddd;
    border-radius: 6px;
    font-size: 0.85rem;
    font-weight: bold;
    cursor: pointer;
    display: flex; align-items: center; justify-content: center; gap: 6px;
}
.btn-purple-action {
    background: #6a1b9a;
    color: #fff;
    border-color: #6a1b9a;
}
.file-info { font-size: 0.75rem; color: #888; margin-top: 5px; display: block; }

/* Footer de Controlos */
.controls-footer-box {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-top: 1px solid #ddd;
    padding-top: 20px;
    margin-top: 10px;
}
.price-label { font-size: 0.8rem; color: #666; display: block; }
.total-amount { font-size: 1.6rem; font-weight: bold; color: #6a1b9a; }
.btn-preview-main {
    background: #6a1b9a;
    color: #fff;
    padding: 14px 28px;
    border: none;
    border-radius: 6px;
    font-weight: bold;
    cursor: pointer;
}

/* Selos Mini */
.mini-badges-grid { display: flex; gap: 15px; margin-top: 10px; }
.mini-badge { display: flex; gap: 8px; align-items: center; flex: 1; }
.mini-badge i { color: #6a1b9a; font-size: 1.2rem; }
.mini-badge strong { font-size: 0.75rem; color: #222; display: block; }
.mini-badge span { font-size: 0.7rem; color: #666; }

/* Coluna Direita (Visualizador Escuro) */
.preview-column {
    width: 480px;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 20px;
}
.editor-toolbar { display: flex; gap: 15px; margin-bottom: 30px; }
.editor-toolbar button {
    background: transparent;
    border: none;
    color: #8a8a9e;
    cursor: pointer;
    font-size: 0.8rem;
    display: flex; flex-direction: column; align-items: center; gap: 5px;
}
.editor-toolbar button:hover { color: #fff; }
.editor-toolbar button i { font-size: 1.2rem; }

/* Canvas Area */
.canvas-area-wrapper {
    position: relative;
    width: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 40px 0;
}
.mock-anchor {
    position: absolute;
    width: 6px; height: 6px;
    background: #a14cfc;
    border-radius: 50%;
}
.anchor-top { top: 0; left: 50%; }
.anchor-left { left: 40px; top: 50%; }
.anchor-right { right: 40px; top: 50%; }
.anchor-bottom { bottom: 0; left: 50%; }

/*alteração para permitir meter a foto de cliente por camadas*/
/*************************************************************/

/* 1. O Contentor Mestre (Onde está o telemóvel completo de fundo) */
.customizer-container .main-phone-mockup {
    width: 260px;
    height: 520px;
    border-radius: 36px;
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.6);
    display: flex;
    align-items: center;
    justify-content: center;
    border: 4px solid #333;
    overflow: hidden;
    position: relative !important;
    background-size: cover;
    background-position: center center;
    background-repeat: no-repeat;
    z-index: 1;
}

/* 2. A div intermédia do Design (A gaveta da foto) */
.customizer-container .design-layer-container {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 2; /* Fica acima do fundo */
    overflow: hidden;
    pointer-events: none;

    mix-blend-mode: multiply; /* O teu efeito original de fusão */
}

/* 3. A Imagem do Upload do Cliente (Dentro da gaveta) */
/* 3. A Imagem do Upload do Cliente (Encaixada inteira no início) */
.customizer-container #af-preview-image {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(1);
    
    /* 🌟 MUDANÇA AQUI: Força a imagem a caber inteira na largura do tlm */
    width: 100%;
    height: auto; 
    object-fit: contain; /* Altera de cover para contain para não cortar nada */
    
    mix-blend-mode: multiply;
    display: block;
}

/* 4. A CAMADA DAS CÂMARAS (O teu segundo ficheiro vai cair aqui no topo) */
/* 4. A Camada das Câmaras Isoladas com Fusão Realista
.customizer-container .cam-lens-mock {
    position: absolute !important;
    top: 0 !important;
    left: 0 !important;
    width: 260px !important;  
    height: 520px !important; 
    z-index: 10 !important; /* Fica por cima da foto 
    pointer-events: none;

    background-size: cover;
    background-position: center center;
    background-repeat: no-repeat;
    display: block !important;

    /* 🌟 O DETALHE QUE FALTAVA: Faz o bloco das câmaras fundir-se com a foto de trás 
    mix-blend-mode: multiply; 
}
*/
/* 4. A Camada das Câmaras Isoladas (Autónoma para o modo Mate) */
/* 4. A Camada das Câmaras Isoladas (Blindada contra o Zoom) */


/* 4. A Camada das Câmaras Isoladas (Trancada à frente no modo Mate) */
.customizer-container .cam-lens-mock {
    position: absolute !important;
    top: 0 !important;
    left: 0 !important;
    width: 100% !important;
    height: 100% !important;
    
    /* 🌟 O QUE FALTA: Dá prioridade máxima absoluta para ficar por cima do zoom e da foto */
    z-index: 99999 !important; 
    pointer-events: none;

    /* Mantém o alinhamento nativo que já usavas na capa transparente */
    background-size: cover;
    background-position: center center;
    background-repeat: no-repeat;
    display: block !important;
}



/*teste*/




/* 4. O Texto de Instrução (Garante que fica visível no meio) */
/* 4. O Texto de Instrução (Garante que fica visível no meio e à frente do cinzento) */
.customizer-container .placeholder-design-text {
    position: absolute !important;
    top: 50% !important;
    left: 50% !important;
    transform: translate(-50%, -50%) !important;
    
    /* 🌟 O SEGREDO: Fica à frente do background cinzento do telemóvel */
    z-index: 5 !important; 
    
    text-align: center;
    color: #ffffff; /* Altera para #333333 se preferires texto escuro sobre o cinzento do tlm */
    font-weight: bold;
    font-size: 1.2rem;
    padding: 20px;
    width: 80%;
    pointer-events: none; /* Não bloqueia cliques */
    display: block;
}








.placeholder-design-text {
    text-align: center; color: #fff; font-weight: bold; font-size: 1.8rem; letter-spacing: 2px;
}
.placeholder-design-text .small-text { font-size: 1rem; font-style: italic; font-weight: normal; }

/* Ângulos Laterais */
.angle-thumbs-container {
    position: absolute;
    right: 0; top: 10%;
    display: flex; flex-direction: column; gap: 20px;
}
.thumb-item { text-align: center; cursor: pointer; }
.thumb-item span { color: #8a8a9e; font-size: 0.75rem; display: block; margin-top: 4px; }
.thumb-preview-box {
    width: 65px; height: 110px;
    background: #1a1a24;
    border: 1px solid #333;
    border-radius: 6px;
}
.thumb-item.active .thumb-preview-box { border-color: #a14cfc; }

/* Aviso inferior */
.preview-notice-box {
    /*background: #11111a;*/
    border: 1px solid #1c1c28;
    border-radius: 8px;
    padding: 15px;
    display: flex; gap: 10px; color: #8a8a9e; font-size: 0.75rem;
    margin-top: 20px; width: 100%; box-sizing: border-box;
}
.preview-notice-box i { color: #a14cfc; font-size: 1.1rem; }



/* Características de Rodapé */
/* Características de Rodapé (Apenas Ícones e Texto) */
.global-features-footer {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
    border-top: 1px solid #1c1c28;
    padding-top: 30px;
    margin-top: 50px;
    background: transparent; /* 🚀 Remove qualquer fundo */
    box-shadow: none;
}

.feature-item-capas {
    display: flex;
    gap: 12px;
    align-items: center;
    background: transparent; /* 🚀 Garante que não faz caixas */
    padding: 0;
    box-shadow: none;
}
.feature-item-capas i { color: #a14cfc; font-size: 1.4rem; }
.feature-item-capas strong { color: #fff; font-size: 0.85rem; display: block; margin-bottom: 2px; }
.feature-item-capas span { color: #8a8a9e; font-size: 0.75rem; display: block; }



/* =========================================================================
   RESPONSIVIDADE MOBILE (ECRÃS ATÉ 768px)
   ========================================================================= */
 /* =========================================================================
   RESPONSIVIDADE MOBILE: COLUNA DA DIREITA PASSA PARA BAIXO
   ========================================================================= */
@media (max-width: 768px) {
    /* 1. Remove as margens e paddings apertados do contentor */
    .customizer-container {
        padding: 0 10px !important;
        max-width: 100% !important;
        /* Adicionada linha abaixo para libertar o scroll vertical */
        overflow-y: auto !important; 
    }

    /* 2. Força a área de trabalho a empilhar na vertical (a direita cai para baixo) */
    .customizer-container .customizer-workspace {
        display: flex !important;
        flex-direction: column !important;
        gap: 30px !important;
    }

    /* 3. Garante que ambas as colunas ganham 100% da largura do telemóvel */
    .customizer-container .controls-column,
    .customizer-container .preview-column {
        width: 100% !important;
        max-width: 100% !important;
        box-sizing: border-box !important;
    }

    /* 4. Organiza a grelha de capas em 2 colunas para caber no ecrã */
    .customizer-container .case-types-grid {
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 12px !important;
    }

    /* 5. Ajusta os selos do rodapé para 2x2 no mobile */
    .customizer-container .global-features-footer {
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 20px 15px !important;
    }


    /* Coloca os mini selos de confiança em 2 colunas (2x2) no mobile */
    .customizer-container .mini-badges-grid {
        display: grid !important;
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 15px !important;
        width: 100% !important;
    }

    /* Ajusta o alinhamento interno para não quebrar o texto */
    .customizer-container .mini-badge {
        flex-direction: column !important;
        text-align: center !important;
        align-items: center !important;
    }


        /* Passa os ângulos laterais para baixo do telemóvel no mobile - miniaturas para baixo */
    .customizer-container .canvas-area-wrapper {
        display: flex !important;
        flex-direction: column !important;
        align-items: center !important;
        padding: 20px 0 !important;
    }
         /* Passa os ângulos laterais para baixo do telemóvel no mobile - miniaturas para baixo */
    .customizer-container .angle-thumbs-container {
        position: relative !important;
        right: auto !important;
        top: auto !important;
        flex-direction: row !important; /* Coloca lado a lado */
        justify-content: center !important;
        gap: 20px !important;
        margin-top: 25px !important; /* Afasta da parte inferior do mockup */
        width: 100% !important;
    }

.controls-column {
    border-radius: 20px;
}

}


/*botões dos controlos */
/* Container dos controlos na coluna clara */
.af-ajustes-imagem {
    margin-top: 25px;
    margin-bottom: 25px;
    padding: 15px;
    background: #ffffff;
    border-radius: 12px;
    border: 1px solid #e2e8f0;
}

.af-controlo-grupo {
    margin-bottom: 18px;
}

.af-controlo-grupo label {
    display: block;
    font-size: 0.9rem;
    font-weight: 600;
    color: #334155;
    margin-bottom: 8px;
}

/* Alinhamento horizontal do botão - slider - botão */
.af-controlo-flex {
    display: flex;
    align-items: center;
    gap: 12px;
}

/* Botões de + / - / Setas adaptados ao fundo claro */
.af-controlo-flex button {
    width: 36px;
    height: 36px;
    border-radius: 8px;
    border: 1px solid #cbd5e1;
    background: #f8fafc;
    color: #334155;
    font-weight: bold;
    font-size: 1.1rem;
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
}

.af-controlo-flex button:hover {
    background: #e2e8f0;
    color: #0f172a;
}

/* O Slider (Range) bonito e fluido */
.af-controlo-flex input[type="range"] {
    flex: 1;
    height: 6px;
    border-radius: 4px;
    background: #cbd5e1;
    cursor: pointer;
}


/*fixar a imagem do telemóvel ao fazer scroll*/

/* 1. Removemos qualquer tentativa de sticky anterior */
.customizer-workspace, 
.customizer-workspace > div {
    position: relative !important;
}

/* 2. Forçamos a coluna da ESQUERDA (a clara com os controlos) a ter scroll próprio */
/* NOTA: Ajusta a classe abaixo para o nome real da tua coluna da esquerda */
.customizer-workspace > div:first-child {
    max-height: 550px; /* Altura máxima da zona dos controlos antes de criar scroll */
    overflow-y: auto !important; /* Cria a barra de scroll interna se os blocos passarem do tamanho */
    padding-right: 10px; /* Espaço para a barra de scroll não colar aos inputs */
}



/* parte de acender as luzes*/
/* Estado Base das bolinhas dos passos (Cinza/Desativado) */
.customizer-steps .step {
    opacity: 0.5;
    transition: all 0.3s ease;
}

/* Quando ganha a classe .active, ganha cor e destaque */
.customizer-steps .step.active {
    opacity: 1 !important;
    font-weight: bold;
}

.customizer-steps .step.active .step-num {
    background-color: #7c3aed !important; /* Pinta a bolinha com o teu roxo Allfone */
    color: #ffffff !important;
    border-color: #7c3aed !important;
}


/* Oculta os atalhos do telemóvel por padrão no computador */
.customizer-top-actions {
    display: none;
}

/* 📱 Ativa e desenha os botões pretos compactos apenas no ecrã mobile */
@media (max-width: 768px) {
    .customizer-top-actions {
        display: flex;
    }

    .af-btn-mobile-topo {
        width: 34px;
        height: 34px;
        border-radius: 6px;
        border: none;
        background: #000000;
        color: #ffffff;
        font-size: 0.95rem;
        cursor: pointer;
        display: flex;
        align-items: center;
        justify-content: center;
        transition: all 0.2s ease;
        padding: 0;
    }

    .af-btn-mobile-topo.btn-limpar-topo {
        width: auto;
        padding: 0 8px;
        gap: 4px;
        font-size: 0.85rem;
        font-weight: 600;
    }
}


/*esconde botões do topo telemóvel em desktop */
/* 1. Em ecrãs grandes (Desktop), escondemos as setas e os zooms de topo */
.customizer-top-actions .af-btn-mobile-topo:not(.btn-limpar-topo) {
    display: none;
}
/* 1. Oculta as linhas separadoras por padrão no computador (Desktop) */
.customizer-top-actions .af-divisor-mobile {
    display: none !important;
}

/* 📱 2. Em ecrãs pequenos (Mobile), fazemos aparecer todos os botões na barra */
@media (max-width: 768px) {
    .customizer-top-actions .af-btn-mobile-topo:not(.btn-limpar-topo) {
        display: flex;
    }
/* 📱 2. Ativa as linhas separadoras apenas no ecrã mobile */
     .customizer-top-actions .af-divisor-mobile {
        display: block !important;
    }
}


/*fim: esconde botões do topo telemóvel em desktop */

/* Esconde o conteúdo de todas as abas do acordeão por padrão */
.af-accordion-content {
    display: none;
    overflow: hidden;
}

/*slider*/
/* =========================================================================
   MÓDULO SLIDER COMERCIAL - DESIGN PREMIUM COERENTE
   ========================================================================= */
.af-product-slider-wrapper h4 {
    font-size: 0.9rem;
    font-weight: 700;
    color: #1e293b;
    margin-bottom: 12px;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.af-slider-container {
    position: relative;
    display: flex;
    align-items: center;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    padding: 20px;
    overflow: hidden;
    box-shadow: inset 0 2px 4px rgba(0,0,0,0.02);
}

#af-slider-imagem-real {
    width: 100% !important;
    height: 350px !important; /* Baixamos para 240px para não comer o ecrã */
    max-height: 350px !important;
    object-fit: contain !important;
    border-radius: 8px !important; 
    transition: opacity 0.3s ease;
    display: block;
    margin: 0 auto;
}

/* Setas de Navegação Redondas e Flutuantes */
#af-slider-prev, 
#af-slider-next {
    position: absolute;
    background: rgba(15, 23, 42, 0.7); /* Slate 900 com opacidade */
    color: #ffffff;
    border: none;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s ease, transform 0.2s ease;
    z-index: 10;
}

#af-slider-prev:hover, 
#af-slider-next:hover {
    background: rgba(15, 23, 42, 0.9);
    transform: scale(1.05);
}

#af-slider-prev {
    left: 15px;
}

#af-slider-next {
    right: 15px;
}

#af-slider-prev i, 
#af-slider-next i {
    font-size: 0.8rem;
}

/*modal*/

/* Força a imagem do utilizador a ficar à frente das camadas de fundo quando está dentro do modal */
/*
#af-modal-canvas-mirror .user-image {
    z-index: 99 !important;
    position: absolute !important;
}       

*/
/* Fundo escuro do modal */
#af-modal-preview.af-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(15, 23, 42, 0.85);
    display: none;
    justify-content: center;
    align-items: center;
    z-index: 999999;
    padding: 10px;
}

/* Caixa branca interna (Contentor) */
#af-modal-preview .af-modal-content {
    background: #ffffff;
    color: #1e293b;
    width: 90%;
    max-width: 950px;
    min-width: 850px;
    border-radius: 16px;
    padding: 15px;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
    overflow: hidden;
    border: 1px solid #e2e8f0;
    /*correção para se ver botões*/
    height: 600px;
}

/* Cabeçalho */
#af-modal-preview .af-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
    border-bottom: 1px solid #e2e8f0;
    padding-bottom: 8px;
}

#af-modal-preview .af-modal-header h3 {
    margin: 0;
    font-size: 1.3rem;
    font-weight: 700;
    color: #0f172a;
}

#af-modal-preview .af-close-btn {
    background: none;
    border: none;
    font-size: 1.8rem;
    cursor: pointer;
    color: #64748b;
}

/* Corpo com Duas Colunas */
#af-modal-preview .af-modal-body {
    display: flex;
    gap: 25px;
    padding: 5px 0;
    align-items: stretch;
}

/* Coluna da Imagem (Esquerda) */
#af-modal-preview .af-modal-visual-column {
    flex: 1.1;
    display: flex;
    justify-content: center;
    align-items: center;
    background: #f8fafc;
    border-radius: 12px;
    padding: 5px;
    border: 1px solid #e2e8f0;
}

#af-modal-preview #af-modal-canvas-mirror {
    width: 100%;
    height: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
}

/* Coluna de Texto e Botões (Direita) */
#af-modal-preview .af-modal-info-column {
    flex: 1;
    display: flex;
    flex-direction: column;
    /*justify-content: space-between;*/
    justify-content: flex-start;
}

/* Textos e Listas */
#af-modal-preview .af-modal-disclaimer {
    font-size: 0.82rem;
    color: #475569;
    background: #f8fafc;
    padding: 10px;
    border-radius: 8px;
    border-left: 4px solid #7c3aed;
    margin-bottom: 12px;
}

#af-modal-preview .af-modal-info-column h4 {
    font-size: 1.05rem;
    font-weight: 700;
    margin: 0 0 8px 0;
    color: #0f172a;
}

#af-modal-preview .af-summary-list {
    list-style: none;
    padding: 0;
    margin: 0;
    font-size: 0.9rem;
    line-height: 1.6;
    color: #334155;
}

#af-modal-preview .af-summary-list span {
    font-weight: 600;
    color: #0f172a;
}

#af-modal-preview .af-summary-list #summary-imagem {
    color: #7c3aed;
    word-break: break-all;
}

/* Caixa Monospace dos Ajustes */
#af-modal-preview .af-summary-subspecs {
    background: #f1f5f9;
    padding: 8px 12px;
    border-radius: 8px;
    font-size: 0.85rem;
    margin-top: 4px;
    color: #475569;
    font-family: monospace;
    line-height: 1.4;
}

/* Botões Empilhados na Lateral */
#af-modal-preview .af-modal-actions-sidebar {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-top: 15px;
}

#af-modal-preview .af-modal-actions-sidebar button {
    width: 100%;
    padding: 10px 20px;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
}

#af-modal-preview #af-btn-modal-back {
    background: #f1f5f9;
    color: #475569;
    border: 1px solid #cbd5e1;
}

#af-modal-preview #af-btn-modal-pay {
    background: #7c3aed;
    color: #ffffff;
    border: none;
    box-shadow: 0 4px 6px -1px rgba(124, 58, 237, 0.3);
}

/* AJUSTE PARA CRESCER A IMAGEM EM COMPUTADORES (DESKTOP) */
#af-modal-preview #af-modal-canvas-mirror img {
    width: auto;
    height: auto;
    max-width: 100%;
    max-height: 450px !important; /* Altere este valor para mais ou para menos se quiser ajustar o tamanho */
    object-fit: contain;
    display: block;
}

/* =========================================================================
   REGRAS EXCLUSIVAS PARA MOBILE (ECRÃS ATÉ 768px)
   ========================================================================= */
 /*  
@media (max-width: 768px) {
    /* Alarga o contentor branco para ocupar quase o ecrã inteiro do telemóvel 
    #af-modal-preview .af-modal-content {
        width: 95% ;
        min-width: 0 ; /* Remove o limite mínimo dos computadores 
        max-width: 100% ;
        padding: 15px ;
        border-radius: 12px ;
    }

    /* Transforma as duas colunas num empilhamento vertical (Imagem em cima, info em baixo) 
    #af-modal-preview .af-modal-body {
        flex-direction: column;
        gap: 15px;
    }

    /* Garante que a coluna da imagem se adapta ao tamanho do telemóvel 
    #af-modal-preview .af-modal-visual-column {
        width: 100%;
        padding: 5px;
    }

    /* Encolhe o tamanho máximo do canvas no telemóvel para não estourar a altura do ecrã
    #af-modal-preview #af-modal-canvas-mirror img {
        max-height: 250px ; /* Altura calibrada para ecrãs pequenos 
        width: auto;
    }

    /* Alinha os textos à largura total da coluna de baixo 
    #af-modal-preview .af-modal-info-column {
        width: 100%;
    }

    /* Dá um respiro pequeno acima dos botões no mobile 
    #af-modal-preview .af-modal-actions-sidebar {
        margin-top: 15px;
        gap: 10px;
    }
}

*/


@media (max-width: 768px) {

    /* Modal ocupa praticamente todo o ecrã */
    #af-modal-preview .af-modal-content {
        width: 95%;
        min-width: 0;
        max-width: 100%;
        max-height: 95vh;
        padding: 15px;
        border-radius: 12px;

        /* Permite ao modal gerir o conteúdo verticalmente */
        display: flex;
        flex-direction: column;
        overflow: hidden;
    }

    /* Cabeçalho mantém-se visível */
    #af-modal-preview .af-modal-header {
        flex-shrink: 0;
    }

    /* Corpo passa a ser a zona que pode fazer scroll */
    #af-modal-preview .af-modal-body {
        flex-direction: column;
        gap: 15px;
        overflow-y: auto;
        min-height: 0;
        flex: 1;
    }

    #af-modal-preview .af-modal-visual-column {
        width: 100%;
        padding: 5px;
        flex-shrink: 0;
    }

    #af-modal-preview #af-modal-canvas-mirror img {
        max-height: 250px;
        width: auto;
    }

    #af-modal-preview .af-modal-info-column {
        width: 100%;
        flex-shrink: 0;
    }

    /*
     * Botões permanecem acessíveis no fundo
     * enquanto o conteúdo da preview faz scroll.
     */
    #af-modal-preview .af-modal-actions-sidebar {
        position: sticky;
        bottom: 0;
        margin-top: 15px;
        padding-top: 10px;
        padding-bottom: 5px;
        gap: 10px;
        background: #ffffff;
        z-index: 10;
    }
}



/*cor das letras en cima do mockup do telemóvel*/
/* Força o placeholder de texto a aparecer em roxo vibrante */
#af-modal-preview .placeholder-design-text,
.main-phone-mockup .placeholder-design-text {
    display: block;
    color: #7c3aed !important; /* O teu roxo base */
    font-weight: 600;
    font-size: 1.1rem;
    text-align: center;
    z-index: 99999 !important; /* Garante que fica à frente de tudo */
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 80%;
}



/* Botão para página /ver-encomenda   */
.af-btn-capas-tracking {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px; /* Espaço perfeito entre o texto e o SVG */
    background: #a21caf; /* Roxo de destaque do seu tema */
    color: #ffffff !important;
    font-weight: 700;
    font-size: 14px;
    text-decoration: none !important;
    padding: 14px 32px;
    border-radius: 6px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.15);
    transition: all 0.2s ease-in-out;
    border: 1px solid transparent;
}

/* Tamanho e comportamento do Ícone SVG */
.af-icon-search-svg {
    width: 18px;
    height: 18px;
    transition: stroke 0.2s ease-in-out;
}

.af-btn-capas-tracking:hover {
    background: #ffffff;
    color: #a21caf !important;
    border-color: #ffffff;
    transform: translateY(-1px);
}

/* Força o SVG a mudar para roxo no hover do botão */
.af-btn-capas-tracking:hover .af-icon-search-svg {
    stroke: #a21caf;
}


