/**
 * Padaria Baguett - Estilos Principais
 * Desenvolvido por Acopli
 * Cores: #7e1f1f, #f3c761, #20307c, #fefefe
 */

:root {
    --cor-primaria: #7e1f1f;
    --cor-secundaria: #f3c761;
    --cor-terciaria: #20307c;
    --cor-branca: #fefefe;
    --cor-escura: #1a1a1a;
    --cor-cinza: #6c757d;
    --cor-cinza-claro: #f8f9fa;
}

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

body {
    font-family: 'Poppins', sans-serif;
    color: var(--cor-escura);
    overflow-x: hidden;
    background: var(--cor-branca);
}

/* ===== NAVBAR ===== */
.navbar {
    background: linear-gradient(135deg, var(--cor-primaria) 0%, #6a1818 100%);
    padding: 1rem 0;
    box-shadow: 0 4px 20px rgba(126, 31, 31, 0.3);
    transition: all 0.3s ease;
}

.navbar.scrolled {
    padding: 0.5rem 0;
    box-shadow: 0 6px 30px rgba(126, 31, 31, 0.4);
}

.navbar-brand {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--cor-branca) !important;
    display: flex;
    align-items: center;
    transition: transform 0.3s ease;
}

.navbar-brand:hover {
    transform: scale(1.05);
}

.navbar-brand i {
    font-size: 2rem;
    color: var(--cor-secundaria);
}

.nav-link {
    color: var(--cor-branca) !important;
    font-weight: 500;
    margin: 0 0.5rem;
    padding: 0.5rem 1rem !important;
    border-radius: 8px;
    transition: all 0.3s ease;
    position: relative;
}

.nav-link:hover {
    background: rgba(255, 255, 255, 0.1);
    transform: translateY(-2px);
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    width: 0;
    height: 2px;
    background: var(--cor-secundaria);
    transition: all 0.3s ease;
    transform: translateX(-50%);
}

.nav-link:hover::after {
    width: 80%;
}

.btn-cart {
    position: relative;
}

.btn-cart .badge {
    position: absolute;
    top: -5px;
    right: -5px;
    font-size: 0.7rem;
    padding: 0.25rem 0.5rem;
    border-radius: 10px;
}

/* ===== HERO SECTION ===== */
.hero-section {
    height: 100vh;
    background: linear-gradient(135deg, var(--cor-primaria) 0%, var(--cor-terciaria) 100%);
    position: relative;
    display: flex;
    align-items: center;
    overflow: hidden;
}

.hero-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1440 320"><path fill="%23f3c761" fill-opacity="0.1" d="M0,96L48,112C96,128,192,160,288,160C384,160,480,128,576,112C672,96,768,96,864,112C960,128,1056,160,1152,160C1248,160,1344,128,1392,112L1440,96L1440,320L1392,320C1344,320,1248,320,1152,320C1056,320,960,320,864,320C768,320,672,320,576,320C480,320,384,320,288,320C192,320,96,320,48,320L0,320Z"></path></svg>') no-repeat bottom;
    background-size: cover;
    opacity: 0.3;
    animation: waveAnimation 15s ease-in-out infinite;
}

@keyframes waveAnimation {
    0%, 100% { transform: translateX(0); }
    50% { transform: translateX(-50px); }
}

.hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: radial-gradient(circle at center, transparent 0%, rgba(0,0,0,0.3) 100%);
}

.hero-content {
    position: relative;
    z-index: 2;
}

.hero-title {
    font-size: clamp(2.5rem, 6vw, 5rem);
    font-weight: 800;
    color: var(--cor-branca);
    line-height: 1.2;
    text-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
}

.text-accent {
    color: var(--cor-secundaria);
    display: inline-block;
    animation: pulse 2s ease-in-out infinite;
}

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

.hero-subtitle {
    font-size: clamp(1rem, 2vw, 1.5rem);
    color: var(--cor-branca);
    font-weight: 300;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
}

