/* Variáveis Globais (Alinhadas com o teu header) */


:root {
	--ac-red: #e51b15;
	--ac-dark-red: #d21a14;
    --mauser-red: #e31e24;
    --text-main: #1e293b;
    --text-muted: #64748b;
    --border-color: #e2e8f0;
    /* FASE 1 — largura única do site (usada por .container, .cat-wrapper, .is-fullwidth, skin) */
    --site-max: 1544px;
    --site-gutter: 20px;
    --site-dead: calc(var(--site-max) + 2 * var(--site-gutter)); /* 1584px: zona morta da skin */
    --header-h: 144px;         /* altura do header fixo (desktop) — ajustar se o header mudar */
    --header-h-mobile: 70px;   /* altura do header <=1024px */
}
@media (min-width: 1025px) { .container { max-width: var(--site-max); margin: 0 auto; padding: 0 var(--site-gutter); box-sizing: content-box; } } /* outer = 1584px = --site-dead; só desktop — no mobile o header (.container width:100%) fica como estava */
@media (min-width: 1760px) { .is-fullwidth { max-width: var(--site-dead); margin-left: auto; margin-right: auto; } }
html, body {
    overflow-x: hidden !important;
    width: 100%;
    position: relative;
    /* Isto impede que a página balance para os lados */
}
/* Esconde a secção de campanhas se ela não tiver conteúdo dentro */
section.module-campanhas_ativas:empty {
    display: none !important;
    padding: 0 !important;
    margin: 0 !important;
    height: 0 !important;
}
/* Impede o cabeçalho de se esconder ao fazer scroll */
.header-hidden { 
    transform: none !important; 
}

/* Agrupa o SKU e a etiqueta mobile e afasta-os */
.sku-energy-wrapper {
    display: flex;
    align-items: center;
    justify-content: space-between; /* Empurra a etiqueta totalmente para a direita */
    width: 100%; /* Força a ocupar a largura toda do cartão */
}


/* CORREÇÃO FORÇADA DE BOTÕES */
    .social-login-grid {
        display: flex !important;
        gap: 15px !important;
        margin-bottom: 0px !important;
    }
	/* Secção de Autenticação no Checkout */
.checkout-auth-box { 
    margin-bottom: 20px; 
    
    background: #fff; 
    padding: 20px; 
}


