/* ====================================================== */
/* DESIGN SYSTEM v3.7 (AJUSTES DE LOGIN)                  */
/* ====================================================== */

:root {
    --primary-color: #6e0ad6;
    --primary-hover: #5c08b3;
    --background-color: #f4f4f9;
    --surface-color: #ffffff;
    --text-color: #1a202c;
    --text-secondary: #6c757d;
    --border-color: #e2e8f0;
    --success-color: #16a34a;
    --error-color: #dc2626;
    --font-family: 'Inter', sans-serif;
}

body {
    font-family: var(--font-family);
    margin: 0;
    background-color: var(--background-color);
    color: var(--text-color);
    line-height: 1.5;
}

*, *::before, *::after {
    box-sizing: border-box;
}

.main-header, header {
    background-color: var(--surface-color);
    padding: 1rem 2rem;
    box-shadow: 0 1px 3px rgba(0,0,0,0.05);
    border-bottom: 1px solid var(--border-color);
}

.header-content {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
}

.logo-link {
    text-decoration: none;
    color: inherit;
}

.logo {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--primary-color);
}

.user-navigation {
    display: flex;
    align-items: center;
    gap: 1.5rem;
}

.nav-link {
    text-decoration: none;
    background: none;
    border: none;
    font-family: inherit;
    font-size: 1rem;
    color: var(--text-color);
    font-weight: 500;
    transition: color 0.2s;
    cursor: pointer;
}

.nav-link:hover {
    color: var(--primary-color);
}

.button-primary {
    display: inline-block;
    text-decoration: none;
    padding: 0.7rem 1.5rem;
    border: none;
    border-radius: 24px;
    background-color: var(--primary-color);
    color: white;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    text-align: center;
}

.button-primary:hover:not(:disabled) {
    background-color: var(--primary-hover);
    transform: translateY(-2px);
}

.button-primary:disabled {
    background-color: #9ca3af;
    cursor: not-allowed;
    transform: none;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem;
}


.section-title {
    font-size: 1.5rem;
    margin-bottom: 1.5rem;
    color: var(--text-color);
    font-weight: 600;
}

/* Renomeado para evitar AdBlock */
.listings-grid {
    display: grid;
    gap: 1.5rem;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
}

.ad-card-link {
    text-decoration: none;
}

.ad-card {
    background-color: var(--surface-color);
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.06);
    transition: all 0.2s ease-in-out;
    border: 1px solid var(--border-color);
}

.ad-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 24px rgba(0,0,0,0.12);
    border-color: var(--primary-color);
}

.ad-card-content {
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    height: 100%;
}

.ad-card h3 {
    font-size: 1rem;
    margin: 0 0 0.5rem;
    color: var(--text-color);
    font-weight: 500;
    line-height: 1.4;
    flex-grow: 1;
}

.ad-card .ad-price {
    font-weight: 700;
    font-size: 1.5rem;
    color: var(--text-color);
    margin-bottom: 0.5rem;
}

.ad-card .ad-price div, .ad-card .ad-price span {
    display: block;
}

.ad-card .ad-price span {
    font-size: 0.85rem;
    font-weight: 400;
    color: var(--success-color);
    margin-top: -4px;
}

.ad-card .ad-meta {
    font-size: 0.75rem;
    color: var(--text-secondary);
    margin-top: 1rem;
}

.dashboard-header {
    margin-bottom: 2rem;
}

.dashboard-header h1 {
    margin: 0;
    font-size: 2.25rem;
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 1rem;
}

.auth-container {
    max-width: 450px;
    margin-top: 4rem;
}

.form-wrapper, .form-container {
    background-color: var(--surface-color);
    padding: 2.5rem;
    border-radius: 16px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.08);
}

.form-switcher {
    display: flex;
    margin-bottom: 2rem;
    border-bottom: 2px solid var(--border-color);
}

.switcher-btn {
    flex: 1;
    padding: 1rem;
    border: none;
    background: none;
    color: var(--text-secondary);
    font-weight: 600;
    cursor: pointer;
    position: relative;
}

.switcher-btn.active {
    color: var(--primary-color);
}

.switcher-btn.active::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 100%;
    height: 2px;
    background-color: var(--primary-color);
}

.form-content-wrapper {
    max-width: 600px;
    margin: 0 auto;
}

.form-group {
    margin-bottom: 1.25rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
    font-size: 0.9rem;
    color: var(--text-color);
}

.form-group input, .form-group select, .form-group textarea {
    width: 100%;
    padding: 0.8rem 1rem;
    border: 2px solid var(--border-color);
    border-radius: 8px;
    font-size: 1rem;
    transition: all 0.2s;
    background-color: var(--background-color);
}

.form-group input:focus, .form-group select:focus, .form-group textarea:focus {
    outline: none;
    border-color: var(--primary-color);
    background-color: var(--surface-color);
}

form .button-primary {
    width: 100%;
    margin-top: 1rem;
    padding: 1rem;
    font-size: 1.1rem;
}

.password-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}

.password-toggle {
    position: absolute;
    right: 1rem;
    cursor: pointer;
    opacity: 0.5;
}

.price-option {
    margin-bottom: 15px;
}

.checkbox-label {
    display: flex;
    align-items: center;
    font-weight: 500;
    cursor: pointer;
}

.checkbox-label input {
    margin-right: 8px;
}

.main-footer {
    text-align: center;
    padding: 2rem;
    margin-top: 4rem;
    color: var(--text-secondary);
    border-top: 1px solid var(--border-color);
}

.hidden {
    display: none !important;
}

hr {
    border: none;
    border-top: 1px solid var(--border-color);
    margin: 2rem 0;
}

.ad-card .ad-actions {
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid var(--border-color);
    display: flex;
    gap: 0.5rem;
    justify-content: flex-end;
}

.button-edit, .button-delete {
    background: none;
    padding: 0.4rem 0.8rem;
    border-radius: 6px;
    cursor: pointer;
    font-weight: 600;
    font-size: 0.8rem;
    transition: all 0.2s;
}

.button-edit {
    border: 1px solid var(--primary-color);
    color: var(--primary-color);
}

.button-edit:hover {
    background-color: var(--primary-color);
    color: white;
}

.button-delete {
    border: 1px solid var(--error-color);
    color: var(--error-color);
}

.button-delete:hover {
    background-color: var(--error-color);
    color: white;
}

.popup-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0.6);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
}

.popup-content {
    background-color: var(--surface-color);
    padding: 2rem 2.5rem;
    border-radius: 12px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.3);
    text-align: center;
    max-width: 400px;
    position: relative;
}

.popup-content h2 {
    margin-top: 0;
}

.popup-content p {
    margin-bottom: 2rem;
    color: var(--text-secondary);
}

/* ====================================================== */
/* ESTILOS ADICIONAIS PARA ÍCONES E POP-UPS               */
/* ====================================================== */

.password-toggle svg {
    width: 20px;
    height: 20px;
    stroke: currentColor;
}

.popup-content h2.success {
    color: var(--success-color);
}

.popup-content h2.error {
    color: var(--error-color);
}

.password-reqs-list {
    font-size: 0.8rem;
    color: var(--text-secondary);
    list-style: none;
    padding-left: 0;
    margin-top: 0.5rem;
}

.password-reqs-list li {
    transition: color 0.3s;
}

.password-reqs-list li.valid {
    color: var(--success-color);
    text-decoration: line-through;
}

/* ====================================================== */
/* ESTILOS ATUALIZADOS PARA TOOLTIP E LABEL               */
/* ====================================================== */

/* Container para alinhar label e ícone na mesma linha */
.form-group-with-tooltip {
    display: flex;
    align-items: center;
    gap: 8px; /* Espaço entre o label e o ícone */
    margin-bottom: 0.5rem; /* Espaço antes do input */
}
.form-group-with-tooltip label {
    margin-bottom: 0; /* Remove a margem padrão do label */
}

/* Estilo do ícone de informação */
.tooltip-icon {
    position: relative;
    cursor: help;
    font-weight: 600;
    color: var(--text-secondary);
}

/* Estilo do balão de dica (tooltip) */
.tooltip-icon::after {
    content: attr(data-tooltip);
    position: absolute;
    bottom: 125%; /* Posiciona um pouco mais acima */
    left: 50%;
    transform: translateX(-50%);
    
    background-color: #333;
    color: #fff;
    padding: 8px 12px;
    border-radius: 6px;
    font-size: 0.8rem;
    font-weight: 500;
    width: 200px; /* Largura definida para quebra de linha */
    white-space: normal; /* Permite que o texto quebre a linha */
    text-align: center;
    
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.2s, visibility 0.2s;
    z-index: 10;
}

/* Mostra o tooltip no hover */
.tooltip-icon:hover::after {
    opacity: 1;
    visibility: visible;
}
/* ====================================================== */
/* ESTILOS ESPECÍFICOS DA PÁGINA DE DETALHES DO ANÚNCIO   */
/* ====================================================== */

.ad-detail-layout {
    display: grid;
    grid-template-columns: 1fr;
    gap: 2rem;
}
@media (min-width: 768px) {
    .ad-detail-layout {
        grid-template-columns: 2fr 1fr;
    }
}
.ad-sidebar .vendor-info {
    background-color: var(--surface-color);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 2rem;
    text-align: center;
    position: sticky;
    top: 2rem;
}
.vendor-avatar {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    background-color: var(--primary-color);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2.5rem;
    font-weight: 700;
    margin: 0 auto 1rem;
}
.vendor-info h3 a {
    font-size: 1.25rem;
    margin-bottom: 1.5rem;
    display: block;
}
.vendor-info .button-primary {
    width: 100%;
}
.ad-main-info h1 {
    font-size: 2.25rem;
    margin-bottom: 0.5rem;
}
.published-date {
    font-size: 0.85rem;
    color: var(--text-secondary);
    margin-bottom: 1rem;
}
.detail-price {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--primary-color);
    margin-bottom: 2rem;
}
.detail-price span {
    display: block;
    font-size: 1rem;
    font-weight: 500;
    color: var(--text-secondary);
}
.ad-details-list {
    list-style: none;
    padding: 0;
    margin: 0 0 2rem 0;
    border-top: 1px solid var(--border-color);
}
.ad-details-list li {
    display: flex;
    justify-content: space-between;
    padding: 1rem 0;
    border-bottom: 1px solid var(--border-color);
}
.ad-details-list li strong {
    color: var(--text-secondary);
}
.ad-description-box {
    background-color: var(--surface-color);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 1.5rem 2rem;
}
.ad-description-box h2 {
    margin-top: 0;
}
.ad-description-box p {
    white-space: pre-wrap; /* Preserva quebras de linha e espaços do textarea */
    line-height: 1.6;
}

/* ====================================================== */
/* ESTILOS PARA NOVO FORMULÁRIO DE PREÇO                  */
/* ====================================================== */

