* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html, body {
  width: 100%;
  height: 100%;
  overflow-x: hidden;
  background-color: #ffffff;
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

.header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  color: #ffffff;
  background: linear-gradient(135deg, #161b59, #4737ba);
  padding: 0.3125rem;
  flex-wrap: wrap;
  box-shadow: 0 0.125rem 0.25rem rgba(0, 0, 0, 0.1);
}

.logo-container {
  display: flex;
  align-items: center;
  justify-content: center;
  flex: 1;
  margin-bottom: 1rem;
  margin-right: 4.3rem;
}

.container {
  max-width: 75rem;
  margin: 0 auto 3.75rem auto;
  padding: 1.25rem;
  overflow: hidden;
  text-align: center;
}

.container-general {
  width: 100%;
  padding-bottom: 3rem;
}

.container-general a, 
.container-general p,
.container-general h1,
.container-general h2 {
  font-family: 'Cambria', sans-serif;
}

.container-general a {
  text-decoration: none;
}

.container-general p {
  max-width: 90%;
  margin: 0 auto 1.25rem auto;
  text-align: left;
  font-size: 1rem; 
  line-height: 1.5;
}

.container-general h1,
.container-general h2 {
  font-size: 1.5rem; 
  margin-bottom: 0.9375rem;
}

.logo {
  position: relative;
  max-width: 6rem; 
}

.logo img, 
.logo-larger img {
  max-width: 100%;
  max-height: 100%;
  vertical-align: middle;
}

.logo-larger img {
  max-width: 10rem; 
}

.dialog {
  position: absolute;
  background-color: #fff;
  color: #080707;
  border-radius: 0.5rem;
  width: 17.5rem; 
  padding: 0.625rem; 
  max-width: 18.75rem; 
  box-shadow: 0 0 0.625rem rgba(0,0,0,0.1);
  opacity: 0;
  transform: translateY(0.625rem);
  transition: opacity 0.3s, transform 0.3s;
  pointer-events: none;
  z-index: 1000;
}

.show-dialog {
  animation: fadeInUp 0.3s forwards;
  pointer-events: auto;
}

@keyframes fadeInUp {
  0% {
      opacity: 0;
      transform: translateY(1rem);
  }
  100% {
      opacity: 1;
      transform: translateY(0);
  }
}

@keyframes slideInFromLeft {
  0% {
      opacity: 0;
      transform: translateX(-10%);
  }
  100% {
      opacity: 1;
      transform: translateX(0); 
  }
}

#home {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.25rem;
  padding: 1.25rem;
  align-items: stretch;
  background-color: #ffffff;
}

.product {
  border: 1px solid transparent;
  padding: 1em;
  border-radius: 0.625rem;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
  transition: box-shadow 0.3s;
}

