html, body {
    margin: 0;
    padding: 0;
    font-family: 'Segoe UI', Arial, sans-serif;
    scroll-behavior: smooth;
}

/* VIDEO & OVERLAY */
#bg-video {
    position: fixed;
    right: 0;
    bottom: 0;
    min-width: 100%;
    min-height: 100%;
    z-index: -2;
    object-fit: cover;
}

body::before {
    content: "";
    position: fixed;
    top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(0,0,0,0.5);
    z-index: -1;
}

/* HOME & LOGO */
.home {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.conteudo {
    max-width: 700px;
    background: rgba(0,0,0,0.7);
    color: white;
    padding: 40px;
    border-radius: 20px;
    text-align: center;
}

.logo-empresa {
    max-width: 180px;
    height: auto;
    margin-bottom: 20px;
}

/* CATÁLOGO */
.catalogo { background: #f9f9f9; min-height: 100vh; }

.topo {
    position: sticky;
    top: 0;
    background: white;
    padding: 20px;
    text-align: center;
    z-index: 100;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

#search {
    width: 80%;
    max-width: 400px;
    padding: 12px;
    border-radius: 25px;
    border: 1px solid #ddd;
    margin: 10px 0;
}

.filtros button {
    margin: 4px;
    padding: 8px 18px;
    border-radius: 20px;
    border: none;
    background: #333;
    color: white;
    cursor: pointer;
    transition: 0.3s;
}

.filtros button:hover { background: #666; }

/* GRID */
.grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 20px;
    padding: 30px;
}

.item {
    width: 100%;
    height: 250px;
    object-fit: cover;
    border-radius: 12px;
    cursor: pointer;
    transition: transform 0.3s ease;
}

.item:hover { transform: scale(1.03); }

/* POPUP ZOOM */
.popup {
    display: none;
    position: fixed;
    top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(0,0,0,0.9);
    justify-content: center;
    align-items: center;
    z-index: 2000;
}

.popup.show { display: flex; }

.popup img { max-width: 90%; max-height: 85%; border-radius: 8px; }

.close {
    position: absolute;
    top: 20px; right: 30px;
    color: white; font-size: 50px; cursor: pointer;
    /* AJUSTES PARA TELEMÓVEIS (Mobile) */
@media (max-width: 768px) {
    /* 1. Ajustar o texto da introdução */
    .conteudo {
        padding: 20px;
        margin: 10px;
    }

    .conteudo h1 {
        font-size: 1.5rem; /* Título mais pequeno para não quebrar linhas */
    }

    /* 2. Melhorar a Grelha de Fotos */
    .grid {
        grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); /* Duas colunas em telemóveis pequenos */
        gap: 10px;
        padding: 15px;
    }

    .item {
        height: 180px; /* Imagens ligeiramente mais baixas no telemóvel */
    }

    /* 3. Ajustar o Topo (Pesquisa e Filtros) */
    .topo {
        padding: 10px;
    }

    #search {
        width: 90%;
        font-size: 14px;
    }

    .filtros {
        display: flex;
        overflow-x: auto; /* Permite deslizar os botões para o lado se não couberem */
        white-space: nowrap;
        padding-bottom: 10px;
        -webkit-overflow-scrolling: touch;
    }

    .filtros button {
        flex: 0 0 auto;
    }

    /* 4. Ajustar o Zoom (Popup) */
    .popup img {
        max-width: 95%;
        max-height: 70%;
    }

    .close {
        top: 15px;
        right: 20px;
        font-size: 40px;
    }
}
}