.bookstore-nav {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 2px;
  margin: 1rem 0 1.5rem;
  padding: 2px;
  background: #111827;
  border-radius: 4px;
}

.bookstore-nav a,
.bookstore-nav [aria-current="page"] {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  box-sizing: border-box;
  padding: 0.55rem 0.65rem;
  color: #ffffff;
  font-weight: 700;
  line-height: 1.2;
  text-align: center;
  text-decoration: none;
}

.bookstore-nav a:link,
.bookstore-nav a:visited {
  color: #ffffff;
  background: #172554;
}

.bookstore-nav a:hover,
.bookstore-nav a:focus {
  color: #ffffff;
  background: #1d4ed8;
  text-decoration: underline;
  text-underline-offset: 0.18em;
}

.bookstore-nav [aria-current="page"] {
  background: #7e22ce;
}

.book-list {
  width: 100%;
  margin: 0;
  border-collapse: collapse;
}

.book-list td {
  border-bottom: 1px solid #cbd5e1;
}

.book-list tr:first-child td {
  border-top: 1px solid #cbd5e1;
}

.book-list td:first-child {
  width: 150px;
  box-sizing: border-box;
  padding: 1.25rem 1rem;
  vertical-align: top;
  text-align: center;
  background: #f8fafc;
  border-left: 1px solid #cbd5e1;
}

.book-list td + td {
  padding: 1.15rem 1.4rem;
  vertical-align: top;
  border-right: 1px solid #cbd5e1;
}

.book-cover-image {
  display: block;
  width: 120px;
  max-width: 100%;
  height: auto;
  margin: 0 auto;
  box-shadow: 0 4px 12px rgba(15, 23, 42, 0.24);
}

.book-list td + td > a:first-child {
  display: inline-block;
  margin: 0 0 0.65rem;
  color: #5b21b6;
  font-size: 1.35rem;
  font-weight: 700;
  line-height: 1.25;
  text-decoration: underline;
  text-decoration-thickness: 0.08em;
  text-underline-offset: 0.16em;
}

.book-list td + td > a:first-child:visited {
  color: #6b21a8;
}

.book-list td + td > a:first-child:hover,
.book-list td + td > a:first-child:focus {
  color: #1d4ed8;
}

.book-list p {
  margin: 0.45rem 0 0;
  line-height: 1.6;
}

@media (max-width: 720px) {
  .bookstore-nav {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .book-list,
  .book-list tbody,
  .book-list tr,
  .book-list td {
    display: block;
    width: 100%;
    box-sizing: border-box;
  }

  .book-list tr {
    margin-bottom: 1rem;
  }

  .book-list td:first-child {
    width: 100%;
    border-right: 1px solid #cbd5e1;
  }

  .book-list td + td {
    border-left: 1px solid #cbd5e1;
  }

  .book-cover-image {
    width: 140px;
  }
}