/* Texto de ajuda (Ex: 200kk) */
.form-helper-text {
    display: block;
    font-size: 0.85rem;
    color: var(--text-secondary);
    margin-left: 4px;
    margin-top: 8px;
    height: 1rem; /* Garante que o layout não "pule" */
}

/* Ajuste no grupo de input de preço para alinhar o helper */
.price-input-group {
    display: block;
}
.price-input-group input {
    width: 100%;
}

/* Tag "Negociável" no card (public.js) */
.ad-card .ad-price span {
    display: block;
    font-size: 0.85rem;
    font-weight: 400;
    color: var(--success-color);
    margin-top: -4px;
}

/* Tag "Negociável" na página de anúncio (anuncio.js) */
.negotiable-tag {
    display: block;
    font-size: 1rem;
    font-weight: 500;
    color: var(--success-color);
    margin-top: -1.5rem;
    margin-bottom: 2rem;
}
/* ====================================================== */
/* ESTILO DA DICA "A NEGOCIAR"                            */
/* ====================================================== */
.form-tip {
    background-color: #f7f3ff; /* Um fundo lavanda bem claro, combinando com o tema */
    border-left: 4px solid var(--primary-color); /* Uma borda lateral na cor primária */
    padding: 12px 16px;
    margin: 1rem 0 1.5rem 0; /* Espaçamento acima e abaixo */
    border-radius: 4px;
    font-size: 0.9rem;
    color: #4a4a4a; /* Um cinza escuro para boa legibilidade */
    line-height: 1.4;
}

.form-tip strong {
    color: var(--primary-color); /* Destaca a palavra "Dica" */
}

/* ====================================================== */
/* DESIGN DO NOVO CARD DE ANÚNCIO (V2)                    */
/* ====================================================== */

/* Remove a borda do link antigo */
.ad-card-link {
    text-decoration: none;
    color: inherit;
    border: none;
}

/* O novo container do card */
.ad-card-v2 {
    background-color: var(--surface-color);
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05), 0 4px 12px rgba(0,0,0,0.05);
    overflow: hidden; /* Garante que a imagem não vaze */
    display: flex;
    flex-direction: column;
    height: 100%; /* Para o grid */
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.ad-card-v2:hover {
    transform: translateY(-4px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.07), 0 6px 16px rgba(0,0,0,0.07);
}

/* 1. Bloco da Imagem */
.ad-card-v2-image {
    width: 100%;
    /* Força a proporção 16:9 */
    aspect-ratio: 16 / 9; 
    position: relative;
    background-color: var(--background-color); /* Cor de fundo enquanto a imagem carrega */
    overflow: hidden;
}

.ad-card-v2-image img {
    width: 100%;
    height: 100%;
    object-fit: cover; /* Garante que a imagem cubra o espaço */
}
/* NOVA REGRA: 
Força 'contain' em imagens de placeholder (Sheltons, Moedas)
*/
.ad-card-v2-image img.is-placeholder-img {
    object-fit: contain; /* <-- Esta é a mudança principal */
    
    /* Opcional: Adiciona um respiro para o ícone */
    padding: 10px;
    box-sizing: border-box;
    
    /* Opcional: Garante o fundo lavanda se a imagem for transparente */
    background-color: #f0e9fa; 
}

/* Fallback (ícone) se não houver imagem */
.image-fallback {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: #f0e9fa; /* Fundo lavanda claro */
}
.image-fallback span {
    font-size: 3rem;
    opacity: 0.6;
}

/* Tag de Destaque */
.featured-badge {
    position: absolute;
    top: 12px;
    left: 12px;
    background-color: var(--primary-color);
    color: white;
    font-size: 0.75rem;
    font-weight: 700;
    padding: 4px 8px;
    border-radius: 4px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.2);
}

/* 2. Bloco de Conteúdo */
.ad-card-v2-content {
    padding: 16px;
    flex-grow: 1; /* Faz o conteúdo crescer */
}

.ad-card-v2-meta {
    display: flex;
    gap: 8px;
    font-size: 0.8rem;
    color: var(--text-secondary);
    margin-bottom: 8px;
}
.ad-card-v2-meta span {
    background-color: #f7f3ff;
    padding: 2px 6px;
    border-radius: 4px;
}

.ad-card-v2-title {
    font-size: 1.1rem;
    font-weight: 700;
    margin: 0 0 12px 0;
    min-height: 2.6rem; /* Garante altura para 2 linhas */

    /* Evita quebra de título em muitas linhas */
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2; /* Para navegadores baseados em WebKit (Safari, Chrome antigos) */
    line-clamp: 2;          /* Propriedade padrão moderna */
    overflow: hidden;         /* Essencial para esconder o resto do texto */
    
    /* 'text-overflow: ellipsis;' removido por ser redundante aqui */
}

/* NOVO BLOCO DE PREÇO (MOSTRA AMBOS) */
.ad-card-v2-price {
    margin-top: auto; /* Empurra o preço para baixo */
}

.ad-card-v2-price .price-real {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--text-color);
}
.ad-card-v2-price .price-gold {
    font-size: 1rem; /* Tamanho equilibrado */
    font-weight: 600;
    color: #b45309; /* Cor Dourado Escuro (Mais legível) */
    margin-top: 4px;
    
    /* Alinhamento Flexbox para o ícone */
    display: flex;
    align-items: center;
    gap: 6px; /* Espaço entre ícone e texto */
}

/* Ajuste fino para o ícone não ficar distorcido */
.ad-card-v2-price .price-gold svg {
    flex-shrink: 0;
    filter: drop-shadow(0 1px 1px rgba(0,0,0,0.1)); /* Sombra leve no ícone */
}
.ad-card-v2-price .price-negotiable {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--success-color); /* Verde */
}


/* 3. Rodapé do Card */
.ad-card-v2-footer {
    padding: 12px 16px;
    border-top: 1px solid var(--border-color);
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.8rem;
    color: var(--text-secondary);
}
.ad-card-v2-footer span:first-child {
    font-weight: 500;
    color: var(--primary-color);
}

/* Remove o estilo antigo */
.ad-card {
    display: none;
}

/* ====================================================== */
/* ESTILO DO NOVO CAMPO DE UPLOAD DE IMAGEM               */
/* ====================================================== */

.file-input-wrapper {
    width: 100%;
    margin-bottom: 1rem;
}

/* Oculta o input de arquivo padrão */
.file-input-wrapper input[type="file"] {
    display: none;
}

/* O label que parece um botão */
.file-input-label {
    display: inline-block;
    background-color: #f7f3ff;
    border: 2px dashed var(--primary-color);
    color: var(--primary-color);
    padding: 20px 30px;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 500;
    text-align: center;
    transition: background-color 0.2s ease;
    width: 100%;
}

.file-input-label:hover {
    background-color: #f0e9fa;
}

/* Preview da imagem */
.file-preview-wrapper {
    margin-top: 1rem;
    position: relative;
    width: 200px; /* Tamanho do preview */
    height: 112px; /* Proporção 16:9 */
    background-color: var(--background-color);
    border-radius: 8px;
    overflow: hidden;
    display: none; /* Começa oculto */
}

.file-preview-wrapper img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Botão de remover imagem */
.remove-image-btn {
    position: absolute;
    top: 5px;
    right: 5px;
    background-color: rgba(0,0,0,0.6);
    color: white;
    border: none;
    border-radius: 50%;
    width: 24px;
    height: 24px;
    font-weight: bold;
    cursor: pointer;
    line-height: 24px;
    text-align: center;
    font-size: 14px;
}

/* ====================================================== */
/* LAYOUT DA NOVA PÁGINA DE ANÚNCIO (V2 - REMODELADO)     */
/* ====================================================== */

.ad-detail-grid {
    display: grid;
    grid-template-columns: 1fr; /* Coluna única em mobile */
    gap: 2rem;
    margin-top: 1.5rem;
}

/* Em telas maiores, divide em 2 colunas */
@media (min-width: 768px) {
    .ad-detail-grid {
        grid-template-columns: 2fr 1fr; /* 2/3 para info, 1/3 para sidebar */
    }
}

/* 1. Bloco Principal (Imagem, Título, Preço, Detalhes) */
.ad-detail-main {
    background-color: var(--surface-color);
    border-radius: 8px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.04);
    overflow: hidden; /* Para a imagem */
}

/* Wrapper da Imagem Principal (SEM CORTE) */
.ad-detail-image-wrapper {
    width: 100%;
    min-height: 250px; /* Altura mínima para fallbacks */
    background-color: #f0f0f0; /* Fundo para letterbox (se houver) */
    border-bottom: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    justify-content: center;
}
.ad-detail-image-wrapper img {
    width: 100%;
    height: auto;
    max-height: 75vh; /* Limita a altura de imagens muito altas */
    object-fit: contain; /* <-- ESTA É A MUDANÇA (MOSTRA SEM CORTAR) */
}
.ad-detail-image-wrapper .fallback-icon {
    /* O flex no pai já cuida do alinhamento */
    font-size: 4rem;
    color: var(--primary-color);
    opacity: 0.6;
}

/* Conteúdo (abaixo da imagem) */
.ad-detail-content {
    padding: 1.5rem 2rem 2rem 2rem;
}
.ad-detail-content .published-date {
    font-size: 0.85rem;
    color: var(--text-secondary);
    margin-bottom: 1rem;
}
.ad-detail-content h1 {
    font-size: 2rem;
    font-weight: 700;
    margin: 0 0 1rem 0;
}

/* Bloco de Preço (igual ao do card) */
.ad-detail-price {
    margin-bottom: 1.5rem;
}
.ad-detail-price .price-real {
    font-size: 2rem;
    font-weight: 700;
    color: var(--text-color);
}
.ad-detail-price .price-gold {
    font-size: 1.5rem;
    font-weight: 500;
    color: #b38600;
    margin-top: 4px;
}
.ad-detail-price .price-negotiable {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--success-color);
}

/* Lista de Detalhes (Categoria, Qtd, Classe) */
.ad-detail-meta-list {
    list-style: none;
    padding: 0;
    margin: 2rem 0;
    border-top: 1px solid var(--border-color);
    border-bottom: 1px solid var(--border-color);
}
.ad-detail-meta-list li {
    display: flex;
    justify-content: space-between;
    padding: 1rem 0;
    font-size: 0.95rem;
}
.ad-detail-meta-list li + li {
    border-top: 1px dashed var(--border-color);
}
.ad-detail-meta-list li strong {
    color: var(--text-secondary);
    margin-right: 1rem;
}
.ad-detail-meta-list li span {
    font-weight: 500;
    text-align: right;
}

/* Descrição */
.ad-detail-description h2 {
    font-size: 1.25rem;
    margin-bottom: 0.5rem;
}
.ad-detail-description p {
    font-size: 1rem;
    color: #333;
    line-height: 1.6;
    white-space: pre-wrap;
}

