/* ==========================================================================
   Arquivo de Estilos Principal - Projeto OferTou! (Versão Final)
   ========================================================================== */

/* --- 1. Estilos da Navbar de Dois Níveis --- */
.site-header {
    background-color: #19192D;
    box-shadow: 0 2px 5px rgba(0,0,0,0.2);
    font-family: 'Roboto', sans-serif;
}
.nav-level-one {
    background-color: #19192D !important;
    padding: 5px 0;
}
.category-select {
    background-color: #f3f3f3; border: 1px solid #444; border-right: none;
    border-radius: 5px 0 0 5px; max-width: 120px; font-size: 0.9rem; color: #555;
}
.search-input { border: 1px solid #444; border-left: 1px solid #555; border-right: none; }
.search-button {
    background-color: #D2FF7E; border-color: #D2FF7E; border-radius: 0 5px 5px 0;
    color: #19192D; font-weight: bold;
}
.search-button:hover { background-color: #bce66d; border-color: #bce66d; }
.site-header .form-control:focus, .site-header .form-select:focus, .site-header .btn:focus {
    outline: none !important;
    box-shadow: 0 0 0 2px #19192D, 0 0 0 4px rgba(210, 255, 126, 0.7) !important;
}
.site-header .nav-link { color: #fff; }
.site-header .nav-link:hover { color: #D2FF7E; }
.nav-level-two {
    background-color: #2a2a45 !important;
    min-height: auto;
    padding: 2px 0;
    font-size: 0.85rem;
}
.nav-level-two .nav-link { font-weight: 500; }
.nav-level-two .dropdown-menu {
    background-color: #19192D;
    border: 1px solid rgba(210, 255, 126, 0.2);
    margin-top: 5px !important;
}
.nav-level-two .dropdown-item { color: #ffffff; }
.nav-level-two .dropdown-item:hover { background-color: #D2FF7E; color: #19192D; }

/* --- 2. Estilos Gerais e Seções da Página Principal --- */
.banner { margin: 0; padding: 0; line-height: 0; }
.product-page-header { text-align: center; padding: 40px 20px; background-color: #f8f9fa; border-bottom: 1px solid #e9ecef; }
.product-page-header h1 { font-weight: 700; color: #19192D; }
.product-page-header p { font-size: 1.1rem; color: #6c757d; }

.session-container { padding: 0 1rem; }
.category-title { font-size: 2rem; font-weight: bold; color: #333; margin: 2rem 0 1.5rem 0; padding-left: 1rem; border-left: 5px solid #D2FF7E; }
.session-title { font-size: 2.5rem; font-weight: bolder; color: #19192D; margin: 2rem 0; text-align: center; position: relative; padding-bottom: 10px; }
.session-title::after { content: ''; position: absolute; left: 50%; bottom: 0; transform: translateX(-50%); height: 3px; width: 80px; background-color: #D2FF7E; }

/* --- 3. Estilos dos Componentes (Cards, Carrosséis) --- */
/* Grade de Ofertas Aleatórias */
.deal-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 1.5rem; }
@media (min-width: 992px) { .deal-grid { grid-template-columns: repeat(4, 1fr); } }
.deal-card { background-color: #fff; border-radius: 8px; overflow: hidden; position: relative; text-decoration: none; border: 1px solid #e9ecef; transition: box-shadow 0.3s ease; }
.deal-card:hover { box-shadow: 0 4px 15px rgba(0,0,0,0.1); }
.deal-image-wrapper { aspect-ratio: 1 / 1; padding: 15px; }
.deal-image-wrapper img { width: 100%; height: 100%; object-fit: contain; }
.discount-badge { position: absolute; bottom: 40px; left: 15px; background-color: #c00; color: #fff; padding: 4px 8px; font-size: 0.8rem; font-weight: bold; border-radius: 4px; }
.deal-info { padding: 0 15px 15px 15px; }
.deal-info .deal-type { color: #c00; font-weight: bold; font-size: 0.9rem; }

/* Carrossel de Categorias */
.category-carousel .swiper-slide { display: flex; justify-content: center; }
.category-card { text-align: center; text-decoration: none; color: #333; display: block; }
.category-image-wrapper { width: 120px; height: 120px; border-radius: 50%; overflow: hidden; margin: 0 auto 10px auto; border: 3px solid #f0f0f0; transition: border-color 0.3s ease; }
.category-image-wrapper img { width: 100%; height: 100%; object-fit: cover; }
.category-card:hover .category-image-wrapper { border-color: #D2FF7E; }
.category-name { font-weight: 500; }

/* Cards de Produto Principais (usado na grade e nos carrosséis) */
/* --- Cards de Produto (Usado em Grades e Carrosséis) --- */
.product-card {
    background-color: #ffffff;
    border: 1px solid #e9ecef;
    border-radius: 12px; /* Bordas um pouco mais suaves */
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.07);
    overflow: hidden;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    display: flex;
    flex-direction: column;
    width: 100%;
    height: 100%; /* Essencial para alinhamento de altura */
    max-width: 290px; /* Define uma largura máxima para o card */
    margin: 0 auto; /* Centraliza o card no seu slide/célula */
}
.product-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.1);
}
.product-image-wrapper {
    position: relative;
    width: 100%;
    aspect-ratio: 1 / 1; /* Força a imagem a ser quadrada */
    background-color: #ffffff;
    overflow: hidden;
    padding: 1rem; /* NOVO: Adiciona um espaçamento interno */
}
.product-image {
    width: 100%;
    height: 100%;
    object-fit: contain; /* <-- Alterado para 'contain' */
    padding: 10px; /* Adiciona um pequeno padding para a imagem não colar nas bordas */
    background-color: #ffffff;
    transition: transform 0.4s ease;
}
.product-card:hover .product-image {
    transform: scale(1.05);
}
.product-info {
    padding: 1rem;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
    text-align: left;
}
.product-title {
    font-size: 1.1rem;
    font-weight: 600;
    line-height: 1.4;
    height: 3.2em;
    margin-bottom: 10px;
    color: #212529;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2; /* <-- LINHA ADICIONADA */
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
}


/* Estilo para o formulário de avaliação com estrelas */
.star-rating-input {
    display: inline-flex;
    flex-direction: row-reverse; /* Inverte a ordem para a mágica do CSS funcionar */
    font-size: 1.5rem;
    justify-content: flex-end;
}
.star-rating-input input {
    display: none; /* Esconde os botões de rádio originais */
}
.star-rating-input label {
    color: #ddd;
    cursor: pointer;
    transition: color 0.2s;
    padding: 0 0.1em;
}
/* Pinta as estrelas ao passar o mouse e as estrelas anteriores */
.star-rating-input label:hover,
.star-rating-input label:hover ~ label {
    color: #ffc107;
}
/* Pinta as estrelas selecionadas */
.star-rating-input input:checked ~ label {
    color: #ffc107;
}




.product-price { margin-bottom: 1rem; min-height: 40px; }
.product-price .old-price { font-size: 0.9rem; color: #6c757d; text-decoration: line-through; }
.product-price .current-price { font-size: 1.3rem; font-weight: 700; color: #28a745; }
.product-price .normal-price { font-size: 1.2rem; font-weight: 700; color: #19192D; }
.product-actions { margin-top: auto; }
.product-button { display: block; width: 100%; padding: 10px; background-color: #D2FF7E; color: #19192D; text-align: center; font-weight: bold; text-decoration: none; border-radius: 8px; transition: all 0.3s ease; }
.product-button:hover { background-color: #bce66d; color: #19192D; }
.product-source-badge { position: absolute; top: 10px; right: 10px; background-color: rgba(255, 255, 255, 0.9); border-radius: 5px; padding: 5px; box-shadow: 0 1px 3px rgba(0,0,0,0.1); z-index: 10; }
.product-source-badge img { height: 20px; width: auto; display: block; }

/* --- Grade de Produtos (Página de Resultados) --- */
.product-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2rem;
}

/* Carrosséis (Swiper) */
.product-carousel .swiper-slide {
    display: flex;
    justify-content: center; /* Centraliza o card dentro do slide */
    height: auto;
}
.category-carousel { padding-bottom: 40px; }
.hero-carousel { width: 100%; margin: 0; padding: 0; line-height: 0; }
.hero-carousel .swiper-slide img { width: 100%; height: 100%; object-fit: cover; }

.swiper-button-next, .swiper-button-prev {
    background-color: rgba(255, 255, 255, 0.9); border-radius: 50%; width: 45px; height: 45px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.15); color: #19192D !important;
}
.swiper-button-next:after, .swiper-button-prev:after { font-size: 18px !important; font-weight: bold; }
.product-carousel .swiper-button-prev, .category-carousel .swiper-button-prev { left: 10px; }
.product-carousel .swiper-button-next, .category-carousel .swiper-button-next { right: 10px; }
.hero-carousel .swiper-button-next, .hero-carousel .swiper-button-prev { color: #fff !important; }
.hero-carousel .swiper-pagination-bullet-active { background: #D2FF7E !important; }
/* --- 4. Estilos da Página de Login --- */
.login-page { background-color: #19192D; display: flex; align-items: center; justify-content: center; min-height: 100vh; padding: 20px; }
.login-box { background: rgba(0, 0, 0, 0.2); padding: 40px; border-radius: 15px; border: 1px solid rgba(210, 255, 126, 0.2); width: 100%; max-width: 420px; text-align: center; box-shadow: 0 10px 30px rgba(0,0,0,0.3); }
.login-logo img { max-width: 220px; height: auto; }
.login-box .form-control { background-color: rgba(255, 255, 255, 0.05); border: none; border-bottom: 2px solid rgba(210, 255, 126, 0.5); border-radius: 5px; color: #FFFFFF; padding: 1rem; }
.login-box .form-control:focus { background-color: rgba(255, 255, 255, 0.1); box-shadow: none; color: #FFFFFF; border-bottom: 2px solid #D2FF7E; }
.login-box .form-floating > label { color: rgba(255, 255, 255, 0.5); }
.login-box .btn-primary { background-color: #D2FF7E; border-color: #D2FF7E; color: #19192D; font-weight: bold; padding: 12px 20px; transition: background-color 0.3s ease; }
.login-box .btn-primary:hover { background-color: #bce66d; border-color: #bce66d; }
.login-footer-text { color: rgba(255, 255, 255, 0.6); }
.login-footer-text a { color: #D2FF7E; font-weight: bold; text-decoration: none; }
.login-footer-text a:hover { text-decoration: underline; }

/* --- 5. Estilos do Painel de Administração --- */
.sidebar {
    width: 250px;
    height: 100vh;
    position: fixed;
    left: 0;
    top: 0;
    z-index: 1000;
    background-color: #212529;
    overflow-y: auto;
}
.sidebar .nav-link { color: #adb5bd; padding: 10px 20px; font-size: 1rem; }
.sidebar .nav-link:hover, .sidebar .nav-link.active { color: #D2FF7E; background-color: rgba(255, 255, 255, 0.05); }
.main-content {
    margin-left: 250px; /* Mesma largura da sidebar */
    width: calc(100% - 250px);
    padding: 20px;
    min-height: 100vh;
    transition: all 0.3s;
}
.table-responsive {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}
/* Força o box-sizing para evitar que o padding "estique" os elementos */
* {
    box-sizing: border-box;
}
.flask-admin-list-header { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 1rem; padding-bottom: 1rem; }
.flask-admin-list-header form { display: flex !important; align-items: center; gap: 0.5rem; }
.main-content .btn-primary, .main-content .btn-info { background-color: #19192D !important; border-color: #19192D !important; color: #FFFFFF !important; font-weight: bold; }
.main-content .btn-primary:hover, .main-content .btn-info:hover { opacity: 0.9; }
.main-content .btn-danger { background-color: #c82333 !important; border-color: #c82333 !important; font-weight: bold; }
.main-content a { color: #19192D; }
.admin-form-container .form-actions { display: none; }
.form-buttons { display: block !important; text-align: right; margin-top: 20px; padding-top: 20px; border-top: 1px solid #dee2e6; }
.main-content .table th { font-weight: bold; }
.fa-check-circle { color: #198754; }
.fa-times-circle { color: #dc3545; }
.actions-cell .btn { font-size: 0.8rem; }
.actions-cell form { display: inline-block; margin: 0 2px; }
.admin-form-container .form-group { margin-bottom: 1.5rem; }
.admin-form-container label { font-weight: bold; margin-bottom: 0.5rem; }


/* --- Estilo dos Ícones de Redes Sociais no Rodapé --- */
.social-icons .btn {
    background-color: #19192D; /* Cor padrão escura da sua marca */
    color: #ffffff;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    font-size: 1.2rem;
    transition: all 0.3s ease;
    border: none; /* Remove a borda padrão */
}

/* Efeito de hover individual para cada rede social */
.social-icons .btn-facebook:hover { background-color: #1877F2; }
.social-icons .btn-twitter:hover { background-color: #000000; }
.social-icons .btn-instagram:hover { background: radial-gradient(circle at 30% 107%, #fdf497 0%, #fdf497 5%, #fd5949 45%,#d6249f 60%,#285AEB 90%); }
.social-icons .btn-whatsapp:hover { background-color: #25D366; }
.social-icons .btn-telegram:hover { background-color: #24A1DE; }

/* Efeito de elevação para todos no hover */
.social-icons .btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 4px 10px rgba(0,0,0,0.2);
}

/* --- Estilos para os Links do Rodapé --- */
.footer-link {
    color: #6c757d; /* Cor cinza padrão do texto do rodapé */
    text-decoration: none; /* Remove o sublinhado */
    transition: color 0.3s ease; /* Adiciona uma transição suave de cor de 0.3 segundos */
}

.footer-link:hover {
    color: #19192D; /* Cor azul escura da sua paleta ao passar o mouse */
}


/* static/css/main.css MENSAGEM DE ALERTA DA LANDING PAGE */

/* static/css/main.css */

.alert-highlight-bar {
    background-color: #ffc107; /* Amarelo vibrante da foto */
    color: #000;
    text-align: center;
    font-weight: 800;
    padding: 10px 0;
    text-transform: uppercase;
    letter-spacing: 1px;
    
    /* CORREÇÃO: Removemos o margin-top negativo que escondia a navbar */
    margin-top: 0; 
    
    /* Mantemos as margens laterais negativas para preencher o container  */
    margin-left: -12px;
    margin-right: -12px;
    
    border-bottom: 2px solid rgba(0,0,0,0.1);
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
    position: relative;
    z-index: 5; /* Z-index baixo para não cobrir dropdowns da navbar [cite: 278] */
}

/* Garante que o ícone de raio pisque levemente para chamar atenção */
.alert-highlight-bar i {
    animation: pulse-icon 1.5s infinite alternate;
}

@keyframes pulse-icon {
    from { opacity: 1; transform: scale(1.1); }
    to { opacity: 0.5; transform: scale(1); }
}