/* assets/css/gallery.css */
@import url('https://fonts.googleapis.com/css2?family=Playfair+Display:ital,wght@0,400;0,700;1,400&family=Quicksand:wght@300;400;500;600&display=swap');

/* CSS Variables replaced with static values for IE compatibility */

* { margin: 0; padding: 0; box-sizing: border-box; }

body {
    font-family: 'Quicksand', sans-serif;
    background-color: #FFFFFF;
    color: #1A1A1A;
    overflow-x: hidden;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* --- Header & Hero --- */
.header-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 0;
}

.logo { text-align: center; }
.logo p { font-family: 'Playfair Display', serif; font-size: 1.2rem; margin-top: 5px; }

.gallery-hero {
    text-align: center;
    padding: 60px 0 40px;
}

.gallery-hero h1 {
    font-family: 'Playfair Display', serif;
    font-size: 3rem;
    margin-bottom: 10px;
}

.gallery-hero span { color: #d8a7b1; }

/* --- Controles (Busca e Filtros) --- */
.gallery-controls {
    padding: 20px 0 40px;
}

.search-container {
    position: relative;
    max-width: 500px;
    margin: 0 auto 30px;
}

.search-container input {
    width: 100%;
    padding: 12px 20px;
    padding-right: 40px;
    border: 2px solid #ddd;
    border-radius: 30px;
    font-family: 'Quicksand', sans-serif;
    font-size: 1rem;
    transition: 0.3s;
}

.search-container input:focus {
    border-color: #d8a7b1;
    outline: none;
}

.search-container i {
    position: absolute;
    right: 15px;
    top: 50%;
    transform: translateY(-50%);
    color: #aaa;
}

.filter-container {
    display: flex;
    justify-content: center;
    gap: 10px;
    flex-wrap: wrap;
}

.filter-btn {
    padding: 8px 20px;
    border: 1px solid #d8a7b1;
    background: transparent;
    color: #d8a7b1;
    border-radius: 20px;
    cursor: pointer;
    font-family: 'Quicksand', sans-serif;
    font-weight: 600;
    transition: all 0.3s ease;
}

.filter-btn:hover, .filter-btn.active {
    background: #d8a7b1;
    color: #fff;
}

/* --- Hero --- */
.gallery-hero {
    padding: 80px 0;
    text-align: center;
    background: #fafafa;
}

.gallery-hero h1 { font-family: 'Playfair Display', serif; font-size: 3rem; margin-bottom: 10px; }
.gallery-hero h1 span { font-style: italic; color: #666; }

/* --- CORREÇÃO PARA GALERIA (Renderização Completa) --- */

/* 1. Garantir que a seção não tenha altura fixa e permita scroll */
.gallery-section {
    padding: 60px 0; /* Padding vertical generoso */
    min-height: auto; /* Remove restrições de altura mínima fixa */
    overflow: visible; /* Garante que nada seja cortado */
    width: 100%;
}

/* 2. Forçar o Grid a se expandir corretamente - Replaced Grid with Flexbox for IE compatibility */
.gallery-grid {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-around;
    gap: 30px;

    /* O Grid deve crescer conforme o conteúdo */
    width: 100%;
    min-height: 0; /* Importante para Grids aninhados */
    perspective: 1000px; /* Essencial para o efeito 3D */
}

/* 3. Certificar que o Container Pai não está escondendo o overflow */
#gallery-grid {
    /* Reset de segurança */
    overflow: visible !important;
    display: flex !important;
    flex-wrap: wrap !important;
    justify-content: space-around !important;
}

/* 4. Ajuste Responsivo removed for IE compatibility - using flexbox instead */

/* Container do Card */
.gallery-card {
    background-color: transparent;
    height: 400px; /* Altura fixa para consistência */
    cursor: pointer;
}

/* O "Inner" que faz o giro */
.card-inner {
    position: relative;
    width: 100%;
    height: 100%;
    text-align: center;
    transition: transform 0.8s cubic-bezier(0.175, 0.885, 0.32, 1.275); /* Efeito elástico */
    -ms-transform-style: preserve-3d; /* IE support */
    transform-style: preserve-3d;
    box-shadow: 0 10px 30px rgba(0,0,0,0.05);
}

/* Classe que o JS adiciona ao clicar */
.gallery-card.flipped .card-inner {
    transform: rotateY(180deg);
}

/* Frente e Verso */
.card-front, .card-back {
    position: absolute;
    width: 100%;
    height: 100%;
    -webkit-backface-visibility: hidden; /* Esconde o lado oposto */
    -ms-backface-visibility: hidden; /* IE support */
    backface-visibility: hidden;
    border-radius: 4px;
    overflow: hidden;
}

/* --- Estilo da Frente --- */
.card-front {
    background-color: #FFFFFF;
}

.card-front img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    filter: grayscale(100%);
    transition: filter 0.5s ease;
}