.btn-primary {
    background: var(--cor-secundaria);
    border: none;
    color: var(--cor-escura);
    font-weight: 600;
    padding: 1rem 2rem;
    border-radius: 50px;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(243, 199, 97, 0.4);
}

.btn-primary:hover {
    background: #e5b84f;
    transform: translateY(-3px);
    box-shadow: 0 6px 25px rgba(243, 199, 97, 0.6);
}

.btn-outline-light {
    border: 2px solid var(--cor-branca);
    color: var(--cor-branca);
    font-weight: 600;
    padding: 1rem 2rem;
    border-radius: 50px;
    transition: all 0.3s ease;
}

.btn-outline-light:hover {
    background: var(--cor-branca);
    color: var(--cor-primaria);
    transform: translateY(-3px);
}

.scroll-indicator {
    position: absolute;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%);
    animation: bounce 2s infinite;
    font-size: 2rem;
    color: var(--cor-branca);
    opacity: 0.7;
}

@keyframes bounce {
    0%, 20%, 50%, 80%, 100% { transform: translateX(-50%) translateY(0); }
    40% { transform: translateX(-50%) translateY(-10px); }
    60% { transform: translateX(-50%) translateY(-5px); }
}

/* ===== SECTIONS ===== */
section {
    padding: 5rem 0;
}

.section-title {
    font-size: clamp(2rem, 4vw, 3rem);
    font-weight: 700;
    color: var(--cor-primaria);
    margin-bottom: 1rem;
    position: relative;
    display: inline-block;
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 0;
    width: 60px;
    height: 4px;
    background: var(--cor-secundaria);
    border-radius: 2px;
}

.section-subtitle {
    font-size: 1.2rem;
    color: var(--cor-cinza);
    font-weight: 300;
}

/* ===== CATEGORY FILTER ===== */
.btn-category {
    background: var(--cor-branca);
    border: 2px solid var(--cor-cinza-claro);
    color: var(--cor-escura);
    padding: 0.75rem 1.5rem;
    border-radius: 50px;
    font-weight: 500;
    transition: all 0.3s ease;
    white-space: nowrap;
}

.btn-category:hover {
    background: var(--cor-cinza-claro);
    border-color: var(--cor-primaria);
    transform: translateY(-2px);
}

.btn-category.active {
    background: var(--cor-primaria);
    border-color: var(--cor-primaria);
    color: var(--cor-branca);
    box-shadow: 0 4px 15px rgba(126, 31, 31, 0.3);
}

/* ===== PRODUCT CARDS ===== */
.product-card {
    background: var(--cor-branca);
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    transition: all 0.3s ease;
    height: 100%;
    display: flex;
    flex-direction: column;
}

.product-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.15);
}

.product-image {
    position: relative;
    width: 100%;
    height: 250px;
    overflow: hidden;
}

.product-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.product-card:hover .product-image img {
    transform: scale(1.1);
}

.product-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(to bottom, transparent 0%, rgba(0,0,0,0.7) 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.product-card:hover .product-overlay {
    opacity: 1;
}

.btn-add-cart {
    background: var(--cor-secundaria);
    border: none;
    color: var(--cor-escura);
    width: 60px;
    height: 60px;
    border-radius: 50%;
    font-size: 1.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(243, 199, 97, 0.4);
}

.btn-add-cart:hover {
    transform: scale(1.1) rotate(10deg);
    box-shadow: 0 6px 25px rgba(243, 199, 97, 0.6);
}

.product-info {
    padding: 1.5rem;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.product-category {
    font-size: 0.85rem;
    color: var(--cor-primaria);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 0.5rem;
}

.product-name {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--cor-escura);
    margin-bottom: 0.5rem;
}

.product-description {
    font-size: 0.9rem;
    color: var(--cor-cinza);
    margin-bottom: 1rem;
    flex: 1;
}

.product-price {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--cor-primaria);
}

/* ===== ABOUT SECTION ===== */
.feature-box {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem;
    background: var(--cor-branca);
    border-radius: 15px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
}

