/* BASE DE ESTILOS - DEFINIÇÕES GERAIS E CORES */
:root {
    --bg-color: #1a1114;
    --primary-color: #e11d48; /* Um carmim vibrante */
    --secondary-color: #9f1239; /* Um borgonha profundo */
    --accent-color: #f4a261; /* Detalhe em ouro rosé/cobre */
    --text-color: #f3eade; /* Um branco envelhecido, mais quente */
    --card-bg: #2a2124;
    --border-glow: 0 0 8px var(--primary-color), 0 0 16px var(--primary-color);
    --font-main: 'Lato', sans-serif;
    --font-title: 'Cormorant Garamond', serif;
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
    background-color: var(--bg-color);
    color: var(--text-color);
    font-family: var(--font-main);
    overflow-x: hidden;
    min-height: 100vh;
}

/* FUNDO ANIMADO */
.liquid-background {
    position: fixed; top: 0; left: 0; width: 100%; height: 100%; z-index: -1;
    background: linear-gradient(45deg, var(--bg-color), #4a044e, var(--secondary-color), var(--bg-color));
    background-size: 400% 400%; animation: gradient-flow 25s ease infinite; opacity: 0.4;
}
@keyframes gradient-flow { 0% { background-position: 0% 50%; } 50% { background-position: 100% 50%; } 100% { background-position: 0% 50%; } }

/* HEADER E NAVEGAÇÃO */
.navbar {
    display: flex; justify-content: space-between; align-items: center; padding: 1.5rem 5%;
    position: fixed; width: 100%; top: 0; left: 0;
    background: rgba(26, 17, 20, 0.7); backdrop-filter: blur(10px); z-index: 1000;
}
.logo { font-family: var(--font-title); font-size: 2.2rem; font-weight: 700; color: var(--text-color); text-decoration: none; }
.nav-links { list-style: none; display: flex; gap: 1.5rem; align-items: center; }
.nav-links a { color: var(--text-color); text-decoration: none; font-size: 1rem; position: relative; transition: color 0.3s; padding: 5px 0; }
.nav-links a::after {
    content: ''; position: absolute; width: 0; height: 1px; bottom: 0; left: 0;
    background-color: var(--primary-color); transition: width 0.4s ease;
}
.nav-links a:hover { color: var(--primary-color); }
.nav-links a:hover::after { width: 100%; }
.nav-icons { display: flex; align-items: center; gap: 1.5rem; }

/* SEÇÃO HERO (INICIAL) */
.hero { height: 100vh; display: flex; align-items: center; justify-content: center; text-align: center; padding: 0 5%; }
.hero-content { max-width: 800px; animation: fadeIn 1.5s ease-out; }
.hero-content h1 { font-family: var(--font-title); font-size: 4.5rem; font-weight: 700; margin-bottom: 1rem; line-height: 1.1; }
.hero-content p { font-size: 1.3rem; font-weight: 300; margin-bottom: 2.5rem; }

/* BOTÃO PRINCIPAL (CTA) */
.cta-button {
    background: var(--primary-color); border: 2px solid var(--primary-color); color: #fff; padding: 1rem 2.5rem;
    text-decoration: none; font-weight: 700; font-size: 1rem; letter-spacing: 1px; border-radius: 5px; transition: all 0.3s ease; cursor: pointer;
}
.cta-button:hover { background: var(--secondary-color); border-color: var(--secondary-color); transform: translateY(-5px); box-shadow: 0 5px 15px rgba(0,0,0,0.3); }

/* ESTILO DAS SEÇÕES */
.section { padding: 6rem 5%; text-align: center; }
h2 { font-family: var(--font-title); font-size: 3.5rem; margin-bottom: 4rem; font-weight: 700; }

/* SEÇÃO DE CARDS DE CATEGORIA */
.category-grid-section { background-color: rgba(0,0,0,0.2); }
.category-cards-container { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 1.5rem; max-width: 1200px; margin: 0 auto; }
.category-card {
    border-radius: 10px; padding: 1rem 1.5rem; text-decoration: none; color: var(--text-color); display: flex; justify-content: space-between; align-items: center;
    box-shadow: 0 5px 15px rgba(0,0,0,0.3); transition: transform 0.3s ease, box-shadow 0.3s ease; overflow: hidden; position: relative; min-height: 120px;
}
.category-card:hover { transform: translateY(-10px); box-shadow: 0 15px 30px rgba(0,0,0,0.5); }
.category-card .card-text { z-index: 2; text-align: left;}
.category-card h3 { font-family: var(--font-title); font-size: 1.8rem; line-height: 1.2; font-weight: 700; }
.category-card img { height: 100px; width: auto; z-index: 1; opacity: 0.9; transition: transform 0.3s ease; position: absolute; right: 10px; bottom: -10px;}
.category-card:hover img { transform: scale(1.1) rotate(5deg); }

/* SEÇÕES DE PRODUTOS DAS CATEGORIAS */
.category-description { max-width: 800px; margin: -2rem auto 4rem auto; font-size: 1.1rem; line-height: 1.7; font-weight: 300; }
.products-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 3rem; }
.product-card { background-color: transparent; border: none; perspective: 1500px; min-height: 450px; }
.card-inner { position: relative; width: 100%; height: 100%; transition: transform 0.8s; transform-style: preserve-3d; border-radius: 10px; box-shadow: 0 10px 30px rgba(0,0,0,0.5); }
.product-card:hover .card-inner { transform: rotateY(180deg); }
.card-front, .card-back { position: absolute; width: 100%; height: 100%; -webkit-backface-visibility: hidden; backface-visibility: hidden; border-radius: 10px; overflow: hidden; }
.card-front { background: var(--bg-color); }
.card-back {
    background: var(--card-bg); color: var(--text-color); transform: rotateY(180deg); padding: 2rem;
    display: flex; flex-direction: column; justify-content: center; align-items: center; border: 1px solid rgba(244, 162, 97, 0.2);
}
.product-card img { width: 100%; height: 100%; object-fit: cover; }
.card-back h3 { font-family: var(--font-title); font-size: 2rem; color: var(--text-color); margin-bottom: 1.5rem; }
.card-back p { font-size: 1rem; line-height: 1.6; }
.price { font-size: 1.8rem; font-weight: 700; color: var(--accent-color); margin: 1.5rem 0; font-family: var(--font-title); }
.buy-button { background: var(--primary-color); color: #fff; border: none; padding: 0.8rem 1.8rem; border-radius: 5px; cursor: pointer; font-family: var(--font-main); font-weight: 700; transition: all 0.3s; }
.buy-button:hover { background: var(--secondary-color); transform: scale(1.05); }

/* SEÇÃO QUEM SOMOS */
.about-content { display: grid; grid-template-columns: 1fr 1.5fr; gap: 3rem; align-items: center; max-width: 1200px; margin: 0 auto; }
.about-content img { width: 100%; border-radius: 10px; box-shadow: 0 10px 30px rgba(0,0,0,0.5); }
.about-text p { font-size: 1.1rem; line-height: 1.8; margin-bottom: 1.5rem; }

/* ÍCONE E PAINEL DO CARRINHO */
#cart-icon { position: relative; cursor: pointer; font-size: 1.8rem; }
#cart-count {
    position: absolute; top: -5px; right: -10px; background-color: var(--primary-color); color: white; border-radius: 50%;
    padding: 2px 6px; font-size: 0.8rem; font-weight: bold; border: 1px solid var(--bg-color);
}
#cart-sidebar {
    position: fixed; top: 0; right: 0; width: 90%; max-width: 450px; height: 100%; background: var(--bg-color);
    z-index: 1002; box-shadow: -10px 0 30px rgba(0,0,0,0.5); display: flex; flex-direction: column;
    transition: transform 0.4s cubic-bezier(0.23, 1, 0.32, 1);
    transform: translateX(100%);
}
#cart-overlay {
    position: fixed; top: 0; left: 0; width: 100%; height: 100%; background: rgba(0,0,0,0.6);
    z-index: 1001; opacity: 0; pointer-events: none; transition: opacity 0.4s ease;
}
#cart-sidebar.open { transform: translateX(0); }
#cart-overlay.open { opacity: 1; pointer-events: auto; }
.cart-header { display: flex; justify-content: space-between; align-items: center; padding: 1rem 1.5rem; border-bottom: 1px solid var(--card-bg); }
.cart-header h3 { font-family: var(--font-title); font-size: 1.8rem; }
#close-cart { background: none; border: none; color: var(--text-color); font-size: 2rem; cursor: pointer; }
#cart-items { flex-grow: 1; overflow-y: auto; padding: 1rem; }
.cart-item { display: flex; gap: 1rem; margin-bottom: 1.5rem; align-items: center; }
.cart-item img { width: 80px; height: 80px; object-fit: cover; border-radius: 5px; }
.cart-item-details { flex-grow: 1; }
.cart-item-details h4 { font-size: 1.1rem; margin-bottom: 0.5rem; }
.cart-item-price { color: var(--accent-color); font-weight: bold; }
.quantity-controls { display: flex; align-items: center; gap: 0.5rem; margin-top: 0.5rem; }
.quantity-controls button { background: var(--card-bg); border: none; color: var(--text-color); width: 25px; height: 25px; border-radius: 50%; cursor: pointer; font-size: 1rem; }
.remove-item { background: none !important; color: var(--primary-color) !important; font-size: 1.2rem !important; }
.cart-footer { padding: 1.5rem; border-top: 1px solid var(--card-bg); }
.cart-total { display: flex; justify-content: space-between; font-size: 1.5rem; font-family: var(--font-title); margin-bottom: 1.5rem; }
.cart-footer .cta-button { width: 100%; text-align: center; }

