/* ══════════════════════════════════
   Variables
══════════════════════════════════ */
:root {
  --red:    #c0392b;
  --navy:   #0f2235;
  --text:   #1a1a1a;
  --muted:  #666;
  --border: #d8d8d8;
  --bg:     #f4f4f4;
  --white:  #ffffff;
}

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

body {
  font-family: Arial, Helvetica, sans-serif;
  background: var(--bg);
  color: var(--text);
  font-size: 13px;
}
#site-footer {
  position: sticky;
  top: 100vh;
}

a { color: #00499e; text-decoration: none; }
a:hover { text-decoration: underline; color: var(--red); }

/* ══════════════════════════════════
   MAIN HEADER
══════════════════════════════════ */
.main-header {
  background: var(--white);
  border-bottom: 3px solid var(--red);
}
.main-header-inner {
  max-width: 1000px;
  margin: 0 auto;
  padding: 10px 12px;
  display: flex;
  align-items: center;
  gap: 20px;
}
.logo {
  font-family: "Libre Baskerville", Georgia, serif;
  font-weight: 700;
  font-size: 28px;
  color: var(--navy);
  text-decoration: none;
  white-space: nowrap;
  letter-spacing: -0.02em;
  flex-shrink: 0;
}
.logo em { color: var(--red); font-style: normal; }

/* Search bar */
.search-bar {
  flex: 1;
  display: flex;
  gap: 0;
  max-width: 480px;
}
.search-bar input {
  flex: 1;
  border: 2px solid var(--border);
  border-right: none;
  padding: 7px 10px;
  font-size: 13px;
  outline: none;
  border-radius: 0;
}
.search-bar input:focus { border-color: #aaa; }
.search-bar button {
  background: var(--red);
  color: #fff;
  border: none;
  padding: 7px 16px;
  font-size: 13px;
  font-weight: bold;
  cursor: pointer;
  border-radius: 0;
}
.search-bar button:hover { background: #a93226; }

/* ══════════════════════════════════
   NAV TABS
══════════════════════════════════ */
.nav-tabs {
  background: var(--navy);
  border-bottom: 1px solid #0a1b2e;
}
.nav-tabs-inner {
  max-width: 1000px;
  margin: 0 auto;
  padding: 0 12px;
  display: flex;
  align-items: stretch;
}
.nav-tabs a {
  display: inline-block;
  padding: 8px 14px;
  font-size: 12px;
  color: rgba(255,255,255,0.8);
  font-weight: bold;
  border-right: 1px solid rgba(255,255,255,0.08);
  white-space: nowrap;
}
.nav-tabs a:hover { background: rgba(255,255,255,0.1); color: #fff; text-decoration: none; }
.nav-tabs a.active { background: var(--red); color: #fff; }

/* Dropdown nav item */
.nav-dropdown {
  position: relative;
  display: flex;
  align-items: stretch;
}
.nav-dropdown-toggle {
  background: none;
  border: none;
  border-right: 1px solid rgba(255,255,255,0.08);
  color: rgba(255,255,255,0.8);
  font-size: 12px;
  font-weight: bold;
  padding: 8px 14px;
  cursor: pointer;
  white-space: nowrap;
  font-family: inherit;
}
.nav-dropdown-toggle:hover { background: rgba(255,255,255,0.1); color: #fff; }
.nav-dropdown.active .nav-dropdown-toggle { background: var(--red); color: #fff; }
.nav-dropdown-menu {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  background: var(--navy);
  min-width: 160px;
  z-index: 100;
  border: 1px solid rgba(255,255,255,0.1);
  border-top: 2px solid var(--red);
}
.nav-dropdown-menu a {
  display: block;
  padding: 9px 14px;
  font-size: 12px;
  color: rgba(255,255,255,0.8);
  font-weight: bold;
  border-right: none;
  border-bottom: 1px solid rgba(255,255,255,0.06);
}
.nav-dropdown-menu a:hover { background: rgba(255,255,255,0.1); color: #fff; }
.nav-dropdown:hover .nav-dropdown-menu,
.nav-dropdown.open .nav-dropdown-menu { display: block; }

/* Hamburger button — hidden on desktop */
.nav-toggle {
  display: none;
  background: none;
  border: none;
  color: rgba(255,255,255,0.85);
  font-size: 13px;
  font-weight: bold;
  padding: 10px 12px;
  cursor: pointer;
  width: 100%;
  text-align: left;
  letter-spacing: 0.04em;
}

/* ══════════════════════════════════
   BREADCRUMB
══════════════════════════════════ */
.breadcrumb {
  max-width: 1000px;
  margin: 0 auto;
  padding: 8px 12px;
  font-size: 11px;
  color: var(--muted);
}
.breadcrumb a { color: #00499e; }
.breadcrumb span { margin: 0 4px; color: #bbb; }

/* ══════════════════════════════════
   MAIN LISTING LAYOUT
══════════════════════════════════ */
.listing {
  max-width: 1000px;
  margin: 0 auto;
  padding: 0 12px 24px;
  display: grid;
  grid-template-columns: 340px 1fr;
  gap: 24px;
  align-items: start;
}

/* LEFT: image + thumbnails */
.img-main {
  background: var(--white);
  border: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 12px;
  margin-bottom: 8px;
}

/* ══════════════════════════════════
   FRONT COVER (game-hackers-handbook)
   Native size: 420×630px, scaled 2/3
   Display size: 280×420px
══════════════════════════════════ */
.book-cover-scale {
  width: 280px;
  height: 420px;
  overflow: hidden;
  flex-shrink: 0;
}
.book-cover-scale .front {
  transform: scale(0.6667);
  transform-origin: top left;
}
.front {
  width: 420px;
  height: 630px;
  background: #ffffff;
  position: relative;
  overflow: hidden;
  font-family: "Libre Baskerville", Georgia, serif;
  box-shadow: 4px 4px 16px rgba(0,0,0,0.18);
}
.front-top {
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 8px;
  background: #c0392b;
}
.front-pub {
  position: absolute;
  top: 20px; left: 36px;
  font-family: "Source Code Pro", monospace;
  font-size: 7.5px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: #bbb;
}
.front-portrait {
  position: absolute;
  bottom: 90px; right: 0;
  width: 300px; height: 420px;
  display: flex;
  align-items: flex-end;
  justify-content: flex-end;
}
.front-portrait img {
  width: 280px; height: auto;
  object-fit: contain;
  object-position: bottom right;
  filter: grayscale(1) contrast(1.05) brightness(1.0);
  -webkit-mask-image:
    linear-gradient(to left, black 40%, rgba(0,0,0,0.5) 68%, transparent 100%),
    linear-gradient(to bottom, transparent 0%, black 18%);
  -webkit-mask-composite: destination-in;
  mask-image:
    linear-gradient(to left, black 40%, rgba(0,0,0,0.5) 68%, transparent 100%),
    linear-gradient(to bottom, transparent 0%, black 18%);
  mask-composite: intersect;
  opacity: 0.88;
}
.front-title {
  position: absolute;
  top: 58px; left: 36px;
  width: 240px;
}
.title-the {
  font-style: italic;
  font-size: 13px;
  color: #bbb;
  letter-spacing: 0.15em;
  margin-bottom: 4px;
}
.title-main {
  font-weight: 700;
  font-size: 48px;
  line-height: 0.95;
  color: #111111;
  letter-spacing: -0.02em;
  margin-bottom: 14px;
}
.title-main span { color: #c0392b; }
.title-sub {
  font-style: italic;
  font-size: 12px;
  color: #777;
  line-height: 1.5;
}
.title-rule {
  width: 40px; height: 2px;
  background: #c0392b;
  margin-top: 16px;
}
.front-edition {
  position: absolute;
  bottom: 102px; left: 36px;
  font-family: "Source Code Pro", monospace;
  font-size: 7px;
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: #c0392b;
}
.front-bottom {
  position: absolute;
  bottom: 0; left: 0; right: 0;
  height: 56px;
  border-top: 1px solid #e8e8e8;
  display: flex;
  align-items: center;
  padding: 0 36px;
  justify-content: space-between;
}
.front-pub-bottom {
  font-family: "Source Code Pro", monospace;
  font-size: 7.5px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: #aaa;
}
.front-pages {
  font-family: "Source Code Pro", monospace;
  font-size: 7px;
  color: #ccc;
  letter-spacing: 0.08em;
}

/* Back cover */
.book-cover-scale .back {
  transform: scale(0.6667);
  transform-origin: top left;
}
.back {
  width: 420px;
  height: 630px;
  background: #ffffff;
  position: relative;
  overflow: hidden;
  font-family: "Libre Baskerville", Georgia, serif;
  box-shadow: 4px 4px 16px rgba(0,0,0,0.18);
}
.back-top {
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 8px;
  background: #c0392b;
}
.back-body {
  position: absolute;
  top: 50px; left: 44px; right: 44px;
}
.back-label {
  font-family: "Source Code Pro", monospace;
  font-size: 7.5px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: #c0392b;
  margin-bottom: 18px;
}
.back-blurb {
  font-size: 11.5px;
  line-height: 1.9;
  color: #1a1a1a;
  margin-bottom: 32px;
}
.back-section {
  font-family: "Source Code Pro", monospace;
  font-size: 7px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: #888;
  margin-bottom: 12px;
  padding-bottom: 6px;
  border-bottom: 1px solid #e0e0e0;
}
.learn-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0 20px;
}
.learn-item {
  font-family: "Source Code Pro", monospace;
  font-size: 8.5px;
  color: #333;
  line-height: 2.0;
  padding-left: 12px;
  position: relative;
}
.learn-item::before {
  content: "\2014";
  position: absolute;
  left: 0;
  color: #c0392b;
  font-size: 8px;
}
.back-bottom {
  position: absolute;
  bottom: 0; left: 0; right: 0;
  height: 56px;
  border-top: 1px solid #e8e8e8;
  display: flex;
  align-items: center;
  padding: 0 44px;
  justify-content: space-between;
}
.back-pub {
  font-family: "Source Code Pro", monospace;
  font-size: 7.5px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: #aaa;
}
.back-isbn {
  font-family: "Source Code Pro", monospace;
  font-size: 7px;
  color: #bbb;
  letter-spacing: 0.08em;
}

/* Book cover widget */

/* Thumbnail strip */
.thumb-strip { display: flex; gap: 6px; }
.thumb {
  width: 56px; height: 72px;
  border: 2px solid var(--border);
  background: var(--white);
  display: flex; align-items: center; justify-content: center;
  cursor: pointer;
  font-size: 10px; color: #aaa;
}
.thumb.active { border-color: var(--red); }


/* RIGHT: listing details */
.listing-detail {
  background: var(--white);
  border: 1px solid var(--border);
  padding: 16px 18px;
}
.listing-title {
  font-size: 18px;
  font-weight: bold;
  color: var(--text);
  margin-bottom: 6px;
  line-height: 1.3;
  font-family: Arial, Helvetica, sans-serif;
}
.listing-subtitle {
  font-size: 12px;
  color: var(--muted);
  margin-bottom: 14px;
  font-style: italic;
  font-family: "Libre Baskerville", Georgia, serif;
}
.listing-meta-row {
  display: flex;
  gap: 0;
  border-top: 1px solid #eee;
  border-bottom: 1px solid #eee;
  margin-bottom: 16px;
}
.listing-meta-item {
  flex: 1;
  padding: 9px 12px;
  border-right: 1px solid #eee;
}
.listing-meta-item:last-child { border-right: none; }
.lm-label { font-size: 10px; color: var(--muted); margin-bottom: 2px; }
.lm-value { font-size: 14px; font-weight: bold; color: var(--text); }
.lm-value.free { color: var(--red); font-size: 22px; }

/* Condition / format tags */
.tag-row { display: flex; gap: 6px; margin-bottom: 16px; flex-wrap: wrap; }
.tag {
  display: inline-block;
  border: 1px solid var(--border);
  padding: 3px 9px;
  font-size: 11px;
  color: #444;
  background: #fafafa;
}
.tag.highlight { border-color: var(--red); color: var(--red); background: #fff7f6; }

/* Description */
.listing-desc {
  font-size: 13px;
  line-height: 1.75;
  color: #333;
  margin-bottom: 18px;
  padding-bottom: 16px;
  border-bottom: 1px solid #eee;
}

/* Action box */
.action-box {
  background: #f9f9f9;
  border: 1px solid var(--border);
  padding: 14px;
  margin-bottom: 14px;
}
.action-price {
  font-size: 26px;
  font-weight: bold;
  color: var(--red);
  margin-bottom: 4px;
}
.action-note {
  font-size: 11px;
  color: var(--muted);
  margin-bottom: 14px;
}
.btn-primary {
  display: block;
  width: 100%;
  background: var(--red);
  color: #fff;
  border: none;
  padding: 11px;
  font-size: 14px;
  font-weight: bold;
  cursor: pointer;
  text-align: center;
  text-decoration: none;
  margin-bottom: 7px;
  letter-spacing: 0.02em;
}
.btn-primary:hover { background: #a93226; text-decoration: none; color: #fff; }
.btn-secondary {
  display: block;
  width: 100%;
  background: #fff;
  color: var(--navy);
  border: 1px solid var(--border);
  padding: 10px;
  font-size: 13px;
  cursor: pointer;
  text-align: center;
  text-decoration: none;
}
.btn-secondary:hover { background: #f0f0f0; text-decoration: none; }

/* Publisher box */
.publisher-box {
  border: 1px solid var(--border);
  padding: 12px 14px;
}
.pub-header {
  font-size: 11px;
  font-weight: bold;
  text-transform: uppercase;
  color: var(--muted);
  letter-spacing: 0.08em;
  margin-bottom: 8px;
  padding-bottom: 6px;
  border-bottom: 1px solid #eee;
}
.pub-name { font-size: 13px; font-weight: bold; color: #00499e; margin-bottom: 3px; }
.pub-detail { font-size: 11px; color: var(--muted); line-height: 1.6; }
.pub-link { font-size: 11px; color: #00499e; }

/* ══════════════════════════════════
   HOME PAGE
══════════════════════════════════ */

/* Stats trust bar */
.home-stats-bar {
  background: var(--white);
  border-bottom: 1px solid var(--border);
}
.home-stats-inner {
  max-width: 1000px;
  margin: 0 auto;
  padding: 0 12px;
  display: flex;
}
.home-stat {
  flex: 1;
  padding: 12px;
  border-right: 1px solid var(--border);
  text-align: center;
}
.home-stat:last-child { border-right: none; }
.home-stat-value {
  font-size: 16px;
  font-weight: bold;
  color: var(--navy);
  display: block;
  margin-bottom: 2px;
}
.home-stat-label {
  font-size: 10px;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

/* About blurb */


/* ══════════════════════════════════
   BOOKS CATALOG PAGE
══════════════════════════════════ */
.catalog-section {
  max-width: 1000px;
  margin: 0 auto;
  padding: 16px 12px 24px;
}
.catalog-header {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  margin-bottom: 10px;
  padding-bottom: 6px;
  border-bottom: 2px solid var(--red);
}
.catalog-title {
  font-size: 14px;
  font-weight: bold;
  color: var(--text);
}
.catalog-count {
  font-size: 11px;
  color: var(--muted);
}
.catalog-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

/* Modal */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.55);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 999;
}
.modal-box {
  background: #fff;
  max-width: 420px;
  width: 90%;
  padding: 32px 28px 28px;
  position: relative;
  border-top: 4px solid var(--red);
  box-shadow: 0 8px 40px rgba(0,0,0,0.25);
}
.modal-close {
  position: absolute;
  top: 10px; right: 14px;
  background: none;
  border: none;
  font-size: 20px;
  color: #aaa;
  cursor: pointer;
  line-height: 1;
}
.modal-close:hover { color: #333; }
.modal-title {
  font-family: "Libre Baskerville", Georgia, serif;
  font-size: 17px;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 12px;
}
.modal-body {
  font-size: 13px;
  line-height: 1.8;
  color: var(--muted);
  margin-bottom: 20px;
}

/* Coming soon page block */
.coming-soon-block {
  padding: 40px 0 20px;
  max-width: 560px;
}
.coming-soon-title {
  font-family: "Libre Baskerville", Georgia, serif;
  font-size: 16px;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 14px;
}
.coming-soon-block p {
  font-size: 13px;
  line-height: 1.8;
  color: var(--muted);
  margin-bottom: 10px;
}
.coming-soon-block a { color: #00499e; }

/* Coming soon card variant */
.featured-card.placeholder {
  opacity: 0.55;
  pointer-events: none;
}
.featured-card.placeholder .featured-card-image {
  background: #c8d0d8;
}
.placeholder-label {
  font-size: 11px;
  color: rgba(255,255,255,0.6);
  font-style: italic;
  text-align: center;
  font-family: "Source Code Pro", monospace;
  letter-spacing: 0.08em;
}

/* ══════════════════════════════════
   ABOUT PAGE
══════════════════════════════════ */
.about-section {
  max-width: 1000px;
  margin: 0 auto;
  padding: 16px 12px 24px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.about-block {
  background: var(--white);
  border: 1px solid var(--border);
  padding: 18px 20px;
}
.about-block-title {
  font-size: 13px;
  font-weight: bold;
  color: var(--text);
  padding-bottom: 8px;
  margin-bottom: 12px;
  border-bottom: 2px solid var(--red);
  display: inline-block;
}
.about-block p {
  font-size: 12px;
  line-height: 1.8;
  color: #444;
  margin-bottom: 10px;
}
.about-block p:last-child { margin-bottom: 0; }
.about-block ul {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.about-block ul li {
  font-size: 12px;
  color: #444;
  display: flex;
  align-items: center;
  gap: 8px;
}
.about-block ul li::before {
  content: '';
  width: 6px; height: 6px;
  background: var(--red);
  transform: rotate(45deg);
  flex-shrink: 0;
}
.about-links-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 8px;
  margin-top: 4px;
}
.about-link-card {
  border: 1px solid var(--border);
  padding: 12px 14px;
  color: var(--text);
  display: block;
  transition: border-color 0.15s;
}
.about-link-card:hover { border-color: var(--red); text-decoration: none; color: var(--text); }
.about-link-card-label {
  font-size: 12px;
  font-weight: bold;
  color: #00499e;
  margin-bottom: 3px;
}
.about-link-card-desc { font-size: 11px; color: var(--muted); }
.contact-email {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin-top: 24px;
  padding: 14px 20px;
  border: 1px solid var(--border);
  border-left: 3px solid var(--red);
  font-family: "Source Code Pro", monospace;
  font-size: 14px;
  color: #00499e;
  letter-spacing: 0.02em;
  text-decoration: none;
  background: #fafafa;
  transition: border-color 0.15s, background 0.15s;
}
.contact-email:hover {
  border-color: var(--red);
  background: #fff;
  text-decoration: none;
}
/* Tagline strip — inside main-header, above the red border line */


.home-section {
  max-width: 1000px;
  margin: 0 auto;
  padding: 20px 12px;
}
.home-section-topics {
  width: fit-content;
  max-width: 100%;
}
.home-section-header {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  margin-bottom: 10px;
  padding-bottom: 6px;
  border-bottom: 2px solid var(--red);
}
.home-section-title {
  font-size: 14px;
  font-weight: bold;
  color: var(--text);
}
.home-section-link {
  font-size: 11px;
  color: #00499e;
}

/* Featured book card */
.featured-card {
  background: var(--white);
  border: 1px solid var(--border);
  display: grid;
  grid-template-columns: 160px 1fr;
}
.featured-card-image {
  background: var(--navy);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px 14px;
  border-right: 1px solid var(--border);
}
.book-mini {
  width: 96px;
  background: var(--navy);
  border-top: 3px solid var(--red);
  box-shadow: 3px 3px 10px rgba(0,0,0,0.4);
  padding: 10px 8px 12px;
  font-family: "Libre Baskerville", Georgia, serif;
}
.book-mini-label {
  font-family: "Source Code Pro", monospace;
  font-size: 4.5px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.38);
  margin-bottom: 8px;
}
.book-mini-title {
  font-size: 13px;
  font-weight: 700;
  color: #fff;
  line-height: 1.1;
  margin-bottom: 6px;
}
.book-mini-title span { color: #e67e22; }
.book-mini-sub {
  font-size: 5.5px;
  color: rgba(255,255,255,0.38);
  font-style: italic;
  line-height: 1.5;
}
.featured-card-body { padding: 16px 18px; }
.featured-card-title {
  font-size: 16px;
  font-weight: bold;
  color: var(--text);
  margin-bottom: 4px;
}
.featured-card-sub {
  font-size: 12px;
  color: var(--muted);
  font-style: italic;
  font-family: "Libre Baskerville", Georgia, serif;
  margin-bottom: 12px;
}
.featured-card-meta {
  display: flex;
  gap: 20px;
  margin-bottom: 12px;
  padding-bottom: 12px;
  border-bottom: 1px solid #eee;
}
.fcm-label { font-size: 10px; color: var(--muted); margin-bottom: 2px; }
.fcm-value { font-size: 13px; font-weight: bold; color: var(--text); }
.fcm-value.free { color: var(--red); }
.featured-card-desc {
  font-size: 12px;
  line-height: 1.7;
  color: #444;
  margin-bottom: 14px;
}
.featured-card .btn-primary {
  display: inline-block;
  width: auto;
  padding: 9px 22px;
  font-size: 13px;
}

/* Category grid */
.category-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
}
.category-card {
  background: var(--white);
  border: 1px solid var(--border);
  padding: 16px 12px;
  text-align: center;
  color: var(--text);
  display: block;
  transition: border-color 0.15s;
}
.category-card:hover { border-color: var(--red); text-decoration: none; color: var(--text); }
.category-card-icon {
  font-size: 20px;
  margin-bottom: 6px;
  color: var(--navy);
}
.category-card-icon {
  display: flex;
  justify-content: center;
}
.category-card-icon img {
  width: 32px;
  height: 32px;
  object-fit: contain;
}
.category-card-label {
  font-size: 12px;
  font-weight: bold;
  margin-bottom: 3px;
}
.category-card-count { font-size: 10px; color: var(--muted); }

/* ══════════════════════════════════
   ITEM SPECIFICS
══════════════════════════════════ */
.specifics-section {
  max-width: 1000px;
  margin: 0 auto;
  padding: 0 12px 20px;
}
.specifics-title {
  font-size: 14px;
  font-weight: bold;
  color: var(--text);
  margin-bottom: 8px;
  padding-bottom: 6px;
  border-bottom: 2px solid var(--red);
  display: inline-block;
}
.specifics-grid {
  background: var(--white);
  border: 1px solid var(--border);
  display: grid;
  grid-template-columns: 1fr 1fr;
}
.spec-key, .spec-val {
  padding: 7px 12px;
  font-size: 12px;
  border-bottom: 1px solid #eee;
}
.spec-key {
  background: #f7f7f7;
  font-weight: bold;
  color: #444;
  border-right: 1px solid #eee;
}
.spec-val { color: var(--text); }

/* ══════════════════════════════════
   TOPICS
══════════════════════════════════ */
.topics-section {
  max-width: 1000px;
  margin: 0 auto;
  padding: 0 12px 20px;
}
.topics-title {
  font-size: 14px;
  font-weight: bold;
  color: var(--text);
  margin-bottom: 8px;
  padding-bottom: 6px;
  border-bottom: 2px solid var(--red);
  display: inline-block;
}
.topics-box {
  background: var(--white);
  border: 1px solid var(--border);
  padding: 16px;
}
.topics-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0;
}
.topic-item {
  padding: 8px 0;
  border-bottom: 1px solid #f0f0f0;
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  color: #333;
}
.topic-bullet {
  width: 6px; height: 6px;
  background: var(--red);
  flex-shrink: 0;
  transform: rotate(45deg);
}

/* ══════════════════════════════════
   FOOTER
══════════════════════════════════ */
.site-footer {
  background: var(--navy);
  border-top: 3px solid var(--red);
  padding: 24px 0 16px;
}
.footer-inner {
  max-width: 1000px;
  margin: 0 auto 20px;
  padding: 0 12px;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
}
.footer-col h4 {
  font-size: 11px;
  font-weight: bold;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: rgba(255,255,255,0.5);
  margin-bottom: 10px;
}
.footer-col a {
  display: block;
  font-size: 12px;
  color: rgba(255,255,255,0.65);
  margin-bottom: 5px;
}
.footer-col a:hover { color: #fff; text-decoration: none; }
.footer-sub-label {
  display: block;
  font-size: 10px;
  font-weight: bold;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: rgba(255,255,255,0.35);
  margin-top: 12px;
  margin-bottom: 5px;
}
.footer-bottom {
  max-width: 1000px;
  margin: 0 auto;
  padding: 12px 12px 0;
  border-top: 1px solid rgba(255,255,255,0.1);
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px;
}
.footer-bottom span {
  font-size: 11px;
  color: rgba(255,255,255,0.35);
}

/* ══════════════════════════════════
   MOBILE RESPONSIVE
══════════════════════════════════ */
@media (max-width: 720px) {
  /* Header: stack logo and search */
  .main-header-inner {
    flex-direction: column;
    align-items: stretch;
    gap: 8px;
    padding: 10px 12px;
  }
  .search-bar { max-width: 100%; }

  /* Nav: hamburger toggle */
  .nav-toggle { display: block; }
  .nav-tabs-inner {
    flex-direction: column;
    padding: 0;
  }
  .nav-tabs a {
    display: none;
    border-right: none;
    border-top: 1px solid rgba(255,255,255,0.07);
    padding: 11px 16px;
  }
  .nav-tabs.open a { display: block; }
  .nav-dropdown { display: none; flex-direction: column; }
  .nav-tabs.open .nav-dropdown { display: flex; }
  .nav-dropdown-toggle {
    border-right: none;
    border-top: 1px solid rgba(255,255,255,0.07);
    padding: 11px 16px;
    text-align: left;
    width: 100%;
  }
  .nav-dropdown-menu {
    position: static;
    border: none;
    border-top: none;
    background: rgba(0,0,0,0.2);
    min-width: unset;
  }
  .nav-dropdown-menu a {
    padding: 9px 28px;
    border-bottom: 1px solid rgba(255,255,255,0.05);
  }
  .nav-dropdown:hover .nav-dropdown-menu { display: none; }
  .nav-dropdown.open .nav-dropdown-menu { display: block; }

  /* Listing: single column */
  .listing {
    grid-template-columns: 1fr;
    gap: 16px;
  }

  /* Book cover: center it */
  .listing-image-col { display: flex; flex-direction: column; align-items: center; }
  .img-main { width: 100%; }

  /* Meta row: wrap to 2 columns */
  .listing-meta-row { flex-wrap: wrap; }
  .listing-meta-item {
    flex: 1 1 45%;
    border-bottom: 1px solid #eee;
  }

  /* Topics: 2 columns */
  .topics-grid { grid-template-columns: repeat(2, 1fr); }

  /* Specifics: single column */
  .specifics-grid { grid-template-columns: 1fr; }
  .spec-key { border-right: none; border-bottom: none; }

  /* Footer: 2 columns */
  .footer-inner { grid-template-columns: repeat(2, 1fr); }
  .footer-bottom { flex-direction: column; align-items: flex-start; }

  /* Home page */
  .home-stats-bar { display: none; }
  .featured-card { grid-template-columns: 1fr; }
  .featured-card-image { border-right: none; border-bottom: 1px solid var(--border); padding: 16px; }
  .category-grid { grid-template-columns: repeat(2, 1fr); }

  /* About page */
  .about-links-grid { grid-template-columns: 1fr; }
}

@media (max-width: 400px) {
  /* Topics: single column on very small screens */
  .topics-grid { grid-template-columns: 1fr; }
  .footer-inner { grid-template-columns: 1fr; }
}