/* 2. Sidebar (Vendedor, Contato) */
.ad-detail-sidebar {
    /* No celular, fica normal (sem flutuar) */
    position: relative; 
    height: auto;
    z-index: 10; /* Garante que não fique atrás de nada */
}

/* Apenas em telas de PC/Tablet (maiores que 768px) ele fica Sticky */
@media (min-width: 768px) {
    .ad-detail-sidebar {
        position: sticky;
        top: 85px; /* Ajustado para ficar abaixo do cabeçalho */
        height: fit-content;
    }
}

/* NOVO Bloco do Vendedor */
.vendor-info-box {
    background-color: var(--surface-color);
    border-radius: 8px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.04);
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    align-items: center; /* Centraliza tudo */
}

/* Avatar Grande */
.vendor-avatar-large {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    background-color: var(--primary-color);
    color: white;
    font-size: 2.5rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1rem;
}

.vendor-info-box h2 {
    margin: 0 0 0.5rem 0;
    font-size: 1.5rem;
}

/* Estrelas de Avaliação */
.vendor-rating-summary {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 1.5rem;
}
.star-rating-display {
    font-size: 1.2rem;
    color: #ffc107; /* Amarelo Estrela */
}
.star-rating-display .star.empty {
    color: #e0e0e0; /* Cinza para estrela vazia */
}
.vendor-rating-summary .review-count {
    font-size: 0.85rem;
    color: var(--text-secondary);
    padding-top: 3px;
}

.vendor-info-box .vendor-link {
    font-size: 0.9rem;
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 500;
    margin-bottom: 1.5rem;
}
.vendor-info-box .vendor-link:hover {
    text-decoration: underline;
}

.vendor-info-box .button-primary {
    width: 100%;
    padding: 12px;
    font-size: 1rem;
}

.vendor-info-box {
    background-color: var(--surface-color);
    border-radius: 8px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.04);
    padding: 1.5rem;
    text-align: center;
}
.vendor-info-box h3 {
    margin: 0 0 0.5rem 0;
    font-size: 1.25rem;
}
.vendor-info-box .vendor-link {
    font-size: 0.9rem;
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 500;
}
.vendor-info-box .vendor-link:hover {
    text-decoration: underline;
}

.vendor-info-box .button-primary {
    width: 100%;
    margin-top: 1.5rem;
    padding: 12px;
    font-size: 1rem;
}

/* ====================================================== */
/* LAYOUT DA NOVA PÁGINA DE PERFIL (V2)                   */
/* ====================================================== */

/* 1. Cabeçalho do Perfil */
.profile-header-v2 {
    display: flex;
    flex-direction: column;
    align-items: center;
    background-color: var(--surface-color);
    padding: 2rem;
    border-radius: 8px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.04);
    margin-bottom: 2rem;
    text-align: center;
}

/* Avatar Grande */
.profile-avatar-large {
    width: 100px;
    height: 100px;
    border-radius: 50%;
    background-color: var(--primary-color);
    color: white;
    font-size: 3rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1rem;
}

.profile-header-v2 h1 {
    font-size: 2rem;
    margin: 0 0 0.5rem 0;
}

/* Sumário de Estrelas (do anuncio.js) */
.profile-header-v2 .vendor-rating-summary {
    margin-bottom: 1.5rem;
}

.profile-header-v2 .button-primary {
    padding: 10px 20px;
}

/* Informações de contato (para o *próprio* perfil) */
.profile-contact-info {
    margin-top: 1.5rem;
    font-size: 0.9rem;
    color: var(--text-secondary);
    background-color: var(--background-color);
    padding: 1rem;
    border-radius: 8px;
    width: 100%;
    max-width: 400px;
}
.profile-contact-info strong {
    color: var(--text-color);
}


/* 2. Popup de Avaliação (NOVO) */
#review-popup-overlay .star-rating-input {
    display: flex;
    justify-content: center;
    font-size: 2.5rem; /* Estrelas grandes para clicar */
    cursor: pointer;
    color: #e0e0e0; /* Cor padrão (vazia) */
    margin-bottom: 1rem;
}

#review-popup-overlay .star-rating-input .star {
    transition: color 0.1s ease;
}

/* Efeito Hover (passar o rato) */
#review-popup-overlay .star-rating-input:hover .star {
    color: #ffc107; /* Amarelo */
}

/* Efeito Hover nas estrelas individuais */
#review-popup-overlay .star-rating-input .star:hover ~ .star {
    color: #e0e0e0; /* Volta a cinza nas seguintes */
}

/* Estrelas 'selecionadas' (via JS) */
#review-popup-overlay .star-rating-input .star.selected,
#review-popup-overlay .star-rating-input .star.selected ~ .star {
    color: #ffc107;
}

/* 3. Lista de Avaliações (Cards) */
.reviews-list {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1.5rem;
}

.review-card {
    background-color: var(--surface-color);
    border-radius: 8px;
    padding: 1.5rem;
    box-shadow: 0 1px 3px rgba(0,0,0,0.04);
}

.review-card-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 1rem;
}

.review-avatar-small {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background-color: var(--background-color);
    color: var(--primary-color);
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
}

.review-card-header-info {
    display: flex;
    flex-direction: column;
}
.review-card-header-info .reviewer-name {
    font-weight: 700;
}
.review-card-header-info .star-rating-display {
    font-size: 1rem;
    color: #ffc107;
}
.review-card-header-info .star-rating-display .star.empty {
    color: #e0e0e0;
}

.review-card-body p {
    margin: 0;
    font-size: 0.95rem;
    line-height: 1.5;
    color: #333;
}

.review-card-footer {
    margin-top: 1rem;
    font-size: 0.8rem;
    color: var(--text-secondary);
    text-align: right;
}



/* ====================================================== */
/* AJUSTES DE LAYOUT (PERFIL E ANÚNCIO) v2.1              */
/* ====================================================== */

/* 1. Ajuste na Avaliação (para Anúncio e Perfil) */
/* Faz as estrelas e o texto ficarem um em cima do outro */
.vendor-rating-summary {
    display: flex;
    flex-direction: column; /* Coloca um item em cima do outro */
    align-items: center;  /* Centraliza */
    gap: 4px; /* Pequeno espaço entre estrelas e texto */
    margin-bottom: 1.5rem;
}
.vendor-rating-summary .review-count {
    padding-top: 0; /* Remove o padding antigo */
    font-size: 0.9rem;
}

/* 2. Ajustes no Cabeçalho do Perfil */
.profile-header-v2 {
    /* A maioria dos estilos já está correta (text-align: center) */
    padding-bottom: 2rem;
}

/* Texto "Membro desde..." */
.profile-header-v2 .profile-member-since {
    font-size: 0.9rem;
    color: var(--text-secondary);
    margin-top: -0.25rem; /* Puxa para perto do nome */
    margin-bottom: 1.5rem;
}

/* Container para os botões do perfil */
.profile-header-v2 .profile-header-buttons {
    display: flex;
    flex-direction: column;
    gap: 10px;
    width: 100%;
    max-width: 300px; /* Limita a largura dos botões */
    margin-top: 1rem;
}

/* 3. Estilo do Botão Secundário (Editar Perfil) */
.button-secondary {
    background-color: transparent;
    border: 2px solid var(--primary-color);
    color: var(--primary-color);
    padding: 10px 20px;
    border-radius: 8px;
    font-weight: 700;
    cursor: pointer;
    text-decoration: none;
    text-align: center;
    transition: background-color 0.2s ease, color 0.2s ease;
}
.button-secondary:hover {
    background-color: var(--primary-color);
    color: white;
}

/* ====================================================== */
/* ESTILOS DAS AVALIAÇÕES (FALTANTES)                    */
/* ====================================================== */

/* Estilo das estrelas (cheias e vazias) */
.star-rating-display .star {
    font-size: 1.5rem; /* Ajuste o tamanho conforme necessário */
    line-height: 1;
}

.star.filled {
    color: #ffc107; /* Cor da estrela preenchida */
}

.star.empty {
    color: #e0e0e0; /* Cor da estrela vazia */
}

/* Estilos para o novo layout da lista de reviews */
.reviews-list .review-card {
    border-bottom: 1px solid var(--border-color);
    padding: 1.5rem 0;
}

/* ====================================================== */
/* ESTILOS DO NOVO MENU DROPDOWN DE USUÁRIO               */
/* ====================================================== */

.nav-dropdown {
    position: relative;
    display: inline-block;
}

.nav-dropdown-toggle {
    display: flex;
    align-items: center;
    gap: 0.75rem; /* 12px */
    background-color: var(--surface-color);
    border: 1px solid var(--border-color);
    padding: 0.5rem 1rem;
    border-radius: 24px; /* Arredondado */
    cursor: pointer;
    font-family: var(--font-family);
    font-size: 0.9rem;
    font-weight: 500;
    transition: background-color 0.2s;
}

.nav-dropdown-toggle:hover {
    background-color: var(--background-color);
}

.nav-dropdown-toggle .review-avatar-small {
    /* O estilo já existe no style.css, mas garantimos o tamanho */
    width: 32px;
    height: 32px;
    font-size: 1rem;
}

.nav-dropdown-toggle .nav-dropdown-chevron {
    width: 16px;
    height: 16px;
    color: var(--text-secondary);
    transition: transform 0.2s;
}

/* Gira a seta quando o menu está aberto */
.nav-dropdown-toggle:not(.collapsed) .nav-dropdown-chevron {
    transform: rotate(180deg);
}
.nav-dropdown-toggle.collapsed .nav-dropdown-chevron {
    transform: rotate(0deg);
}

.nav-dropdown-menu {
    position: absolute;
    top: 110%; /* Ligeiramente abaixo do botão */
    right: 0;
    z-index: 1000;
    background-color: var(--surface-color);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.08);
    min-width: 220px; /* Largura mínima do menu */
    padding: 0.5rem 0; /* Espaçamento interno (topo/baixo) */
    overflow: hidden;
}

.nav-dropdown-menu.hidden {
    display: none;
}

.nav-dropdown-item {
    display: block;
    width: 100%;
    padding: 0.75rem 1.25rem;
    text-decoration: none;
    color: var(--text-color);
    background: none;
    border: none;
    text-align: left;
    font-size: 0.95rem;
    cursor: pointer;
}

.nav-dropdown-item:hover {
    background-color: var(--background-color);
}

.nav-dropdown-divider {
    height: 1px;
    margin: 0.5rem 0;
    background-color: var(--border-color);
}


.review-author {
    margin: 5px 0 10px 0;
    font-size: 0.9rem;
    color: var(--text-secondary);
}

.review-author a {
    color: var(--text-primary);
    text-decoration: none;
    font-weight: 500;
}

.review-author a:hover {
    text-decoration: underline;
}

.review-card-body p {
    margin: 0;
    color: var(--text-primary);
}

