/* ##############################
   Reset y estilos globales
##################################### */
body{
    overflow-x: hidden;
    background-color: #ffffff;
}
html, body {
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
}

footer {
  position: relative;
  margin-top: 6rem;
}

main {
  flex: 1;
}

/* #####################################
   BAR
##################################### */

.NavBarButtons li {
  display: inline-block;
  margin-right: 3.5rem;
}

.NavBarButtons {
  display: flex;
  gap: 2rem;
}

main{
  align-items: center;
  align-content: center;
}

/*###############
  Main content
#####################*/

.MainContent {
    box-shadow: 0 4px 6px rgba(1,1,1,0.1);
    margin: 2rem;
    padding: 2rem;
    margin-bottom: -3.6rem;
    background-color: #F7F5F2;
    min-height: 12rem;
    display: flex;
    flex-direction: row;
    justify-content: flex-start;
    align-items: flex-start;
    gap: 3rem;
    flex-wrap: wrap;
    justify-content: center; /* Añadido para centrar los elementos dentro de MainContent */
}

/*##############
Product
###############*/

.element {
    background-color: #ffffff;
    padding: 1.5rem;
    width: 250px;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    text-align: center; /* Añadido para centrar el contenido del .element */
}

.imgbg {
    width: 90%;        
    height: 180px;    
    margin: 0 auto; 
    background-color: #E7E7E7;
    border-radius: 4px; 
    overflow: hidden;
    display: flex;
    justify-content: center;
    align-items: center;
}

.item-img {
    max-width: 90%;   
    max-height: 90%;
    object-fit: contain;
}

.element-title {
    font-size: 1.2rem;
    margin: 0.5rem 0;
    color: #333;
}

.element-price {
    font-size: 1.1rem;
    color: #555;
    font-weight: bold;
    margin: 0;
}

.MainContent {
    display: flex;
    flex-direction: row;
    align-items: flex-start;
    gap: 2rem;
    flex-wrap: wrap; 
    justify-content: center; /* Asegurando que los elementos estén centrados */
}

.element {
    flex-shrink: 0; 
}

.Properties {
    color: #555;
    flex: 1;
    min-width: 220px;
    display: flex;
    flex-direction: column;
    gap: 1rem;
    padding: 1rem 0;
    justify-content: center; 
    align-items: center; 
}

.PropertiesList {
    color: #555;
    list-style: none;
    padding: 0;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
    align-self: center;
}

.BuyButton {
    border: 3px solid #A8794C;
    font-weight: bold;
    font-size: 1rem;
    border-color: #A8794C;
    color: #A8794C;
    background: none;
    align-self: center;
    margin-top: 1rem;
    padding: 0.8rem 2.5rem;
    cursor: pointer;
    max-width: 280px;
}

/* ###########################
    Mobile adjustments
########################*/

@media (max-width: 768px) {
    .MainContent {
        justify-content: center;
        align-items: center; 
    }

    .element {
        align-items: center; 
        margin: 0 auto;   
    }
}