.book-card,
.commerce-panel {
  background: #fff;
  border: 1px solid color-mix(in srgb, var(--accent-color), transparent 75%);
  border-radius: 12px;
  padding: 1.25rem;
  height: 100%;
}

.book-card {
  position: relative;
}

.book-card-footer {
  position: relative;
}

.book-details {
  white-space: pre-line;
}

.book-card .book-details:not(.d-none) {
  position: absolute;
  z-index: 1;
  left: 0;
  right: 0;
  bottom: 100%;
  max-height: 14rem;
  overflow: auto;
  margin: 0 0 0.5rem;
  padding: 0.75rem 0.85rem;
  background: #fff;
  border: 1px solid color-mix(in srgb, var(--accent-color), transparent 70%);
  border-radius: 8px;
  box-shadow: 0 10px 24px rgba(8, 28, 61, 0.12);
}

.book-cover {
  min-height: 220px;
  border-radius: 8px;
  margin-bottom: 1rem;
  padding: 1.25rem;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  color: #fff;
  background:
    linear-gradient(160deg, rgba(8, 28, 61, 0.15), rgba(8, 28, 61, 0.72)),
    #081c3d;
}

.book-cover span {
  color: #d4a026;
  font-size: 0.85rem;
  letter-spacing: 0.04em;
}

.book-cover strong {
  font-size: 1.35rem;
  line-height: 1.3;
}

.book-image {
  display: block;
  width: 100%;
  height: auto;
  object-fit: contain;
  border-radius: 8px;
  margin-bottom: 1rem;
  background: #081c3d;
}

.cart-book-cover {
  display: inline-block;
  width: auto;
  max-width: 72px;
  height: auto;
  max-height: 96px;
  object-fit: contain;
  border-radius: 4px;
  margin-right: 0.75rem;
  vertical-align: middle;
}

.book-badge {
  display: inline-block;
  color: #081c3d;
  background: color-mix(in srgb, var(--accent-color), transparent 80%);
  border-radius: 999px;
  padding: 0.15rem 0.7rem;
  font-size: 0.8rem;
  font-weight: 600;
}

.book-price,
.commerce-total {
  font-weight: 700;
  color: #081c3d;
}

.commerce-actions {
  position: relative;
  z-index: 4;
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 0.75rem;
}

.commerce-status,
.commerce-error,
.commerce-ok {
  min-height: 1.25rem;
  margin-top: 0.5rem;
}

.commerce-error {
  color: #9b1c1c;
}

.commerce-ok {
  color: #0f5132;
}

.commerce-totals {
  margin: 1rem 0;
}

.payment-choice {
  border: 1px solid #d7deea;
  border-radius: 10px;
  padding: 0.9rem 1rem;
  height: 100%;
}

.payment-instructions {
  white-space: pre-wrap;
  background: #f8f5ee;
  border-radius: 10px;
  padding: 1rem;
}

#paypal-button-container {
  max-width: 360px;
}