.product:hover {
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

.product-image {
  width: 100%;
  height: auto; 
}

.product-link {
  text-decoration: none;
}

.dialog, .product-title, .original-price, .current-price, .discount-percentage {
  font-family: 'Roboto', sans-serif;
}

.product-title {
  font-size: 1rem; 
  margin: 0.5em 0;
  text-align: center;
}

.product-info {
  align-items: center;
  margin-top: 0.625rem;
}

.price-details {
  display: flex;
  justify-content: center;
  align-items: center;
  width: 100%;
}

.original-price {
  text-decoration: line-through;
  color: #777;
  margin-top: 0.625rem;
  margin-right: 0.9375rem;
  white-space: nowrap;
}

.current-price {
  color: #1e2469;
  font-weight: bold;
  font-size: 1.2rem;
  text-align: center;
  margin-top: 0.3125rem;
  margin-bottom: 0.3125rem;
}

.discount-percentage {
  background-color: #03b100;
  color: white;
  font-size: 1rem;
  margin-top: 0.625rem;
  border-radius: 0.3rem;
  padding: 0.02rem 0.23rem;
  display: inline-block; 
}

.menu-dropup, .filter-section {
  position: absolute;
  bottom: 3.0625rem;
  background: linear-gradient(135deg, #4737ba, #161b59);
  box-shadow: 0 0 0.3125rem rgba(0,0,0,0.1);
  z-index: 1000;
  border-radius: 0.625rem 0.625rem 0 0;
}

footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  color: #ffffff; 
  background: linear-gradient(135deg, #161b59, #4737ba);
  padding: 0.003125rem 5%;
  height: 3.125rem;
  width: 100%;
  position: fixed;
  bottom: 0;
  box-shadow: 0 -0.125rem 0.25rem rgba(0, 0, 0, 0.1);
}

.footer a, .menu-dropup a {
  text-decoration: none;
  color: #ffffff;
}

.footer a {
  display: inline-block;
  width: 1.875rem;
  height: 1.875rem;
  text-align: center;
}

.footer img, .menu-dropup img {
  max-width: 100%;
  max-height: 100%;
}

.footer a:hover {
  color: #ddd;
}

.menu-dropup {
  display: none;
  left: 0;
  animation: fadeInUp 0.3s forwards;
  width: 7.1875rem;
  border: 0.0625rem solid #05041c;
  font-family: 'Quicksand', sans-serif;
}

.menu-dropup a {
  display: block;
  padding: 0.375rem 0.3125rem 0.4375rem 0.125rem;
}

.filter-section {
  display: none;
  left: 7.125rem;
  animation: slideInFromLeft 0.3s forwards;
  border: 0.0625rem solid #05041c;
  width: 7.8125rem;
  padding: 1.25rem;
}


.filter-section label {
  margin-left: 0.0625rem;
  font-size: 0.71875rem;
  font-family: 'Quicksand', sans-serif;
  color: #fff;
  white-space: nowrap;
}

.filter-section input[type="number"], .filter-section select {
  width: 90%;
  padding: 0.0625rem;
  margin: 0.50rem 0.25rem;
  border-radius: 0.3125rem;
}

.filter-section input[type="number"] {
  border: 0.0625rem inset #1a1a1b;  
  background: linear-gradient(135deg, #4737ba, #161b59);
  color: #fff;
  font-size: 0.9375rem;
  -webkit-appearance: none;  
  -moz-appearance: textfield;
  text-align: center;
}

.filter-section input[type="number"]::-webkit-inner-spin-button,
.filter-section input[type="number"]::-webkit-outer-spin-button {
  -webkit-appearance: none;
  margin: 0;
}

.filter-section input[type="number"]::-moz-input-number-spinner {
  display: none;
}

.filter-section input[type="number"]::-ms-clear {
  display: none;
}


.filter-section select {
  width: 95%;
  margin: 0.5rem 0.1875rem;
  border: 0.0625rem outset #1a1a1b;
  background: linear-gradient(135deg, #4737ba, #161b59);
  font-family: 'Roboto', sans-serif;
  font-size: 0.8125rem;
  color: #ffffff;
  text-align-last: center; 
  -webkit-appearance: none; 
}

.filter-section select:focus {
  color: #161b59;
}

.filter-section option {
  font-size: 0.6875rem;
}

.filter-section button {
  padding: 0.5rem 0.4375rem;
  background: linear-gradient(90deg, #d7d7d7, #eaeaea, #d7d7d7);
  margin-top: 0.625rem;
  border-radius: 1.25rem;
  cursor: pointer;
  transition: background-color 0.3s;
  display: inline-block;
  margin-left: 0.85rem;
  width: 70%;
  font-weight: bold;
  border: 0.0625rem outset #1a1a1b;
  font-family: 'Roboto', sans-serif;
  font-size: 0.8125rem;
  color: #010369;
}

.filter-section button:hover {
  background-color: #0056b3;
}

.search-bar {
    display: none;
    position: absolute;
    left: 7.25rem;
    bottom: 3.0625rem;
    animation: fadeInUp 0.5s forwards;
    right: 1.375rem;
    z-index: 1002;
    border-radius: 0.9375rem;
    background: #4737ba;
    padding: 0.21875rem;
}

.search-bar input {
    border: none;
    outline: none;
    width: calc(100% - 1.875rem);
    padding: 0.3125rem;
    font-size: 1rem;
    border-radius: 0.625rem;
    margin: 0; 
    background-color: #ffffff; 
}

#btnSearchOK {
    background-color: transparent;
    color: #fff;
    border: none;
    cursor: pointer;
    margin-left: 0.2125rem;
}

.submenu, .submenu-ordenacao {
  display: none;
  position: absolute;
  left: 7.125rem;
  bottom: 3.0625rem;
  animation: slideInFromLeft 0.3s forwards;
  background: linear-gradient(135deg, #4737ba, #161b59);
  border: 0.0625rem solid #05041c;
  font-family: 'Quicksand', sans-serif;
  border-radius: 0.625rem 0.625rem 0 0;
  box-shadow: 0 0 0.3125rem rgba(0,0,0,0.1);
  list-style: none;
  z-index: 1000;
}

.submenu {
  width: 10.625rem;
  max-height: 18.75rem;
  overflow-y: auto;
}

.submenu-ordenacao {
  width: 14.6875rem;
}

.submenu a, .submenu-ordenacao a {
  display: block;
  color: #ffffff;
  text-decoration: none;
  white-space: nowrap;
}

.submenu a {
  padding: 0.1875rem 0.125rem 0.3125rem 0.125rem;
}

.submenu-ordenacao a {
  padding: 0.3125rem 0.375rem 0.1875rem 0.125rem;
}

.submenu a:hover, .submenu-ordenacao a:hover {
  background-color: #0d1532;
}

.page {
  margin: 1em auto;
  background-color: #fff;
  border-radius: 0.625rem;
  box-shadow: 0 0 0.625rem rgba(0, 0, 0, 0.1);
  max-width: 100%;
  text-align: center;
  word-wrap: break-word;
}

.hidden {
  display: none;
}

.popover {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 80%;
    max-width: 37.5rem;
    max-height: 70vh;  
    overflow-y: auto;  
    background-color: #ffffff;
    padding: 1.25rem;
    box-shadow: 0 0.3125rem 0.9375rem rgba(0, 0, 0, 0.3);
    border-radius: 0.625rem;
    z-index: 1000;
    display: none; 
    flex-direction: column; 
    justify-content: flex-start; 
    align-items: center; 
}

.popover-image {
    width: 100%;
    max-width: 34.375rem;
    height: auto;
    border-radius: 0.3125rem;
    margin-bottom: 0.625rem;
}

.popover-description {
    font-size: 0.78125rem;
    font-family: 'Roboto', sans-serif;
    margin-bottom: 1.25rem;
    text-align: left;
}

.popover-images {
    display: flex;
    gap: 0.625rem; 
}

.popover-close {
    position: absolute;
    top: 0.625rem;
    right: 0.625rem;
    cursor: pointer;
    font-size: 1.5rem;
    background-color: #eee;
    border: none;
    border-radius: 50%;
    width: 1.875rem;
    height: 1.875rem;
    line-height: 1.875rem;
    text-align: center;
}

.popover-button {
    padding: 0.625rem 0.9375rem; 
    background-color: #0284ef; 
    color: #FFF; 
    font-size: 0.875rem;
    font-family: 'Roboto', sans-serif;
    border: 1px outset #2a40f3;
    border-radius: 1.875rem;
    text-decoration: none;
    white-space: nowrap;
    cursor: pointer;  
    display: block; 
    width: 9.6875rem; 
    margin-left: auto;
    margin-right: auto;
}

.popover-button:hover {
    background-color: #0056b3;
}

@media screen and (min-width: 48rem) {
  .footer a:not(:last-child) {
    margin-right: 5%;
  }
}

@media screen and (min-width: 31.25rem) {
  .menu-dropup {
    width: 7.5rem; 
  }

  .menu-dropup a {
    padding: 0.625rem 0.5625rem 1.875rem 1.25rem;
  } 

  .submenu {
    width: 10.9375rem;
    left: 7.3125rem;
  }

  .submenu a {
    padding: 0.625rem 0.5625rem 1.875rem 1.0625rem;
  }

  .submenu-ordenacao {
    width: 15.3125rem;
    left: 7.3125rem;
  }

  .submenu-ordenacao a {
    padding: 0.625rem 0.5625rem 1.875rem 1.25rem;
  }

  .search-bar {
   max-width: 25%;
   left: 12%;
   }

  .filter-section {
    left: 7.3125rem;
  }
}    
  
@media screen and (max-width: 30rem) {
  #home {
    grid-template-columns: repeat(2, 1fr) !important;
    gap: 0.625rem;
    padding: 0.625rem;
    margin: 0 auto;
    max-width: 100%;
  }

  .product {
    padding: 0.5rem;
  }

  .product-image {
    width: 100%;
    height: auto;
  }

  .product-title {
    font-size: 0.8rem;
  }

  .footer a {
    margin: 1rem;
  }

  .footer img {
    width: 2.1875rem;
    height: 2.1875rem;
  }
}