.review-card-footer {
    font-size: 0.8rem;
    color: var(--text-secondary);
    margin-top: 10px;
}
/* =================================== */
/* ITEM 4.1 - GRID DE ANÚNCIOS (4 colunas) */
/* =================================== */

.dashboard-grid {
  display: grid;
  /* Essa linha mágica faz tudo:
     - repeat(auto-fit...): Cria quantas colunas couberem.
     - minmax(270px, 1fr): Diz que cada coluna (card) 
       deve ter no MÍNIMO 270px e no MÁXIMO 1 fração (1fr).

     Resultado: Em telas grandes (ex: 1200px), caberão 4 colunas.
     Em telas menores (tablet), caberão 2 ou 3.
     No celular, caberá 1.
     Tudo automático.
  */
  grid-template-columns: repeat(auto-fit, minmax(270px, 1fr));
  gap: 20px; /* Ajuste o espaço entre os cards como preferir */
}
/* ============================================== */
/* CORREÇÃO ITEM 4.1 - LARGURA DO WRAPPER DE ANÚNCIOS */
/* ============================================== */

#my-ads-view {
    /* Remove a limitação de 600px vinda do .form-content-wrapper */
    max-width: none;
}
/* ====================================================== */
/* CORREÇÕES DO ITEM 1 (PÁGINA PROFILE)                   */
/* ====================================================== */

/* --- Item 1.2: Estilo "Último Acesso" --- */
.profile-last-seen {
    font-size: 0.9rem;
    color: var(--text-secondary);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
}

/* Círculo verde para "Online" */
.profile-last-seen span {
    display: inline-block;
    width: 10px;
    height: 10px;
    background-color: var(--success-color);
    border-radius: 50%;
}


/* --- Item 1.3: Compactar Cabeçalho do Perfil --- */
.profile-header-v2 h1 {
    margin-bottom: 0.25rem; /* Menos espaço */
}
.profile-header-v2 .profile-last-seen {
    margin-top: 0;
    margin-bottom: 1rem;
}
.profile-header-v2 .vendor-rating-summary {
    margin-bottom: 0.5rem; /* Menos espaço */
}
.profile-header-v2 .profile-member-since {
    margin-top: 0; /* Menos espaço */
    margin-bottom: 1.5rem;
}

/* --- Item 1.4: Remodelar Card de Avaliação --- */

/* Remove bordas e paddings antigos */
.reviews-list .review-card {
    border-bottom: 1px solid var(--border-color);
    padding: 1.5rem 0;
    box-shadow: none;
    border-radius: 0;
}
.reviews-list .review-card:last-child {
    border-bottom: none;
}

/* Cabeçalho do Card (Avatar, Nome, Estrelas) */
.review-card-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 1rem;
}

/* Avatar (reutiliza o estilo que já existe) */
.review-avatar-small {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background-color: var(--background-color);
    color: var(--primary-color);
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0; /* Impede que o avatar encolha */
}

/* Bloco do Nome e Data */
.review-card-header-info {
    display: flex;
    flex-direction: column;
    flex-grow: 1; /* Ocupa o espaço do meio */
}
.review-card-header-info .reviewer-name {
    font-weight: 700;
    color: var(--text-color);
    text-decoration: none;
}
.review-card-header-info .reviewer-name:hover {
    text-decoration: underline;
}
.review-card-header-info .review-date {
    font-size: 0.85rem;
    color: var(--text-secondary);
}

/* Estrelas (empurra para a direita) */
.review-card-header .star-rating-display {
    margin-left: auto;
    flex-shrink: 0;
    font-size: 1rem;
    color: #ffc107;
}

/* Corpo do Comentário */
.review-card-body p {
    margin: 0;
    font-size: 1rem; /* Aumenta um pouco a fonte */
    line-height: 1.6;
    color: var(--text-color);
}

/* Esconde o rodapé antigo */
.review-card-footer {
    display: none;
}

/* ====================================================== */
/* CORREÇÕES DO ITEM 2 (PÁGINA DO ANÚNCIO) - v2           */
/* ====================================================== */

/* --- Item 2.1: Estilo dos Botões do Dono (Movidos para Sidebar) --- */
.owner-actions {
    display: flex;
    flex-direction: column; /* Botões um em cima do outro */
    gap: 12px;
    width: 100%; /* Ocupa a largura do card */
}

/* Força os dois botões a terem o mesmo estilo arredondado */
.owner-actions .button-primary,
.owner-actions .button-secondary {
    width: 100%;
    margin-top: 0;
    font-size: 1rem; /* Tamanho padrão */

    /* HARMONIZAÇÃO: Deixa os dois arredondados */
    border-radius: 24px; 
}

/* Ajuste específico para o botão secundário (Destacar) */
.owner-actions .button-secondary {
    padding-top: 12px;  /* Ajusta padding para ficar igual ao primário */
    padding-bottom: 12px;
    line-height: 1.5; /* Garante altura de linha consistente */
}

/* Remove o padding que colocamos antes (não é mais necessário) */
.vendor-info-box .button-primary {
    margin-top: 0;
}

/* --- Item 2.2: Compactar Card do Vendedor --- */

/* Remove o padding de cima e de baixo */
.vendor-info-box {
    padding-top: 1.5rem;
    padding-bottom: 1.5rem;
}

/* Bloco de Identidade */
.vendor-id-block {
    display: flex;
    flex-direction: column;
    align-items: center;
    margin-bottom: 1.5rem;
}

.vendor-id-block .vendor-avatar-large {
    margin-bottom: 1rem;
}
.vendor-id-block h2 {
    margin-bottom: 0.25rem; /* Menos espaço */
}
.vendor-id-block .vendor-link {
    margin-bottom: 0; /* Remove margem */
}

/* Bloco de Ação */
.vendor-action-block {
    display: flex;
    flex-direction: column;
}
.vendor-action-block .vendor-rating-summary {
    margin-bottom: 1.5rem; /* Espaço entre estrelas e botão */
}

/* Remove a margem superior padrão do botão */
.vendor-info-box .button-primary {
    margin-top: 0;
}
/* =================================== */
/* ITEM 5.1 - AJUSTES DAS CATEGORIAS (INDEX) */
/* =================================== */

/* 1. Diminui os espaçamentos da grade */
.categories-grid {
    gap: 0.75rem; /* Era 1rem */
}

/* 2. Diminui o padding (espaço interno) de cada card */
.category-card {
    padding: 1rem 0.75rem; /* Era 1.5rem 1rem */
}

/* 3. "Não mostrar todas" - Esconde os últimos 2 itens */
/* (Mude o :nth-child(n+10) para n+9, n+8, etc. para esconder mais) */
.categories-grid .category-card:nth-child(n+10) {
    display: none;
}

/* Garante que o "Ver Tudo" (que é o 11º) apareça */
.categories-grid .category-card[data-category=""] {
    display: block;
}
/* ====================================================== */
/* IDEIA 2: NOVO CARROSSEL DE CATEGORIAS "PILL"           */
/* ====================================================== */

.categories-section {
    margin-bottom: 2rem; /* Menos margem */
}

/* 1. O Contêiner (O Carrossel) */
.category-pills-container {
    display: flex;
    gap: 0.75rem; /* 12px */
    overflow-x: auto; /* A Mágica: Habilita a rolagem horizontal */
    padding-bottom: 1rem; /* Espaço para a barra de rolagem não colar */

    /* Esconde a barra de rolagem (mas mantém a funcionalidade) */
    scrollbar-width: none; /* Firefox */
    -ms-overflow-style: none; /* IE */
}
.category-pills-container::-webkit-scrollbar {
    display: none; /* Chrome, Safari */
}

/* 2. As "Pills" (Etiquetas) */
.category-pill {
    display: flex;
    align-items: center;
    gap: 0.5rem; /* 8px */

    background-color: var(--surface-color);
    border: 1px solid var(--border-color);
    border-radius: 24px; /* Totalmente arredondado */

    padding: 0.6rem 1rem;

    text-decoration: none;
    color: var(--text-color);
    font-weight: 500;
    font-size: 0.9rem;

    white-space: nowrap; /* Impede que o texto quebre a linha */
    transition: all 0.2s;
}

.category-pill:hover {
    background-color: var(--background-color);
    border-color: var(--primary-color);
    color: var(--primary-color);
}
/* ====================================================== */
/* ESTILO DA "PILL" DE CATEGORIA ATIVA                    */
/* ====================================================== */

.category-pill.active {
    background-color: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
}

/* Opcional: Para o hover em uma pill ativa não fazer nada */
.category-pill.active:hover {
    background-color: var(--primary-hover);
    color: white;
}
/* ====================================================== */
/* BOTÕES DE NAVEGAÇÃO DO CARROSSEL DE CATEGORIAS         */
/* ====================================================== */

.category-carousel-wrapper {
    position: relative; /* Contexto para os botões */
}

/* Oculta as "pills" que saem para fora do wrapper */
.category-pills-container {
    padding-left: 2.5rem; /* Espaço para o botão "Anterior" */
    padding-right: 2.5rem; /* Espaço para o botão "Próximo" */

    /* Aplica um "clip" para esconder o overflow */
    /* Isso é melhor que overflow:hidden pois mantém a rolagem */
    clip-path: inset(0 2.5rem 0 2.5rem); 
}

.carousel-nav-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    z-index: 10;

    background-color: var(--surface-color);
    border: 1px solid var(--border-color);
    border-radius: 50%;
    width: 40px;
    height: 40px;

    display: flex;
    align-items: center;
    justify-content: center;

    cursor: pointer;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
    transition: all 0.2s;
}

.carousel-nav-btn:hover {
    background-color: var(--background-color);
    transform: translateY(-50%) scale(1.05);
}

.carousel-nav-btn svg {
    width: 20px;
    height: 20px;
    color: var(--primary-color);
}

#btn-scroll-prev {
    left: 0;
}

#btn-scroll-next {
    right: 0;
}

/* Classe para esconder os botões via JS */
.carousel-nav-btn.hidden {
    display: none;
}
/* ====================================================== */
/* BOTÃO "ENTRAR" ATUALIZADO (BASEADO NO DROPDOWN)    */
/* ====================================================== */

.nav-link-button {
    display: inline-block;
    text-decoration: none;
    background-color: var(--surface-color);
    border: 1px solid var(--border-color);

    /* Mesmo padding e fonte do button-primary para alinhamento */
    padding: 0.7rem 1.5rem; 
    font-size: 1rem;

    border-radius: 24px;
    cursor: pointer;
    font-family: var(--font-family);
    font-weight: 500; /* Mais leve que o "Anunciar" */
    color: var(--text-color);
    transition: background-color 0.2s;
}

.nav-link-button:hover {
    background-color: var(--background-color);
}
/* ====================================================== */
/* TAG DE SERVIDOR PARA OS CARDS (IDEIA 1B)             */
/* ====================================================== */

