:root {
  --technigo-blue: #0018A4;
  --technigo-light-blue: #FAFBFF;
  --technigo-turqoise: #CCFFE2;
  --technigo-pink: #FF6589;
  --technigo-light-pink: #FFECEA;
  --light-grey: #E9E9E9;
  --dark-grey: rgb(99, 99, 99);
  --border-radius: 16px 0;
  --border-radius-btn: 50px;
  --font-size: 16px;
  --shadow: 0px 0px 30px 0px #0018A433;
  --transition: all .2s ease-in;

}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  font-family: "Futura", Tahoma, Geneva, Verdana, sans-serif;
}

body {
  max-width: 1400px;
  margin: 0 auto;
  background-color: var(--technigo-light-blue);
  overflow-x: hidden;
}

header {
  display: flex;
  padding: 3vw;
}

main {
  padding: 0 3vw;

}

h1 {
  font-size: calc(var(--font-size) * 4);
  color: var(--technigo-blue);
}

h2 {
  font-size: 1.4rem;
  font-weight: 700;
}

h4 {
  font-size: 1.125rem;
  font-weight: 700;
  padding-top: 0.5rem;
  margin-top: 1rem;
  border-top: var(--light-grey) solid 1px;
}

fieldset {
  border: none;
  margin: 1rem;
}

button {
  height: 40px;
  min-width: 120px;
  border-radius: var(--border-radius-btn);
  border: none;
  padding: 0.5rem 1rem;
  background-color: var(--technigo-blue);
  color: white;
  font-weight: 500;
  transition: var(--transition);
}

button:hover {
  background-color: var(--technigo-turqoise);
  color: var(--technigo-blue);
}

.header-bar > button {
  margin: 0 0.5rem;
}

form button {
  background-color: var(--technigo-pink);
}

form button:hover {
  background-color: var(--technigo-light-pink);
}

select {
  height: 40px;
  border-radius: var(--border-radius-btn);
  border: var(--technigo-blue) solid 1px;
  padding: .5rem 1rem;
  background-color: var(--technigo-turqoise);
  color: var(--technigo-blue);
  font-weight: 500;
  transition: var(--transition);
}
select:hover {
  background-color: var(--technigo-blue);
  color: white;
}

select:focus {
  box-shadow: var(--shadow);
  border: none;
}

input {
  border: none;
  background-color: transparent;
  padding: 0 1rem;
  margin: 0 0.5rem;
  width: 100%;
}

input:focus-visible {
  appearance: none;
  border: none;
}

details {
  margin: 1rem 0;
}

summary {
  border-bottom: var(--light-grey) 1px solid;
}

.header-bar {
  width: 100%;
  padding: 1rem 0;
  display: flex;
  align-items: flex-end;
  flex-wrap: wrap;
  row-gap: 0.5rem;
  border-bottom: var(--light-grey) 1px solid;
}

.search {
  display: flex;
  justify-content: space-between;
  align-items: center;
  height: 40px;
  width: 100%;
  border-radius: var(--border-radius-btn);
  background-color: var(--technigo-light-pink);
}

.options {
  display: flex;
  align-items: baseline;
  flex-wrap: wrap;
  justify-content: flex-start;
  width: 100%;
  border-radius: var(--border-radius);
  box-shadow: var(--shadow);
  margin: 1rem 0 ;
}

.book-listing {
  display: flex;
  gap: 1rem;
  overflow-x: hidden;
  flex-wrap: wrap;
  justify-content: space-evenly;
  align-content: flex-start;
}

.book-item {
  width: 100%;
  display: flex;
  flex-direction: column;
  background-color: white;
  padding: 1rem 1rem 2rem 1rem;
  border-radius: var(--border-radius);
  margin-bottom: 1rem;
  transition: var(--transition);
  border: transparent solid 2px;
}

.book-item:hover {
  border: var(--technigo-blue) solid 2px;
  box-shadow: var(--shadow);
}

.random-book-badge {
  position: absolute;
  transform: translate(-1rem, 1rem);
  background: var(--technigo-light-pink);
  display: inline-block;
  width: fit-content;
  padding: 0.5rem;
  margin-bottom: 0.5rem;
  align-self: flex-end;
}

.book-image {
  max-width: 100%;
  aspect-ratio: 5 / 4;
  border-radius: var(--border-radius);
  margin-bottom: 2rem;
  object-fit: cover;
}

.author {
  border-bottom: var(--light-grey) solid 1px;
  padding-bottom: 1rem;
  margin-bottom: 1rem;
}

.author + * {
  padding-top: 1rem;
}

.author::before {
  content: "by ";
  font-size: x-small;
  font-style: italic;
}

.genre {
  color: var(--technigo-pink);
  font-weight: 700;
}

.rating::before {
  content: "rating ";
  font-size: x-small;
  font-style: italic;
}

.description {
  font-weight: 400;
}

.top-btn {
  position: fixed;
  right: 0;
  bottom: 0;
  margin: 1rem;
}

.close {
  padding: 1rem 1rem 0 0 ;
  align-self: flex-end;
  color: var(--technigo-blue);
  margin-left: auto;
}

.hidden {
  display: none;
}


@media screen and (min-width: 668px) {
    .book-item {
    max-width: 48%;
  }
}

@media screen and (min-width: 1025px) {
  .book-listing {
    justify-content: flex-start;
  }
      .book-item {
      max-width: 24%;
    }
  }
