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

body {
    font-family: Arial, sans-serif;
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    background-color: #f0f0f0;
    position: relative;
}

.container {
    width: 100%;
    max-width: 1200px;
    padding: 20px;
    background-color: #fff;
    box-shadow: 0 0 10px rgba(0,0,0,0.1);
}

h1 {
    text-align: center;
    margin-bottom: 20px;
	margin-top: 50px;
}

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

.product-item {
    background-color: #fafafa;
    padding: 15px;
    border: 1px solid #e0e0e0;
    text-align: center;
    border-radius: 5px;
    transition: transform 0.2s, background-color 0.3s;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    position: relative;
}

.product-item:hover {
    transform: scale(1.05);
    background-color: #f5f5dc;
}

.product-item .image-container {
    width: 100%;
    aspect-ratio: 1 / 1;
    overflow: hidden;
    border-radius: 5px;
    position: relative;
}

.product-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Tarja "Oferta" no canto superior esquerdo, em diagonal */
.product-item .badge {
    position: absolute;
    top: 10px;
    left: -20px;
    background-color: red;
    color: white;
    padding: 5px 20px;
    font-size: 14px;
    font-weight: bold;
    transform: rotate(-45deg);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
    z-index: 1;
}

.product-item .product-code {
    font-size: 18px;
    color: red;
    font-weight: bold;
    margin: 10px 0;
}

.product-item p {
    font-size: 16px;
    color: #333;
    margin: 10px 0;
}

.product-item a {
    display: inline-block;
    padding: 10px 15px;
    background-color: #007bff;
    color: white;
    text-decoration: none;
    border-radius: 3px;
    transition: background-color 0.3s;
}

.product-item a:hover {
    background-color: #0056b3;
}

/* Estilo para o botão flutuante */
#back-to-top {
    position: fixed;
    bottom: 20px;
    right: 20px;
    width: 50px;
    height: 50px;
    background-color: #007bff;
    color: white;
    border-radius: 50%;
    cursor: pointer;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    display: none;
    align-items: center;
    justify-content: center;
    text-align: center;
    font-size: 24px;
    transition: background-color 0.3s, opacity 0.3s;
    z-index: 1000;
}

#back-to-top:hover {
    background-color: #0056b3;
}

/* Tooltip ao passar o mouse */
#back-to-top::after {
    content: "Ir para o topo";
    position: absolute;
    bottom: 60px;
    right: -20px;
    background-color: #333;
    color: white;
    padding: 5px 10px;
    border-radius: 5px;
    font-size: 14px;
    white-space: nowrap;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease;
}

#back-to-top:hover::after {
    opacity: 1;
    visibility: visible;
}

/* Estilo para o campo de busca flutuante */
#search-container {
    position: fixed;
    top: 20px;
    right: 20px;
    width: 300px;
    z-index: 1000;
	left: 50%;
	transform: translateX(-50%); /* Ajusta para o centro */
}

#search {
    width: 100%;
    padding: 10px;
    font-size: 16px;
    border: 2px solid #007bff;
    border-radius: 5px;
    outline: none;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

#search:focus {
    border-color: #0056b3;
}
