/* Importa a fonte do Google Fonts */
@import url('https://fonts.googleapis.com/css2?family=Montserrat:wght@400;500;600;700&display=swap');

/* Reset básico e estilos do corpo */
body {
    font-family: 'Montserrat', sans-serif;
    background-color: #ffffff; /* Fundo principal branco */
    color: #333;
    margin: 0;
    line-height: 1.6;
}

.container {
    max-width: 1100px;
    margin: 0 auto;
    padding: 1rem 2rem;
}

/* NOVO CABEÇALHO SUPERIOR */
.top-header {
    background-color: #fff;
    padding: 1rem 0;
}
.header-content {
    display: flex;
    justify-content: center;
    align-items: center;
    flex-direction: column;
    gap: 0.5rem;
}
.header-content span {
    font-size: 0.8rem;
    color: #888;
}

/* ESTILO PARA O LOGO IMAGEM */
.pi-logo {
    height: 75px;
    width: auto;
}

.pi-logo1 {
    height: 60px;
    width: auto;
}


/* BANNER COM IMAGEM PRINCIPAL */
.main-banner {
    width: 100%;
    height: auto;
    max-height: 600px;
    overflow: hidden;
}
.main-banner img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* SEÇÃO DE CONTEÚDO PRINCIPAL */
.content-section {
    background-color: #f7f7f7; /* Fundo cinza claro */
    padding: 3rem 0;
}

/* Introdução */
.intro {
    margin-bottom: 2.5rem;
    text-align: left; 
}

.intro h1 {
    font-size: 1.5rem;
    font-weight: 600;
    color: #009CA6;
    text-transform: uppercase;
    margin-bottom: 0.5rem;
}

.intro p {
    font-size: 1rem;
    color: #555;
}

/* Grelha de produtos */
.products-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
}

.product-card {
    background-color: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 0; 
    box-shadow: 0 4px 10px rgba(0,0,0,0.05);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    text-align: center;
}

.card-thumbnail-wrapper {
    width: 100%;
    height: auto;
    box-sizing: border-box;
}

.thumbnail-img {
    width: 100%;
    height: auto;
    object-fit: contain;
}

.product-title {
    font-size: 1.1rem;
    font-weight: 600;
    color: #009CA6;
    padding: 1rem;
    margin: 0;
}

.card-actions {
    padding: 0 1.5rem 1.5rem 1.5rem;
    margin-top: auto;
    display: grid;
    grid-template-columns: 1fr; 
    gap: 0.75rem;
}

/* Botões */
.btn {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0.75rem 1rem;
    border-radius: 5px;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.2s;
    border: 1px solid transparent;
    cursor: pointer;
    width: 100%;
    box-sizing: border-box;
    font-size: 0.9rem;
}

.btn i {
    margin-right: 0.5rem;
}

.btn-primary {
    background-color: #009CA6;
    color: #ffffff;
    border-color: #009CA6;
}

.btn-primary:hover {
    background-color: #007f87;
    border-color: #007f87;
}

.btn-secondary {
    background-color: #f0f0f0;
    color: #555;
    border: 1px solid #ddd;
}

.btn-secondary:hover {
    background-color: #e0e0e0;
    border-color: #ccc;
}

/* SEÇÃO DE LINK EXTERNO */
.external-link-section {
    background-color: #fff;
    padding: 4rem 0;
}
.external-link-content {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 3rem;
    flex-wrap: wrap;
}
.external-link-img {
    max-width: 300px;
    height: auto;
}
.external-link-text {
    max-width: 400px;
    text-align: center;
}
.external-link-text p {
    font-size: 1.1rem;
    color: #555;
    margin-bottom: 1.5rem;
}
.external-link-text .btn-primary {
    display: inline-block;
    width: auto;
    padding: 0.75rem 2rem;
}

/* RODAPÉ */
.footer {
    background-color: #fff;
    padding: 2rem 0 1rem 0;
    color: #555;
    font-size: 0.9rem;
    border-top: 1px solid #e2e8f0;
}

.footer-top {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    flex-wrap: wrap;
    gap: 2rem;
    margin-bottom: 2rem;
}

.footer-col-left {
    display: flex;
    flex-direction: column;
}

.customer-service {
    margin-top: 1.5rem; 
}

.customer-service p {
    margin: 0; 
    font-weight: 500;
}

.customer-service a {
    color: #555;
    text-decoration: none;
    border-bottom: 1px solid #ccc;
    font-size: 0.85rem;
}
.customer-service a:hover {
    color: #000;
}

.lang-select {
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
    background-color: transparent;
    border: 1px solid #ccc;
    padding: 0.5rem 2.5rem 0.5rem 1rem;
    border-radius: 5px;
    font-family: inherit;
    font-size: 0.9rem;
    cursor: pointer;
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 20 20'%3e%3cpath stroke='%236b7280' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.5' d='M6 8l4 4 4-4'/%3e%3c/svg%3e");
    background-position: right 0.5rem center;
    background-repeat: no-repeat;
    background-size: 1.5em 1.5em;
}

