/* 
    Created on : 30 Sept 2024, 12:15:26
    Author     : Victor Mosconi
*/

body {
    font-family: 'Roboto', sans-serif;
    margin: 0;
    padding: 0;
    background-color: #f4f4f4;
    overflow-x: hidden;
}

header {
    background-color: #333;
    color: #fff;
    padding: 20px;
    text-align: center;
}

header a {
    color: #fff;
    float: right;
    margin-right: 20px;
    text-decoration: none;
}

.login-container {
    max-width: 500px;
    margin: 100px auto;
    padding: 80px;
    background-color: #fff;
    border-radius: 10px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    text-align: center;
}

.login-container h2 {
    margin-bottom: 20px;
}

.login-container label {
    display: block;
    margin-bottom: 5px;
    font-weight: bold;
}

.login-container input {
    width: 100%;
    padding: 10px;
    margin-bottom: 20px;
    border: 1px solid #ccc;
    border-radius: 5px;
}

.login-container button {
    width: 100%;
    padding: 20px;
    background-color: #333;
    color: #fff;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    transition: background-color 0.3s;
}

.naotenhocadastro {
    width: 100%;
    padding: 20px;
    background-color: blueviolet;
    color: #fff;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    transition: background-color 0.3s;
    margin-top: 20px;
    margin-bottom: 20px;
    text-decoration: none;
    float: left;
}

.naotenhocadastro a {
    color: #fff;
    text-decoration: none;
}

.login-container button:hover {
    background-color: #555;
}

.error {
    color: red;
    margin-bottom: 20px;
}

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


img {
    max-width: 100%;
    display: block;
}

/* Cabeçalho */
.main-header {
    width: 100%;
    background-color: #f7f7f7;
    /*background-color: #106eea;;*/
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.header-container {
    max-width: 1200px;
    margin: 0 auto; /* Centraliza o conteúdo horizontalmente */
    padding: 15px 30px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap; /* Permite que os elementos quebrem linha em telas menores */
}

.logo {
    display: flex;
    align-items: center;
    justify-content: center;
    flex: 1 1 100%; /* Ocupa 100% da largura em telas pequenas */
    margin-bottom: 10px; /* Espaço inferior para separação em telas pequenas */
}

.logo img {
    height: 70px;
}

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

.user-name {
    font-size: 16px;
    color: #000;
}

.logout-button {
    background-color: #000;
    color: #FFF;
    padding: 8px 16px;
    font-size: 14px;
    font-weight: 500;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    transition: background-color 0.3s;
}

.logout-button:hover {
    background-color: #000;
}

/* Seção de Banner */
.hero-section {
    position: relative;
    height: 60vh;
    overflow: hidden;
}

.hero-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.hero-content {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    text-align: center;
    color: #106eea;
    text-shadow: 0 2px 4px rgba(0,0,0,0.6);
}

.hero-content h1 {
    font-size: 56px;
    font-family: 'Poppins', sans-serif;
    margin-bottom: 20px;
    color:#FFF;
    font-weight: bold;
}

.hero-content p {
    font-size: 20px;
    margin-bottom: 30px;
    color:#FFF;
    font-weight: bold;
}

.btn-hero {
    display: inline-block;
    padding: 15px 30px;
    background-color: #FFF;
    color: #000;
    font-size: 18px;
    font-weight: 500;
    border-radius: 5px;
    transition: background-color 0.3s;
}

.btn-hero:hover {
    background-color: #f7f7f7;
}

/* Seção de Produtos */
.product-section {
    padding: 50px;
    background-color: #f7f7f7;
}

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

/* Cartão de Produto */
.product-card {
    background-color: #ffffff;
    border-radius: 10px;
    overflow: hidden;
    position: relative;
    transition: transform 0.3s, box-shadow 0.3s;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
}

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

.product-image {
    position: relative;
}

.product-image img {
    width: 100%;
    height: 330px;
    object-fit: cover;
}

.locked-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
}

.lock-icon {
    font-size: 48px;
    color: goldenrod;
}

.product-info {
    padding: 15px;
    text-align: center;
}

.product-info h3 {
    font-size: 20px;
    font-family: 'Poppins', sans-serif;
    margin-bottom: 15px;
    color: #141414;
}

.product-info span {
    font-size: 16px;
    font-family: 'Poppins', sans-serif;
    color: #141414;
}

.buy-button {
    background-color: #106eea;
    color: #FFF;
    padding: 10px 20px;
    font-size: 16px;
    font-weight: 500;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    transition: background-color 0.3s;
    margin-top: 10px;
    text-align: center; /* Centraliza o texto dentro do botão */
}

.buy-button a {
    color: #FFF;
    text-decoration: none;
    display: block; /* Faz o link preencher todo o botão */
    width: 100%; /* Garante que o link ocupe 100% da largura do botão */
    height: 100%; /* Garante que o link ocupe 100% da altura do botão */
    padding: 10px 20px; /* Mantém o padding do link para torná-lo clicável */
}

.buy-button:hover {
    background-color: #0a56b8;
}

/* Estado de Produto Comprado */
.product-card[data-purchased="true"] .locked-overlay {
    display: none;
}

.product-card[data-purchased="true"] .buy-button {
    display: none;
}

.product-card[data-purchased="true"] .product-info {
    padding-bottom: 15px;
}

.product-card[data-purchased="true"] .product-info .access-buttons {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.access-button {
    background-color: #28a745;
    color: #106eea;
    ;
    padding: 10px 20px;
    font-size: 16px;
    font-weight: 500;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    transition: background-color 0.3s;
}

.access-button:hover {
    background-color: #218838;
}

/* Rodapé */
.main-footer {
    padding: 20px;
    text-align: center;
    background-color: #e9e9e9;
    color: #666666;
}

.main-footer p {
    font-size: 14px;
}

/* Responsividade */
@media (max-width: 768px) {
    .hero-content h1 {
        font-size: 36px;
    }

    .header-container {
        flex-direction: column; /* Coloca o logo e informações um abaixo do outro */
        align-items: center; /* Centraliza o conteúdo */
        justify-content: center; /* Centraliza o conteúdo */
    }

    .user-info {
        justify-content: center; /* Centraliza o texto e botão em telas pequenas */
        margin-top: 10px; /* Espaço entre logo e informações do usuário */
    }

    .logo img {
        margin-bottom: 10px; /* Espaço entre logo e informações do usuário em telas pequenas */
    }
}