/* ============================================================
   Piketown Press - book page styles  (generated site uses this)
   ============================================================ */

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { font-size: 16px; }

body {
  background: #F4EEDF;
  color: #2A2218;
  font-family: 'Iowan Old Style', 'Palatino Linotype', Palatino, 'Book Antiqua', Georgia, serif;
  line-height: 1.7;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

a { color: #6B2737; transition: color 150ms; }
a:hover { color: #4A1525; }

/* Header */
.site-header {
  padding: 1.75rem 2.5rem 1.5rem;
  border-bottom: 1px solid rgba(107, 39, 55, 0.18);
  text-align: center;
}
.wordmark {
  font-size: 18px;
  font-style: italic;
  color: #6B2737;
  letter-spacing: 0.04em;
  text-decoration: none;
}

/* Main layout */
main {
  flex: 1;
  padding: 4rem 2rem;
  max-width: 1000px;
  width: 100%;
  margin: 0 auto;
}

/* Hero section: cover + info, side by side on desktop */
.book-hero {
  display: grid;
  grid-template-columns: 340px 1fr;
  gap: 4rem;
  align-items: start;
  margin-bottom: 4.5rem;
}

.book-cover img {
  width: 100%;
  height: auto;
  display: block;
  border-radius: 2px;
  box-shadow: 0 3px 10px rgba(42, 34, 24, 0.10);
}

.book-info {
  padding-top: 0.5rem;
}

.imprint-tag {
  font-size: 12px;
  font-style: italic;
  color: #6B5D52;
  letter-spacing: 0.08em;
  margin-bottom: 1rem;
}

h1 {
  font-size: 38px;
  font-weight: 400;
  line-height: 1.15;
  letter-spacing: -0.01em;
  margin-bottom: 0.75rem;
  color: #2A2218;
}

.subtitle {
  font-size: 19px;
  font-style: italic;
  color: #4A3A2C;
  line-height: 1.4;
  margin-bottom: 1.5rem;
}

.author-line {
  font-size: 15px;
  color: #6B5D52;
  letter-spacing: 0.04em;
  margin-bottom: 0.5rem;
}

.book-meta {
  font-size: 13px;
  font-style: italic;
  color: #6B5D52;
  letter-spacing: 0.04em;
  margin-bottom: 2rem;
}

.tagline {
  font-size: 17px;
  color: #3A3025;
  line-height: 1.6;
  margin-bottom: 2.5rem;
  padding-left: 1rem;
  border-left: 2px solid rgba(107, 39, 55, 0.35);
}

/* Buy box */
.buy-box {
  background: rgba(255, 252, 244, 0.7);
  border: 1px solid rgba(107, 39, 55, 0.18);
  border-radius: 4px;
  padding: 1.5rem 1.5rem 1.75rem;
  margin-top: 1rem;
}

.buy-box h2 {
  font-size: 14px;
  font-weight: 400;
  font-style: italic;
  color: #6B5D52;
  letter-spacing: 0.08em;
  margin-bottom: 1rem;
}

.format-option {
  display: flex;
  align-items: center;
  padding: 0.75rem 0;
  border-bottom: 1px solid rgba(107, 39, 55, 0.12);
  cursor: pointer;
  user-select: none;
}
.format-option:last-of-type { border-bottom: none; }

.format-option input[type="checkbox"] {
  appearance: none;
  -webkit-appearance: none;
  width: 22px;
  height: 22px;
  border: 1.5px solid #6B2737;
  border-radius: 2px;
  margin-right: 1rem;
  cursor: pointer;
  position: relative;
  flex-shrink: 0;
  background: transparent;
  transition: background 150ms;
}
.format-option input[type="checkbox"]:checked {
  background: #6B2737;
}
.format-option input[type="checkbox"]:checked::after {
  content: '';
  position: absolute;
  left: 6px;
  top: 2px;
  width: 6px;
  height: 12px;
  border: solid #F4EEDF;
  border-width: 0 2px 2px 0;
  transform: rotate(45deg);
}

.format-name {
  flex: 1;
  font-size: 17px;
  color: #2A2218;
}

.format-price {
  font-size: 17px;
  color: #2A2218;
  font-variant-numeric: tabular-nums;
}

.buy-button {
  display: block;
  width: 100%;
  margin-top: 1.5rem;
  padding: 0.95rem 1.5rem;
  background: #6B2737;
  color: #F4EEDF;
  border: none;
  border-radius: 3px;
  font-family: inherit;
  font-size: 16px;
  letter-spacing: 0.05em;
  cursor: pointer;
  transition: background 150ms, opacity 150ms;
}
.buy-button:hover:not(:disabled) { background: #4A1525; }
.buy-button:disabled {
  background: #C4B5A6;
  color: #F4EEDF;
  cursor: not-allowed;
  opacity: 0.7;
}

.buy-note {
  margin-top: 0.75rem;
  font-size: 12px;
  color: #6B5D52;
  text-align: center;
  font-style: italic;
}

/* Book description */
.book-description, .book-author {
  max-width: 680px;
  margin: 0 auto 4rem;
  padding-top: 3rem;
  border-top: 1px solid rgba(107, 39, 55, 0.18);
}

.book-description h2, .book-author h2 {
  font-size: 16px;
  font-weight: 400;
  font-style: italic;
  color: #6B2737;
  letter-spacing: 0.08em;
  margin-bottom: 1.5rem;
  text-align: center;
}

.book-description p, .book-author p {
  font-size: 17px;
  color: #3A3025;
  margin-bottom: 1.25rem;
}
.book-description p:last-child, .book-author p:last-child { margin-bottom: 0; }

.book-author cite { font-style: italic; }

/* Footer */
.site-footer {
  padding: 1.5rem 2rem;
  border-top: 1px solid rgba(107, 39, 55, 0.18);
  text-align: center;
  font-size: 13px;
  color: #6B5D52;
  letter-spacing: 0.06em;
}

/* Mobile breakpoint */
@media (max-width: 760px) {
  main { padding: 2.5rem 1.25rem; }
  .book-hero {
    grid-template-columns: 1fr;
    gap: 2.5rem;
    margin-bottom: 3rem;
  }
  .book-cover {
    max-width: 280px;
    margin: 0 auto;
  }
  .book-info { padding-top: 0; }
  h1 { font-size: 30px; }
  .subtitle { font-size: 17px; }
  .tagline { font-size: 16px; }
  .book-description, .book-author {
    padding-top: 2rem;
    margin-bottom: 3rem;
  }
  .site-header { padding: 1.25rem 1.5rem; }
}

@media print {
  .site-header, .site-footer, .buy-box { display: none; }
  body { background: white; }
}
