.pageWrapper {
  width: 100%;
  min-height: 100vh;
  background-color: #1a1242;
  color: #fff;
  display: flex;
  flex-direction: column;
  padding-bottom: 9vh;
}
.container {
  width: clamp(320px, 95%, 1367px);
  border-radius: 15px;
  background-color: #2e236c;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
  margin: 9vh auto 0;
  flex-grow: 1;
  padding-bottom: 2vh;
}

.main {
  padding: 0;
}

.main button {
  margin: 0.5rem;
}

.titleContainer {
  background-color: #4a3f8c;
  padding: clamp(1rem, 3vw, 2rem);
  border-radius: 8px;
  margin-bottom: 2rem;
  background-image: url("../../public/backgrounds/home.png");
  background-size: cover;
  background-position: center;
  position: relative;
}

.backButton{
  position: absolute;
  left:0;
  top:15px;
}

.title {
  font-size: clamp(1.2rem, 4vw, 2rem);
  margin: 0;
  text-align: center;
  font-family: "Jura", sans-serif;
  color: #c3c3e6;
}

.section {
  margin-bottom: clamp(1.5rem, 4vw, 2rem);
  display: flex;
  flex-direction: column;
  align-items: center;
}
.ebayLogo{
  width: 80px;
  height: auto;
  margin-left: 10px;
}
.sectionTitle {
  font-size: clamp(1rem, 3vw, 1.2rem);
  padding: clamp(.6rem, 2vw, .8rem) clamp(.75rem, 2vw, 1rem);
  display: block;
  font-family: "Poppins", sans-serif;
  text-align: center;
  display: flex;
  align-items: center;
}

.searchContainer {
  display: flex;
  flex-direction: column;
  align-items: center;
  max-width: 600px;
  margin: 0 auto;
}

.searchWrapper {
  position: relative;
  width: 100%;
  max-width: 500px;
  margin: 0 auto;
}

.searchInput {
  width: 100%;
  padding: clamp(0.6rem, 2vw, 0.8rem) clamp(0.75rem, 2vw, 1rem);
  border-radius: 8px;
  border: 1px solid #4a3f8c;
  background-color: #1a1242;
  color: #fff;
  font-size: clamp(0.9rem, 2.5vw, 1rem);
  font-family: "Poppins", sans-serif;
}

.searchLabel {
  justify-self: center;
}

.buttonGrid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
  gap: clamp(0.75rem, 2vw, 1rem);
  margin-top: clamp(0.75rem, 2vw, 1rem);
}

.itemGrid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: clamp(1rem, 3vw, 2rem);
  margin-top: clamp(0.75rem, 2vw, 1rem);
  max-width: 800px;
  margin-left: auto;
  margin-right: auto;
}

.itemCard {
  background-color: #1a1242;
  border-radius: 8px;
  padding: clamp(0.5rem, 1.5vw, 0.75rem);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: clamp(0.5rem, 1.5vw, 0.75rem);
}

.itemImage {
  aspect-ratio: 1;
  background-color: #4a3f8c;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100px;
}

.itemContent {
  display: flex;
  flex-direction: column;
  gap: clamp(0.25rem, 1vw, 0.35rem);
}

.itemTitle {
  font-size: clamp(0.8rem, 2vw, 0.9rem);
  font-weight: 500;
  font-family: "Poppins", sans-serif;
}

.itemPrice {
  color: #a8a8a8;
  font-size: clamp(0.7rem, 1.8vw, 0.8rem);
  font-family: "Poppins", sans-serif;
}

@media (max-width: 768px) {
  .container {
    width: 80%;
    margin: 7vh auto 0;
    border-radius: 0;
  }

  .main {
    padding: 1.5rem;
  }

  .itemGrid {
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  }
  .main {
    padding: 0;
  }
  .titleContainer{
    padding-top: 4rem;
  }
}


@media (max-width: 480px) {
 
  .searchInput{
    width:90%;
  }
  .sectionTitle{
    flex-direction: column;
  }
  .container {
    margin: 5vh auto 0;
    margin-top: 5rem;
  }

  .buttonGrid {
    grid-template-columns: repeat(2, 1fr);
  }

  .itemGrid {
    grid-template-columns: 1fr;
    max-width: 400px;
    margin-left: auto;
    margin-right: auto;
  }

  .itemImage {
    min-height: 200px;
  }
}

@media (max-width: 320px) {
  .container {
    margin: 4vh auto 0;
  }

  .main {
    padding: 0.75rem;
  }

  .buttonGrid {
    grid-template-columns: 1fr;
  }

  .itemImage {
    min-height: 180px;
  }
}

.actionButtons {
  display: flex;
  justify-content: flex-end;
  gap: 1rem;
  margin-top: 2rem;
  padding: 0 1rem;
}

.actionButtons button {
  min-width: 120px;
}
