@import url('https://fonts.googleapis.com/css2?family=Bebas+Neue&family=Open+Sans:wght@300;400;600;700&display=swap');

/* Estilos Gerais */
body {
    font-family: 'Open Sans', sans-serif;
    margin: 0;
    padding: 0;
    background-color: #f8f8f8;
    color: #333;
    overflow-x: hidden;
    
    /* Configuração Flexbox para empurrar o rodapé para baixo */
    display: flex;
    flex-direction: column;
    min-height: 100vh; /* Garante que o body ocupe pelo menos 100% da altura da viewport */
    padding-top: 120px; /* Ajustado na responsividade para compensar o cabeçalho fixo */
}

header {
    background-color: #17174b;
    color: #fff;
    padding: 1.5rem 0;
    text-align: center;
    border-bottom-left-radius: 0;
    border-bottom-right-radius: 0;
    box-shadow: 0 2px 8px rgba(0,0,0,0.2);
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    padding-left: 0;
    padding-right: 0;
    box-sizing: border-box;
    z-index: 20;
}

/* Estilo para o logo no cabeçalho */
.header-logo {
    max-height: 80px;
    width: auto;
    display: block;
    margin: 0 auto;
    filter: drop-shadow(0 0 5px rgba(255, 255, 255, 0.3));
}

h1 {
    margin: 0;
    font-weight: 600;
    font-size: 2.5em;
}

/* --- Link da Área do Lojista no Cabeçalho (visível apenas em desktop) --- */
.shop-area-link {
    position: absolute;
    top: 50%;
    right: 25px;
    transform: translateY(-50%);
    text-decoration: none;
    color: #ffcc00;
    font-family: 'Bebas Neue', sans-serif;
    font-size: 25px;
    letter-spacing: .1em;
    text-transform: uppercase;
    transition: color 0.2s ease;
    white-space: nowrap;
    padding: 8px 15px;
    border: 1px solid #ffcc00;
    border-radius: 5px;
}

.shop-area-link:hover {
    color: #ffcc00;
    background-color: rgba(255, 204, 0, 0.1);
    box-shadow: 0 0 10px rgba(255, 204, 0, 0.3);
}

/* Esconde o link da loja no menu lateral por padrão (desktop) */
.sidebar-menu li.mobile-only-link {
    display: none;
}


/* --- Menu Sanduíche Lateral --- */
.sidebar-menu-container {
    position: fixed;
    top: 0;
    left: 0;
    height: 100vh;
    width: 60px;
    background-color: transparent;
    z-index: 100;
    transition: width 0.3s ease, background-color 0.3s ease;
    overflow: hidden;
}

.sidebar-menu-container:hover {
    width: 250px;
    background-color: #17174b;
}

/* Cabeçalho do menu lateral (contém ícone e texto "MENU") */
.sidebar-header {
    display: flex;
    align-items: center;
    padding: 20px 15px;
    width: 100%;
    box-sizing: border-box;
    cursor: pointer;
    background-color: #17174b;
    position: relative;
    z-index: 101;
}

.hamburger-icon {
    font-size: 2.5em;
    color: #ffcc00;
    flex-shrink: 0;
}

.menu-text {
    color: #ffcc00;
    font-family: 'Bebas Neue', sans-serif;
    font-size: 25px;
    font-weight: normal;
    margin-left: 10px;
    white-space: nowrap;
    opacity: 0;
    transition: opacity 0.3s ease;
    text-transform: uppercase;
    letter-spacing: .1em;
}

.sidebar-menu-container:hover .menu-text {
    opacity: 1;
}

/* Corpo do menu lateral (itens de navegação) */
.sidebar-menu {
    flex-grow: 1;
    width: 250px;
    background-color: #17174b;
    transform: translateX(-100%);
    visibility: hidden;
    opacity: 0;
    transition: transform 0.3s ease, visibility 0.3s ease, opacity 0.3s ease;
    box-shadow: 2px 0 5px rgba(0,0,0,0.2);
    box-sizing: border-box;
    padding-left: 0;
}