.ad-card-v2-server-tag {
    display: inline-block;
    font-size: 0.8rem;
    font-weight: 600;
    background-color: #f0e9fa; /* Fundo lavanda (mesmo do fallback) */
    color: var(--primary-color);
    padding: 2px 8px;
    border-radius: 12px;
    margin-bottom: 0.5rem; /* 8px */
}
/* ====================================================== */
/* TAG DE SERVIDOR (ESTILO SUTIL - CANTO DIREITO)       */
/* ====================================================== */

.subtle-server-badge {
    position: absolute;
    bottom: 12px;
    right: 12px;
    z-index: 2; /* Garante que fique acima da imagem */

    /* Este é o estilo "sutil" */
    background-color: rgba(26, 32, 44, 0.7); /* Cinza escuro, 70% opaco */
    color: white;

    /* Mesmo tamanho do featured-badge */
    font-size: 0.75rem;
    font-weight: 700;
    padding: 4px 8px;
    border-radius: 4px;

    /* Efeito de desfoque de fundo para legibilidade */
    backdrop-filter: blur(2px);
    -webkit-backdrop-filter: blur(2px);
}
/* ====================================================== */
/* NOVOS ESTILOS DOS BOTÕES "BUMP"                      */
/* ====================================================== */

.button-bump,
.button-bump-disabled {
    /* Pega o estilo base do botão de editar */
    background: none;
    padding: 0.4rem 0.8rem;
    border-radius: 6px;
    cursor: pointer;
    font-weight: 600;
    font-size: 0.8rem;
    transition: all 0.2s;
    border: 1px solid var(--success-color); /* Verde */
    color: var(--success-color);
}

.button-bump:hover {
    background-color: var(--success-color);
    color: white;
}

/* ====================================================== */

/* IDEIA 1: NOVO LAYOUT DO CABEÇALHO (Estilo OLX)         */

/* ====================================================== */



.main-header.new-header-layout .header-content {

    display: grid;

    grid-template-columns: auto 1fr auto; /* Logo | Busca | Botões */

    gap: 2rem;

    width: 100%;

    max-width: 1400px; /* Pode ser maior para acomodar a busca */

}



/* 1. O formulário de busca no meio */

#header-search-form {

    display: flex;

    align-items: center;

    width: 100%;

    max-width: 700px; 

    margin: 0 auto;

    background-color: var(--background-color);

    border: 1px solid var(--border-color);

    border-radius: 24px;

    /* overflow: hidden; */ /* <-- DELETE OU COMENTE ESTA LINHA */

    transition: border-color 0.2s, box-shadow 0.2s; /* Adiciona transição */

}



/* Adiciona um efeito de foco ao formulário inteiro */

#header-search-form:focus-within {

    border-color: var(--primary-color);

    box-shadow: 0 0 8px rgba(110, 10, 214, 0.1);

}


/* 2. O input de texto */

#header-search-input {

    flex-grow: 1; /* Ocupa o espaço */

    border: none;

    background: none;

    padding: 0.8rem 1.2rem;

    font-size: 0.95rem;

}

#header-search-input:focus {

    outline: none;

}



/* 3. O filtro de servidor */

#header-server-filter {

    border: none;

    background: none;

    padding: 0.8rem 1rem;

    font-size: 0.95rem;

    color: var(--text-secondary);

    font-weight: 500;

    border-left: 1px solid var(--border-color); /* Linha divisória */

    cursor: pointer;

}

#header-server-filter:focus {

    outline: none;

}



/* ====================================================== */

/* NOVO DESIGN DA BUSCA (LUPA INTERNA)                    */

/* ====================================================== */



.search-input-wrapper {

    display: flex;

    align-items: center;

    flex-grow: 1; /* Faz esta parte crescer */

    padding-left: 1.2rem;

}



.search-icon {

    width: 20px;

    height: 20px;

    color: var(--text-secondary);

    margin-right: 0.75rem; /* Espaço entre o ícone e o texto */

    flex-shrink: 0;

}



#header-search-input {

    /* Remove todos os estilos antigos */

    flex-grow: 1; 

    border: none;

    background: none;

    padding: 0.8rem 0; /* Remove o padding lateral antigo */

    font-size: 0.95rem;

    min-width: 150px;

}



/* O filtro do servidor agora precisa ter o padding esquerdo ajustado */

#header-server-filter {

    padding: 0.8rem 1rem 0.8rem 0.5rem; /* Menos padding à esquerda */

}

/* Ajustes no espaçamento da navegação do usuário */
.new-header-layout .user-navigation {
    gap: 1rem; /* Um pouco menos de espaço */
    flex-shrink: 0; /* Impede que os botões encolham */
}

/* Ajuste no botão "Anunciar" para ficar como na OLX */
.new-header-layout .button-primary {
    background-color: #ff8c00; /* Laranja (inspirado na OLX) */
    color: white;
}
.new-header-layout .button-primary:hover {
    background-color: #e67e00;
}
/* ====================================================== */
/* LAYOUT RESPONSIVO (MOBILE) - NOVO BLOCO                */
/* ====================================================== */

/* Ativa estas regras em telas com 768px de largura ou menos */
@media (max-width: 768px) {

    /* 1. Ajusta o espaçamento geral do header */
    .main-header, .main-header.new-header-layout {
        padding: 1rem;
    }

    /* 2. O NOVO LAYOUT DO CABEÇALHO */
    .main-header.new-header-layout .header-content {
        /* Muda de 3 colunas para 2 linhas */
        grid-template-columns: 1fr auto; /* Col 1: Logo, Col 2: Nav */
        grid-template-areas: 
            "logo nav"
            "search search"; /* Linha 2: Busca */
        gap: 1rem; /* Espaço entre as linhas e colunas */
    }

    /* 3. Posiciona os elementos na nova grade */
    .main-header.new-header-layout .logo-link {
        grid-area: logo;
    }

    .main-header.new-header-layout #header-search-form {
        grid-area: search;
        width: 100%;
        max-width: none; /* Remove o max-width de 700px */
        margin-top: 0;
        order: 3; /* Garante que venha por último */
    }

    .main-header.new-header-layout .user-navigation {
        grid-area: nav;
        gap: 0.5rem; /* Diminui o espaço entre os botões */
    }

    /* 4. Corrige o "Olá, Tidu" muito grande (Problema #2) */
    .nav-dropdown-username {
        display: none; /* Esconde o texto */
    }
    .nav-dropdown-toggle {
        gap: 0.5rem; /* Diminui o espaço no dropdown */
        padding: 0.5rem; /* Deixa ele mais "quadrado" */
    }
    .nav-dropdown-toggle .nav-dropdown-chevron {
        display: none; /* Esconde a seta */
    }

    /* 5. Corrige o "Anunciar" (Problema #1) */
    .new-header-layout .button-primary {
        /* Diminui o padding e a fonte */
        padding: 0.6rem 0.8rem;
        font-size: 0.85rem;
    }

    /* 6. Corrige o "Entrar" */
    .nav-link-button {
        padding: 0.6rem 0.8rem;
        font-size: 0.85rem;
    }

    /* Ajusta o padding principal do container */
    .container {
        padding: 1rem;
    }

    /* Oculta os botões de seta do carrossel no mobile */
    /* (No mobile, a rolagem por toque é nativa) */
    .carousel-nav-btn {
        display: none;
    }
    .category-pills-container {
        clip-path: none;
        padding-left: 0;
        padding-right: 0;
    }
}
/* ====================================================== */
/* ESTILOS DA CALCULADORA DE GOLD (PÁGINA DE ANÚNCIO)     */
/* ====================================================== */

.calculator-box {
    background-color: var(--surface-color);
    border-radius: 8px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.04);
    padding: 1.5rem;
    margin-top: 1.5rem; /* Espaço abaixo da caixa do vendedor */
}

.calculator-box h4 {
    margin-top: 0;
    margin-bottom: 0.5rem;
    font-size: 1.1rem;
    text-align: center;
    color: var(--text-color);
}

.calculator-box p {
    font-size: 0.9rem;
    color: var(--text-secondary);
    text-align: center;
    margin-bottom: 1rem;
    margin-top: 0;
}

/* Reutiliza o estilo de formulário */
.calculator-box .form-group {
    margin-bottom: 1rem;
}
.calculator-box .form-group label {
    font-size: 0.85rem;
}

/* Remove as setas do input[type=number] */
.calculator-box .form-group input {
    appearance: textfield;
}
.calculator-box .form-group input::-webkit-outer-spin-button,
.calculator-box .form-group input::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

.calc-result {
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px dashed var(--border-color);
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 1.1rem;
}

.calc-result span {
    color: var(--text-secondary);
    font-weight: 500;
}

.calc-result strong {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--primary-color);
}
/* --- Correção v7: Card Clicável (Dashboard) --- */

/* 1. Define o card como o "contexto" de camada */
.dashboard-card-wrapper {
    position: relative;
}

/* 2. O link fantasma:
   - position: absolute = flutua sobre o card
   - top/left/right/bottom = 0 = estica para cobrir o card
   - z-index: 1 = coloca ele na camada 1
*/
.dashboard-card-clickable-link {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 1;
    /* Opcional: para ver a área (descomente se precisar) */
    /* background-color: rgba(255, 0, 0, 0.1); */
}

/* 3. O rodapé com os botões:
   - position: relative = permite que o z-index funcione
   - z-index: 2 = coloca ele na camada 2 (ACIMA do link)
*/
.ad-card-v2-footer {
    position: relative;
    z-index: 4;
}
/* --- Estilos de Status do Anúncio (Pausado/Vendido) --- */
.ad-card-v2 .ad-status-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(255, 255, 255, 0.7); /* Fundo branco semi-transparente */
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 3; /* Acima do link clicável (z-index: 1) */
    border-radius: 8px; /* Para acompanhar o card */
}

.ad-card-v2 .ad-status-badge {
    background-color: var(--error-color);
    color: white;
    font-size: 1rem;
    font-weight: 700;
    padding: 0.5rem 1.5rem;
    border-radius: 8px;
    transform: rotate(-10deg); /* Efeito de carimbo */
    border: 2px solid white;
    box-shadow: 0 2px 10px rgba(0,0,0,0.2);
}

.ad-card-v2 .ad-status-badge.status-inactive {
    background-color: #d97706; /* Laranja */
}

.ad-card-v2 .ad-status-badge.status-sold {
    background-color: var(--error-color); /* Vermelho */
}

/* Botões de Ação de Status */
.button-pause, .button-sold, .button-reactivate {
    /* Pega o estilo base do botão de editar */
    background: none;
    padding: 0.4rem 0.8rem;
    border-radius: 6px;
    cursor: pointer;
    font-weight: 600;
    font-size: 0.8rem;
    transition: all 0.2s;
}

