/* Estilos Globais */
body {
    font-family: 'Arial', sans-serif;
    margin: 0;
    padding: 0;
    background-color: #f0f2f5;
    color: #333;
    line-height: 1.6;
}

/* --- Header e Navegação --- */
.main-header {
    background-color: #ffffff;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.header-container {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 2rem;
}

.logo img {
    height: 50px;
    width: auto;
}

.main-nav {
    display: block;
}

.menu-items {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    gap: 2rem;
}

.menu-items a {
    text-decoration: none;
    color: #333;
    font-weight: bold;
    transition: color 0.3s ease;
}

.menu-items a:hover {
    color: #3f51b5;
}

.user-actions {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.action-button {
    text-decoration: none;
    color: #3f51b5;
    border: 2px solid #3f51b5;
    padding: 0.5rem 1rem;
    border-radius: 5px;
    font-weight: bold;
    transition: background-color 0.3s, color 0.3s;
}

.action-button:hover {
    background-color: #3f51b5;
    color: #ffffff;
}

.login-dropdown {
    position: relative;
}

.login-form {
    position: absolute;
    top: calc(100% + 10px);
    right: 0;
    background-color: #ffffff;
    padding: 1rem;
    border-radius: 5px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    display: none;
    flex-direction: column;
    gap: 0.5rem;
    min-width: 250px;
}

.login-dropdown.active .login-form {
    display: flex;
}

.login-form input,
.login-form button {
    width: 100%;
    padding: 0.5rem;
    border: 1px solid #e0e0e0;
    border-radius: 3px;
    box-sizing: border-box;
}

.login-form button {
    background-color: #3f51b5;
    color: #ffffff;
    border: none;
    cursor: pointer;
    transition: background-color 0.3s;
}

.login-form button:hover {
    background-color: #303f9f;
}

.hamburger-menu {
    display: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: #333;
}

/* --- Banner Slider (Exclusivo para index.html) --- */
.banner-slider {
    position: relative;
    width: 100%;
    max-width: 100%;
    overflow: hidden;
    margin-bottom: 2rem;
}

.slider-wrapper {
    display: flex;
    transition: transform 0.5s ease-in-out;
}

.slide {
    min-width: 100%;
}

.slide img {
    width: 100%;
    display: block;
    border-radius: 8px;
}

.slider-nav {
    position: absolute;
    bottom: 1rem;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 0.5rem;
}

.dot {
    width: 12px;
    height: 12px;
    background-color: rgba(255, 255, 255, 0.5);
    border-radius: 50%;
    cursor: pointer;
    transition: background-color 0.3s;
}

.dot.active {
    background-color: #ffffff;
}

/* --- Seção de Produtos (Exclusivo para index.html) --- */
.products-section {
    max-width: 1200px;
    margin: 2rem auto;
    padding: 0 2rem;
}

.products-section h1 {
    text-align: center;
    color: #3f51b5;
    margin-bottom: 2rem;
    font-size: 2rem;
}

.category-tabs {
    text-align: center;
    margin-bottom: 2rem;
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.tab-button {
    background-color: #e0e0e0;
    border: none;
    padding: 0.75rem 1.5rem;
    cursor: pointer;
    font-size: 1rem;
    font-weight: bold;
    color: #666;
    border-radius: 20px;
    transition: background-color 0.3s, color 0.3s;
    white-space: nowrap;
}

.tab-button:hover,
.tab-button.active {
    background-color: #3f51b5;
    color: #ffffff;
}

.product-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 2rem;
}

.leilao-item {
    background-color: #ffffff;
    border-radius: 10px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    overflow: hidden;
    text-align: center;
    transition: transform 0.3s ease;
    display: flex;
    flex-direction: column;
    min-height: 450px;
}

.leilao-item:hover {
    transform: translateY(-5px);
}

.leilao-item h2 {
    margin: 1rem 1rem 0.5rem;
    color: #3f51b5;
    font-size: 1.25rem;
    margin-top: 0;
}

.leilao-item p {
    flex-grow: 1;
    margin: 0 1rem 1rem;
    color: #666;
    font-size: 0.9rem;
    padding-top: 0.5rem;
    padding-bottom: 0.5rem;
}

.leilao-info {
    display: flex;
    justify-content: space-between;
    padding: 0 1rem 1rem;
    border-top: 1px solid #e0e0e0;
    margin-top: auto;
}

.info-bloco {
    display: flex;
    flex-direction: column;
    align-items: center;
    font-size: 0.9rem;
}

.info-bloco span:first-child {
    font-weight: bold;
    color: #666;
}

.info-bloco span:last-child {
    font-weight: bold;
    color: #3f51b5;
    margin-top: 0.25rem;
}

.leilao-formulario {
    padding: 1rem;
    display: flex;
    gap: 0.5rem;
    border-top: 1px solid #e0e0e0;
}

.leilao-formulario input {
    flex-grow: 1;
    padding: 0.5rem;
    border: 1px solid #e0e0e0;
    border-radius: 5px;
}

.leilao-formulario .botao-lance {
    padding: 0.5rem 1rem;
    background-color: #3f51b5;
    color: #ffffff;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-weight: bold;
    transition: background-color 0.3s;
}

.leilao-formulario .botao-lance:hover {
    background-color: #303f9f;
}

/* --- Estilos da página de Autenticação (cadastro.html) --- */
.auth-main {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 80vh;
    padding: 2rem;
    box-sizing: border-box;
}

.auth-container {
    background-color: #ffffff;
    padding: 2rem;
    border-radius: 8px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
    width: 100%;
    max-width: 450px;
    text-align: center;
}

.auth-container h2 {
    color: #3f51b5;
    margin-bottom: 1rem;
}

.auth-container p {
    color: #666;
    font-size: 0.9rem;
    margin-bottom: 1.5rem;
}

.auth-container .form-group {
    text-align: left;
    margin-bottom: 1rem;
}

.auth-container .form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: bold;
}

