body {
  margin: 0;
  padding: 0;
  font-family: Arial, sans-serif;
  background-color: #f1f2f4;
}

header {
  background-color: #ffffff;
  color: #fff;
  padding: 1rem 0;
  align-items: center;
}

.header_logo img {
  max-width: 5rem;
}

.search {
  background-color: #f0f5ff;
  border: none;
}

input:focus {
  outline: none;
}

.header_wrapper {
  display: grid;
  grid-template-columns: 1fr;

  justify-items: center;
  max-width: 90vw;
  margin: 0 auto;
  padding: 0.5rem;
  row-gap: 1rem;
}
.header_search {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 0.5rem;
}

.header_search input {
  padding: 0.5rem;
  border: none;
  border-radius: 0.5rem;
  color: #222;
  width: 15rem;
}

.header_search button {
  padding: 0.5rem 1rem;
  background-color: #ff9f00;
  color: #fff;
  border: none;
  border-radius: 0.5rem;
  cursor: pointer;
  width: 4rem;
  opacity: 0.8;
}
.header_search button:hover {
  opacity: 1;
}

.header_nav ul li button {
  padding: 0.5rem 1rem;
  background-color: #2a55e5;
  color: #fff;
  border: none;
  border-radius: 0.5rem;
  cursor: pointer;
}

.header_nav ul {
  display: grid;
  grid-template-columns: repeat(2, 6rem);
  list-style-type: none;
  margin: 0;
  padding: 0;
  place-items: center;
  place-content: center;
}

.header_nav li {
  margin-right: 1.5rem;
}
.header_nav button {
  opacity: 0.8;
}
.header_nav button:hover {
  opacity: 1;
}

.item-list {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  background-color: #ffffff;
  justify-content: center;
  place-content: center;
  place-items: center;
  margin: 0 auto;
  width: 90vw;
  gap: 1rem;
  height: 100%;
  padding: 1rem 0;
}

.item-list div:hover {
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.2);
}

.items {
  margin-top: 1rem;
  display: grid;
  align-items: center;
}

.breaker {
  margin-top: 1.5rem;
}

a {
  width: 1rem;
  height: 1.5rem;
}

.mid-banner {
  display: grid;
  width: 90vw;
  grid-template-columns: 1fr;
  gap: 1rem;
  justify-content: center;
  margin: 0 auto;
}

.logo {
  width: 100%;
}

.discount-banner {
  margin: 0 auto;
  width: 90vw;
}
.discount-banner img {
  max-width: 100%;
}

.lower-banner {
  display: grid;
  grid-template-columns: repeat(2, 1fr);

  margin: 0 auto;
  place-content: center;
  place-items: center;
  gap: 1rem;
  margin-bottom: 1rem;
  background-color: #ffffff;
  height: 100%;
  padding: 1rem;
}
.lower-banner > :first-child {
  grid-column: 1/-1;
}
.lower-banner-heading {
  grid-column-start: 1;
  grid-column-end: 7;
}

.lower-banner-ad {
  border: 0 solid #e0e0e0;
  padding: 0.5rem;
  border-width: 1px;
  border-radius: 0.5rem;
  box-sizing: border-box;
  width: 92%;
  max-width: 12.5rem;
  height: auto;
  text-align: center;
}

.lower-banner-ad img {
  width: 100%;
  height: 12rem;
}
.lower-banner-ad img:hover {
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.2);
}
footer {
  background-color: #212121;
  color: #5f6d6d;
  padding: 1rem 0;
}

.footer-container {
  display: grid;
  grid-template-columns: 1fr;
  text-align: center;
  max-width: 90vw;
  margin: 0 auto;
}

.footer-section h4 {
  font-size: 1rem;
  font-weight: bold;
  margin-bottom: 1rem;
  color: #7a8787;
}

.footer-section ul {
  list-style: none;
  padding: 0;
}

.footer-section ul li {
  margin-bottom: 0.5rem;
}

.footer-section ul li a {
  color: #fff;
  text-decoration: none;
  font-size: 0.8rem;
}

.footer-section ul li a:hover {
  text-decoration: underline;
}

.footer-bottom {
  text-align: center;
  font-size: 0.8rem;
  color: #fff;
}

@media screen and (max-width: 480px) {
  .header_search input {
    width: 74vw;
    max-width: 100%;
    padding: 0.45rem;
    font-size: 0.95rem;
  }
  .header_search button {
    width: auto;
    padding: 0.45rem 0.7rem;
    font-size: 0.95rem;
  }

  .item-list {
    grid-template-columns: repeat(2, 1fr);
    grid-auto-rows: auto;
    height: auto;
  }
}

@media screen and (min-width: 768px) {
  .header_logo {
    justify-self: start;
  }
  .header_wrapper {
    grid-template-columns: repeat(3, 1fr);
    row-gap: 1rem;
  }
  .header_search {
    margin-right: 1rem;
  }
  .header_search input {
    width: 30vw;
    max-width: 30vw;
    padding: 0.45rem;
    font-size: 0.95rem;
  }
  .header_search button {
    width: auto;
    padding: 0.45rem 0.7rem;
    font-size: 0.95rem;
  }

  .item-list {
    grid-template-columns: repeat(5, 1fr);
    width: 92vw;
    gap: 0.85rem;
  }

  .mid-banner {
    grid-template-columns: repeat(3, 1fr);
  }

  .lower-banner {
    grid-template-columns: repeat(3, 1fr);
  }

  .footer-container {
    grid-template-columns: repeat(4, 1fr);
  }
}

@media screen and (min-width: 1200px) {
  .item-list {
    grid-template-columns: repeat(9, 1fr);
    width: 90vw;
  }
  .lower-banner {
    grid-template-columns: repeat(6, 1fr);
    width: 90vw;
  }
}

@media screen and (orientation: portrait) {
  body {
    font-size: 0.98rem;
  }
  header {
    padding: 0.5rem 0;
  }
  .lower-banner {
    gap: 0.6rem;
    padding: 0.6rem;
  }
  .lower-banner-heading h3 {
    font-size: 1.05rem;
  }
  .item-list {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media screen and (aspect-ratio: 16/9) {
  .discount-banner img,
  .mid-banner .logo {
    max-height: 40vh;
    width: auto;
  }
  .lower-banner-ad {
    max-height: 60vh;
  }
  .lower-banner-ad img {
    object-fit: contain;
  }
}
