/* ================================================================
   LargePrintPD — public site styles
   Palette: slate & wheat with parchment cream
   Fonts: Playfair Display (headlines), Lora (body)
   ================================================================ */

:root {
  --bg: #F2F0EC;
  --surface: #FFFFFF;
  --parchment: #EDE8DC;
  --slate: #3D5166;
  --slate-dark: #273547;
  --wheat: #C9A96E;
  --wheat-dark: #B5945A;
  --text: #2A2A2A;
  --muted: #6B6B6B;
  --border: #DDD7C8;
  --danger: #c44;
}

* { box-sizing: border-box; }
body {
  margin: 0;
  font-family: 'Lora', serif;
  color: var(--text);
  line-height: 1.6;
  background-color: var(--bg);
  background-image:
    /* Art deco fan pattern (SVG) - subtle gold geometric on parchment */
    url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='120' height='120' viewBox='0 0 120 120'><g fill='none' stroke='%23C9A96E' stroke-width='0.6' opacity='0.14'><path d='M60 0 L60 60 M40 4 L60 60 M20 16 L60 60 M4 36 L60 60 M0 60 L60 60 M80 4 L60 60 M100 16 L60 60 M116 36 L60 60 M120 60 L60 60'/><path d='M60 120 L60 60 M40 116 L60 60 M20 104 L60 60 M4 84 L60 60 M80 116 L60 60 M100 104 L60 60 M116 84 L60 60'/><circle cx='60' cy='60' r='2' fill='%23C9A96E' stroke='none' opacity='0.6'/></g></svg>"),
    /* Subtle noise underneath for warmth */
    url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='240' height='240'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/><feColorMatrix values='0 0 0 0 0.24 0 0 0 0 0.20 0 0 0 0 0.14 0 0 0 0.035 0'/></filter><rect width='100%' height='100%' filter='url(%23n)'/></svg>");
  background-repeat: repeat;
  background-attachment: fixed;
}
a { color: var(--slate); }

/* =========== NAV =========== */
nav { background: var(--surface); border-bottom: 1px solid var(--border); height: 64px; display: flex; align-items: center; padding: 0 2rem; }
.nav-logo { font-family: 'Playfair Display', serif; font-size: 1.4rem; font-weight: 700; color: var(--slate); text-decoration: none; display: flex; align-items: center; gap: 0.6rem; }
.nav-logo span { color: var(--wheat-dark); }
.nav-links { margin-left: auto; display: flex; gap: 2rem; list-style: none; padding: 0; }
.nav-links a { color: var(--text); text-decoration: none; font-size: 0.95rem; }
.nav-links a:hover { color: var(--wheat-dark); }

