#gallery-container {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: 10px;
  width: 90%;
  margin: 0 auto;
  padding: 0 0 3rem 0;
}

.page-heading h1 {
  padding: 1rem 0 0 0;
  margin-top: 20px;
  text-align: center;
}

.item-container {
  position: relative;
  display: inline-block;
  margin: 10px;
  padding: 15px;
  background-color: #fff4e4;
  border: 2px solid #4f0901;
  border-radius: 5px;
  text-align: center;
}

.item-container:hover::after {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.2); /* Dark overlay color */
  border-radius: 5px;
}

.try-on-button {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  background-color: #8d3c23;
  color: white;
  border: none;
  width: 5rem;
  padding: 8px 16px;
  border-radius: 5px;
  cursor: pointer;
  transition: background-color 0.3s ease; /* Smooth transition */
  z-index: 1;
}

.try-on-button:hover {
  background-color: #6e2b19; /* Darker background color on hover */
}

.temporary-message {
  transition: opacity 0.3s ease-in-out; /* Smooth fade-in and fade-out transition */
  margin-top: 5px;
}

.big-letter {
  font-size: 5em;
  font-weight: bold;
  color: #999; /* Initial color */
  padding: 1rem 1rem;
}

.big-letter.active {
  color: #8d3c23; /* Color when active */
}

.back-to-top-button {
  position: fixed;
  bottom: 20px;
  right: 20px;
  background-color: #4f0901;
  color: white;
  border: none;
  border-radius: 50%; /* Make circular */
  width: 40px;
  height: 40px;
  font-size: 24px;
  cursor: pointer;
  display: none; /* Hide the button by default */
  z-index: 1000; /* Ensure the button is above other content */
  transition: background-color 0.3s ease;
}

.back-to-top-button:hover {
  background-color: #8d3c23; /* Light red color on hover */
}

/* Media Query for Smaller Desktops */
@media screen and (max-width: 1366px) {
  #gallery-container {
    grid-template-columns: repeat(auto-fill, minmax(125px, 1fr));
    gap: 10px;
    width: 90%;
    margin: 0 auto;
    padding: 0 0 5rem 0;
  }

  .big-letter {
    font-size: 4em;
  }
}
/* Media Query for Mobile */
@media screen and (max-width: 768px) {
  #gallery-container {
    grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
    padding-bottom: 3rem;
  }

  .item-container {
    margin: 5px;
    padding: 10px;
  }

  .page-heading h1 {
    margin-top: 2rem;
  }

  .big-letter {
    font-size: 3em;
  }
}