.auth-box-title { margin: 0 0 5px 0; font-size: 16px; color: #000; font-weight: 800; }
.auth-box-subtitle { margin: 0 0 15px 0; font-size: 13px; color: #64748b; }

/* Grelha dos botões */
.social-login-grid {
    display: grid !important; /* Forçamos o Grid aqui */
    grid-template-columns: repeat(4, 1fr) !important; /* 4 colunas iguais */
    gap: 10px !important;
    width: 100% !important;
    margin-top: 15px !important;
}

/* Botões base */
.btn-checkout-auth {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 5px;
    background: #fff;
    color: #1e293b;
    border: 1.5px solid #e2e8f0;
    border-radius: 6px;
    font-size: 13px;
    font-weight: 800;
    text-transform: uppercase;
    text-decoration: none;
    transition: 0.2s;
    text-align: center;
}
.btn-checkout-auth:hover { border-color: #1e293b; background: #f8fafc; }

/* Botão Vermelho */
.btn-submit-red { 
    background: #e31e24 !important; 
    color: #fff !important; 
    border-color: #e31e24 !important;
}
.btn-submit-red:hover { background: #cc0000 !important; }


    
    .btn-outline-auth {
        display: block !important;
        width: 100% !important;
        padding: 14px !important;
        background: #fff !important;
        color: #1e293b !important;
        border: 1.5px solid #e2e8f0 !important;
        border-radius: 8px !important;
        font-size: 14px !important;
        font-weight: 800 !important;
        text-transform: uppercase !important;
        text-decoration: none !important;
        text-align: center !important;
        box-sizing: border-box !important;
        cursor: pointer !important;
        transition: 0.2s !important;
    }

    .social-login-grid .btn-outline-auth {
        flex: 1 !important;
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
        gap: 8px !important;
    }
/* Esconde a etiqueta do telemóvel quando estás no PC */
.energy-label-mobile {
    display: none !important;
}

/* Estilo normal da etiqueta no PC */
.energy-label-desktop {
    height: 34px;
    margin-left: auto;
}
/* =========================================
   SISTEMA DE COMBO PERFEITO
   ========================================= */
.combo-title { font-size: 22px; font-weight: 800; color: #1e293b; margin-bottom: 25px; display: flex; align-items: center; }
.combo-title::before { content: ''; width: 4px; height: 24px; background: #e31e24; margin-right: 12px; border-radius: 2px; }

.combo-container { display: flex; align-items: center; gap: 20px; flex-wrap: wrap; }

.combo-item { position: relative; width: 160px; display: flex; flex-direction: column; align-items: center; text-decoration: none; }
.combo-item img { width: 120px; height: 120px; object-fit: contain; margin-bottom: 15px; }
.combo-item-title { font-size: 13px; font-weight: 600; color: #1e293b; text-align: center; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; line-height: 1.4; margin-bottom: 10px; height: 36px; }
.combo-item-price { font-size: 18px; font-weight: 800; color: #e31e24; }

/* Checkbox no canto superior esquerdo */
.combo-checkbox { position: absolute; top: 0; left: 0; width: 22px; height: 22px; accent-color: #1e293b; cursor: pointer; z-index: 10; }

.combo-plus { font-size: 24px; font-weight: 400; color: #1e293b; display: flex; align-items: center; justify-content: center; height: 120px; margin-top: -65px; }

.combo-total-box { margin-left: auto; padding-left: 30px; border-left: 2px solid #f1f5f9; text-align: right; min-width: 200px; display: flex; flex-direction: column; justify-content: center; }
.combo-total-label { font-size: 13px; font-weight: 700; color: #64748b; text-transform: uppercase; margin-bottom: 5px; }
.combo-total-price { font-size: 28px; font-weight: 800; color: #e31e24; margin-bottom: 15px; }

.btn-add-combo { background: #fff; border: 2px solid #e31e24; color: #e31e24; padding: 14px 20px; border-radius: 8px; font-size: 14px; font-weight: 800; text-transform: uppercase; cursor: pointer; transition: 0.2s; width: 100%; }
.btn-add-combo:hover { background: #e31e24; color: #fff; }

@media (max-width: 1024px) {
    .combo-container { flex-direction: column; align-items: center; }
    .combo-plus { height: auto; margin-top: 0; transform: rotate(90deg); margin: 10px 0; }
    .combo-total-box { margin-left: 0; padding-left: 0; border-left: none; border-top: 2px solid #f1f5f9; padding-top: 20px; width: 100%; text-align: center; margin-top: 10px; }
}
/* Definições Gerais do Card — FASE 7: o CSS do .p-card é gerado por includes/ac_card_engine.php (ac_card_css). */

.p-card-placeholder {
    width: 100%;
    height: 200px;
    background: #f8fafc;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
}



/* Vendedor e SKU */


.p-card-sku {
    font-size: 11px;
    color: #94a3b8;
    font-weight: 600;
    margin-bottom: 4px;
    text-transform: uppercase;
}

/* Bloco Inferior de Stock e Energia */
.p-card-bottom-info {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 15px;
	
    margin-top: auto; /* Alinha o rodapé mesmo com títulos pequenos */
}

.stock-status {
    display: flex;
    align-items: center;
    gap: 5px;
    font-size: 13px;
    font-weight: 800;
}

.stock-status.in { color: #16a34a;font-size: 14px;font-weight: 700; }
.stock-status.out { color: #ef4444; }
.stock-status i { width: 14px; height: 14px; }

.stock-delivery {
    font-size: 11px;
    font-weight: 400;
    color: #16a34a;
    margin-top: -3px;
	padding-left: 20px;
}

.energy-label { height: 24px; }

/* Bloco de Preços */
.p-card-price-block {
    display: flex;
    align-items: baseline;
    gap: 8px;
    flex-wrap: wrap;
    border-top: 1px solid #f1f5f9;
    padding-top: 12px;
}


.price-main {
    font-size: 26px;
    font-weight: 900;
    color: var(--mauser-red);
    letter-spacing: -0.5px;
}

.price-old {
    font-size: 13px;
    font-weight: 600;
    color: #94a3b8;
    text-decoration: line-through;
}

.price-pvpr {
    font-size: 11px;
    font-weight: 600;
    color: #94a3b8;
    display: flex;
    align-items: center;
    gap: 3px;
}

/* Badge Top Vendas */
.badge-top {
    position: absolute;
    top: 15px;
    left: 15px;
    background: var(--mauser-red);
    color: #fff;
    font-size: 11px;
    font-weight: 800;
    padding: 4px 8px;
    border-radius: 4px;
    display: flex;
    align-items: center;
    gap: 4px;
    z-index: 2;
}

 body { background-color: #f5f5f5; }
    .cat-wrapper { 
        width: auto;
        max-width: var(--site-max);
        padding: 0 var(--site-gutter);
        box-sizing: content-box;
        margin: 0 auto !important; 
        display: grid; 
        grid-template-columns: 280px 1fr; 
        gap: 16px; 
        align-items: start; 
        transition: 0.3s; 
    }
    .cat-wrapper.hide-filters { grid-template-columns: 0px 1fr; gap: 0; }
    .cat-wrapper.hide-filters .sidebar { overflow: hidden; opacity: 0; padding: 0; margin: 0; pointer-events: none; }
    
    .sidebar { 
        background: none !important; 
        border-radius: 4px; 
        padding: 0 !important; 
               position: sticky;
        top: 100px; 
        transition: top 0.3s ease-in-out, max-height 0.3s ease-in-out, opacity 0.3s;
    }
    .sidebar::-webkit-scrollbar { width: 6px; }
    .sidebar::-webkit-scrollbar-track { background: transparent; }
    .sidebar::-webkit-scrollbar-thumb { background: #cbd5e1; border-radius: 10px; }
    .sidebar::-webkit-scrollbar-thumb:hover { background: #94a3b8; }
    
    .sidebar-title { font-size: 16px; font-weight: 900; color: #1e293b; margin-top: 0; margin-bottom: 25px; text-transform: uppercase; letter-spacing: 0.5px; }
    .filter-group { margin-bottom: 25px; border-bottom: 1px solid #f1f5f9; padding-bottom: 20px; }
    .filter-group:last-child { border-bottom: none; padding-bottom: 0; margin-bottom: 0; }
    .f-header { display: flex; justify-content: space-between; align-items: center; font-size: 14px; font-weight: 800; color: #1e293b; cursor: pointer; margin-bottom: 15px; }
    .f-header i { color: #94a3b8; width: 16px; }
    
    .f-option { display: flex; align-items: center; gap: 10px; margin-bottom: 12px; cursor: pointer; font-size: 13px; font-weight: 500; color: #475569; transition: 0.2s; }
    .f-option:hover { color: #1e293b; }
    .f-option input[type="checkbox"] { width: 18px; height: 18px; border-radius: 4px; border: 1px solid #c9c9c9; appearance: none; outline: none; cursor: pointer; background: #f8fafc; transition: 0.2s; margin: 0; display: grid; place-content: center; flex-shrink:0; }
    .f-option input[type="checkbox"]::before { content: ""; width: 10px; height: 10px; transform: scale(0); transition: 120ms transform ease-in-out; box-shadow: inset 1em 1em white; background-color: white; transform-origin: center; clip-path: polygon(14% 44%, 0 65%, 50% 100%, 100% 16%, 80% 0%, 43% 62%); }
    .f-option input[type="checkbox"]:checked { background: var(--ac-red); border-color: var(--ac-red); }
    .f-option input[type="checkbox"]:checked::before { transform: scale(1); }
    .f-count { color: #94a3b8; font-size: 12px; margin-left: 2px; }

    /* CSS DO TOGGLE AJUSTADO (Sem margens para caber no topo) */
    .toggle-wrapper { display: flex; align-items: center; gap: 10px; }
    .toggle-switch { position: relative; display: inline-block; width: 44px; height: 24px; flex-shrink: 0; }
    .toggle-switch input { opacity: 0; width: 0; height: 0; }
    .toggle-slider { position: absolute; cursor: pointer; top: 0; left: 0; right: 0; bottom: 0; background-color: #cbd5e1; transition: .4s; border-radius: 34px; }
    .toggle-slider:before { position: absolute; content: ""; height: 18px; width: 18px; left: 3px; bottom: 3px; background-color: white; transition: .4s; border-radius: 50%; box-shadow: 0 1px 3px rgba(0,0,0,0.2); }
    .toggle-switch input:checked + .toggle-slider { background-color: #e31e24; }
    .toggle-switch input:checked + .toggle-slider:before { transform: translateX(20px); }
    .toggle-label { font-size: 13px; color: #1e293b; font-weight: 600; cursor: pointer; }

/* Limpa os estilos anteriores para garantir que começamos do zero */
.range-input {
    -webkit-appearance: none;
    appearance: none;
    background: transparent;
}

/* --- BOLA DA ESQUERDA (Mínimo) - Branca com borda vermelha --- */
#minPriceInput::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background-color: #ffffff !important; /* Branco */
    border: 2px solid #e31e24 !important; /* Borda vermelha */
    cursor: pointer;
    pointer-events: auto;
}

#minPriceInput::-moz-range-thumb {
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background-color: #ffffff !important;
    border: 2px solid #e31e24 !important;
    cursor: pointer;
    pointer-events: auto;
}

/* --- BOLA DA DIREITA (Máximo) - Vermelha com borda branca --- */
#maxPriceInput::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background-color: #e31e24 !important; /* Vermelho */
    border: 2px solid #ffffff !important; /* Borda branca */
    cursor: pointer;
    pointer-events: auto;
}

#maxPriceInput::-moz-range-thumb {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background-color: #e31e24 !important;
    border: 2px solid #ffffff !important;
    cursor: pointer;
    pointer-events: auto;
}    .price-values { display: flex; justify-content: space-between; font-size: 13px; font-weight: 700; color: #475569; }

    .main-area { display: flex; flex-direction: column; gap: 20px; }
    .list-topbar { background: #fff; border-radius: 4px; padding: 12px 20px; display: flex; justify-content: space-between; align-items: center; }
    
    /* Agrupa os botões da esquerda da barra superior */
    .topbar-left { display: flex; align-items: center; gap: 20px; flex-wrap: wrap; }
    
    .btn-toggle-filters { background: transparent; border: 0px solid #cbd5e1; padding: 6px 12px; border-radius: 6px; font-size: 15px; font-weight: 700; color: #1e293b; display: flex; align-items: center; gap: 8px; cursor: pointer; transition: 0.2s; font-family: 'Sofia Sans'; }
    .btn-toggle-filters:hover { background: #f8fafc; border-color: #94a3b8; }
    
    .topbar-right { display: flex; align-items: center; gap: 20px; font-size: 13px; color: #475569; font-weight: 600; }
    .topbar-right select { padding: 6px 30px 6px 12px; border: 1px solid #cbd5e1; border-radius: 6px; font-family: inherit; font-size: 13px; font-weight: 700; color: #1e293b; background: #fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 24 24' fill='none' stroke='%23475569' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E") no-repeat right 10px center; outline: none; appearance: none; cursor: pointer; }

    .p-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 15px; }
    .p-card:hover { }
    .badge-top { position: absolute; top: 15px; left: 15px; background: #e31e24; color: #fff; font-size: 11px; font-weight: 800; padding: 4px 8px; border-radius: 4px; display: flex; align-items: center; gap: 4px; z-index: 2; }
    .p-card-title { font-size: 18px; font-weight: 300; color: #000; line-height: 1.2; margin: 0 0 8px 0; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
    /* FASE 7: cor/line-height da descrição vêm do motor do cartão (Design do Cartão → Descrição) — os !important antigos impediam a cor escolhida no admin */
    .p-card-desc { font-size: 13px; font-weight: 400; color: #676767; margin: 0 0 15px 0; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; flex-grow: 1; }
    
    .p-card-seller { font-size: 12px; color: #000; margin-top: 10px; margin-bottom: 5px; }
    .p-card-seller strong { color: #000; font-weight: 800; text-transform: uppercase; }

    .p-card-sku { font-size: 11px; color: #94a3b8; font-weight: 600; margin-bottom: 10px; text-transform: uppercase; }
    .p-card-bottom-info { display: flex; justify-content: space-between; align-items: flex-start; margin-bottom: 15px; }
    .stock-block { display: flex; flex-direction: column; gap: 2px; }
    .stock-status { display: flex; align-items: center; gap: 5px; font-size: 13px; font-weight: 800; }
    .energy-label { height: 26px; }
    .p-card-price-block { display: flex; align-items: baseline; gap: 8px; flex-wrap: wrap; }
    .price-main { font-size: 26px; font-weight: 900; color: #e31e24; letter-spacing: -0.5px; }
    .price-old { font-size: 13px; font-weight: 600; color: #94a3b8; text-decoration: line-through; }
    .price-pvpr { font-size: 11px; font-weight: 600; color: #94a3b8; display: flex; align-items: center; gap: 3px; }

    @media (max-width: 1024px) {
        .cat-wrapper { grid-template-columns: 1fr; }
        .sidebar { display: none; }
        .list-topbar { flex-direction: column; align-items: flex-start; gap: 15px; }
        .topbar-right { width: 100%; justify-content: space-between; }
    }
	
	/* --- ESTILO DA ETIQUETA ENERGÉTICA --- */
.energy-label {
    height: 30px; /* Altura ideal para manter legível sem ocupar demasiado espaço */
    width: auto;  /* Mantém a proporção da "seta" */
    display: block;
    flex-shrink: 0; /* Impede que a imagem seja esmagada em ecrãs pequenos */
    margin-left: 10px;
    object-fit: contain;
    transition: transform 0.2s ease;
}


/* FASE 7: blocos .p-card-bottom-info / .p-card-footer-action / .p-card-prices / .p-price-* / .p-btn-add-cart
   removidos daqui — são gerados por ac_card_css() a partir da config (global ou por módulo). */

/* Linha 1: Modelo à esquerda, SKU à direita */
.p-card-identifiers {
    display: flex;
    justify-content: space-between; /* Garante os 100% de largura entre os dois */
    width: 100%;
    font-size: 11px;
    color: #94a3b8;
    font-weight: 600;
    text-transform: uppercase;
	margin-bottom: 6px;
}

/* Linha 2: Bloco de Stock e Etiqueta Energética */
.p-card-status-row {
    display: flex;
    justify-content: space-between;
    align-items: flex-end; /* Alinha a etiqueta pela base */
    width: 100%;
}

/* Ajustes finos para os textos */
.p-model-val { text-align: left;color: #000;
    font-size: 13px;font-weight: 400; }
.p-sku-val { text-align: right;color: #000;
    font-size: 13px;font-weight: 400; }

.stock-status {
    display: flex;
    align-items: center;
    gap: 5px;
    font-size: 13px;
    font-weight: 800;
}

.p-card {
    /* Força o navegador a renderizar o card num pixel exato */
    transform: translateZ(0); 
    backface-visibility: hidden;
    perspective: 1000px;
    
    /* Remove qualquer suavização excessiva que possa "emagrecer" a fonte */
    -webkit-font-smoothing: subpixel-antialiased; 
    
    /* Garante que o card não seja tratado como uma camada transparente */
    background-color: #ffffff; 
    isolation: isolate;
}

.p-card-seller, .p-card-desc, .stock-status {
    /* Força a cor absoluta para evitar que o aliasing torne a letra cinzenta */

    opacity: 1 !important;
    
    /* Pequeno truque: uma sombra de 0px força o redesenho vetorial da fonte */
    text-shadow: 0 0 0px rgba(0,0,0,0.01);
}
/* Container da imagem precisa de ser relative para prender as etiquetas */
.p-card-img-container {
    position: relative; 
    width: 100%;
}

/* Etiqueta da Campanha (Canto Superior Esquerdo) */
.promo-badge-top {
    position: absolute;
    top: 0px;
    left: 0px;
    padding: 4px 10px;
    border-radius: 4px;
    font-size: 13px;
    font-weight: 400;
    z-index: 10;
    
}

/* Etiqueta do Desconto Amarela (Lado Direito) */
.promo-discount-tag {
    position: absolute;
    top: 80px;
    right: 0px;
    background-color: #fcd34d; /* Amarelo tipo PCDIGA */
    color: #000000;
    padding: 8px 10px;
    border-radius: 4px;
    font-size: 16px;
    font-weight: 800;
    z-index: 10;
    
}

/* Ajustar a cor do preço principal para vermelho quando há promoção */
.price-promo {
    color: #e51b15 !important; /* Vermelho */
}
/* =======================================================
   NOVO DESIGN DE PREÇO E BOTÃO (Product Card)
   ======================================================= */

/* =======================================================
   SIDE CART (CARRINHO LATERAL)
   ======================================================= */
.sc-overlay {
    position: fixed;
    top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(0, 0, 0, 0.4);
    z-index: 9998;
    opacity: 0; visibility: hidden;
    transition: 0.3s ease-in-out;
}
.sc-overlay.active { opacity: 1; visibility: visible; }

.sc-container {
    position: fixed;
    top: 0; right: -470px; /* Escondido à direita */
    width: 100%; max-width: 450px;
    height: 100vh;
    background: #f8fafc; /* Fundo cinza super claro tipo a imagem */
    z-index: 9999;
    box-shadow: -5px 0 25px rgba(0,0,0,0.1);
    transition: right 0.3s ease-in-out;
    display: flex; flex-direction: column;
}
.sc-container.open { right: 0; }

/* Cabeçalho */
.sc-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 14px 0 22px;
	margin-bottom: -10px;

}
.sc-title { font-size: 14px; font-weight: 800; color: #1e293b; display: flex; align-items: center; gap: 8px; }
.sc-close-btn { background: none; border: none; cursor: pointer; border-radius: 50%; padding: 5px; transition: 0.2s; }
.sc-close-btn:hover { color: #000; }

/* Lista de Produtos */
.sc-body {
    flex: 1; overflow-y: auto; padding: 14px;
    display: flex; flex-direction: column; gap: 15px;
}
.sc-item {
    background: #ffffff;
    border-radius: 4px;
    padding: 12px;
    display: flex; gap: 12px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.04);
}
.sc-item-img {
    width: 70px; height: 70px; flex-shrink: 0;
    display: flex; align-items: center; justify-content: center;
}
.sc-item-img img { width: 100%; height: 100%; object-fit: contain; }

.sc-item-details { flex: 1; display: flex; flex-direction: column; justify-content: space-between; }
.sc-item-title { font-size: 12px; font-weight: 700; color: #1e293b; text-decoration: none; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; line-height: 1.3; }
.sc-item-price-row { display: flex; justify-content: space-between; align-items: flex-end; margin-top: 5px; }
.sc-item-price { font-size: 15px; font-weight: 800; color: #e31e24; }
.sc-item-old-price { font-size: 11px; color: #94a3b8; text-decoration: line-through; margin-top: 2px; }
.sc-item-sku { font-size: 10px; color: #64748b; }

.sc-item-actions { display: flex; flex-direction: column; align-items: flex-end; justify-content: space-between; }
.sc-btn-trash { background: none; border: none; color: #94a3b8; cursor: pointer; transition: 0.2s; margin-bottom: 10px; }
.sc-btn-trash:hover { color: #e31e24; }
.sc-qty-box { display: flex; border: 1px solid #e2e8f0; border-radius: 4px; overflow: hidden; height: 28px; }
.sc-qty-box button { background: #f8fafc; border: none; width: 28px; font-weight: 700; color: #475569; cursor: pointer; }
.sc-qty-box button:hover { background: #e2e8f0; }
.sc-qty-box input { width: 35px; border: none; border-left: 1px solid #e2e8f0; border-right: 1px solid #e2e8f0; text-align: center; font-size: 13px; font-weight: 700; font-family: 'Sofia Sans', sans-serif; pointer-events: none; }

/* Rodapé (Totais e Botão) */
.sc-footer { background: #ffffff; padding: 14px; box-shadow: 0 -4px 15px rgba(0,0,0,0.03); }
.sc-total-row { display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 15px;
    border-radius: 8px;
    font-size: 18px;
    font-weight: 800;
    color: #1e293b;
    margin-bottom: 10px; }
.sc-tax-info { font-size: 11px; text-align: center; color: #64748b; margin-bottom: 15px; }
.sc-checkout-btn { display: block; width: 100%; text-align: center; background: #e51b15; color: #ffffff; padding: 15px; border-radius: 4px; font-size: 16px; font-weight: 800; text-transform: uppercase; text-decoration: none; transition: 0.3s; }
.sc-checkout-btn:hover { background: #cc0000; }

/* Badge Flutuante no Header */
.cart-badge {
    position: absolute;  right: -8px;
    background: #e51b15; color: white;
    font-size: 11px; font-weight: 600;
    width: 18px; height: 18px;
    border-radius: 50%;
    display: none; align-items: center; justify-content: center;
}




/* =======================================================
   HEADER & SIDEBAR MOBILE
   ======================================================= */

/* Botão Hambúrguer */
.mobile-menu-toggle {
    display: none; /* Escondido no Desktop */
    background: none;
    border: none;
    color: var(--text-main);
    cursor: pointer;
    padding: 5px;
    margin-right: 10px;
}

.mobile-menu-toggle svg {
    width: 28px;
    height: 28px;
    stroke-width: 2px;
}

/* Sidebar Container */
.mobile-sidebar {
    position: fixed;
    top: 0;
    left: -320px; /* Começa fora do ecrã */
    width: 300px;
    height: 100vh;
    background: #fff;
    z-index: 9999;
    transition: left 0.3s ease-in-out;
    display: flex;
    flex-direction: column;
    box-shadow: 5px 0 25px rgba(0,0,0,0.1);
}

.mobile-sidebar.open {
    left: 0;
}

.mobile-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.5);
    z-index: 9998;
    opacity: 0;
    visibility: hidden;
    transition: 0.3s;
}

.mobile-overlay.active {
    opacity: 1;
    visibility: visible;
}

/* Sidebar Header */
.mobile-sidebar-header {
    padding: 20px;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: #f8fafc;
}

.sidebar-title {
    font-weight: 800;
    text-transform: uppercase;
    color: var(--ac-red);
    font-size: 16px;
}

.close-sidebar {
    background: none;
    border: none;
    color: #ef4444;
    cursor: pointer;
}

/* Lista de Links Sidebar */
.mobile-sidebar-content {
    flex: 1;
    overflow-y: auto;
    padding: 10px 0;
}

.mobile-nav-list {
    margin: 0;
    padding: 0;
    list-style: none;
}

.mobile-nav-item {
    border-bottom: 1px solid #f1f5f9;
}

.mobile-nav-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 20px;
}

.mobile-nav-link {
    text-decoration: none;
    color: var(--text-main);
    font-weight: 700;
    font-size: 14px;
    display: flex;
    align-items: center;
    gap: 10px;
    flex: 1;
}

.sidebar-fa-icon {
    width: 20px;
    color: var(--ac-red);
    text-align: center;
}

.submenu-trigger {
    background: none;
    border: none;
    color: #94a3b8;
    padding: 5px;
    transition: 0.3s;
}

/* Submenu Mobile */
.mobile-submenu {
    display: none; /* Escondido por defeito */
    background: #f8fafc;
    padding: 5px 0 10px 40px;
    list-style: none;
}

.mobile-nav-item.active .mobile-submenu {
    display: block;
}

.mobile-submenu-link {
    text-decoration: none;
    color: #64748b;
    font-weight: 600;
    font-size: 13px;
    padding: 8px 0;
    display: block;
}

/* =======================================================
   RESPONSIVIDADE (MEDIA QUERIES)
   ======================================================= */

@media (max-width: 1024px) {
    .mobile-menu-toggle {
        display: flex;
    }

    .hide-mobile {
        display: none !important;
    }

    .header-flex {
        gap: 15px;
        padding-left: 10px;
        padding-right: 10px;
    }

    .logo img {
        height: 25px;
		margin-right: 70px;
    }

    .header-center {
        display: none; /* Esconde pesquisa e aviso no mobile para o topo ficar limpo */
    }

    /* Se quiseres mostrar a pesquisa, podemos fazer uma barra flutuante em baixo */
    body {
        padding-top: var(--header-h-mobile); /* altura do header mobile */
    }

    .smart-header {
        padding: 12px 0 0 0;
    }
}
/* Agrupa o SKU e a etiqueta mobile no Desktop e Mobile (Fora do Media Query) */
.sku-energy-wrapper {
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

/* Esconde a etiqueta do telemóvel quando estás no PC (Fora do Media Query) */
.energy-label-mobile {
    display: none !important;
}

/* Estilo normal da etiqueta no PC (Fora do Media Query) */
.energy-label-desktop {
    height: 26px;
    margin-left: auto;
	margin-bottom: 4px;
}

/* =========================================================================
   GRELHA DE 2 COLUNAS E AJUSTES DE CARTÃO APENAS NO MOBILE
   ========================================================================= */
@media (max-width: 768px) {
	
	
	.social-login-grid {
        grid-template-columns: 1fr 1fr !important; /* 2 colunas */
        gap: 8px !important; /* Espaçamento menor no mobile */
    }
	
	.cart-page-wrapper {
        padding: 0 10px !important; /* Reduz para 10px em telemóveis */
    }
	
	.checkout-page-wrapper {
        padding: 0 10px !important; /* Reduz para 10px em telemóveis */
    }

    .auth-page-wrapper {
        padding: 0 10px !important; /* Reduz para 10px em telemóveis */
    }
    
    .auth-page-card {
        padding: 20px !important; /* Menos padding interno no cartão */
    }
    
    .social-login-grid {
        gap: 10px !important; /* Ajusta o espaço entre os botões Google e Facebook */
    }

    
    /* Grelha ponta-a-ponta */
    .main-area { padding-left: 0 !important; padding-right: 0 !important;box-sizing: border-box;
        max-width: 100%;
        min-width: 0; }
    .p-grid {
        display: grid !important;
        grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
        gap: 8px !important;
        padding: 0 !important;
        width: 100% !important;
        box-sizing: border-box !important;
        margin: 0 !important;
    }

    /* FASE 7: .p-card/.p-card-title/.p-price-value/.p-card-desc mobile (!important) removidos — colidiam com o motor do cartão */
    .p-card-seller { display: none !important; }

    /* ==========================================
       2. SKU À ESQUERDA, ETIQUETA À DIREITA
       ========================================== */
    .sku-energy-wrapper {
		margin-top: 14px;
        display: flex !important;
        flex-direction: row !important;
        align-items: center !important;
        justify-content: space-between !important; /* Empurra a etiqueta para a extrema direita */
        width: 100% !important;
    }

    .p-sku-val.copyable-code {
        display: inline-flex !important;
        flex-direction: row-reverse !important;
        align-items: center !important;
        font-size: 13px !important;
        word-break: break-all !important;
        white-space: normal !important;
    }

    /* Esconde o Modelo no mobile */
    .p-model-val {
        display: none !important;
    }

    /* TROCA DAS ETIQUETAS: Esconde a de baixo, mostra a de cima */
    .energy-label-desktop { display: none !important; }
    
    .energy-label-mobile { 
        display: block !important; 
        height: 18px !important; 
        margin: 0 !important; 
    }
	
	@media (max-width: 1024px) {
    .shipping-progress-box {
        margin-top: 0 !important;
		  padding: 0 !important;
    }
	    .mobile-order-5 {
       
        padding: 0 !important;
    }
}
   
}/* AQUI SIM FECHA O BLOCO DE MOBILE! */

hr {display:none; }


/* FASE 7: regra #mod_personalizado_6a496ed7d0807 removida (uid morto; larguras agora vêm do módulo) */