.button-pause {
    border: 1px solid #d97706; /* Laranja */
    color: #d97706;
}
.button-pause:hover:not(:disabled) {
    background-color: #d97706;
    color: white;
}

.button-sold {
    border: 1px solid var(--error-color);
    color: var(--error-color);
}
.button-sold:hover:not(:disabled) {
    background-color: var(--error-color);
    color: white;
}

.button-reactivate {
    border: 1px solid var(--success-color);
    color: var(--success-color);
}
.button-reactivate:hover:not(:disabled) {
    background-color: var(--success-color);
    color: white;
}
/* --- Sistema de Denúncia (Botão e Popup) --- */

.report-link {
    display: block;
    text-align: center;
    font-size: 0.9rem;
    color: var(--text-secondary);
    font-weight: 500;
    text-decoration: none;
    margin-top: 1.5rem; /* Espaço abaixo da caixa do vendedor */
    padding-bottom: 1rem;
}

.report-link:hover {
    color: var(--error-color);
    text-decoration: underline;
}

/* O popup (modal) */
#report-popup-overlay .popup-content {
    text-align: left;
}

#report-popup-overlay h2 {
    text-align: center;
    margin-top: 0;
    color: var(--error-color);
}

.report-reason-list {
    list-style: none;
    padding: 0;
    margin: 1.5rem 0;
}

.report-reason-list li {
    margin-bottom: 0.75rem;
}

.report-reason-list label {
    display: flex;
    align-items: center;
    font-size: 1rem;
    cursor: pointer;
}

.report-reason-list input[type="radio"] {
    margin-right: 0.75rem;
    transform: scale(1.1);
}

#report-popup-overlay textarea {
    width: 100%;
    min-height: 80px;
    margin-top: 0.5rem;
    resize: vertical;
    /* Reutiliza estilos de input */
    padding: 0.8rem 1rem;
    border: 2px solid var(--border-color);
    border-radius: 8px;
    font-size: 1rem;
    background-color: var(--background-color);
}
#report-popup-overlay textarea:focus {
    outline: none;
    border-color: var(--primary-color);
    background-color: var(--surface-color);
}

#report-popup-buttons {
    display: flex;
    gap: 1rem;
    margin-top: 1.5rem;
}

#report-popup-buttons .button-primary,
#report-popup-buttons .button-secondary {
    width: 100%;
    margin: 0;
}

/* (O estilo .button-secondary já deve existir, 
   mas se não existir, este é um fallback) */
.button-secondary {
     background: none;
     border: 2px solid var(--border-color);
     color: var(--text-secondary);
     padding: 0.7rem 1.5rem;
     font-size: 1rem;
     font-weight: 600;
     border-radius: 24px;
     cursor: pointer;
     transition: all 0.2s;
}
.button-secondary:hover {
     background-color: var(--background-color);
     border-color: var(--border-color);
     color: var(--text-color);
}

/* --- Link de Denúncia de Perfil --- */
.profile-report-link {
    display: block;
    text-align: center;
    font-size: 0.9rem;
    color: var(--text-secondary);
    font-weight: 500;
    text-decoration: none;
    margin-top: 1.5rem; /* Espaço abaixo da caixa do vendedor */
    padding-bottom: 1rem;
}

.profile-report-link:hover {
    color: var(--error-color);
    text-decoration: underline;
}
/* ====================================================== */
/* ESTILOS DO POPUP DE COMPRA DE QUANTIDADE (IDEIA 1)     */
/* ====================================================== */

.buy-popup-info {
    font-size: 0.95rem;
    color: var(--text-secondary);
    margin-bottom: 0.5rem;
}

.buy-popup-info strong {
    color: var(--text-color);
}

.buy-popup-total {
    margin-top: 1.5rem;
    padding-top: 1.5rem;
    border-top: 1px dashed var(--border-color);
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 1.1rem;
}

.buy-popup-total span {
    color: var(--text-secondary);
    font-weight: 500;
}

.buy-popup-total strong {
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--primary-color);
}
/* --- SISTEMA DE NOTIFICAÇÕES (DROPDOWN) --- */
.nav-actions-container {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.notification-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}

.nav-icon-btn {
    background: none;
    border: none;
    cursor: pointer;
    padding: 8px;
    border-radius: 50%;
    color: var(--text-color);
    transition: background 0.2s;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
}

.nav-icon-btn:hover {
    background-color: var(--background-color);
    color: var(--primary-color);
}

.nav-icon-btn svg {
    width: 24px;
    height: 24px;
}

/* O Ponto Vermelho (Badge) */
.notification-badge {
    position: absolute;
    top: 0px;
    right: 0px;
    background-color: var(--error-color);
    color: white;
    font-size: 0.7rem;
    font-weight: bold;
    min-width: 18px;
    height: 18px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 2px solid var(--surface-color); /* Borda para separar do ícone */
}

/* O Menu Flutuante */
.notification-dropdown {
    position: absolute;
    top: 120%; /* Logo abaixo do sino */
    right: -10px;
    width: 320px;
    background-color: var(--surface-color);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.15);
    z-index: 1000;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    animation: fadeIn 0.2s ease;
}
.notification-dropdown.hidden {
    display: none;
}

.notification-header {
    padding: 12px 16px;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-weight: 600;
    background-color: #f8f9fa; /* Levemente cinza */
}

.notification-list-mini {
    max-height: 300px;
    overflow-y: auto;
}

.notification-item-mini {
    padding: 12px 16px;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    gap: 12px;
    align-items: start;
    font-size: 0.9rem;
    text-decoration: none;
    color: var(--text-color);
    transition: background 0.2s;
}
.notification-item-mini:hover {
    background-color: var(--background-color);
}
.notification-item-mini.unread {
    background-color: #f0e9fa; /* Lavanda bem claro */
}
.notification-item-mini .icon {
    font-size: 1.2rem;
}

.notification-footer {
    padding: 10px;
    text-align: center;
    border-top: 1px solid var(--border-color);
    background-color: var(--surface-color);
}
.notification-footer a {
    font-size: 0.85rem;
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 600;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(-10px); }
    to { opacity: 1; transform: translateY(0); }
}
/* --- TOAST NOTIFICATIONS (Popups) --- */
.toast-container {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 9999;
    display: flex;
    flex-direction: column;
    gap: 10px;
    pointer-events: none; /* Permite clicar através do container */
}

.toast {
    background-color: var(--surface-color);
    color: var(--text-color);
    min-width: 300px;
    max-width: 400px;
    padding: 16px;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    border-left: 5px solid var(--primary-color);
    display: flex;
    align-items: flex-start;
    gap: 12px;
    pointer-events: auto; /* Reativa cliques no toast */
    
    /* Animação de Entrada */
    opacity: 0;
    transform: translateX(100%);
    transition: all 0.3s cubic-bezier(0.68, -0.55, 0.27, 1.55);
}

.toast.show {
    opacity: 1;
    transform: translateX(0);
}

.toast.hiding {
    opacity: 0;
    transform: translateX(100%);
}

/* Tipos de Toast */
.toast.success { border-left-color: var(--success-color); }
.toast.error { border-left-color: var(--error-color); }
.toast.info { border-left-color: var(--primary-color); }
.toast.warning { border-left-color: #f59e0b; }

.toast-icon {
    font-size: 1.5rem;
    line-height: 1;
}

.toast-content {
    flex: 1;
}

.toast-title {
    font-weight: 700;
    margin-bottom: 4px;
    font-size: 0.95rem;
}

.toast-message {
    font-size: 0.85rem;
    color: var(--text-secondary);
    line-height: 1.4;
}

.toast-close {
    background: none;
    border: none;
    color: var(--text-secondary);
    cursor: pointer;
    font-size: 1.2rem;
    padding: 0;
    line-height: 1;
    opacity: 0.6;
}
.toast-close:hover { opacity: 1; }

/* --- AJUSTES MOBILE (CABEÇALHO COMPACTO) --- */
@media (max-width: 768px) {
    
    /* 1. Reduz a altura e espaçamento do cabeçalho */
    .main-header {
        padding: 0.5rem 0.8rem; /* Mais fino */
    }
    
    .header-content {
        gap: 0.5rem; /* Aproxima a Logo dos Botões */
        justify-content: space-between;
    }

    /* 2. Ajusta a Logo */
    .logo {
        font-size: 1.1rem; /* Texto menor */
    }

    /* 3. Esconde a Barra de Busca no Mobile para dar espaço */
    /* (Opcional: Se quiser manter, mude display para 'flex' e reduza width) */
    #header-search-form {
        display: flex; 
    }

    /* 4. Container de Ações (Sino, Perfil, Botão) bem juntinhos */
    .nav-actions-container {
        gap: 6px; /* Ícones próximos */
    }

    /* 5. Botão "Anunciar" compacto */
    .nav-actions-container .button-primary {
        padding: 6px 12px; /* Menor */
        font-size: 0.75rem; /* Texto menor */
        height: auto;
        margin-left: 0 !important; /* Remove margem extra inline */
    }

    /* 6. Ícones e Avatar menores */
    .nav-icon-btn {
        padding: 4px; /* Menos espaço clicável vazio */
    }
    .nav-icon-btn svg {
        width: 22px;
        height: 22px;
    }
    
    .review-avatar-small {
        width: 28px;
        height: 28px;
        font-size: 0.8rem;
    }

    /* 7. Garante que o nome "Olá, Fulano" suma no mobile */
    /* (O utils.js já adiciona a classe .mobile-hide, aqui fazemos ela funcionar) */
    .mobile-hide {
        display: none !important;
    }
    
    /* Ajuste do Chevron (setinha) do menu */
    .nav-dropdown-chevron {
        display: none; /* Esconde a setinha no mobile para economizar espaço */
    }
}
/* --- CORREÇÃO MOBILE: NOTIFICAÇÕES --- */
@media (max-width: 768px) {
    .notification-dropdown {
        /* Muda de 'absolute' (preso ao botão) para 'fixed' (preso à tela) */
        position: fixed;
        top: 65px; /* Distância do topo (altura do header aprox.) */
        right: 10px;
        left: 10px; /* Força a esticar da esquerda à direita */
        width: auto; /* Remove a largura fixa de 320px */
        max-width: none;
        
        /* Garante que não fique gigante na vertical */
        max-height: 80vh; 
        overflow-y: auto;
        
        /* Sombra mais forte para destacar */
        box-shadow: 0 10px 40px rgba(0,0,0,0.3);
    }

    /* Ajuste para o triângulo (setinha) do menu não ficar flutuando errado */
    .notification-dropdown::before {
        display: none; 
    }
}


/* ====================================================== */
/* AJUSTES LEILÃO (VERSÃO FINAL LIMPA)                    */
/* ====================================================== */

/* 1. ALINHAMENTO DO CABEÇALHO */
/* Garante que logo fique na esquerda e perfil na direita */
.main-header.new-header-layout .header-content {
    justify-content: space-between; 
}