/* OUTRAS SEÇÕES */
.blog-section, .contact-section { background-color: rgba(0,0,0,0.2); }
.blog-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); gap: 2.5rem; text-align: left; }
.blog-card { background: var(--card-bg); border-radius: 10px; overflow: hidden; box-shadow: 0 10px 30px rgba(0,0,0,0.5); border: 1px solid rgba(244, 162, 97, 0.1); }
.blog-card:hover { transform: translateY(-10px); box-shadow: 0 15px 35px rgba(0,0,0,0.7); }
.blog-card img { width: 100%; height: 200px; object-fit: cover; }
.blog-content { padding: 1.5rem; }
.blog-content h3 { font-family: var(--font-title); font-size: 1.5rem; margin-bottom: 0.75rem; }
.blog-content p { font-size: 0.95rem; line-height: 1.6; margin-bottom: 1.5rem; color: var(--text-color); opacity: 0.8; }
.blog-content a { color: var(--accent-color); text-decoration: none; font-weight: bold; transition: color 0.3s; }
.contact-form { max-width: 600px; margin: 0 auto; display: flex; flex-direction: column; gap: 1.5rem; }
.contact-form input, .contact-form textarea { background: var(--card-bg); border: 1px solid var(--secondary-color); padding: 1rem; border-radius: 5px; color: var(--text-color); font-size: 1rem; font-family: var(--font-main); }

