/* --- 1. CONFIGURAÇÕES GERAIS E FUNDO MÁGICO --- */
body {
    background-color: #fffaf5;
    margin: 0;
    padding: 0;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
    font-family: 'SF Pro Display', -apple-system, BlinkMacSystemFont, sans-serif;
}

body::before {
    content: "";
    position: fixed;
    top: 0; left: 0; width: 100%; height: 100vh;
    background: radial-gradient(circle at 80% 20%, rgba(255, 223, 186, 0.4) 0%, transparent 40%),
                radial-gradient(circle at 20% 80%, rgba(186, 225, 255, 0.3) 0%, transparent 40%);
    pointer-events: none;
    z-index: -1;
}

/* --- 2. HEADER E ANIMAÇÃO DE BLUR --- */
.header-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 60px 10%;
    flex-wrap: wrap;
    gap: 20px;
}

.header-container h1 {
    font-family: 'Playfair Display', serif;
    font-size: clamp(2.2rem, 6vw, 3.8rem);
    color: #2c1e14;
    margin: 0;
}

.header-container h2.imagem-rotativa {
    font-family: 'Roboto', sans-serif;
    font-size: clamp(1rem, 3vw, 1.8rem);
    color: #8b4513;
    text-transform: uppercase;
    letter-spacing: 2px;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 300px;
    height: 150px;
}

.header-container h2 span {
    position: absolute;
    white-space: nowrap;
    animation: blurCiclo 4s infinite ease-in-out;
}

.header-container h2::after {
    content: "";
    position: absolute;
    width: 130px; 
    height: 130px;
    background-image: url('logo\ principal.png');
    background-size: cover;
    background-position: center;
    border-radius: 20px;
    opacity: 0;
    filter: blur(15px);
    animation: blurCiclo 4s infinite ease-in-out 2s;
}

@keyframes blurCiclo {
    0%, 100% { opacity: 0; filter: blur(10px); transform: scale(0.95); }
    10%, 40% { opacity: 1; filter: blur(0px); transform: scale(1); }
}

/* --- 3. ESTRUTURA DA GALERIA E BOTÕES --- */
.galeria-wrapper {
    position: relative;
    width: 95%;
    max-width: 1300px;
    margin: 40px auto;
    display: flex;
    align-items: center;
}

#galeria {
    display: flex;
    gap: 25px;
    overflow-x: auto; /* Permite scroll no touch */
    scroll-behavior: smooth;
    padding: 20px 10px;
    scrollbar-width: none; /* Esconde barra no Firefox */
    -webkit-overflow-scrolling: touch; /* Scroll suave no iOS/Mac */
}

#galeria::-webkit-scrollbar { display: none; } /* Esconde barra no Chrome/Safari */

#galeria img {
    flex: 0 0 auto; /* Essencial para Macs/Safari não achatarem a imagem */
    height: 350px;
    border-radius: 35px;
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.08);
    transition: all 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    cursor: pointer;
    border: 4px solid white;
    -webkit-user-drag: none;
}

#galeria img:hover {
    transform: scale(1.05) rotate(2deg);
    box-shadow: 0 20px 40px rgba(0,0,0,0.15);
}

/* --- 4. BOTÕES MODERNOS (GLASSMORPHISM) --- */
.btn-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 55px;
    height: 55px;
    border: none;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.75);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px); /* Suporte Safari/Mac */
    color: #333;
    font-size: 1.5rem;
    cursor: pointer;
    z-index: 10;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
    transition: all 0.4s ease;
}

.btn-nav:hover {
    background: linear-gradient(135deg, #fff9c4 0%, #ffffff 100%);
    box-shadow: 0 8px 25px rgba(255, 235, 59, 0.4);
    transform: translateY(-50%) scale(1.1);
}

.btn-prev { left: -20px; }
.btn-next { right: -20px; }

/* --- 5. SEÇÕES DE COMPRA E BOTÕES 3D --- */
.compra, .compra-infantil, .compra-manga {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    padding: 80px 20px;
    margin-top: 40px;
}

/* Botão Estilo Infantil/Geral */
.btn-infantil {
    display: inline-block;
    padding: 20px 50px;
    background: linear-gradient(135deg, #ff6b6b 0%, #ee5253 100%);
    color: #ffffff !important;
    text-decoration: none;
    font-weight: 800;
    border-radius: 100px;
    box-shadow: 0 10px 0px #c0392b;
    transition: all 0.2s ease;
    animation: pulsar 2s infinite;
}

/* Botão Estilo Biografia/Autoajuda */
.btn-manga-style, .btn-autoajuda {
    display: inline-block;
    padding: 18px 45px;
    background: #1a2a3a;
    color: #d4af37 !important;
    text-decoration: none;
    font-weight: 800;
    border: 2px solid #d4af37;
    border-radius: 10px;
    box-shadow: 0 8px 0px #0d151d;
    transition: all 0.2s ease;
}

.btn-infantil:hover, .btn-manga-style:hover {
    transform: translateY(3px);
    box-shadow: 0 5px 0px rgba(0,0,0,0.2);
}

@keyframes pulsar {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.05); }
}

/* --- 6. ADAPTAÇÃO PARA CELULAR (RESPONSIVO) --- */
@media (max-width: 768px) {
    .header-container { padding: 40px 5%; justify-content: center; }
    
    #galeria img { height: 280px; }
    
    .btn-nav { width: 45px; height: 45px; }
    .btn-prev { left: 5px; } /* Botões para dentro da tela no mobile */
    .btn-next { right: 5px; }
    
    .header-container h2.imagem-rotativa { min-width: 100%; }
}