/* Se não houver busca no meio, empurra o perfil para a ponta */
.user-navigation {
    margin-left: auto; 
}

/* Esconde o botão anunciar onde não é necessário */
.hide-announce-btn .nav-actions-container .button-primary {
    display: none !important;
}

/* 2. TAG "LEILÃO AO VIVO" (Simples, ao lado do título) */
.live-auction-badge {
    background-color: #ff4757;
    color: white;
    font-weight: 700;
    font-size: 0.9rem;
    padding: 6px 12px;
    border-radius: 4px;
    animation: pulse-red 2s infinite;
    white-space: nowrap;
    align-self: center; /* Centraliza verticalmente com o título */
}

@keyframes pulse-red {
    0% { opacity: 1; }
    50% { opacity: 0.8; }
    100% { opacity: 1; }
}

/* 3. PREÇO GRANDE (Estilo Original) */
.current-price-large {
    font-size: 3rem;
    font-weight: 800;
    color: var(--success-color);
    text-align: center;
    margin: 0.5rem 0;
    font-family: 'Inter', sans-serif;
}

/* ====================================================== */
/* AJUSTES MOBILE GERAIS (CORREÇÃO FINAL)                 */
/* ====================================================== */
@media (max-width: 768px) {
    
    /* Para a página de anúncio normal (anuncio.html) */
    .ad-detail-grid {
        display: flex;
        flex-direction: column;
    }

    /* CORREÇÃO: Define order 0 para o perfil ficar ABAIXO do anúncio */
    .ad-detail-sidebar {
        order: 0; 
        margin-top: 2rem;
        margin-bottom: 2rem;
        
        /* Garante que não flutue no mobile */
        position: relative;
        top: auto;
        height: auto;
        z-index: 1;
    }

    .ad-detail-image-wrapper img {
        max-height: 300px;
    }
    
    /* Botões de ação mais fáceis de clicar */
    .quick-bid-btn {
        padding: 12px;
        flex: 1; 
    }
}

/* Garante o Sticky APENAS no Computador */
@media (min-width: 769px) {
    .ad-detail-sidebar {
        position: sticky;
        top: 85px; /* Ajuste conforme a altura do seu cabeçalho */
        height: fit-content;
    }
}
/* ====================================================== */

/* ====================================================== */
/* LAYOUT DE LEILÃO COM GRID (MOBILE FIRST FIX)           */
/* ====================================================== */

.auction-layout-grid {
    display: grid;
    gap: 2rem;
    /* CONFIGURAÇÃO PADRÃO (DESKTOP) */
    /* 2 colunas: Conteúdo/Imagem (2/3) e Sidebar (1/3) */
    grid-template-columns: 2fr 1fr; 
    grid-template-areas: 
        "image sidebar"   /* Imagem na esq, Sidebar na dir */
        "content sidebar"; /* Texto na esq, Sidebar continua na dir */
}

/* Define quem é quem */
.auction-area-image { grid-area: image; }
.auction-area-sidebar { grid-area: sidebar; }
.auction-area-content { grid-area: content; }

.auction-area-image img {
    width: 100%;
    height: auto;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    background-color: white;
    object-fit: contain;
    max-height: 500px;
}

/* ====================================================== */
/* CONFIGURAÇÃO MOBILE (CELULAR - VISUAL COMPACTO)  leilão*/
/* ====================================================== */
@media (max-width: 768px) {
    
    /* 1. ESTRUTURA GERAL */
    .auction-layout-grid {
        grid-template-columns: 1fr;
        gap: 10px; /* Menos espaço entre blocos */
        display: flex;
        flex-direction: column;
    }

    /* 2. IMAGEM (Volta para o topo, mas menor) */
    .auction-area-image {
        order: 0; /* Garante que fique no topo */
        margin-bottom: 5px;
    }
    
    .auction-area-image img {
        max-height: 180px; /* Altura limitada para caber na tela */
        width: 100%;
        object-fit: contain; /* Mostra a imagem inteira sem cortar */
        background-color: #fff;
        border: 1px solid #eee;
    }

    /* 3. SIDEBAR (Painel de Lances) */
    .auction-area-sidebar {
        order: 1; /* Fica logo abaixo da imagem */
    }

    /* 4. COMPACTAR O TIMER E O PREÇO (O "Pulo do Gato") */
    /* Transformamos a caixa do Timer para parecer uma barra de status */
    .auction-timer-box {
        padding: 8px;
        margin-bottom: 8px;
        display: flex;
        justify-content: space-between;
        align-items: center;
        border-radius: 6px;
    }
    
    /* Ajusta os textos internos do timer para ficarem na mesma linha */
    .auction-timer-box .timer-label {
        font-size: 0.8rem;
        margin-bottom: 0; /* Remove margem */
    }
    .auction-timer-box .timer-display {
        font-size: 1.2rem; /* Fonte menor */
        margin: 0;
    }
    .auction-timer-box #timer-status {
        display: none; /* Esconde o texto "O leilão encerra em breve" para economizar espaço */
    }

    /* 5. COMPACTAR A CAIXA DE LANCE */
    .vendor-info-box {
        padding: 12px; /* Menos espaçamento interno */
    }

    .vendor-info-box h3 {
        font-size: 0.9rem; /* Título menor */
        margin-bottom: 5px;
        display: inline-block; /* Para ficar na linha */
    }

    /* Preço Grande -> Preço Médio */
    .current-price-large {
        font-size: 2rem; /* Reduz de 3rem para 2rem */
        margin: 5px 0;
        display: inline-block;
        margin-left: 10px;
    }
    
    /* Ajuste do texto "Vencedor" para ficar compacto */
    .vendor-info-box p {
        font-size: 0.8rem;
        margin: 0;
        margin-bottom: 10px;
    }

    /* 6. CAMPOS DE INPUT E BOTÕES OTIMIZADOS */
    #bidding-controls hr {
        margin: 10px 0; /* Menos espaço na linha divisória */
    }
    
    .bid-input-group {
        margin-top: 5px;
    }
    
    .bid-input-group input {
        padding: 8px;
        font-size: 1rem;
    }
    
    .button-primary#btn-place-bid {
        padding: 8px 15px;
        font-size: 1rem;
    }

    /* Botões de atalho lado a lado */
    .quick-bid-btn {
        padding: 8px 5px;
        font-size: 0.8rem;
        flex: 1; /* Distribui largura igual */
    }

    /* 7. CONTEÚDO/DESCRIÇÃO (Fica por último) */
    .auction-area-content {
        order: 2;
        margin-top: 1rem;
    }
    
    /* Esconde histórico e info vendedor da primeira tela para não poluir */
    /* O usuário rola se quiser ver */
    .bid-history-box, 
    .auction-area-sidebar .vendor-info-box:last-child {
        margin-top: 1rem;
    }
}

/* ====================================================== */
/* BOTÃO DE LOGIN NO CABEÇALHO (IDEIA 1)                  */
/* ====================================================== */    

/* ====================================================== */
/* ESTILO "WAR ROOM" (PREMIUM/GAMER)                      */
/* ====================================================== */

/* 1. CRONÔMETRO "NUCLEAR" */
.war-room-timer {
    background: #0f0f0f; /* Preto quase total */
    color: #ff4757;      /* Vermelho alerta */
    font-family: 'Courier New', Courier, monospace; /* Fonte estilo digital/hacker */
    padding: 1.5rem;
    border-radius: 12px;
    text-align: center;
    margin-bottom: 1.5rem;
    border: 2px solid #333;
    box-shadow: inset 0 0 20px rgba(0,0,0,0.8), 0 4px 15px rgba(0,0,0,0.3);
    position: relative;
    overflow: hidden;
    transition: all 0.3s ease;
}

.war-room-timer.urgent {
    border-color: #ff4757;
    box-shadow: inset 0 0 30px rgba(255, 71, 87, 0.2), 0 0 15px rgba(255, 71, 87, 0.5);
    animation: emergency-pulse 1s infinite;
}

.timer-digits {
    font-size: 3rem;
    font-weight: 700;
    letter-spacing: 2px;
    text-shadow: 0 0 10px rgba(255, 71, 87, 0.5); /* Brilho neon */
    line-height: 1;
}

.timer-label {
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 3px;
    color: #777;
    margin-bottom: 5px;
}

@keyframes emergency-pulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.02); }
    100% { transform: scale(1); }
}

/* 2. PAINEL DE LANCES "CASINO" */
.casino-panel {
    background: #fff;
    border-radius: 16px;
    padding: 20px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.08);
    text-align: center;
    border: 1px solid #f0f0f0;
}

.price-display-wrapper {
    margin-bottom: 20px;
}

.casino-price {
    font-size: 3.5rem;
    font-weight: 900;
    color: var(--text-color);
    letter-spacing: -1px;
    line-height: 1;
}

.casino-winner {
    background: #f1f2f6;
    color: #57606f;
    padding: 5px 15px;
    border-radius: 20px;
    font-size: 0.9rem;
    font-weight: 600;
    display: inline-block;
    margin-top: 10px;
}

/* Input Gigante */
.casino-input {
    width: 100%;
    font-size: 1.5rem;
    padding: 15px;
    border: 2px solid #e1e1e1;
    border-radius: 12px;
    text-align: center;
    font-weight: 700;
    margin-bottom: 10px;
    transition: border-color 0.2s;
}
.casino-input:focus {
    outline: none;
    border-color: var(--primary-color);
}

/* Botão de Ação Principal */
.casino-btn-main {
    width: 100%;
    background: linear-gradient(135deg, #6e0ad6 0%, #8e44ad 100%);
    color: white;
    border: none;
    padding: 18px;
    font-size: 1.2rem;
    font-weight: 800;
    border-radius: 12px;
    cursor: pointer;
    text-transform: uppercase;
    letter-spacing: 1px;
    box-shadow: 0 5px 15px rgba(110, 10, 214, 0.3);
    transition: transform 0.1s;
}
.casino-btn-main:active { transform: scale(0.98); }
.casino-btn-main:disabled { background: #ccc; box-shadow: none; cursor: not-allowed; }

/* Botões Rápidos (Chips) */
.quick-chips-row {
    display: flex;
    gap: 8px;
    margin-top: 10px;
}
.chip-btn {
    flex: 1;
    background: #fff;
    border: 2px solid #e1e1e1;
    color: #555;
    font-weight: 700;
    padding: 10px;
    border-radius: 50px; /* Pílula */
    cursor: pointer;
    transition: all 0.2s;
}
.chip-btn:hover {
    background: #f1f2f6;
    border-color: #ccc;
    transform: translateY(-2px);
}

/* 3. HISTÓRICO "LIVE FEED" */
.live-feed-box {
    background: #fafafa;
    border-radius: 12px;
    padding: 15px;
    max-height: 350px;
    overflow-y: auto;
    border: 1px solid #eee;
}

.feed-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px;
    background: #fff;
    border-radius: 8px;
    margin-bottom: 8px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.03);
    border-left: 4px solid transparent;
    transition: all 0.3s ease;
}