/* AJUSTE DE ESTÉTICA: Espaçamento no formulário de contato */
.contact-section p[data-key="contactSubtitle"] {
    margin-bottom: 3rem;
}

/* SELETOR DE IDIOMAS E SOMMELIER IA */
.language-switcher { display: flex; gap: 0.75rem; align-items: center; }
.language-switcher img { width: 20px; height: auto; border-radius: 3px; cursor: pointer; transition: transform 0.2s ease, opacity 0.2s; opacity: 0.6; }
.language-switcher img:hover { transform: scale(1.2); opacity: 1; }
.language-switcher img.active-lang { opacity: 1; box-shadow: 0 0 5px var(--accent-color); }
#ai-sommelier-fab { position: fixed; bottom: 2rem; right: 2rem; width: 60px; height: 60px; background-color: var(--primary-color); border-radius: 50%; display: flex; justify-content: center; align-items: center; font-size: 2rem; cursor: pointer; box-shadow: 0 5px 15px rgba(0,0,0,0.4); z-index: 1001; transition: transform 0.3s ease; }
#ai-sommelier-fab:hover { transform: scale(1.1) rotate(15deg); }
#ai-sommelier-chat { position: fixed; bottom: 6rem; right: 2rem; width: 90%; max-width: 400px; height: 60vh; max-height: 500px; background: var(--card-bg); border: 1px solid rgba(244, 162, 97, 0.2); border-radius: 15px; box-shadow: 0 10px 40px rgba(0,0,0,0.6); z-index: 1000; display: flex; flex-direction: column; overflow: hidden; transform-origin: bottom right; transition: transform 0.3s ease, opacity 0.3s ease; }
#ai-sommelier-chat.hidden { transform: scale(0); opacity: 0; pointer-events: none; }
.chat-header { display: flex; justify-content: space-between; align-items: center; padding: 0.75rem 1rem; background: rgba(0,0,0,0.3); }
.chat-header h3 { font-family: var(--font-title); font-size: 1.2rem; margin: 0; }
.chat-header #close-chat-ai { background: none; border: none; color: var(--text-color); font-size: 1.5rem; cursor: pointer; }
.chat-messages { flex-grow: 1; padding: 1rem; overflow-y: auto; display: flex; flex-direction: column; gap: 0.75rem; }
.chat-message { padding: 0.75rem 1rem; border-radius: 10px; max-width: 80%; line-height: 1.5; }
.chat-message.user { background: var(--primary-color); color: #fff; align-self: flex-end; }
.chat-message.ai { background: #3a3134; color: var(--text-color); align-self: flex-start; }
.chat-input-form { display: flex; border-top: 1px solid rgba(244, 162, 97, 0.2); }
.chat-input-form input { flex-grow: 1; background: transparent; border: none; padding: 1rem; color: var(--text-color); font-size: 1rem; }
.chat-input-form button { background: transparent; border: none; color: var(--accent-color); font-size: 1.5rem; padding: 0 1.5rem; cursor: pointer; }

/* NOVO: Estilos para o Modal de Checkout */
#checkout-modal-overlay {
    position: fixed; top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(0,0,0,0.7); backdrop-filter: blur(5px);
    z-index: 1003; opacity: 0; pointer-events: none; transition: opacity 0.3s ease;
}
#checkout-modal {
    position: fixed; top: 50%; left: 50%;
    transform: translate(-50%, -50%) scale(0.9);
    width: 90%; max-width: 500px;
    background: var(--card-bg); border-radius: 15px;
    box-shadow: 0 10px 40px rgba(0,0,0,0.5);
    z-index: 1004; opacity: 0; pointer-events: none;
    transition: opacity 0.3s ease, transform 0.3s ease;
}
#checkout-modal-overlay.open, #checkout-modal.open {
    opacity: 1;
    pointer-events: auto;
}
#checkout-modal.open {
    transform: translate(-50%, -50%) scale(1);
}
.modal-header {
    display: flex; justify-content: space-between; align-items: center;
    padding: 1rem 1.5rem; border-bottom: 1px solid var(--secondary-color);
}
.modal-header h3 { font-size: 1.5rem; margin: 0; }
.modal-header #close-modal { background: none; border: none; color: var(--text-color); font-size: 1.8rem; cursor: pointer; }
#checkout-form { padding: 1.5rem; display: flex; flex-direction: column; gap: 1rem; }
#checkout-form p { font-size: 0.9rem; opacity: 0.8; text-align: left; line-height: 1.6; margin-bottom: 0.5rem;}
#checkout-form input, #checkout-form textarea {
    background: var(--bg-color); border: 1px solid var(--secondary-color); padding: 0.8rem;
    border-radius: 5px; color: var(--text-color); font-size: 1rem; font-family: var(--font-main);
}
#checkout-form .cta-button { margin-top: 1rem; }

