:root {
  --navy: #0f1b2d;
  --navy-mid: #16213d;
  --red: #b81c1c;
  --gold: #c8a253;
  --bg: #f8fafc;
  --card: #ffffff;
  --ink: #0f172a;
  --muted: #475569;
  --border: #e2e8f0;
}
* { box-sizing: border-box; }
body {
  margin: 0;
  font-family: "Segoe UI", system-ui, -apple-system, sans-serif;
  background: var(--bg);
  color: var(--ink);
  line-height: 1.56;
}
a { color: inherit; text-decoration: none; }

.topbar {
  background: var(--navy);
  color: #fff;
  border-bottom: 2px solid var(--gold);
  position: sticky;
  top: 0;
  z-index: 60;
}
.topbar-inner {
  max-width: 1240px;
  margin: 0 auto;
  padding: 13px 20px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
}
.brand { display: flex; align-items: center; gap: 12px; }
.brand-mark {
  width: 38px; height: 38px;
  background: var(--red);
  border: 1.5px solid var(--gold);
  border-radius: 6px;
  display: grid; place-items: center;
  font-weight: 900; font-size: 14px; color: #fff;
}
.brand-title { font-size: 16.5px; font-weight: 800; letter-spacing: 1px; color: #fff; }
.brand-sub { font-size: 11px; color: #94a3b8; }
.nav { display: flex; gap: 18px; align-items: center; font-size: 13.5px; font-weight: 600; flex-wrap: wrap; }
.nav a:hover, .nav a.active { color: var(--gold); }
.btn-cta {
  background: var(--red); color: #fff;
  padding: 9px 16px; border-radius: 6px;
  font-weight: 700; font-size: 13px; border: none; cursor: pointer;
  display: inline-block;
}
.btn-cta:hover { background: #991b1b; }

.hero {
  background: linear-gradient(140deg, #0b1324 0%, #16213d 62%, #1e293b 100%);
  color: #fff;
  padding: 48px 20px 44px;
  position: relative;
  overflow: hidden;
}
.hero::before {
  content: "";
  position: absolute; inset: 0;
  background-image: linear-gradient(rgba(255,255,255,0.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,0.04) 1px, transparent 1px);
  background-size: 32px 32px;
  pointer-events: none;
}
.hero-inner {
  max-width: 1240px; margin: 0 auto; position: relative; z-index: 2;
  display: grid; grid-template-columns: 1.35fr 0.85fr; gap: 32px; align-items: center;
}
@media (max-width: 900px) { .hero-inner { grid-template-columns: 1fr; } }
.pill {
  display: inline-block;
  border: 1px solid rgba(200,162,83,0.6);
  background: rgba(200,162,83,0.14);
  color: #fde68a;
  padding: 5px 12px; border-radius: 999px;
  font-size: 11.5px; font-weight: 700; letter-spacing: 0.5px; margin-bottom: 12px;
}
.hero h1 { font-size: clamp(25px, 3.4vw, 40px); line-height: 1.15; margin: 0 0 12px; font-weight: 800; }
.hero p { font-size: 15px; color: #cbd5e1; max-width: 660px; margin: 0 0 20px; }
.hero-actions { display: flex; gap: 10px; flex-wrap: wrap; }
.btn-gold {
  background: var(--gold); color: #0f172a;
  padding: 11px 20px; border-radius: 6px; font-weight: 800; font-size: 13.5px;
  border: none; cursor: pointer; display: inline-block;
}
.btn-outline {
  border: 1px solid rgba(255,255,255,0.35); color: #fff;
  padding: 10px 18px; border-radius: 6px; font-weight: 600; font-size: 13.5px;
  display: inline-block;
}
.stats-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; }
.stat-card {
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.14);
  border-radius: 10px; padding: 15px;
}
.stat-num { font-size: 24px; font-weight: 800; color: var(--gold); line-height: 1.1; }
.stat-label { font-size: 12px; color: #cbd5e1; margin-top: 4px; }

.container { max-width: 1240px; margin: 0 auto; padding: 34px 20px; }
.breadcrumb { font-size: 12.5px; color: var(--muted); margin-bottom: 16px; }
.breadcrumb a:hover { color: var(--red); text-decoration: underline; }

.section-head {
  display: flex; justify-content: space-between; align-items: flex-end; gap: 16px; flex-wrap: wrap;
  margin-bottom: 20px; border-bottom: 2px solid var(--navy-mid); padding-bottom: 10px;
}
.section-head h2 { margin: 0; font-size: 23px; color: var(--navy); }
.section-head p { margin: 4px 0 0; font-size: 13.5px; color: var(--muted); }

.filters { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 16px; }
.filter-btn {
  border: 1px solid var(--border); background: #fff; color: var(--ink);
  padding: 8px 13px; border-radius: 6px; font-size: 12.5px; font-weight: 700; cursor: pointer;
}
.filter-btn.active, .filter-btn:hover { background: var(--navy-mid); color: #fff; border-color: var(--navy-mid); }
.search-row { display: flex; gap: 10px; flex-wrap: wrap; margin-bottom: 22px; }
.search-row input, .search-row select {
  padding: 10px 14px; border: 1px solid #cbd5e1; border-radius: 6px; font-size: 13.5px; background: #fff;
}
.search-row input { flex: 1; min-width: 240px; }

.book-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 20px; }
.book-card {
  background: var(--card); border: 1px solid var(--border); border-radius: 10px; overflow: hidden;
  display: flex; flex-direction: column; box-shadow: 0 2px 8px rgba(15,23,42,0.04);
  transition: transform 0.15s, box-shadow 0.15s;
}
.book-card:hover { transform: translateY(-2px); box-shadow: 0 10px 24px rgba(15,23,42,0.09); }
.book-cover-strip { padding: 16px; color: #fff; }
.book-meta-top { display: flex; justify-content: space-between; align-items: center; font-size: 11px; font-weight: 700; letter-spacing: 0.7px; margin-bottom: 8px; }
.status-pill { background: rgba(255,255,255,0.2); padding: 2px 8px; border-radius: 4px; font-size: 10.5px; }
.status-pill.ready { background: #15803d; color: #fff; }
.status-pill.test { background: #b45309; color: #fff; }
.book-title { font-size: 16px; font-weight: 800; line-height: 1.25; margin: 0 0 6px; }
.book-author { font-size: 12px; color: #fde68a; font-weight: 600; }
.book-body { padding: 14px 16px 16px; display: flex; flex-direction: column; flex: 1; gap: 10px; }
.book-sub { font-size: 12.5px; color: var(--muted); margin: 0; }
.qr-chip { background: #f1f5f9; border-left: 3px solid var(--navy-mid); padding: 7px 9px; font-size: 11.5px; color: #334155; border-radius: 0 4px 4px 0; }
.price-row { margin-top: auto; padding-top: 10px; border-top: 1px solid #f1f5f9; display: flex; justify-content: space-between; align-items: baseline; }
.price-main { font-size: 18px; font-weight: 800; color: var(--navy); }
.price-sub { font-size: 11px; color: var(--muted); }
.card-actions { display: flex; gap: 8px; }
.btn-sm {
  flex: 1; text-align: center; padding: 8px 10px; border-radius: 6px;
  font-size: 12px; font-weight: 700; cursor: pointer; border: 1px solid var(--navy-mid);
}
.btn-sm.primary { background: var(--navy-mid); color: #fff; }
.btn-sm.secondary { background: #fff; color: var(--navy-mid); }
.btn-sm.pdf { background: var(--red); border-color: var(--red); color: #fff; }

/* DETAIL PAGE */
.detail-grid { display: grid; grid-template-columns: 1.2fr 0.8fr; gap: 28px; align-items: start; }
@media (max-width: 900px) { .detail-grid { grid-template-columns: 1fr; } }
.detail-card { background: #fff; border: 1px solid var(--border); border-radius: 12px; padding: 24px; }
.detail-cover {
  border-radius: 10px; padding: 26px 24px; color: #fff; margin-bottom: 18px;
  border-left: 6px solid var(--gold);
}
.highlights { padding-left: 18px; margin: 10px 0 18px; }
.highlights li { margin-bottom: 8px; font-size: 14px; }
.order-box {
  background: #fff; border: 2px solid var(--navy-mid); border-radius: 12px; padding: 22px;
  position: sticky; top: 82px;
}
.order-box h3 { margin: 0 0 10px; color: var(--navy); }
.price-option {
  border: 1px solid var(--border); border-radius: 8px; padding: 12px; margin-bottom: 10px;
  display: flex; justify-content: space-between; align-items: center;
}
.price-option.featured { border-color: var(--red); background: #fef2f2; }

.three-col { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 20px; }
.info-card {
  background: #fff; border: 1px solid var(--border); border-top: 4px solid var(--navy-mid);
  border-radius: 10px; padding: 20px;
}
.info-card h3 { margin: 0 0 6px; font-size: 17px; color: var(--navy); }
.info-card .role { font-size: 12px; font-weight: 700; color: var(--red); margin-bottom: 10px; }
.info-card p { font-size: 13.5px; color: var(--muted); margin: 0; }

.faq-item { background: #fff; border: 1px solid var(--border); border-radius: 8px; padding: 15px 18px; margin-bottom: 10px; }
.faq-item summary { font-weight: 700; cursor: pointer; color: var(--navy); font-size: 14.5px; }
.faq-item p { margin: 10px 0 0; font-size: 13.5px; color: var(--muted); }

/* FORM & MODAL */
.form-field { width: 100%; padding: 10px 12px; border: 1px solid #cbd5e1; border-radius: 6px; margin-bottom: 10px; font-size: 14px; font-family: inherit; }
.form-msg { font-size: 13px; padding: 10px 12px; border-radius: 6px; margin-top: 10px; display: none; }
.form-msg.ok { display: block; background: #ecfdf5; border: 1px solid #6ee7b7; color: #065f46; }
.form-msg.err { display: block; background: #fef2f2; border: 1px solid #fca5a5; color: #991b1b; }

.modal-backdrop {
  position: fixed; inset: 0; background: rgba(15,23,42,0.72);
  display: none; align-items: center; justify-content: center; z-index: 120; padding: 16px;
}
.modal-backdrop.open { display: flex; }
.modal { background: #fff; border-radius: 12px; max-width: 480px; width: 100%; padding: 24px; box-shadow: 0 20px 50px rgba(0,0,0,0.3); }
.modal h3 { margin: 0 0 6px; color: var(--navy); }
.modal p { font-size: 13px; color: var(--muted); margin: 0 0 14px; }

footer { background: var(--navy); color: #94a3b8; padding: 34px 20px; margin-top: 44px; font-size: 13px; }
.footer-inner { max-width: 1240px; margin: 0 auto; display: flex; justify-content: space-between; gap: 20px; flex-wrap: wrap; }