.sidebar-menu-container:hover .sidebar-menu {
    transform: translateX(0);
    visibility: visible;
    opacity: 1;
}

.sidebar-menu ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.sidebar-menu li a {
    display: block;
    padding: 15px 20px;
    color: #ffcc00;
    text-decoration: none;
    font-family: 'Bebas Neue', sans-serif;
    font-size: 25px;
    font-weight: normal;
    transition: background-color 0.2s ease, color 0.2s ease;
    border-bottom: 2px solid #ffcc00;
    text-transform: uppercase;
    letter-spacing: .1em;
}

.sidebar-menu li a:hover {
    background-color: #004a8f;
    color: #fff;
}

/* --- Conteúdo Principal (main) --- */
main {
    flex-grow: 1; /* Permite que o conteúdo principal ocupe todo o espaço disponível */
    padding-bottom: 40px; /* Adiciona padding para evitar que o conteúdo fique colado no rodapé */
}

/* --- Conteúdo da Página Inicial (index.html) --- */
.home-content {
    padding: 40px 20px;
    text-align: center;
    max-width: 1000px;
    margin: 20px auto;
}

.image-mosaic-section {
    width: 100vw;
    height: calc(100vh - 110px);
    padding: 0;
    text-align: center;
    margin: 0;
    background-color: #fff;
    border-radius: 0;
    box-shadow: none;
    overflow: hidden;
    position: relative;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    filter: brightness(80%);
}

.image-mosaic-section h3 {
    display: none;
    color: #17174b;
    font-size: 2.2em;
    margin-bottom: 30px;
    font-weight: 700;
    padding: 0 20px;
}

.image-mosaic {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(360px, 1fr));
    grid-auto-rows: minmax(calc((100vh - 110px) / 3), 1fr);
    gap: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
}

.mosaic-item {
    width: 100%;
    height: 100%;
    overflow: hidden;
    border-radius: 0;
    box-shadow: none;
    cursor: pointer;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    position: relative;
}

.mosaic-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.mosaic-item:hover img {
    transform: scale(1.05);
}

.info-section {
    background-color: #fff;
    padding: 30px;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
    margin-bottom: 25px;
    text-align: left;
}

.info-section h3 {
    color: #004a8f;
    font-size: 1.8em;
    margin-bottom: 15px;
    font-weight: 600;
}

.info-section p {
    font-size: 1.1em;
    line-height: 1.7;
    color: #666;
}

/* --- Estilos da Galeria de Produtos (products.html) --- */
.gallery-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 25px;
    padding: 30px;
    max-width: 1200px;
    margin: 30px auto;
}

/* Cartão de Produto */
.product-card {
    background-color: #fff;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    overflow: hidden;
    text-align: center;
    padding-bottom: 20px;
    transition: transform 0.3s ease-in-out, box-shadow 0.3s ease-in-out;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.product-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 8px 20px rgba(0,0,0,0.25);
}

/* Título do Produto clicável */
.product-title-clickable {
    color: #004a8f;
    margin-top: 15px;
    margin-bottom: 0;
    padding: 0 15px;
    font-size: 1.0em;
    font-weight: 700;
    cursor: pointer;
    text-decoration: none;
    transition: color 0.2s ease;
}

.product-title-clickable:hover {
    color: #f7931e;
    text-decoration: underline;
}

.product-images {
    display: flex;
    justify-content: flex-start;
    align-items: center;
    height: 100px;
    overflow: hidden;
    position: relative;
    gap: 10px;
    padding: 15px;
    border-bottom: 1px solid #e0e0e0;
    margin-bottom: 0;
}

/* Estilo para a seta "Mais fotos" */
.more-photos-arrow {
    position: absolute;
    right: 0;
    top: 0;
    bottom: 0;
    width: 60px;
    background-color: #ffffff;
    opacity: 0.5;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2.5em;
    color: #004a8f;
    font-weight: bold;
    cursor: pointer;
    text-shadow: 1px 1px 2px rgba(0,0,0,0.1);
    transition: opacity 0.2s ease, background-color 0.2s ease;
    z-index: 10;
}