/* ANIMAÇÕES GERAIS E RESPONSIVIDADE */
.hidden { opacity: 0; transform: translateY(30px); }
.show { opacity: 1; transform: translateY(0); }
.blog-card, .product-card { transition: opacity 0.8s ease-out, transform 0.8s ease-out; }
footer { padding: 3rem 5%; text-align: center; background: #000; font-size: 0.9rem; }
@media (max-width: 900px) { .nav-links { display: none; } .about-content { grid-template-columns: 1fr; } }
@media (max-width: 768px) { .hero-content h1 { font-size: 3rem; } h2 { font-size: 2.8rem; } }

/* --- AGE GATE (POPUP +18) --- */
.age-gate-overlay {
    position: fixed; top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(15, 10, 12, 0.95); /* Fundo bem escuro */
    backdrop-filter: blur(15px); /* Desfoque pesado */
    z-index: 9999;
    display: flex; justify-content: center; align-items: center;
    opacity: 0; pointer-events: none; transition: opacity 0.5s ease;
}

.age-gate-overlay.active { opacity: 1; pointer-events: auto; }

.age-gate-content {
    background: rgba(42, 33, 36, 0.8);
    border: 1px solid var(--primary-color);
    box-shadow: 0 0 30px rgba(225, 29, 72, 0.2);
    padding: 3rem; text-align: center; border-radius: 15px;
    max-width: 500px; width: 90%; transform: scale(0.9); transition: transform 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.age-gate-overlay.active .age-gate-content { transform: scale(1); }

.age-icon { font-size: 3rem; margin-bottom: 1rem; animation: float 3s ease-in-out infinite; }
.age-gate-content h2 { font-family: var(--font-title); font-size: 2.5rem; margin-bottom: 1rem; color: var(--text-color); }
.age-gate-content p { font-size: 1.1rem; margin-bottom: 1.5rem; line-height: 1.6; color: #ccc; }

.age-buttons { display: flex; gap: 1rem; justify-content: center; flex-wrap: wrap; }
.age-btn-secondary {
    background: transparent; border: 1px solid #666; color: #ccc;
    padding: 1rem 2rem; border-radius: 5px; cursor: pointer; font-size: 1rem; transition: 0.3s;
}
.age-btn-secondary:hover { border-color: var(--text-color); color: var(--text-color); }

@keyframes float { 0% { transform: translateY(0px); } 50% { transform: translateY(-10px); } 100% { transform: translateY(0px); } }