/* ============================================================
   1. VARIÁVEIS E CONFIGURAÇÕES GLOBAIS
   ============================================================ */
:root {
    --oliva-deep: #4A5D23;
    --oliva-primary: #708238;
    --oliva-soft: #A3AD85;
    --oliva-bg: #F8F9F5;
    --apple-gray: #86868b;
    --apple-black: #1d1d1f;
    --glass-bg: rgba(255, 255, 255, 0.85);
}

* { 
    margin: 0; 
    padding: 0; 
    box-sizing: border-box; 
    font-family: 'Inter', -apple-system, sans-serif; 
}

.hidden { display: none !important; }

body { 
    background: #fff; 
    color: var(--apple-black); 
    overflow-x: hidden; 
    -webkit-font-smoothing: antialiased;
}

/* ============================================================
   2. NAVEGAÇÃO REFINADA (FIXA)
   ============================================================ */
.main-nav {
    position: fixed; 
    top: 0; 
    width: 100%; 
    height: 60px; /* Altura ideal para respiro visual */
    background: var(--glass-bg); 
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    z-index: 9999; 
    border-bottom: 1px solid rgba(0,0,0,0.05);
    display: flex;
    align-items: center;
}

.nav-content {
    max-width: 980px; 
    margin: 0 auto; 
    width: 100%;
    display: flex; 
    justify-content: space-between; 
    align-items: center; 
    padding: 0 20px;
}

.nav-logo { 
    font-weight: 600; 
    font-size: 18px;
    color: var(--oliva-deep); 
    text-decoration: none; 
    letter-spacing: -0.02em;
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 20px; /* Espaçamento entre os links */
}

/* Estilização do botão "Início" */
.nav-links a { 
    text-decoration: none; 
    color: var(--apple-black); 
    font-size: 14px; 
    font-weight: 500;
    transition: color 0.3s ease;
}

.nav-links a:hover {
    color: var(--oliva-primary);
}

/* Botão "Confirmação" (Destaque CTA) */
.nav-cta { 
    background: var(--oliva-deep) !important; 
    color: #fff !important; 
    padding: 8px 16px; 
    border-radius: 18px; 
    font-weight: 600;
    font-size: 13px;
    transition: opacity 0.2s ease, transform 0.2s ease !important;
}

.nav-cta:hover {
    opacity: 0.9;
    transform: scale(1.02);
}

/* ============================================================
   3. HERO / HEADER SECTION
   ============================================================ */
.presentes-hero { 
    padding: 120px 24px 60px; 
    text-align: center; 
    background: var(--oliva-bg); 
    display: flex;
    flex-direction: column;
    align-items: center;
}

.hero-container {
    max-width: 800px;
    animation: fadeIn 1s ease-out;
}

.presentes-hero h1 { 
    font-family: 'Playfair Display', serif;
    font-style: italic;
    font-size: clamp(32px, 8vw, 52px); 
    color: var(--oliva-deep); 
    margin-bottom: 15px;
    line-height: 1.1;
}

.presentes-hero p {
    font-size: clamp(15px, 4vw, 17px);
    color: var(--apple-gray);
    max-width: 500px;
    line-height: 1.5;
}

/* ============================================================
   4. GRID E CARDS (UNIFORMIDADE STAND)
   ============================================================ */
.presentes-grid { 
    display: grid; 
    grid-template-columns: repeat(2, 1fr); 
    gap: 12px; 
    padding: 20px 12px; 
    max-width: 1100px; 
    margin: 0 auto;
}

.card { 
    background: #fff; 
    border-radius: 16px; 
    border: 1px solid #f0f0f0; 
    overflow: hidden; 
    display: flex; 
    flex-direction: column;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.presente-img {
    width: 100%;
    aspect-ratio: 1 / 1; 
    background-color: #f9f9f9;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 12px;
}

.presente-img img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain; 
}

.card-info { 
    padding: 12px; 
    text-align: center; 
    flex-grow: 1; 
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.card-info h3 { 
    font-size: 13px; 
    line-height: 1.3em;
    height: 2.6em; 
    margin: 5px 0; 
    color: var(--apple-black);
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
}

.preco { 
    font-size: 14px; 
    font-weight: 600; 
    color: var(--oliva-deep); 
    margin-bottom: 10px;
    display: block;
}

.cta-button { 
    width: 100%;
    background: var(--oliva-deep); 
    color: #fff; 
    border: none; 
    padding: 10px; 
    border-radius: 10px; 
    cursor: pointer; 
    font-size: 12px;
    font-weight: 600;
}

/* ============================================================
   5. AJUSTES PARA DESKTOP
   ============================================================ */
@media (min-width: 768px) {
    .presentes-hero { padding: 140px 20px 80px; }
    
    .presentes-grid { 
        grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); 
        gap: 30px;
        padding: 40px 20px;
    }

    .card { max-width: 240px; }

    .card:hover {
        transform: translateY(-5px);
        box-shadow: 0 10px 25px rgba(0,0,0,0.05);
    }

    .card-info { padding: 20px; }
    .card-info h3 { font-size: 16px; height: 3.2em; }
    .preco { font-size: 18px; }
}

/* ============================================================
   6. MODAL E ANIMAÇÕES
   ============================================================ */
.modal-overlay { 
    position: fixed; 
    top: 0; left: 0; width: 100%; height: 100%; 
    background: rgba(0,0,0,0.4); 
    backdrop-filter: blur(12px); 
    display: flex; 
    align-items: center; 
    justify-content: center; 
    z-index: 10001;
}

.modal-content { 
    background: #fff; 
    padding: 30px; 
    border-radius: 28px; 
    max-width: 380px; 
    width: 90%; 
    position: relative; 
    text-align: center;
    box-shadow: 0 20px 40px rgba(0,0,0,0.15);
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(-10px); }
    to { opacity: 1; transform: translateY(0); }
}

/* ============================================================
   EFEITO VISUAL PARA ITENS VENDIDOS (OLIVA NOIR)
   ============================================================ */

/* 1. Prepara o container da imagem para receber o filtro */
.card.vendido .presente-img {
    position: relative;
    z-index: 1;
}

/* 2. Cria uma camada de cor Oliva Deep sobre a imagem */
.card.vendido .presente-img::after {
    content: '';
    position: absolute;
    top: 0; 
    left: 0; 
    width: 100%; 
    height: 100%;
    
    /* A mágica acontece aqui: usamos a cor da sua paleta */
    background-color: var(--oliva-deep);
    
    /* 'color' ou 'multiply' mescla a cor oliva com os tons de cinza da imagem */
    mix-blend-mode: color; 
    
    opacity: 0.8; /* Ajuste a intensidade do tingimento (0.1 a 1.0) */
    pointer-events: none; /* Garante que o clique passe através dessa camada */
    z-index: 2;
}

/* 3. Transforma a imagem original em preto e branco e aumenta o contraste */
.card.vendido .presente-img img {
    /* Grayscale 100% tira a cor original.
       Contrast 1.2 deixa os pretos mais intensos para o efeito oliva pegar melhor. */
    filter: grayscale(100%) contrast(1.2);
    opacity: 0.9; /* Um leve desbotamento para parecer item "arquivado" */
}

/* Opcional: Se quiser que o preço também fique cinza quando vendido */
.card.vendido .preco {
    color: var(--apple-gray);
    text-decoration: line-through; /* Um risco sutil sobre o preço */
    opacity: 0.7;
}