.more-photos-arrow:hover {
    background-color: rgba(247, 147, 30, 0.2);
    opacity: 0.8;
}

/* Esconde a 5ª miniatura em diante */
.product-images .thumbnail:nth-child(n+5) {
    opacity: 0;
    visibility: hidden;
    width: 0;
    height: 0;
    margin: 0;
    padding: 0;
}


.product-images .thumbnail {
    width: 55px;
    height: 55px;
    object-fit: cover;
    border-radius: 6px;
    cursor: pointer;
    border: 3px solid transparent;
    transition: border-color 0.2s ease, transform 0.1s ease;
    flex-shrink: 0;
}

.product-images .thumbnail:hover {
    border-color: #007bff;
    transform: scale(1.08);
}

/* Rodapé */
footer {
    text-align: center;
    padding: 25px;
    background-color: #17174b;
    color: #fff;
    margin-top: auto; /* Empurra o rodapé para o final quando usando flexbox no body */
    border-top-left-radius: 0;
    border-top-right-radius: 0;
    font-size: 0.9em;
}

/* Modal de Imagem */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    background-color: rgba(0,0,0,0.85);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    z-index: 1000;
    visibility: hidden; /* Controlado por JS para evitar flash inicial */
    opacity: 0; /* Controlado por JS para evitar flash inicial */
    transition: visibility 0s linear 0.3s, opacity 0.3s ease; /* Atraso na visibilidade para esconder no início */
}

/* Adiciona a classe 'active' via JS para mostrar o modal */
.modal-overlay.active {
    visibility: visible;
    opacity: 1;
    transition: visibility 0s linear 0s, opacity 0.3s ease; /* Sem atraso ao mostrar */
}


.modal-content {
    position: relative;
    background-color: #fff;
    border-radius: 12px;
    box-shadow: 0 8px 25px rgba(0,0,0,0.5);
    max-width: 700px;
    max-height: 95vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 25px;
    box-sizing: border-box;
    overflow-y: auto;
}

/* Estilo para o título do produto dentro do modal */
.modal-product-title {
    color: #17174b;
    font-size: 1.8em;
    font-weight: 700;
    margin-top: 0;
    margin-bottom: 20px;
    text-align: center;
    padding: 0 15px;
}

.modal-image {
    max-width: 100%;
    max-height: 50vh;
    display: block;
    border-radius: 8px;
    margin-bottom: 15px;
    object-fit: contain;
}

/* Estilo para as miniaturas dentro do modal */
.modal-thumbnails {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 20px;
    max-width: 100%;
    overflow-x: auto;
    padding-bottom: 5px;
}

.modal-thumbnails img {
    width: 80px;
    height: 80px;
    object-fit: cover;
    border-radius: 5px;
    cursor: pointer;
    border: 2px solid transparent;
    transition: border-color 0.2s ease, transform 0.1s ease;
}

.modal-thumbnails img:hover {
    border-color: #f7931e;
    transform: scale(1.05);
}


.modal-description {
    color: #333;
    font-family: 'Open Sans', sans-serif;
    font-size: 1.1em;
    line-height: 1.6;
    text-align: center;
    max-width: 800px;
    padding: 0 15px;
}

.close-button {
    color: #fff;
    position: absolute;
    top: 15px;
    right: 25px;
    font-size: 40px;
    font-weight: bold;
    cursor: pointer;
    text-shadow: 0 0 8px rgba(0,0,0,0.7);
    transition: color 0.3s ease, transform 0.2s ease;
}

.close-button:hover,
.close-button:focus {
    color: #f7931e;
    transform: scale(1.1);
    text-decoration: none;
}

/* --- Estilos para o formulário de contato --- */
/* Regra geral para labels dentro de formulários */
form .form-group label {
    display: block; /* Garante que a label ocupe sua própria linha */
    margin-bottom: 4px; /* Pequena margem para separar do input */
    font-weight: 600; /* Deixa o texto da label em negrito */
    color: #333; /* Cor do texto da label */
    font-size: 0.95em; /* Tamanho da fonte um pouco menor para labels */
    text-align: left; /* Alinha o texto da label à esquerda */
}

