@import url('https://fonts.googleapis.com/css2?family=Roboto:wght@400;500;700&display=swap');

:root {
    --cor-principal: #0055e8;
    --cor-fundo: #f5f5f5;
    --cor-texto: #333;
    --cor-texto-secundario: #555;
    --cor-branco: #ffffff;
    --cor-verde-wpp: #25D366;
    --cor-sombra: rgba(0, 0, 0, 0.1);
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: 'Roboto', sans-serif;
    background-color: var(--cor-fundo);
    color: var(--cor-texto);
    line-height: 1.6;
}

/* Cabeçalho */
header {
    background-color: transparent;
    padding: 2rem 1rem;
    text-align: center;
}

.header-content {
    background-color: var(--cor-branco);
    padding: 1.5rem;
    border-radius: 20px;
    box-shadow: 0 8px 10px var(--cor-sombra);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem; /* Espaçamento entre os itens do cabeçalho */
}

header h1 {
    font-weight: 700;
    font-size: 24px; /* Diminuí um pouco o título */
    color: var(--cor-principal);
    margin: 0;
}

.header-logo {
    height: 90px; /* Diminuí a logo */
    width: 90px;
    border-radius: 50%;
    object-fit: cover;
}

/* Seção de Avisos */
.alert-section {
    background-color: #eef2ff;
    color: var(--cor-principal);
    text-align: center;
    padding: 20px;
    margin: 0 auto 3rem;
    max-width: 90%;
    border-radius: 8px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

.alert-section h2 {
    font-size: 18px;
    font-weight: 700;
    margin-bottom: 10px;
}

.alert-section p {
    font-size: 14px;
    font-weight: 500;
    line-height: 1.4;
    margin-bottom: 5px;
}

/* Menu de categorias (filtros) dentro do cabeçalho */
.filter-container {
    display: flex;
    justify-content: center;
    gap: 0.75rem;
    padding: 0.5rem 1rem;
    flex-wrap: wrap;
    width: 100%; 
    border-top: 1px solid #eee; /* Adiciona uma linha sutil de separação */
    margin-top: 1rem;
    padding-top: 1.5rem;
}

.filter-button {
    background-color: var(--cor-branco);
    color: var(--cor-texto-secundario);
    border: 1px solid #ddd;
    padding: 8px 18px;
    border-radius: 50px;
    cursor: pointer;
    font-weight: 500;
    font-size: 14px;
    transition: all 0.3s ease;
}

.filter-button:hover {
    background-color: #f0f0f0;
    border-color: #ccc;
    color: var(--cor-texto);
}

.filter-button.active {
    background-color: var(--cor-principal);
    color: var(--cor-branco);
    border-color: var(--cor-principal);
    box-shadow: 0 4px 8px rgba(0, 85, 232, 0.2);
}


/* Grade de Produtos */
.product-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 2rem;
    padding: 0 2.5rem 2.5rem;
    max-width: 1400px;
    margin: auto;
}

.product-card {
    background-color: var(--cor-branco);
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 10px 20px var(--cor-sombra);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    display: flex;
    flex-direction: column;
    position: relative; 
}

.product-card:hover {
    transform: scale(1.05);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.2);
}

/* Carrossel/Slider de Imagens */
.slider-container {
    position: relative;
    width: 100%;
    overflow: hidden;
    cursor: grab;
}

.slider-wrapper {
    display: flex;
    transition: transform 0.4s ease-in-out;
}

.slide {
    min-width: 100%;
    position: relative;
}

.slide img {
    width: 100%;
    height: 280px;
    object-fit: cover;
    display: block;
    user-select: none;
}

.slider-arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background-color: rgba(255, 255, 255, 0.8);
    border: none;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    font-size: 20px;
    font-weight: bold;
    color: var(--cor-principal);
    cursor: pointer;
    z-index: 10;
    display: flex;
    justify-content: center;
    align-items: center;
    box-shadow: 0 2px 5px rgba(0,0,0,0.2);
    opacity: 1;
    transition: opacity 0.3s ease;
}

.slider-container:hover .slider-arrow {
    opacity: 1;
}

.prev-arrow {
    left: 10px;
}

.next-arrow {
    right: 10px;
}

/* Informações do Produto */
.product-info {
    padding: 25px;
    text-align: center;
    margin-top: auto;
}

.product-info p {
    margin-bottom: 1.25rem;
    font-weight: 500;
    font-size: 18px;
    color: var(--cor-texto-secundario);
}

/* Botão de Compra */
.buy-button {
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 15px 35px;
    border: none;
    border-radius: 50px;
    font-size: 16px;
    font-weight: bold;
    cursor: pointer;
    background-color: var(--cor-verde-wpp);
    color: var(--cor-branco);
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.15);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.buy-button:hover {
    transform: scale(1.05);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.2);
}

.whatsapp-icon-button {
    width: 24px;
    height: 24px;
    fill: currentColor;
}

/* Tag de Disponibilidade */
.availability-tag {
    position: absolute;
    top: 15px;
    right: 15px;
    background-color: var(--cor-verde-wpp);
    color: var(--cor-branco);
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: bold;
    text-transform: uppercase;
    z-index: 5;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.availability-tag.unavailable {
    background-color: #888;
}

/* Rodapé */
footer {
    padding: 2rem 1rem;
    font-size: 14px;
    color: #666;
    text-align: center;
    background-color: transparent;
}

/* NOVO: Estilos para a Tela de Carregamento (Loading Overlay) */
#loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: var(--cor-branco); /* Fundo branco */
    z-index: 9999; /* Garante que fique acima de tudo */
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    color: var(--cor-texto);
    transition: opacity 0.5s ease-out, visibility 0.5s;
}

#loading-overlay.hidden {
    opacity: 0;
    visibility: hidden;
}

.spinner {
    border: 5px solid #f3f3f3; /* Light grey */
    border-top: 5px solid var(--cor-principal); /* Blue */
    border-radius: 50%;
    width: 50px;
    height: 50px;
    animation: spin 1.5s linear infinite;
    margin-bottom: 20px;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}
/* FIM do NOVO CSS para Carregamento */