.feature-box i {
    font-size: 2rem;
    color: var(--cor-primaria);
}

.about-image img {
    border-radius: 20px;
}

/* ===== CONTACT CARDS ===== */
.contact-card {
    background: var(--cor-branca);
    padding: 2rem;
    border-radius: 20px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    transition: all 0.3s ease;
}

.contact-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.15);
}

.contact-icon {
    width: 80px;
    height: 80px;
    background: linear-gradient(135deg, var(--cor-primaria), var(--cor-terciaria));
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1rem;
    font-size: 2rem;
    color: var(--cor-branca);
}

/* ===== FOOTER ===== */
.footer {
    background: linear-gradient(135deg, var(--cor-primaria) 0%, #6a1818 100%);
    color: var(--cor-branca);
}

.developer-badge {
    display: inline-flex;
    align-items: center;
    background: linear-gradient(135deg, #1a1a1a 0%, #2d2d2d 100%);
    border: 2px solid #333;
    border-radius: 12px;
    padding: 8px 16px;
    text-decoration: none;
    color: white;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.3s ease;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.developer-badge:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.25);
    border-color: #555;
    color: white;
}

.badge-text {
    margin-right: 8px;
    font-size: 13px;
    opacity: 0.9;
}

.acopli-logo {
    width: 60px;
    height: auto;
    filter: brightness(1.1);
    transition: filter 0.3s ease;
}

.developer-badge:hover .acopli-logo {
    filter: brightness(1.3);
}

/* ===== MODAL CARRINHO ===== */
.modal-content {
    border-radius: 20px;
    border: none;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
}

.modal-header {
    background: linear-gradient(135deg, var(--cor-primaria), var(--cor-terciaria));
    color: var(--cor-branca);
    border-radius: 20px 20px 0 0;
    border: none;
}

.modal-header .btn-close {
    filter: brightness(0) invert(1);
}

.cart-item {
    display: flex;
    align-items: center;
    padding: 1rem;
    border-bottom: 1px solid var(--cor-cinza-claro);
    transition: background 0.3s ease;
}

.cart-item:hover {
    background: var(--cor-cinza-claro);
}

.cart-item-image {
    width: 80px;
    height: 80px;
    object-fit: cover;
    border-radius: 10px;
    margin-right: 1rem;
}

.cart-item-info {
    flex: 1;
}

.cart-item-name {
    font-weight: 600;
    color: var(--cor-escura);
}

.cart-item-price {
    color: var(--cor-primaria);
    font-weight: 700;
}

.quantity-control {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.quantity-control button {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    border: none;
    background: var(--cor-primaria);
    color: var(--cor-branca);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.quantity-control button:hover {
    transform: scale(1.1);
    background: #6a1818;
}

.btn-remove {
    background: #dc3545;
    color: white;
    border: none;
    padding: 0.5rem 1rem;
    border-radius: 8px;
    transition: all 0.3s ease;
}

.btn-remove:hover {
    background: #c82333;
    transform: scale(1.05);
}

/* ===== CHATBOT ===== */
.chatbot-button {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--cor-primaria), var(--cor-terciaria));
    color: var(--cor-branca);
    border: none;
    font-size: 1.5rem;
    box-shadow: 0 4px 20px rgba(126, 31, 31, 0.4);
    cursor: pointer;
    transition: all 0.3s ease;
    z-index: 1000;
    animation: pulse-button 2s infinite;
}

@keyframes pulse-button {
    0%, 100% { box-shadow: 0 4px 20px rgba(126, 31, 31, 0.4); }
    50% { box-shadow: 0 4px 30px rgba(126, 31, 31, 0.6); }
}

.chatbot-button:hover {
    transform: scale(1.1);
}

/* === Correção de sobreposição do Chatbot === */
.chatbot-launcher,
.chatbot-modal {
    z-index: 9999 !important; /* Garante que fica acima de tudo */
}


.chatbot-modal {
    position: fixed;
    bottom: 100px;
    right: 30px;
    width: 400px;
    max-width: calc(100vw - 60px);
    height: 600px;
    max-height: calc(100vh - 150px);
    background: var(--cor-branca);
    border-radius: 20px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
    flex-direction: column;
    z-index: 9999;
    opacity: 0;
    transform: translateY(30px);
    pointer-events: none;
    transition: all 0.35s ease;
}

.chatbot-modal.active {
    opacity: 1;
    transform: translateY(0);
    pointer-events: all;
}


@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.chatbot-modal.active {
    display: flex;
}

.chatbot-header {
    background: linear-gradient(135deg, var(--cor-primaria), var(--cor-terciaria));
    color: var(--cor-branca);
    padding: 1rem;
    border-radius: 20px 20px 0 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.chatbot-avatar {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: var(--cor-secundaria);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    color: var(--cor-escura);
}

.btn-close-chat {
    background: transparent;
    border: none;
    color: var(--cor-branca);
    font-size: 1.5rem;
    cursor: pointer;
    transition: transform 0.3s ease;
}

.btn-close-chat:hover {
    transform: rotate(90deg);
}

.chatbot-messages {
    flex: 1;
    overflow-y: auto;
    padding: 1rem;
    background: var(--cor-cinza-claro);
}

.message {
    margin-bottom: 1rem;
    animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.message-content {
    display: inline-block;
    padding: 0.75rem 1rem;
    border-radius: 15px;
    max-width: 80%;
}

.bot-message .message-content {
    background: var(--cor-branca);
    color: var(--cor-escura);
    border-bottom-left-radius: 5px;
}

.user-message {
    text-align: right;
}

.user-message .message-content {
    background: var(--cor-primaria);
    color: var(--cor-branca);
    border-bottom-right-radius: 5px;
}

.chatbot-input {
    display: flex;
    padding: 1rem;
    border-top: 1px solid var(--cor-cinza-claro);
    gap: 0.5rem;
}

.chatbot-input input {
    flex: 1;
    border: 1px solid var(--cor-cinza-claro);
    border-radius: 25px;
    padding: 0.75rem 1rem;
}

.chatbot-input button {
    width: 45px;
    height: 45px;
    border-radius: 50%;
    background: var(--cor-primaria);
    border: none;
    color: var(--cor-branca);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.chatbot-input button:hover {
    transform: scale(1.1);
    background: #6a1818;
}

/* ===== RESPONSIVE ===== */
@media (max-width: 768px) {
    .hero-section {
        height: 80vh;
    }
    
    .product-image {
        height: 200px;
    }
    
    .chatbot-modal {
        width: calc(100vw - 40px);
        right: 20px;
        bottom: 90px;
    }
    
    .btn-category {
        font-size: 0.85rem;
        padding: 0.5rem 1rem;
    }
}

/* ===== ANIMATIONS ===== */
.produto-item {
    animation: fadeInUp 0.6s ease;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ===== LOADING ===== */
.loading {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid rgba(255,255,255,.3);
    border-radius: 50%;
    border-top-color: var(--cor-branca);
    animation: spin 1s ease-in-out infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

.navbar-brand img {
    max-height: 100px;
    transition: transform 0.3s ease;
}

.navbar-brand img:hover {
    transform: scale(1.05);
}

.login-logo {
    max-width: 160px;
    height: auto;
    display: block;
    margin: 0 auto 1rem auto;
    filter: drop-shadow(0 4px 10px rgba(0,0,0,0.2));
    animation: fadeIn 1s ease;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(-10px); }
    to { opacity: 1; transform: translateY(0); }
}

/* === Chatbot Avatar Personalizado === */
.chatbot-avatar {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    overflow: hidden;
    flex-shrink: 0;
    background: var(--cor-branca, #fff);
    border: 2px solid var(--cor-primaria, #7e1f1f);
    display: flex;
    align-items: center;
    justify-content: center;
}

.chatbot-avatar-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Quando for pequeno, ajusta o tamanho */
@media (max-width: 576px) {
    .chatbot-avatar {
        width: 40px;
        height: 40px;
    }
}

/* === Botão Flutuante do Chat com Mascote === */
.chatbot-launcher {
    position: fixed;
    bottom: 25px;
    right: 25px;
    z-index: 1000;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 10px;
}

.chatbot-mascote-btn {
    width: 70px;
    height: 70px;
    border-radius: 50%;
    border: 3px solid var(--cor-primaria, #7e1f1f);
    background-color: #fff;
    object-fit: cover;
    box-shadow: 0 6px 15px rgba(0,0,0,0.2);
    transition: transform 0.3s ease;
}

.chatbot-mascote-btn:hover {
    transform: scale(1.08);
}

.chatbot-bubble {
    background: var(--cor-primaria, #7e1f1f);
    color: #fff;
    font-weight: 500;
    font-size: 0.9rem;
    padding: 10px 15px;
    border-radius: 20px;
    white-space: nowrap;
    box-shadow: 0 4px 10px rgba(0,0,0,0.2);
    animation: popIn 0.6s ease;
    position: relative;
}

.chatbot-bubble::after {
    content: '';
    position: absolute;
    right: -6px;
    bottom: 12px;
    border-width: 6px;
    border-style: solid;
    border-color: transparent transparent transparent var(--cor-primaria, #7e1f1f);
}

@keyframes popIn {
    from { opacity: 0; transform: translateY(10px) scale(0.9); }
    to { opacity: 1; transform: translateY(0) scale(1); }
}

/* Ajuste em mobile */
@media (max-width: 576px) {
    .chatbot-bubble {
        display: none;
    }

    .chatbot-mascote-btn {
        width: 60px;
        height: 60px;
    }
}

/* === Powered by HupAI === */
.powered-by-badge {
    text-align: center;
    font-size: 0.8rem;
    color: #888;
    padding: 10px 0;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    background: #fafafa;
    font-weight: 500;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 6px;
    border-radius: 0 0 20px 20px;
}

.powered-by-badge i {
    color: #f4b400; /* amarelo HupAI */
    font-size: 1rem;
}

.powered-by-badge strong {
    color: var(--cor-primaria, #7e1f1f);
    font-weight: 600;
}

.chatbot-modal {
    overflow: hidden;
}

/* Fundo animado da hero */
.hero-background-slider {
    position: absolute;
    inset: 0;
    overflow: hidden;
    z-index: 0;
}

.hero-background-slider img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0;
    transition: opacity 1.5s ease-in-out;
    filter: brightness(60%) saturate(120%);
}

/* Exibe imagem ativa */
.hero-background-slider img.active {
    opacity: 0.5;
    z-index: 0;
}

/* Hero Section */
.hero-section {
    position: relative;
    min-height: 100vh;
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    overflow: hidden;
    z-index: 1; /* sobe o conteúdo */
}

/* Overlay vem acima das imagens, mas abaixo do texto */
.hero-overlay {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.6);
    z-index: 1;
}

.hero-content {
    position: relative;
    z-index: 2;
}

/* ============================
   Carrinho fixo no topo
   ============================ */
.btn-cart-header {
    background-color: #ffd84d; /* amarelo destaque */
    color: #fff;
    border: none;
    border-radius: 8px;
    width: 46px;
    height: 46px;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    transition: all 0.3s ease;
}

.btn-cart-header:hover {
    background-color: #ffcc00;
    transform: scale(1.05);
}

.btn-cart-header i {
    font-size: 1.3rem;
    color: #ffffff;
}

.btn-cart-header .badge {
    position: absolute;
    top: -5px;
    right: -5px;
    font-size: 0.7rem;
    padding: 3px 6px;
    border-radius: 10px;
    border: 1px solid #fff;
}

/* Mobile ajustes — para não sobrepor o menu */
@media (max-width: 991px) {
    .btn-cart-header {
        width: 42px;
        height: 42px;
        border-radius: 6px;
    }
}