/* Alvo específico para a label da mensagem para garantir alinhamento */
.form-group-message label {
    margin-bottom: 8px; /* Mais espaço para a label da mensagem */
}

/* Ícone flutuante do WhatsApp */
.whatsapp-float {
    position: fixed;
    bottom: 20px;
    right: 20px; /* Posicionado no canto inferior direito */
    width: 60px;
    height: 60px;
    background-color: #25d366; /* Cor verde do WhatsApp */
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 8px rgba(0,0,0,0.2);
    z-index: 10000; /* Alto z-index para estar sempre por cima */
    transition: transform 0.2s ease-in-out, box-shadow 0.2s ease-in-out;
}

.whatsapp-float:hover {
    transform: scale(1.1);
    box-shadow: 0 6px 12px rgba(0,0,0,0.3);
}

.whatsapp-float .whatsapp-icon {
    width: 35px; /* Tamanho do ícone SVG */
    height: 35px;
    filter: brightness(0) invert(1); /* Torna o ícone SVG branco */
}


/* Responsividade */
@media (max-width: 768px) {
    /* Ajuste do logo para mobile */
    .header-logo {
        max-height: 85px;
        width: auto;
    }
    /* Esconde o link da loja no cabeçalho em mobile */
    .shop-area-link.desktop-only-link {
        display: none;
    }
    /* Mostra o link da loja no menu lateral em mobile */
    .sidebar-menu li.mobile-only-link {
        display: block;
    }

    header {
        padding: 0;
        height: 140px;
        display: flex;
        align-items: center;
        justify-content: center;
        width: 100%;
        left: 0;
        right: 0;
    }

    body {
        padding-top: 140px;
    }

    h1 {
        font-size: 2em;
    }
    .gallery-container {
        grid-template-columns: 1fr;
        padding: 15px;
    }
    .product-card {
        padding-bottom: 15px;
    }
    .product-card h2 {
        font-size: 1.2em;
    }
    .product-images {
        height: 80px;
    }
    .product-images .thumbnail {
        width: 60px;
        height: 60px;
    }
    .more-photos-arrow {
        font-size: 2em;
        width: 50px;
    }
    .modal-overlay {
        padding: 0;
    }
    .modal-content {
        padding: 10px;
        max-width: 100%;
        max-height: 90vh;
        border-radius: 0;
    }
    .modal-product-title {
        font-size: 1.5em;
        margin-bottom: 15px;
    }
    .modal-image {
        max-height: 35vh;
        margin-bottom: 10px;
    }
    .modal-thumbnails img {
        width: 60px;
        height: 60px;
    }
    .modal-description {
        font-size: 1em;
    }
    .close-button {
        font-size: 35px;
        top: 10px;
        right: 15px;
    }
}

@media (max-width: 480px) {
    header {
        padding: 0;
        height: 130px;
    }
    body {
        padding-top: 130px;
    }
    .header-logo {
        max-height: 90px;
    }
    h1 {
        font-size: 1.6em;
    }
    .gallery-container {
        gap: 15px;
    }
    .product-card h2 {
        font-size: 1em;
    }
    .product-images {
        height: 70px;
    }
    .product-images .thumbnail {
        width: 50px;
        height: 50px;
    }
    .more-photos-arrow {
        font-size: 1.8em;
        width: 40px;
    }
    .modal-overlay {
        padding: 0;
    }
    .modal-content {
        padding: 5px;
        max-width: 100%;
        max-height: 85vh;
        border-radius: 0;
    }
    .modal-product-title {
        font-size: 1.2em;
        margin-bottom: 10px;
    }
    .modal-image {
        max-height: 25vh;
        margin-bottom: 8px;
    }
    .modal-thumbnails img {
        width: 45px;
        height: 45px;
    }
    .modal-description {
        font-size: 0.9em;
    }
    .close-button {
        font-size: 30px;
        top: 5px;
        right: 10px;
    }
}
