/* ================================
   CARDS - Corey's Bookshop
   Warm white background, gold hover border
   ================================ */

/* Base Card */
.card {
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: var(--radius-md);
  padding: 1.5rem;
  box-shadow: var(--shadow-card);
  transition: all var(--transition-base);
}

.card:hover {
  border-color: var(--card-border-hover);
  box-shadow: var(--shadow-card-hover);
  transform: var(--lift-sm);
}

/* Card Content */
.card__title {
  font-family: var(--font-heading);
  font-size: var(--text-xl);
  font-weight: var(--weight-semibold);
  color: var(--text-primary);
  margin-bottom: 0.5rem;
}

.card__text {
  font-size: var(--text-base);
  color: var(--text-secondary);
  line-height: var(--line-height-normal);
}

/* Home Section Cards */
.home-section {
  background: var(--bg-page);
  padding: 1.5rem;
  text-align: center;
  box-shadow: var(--shadow-card);
  cursor: pointer;
  transition: transform var(--transition-base), box-shadow var(--transition-base);
}

.home-section:hover {
  transform: var(--lift-sm);
  box-shadow: var(--shadow-card-hover);
}

.home-section h3 {
  font-family: var(--font-heading);
  font-size: var(--text-xl);
  font-weight: var(--weight-medium);
  margin-bottom: 0.5rem;
  color: var(--text-primary);
}

.home-section p {
  font-size: var(--text-sm);
  color: var(--text-secondary);
  margin: 0;
}

/* Book Card */
.book-card {
  text-align: center;
}

.book-card__cover {
  width: 100%;
  aspect-ratio: 2/3;
  background: linear-gradient(145deg, var(--color-old-paper), #D4CDB8);
  margin-bottom: 1rem;
  box-shadow: var(--shadow-book);
  overflow: hidden;
}

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

.book-card__title {
  font-family: var(--font-heading);
  font-size: var(--text-lg);
  font-weight: var(--weight-medium);
  margin-bottom: 0.25rem;
  color: var(--text-primary);
}

.book-card__author {
  font-size: var(--text-sm);
  color: var(--text-muted);
  font-style: italic;
}

.book-card__description {
  font-size: var(--text-sm);
  color: var(--text-secondary);
  margin-top: 0.5rem;
}

/* Book Grid */
.book-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 2rem;
}

/* Contents List (Table of Contents style) */
.contents-list {
  list-style: none;
  max-width: 600px;
  margin: 2rem auto;
  padding: 0;
}

.contents-item {
  display: flex;
  align-items: baseline;
  padding: 0.75rem 0;
  border-bottom: 1px dotted var(--border-subtle);
  cursor: pointer;
  transition: color var(--transition-fast);
  text-decoration: none;
  color: var(--text-primary);
}

.contents-item:hover {
  color: var(--color-burgundy-mid);
}

.contents-title {
  font-family: var(--font-heading);
  font-size: var(--text-lg);
}

.contents-dots {
  flex: 1;
  border-bottom: 1px dotted var(--border-subtle);
  margin: 0 1rem;
  height: 0.5em;
}

.contents-page {
  font-family: var(--font-heading);
  font-size: var(--text-base);
  color: var(--text-muted);
}

/* Mobile Adjustments */
@media (max-width: 768px) {
  .card {
    padding: 1.25rem;
  }

  .book-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
  }

  .home-section {
    padding: 1.25rem;
  }
}