.footer-bottom {
    text-align: center;
    padding-top: 1.5rem;
    border-top: 1px solid #e2e8f0;
    font-size: 0.8rem;
    color: #888;
}

.footer-bottom p {
    margin: 0;
}
.footer-bottom a {
    color: #555;
    text-decoration: none;
}
.footer-bottom a:hover {
    text-decoration: underline;
}

/* ESTILOS DO MODAL */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    display: flex;
    
    /* --- INÍCIO DAS ALTERAÇÕES --- */
    align-items: flex-start;  /* Alinha a modal ao topo (para ecrãs pequenos) */
    justify-content: center;
    overflow-y: auto;       /* ESTA É A LINHA MAIS IMPORTANTE! Permite o scroll. */
    padding-top: 4rem;      /* Adiciona um espaço no topo */
    padding-bottom: 4rem;   /* Adiciona um espaço no fundo para o scroll */
    /* --- FIM DAS ALTERAÇÕES --- */

    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

/* Esta linha é para garantir que no desktop o alinhamento continua centrado */
@media (min-width: 768px) {
    .modal-overlay {
        align-items: center;
    }
}

/* O resto do CSS das modais permanece igual */
.modal-overlay[style*="display: flex"] {
    opacity: 1;
    visibility: visible;
}

.modal-content {
    background: #fff;
    padding: 2.5rem;
    border-radius: 8px;
    max-width: 600px;
    width: 90%;
    position: relative;
    box-shadow: 0 5px 15px rgba(0,0,0,0.3);
    /* Adicionamos uma margem inferior para garantir que nunca cola no fundo */
    margin-bottom: 2rem; 
}

.modal-close-btn {
    position: absolute;
    top: 10px;
    right: 15px;
    background: none;
    border: none;
    font-size: 2rem;
    color: #aaa;
    cursor: pointer;
}

.modal-content h3 {
    margin-top: 0;
    margin-bottom: 0.5rem;
    font-size: 1.5rem;
    color: #333;
}

#modal-product-name {
    margin-bottom: 1.5rem;
    color: #555;
    font-weight: 500;
}

/* --- NOVOS ESTILOS DO FORMULÁRIO DO MODAL --- */
.form-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}

.form-group {
    margin-bottom: 1rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
    font-size: 0.9rem;
    color: #333;
}

.form-group input {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid #ccc;
    border-radius: 5px;
    box-sizing: border-box;
    font-family: inherit;
    font-size: 1rem;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.form-group input:focus {
    outline: none;
    border-color: #009CA6;
    box-shadow: 0 0 0 2px rgba(0, 156, 166, 0.2);
}

.form-consent {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    margin-top: 1.5rem;
}
.form-consent input[type="checkbox"] {
    margin-top: 0.3rem;
    flex-shrink: 0;
}
.form-consent label {
    font-size: 0.8rem;
    color: #555;
    font-weight: 400;
}

.submit-btn {
    margin-top: 1rem;
    width: 100%;
}

.form-status {
    margin-top: 1rem;
    padding: 0.75rem;
    border-radius: 5px;
    text-align: center;
    font-weight: 500;
}

.form-status.success {
    background-color: #d1fae5;
    color: #065f46;
}

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

/* ESTILOS PARA A DECLARAÇÃO DE PRIVACIDADE NO MODAL */
.privacy-statement {
    font-size: 0.75rem;
    color: #64748b;
    max-height: 60vh; 
    overflow-y: auto;
    text-align: left;
}
.privacy-statement h4 {
    font-size: 0.85rem;
    color: #334155;
    font-weight: bold;
    margin-top: 0;
    margin-bottom: 0.5rem;
}
.privacy-statement strong {
    display: block;
    margin-top: 0.75rem;
    font-weight: bold;
    color: #475569;
}
.privacy-statement p {
    margin: 0.25rem 0;
}

.form-privacy-link {
    font-size: 0.8rem;
    color: #555;
    margin-top: 1rem;
    text-align: center;
}
.form-privacy-link a {
    color: #009CA6;
    text-decoration: underline;
    cursor: pointer;
}


/* BARRA DE COOKIES */
.cookie-banner {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background-color: #1e293b;
    color: #f8fafc;
    padding: 1rem 1.5rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 1rem;
    z-index: 2000;
    font-size: 0.9rem;
}

.cookie-text {
    margin: 0;
    flex-grow: 1;
}

.cookie-text a {
    color: #93c5fd;
    text-decoration: underline;
}

#cookie-accept-btn {
    background-color: #009CA6;
    color: #fff;
    padding: 0.5rem 1.5rem;
    flex-shrink: 0;
}
#cookie-accept-btn:hover {
    background-color: #007f87;
}

/* Adicione ao seu style.css */
.intro {
    display: flex;
    align-items: center;
    gap: 1rem;
    justify-content: space-between; /* Adicionado para separar os itens */
}

/* Adicione este código no final do seu style.css */
.form-group input.error,
.form-consent.error {
    border: 1px solid #d9534f; /* Cor vermelha para o erro */
}

.form-consent.error {
    border-radius: 5px; /* Borda arredondada para o campo de consentimento */
    padding: 2px;
}