/* Bookstore static page — hand-written CSS, no Tailwind dependency */
:root {
  --bg: #ffffff;
  --fg: #0f172a;
  --muted: #475569;
  --border: #e2e8f0;
  --primary: #0c2340;
  --primary-fg: #ffffff;
  --accent: #c9a84c;
  --card-bg: #ffffff;
  --soft: #f8fafc;
  --radius: 12px;
  --shadow: 0 4px 14px rgba(15,23,42,0.08);
  --font-sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  font-family: var(--font-sans);
  color: var(--fg);
  background: var(--bg);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
a { color: var(--primary); text-decoration: none; }
a:hover { text-decoration: underline; }

/* Header */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255,255,255,0.95);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--border);
}
.header-inner {
  max-width: 1280px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 1rem;
  height: 64px;
}
.logo img { height: 48px; width: auto; display: block; }
.site-nav { display: flex; gap: 0.25rem; align-items: center; }
.site-nav a {
  padding: 0.5rem 0.85rem;
  border-radius: 8px;
  font-size: 0.95rem;
  font-weight: 500;
  color: var(--fg);
}
.site-nav a:hover { background: var(--soft); text-decoration: none; }
.site-nav a.active { background: var(--soft); color: var(--primary); }
.menu-toggle { display: none; }

@media (max-width: 900px) {
  .site-nav { display: none; }
}

/* Hero */
.hero {
  position: relative;
  min-height: 320px;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  background: url('/bookstore-hero.jpg') center/cover no-repeat;
  color: #fff;
}
.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(12,35,64,0.55), rgba(12,35,64,0.7));
}
.hero-content {
  position: relative;
  padding: 4rem 1.5rem;
  max-width: 800px;
}
.hero h1 {
  font-size: clamp(2rem, 5vw, 3.25rem);
  margin: 0 0 0.75rem;
  font-weight: 700;
  letter-spacing: -0.02em;
}
.hero p {
  font-size: clamp(1rem, 2vw, 1.2rem);
  margin: 0;
  opacity: 0.95;
}

/* Main */
main {
  max-width: 1280px;
  margin: 0 auto;
  padding: 3rem 1.25rem 4rem;
  display: grid;
  grid-template-columns: 300px 1fr;
  gap: 2.5rem;
  align-items: start;
}
.bookstore-content { min-width: 0; }
.intro {
  max-width: 760px;
  margin: 0 auto 2.5rem;
  text-align: center;
  color: var(--muted);
  font-size: 1.05rem;
}

/* Side panel */
.side-panel {
  background: var(--soft);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.5rem;
  position: sticky;
  top: 84px;
}
.side-panel h2 {
  font-size: 1.25rem;
  margin: 0 0 0.75rem;
  color: var(--primary);
}
.side-panel h3 {
  font-size: 0.95rem;
  margin: 1rem 0 0.35rem;
  color: var(--primary);
}
.side-panel p {
  margin: 0 0 0.75rem;
  color: var(--muted);
  font-size: 0.92rem;
  line-height: 1.55;
}
.side-panel .panel-cta {
  display: inline-block;
  margin-top: 0.5rem;
  background: var(--primary);
  color: var(--primary-fg);
  padding: 0.6rem 1rem;
  border-radius: 8px;
  font-weight: 600;
  font-size: 0.9rem;
}
.side-panel .panel-cta:hover { background: #163457; text-decoration: none; }
.side-panel summary {
  cursor: pointer;
  font-weight: 600;
  color: var(--primary);
  list-style: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.25rem 0;
}
.side-panel summary::-webkit-details-marker { display: none; }
.side-panel summary::after {
  content: "▾";
  transition: transform 0.2s;
}
.side-panel details[open] summary::after { transform: rotate(180deg); }
.side-panel .panel-body { margin-top: 0.75rem; }

@media (min-width: 901px) {
  .side-panel summary { display: none; }
  .side-panel .panel-body { display: block !important; margin-top: 0; }
}

@media (max-width: 900px) {
  main {
    grid-template-columns: 1fr;
    gap: 1.5rem;
    padding: 1.5rem 1rem 3rem;
  }
  .side-panel {
    position: static;
    padding: 1rem 1.25rem;
  }
}

/* Book list (horizontal cards) */
.books {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}
.book {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  display: grid;
  grid-template-columns: 160px 1fr;
  gap: 1.25rem;
  overflow: hidden;
  padding: 1rem;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}
.book:hover { transform: translateY(-2px); box-shadow: 0 8px 24px rgba(15,23,42,0.12); }
.book-cover {
  width: 100%;
  aspect-ratio: 2 / 3;
  object-fit: cover;
  background: var(--soft);
  display: block;
  border-radius: 8px;
}
.book-body { display: flex; flex-direction: column; gap: 0.65rem; min-width: 0; }
.book h2 { font-size: 1.3rem; margin: 0; line-height: 1.3; color: var(--primary); }
.author { color: var(--muted); margin: 0; font-size: 0.95rem; }
.description { color: var(--fg); margin: 0; }
.excerpt {
  background: var(--soft);
  border-left: 3px solid var(--accent);
  padding: 0.75rem 0.9rem;
  border-radius: 6px;
  font-style: italic;
  color: var(--fg);
  margin: 0.5rem 0 0;
}
.actions {
  display: flex;
  gap: 0.6rem;
  flex-wrap: wrap;
  align-items: center;
  margin-top: auto;
  padding-top: 0.85rem;
}
.price {
  margin-left: auto;
  font-weight: 700;
  font-size: 1.1rem;
  color: var(--primary);
  background: var(--soft);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 0.5rem 0.85rem;
}
.btn {
  padding: 0.6rem 1.1rem;
  border-radius: 8px;
  font-weight: 600;
  font-size: 0.92rem;
  display: inline-block;
  border: 1px solid var(--primary);
  cursor: pointer;
  font-family: inherit;
  transition: background 0.15s ease, color 0.15s ease;
}
.btn-primary { background: var(--primary); color: var(--primary-fg); }
.btn-primary:hover { background: #163457; text-decoration: none; }
.btn-outline { background: transparent; color: var(--primary); }
.btn-outline:hover { background: var(--soft); text-decoration: none; }
.btn[aria-disabled="true"] { opacity: 0.55; cursor: not-allowed; }

@media (max-width: 600px) {
  .book {
    grid-template-columns: 110px 1fr;
    gap: 1rem;
    padding: 0.85rem;
  }
}

/* Footer */
.site-footer {
  border-top: 1px solid var(--border);
  background: var(--soft);
  color: var(--muted);
  font-size: 0.9rem;
  text-align: center;
  padding: 2rem 1rem;
}
.site-footer a { color: var(--muted); }