/* Destaque para o topo (Ganhando) */
.feed-item.winning {
    border-left-color: #2ecc71; /* Verde */
    background: #f0fff4;
    transform: scale(1.02); /* Levemente maior */
    font-weight: 700;
}

/* 4. AJUSTES MOBILE PARA O NOVO DESIGN */
@media (max-width: 768px) {
    .war-room-timer {
        padding: 1rem;
        margin-bottom: 1rem;
    }
    .timer-digits { font-size: 2.5rem; }
    .casino-price { font-size: 2.8rem; }
    .casino-btn-main { padding: 15px; font-size: 1.1rem; }
}       
/* ====================================================== */   
/* AJUSTES MOBILE CABEÇALHO (VERSÃO FINAL)   leilao            */
/* ====================================================== */

/* ====================================================== */
/* ESTILOS DO LIGHTBOX (ZOOM) & ÍCONES        leilao            */
/* ====================================================== */

/* 1. Indicador de Zoom na Foto */
.auction-area-image {
    position: relative;
    cursor: zoom-in; /* Muda o cursor para lupa */
}

/* Ícone de Lupa no cantinho da foto */
.auction-area-image::after {
    content: '🔍';
    position: absolute;
    bottom: 10px;
    right: 10px;
    background: rgba(0, 0, 0, 0.6);
    color: white;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
    pointer-events: none; /* O clique passa para a imagem */
    backdrop-filter: blur(2px);
}

/* 2. O Overlay (Fundo Preto) */
.lightbox-overlay {
    position: fixed;
    z-index: 9999; /* Fica acima de TUDO */
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.95); /* Quase totalmente preto */
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    pointer-events: none; /* Começa invisível e não clicável */
    transition: opacity 0.3s ease;
}

.lightbox-overlay.visible {
    opacity: 1;
    pointer-events: auto;
}

/* 3. A Imagem em Tela Cheia */
.lightbox-content {
    max-width: 95%;
    max-height: 95vh;
    object-fit: contain; /* Garante que a imagem inteira apareça */
    border-radius: 4px;
    box-shadow: 0 0 20px rgba(0,0,0,0.5);
    transform: scale(0.9);
    transition: transform 0.3s ease;
}

.lightbox-overlay.visible .lightbox-content {
    transform: scale(1); /* Animação de zoom */
}

/* 4. Botão de Fechar (X) */
.lightbox-close {
    position: absolute;
    top: 20px;
    right: 30px;
    color: #fff;
    font-size: 40px;
    font-weight: bold;
    cursor: pointer;
    transition: 0.3s;
    z-index: 10000;
    line-height: 1;
}

.lightbox-close:hover {
    color: #ff4757;
}
/* ====================================================== */

/* Lightbox styles */
.lightbox-overlay {
    display: none; /* Hidden by default */
    position: fixed; /* Stay in place */
    z-index: 1000; /* Sit on top */
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto; /* Enable scroll if needed */
    background-color: rgba(0,0,0,0.9); /* Black w/ opacity */
    justify-content: center;
    align-items: center;
}

.lightbox-overlay.visible {
    display: flex;
}

.lightbox-content {
    margin: auto;
    display: block;
    max-width: 80%;
    max-height: 80vh;
    animation-name: zoom;
    animation-duration: 0.3s;
}

.lightbox-close {
    position: absolute;
    top: 25px;
    right: 45px;
    color: #f1f1f1;
    font-size: 40px;
    font-weight: bold;
    transition: 0.3s;
    cursor: pointer;
}

.lightbox-close:hover,
.lightbox-close:focus {
    color: #bbb;
    text-decoration: none;
    cursor: pointer;
}

@keyframes zoom {
    from {transform:scale(0)} 
    to {transform:scale(1)}
}

/* Make image clickable */
.auction-area-image img {
    cursor: pointer;
    transition: opacity 0.2s;
}
.auction-area-image img:hover {
    opacity: 0.8;
}/* ====================================================== */



/* ====================================================== */
/* BOTÃO DE LEILÃO (DESIGNER BONITO + MOBILE)             */
/* ====================================================== */

/* Design Padrão (Desktop) */
.button-auction {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    text-decoration: none;
    
    /* Visual "Premium" - Contorno Vermelho */
    background-color: #fff;
    border: 2px solid #ff4757; 
    color: #ff4757;
    
    /* Tamanho similar aos botões vizinhos */
    padding: 0.6rem 1.2rem;
    font-size: 0.95rem;
    border-radius: 24px;
    font-weight: 800; /* Texto bem grosso para destaque */
    
    transition: all 0.2s ease;
    white-space: nowrap; /* Impede quebra de linha */
    cursor: pointer;
}

/* Efeito Hover (Ao passar o mouse) */
.button-auction:hover {
    background-color: #ff4757;
    color: white;
    box-shadow: 0 4px 12px rgba(255, 71, 87, 0.3); /* Sombra vermelha */
    transform: translateY(-2px);
}

/* AJUSTES PARA CELULAR (Compacto) */
@media (max-width: 768px) {
    .button-auction {
        /* Reduz tamanho para caber na linha do topo */
        padding: 6px 10px;
        font-size: 0.75rem;
        border-width: 1px; /* Borda mais fina */
        height: auto;
    }
    
    /* Garante que o container do topo não quebre */
    .nav-actions-container {
        gap: 6px; /* Aproxima os itens */
        flex-wrap: nowrap; /* Força ficar na mesma linha */
        align-items: center;
    }
}
/* ====================================================== */
/* ====================================================== */
/* NOVO DESIGN DA SEÇÃO DE PREÇO (ESTILO CALCULADORA)     */
/* ====================================================== */

.price-section-card {
    background-color: #fff;
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 1.5rem;
    margin-bottom: 2rem;
    box-shadow: 0 2px 8px rgba(0,0,0,0.03);
}

.price-mode-tabs {
    display: flex;
    gap: 1rem;
    margin-bottom: 1.5rem;
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 1rem;
}

.price-mode-label {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    font-weight: 500;
    color: var(--text-secondary);
    transition: color 0.2s;
}

.price-mode-label:hover {
    color: var(--primary-color);
}

.price-mode-label input[type="radio"] {
    accent-color: var(--primary-color);
    transform: scale(1.2);
}

.price-mode-label.selected {
    color: var(--primary-color);
    font-weight: 700;
}

/* Caixa de Simulação (Você Recebe) */
.fee-simulation-box {
    background-color: #fff7ed; /* Laranja bem claro */
    border: 1px solid #ffedd5;
    border-radius: 8px;
    padding: 1rem;
    margin-top: 1rem;
    animation: fadeIn 0.3s ease;
}

.fee-row {
    display: flex;
    justify-content: space-between;
    font-size: 0.9rem;
    margin-bottom: 0.5rem;
    color: var(--text-secondary);
}

.fee-row.total {
    margin-top: 0.5rem;
    padding-top: 0.5rem;
    border-top: 1px dashed #fdba74;
    font-size: 1.1rem;
    color: #c2410c; /* Laranja escuro */
    font-weight: 700;
    margin-bottom: 0;
}

.fee-row.total span:last-child {
    color: var(--success-color); /* Verde para o valor final */
}

/* Feedback visual para "Aceito Ofertas" */
.offers-feedback-box {
    background-color: #f0f9ff;
    border: 1px solid #bae6fd;
    color: #0369a1;
    padding: 1rem;
    border-radius: 8px;
    display: flex;
    gap: 10px;
    align-items: start;
    font-size: 0.95rem;
}

/* Ajuste nos inputs de preço para ter o ícone R$/G */
.input-with-icon {
    position: relative;
}
.input-with-icon span {
    position: absolute;
    left: 12px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-secondary);
    font-weight: 600;
    pointer-events: none;
}
.input-with-icon input {
    padding-left: 40px; /* Espaço para o ícone */
}

/* ====================================================== */
/* ESTILOS DAS ABAS DE PEDIDOS (UX MELHORADA)             */
/* ====================================================== */

.order-tabs {
    display: flex;
    gap: 1rem;
    margin-bottom: 1.5rem;
    border-bottom: 2px solid var(--border-color);
}

.order-tab-btn {
    background: none;
    border: none;
    padding: 1rem 0.5rem;
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-secondary);
    cursor: pointer;
    position: relative;
    transition: color 0.2s;
}

.order-tab-btn:hover {
    color: var(--primary-color);
}

.order-tab-btn.active {
    color: var(--primary-color);
}

.order-tab-btn.active::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 100%;
    height: 2px;
    background-color: var(--primary-color);
}

.order-tab-count {
    background-color: var(--border-color);
    color: var(--text-secondary);
    font-size: 0.75rem;
    padding: 2px 6px;
    border-radius: 10px;
    margin-left: 6px;
    vertical-align: middle;
}

.order-tab-btn.active .order-tab-count {
    background-color: var(--primary-color);
    color: white;
}

/* ====================================================== */
/* TIMELINE VISUAL DE STATUS (IDEIA 2)                    */
/* ====================================================== */

.order-timeline {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    margin-top: 1rem;
    margin-bottom: 0.5rem;
    position: relative;
    padding: 0 10px;
    min-width: 280px;
}

/* A linha cinza de fundo */
.timeline-track {
    position: absolute;
    top: 9px; /* Ajuste vertical para alinhar com as bolinhas */
    left: 30px;
    right: 30px;
    height: 2px;
    background-color: #e2e8f0;
    z-index: 0;
}

/* Cada passo (Bolinha + Texto) */
.timeline-step {
    position: relative;
    z-index: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 33%;
}

/* A bolinha */
.timeline-circle {
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background-color: #e2e8f0;
    border: 2px solid #fff;
    margin-bottom: 6px;
    transition: all 0.3s;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 10px;
    color: transparent; /* Esconde o check se não estiver pronto */
}

/* O texto abaixo */
.timeline-label {
    font-size: 0.7rem;
    color: var(--text-secondary);
    font-weight: 500;
    text-align: center;
}

/* --- ESTADOS --- */

/* Completo (Verde) */
.timeline-step.completed .timeline-circle {
    background-color: var(--success-color);
    color: white; /* Mostra o check */
}
.timeline-step.completed .timeline-label {
    color: var(--success-color);
    font-weight: 600;
}

/* Ativo/Atual (Roxo/Piscando) */
.timeline-step.active .timeline-circle {
    background-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(110, 10, 214, 0.2);
}
.timeline-step.active .timeline-label {
    color: var(--primary-color);
    font-weight: 700;
}

/* Disputa (Vermelho) */
.timeline-step.dispute .timeline-circle {
    background-color: var(--error-color);
}
.timeline-step.dispute .timeline-label {
    color: var(--error-color);
}