@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@300;400;500;600;700&family=Playfair+Display:wght@400;500;700&display=swap');

/* * Banner da página de produtos */
.produtos-banner {
    height: 600px;
    background: linear-gradient(rgba(0, 0, 0, 0.5), rgba(0, 0, 0, 0.7)), url('img/banner-mulher.jpeg');
    background-size: cover;
    background-position: center;
    color: var(--white);
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
}

.banner-content h1 {
    font-size: 3rem;
    margin-bottom: 10px;
    letter-spacing: 2px;
    text-transform: uppercase;
}

.banner-content p {
    font-size: 1.2rem;
    opacity: 0.9;
}

/* * Container de produtos e filtros */
.produtos-container {
    padding: 60px 5%;
    display: grid;
    grid-template-columns: 280px 1fr;
    gap: 40px;
}

.page-title {
    text-align: center;
    margin-bottom: 40px;
    color: #4a148c; /* * Roxo escuro */
}

.page-title h1 {
    font-size: 36px;
    margin-bottom: 15px;
}

.page-title p {
    font-size: 18px;
    color: #666;
}

/* * Filtros */
.filtro-busca {
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 2px 12px rgba(126,87,194,0.07);
    padding: 18px 18px 6px 18px;
    margin-bottom: 32px;
}

.filtro-busca label {
    display: block;
    margin-bottom: 4px;
    font-size: 14px;
}

.filtro-busca input[type="text"],
.filtro-busca input[type="number"],
.filtro-busca select {
    font-size: 15px;
    transition: border 0.2s;
}

.filtro-busca input:focus,
.filtro-busca select:focus {
    border: 1.5px solid #7e57c2;
    outline: none;
}

.search-bar {
    position: relative;
    margin-bottom: 30px;
}

.search-bar input {
    width: 100%;
    padding: 12px 15px;
    padding-right: 45px;
    border: 1px solid var(--cinza-medio);
    border-radius: 30px;
    font-size: 0.9rem;
    transition: all 0.3s ease;
}

.search-bar input:focus {
    border-color: var(--roxo-medio);
    outline: none;
}

.search-bar button {
    position: absolute;
    right: 5px;
    top: 50%;
    transform: translateY(-50%);
    background: transparent;
    border: none;
    color: var(--roxo-escuro);
    font-size: 1rem;
    cursor: pointer;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.filtros h3 {
    font-size: 1.1rem;
    margin-bottom: 15px;
    color: var(--roxo-escuro);
    font-weight: 600;
}

.filtro-opcoes {
    margin-bottom: 25px;
}

.filtro-item {
    display: flex;
    align-items: center;
    margin-bottom: 10px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.filtro-item:hover {
    color: var(--roxo-medio);
}

.filtro-item input {
    margin-right: 10px;
    accent-color: var(--roxo-escuro);
    cursor: pointer;
    width: 16px;
    height: 16px;
}

.filtro-nome {
    flex-grow: 1;
    font-size: 0.95rem;
}

.filtro-count {
    color: var(--cinza-escuro);
    font-size: 0.85rem;
}


.filtro-preco {
    margin-bottom: 25px;
}

.filtro-preco-label {
    font-size: 1.15rem;
    font-weight: 600;
    color: #7e57c2;
    margin-bottom: 8px;
    display: block;
}

.preco-inputs-row {
    display: flex;
    gap: 10px;
    align-items: center;
    margin-bottom: 10px;
}
.preco-inputs-row input[type="number"] {
    width: 90px;
    padding: 8px;
    border-radius: 8px;
    border: 1px solid #ccc;
    font-size: 15px;
}

.preco-slider {
    width: 100%;
    accent-color: var(--roxo-escuro);
    height: 5px;
    margin-bottom: 10px;
}

.preco-range {
    display: flex;
    justify-content: space-between;
    font-size: 0.9rem;
    color: var(--cinza-escuro);
}

.ordenar-select {
    width: 100%;
    padding: 10px 15px;
    border: 1px solid var(--cinza-medio);
    border-radius: 5px;
    margin-bottom: 25px;
    font-size: 0.9rem;
    color: var(--black);
    background-color: var(--white);
    cursor: pointer;
    outline: none;
}

.ordenar-select:focus {
    border-color: var(--roxo-medio);
}

.filtrar-btn {
    width: 100%;
    text-align: center;
    padding: 12px;
    margin-top: 10px;
}

/* * Resultados de produtos */
.resultados-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
    padding-bottom: 15px;
    border-bottom: 1px solid var(--cinza-medio);
}

.resultados-header p {
    font-size: 0.95rem;
    color: var(--cinza-escuro);
}

.resultados-header span {
    font-weight: 600;
    color: var(--black);
}

.view-options {
    display: flex;
    gap: 10px;
}

.view-btn {
    background: transparent;
    border: 1px solid var(--cinza-medio);
    width: 40px;
    height: 40px;
    border-radius: 5px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    color: var(--cinza-escuro);
}

.view-btn.active, .view-btn:hover {
    background-color: var(--roxo-escuro);
    color: var(--white);
    border-color: var(--roxo-escuro);
}

/* * Tags */

.product-tags {
    margin-bottom: 8px;
}
.product-tag {
    display: inline-block;
    background: #e1d7f6;
    color: #7e57c2;
    font-size: 13px;
    padding: 2px 10px;
    border-radius: 12px;
    margin-right: 4px;
    margin-bottom: 2px;
}

.product-tag {
    display: inline-block;
    background: #e1d7f6;
    color: #7e57c2;
    font-size: 13px;
    padding: 2px 10px;
    border-radius: 12px;
    margin-bottom: 8px;
    margin-top: 4px;
}

/* *Estilos para a paginação */

.paginacao-container {
    display: flex;
    justify-content: center;
    align-items: center;
    margin-top: 30px;
    gap: 10px;
}

.pagina-link {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background-color: #f8f8f8;
    color: #333;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s ease;
    border: 1px solid #eee;
}

.pagina-link:hover {
    background-color: #7e57c2;
    color: white;
}

.pagina-link.active {
    background-color: #7e57c2;
    color: white;
}

.pagina-link.disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* *Estilos para o carregamento */
.produtos-grid.carregando {
    position: relative;
    opacity: 0.7;
}

.produtos-grid.carregando::after {
    content: "Carregando produtos...";
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: #6a0dad;
    font-weight: bold;
}

/* *Estilos para erros */
.erro-carregamento {
    padding: 20px;
    text-align: center;
    background: #ffebee;
    border: 1px solid #f44336;
    border-radius: 4px;
    margin: 20px 0;
    color: #d32f2f;
}

.erro-carregamento button {
    background: #6a0dad;
    color: white;
    border: none;
    padding: 8px 16px;
    margin-top: 10px;
    border-radius: 4px;
    cursor: pointer;
}

/* *Melhorias na paginação */
#paginacao {
    display: flex;
    justify-content: center;
    gap: 8px;
    margin-top: 30px;
    flex-wrap: wrap;
}

