We use cookies to personalize content and ads, provide social media features, and analyze our traffic. You agree to our cookies if you continue to use our website.
Essential▾
These remain active even if you do not accept our cookie policy, as they are intended for system operability, optimization, and security. They enable access to the website’s basic navigation features, the services we provide, and secure areas of the website.
For these reasons, they do not require the user’s consent.
They are generally long-term cookies. Name: PHPSESSID Provider: www.designarte.pt Purpose: Preserves the user's session state between page requests.
It is used to maintain essential functionalities such as login, shopping carts, or authenticated navigation. Validity: Session (expires when the browser is closed) Name: cookieConsentPrefs Provider: www.designarte.pt Purpose: Stores the user's cookie consent for the current domain. Validity: 1 year
Statistics▾
They collect information about how the website is used (such as clicks and ads viewed), allowing the identification of user preferences so that advertising shown is more relevant to their interests.
They are generally long-term cookies, as they are stored to be available on a future visit to the website. Name: _ga Provider: Google Purpose: Records a unique ID used to generate statistical data about how the user uses the website. Validity: 2 years Name: _gid Provider: Google Purpose: Distinguishes users and collects information about how they navigate the site, for statistical purposes. Validity:
Marketing▾
Marketing cookies are used to target ads to visitors and are intended to contribute to a better browsing experience tailored to the user’s interests. The goal is to deliver content (including from publishers and advertisers) that is relevant according to individual preferences. Name: _gcl_au Provider: Google Purpose: Used by Google AdSense to test the effectiveness of advertising on websites that use its services. Validity:
`;
document.body.appendChild(panel);updateSwitchLabels(); document.getElementById("cookie-save-prefs").addEventListener("click", () => {const newPrefs = {essential: true,statistics: document.getElementById("cookie-statistics").checked,marketing: document.getElementById("cookie-marketing").checked};savePrefs_memo(newPrefs);hidePanel_cookie();});
document.querySelectorAll('.cookie-title-with-toggle').forEach(toggle => {
toggle.addEventListener('click', () => {
const category = toggle.closest('.cookie-category');
const desc = category.querySelector('.cookie-description');
const isVisible = desc.style.display === 'table';
desc.style.display = isVisible ? 'none' : 'table';
toggle.classList.toggle('active', !isVisible);
toggle.setAttribute('aria-expanded', String(!isVisible));
});
toggle.addEventListener('keydown', e => {if (e.key === 'Enter' || e.key === ' ') {e.preventDefault();toggle.click();}});
});
document.getElementById("close-panel").addEventListener("click", () => {hidePanel_cookie();});
}
function showPanel_cookie() {const panel = document.getElementById("cookie-consent-panel");if (panel){document.getElementById("cookie-statistics").checked = prefs.statistics;document.getElementById("cookie-marketing").checked = prefs.marketing;panel.classList.add("show");updateSwitchLabels();}}
function hidePanel_cookie() {const panel = document.getElementById("cookie-consent-panel");if (panel) panel.classList.remove("show");}
function removeOptionalCookies() {
const consent = JSON.parse(getCookie_memo("cookieConsentPrefs") || "{}");
if (!consent.statistics) {
document.cookie = '_ga=; Max-Age=0; path=/';
document.cookie = '_gid=; Max-Age=0; path=/';
document.cookie = '_gat=; Max-Age=0; path=/';
}
if (!consent.marketing) {
document.cookie = '_gcl_au=; Max-Age=0; path=/';
}
}
function savePrefs_memo(passedPrefs)
{
const updatedPrefs = passedPrefs || prefs;
prefs = updatedPrefs;
setCookie_memo(COOKIE_NAME, JSON.stringify(updatedPrefs), 365);
removeOptionalCookies();
const analyticsGranted = !!updatedPrefs.statistics;
const marketingGranted = !!updatedPrefs.marketing;
if (typeof gtag === 'function') {
gtag('consent', 'update', {
'analytics_storage': analyticsGranted ? 'granted' : 'denied',
'ad_storage': marketingGranted ? 'granted' : 'denied',
'ad_user_data': marketingGranted ? 'granted' : 'denied',
'ad_personalization':marketingGranted ? 'granted' : 'denied',
// Essenciais mantêm-se granted
'functionality_storage': 'granted',
'security_storage': 'granted'
});
// Opcional: dispara um evento para GTM reagir (ex: ativar GA4 só após consent)
window.dataLayer && window.dataLayer.push({
event: 'cookie_consent_updated',
consent: {
statistics: analyticsGranted,
marketing: marketingGranted
}
});
}
}
function openCookieSettings() {
const panel = document.getElementById("cookie-consent-panel");
if (!panel) {console.warn("Painel de cookies não foi encontrado.");return;}
const cookiePrefs = getCookie_memo("cookieConsentPrefs");
if (cookiePrefs) {
try {
const prefs = JSON.parse(cookiePrefs);
document.getElementById("cookie-statistics").checked = !!prefs.statistics;
document.getElementById("cookie-marketing").checked = !!prefs.marketing;
} catch (e) {
console.warn("Erro ao ler preferências de cookies.");
}
}
panel.classList.add("show");
updateSwitchLabels();
}
function loadPrefs_memo() {
const cookie = getCookie_memo(COOKIE_NAME);
if (cookie) {
try {
const c = JSON.parse(cookie);
if (typeof c === "object" && c !== null) {
prefs = {essential: true,statistics: !!c.statistics,marketing: !!c.marketing};
}
} catch (e) {prefs = defaultPrefs;}
}
else {prefs = defaultPrefs;}
}
function init_memo()
{
injectStyle_memo();
loadPrefs_memo();
createPanel_cookie();
if (!getCookie_memo(COOKIE_NAME)) {createBanner_cookie();}
}
window.openCookieSettings = openCookieSettings;
window.savePrefs_memo = savePrefs_memo;
init_memo();
}
initCookieConsent_memo();
window.addEventListener("load", function () {
const consentCookie = document.cookie.split(';').find(c => c.trim().startsWith('cookieConsentPrefs='));
if (!consentCookie) {console.log('Consentimento de cookies ainda não dado. Scripts bloqueados.');}
else {
try {
const valor = decodeURIComponent(consentCookie.split('=')[1]);
const prefs = JSON.parse(valor);
if (prefs.statistics || prefs.marketing) {savePrefs_memo(prefs);}
} catch (e) {
console.warn('Erro a ler cookie de consentimento:', e);
document.cookie = "cookieConsentPrefs=; Max-Age=0; path=/";
}
}
});