/* Ao passar o mouse (antes de virar), mostra um pouco de cor */
.gallery-card:hover .card-front img {
    filter: grayscale(0%);
}

.card-overlay-front {
    position: absolute; bottom: 0; left: 0; width: 100%;
    padding: 20px;
    background: linear-gradient(to top, rgba(0,0,0,0.7), transparent);
    color: white;
    text-align: left;
}

.card-overlay-front h3 { font-family: 'Playfair Display', serif; color: white; font-size: 1.2rem; }
.card-hint { font-size: 0.7rem; text-transform: uppercase; letter-spacing: 1px; margin-top: 5px; opacity: 0.8; }

/* --- Estilo do Verso (Black Luxury) --- */
.card-back {
    background-color: #111111;
    color: #FFFFFF;
    transform: rotateY(180deg);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 30px;
    text-align: center;
}

.card-back h3 { font-family: 'Playfair Display', serif; color: white; margin-bottom: 10px; font-size: 1.5rem; }
.card-back p { font-size: 0.9rem; line-height: 1.6; margin-bottom: 20px; opacity: 0.8; }
.card-price { font-size: 1.3rem; font-weight: 600; margin-bottom: 25px; display: block; }

/* Category tag for desktop */
.card-back .category-tag {
    display: inline-block;
    background: #d8a7b1;
    color: white;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 0.8rem;
    margin-bottom: 15px;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.card-back .price-tag {
    font-size: 1.3rem;
    font-weight: 600;
    color: #d8a7b1;
    margin-bottom: 20px;
    display: block;
}

/* Botão para Zoom no verso */
.btn-zoom {
    background: transparent;
    border: 1px solid rgba(255,255,255,0.3);
    color: white;
    padding: 10px 20px;
    border-radius: 30px;
    cursor: pointer;
    transition: 0.3s;
    font-family: 'Quicksand', sans-serif;
    text-transform: uppercase;
    font-size: 0.8rem;
    letter-spacing: 1px;
}

.btn-zoom:hover {
    background: white;
    color: black;
}

.btn-back {
    margin-top: 20px;
    background: none;
    border: none;
    color: #666;
    font-size: 0.8rem;
    cursor: pointer;
    text-decoration: underline;
}

/* --- Lightbox (Modal de Zoom) --- */
.lightbox {
    display: none;
    position: fixed;
    z-index: 2000;
    padding-top: 60px;
    left: 0; top: 0;
    width: 100%; height: 100%;
    overflow: auto;
    background-color: rgba(0,0,0,0.95);
    /* backdrop-filter removed for IE compatibility */
}

.lightbox-content {
    position: relative;
    background-color: #fefefe;
    margin: auto;
    padding: 0;
    width: 90%;
    max-width: 1000px;
    display: flex;
    flex-wrap: wrap;
    box-shadow: 0 0 50px rgba(0,0,0,0.5);
    border-radius: 4px;
    overflow: hidden;
    animation: zoomIn 0.3s ease;
}

@keyframes zoomIn {
    from { transform: scale(0.9); opacity: 0; }
    to { transform: scale(1); opacity: 1; }
}

.lightbox-img {
    width: 60%;
    height: auto;
    object-fit: cover;
    filter: grayscale(100%); /* Mantém o estilo B&W */
}

.lightbox-details {
    width: 40%;
    padding: 40px;
    background-color: white;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.lightbox-details h2 { font-family: 'Playfair Display', serif; margin-bottom: 15px; }
.lightbox-price { font-size: 1.5rem; color: #000; margin-bottom: 20px; display: block; }
.btn-primary { display: inline-block; padding: 12px 25px; background: #000; color: white; border: none; cursor: pointer; }

.close-lightbox {
    position: absolute;
    top: 15px;
    right: 35px;
    color: #f1f1f1;
    font-size: 40px;
    font-weight: bold;
    transition: 0.3s;
    cursor: pointer;
    z-index: 3000;
}
.close-lightbox:hover { color: #000; }

/* Mobile Gallery Experience */
@media (max-width: 768px) {
    .lightbox-content { flex-direction: column; width: 95%; margin: 5% auto; }
    .lightbox-img, .lightbox-details { width: 100%; }
    .lightbox-img { height: 300px; }

    /* Mobile card styles */
    .mobile-card {
        position: relative;
        height: auto;
        min-height: 400px;
        cursor: pointer;
    }

    .card-details-mobile {
        padding: 20px;
        background: rgba(255, 255, 255, 0.95);
        /* backdrop-filter removed for IE compatibility */
        border-radius: 0 0 8px 8px;
        max-height: 0;
        overflow: hidden;
        transition: max-height 0.4s ease, padding 0.4s ease;
    }

    .gallery-card.expanded .card-details-mobile {
        max-height: 500px;
        padding: 20px;
    }

    .card-details-mobile .category-tag {
        display: inline-block;
        background: #d8a7b1;
        color: white;
        padding: 4px 12px;
        border-radius: 20px;
        font-size: 0.8rem;
        margin-bottom: 10px;
    }

    .card-details-mobile h3 {
        font-family: 'Playfair Display', serif;
        font-size: 1.4rem;
        margin-bottom: 8px;
        color: #4a4a4a;
    }

    .card-details-mobile .price-tag {
        font-size: 1.2rem;
        font-weight: 600;
        color: #d8a7b1;
        margin-bottom: 12px;
    }

    .card-details-mobile p {
        font-size: 0.9rem;
        line-height: 1.5;
        color: #4a4a4a;
        margin-bottom: 15px;
    }

    .card-details-mobile .btn-zoom {
        width: 100%;
        padding: 12px;
        background: #d8a7b1;
        color: white;
        border: none;
        border-radius: 8px;
        font-family: 'Quicksand', sans-serif;
        font-weight: 500;
        cursor: pointer;
        transition: background 0.3s ease;
    }

    .card-details-mobile .btn-zoom:hover {
        background: #f5e6e8;
    }

    /* Update card hint for mobile */
    .card-hint {
        font-size: 0.8rem;
        opacity: 0.8;
    }

    .card-hint i {
        margin-right: 5px;
    }
}
/* --- Footer Simples --- */

/* --- Footer --- */
footer {
    background-color: #0a0a0a; /* Quase preto */
    color: #fff;
    padding: 80px 0 40px;
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 60px;
    margin-bottom: 60px;
}

.footer-logo h3 {
    color: #fff;
    font-family: 'Playfair Display', serif;
    font-size: 2rem;
    margin-bottom: 20px;
}

.footer-logo p {
    color: #999;
    font-size: 0.95rem;
}

.footer-links h4, .footer-social h4 {
    color: #fff;
    font-family: 'Quicksand', sans-serif;
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 2px;
    margin-bottom: 25px;
}

.footer-links ul li {
    margin-bottom: 12px;
}

.footer-links ul li a {
    color: #999;
    font-size: 0.95rem;
}

.footer-links ul li a:hover {
    color: #fff;
    padding-left: 5px; /* Micro-interação */
}

.social-icons {
    display: flex;
    gap: 20px;
}

.social-icons a {
    width: 45px;
    height: 45px;
    border: 1px solid #333;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%; /* Círculos só nos ícones para contraste */
    color: #fff;
}

.social-icons a:hover {
    background-color: #fff;
    color: #000;
    transform: rotate(360deg); /* Animação divertida no hover */
}

.footer-bottom {
    border-top: 1px solid #222;
    padding-top: 30px;
    text-align: center;
    color: #666;
    font-size: 0.85rem;
}