#paginacao .pag-btn {
    min-width: 40px;
    height: 40px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0 10px;
    border: 1px solid #ddd;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.3s;
}

#paginacao .pag-btn:hover {
    background: #f5f5f5;
}

#paginacao .pag-btn.active {
    background: #6a0dad;
    color: white;
    border-color: #6a0dad;
    cursor: default;
}

.loading, .error {
    padding: 20px;
    text-align: center;
    margin: 20px 0;
    border-radius: 4px;
}

.loading {
    background: #f5f5f5;
    color: #666;
}

.error {
    background: #ffebee;
    border: 1px solid #f44336;
    color: #d32f2f;
}

.error button {
    background: #6a0dad;
    color: white;
    border: none;
    padding: 8px 16px;
    margin-top: 10px;
    border-radius: 4px;
    cursor: pointer;
}

/* *Estilos para mensagens de erro e loading */
.erro-carregamento {
    padding: 20px;
    text-align: center;
    background: #ffebee;
    border: 1px solid #f44336;
    border-radius: 4px;
    margin: 20px 0;
}

.erro-carregamento button {
    background: #6a0dad;
    color: white;
    border: none;
    padding: 8px 16px;
    border-radius: 4px;
    cursor: pointer;
    margin-top: 10px;
}

.sem-produtos {
    text-align: center;
    padding: 40px;
    font-size: 1.2em;
    color: #666;
}

/* Efeito de loading */
#produtos-grid.carregando {
    opacity: 0.6;
    position: relative;
}

#produtos-grid.carregando::after {
    content: "Carregando produtos...";
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: #6a0dad;
    font-weight: bold;
}

/* * Cards de produtos com links clicáveis */
.produtos-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
    margin-bottom: 40px;
    transition: opacity 0.3s ease;
}

.product-card {
    background: white;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 12px rgba(0,0,0,0.08);
    transition: all 0.3s ease;
    position: relative;
}

.product-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 24px rgba(126,87,194,0.15);
}

.product-link {
    text-decoration: none;
    color: inherit;
    display: block;
    height: 100%;
}

/* *Garante que todas as imagens de produtos tenham tamanho consistente */
.product-image {
    width: 100%;
    height: 300px;
    overflow: hidden;
    position: relative;
}

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