/* =========== HERO (index.php and about) =========== */
.hero { background: var(--slate); color: #F2F0EC; padding: 4.5rem 2rem 4rem; text-align: center; }
.hero h1 { font-family: 'Playfair Display', serif; font-weight: 600; font-size: 3rem; margin: 0 0 1rem; line-height: 1.15; }
.hero h1 em { font-style: italic; color: var(--wheat); display: block; }
.hero-sub { font-size: 1.15rem; opacity: 0.85; max-width: 620px; margin: 0 auto; }
.about-hero { background: var(--slate); color: #F2F0EC; padding: 4rem 2rem 3.5rem; text-align: center; }
.about-hero h1 { font-family: 'Playfair Display', serif; font-weight: 600; font-size: 2.6rem; margin: 0 0 0.75rem; }
.about-hero p { font-size: 1.15rem; opacity: 0.88; max-width: 640px; margin: 0 auto; font-style: italic; }

/* =========== SECTION WRAP =========== */
.section-wrap { max-width: 1100px; margin: 0 auto; padding: 4rem 2rem 5rem; }
.section-heading { font-family: 'Playfair Display', serif; font-size: 2rem; color: var(--slate); margin: 0 0 0.5rem; text-align: center; font-weight: 600; }
.section-sub { text-align: center; color: var(--muted); margin: 0 0 3rem; }

/* =========== HOMEPAGE COLLECTION CARDS =========== */
.collections { display: flex; flex-direction: column; gap: 1.5rem; max-width: 900px; margin: 0 auto; }
.collection-card {
  display: flex; background: var(--surface); border: 1px solid var(--border); border-radius: 6px;
  overflow: hidden; box-shadow: 0 2px 12px rgba(39,53,71,0.07);
  transition: transform 0.2s, box-shadow 0.2s;
  text-decoration: none; color: inherit; min-height: 200px;
}
.collection-card:hover { transform: translateY(-2px); box-shadow: 0 8px 28px rgba(39,53,71,0.15); }

.cc-cover {
  width: 160px; flex-shrink: 0;
  background: linear-gradient(135deg, var(--slate) 0%, var(--slate-dark) 100%);
  position: relative; overflow: hidden;
}
.cc-cover .carousel-slide { position: absolute; inset: 0; opacity: 0; transition: opacity 1.2s ease-in-out; }
.cc-cover .carousel-slide.active { opacity: 1; }
.cc-cover .carousel-slide img { width: 100%; height: 100%; object-fit: cover; object-position: center; display: block; }
.cc-empty {
  position: absolute; inset: 0; display: flex; align-items: center; justify-content: center;
  color: rgba(255,255,255,0.7); font-style: italic; font-family: 'Lora', serif;
  font-size: 0.9rem; text-align: center; padding: 1rem;
}
.cc-body { flex: 1; display: flex; align-items: center; padding: 1.75rem 2rem; gap: 2rem; min-width: 0; }
.cc-info { flex: 1; min-width: 0; }
.cc-name { font-family: 'Playfair Display', serif; font-size: 1.85rem; font-weight: 600; color: var(--slate); line-height: 1.15; margin-bottom: 0.4rem; }
.cc-meta { font-size: 0.92rem; color: var(--muted); letter-spacing: 0.02em; }
.cc-meta strong { color: var(--text); font-weight: 600; }
.cc-bio { font-size: 0.92rem; color: var(--text); line-height: 1.45; margin-top: 0.6rem; opacity: 0.85; }
.cc-action { flex-shrink: 0; }
.cc-btn {
  background: var(--wheat); color: var(--slate-dark); padding: 0.7rem 1.4rem; border-radius: 3px;
  font-weight: 600; font-size: 0.92rem; letter-spacing: 0.03em; text-decoration: none;
  white-space: nowrap; transition: background 0.2s;
}
.collection-card:hover .cc-btn { background: var(--wheat-dark); color: #fff; }

/* =========== AUTHOR PAGE BOOK CARDS =========== */
.book-grid { display: flex; flex-direction: column; gap: 1.25rem; max-width: 900px; margin: 0 auto; }
.book-card { display: flex; background: var(--surface); border: 1px solid var(--border); border-radius: 6px; overflow: hidden; box-shadow: 0 2px 12px rgba(39,53,71,0.07); transition: transform 0.2s, box-shadow 0.2s; min-height: 180px; }
.book-card:hover { transform: translateY(-2px); box-shadow: 0 8px 28px rgba(39,53,71,0.13); }
.book-cover { width: 140px; flex-shrink: 0; overflow: hidden; border-right: 1px solid var(--border); position: relative; background: var(--parchment); }
.book-cover img { width: 100%; height: 100%; object-fit: cover; object-position: center; display: block; transition: transform 0.3s; }
.book-card:hover .book-cover img { transform: scale(1.03); }
.book-cover a { display: block; height: 100%; }
.soon-overlay { position: absolute; top: 0.5rem; right: 0.5rem; background: var(--wheat); color: var(--slate-dark); font-size: 0.68rem; font-weight: 600; padding: 0.2rem 0.5rem; border-radius: 2px; letter-spacing: 0.06em; text-transform: uppercase; }
.coming-soon-cover { display: flex; flex-direction: column; align-items: center; justify-content: center; height: 100%; background: linear-gradient(135deg, var(--slate) 0%, var(--slate-dark) 100%); color: rgba(255,255,255,0.85); padding: 0.75rem; text-align: center; }
.coming-soon-cover .icon { font-size: 1.8rem; margin-bottom: 0.4rem; }
.coming-soon-cover .ttl { font-family: 'Playfair Display', serif; font-size: 0.85rem; line-height: 1.2; margin-bottom: 0.25rem; color: #F2F0EC; }
.coming-soon-cover .year { font-size: 0.72rem; letter-spacing: 0.08em; opacity: 0.7; }
.book-info { flex: 1; display: flex; align-items: center; padding: 1.25rem 1.5rem; gap: 1.5rem; min-width: 0; }
.book-info-text { flex: 1; min-width: 0; }
.book-genre { font-size: 0.78rem; letter-spacing: 0.12em; text-transform: uppercase; color: var(--slate); font-weight: 600; margin-bottom: 0.3rem; opacity: 0.75; }
.book-title { font-family: 'Playfair Display', Georgia, serif; font-size: 1.35rem; color: var(--slate-dark); margin-bottom: 0.2rem; line-height: 1.2; font-weight: 600; }
.book-author { font-size: 0.92rem; color: var(--muted); font-style: italic; margin-bottom: 0.5rem; }
.book-desc { font-size: 0.92rem; color: var(--text); line-height: 1.5; display: -webkit-box; -webkit-line-clamp: 2; line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.book-actions { display: flex; flex-direction: column; gap: 0.5rem; flex-shrink: 0; min-width: 150px; }
.btn-buy { background: var(--wheat); color: var(--slate-dark); font-family: 'Lora', serif; font-size: 0.9rem; padding: 0.55rem 1rem; border: none; border-radius: 3px; text-decoration: none; text-align: center; letter-spacing: 0.03em; font-weight: 600; transition: background 0.2s, color 0.2s; white-space: nowrap; }
.btn-buy:hover { background: var(--wheat-dark); color: #fff; }
.btn-buy.disabled { background: var(--parchment); color: var(--muted); cursor: default; pointer-events: none; opacity: 0.7; }
.btn-read { background: transparent; color: var(--slate); font-family: 'Lora', serif; font-size: 0.88rem; padding: 0.5rem 1rem; border: 1.5px solid var(--slate); border-radius: 3px; text-decoration: none; text-align: center; letter-spacing: 0.03em; transition: background 0.2s, color 0.2s; white-space: nowrap; }
.btn-read:hover { background: var(--slate); color: #F2F0EC; border-color: var(--slate); }

/* =========== ABOUT PAGE =========== */
.about-wrap { max-width: 720px; margin: 3rem auto; padding: 3rem 3rem; background: var(--surface); border: 1px solid var(--border); border-radius: 6px; box-shadow: 0 4px 20px rgba(39,53,71,0.06); }
.about-wrap h2 { font-family: 'Playfair Display', serif; font-size: 1.6rem; color: var(--slate); margin: 2.5rem 0 1rem; font-weight: 600; }
.about-wrap h2:first-child { margin-top: 0; }
.about-wrap p { font-size: 1.05rem; margin: 0 0 1.25rem; }
.pull-quote { border-left: 3px solid var(--wheat); background: var(--parchment); padding: 1.5rem 1.5rem 1.5rem 2rem; margin: 2rem 0; font-family: 'Playfair Display', serif; font-size: 1.3rem; font-style: italic; color: var(--slate); line-height: 1.4; }
.about-cta { background: var(--parchment); padding: 2.5rem 1.5rem; text-align: center; border-top: 1px solid var(--border); }
.about-cta h3 { font-family: 'Playfair Display', serif; font-size: 1.6rem; color: var(--slate); margin: 0 0 0.75rem; }
.about-cta p { max-width: 500px; margin: 0 auto 1.25rem; color: var(--muted); }
.about-cta a { display: inline-block; background: var(--wheat); color: var(--slate-dark); text-decoration: none; padding: 0.75rem 1.75rem; border-radius: 3px; font-weight: 600; letter-spacing: 0.03em; transition: background 0.2s; }
.about-cta a:hover { background: var(--wheat-dark); color: #fff; }

/* =========== FOOTER =========== */
footer { background: var(--slate-dark); color: rgba(242,240,236,0.85); padding: 2rem; text-align: center; font-size: 0.92rem; }
.footer-admin { display: flex; align-items: center; gap: 1.5rem; max-width: 1100px; margin: 0 auto; padding: 0 1rem; }
.footer-admin-icon { flex-shrink: 0; opacity: 0.7; transition: opacity 0.3s; }
.footer-admin-icon:hover { opacity: 1; }
.footer-admin-text { flex: 1; text-align: center; }
.footer-admin-text a { color: inherit; text-decoration: underline; }
.footer-disclaimer { font-size: 0.82rem; opacity: 0.65; margin-top: 0.5rem; }

/* =========== FEATURED BOOK OF THE WEEK =========== */
.featured-wrap { max-width: 1100px; margin: 3rem auto 0; padding: 0 2rem; }
.featured-card {
  display: flex; gap: 2rem; align-items: stretch;
  background: var(--surface); border: 1px solid var(--border); border-radius: 6px;
  padding: 1.75rem; box-shadow: 0 4px 20px rgba(39,53,71,0.08);
  position: relative; overflow: hidden;
}
.featured-badge {
  position: absolute; top: 0; left: 1.5rem;
  background: var(--wheat); color: var(--slate-dark);
  font-size: 0.72rem; font-weight: 600; letter-spacing: 0.12em;
  text-transform: uppercase; padding: 0.35rem 0.9rem 0.3rem;
  border-radius: 0 0 3px 3px;
}
.featured-cover {
  flex-shrink: 0; width: 180px; display: block; overflow: hidden;
  border-radius: 3px; box-shadow: 0 4px 12px rgba(39,53,71,0.15);
  transition: transform 0.25s;
}
.featured-cover:hover { transform: translateY(-2px); }
.featured-cover img { width: 100%; height: 100%; object-fit: cover; display: block; }
.featured-info { flex: 1; display: flex; flex-direction: column; justify-content: center; padding-top: 0.75rem; min-width: 0; }
.featured-title { font-family: 'Playfair Display', serif; font-size: 1.75rem; font-weight: 600; color: var(--slate); line-height: 1.15; margin-bottom: 0.25rem; }
.featured-author { font-size: 0.95rem; color: var(--muted); font-style: italic; margin-bottom: 0.85rem; }
.featured-desc { font-size: 0.95rem; color: var(--text); line-height: 1.55; margin-bottom: 1rem; }
.featured-actions { display: flex; gap: 0.6rem; flex-wrap: wrap; }
.featured-actions .btn-buy, .featured-actions .btn-read { padding: 0.55rem 1rem; font-size: 0.88rem; }

/* =========== ORNAMENTAL DIVIDER =========== */
.ornament { display: flex; align-items: center; justify-content: center; gap: 1rem; margin: 3rem auto 0; max-width: 500px; padding: 0 2rem; }
.ornament::before, .ornament::after {
  content: ''; flex: 1; height: 1px;
  background: linear-gradient(to var(--dir, right), transparent, var(--wheat), transparent);
}
.ornament::before { --dir: left; }
.ornament span { color: var(--wheat); font-size: 1.4rem; opacity: 0.85; }

/* =========== HERO TEXTURE =========== */
.hero {
  background:
    radial-gradient(ellipse at top left, rgba(201,169,110,0.08), transparent 60%),
    radial-gradient(ellipse at bottom right, rgba(201,169,110,0.06), transparent 55%),
    linear-gradient(180deg, var(--slate), var(--slate-dark));
  background-color: var(--slate);
  position: relative;
}
.hero::after {
  content: ''; position: absolute; inset: 0; pointer-events: none;
  background-image:
    radial-gradient(rgba(255,255,255,0.03) 1px, transparent 1px),
    radial-gradient(rgba(255,255,255,0.02) 1px, transparent 1px);
  background-size: 60px 60px, 40px 40px;
  background-position: 0 0, 30px 30px;
  opacity: 0.7;
}
.hero h1, .hero-sub { position: relative; z-index: 1; }

/* =========== COMING SOON CTA =========== */
.coming-cta {
  background: var(--parchment); padding: 3rem 2rem;
  text-align: center; border-top: 1px solid var(--border); border-bottom: 1px solid var(--border);
}
.coming-cta h2 { font-family: 'Playfair Display', serif; font-size: 1.8rem; color: var(--slate); margin: 0 0 0.75rem; font-weight: 600; }
.coming-cta p { max-width: 550px; margin: 0 auto 1.5rem; color: var(--text); font-size: 1rem; line-height: 1.55; }
.cta-btn { display: inline-block; background: var(--wheat); color: var(--slate-dark); text-decoration: none; padding: 0.75rem 1.75rem; border-radius: 3px; font-weight: 600; letter-spacing: 0.03em; transition: background 0.2s; }
.cta-btn:hover { background: var(--wheat-dark); color: #fff; }

/* =========== AFFILIATE STRIP =========== */
.affiliate-strip { max-width: 900px; margin: 3rem auto; padding: 0 2rem; }
.affiliate-card {
  display: flex; align-items: center; gap: 1.25rem;
  background: var(--surface); border: 1px solid var(--border); border-radius: 6px;
  padding: 1.25rem 1.5rem; text-decoration: none; color: inherit;
  transition: transform 0.2s, box-shadow 0.2s, border-color 0.2s;
}
.affiliate-card:hover { transform: translateY(-1px); box-shadow: 0 6px 20px rgba(39,53,71,0.08); border-color: var(--wheat); }
.affiliate-img { width: 80px !important; height: 80px !important; min-width: 80px !important; max-width: 80px !important; object-fit: cover; border-radius: 4px; flex-shrink: 0; background: var(--parchment); }
.affiliate-body { flex: 1; min-width: 0; }
.affiliate-title { font-family: 'Playfair Display', serif; font-size: 1.15rem; color: var(--slate); font-weight: 600; margin-bottom: 0.15rem; }
.affiliate-desc { font-size: 0.9rem; color: var(--muted); line-height: 1.4; }
.affiliate-cta { flex-shrink: 0; font-size: 0.9rem; color: var(--wheat-dark); font-weight: 600; white-space: nowrap; }

/* =========== MOBILE =========== */
@media (max-width: 768px) {
  nav { padding: 0 1rem; height: auto; min-height: 56px; flex-wrap: wrap; gap: 0.5rem; padding-top: 0.5rem; padding-bottom: 0.5rem; }
  .nav-logo { font-size: 1.1rem; }
  .nav-links { gap: 1rem; flex-wrap: wrap; justify-content: center; width: 100%; padding-bottom: 0.3rem; }
  .nav-links a { font-size: 0.88rem; }

  .hero { padding: 2.5rem 1rem 2rem; }
  .hero h1 { font-size: 1.8rem; }
  .hero-sub { font-size: 1.05rem; }
  .about-hero { padding: 2.5rem 1rem 2rem; }
  .about-hero h1 { font-size: 1.8rem; }
  .about-hero p { font-size: 1.05rem; }

  .section-wrap { padding: 2rem 1rem 3rem; }
  .section-heading { font-size: 1.5rem; }

  /* Homepage cards */
  .collections { gap: 1rem; }
  .collection-card { min-height: 0; display: block; padding: 1rem; position: relative; }
  .cc-cover { width: 28%; aspect-ratio: 6 / 9; float: left; margin: 0 1rem 0.5rem 0; border-radius: 3px; }
  .cc-body { display: block; padding: 0; gap: 0; }
  .cc-info { padding: 0; }
  .cc-action { clear: both; width: 100%; margin-top: 0.85rem; padding-top: 0.5rem; }
  .cc-btn { display: block; text-align: center; width: 100%; padding: 0.6rem 1rem; font-size: 0.95rem; box-sizing: border-box; }
  .cc-name { font-size: 1.25rem; line-height: 1.2; margin-bottom: 0.2rem; }
  .cc-meta { font-size: 0.88rem; }
  .cc-bio { font-size: 0.92rem; margin-top: 0.4rem; line-height: 1.4; }

  /* Book cards on author pages */
  .book-grid { gap: 1rem; }
  .book-card { min-height: 0; display: grid; grid-template-columns: 28% 1fr; grid-template-rows: auto auto; gap: 0.5rem 1rem; padding: 1rem; align-items: start; }
  .book-cover { width: 100%; aspect-ratio: 6 / 9; height: auto; grid-row: 1; grid-column: 1; border-right: none; border-radius: 3px; overflow: hidden; }
  .book-info { display: contents; }
  .book-info-text { grid-row: 1; grid-column: 2; min-width: 0; }
  .book-genre { font-size: 0.75rem; margin-bottom: 0.15rem; }
  .book-title { font-size: 1.15rem; line-height: 1.2; margin-bottom: 0.1rem; }
  .book-author { font-size: 0.9rem; margin-bottom: 0.4rem; }
  .book-desc { font-size: 0.92rem; line-height: 1.4; -webkit-line-clamp: 4; line-clamp: 4; margin-bottom: 0; }
  .book-actions { grid-row: 2; grid-column: 1 / -1; display: flex !important; flex-direction: row !important; gap: 0.5rem; margin-top: 0.25rem; width: 100%; min-width: 0; }
  .btn-buy, .btn-read { padding: 0.55rem 0.5rem; font-size: 0.88rem; flex: 1; }
  .coming-soon-cover .icon { font-size: 1.3rem; margin-bottom: 0.2rem; }
  .coming-soon-cover .ttl { font-size: 0.82rem; }
  .coming-soon-cover .year { font-size: 0.72rem; }
  .soon-overlay { font-size: 0.7rem; padding: 0.15rem 0.35rem; top: 0.3rem; right: 0.3rem; }

  .about-wrap { margin: 1.5rem auto; padding: 1.75rem 1.5rem; }
  .about-wrap h2 { font-size: 1.3rem; }
  .about-wrap p { font-size: 1.05rem; }
  .pull-quote { font-size: 1.1rem; padding: 1.25rem 1.25rem 1.25rem 1.5rem; }

  .footer-admin { flex-direction: column; gap: 1rem; padding: 0; }
  .footer-admin-icon svg { width: 56px !important; height: 56px !important; }

  /* Featured book on mobile */
  .featured-wrap { margin-top: 2rem; padding: 0 1rem; }
  .featured-card { flex-direction: column; gap: 1rem; padding: 1.25rem; padding-top: 2rem; }
  .featured-badge { left: 1rem; font-size: 0.72rem; padding: 0.3rem 0.75rem 0.25rem; }
  .featured-cover { width: 40%; max-width: 140px; margin: 0 auto; }
  .featured-info { padding-top: 0; text-align: center; }
  .featured-title { font-size: 1.3rem; }
  .featured-actions { justify-content: center; }
  .featured-actions .btn-buy, .featured-actions .btn-read { flex: 1; min-width: 45%; padding: 0.55rem 0.6rem; font-size: 0.9rem; }

  .ornament { margin: 2rem auto 0; }

  .coming-cta { padding: 2.5rem 1.25rem; }
  .coming-cta h2 { font-size: 1.4rem; }
  .coming-cta p { font-size: 1rem; }

  .affiliate-strip { margin: 2rem auto; padding: 0 1rem; }
  .affiliate-card { flex-direction: column; text-align: center; padding: 1.25rem; gap: 0.75rem; }
  .affiliate-icon, .affiliate-img { font-size: 1.75rem; }
  .affiliate-img { width: 96px !important; height: 96px !important; max-width: 96px !important; min-width: 96px !important; }
  .affiliate-cta { font-size: 0.95rem; }
}

@media (max-width: 480px) {
  .hero h1 { font-size: 1.4rem; }
  .cc-name { font-size: 1.05rem; }
}