/* =================================
   BOOK GRID
================================= */

.books-grid {
  display: grid;

  grid-template-columns:
    repeat(2, minmax(0, 1fr));

  gap: 18px;

  padding: 15px;
}


/* =================================
   BOOK CARD
================================= */

.book-card {
  background: #ffffff;

  border-radius: 14px;

  overflow: hidden;

  border: 1px solid #e1e1e1;

  box-shadow:
    0 4px 15px rgba(0, 0, 0, 0.08);

  transition:
    transform 0.2s ease,
    box-shadow 0.2s ease;
}

.book-card:hover {
  transform: translateY(-3px);

  box-shadow:
    0 8px 25px rgba(0, 0, 0, 0.12);
}


/* =================================
   BOOK COVER
================================= */

.book-cover {
  width: 100%;

  aspect-ratio: 2 / 3;

  background: #eeeeee;

  overflow: hidden;
}

.book-cover img {
  width: 100%;
  height: 100%;

  display: block;

  object-fit: cover;
}


/* =================================
   BOOK INFORMATION
================================= */

.book-info {
  padding: 12px;
}

.book-price {
  margin: 0 0 8px;

  font-family: Inter, sans-serif;

  font-size: 14px;

  font-weight: 700;

  color: #172333;
}

.book-author {
  margin: 5px 0;

  font-family: Inter, sans-serif;

  font-size: 11px;

  font-weight: 700;

  color: #777;

  text-transform: uppercase;
}

.book-genre {
  margin: 7px 0;

  font-family: Inter, sans-serif;

  font-size: 9px;

  font-weight: 600;

  color: #999;

  letter-spacing: .5px;
}

.book-title {
  margin: 8px 0 12px;

  font-family: Georgia, serif;

  font-size: 17px;

  line-height: 1.2;

  color: #172333;
}


/* =================================
   BUTTON AREA
================================= */

.book-actions {
  display: flex;

  flex-direction: column;

  gap: 7px;
}


/* ALL BUTTONS */

.book-actions button {
  width: 100%;

  border: none;

  border-radius: 8px;

  padding: 10px 8px;

  font-family: Inter, sans-serif;

  font-size: 12px;

  font-weight: 700;

  cursor: pointer;
}


/* =================================
   PREVIEW
================================= */

.preview-btn {
  background: transparent;

  border: 1px solid #172333 !important;

  color: #172333;
}


/* =================================
   BUY
================================= */

.buy-btn {
  background: #172333;

  color: white;
}


/* =================================
   CART
================================= */

.cart-btn {
  background: #e8e8e8;

  color: #172333;
}


/* =================================
   FREE BOOK
================================= */

.read-btn {
  background: #172333;

  color: white;
}

.library-btn {
  background: #e8e8e8;

  color: #172333;
}


/* =================================
   MOBILE
================================= */

@media (max-width: 500px) {

  .books-grid {
    gap: 12px;

    padding: 10px;
  }

  .book-info {
    padding: 10px;
  }

  .book-title {
    font-size: 15px;
  }

  .book-actions button {
    font-size: 11px;

    padding: 9px 5px;
  }

}
.book-card {
  cursor: pointer;
}

.book-cover {
  width: 100%;
  aspect-ratio: 2 / 3;
  overflow: hidden;
  background: #eeeeee;
}

.book-cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.cover-error {
  display: flex;
  align-items: center;
  justify-content: center;
  color: #777;
  font-size: 13px;
}
* {
  -webkit-tap-highlight-color: rgba(160, 160, 160, 0.2); /* soft ash grey */
  -webkit-touch-callout: none; /* prevents long-press menu on iPhone */
}