/* *Efeito hover na imagem */
.product-card:hover .product-image img {
    transform: scale(1.05);
}

.product-info {
    padding: 16px;
}

.product-info h3 {
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 8px;
    color: #333;
    line-height: 1.3;
}

.product-price {
    font-size: 18px;
    font-weight: 700;
    color: #7e57c2;
    margin-top: 8px;
}

/* * Paginação */
.paginacao {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin-top: 40px;
    flex-wrap: wrap;
}

.pag-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 5px;
    border: 1px solid var(--cinza-medio);
    font-size: 0.9rem;
    color: var(--black);
    transition: all 0.3s ease;
    cursor: pointer;
    user-select: none;
}

.pag-btn.active, .pag-btn:hover {
    background-color: var(--roxo-escuro);
    color: var(--white);
    border-color: var(--roxo-escuro);
    cursor: default;
}

/* * Responsividade */
@media (max-width: 1200px) {
    .produtos-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 992px) {
    .produtos-container {
        grid-template-columns: 1fr;
    }
    
    .filtro-busca {
        order: 2;
    }
    
    .produtos-resultados {
        order: 1;
    }
}

@media (max-width: 768px) {
    .produtos-banner {
        height: 200px;
    }
    
    .banner-content h1 {
        font-size: 2.2rem;
    }
    
    .produtos-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    
    .resultados-header {
        flex-direction: column;
        gap: 15px;
        align-items: flex-start;
    }
    
    .product-image {
        height: 250px;
    }
}

/* * Estilos para mensagens de sucesso */
.alert-success {
    background: #d4edda;
    color: #155724;
    padding: 12px 16px;
    border-radius: 8px;
    margin-bottom: 20px;
    border: 1px solid #c3e6cb;
    font-size: 14px;
}

/* * Estilos para a página de detalhes do produto */
.produto-detalhes-container {
    max-width: 1200px;
    margin: 40px auto;
    padding: 0 20px;
}

.breadcrumb {
    margin-bottom: 30px;
    font-size: 14px;
    color: #666;
}

.breadcrumb a {
    color: #7e57c2;
    text-decoration: none;
}

.breadcrumb a:hover {
    text-decoration: underline;
}

.breadcrumb span {
    color: #333;
}

.produto-detalhes {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 40px;
    align-items: start;
}

.produto-imagem img {
    width: 100%;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.1);
}

.produto-info h1 {
    font-size: 28px;
    margin-bottom: 10px;
    color: #333;
    font-weight: 700;
}

.marca {
    font-size: 16px;
    color: #666;
    margin-bottom: 15px;
}

.preco {
    font-size: 28px;
    font-weight: 700;
    color: #7e57c2;
    margin-bottom: 20px;
}

.tags {
    margin-bottom: 20px;
}

.tag {
    display: inline-block;
    background: #e1d7f6;
    padding: 6px 14px;
    border-radius: 20px;
    font-size: 13px;
    margin-right: 8px;
    margin-bottom: 8px;
    color: #7e57c2;
}

.descricao {
    margin-bottom: 30px;
    padding: 20px;
    background: #f9f9f9;
    border-radius: 8px;
}

.descricao h3 {
    font-size: 18px;
    margin-bottom: 12px;
    color: #333;
    font-weight: 600;
}

.descricao p {
    line-height: 1.6;
    color: #666;
    margin: 0;
}

.form-carrinho {
    margin-bottom: 20px;
}

.btn-adicionar-carrinho {
    background: #7e57c2;
    color: white;
    border: none;
    padding: 16px 30px;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.3s;
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.btn-adicionar-carrinho:hover {
    background: #6a4aaa;
}

.btn-voltar {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: #7e57c2;
    text-decoration: none;
    padding: 12px 20px;
    border: 2px solid #7e57c2;
    border-radius: 8px;
    transition: all 0.3s;
    font-weight: 500;
}

.btn-voltar:hover {
    background: #7e57c2;
    color: white;
}

@media (max-width: 768px) {
    .produto-detalhes {
        grid-template-columns: 1fr;
        gap: 30px;
    }
    
    .produto-info h1 {
        font-size: 24px;
    }
    
    .preco {
        font-size: 24px;
    }
    
    .btn-adicionar-carrinho {
        padding: 14px 20px;
        font-size: 15px;
    }
}

.user-info {
    display: flex;
    align-items: center;
    gap: 15px;
}

.login-btn {
    padding: 8px 16px;
    border-radius: 4px;
    text-decoration: none;
    font-weight: 500;
    transition: all 0.3s ease;
    background: #7e57c2;
    color: white;
}

.login-btn:hover {
    background: #6a45b0;
}