.auth-container .form-group input {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid #e0e0e0;
    border-radius: 5px;
    box-sizing: border-box;
}

.auth-container .submit-button {
    width: 100%;
    padding: 0.75rem;
    background-color: #3f51b5;
    color: #ffffff;
    border: none;
    border-radius: 5px;
    font-size: 1rem;
    cursor: pointer;
    margin-top: 1rem;
    transition: background-color 0.3s;
}

.auth-container .submit-button:hover {
    background-color: #303f9f;
}

.auth-container .toggle-form a {
    color: #3f51b5;
    text-decoration: none;
    font-weight: bold;
}

.auth-container .toggle-form a:hover {
    text-decoration: underline;
}

.auth-container .hidden {
    display: none;
}

.auth-container .radio-group {
    display: flex;
    gap: 1rem;
    justify-content: center;
    align-items: center;
    margin-top: 1rem;
}

.auth-container .radio-group label {
    margin-bottom: 0;
}

/* --- Footer --- */
.main-footer {
    background-color: #333;
    color: #ffffff;
    padding: 2rem 0;
    font-size: 0.9rem;
}

.footer-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
    display: flex;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 2rem;
}

.footer-info,
.footer-links {
    flex: 1 1 300px;
}

.footer-info h4,
.footer-links h4 {
    margin-top: 0;
    color: #f44336;
}

.footer-links ul {
    list-style: none;
    padding: 0;
}

.footer-links a {
    text-decoration: none;
    color: #ffffff;
    transition: color 0.3s;
}

.footer-links a:hover {
    color: #f44336;
}

.footer-bottom {
    text-align: center;
    padding-top: 1rem;
    margin-top: 2rem;
    border-top: 1px solid #666;
}

/* Responsividade */
@media (max-width: 768px) {
    /* Oculta os itens de menu por padrão em telas menores */
    .main-nav {
        display: none;
    }

    /* Exibe o ícone do hambúrguer em mobile */
    .hamburger-menu {
        display: block;
    }
    
    /* Quando o cabeçalho tem a classe 'active', mostra o menu de navegação e as ações do usuário */
    .main-header.active .main-nav {
        display: flex;
        flex-direction: column;
        width: 100%;
        margin-top: 1rem;
        border-top: 1px solid #e0e0e0;
        padding-top: 1rem;
        background-color: #ffffff;
        box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
        text-align: center;
    }

    .main-header.active .menu-items {
        flex-direction: column;
        gap: 0;
    }

    .main-header.active .menu-items li {
        padding: 0.5rem 0;
        border-bottom: 1px solid #f0f0f0;
    }

    .main-header.active .menu-items li:last-child {
        border-bottom: none;
    }

    /* Ajusta a exibição das ações do usuário em telas menores */
    .user-actions {
        order: -1; /* Move os botões para a esquerda na ordem visual */
    }

    /* Centraliza os botões em telas menores */
    .header-container {
        flex-wrap: wrap;
        justify-content: space-between;
        padding: 1rem;
    }

    /* Ajustes para os botões de categoria em mobile */
    .category-tabs {
        flex-direction: column;
        gap: 10px;
    }

    .tab-button {
        width: 100%;
        box-sizing: border-box;
    }

    .footer-container {
        flex-direction: column;
        text-align: center;
    }
}

.leilao-item .gallery-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 100%; /* Garante que a galeria ocupe a largura total do card */
}

.leilao-item .main-image {
    width: 100%; /* Faz a imagem principal preencher o container */
    max-height: 400px; /* Limita a altura da imagem para não ficar muito grande */
    object-fit: cover; /* Garante que a imagem se ajuste sem distorcer */
    border-radius: 8px;
    margin-bottom: 10px;
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
}

.leilao-item .thumbnail-container {
    display: flex;
    gap: 5px;
    justify-content: center;
    flex-wrap: wrap;
    margin-top: 10px;
}

.leilao-item .thumbnail {
    width: 60px;
    height: 60px;
    object-fit: cover;
    border: 2px solid transparent;
    border-radius: 4px;
    cursor: pointer;
    transition: transform 0.2s, border-color 0.2s;
}

.leilao-item .thumbnail:hover, .leilao-item .thumbnail.active {
    border-color: #007BFF;
    transform: scale(1.05);
}