/* CSS Reset */
/*
  1. Use a more-intuitive box-sizing model.
*/
*, *::before, *::after {
    box-sizing: border-box;
  }
  
  /*
    2. Remove default margin
  */
  * {
    margin: 0;
  }
  
  /*
    Typographic tweaks!
    3. Add accessible line-height
    4. Improve text rendering
  */
  body {
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
  }
  
  /*
    5. Improve media defaults
  */
  img, picture, video, canvas, svg {
    display: block;
    max-width: 100%;
  }
  
  /*
    6. Remove built-in form typography styles
  */
  input, button, textarea, select {
    font: inherit;
  }
  
  /*
    7. Avoid text overflows
  */
  p, h1, h2, h3, h4, h5, h6 {
    overflow-wrap: break-word;
  }
  
  /*
    8. Create a root stacking context
  */
  #root, #__next {
    isolation: isolate;
  }

#header {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 1rem;
    padding-left: 0;
    padding-right: 0;
    width: 100%;
    gap: 1rem;
    background-color: #F6F4F0;
    min-height: 4rem;
}

.navbar-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background-color: #2A2C2E;
    border-radius: 10px;
    padding: 10px 20px;
    width: 75%;
    max-width: 1200px;
    margin: 0 auto;
    min-height: 70px; /* Fixed height to prevent shifting */
}

.nav-brand {
    display: flex;
    align-items: center;
    gap: 8px; 
}

.brand-name {
    font-weight: bold;
    font-size: 18px;
    color: #FFFFFF;
}

.nav-list {
    display: flex;
    gap: 2rem; 
}

.nav-item:nth-of-type(1) {
    color: #F4D867;
}

.nav-item:nth-of-type(2),
.nav-item:nth-of-type(3),
.nav-item:nth-of-type(4),
.nav-item:nth-of-type(5) {
    color: #FFFFFF;
    opacity: 60%;
}

.nav-controls {
    display: flex;
    align-items: center;
    gap: 20px;
}

.icon-group {
    display: flex;
    gap: 20px;
}

.fa-solid, .fa-regular {
    font-size: 20px;
    color: #FFFFFF;
}

.login-button {
    background-color: #F4CE47;
    color: black;
    padding: 10px 20px;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-size: 16px;
}

.title-container {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 30px;
    width: 100%;
    font-size: 2rem;
    background-color: #F4CE47;
}

.title-highlight {
    color: #2A2C2E;
}

.title-secondary {
    opacity: 0.5;
    color: #F4BA30;
}

#content {
    display: flex;
    justify-content: center;
    background-color: #2A2C2E;
}

.product-list {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 10px; 
    padding: 15px;
    width: 100%; 
    max-width: 1000px; /* Constrain the maximum width */
}

.product-item {
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    Flex-grow: 0; 
    Flex-shrink: 0; 
    Flex-basis: 250px;
    height: 450px; 
    border: 1px solid grey;
    background-color: #FFFFFF;
    border-radius: 10px;
    padding: 8px;
    gap: 5px;
}

.product-image {
    height: 270px;
    width: 250px;
}

.product-name {
    display: flex;
    flex-direction: column;
    gap: 3px;

}

.author-name {
    color: #00000099;
    font-size: 14px;
}

.product-title {
    color: #000000DE;
    font-size: 16px;
}

.product-review {
    display: flex;
    align-items: center;
    gap: 16px;
    height: 50px;
    margin-top: 8px;
    
}

.comments {
    display: flex;
    flex-direction: row;
    justify-content: center;
    align-items: baseline;
    gap: 5px;
    border: 1px solid #000000DE;
    border-radius: 31px;
    padding: 5px;
    width: 60px;
}

.comments .fa-regular {
    font-size: 14px;
    color: black;
}

.ratings {
    display: flex;
    flex-direction: row;
    justify-content: center;
    align-items: baseline;
    gap: 5px;
    border: 1px solid #000000DE;
    border-radius: 31px;
    padding: 5px;
    width: 110px;
}

.ratings .fa-regular {
    font-size: 14px;
    color: black;
}

.product-price {
    display: flex;
    flex-direction: row;
    gap: 10px;
    margin-top: 10px;
    
}

.original-price {
    color: #00000061;
    text-decoration: line-through;
    font-size: 18px;
}

.new-price {
    color: #000000DE;
    font-size: 18px;
}

#footer {
    display: flex;
    flex-direction: column;
    padding-top: 20px;
    width: 100%;
    min-height: 5rem;
    background-color: #F6F4F0;
}

.footer-top {
    display: flex;
    justify-content: space-between;
    background-color: #2A2C2E;
    padding: 10px 10px;
    width: 75%;
    max-width: 1200px;
    margin: 0 auto;
}

.footer-brand {
    display: flex;
    align-items: center;
    gap: 8px;
}

.footer-brand-name {
    font-weight: bold;
    font-size: 15px;
    color: #FFFFFF;
}

.social-media {
    display: flex;
    align-items: center;
    gap: 15px;
    color: #FFFFFF;
}

.fa-brands {
    font-size: 20px;
}

.footer-bottom {
    display: flex;
    justify-content: space-between;
    background-color: #000000DE;
    opacity: 87%;
    padding: 10px 20px;
    width: 75%;
    max-width: 1200px;
    margin: 0 auto;
}

.links, .contacts {
    display: flex;
    gap: 10px;
}

.link {
    color: #FFFFFF;
    text-decoration: none;
}

/*Mobile Version*/
@media (max-width: 600px) {
    #header {
        width: 100%;
        padding: 0;
        padding-bottom: 10px;
    }
    
    .navbar-container {
        flex-direction: column;
        align-items: center;
        gap: 1.5rem; 
        width: 100%; 
        padding: 15px;
    }
    
    .nav-list {
        flex-direction: column;
        align-items: center;
        gap: 1rem;
    }

    .title-container .title-secondary:nth-of-type(1),
    .title-container .title-secondary:nth-of-type(2),
    .title-container .title-secondary:nth-of-type(4),
    .title-container .title-secondary:nth-of-type(5) {
        display: none; 
    }

    #footer {
        width: 100%;
        padding: 0;
        padding-top: 20px;
    }

    .footer-top, .footer-bottom {
        width: 100%;
    }

    .footer-bottom {
        flex-direction: column;
        align-items: center;
        gap: 10px;
    }
}
