/* Rae Ridge Publishing — draft shop styles. Not a live store. */
:root {
  --cream: #FFFDF6;
  --paper: #FFF9EE;
  --page: #FFFFFF;
  --grape: #2A1259;
  --grape-deep: #1B0B3A;
  --ink: #3B2D5C;
  --muted: #5C5470;
  --line: #E8DFD0;
  --teal: #077786;
  --sky: #10B3C6;
  --pink: #C02E68;
  --crayon: #F96DA0;
  --sun: #FFD23F;
  --sun-soft: #FFE38A;
  --green: #45C46B;
  --bb-navy: #001A47;
  --sale: #C02E68;
  --shadow: 0 10px 30px rgba(42, 18, 89, 0.08);
  --radius: 18px;
  --header-h: 76px;
  --max: 1180px;
  --sans: "Nunito", "Nunito Variable", "Segoe UI", sans-serif;
  --display: "Fredoka", "Fredoka Variable", "Nunito", sans-serif;
}

@font-face {
  font-family: "Fredoka";
  src: url("/fonts/Fredoka-Variable.ttf") format("truetype");
  font-weight: 300 700;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Nunito";
  src: url("/fonts/Nunito-Variable.ttf") format("truetype");
  font-weight: 300 900;
  font-style: normal;
  font-display: swap;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--sans);
  font-weight: 500;
  color: var(--ink);
  background: var(--cream);
  line-height: 1.55;
  min-height: 100vh;
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--teal); text-decoration: none; }
a:hover { text-decoration: underline; }
h1, h2, h3, h4 {
  font-family: var(--display);
  font-weight: 600;
  line-height: 1.15;
  color: var(--grape);
  margin: 0 0 0.5em;
}
p { margin: 0 0 1em; }

.draft-banner {
  background: var(--sun);
  color: var(--grape-deep);
  text-align: center;
  font-size: 0.85rem;
  font-weight: 700;
  padding: 0.45rem 1rem;
  letter-spacing: 0.01em;
}
.promo-bar {
  background: var(--grape);
  color: #fff;
  text-align: center;
  font-size: 0.92rem;
  padding: 0.5rem 1rem;
}
.promo-bar strong { color: var(--sun); }

.site-header {
  position: sticky;
  top: 0;
  z-index: 40;
  background: rgba(255, 253, 246, 0.94);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}
.header-inner {
  max-width: var(--max);
  margin: 0 auto;
  min-height: var(--header-h);
  padding: 0.4rem 1.25rem;
  display: flex;
  align-items: center;
  gap: 1.25rem;
}
.logo img { height: 52px; width: auto; }
.nav {
  display: flex;
  flex-wrap: wrap;
  gap: 0.3rem 1.1rem;
  margin-left: auto;
  align-items: center;
}
.nav a {
  color: var(--grape);
  font-weight: 700;
  font-size: 0.95rem;
  text-decoration: none;
}
.nav a:hover, .nav a[aria-current="page"] { color: var(--teal); text-decoration: none; }
.cart-btn {
  position: relative;
  border: 2px solid var(--grape);
  background: var(--page);
  color: var(--grape);
  border-radius: 999px;
  padding: 0.35rem 0.85rem;
  font-weight: 800;
  font-family: inherit;
  cursor: pointer;
}
.cart-btn:hover { background: var(--grape); color: #fff; }
.cart-count {
  position: absolute;
  top: -8px;
  right: -8px;
  background: var(--pink);
  color: #fff;
  border-radius: 999px;
  min-width: 1.25rem;
  height: 1.25rem;
  font-size: 0.75rem;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 0 0.25rem;
}
.cart-count.show { display: flex; }

.wrap { max-width: var(--max); margin: 0 auto; padding: 2rem 1.25rem 3.5rem; }
.hero {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: 2.5rem;
  align-items: center;
  padding: 1.5rem 0 2.5rem;
}
.hero h1 {
  font-size: clamp(2.1rem, 4.4vw, 3.4rem);
  margin-bottom: 0.4em;
}
.lede { font-size: 1.15rem; color: var(--muted); max-width: 38rem; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 0.75rem; margin-top: 1.4rem; }
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  border-radius: 999px;
  padding: 0.72rem 1.3rem;
  font-weight: 800;
  font-family: inherit;
  border: 2px solid transparent;
  cursor: pointer;
  text-decoration: none;
  font-size: 1rem;
}
.btn:hover { text-decoration: none; }
.btn-primary { background: var(--grape); color: #fff; }
.btn-primary:hover { background: var(--grape-deep); color: #fff; }
.btn-bb { background: var(--bb-navy); color: #fff; }
.btn-bb:hover { background: #00102d; color: #fff; }
.btn-toons { background: var(--teal); color: #fff; }
.btn-toons:hover { background: #055e6a; color: #fff; }
.btn-ghost { background: transparent; border-color: var(--grape); color: var(--grape); }
.btn-ghost:hover { background: var(--grape); color: #fff; }
.btn-sale { background: var(--pink); color: #fff; }
.btn:disabled { opacity: 0.5; cursor: not-allowed; }

.series-pair { display: grid; grid-template-columns: 1fr 1fr; gap: 1.25rem; }
.series-card {
  border-radius: 24px;
  padding: 1.4rem 1.4rem 1.5rem;
  color: #fff;
  min-height: 220px;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  box-shadow: var(--shadow);
  text-decoration: none;
  overflow: hidden;
  position: relative;
}
.series-card:hover { text-decoration: none; transform: translateY(-2px); transition: transform 0.15s ease; }
.series-card.bb { background: linear-gradient(160deg, #001A47 0%, #00307a 55%, #7A3AC6 140%); }
.series-card.toons { background: linear-gradient(160deg, #077786 0%, #10B3C6 70%, #F96DA0 160%); }
.series-card img { max-height: 84px; width: auto; margin-bottom: 0.8rem; filter: drop-shadow(0 4px 10px rgba(0,0,0,0.2)); }
.series-card p { color: rgba(255,255,255,0.9); margin: 0; font-size: 0.98rem; }
.series-card strong { color: #fff; font-family: var(--display); font-size: 1.35rem; display: block; margin-bottom: 0.25rem; }

.section-head {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 1rem;
  margin: 2.2rem 0 1.1rem;
}
.section-head h2 { margin: 0; font-size: 1.85rem; }
.muted { color: var(--muted); }

.grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 1.15rem;
}
.book-card {
  background: var(--page);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
  text-decoration: none;
  color: inherit;
  display: flex;
  flex-direction: column;
  min-height: 100%;
}
.book-card:hover { text-decoration: none; transform: translateY(-3px); transition: transform 0.15s ease; }
.book-card .thumb {
  background: #F3EEE4;
  aspect-ratio: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}
.book-card .thumb img { width: 100%; height: 100%; object-fit: cover; }
.book-card .meta { padding: 0.85rem 0.95rem 1.05rem; display: flex; flex-direction: column; gap: 0.2rem; flex: 1; }
.book-card h3 { font-size: 1.02rem; margin: 0 0 0.15rem; color: var(--grape); }
.book-card .by { font-size: 0.82rem; color: var(--muted); }
.price { font-weight: 800; color: var(--grape); }
.price s { color: var(--muted); font-weight: 600; margin-right: 0.35rem; }
.badge {
  display: inline-block;
  background: var(--pink);
  color: #fff;
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.03em;
  border-radius: 999px;
  padding: 0.15rem 0.5rem;
  text-transform: uppercase;
}
.badge-teal { background: var(--teal); }
.badge-navy { background: var(--bb-navy); }

/* Product */
.product {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2.4rem;
  align-items: start;
}
.gallery { display: grid; gap: 0.7rem; }
.gallery .hero-img {
  background: #F3EEE4;
  border-radius: 20px;
  overflow: hidden;
  border: 1px solid var(--line);
}
.thumbs { display: grid; grid-template-columns: repeat(auto-fill, minmax(88px, 1fr)); gap: 0.5rem; }
.thumbs button {
  border: 2px solid var(--line);
  background: #F3EEE4;
  border-radius: 10px;
  padding: 0;
  overflow: hidden;
  cursor: pointer;
}
.thumbs button[aria-current="true"] { border-color: var(--grape); }
.thumbs img { width: 100%; height: 88px; object-fit: cover; }
.product-info .kicker { font-weight: 800; text-transform: uppercase; letter-spacing: 0.06em; font-size: 0.78rem; color: var(--teal); margin-bottom: 0.4rem; }
.product-info .kicker a { color: inherit; text-decoration: none; }
.product-info .kicker a:hover { text-decoration: underline; }
.product-info .kicker.bb { color: var(--pink); }
.product-info h1 { font-size: clamp(1.7rem, 3vw, 2.35rem); }
.product-info .price-row { font-size: 1.45rem; margin: 0.6rem 0 0.3rem; display: flex; align-items: center; gap: 0.6rem; flex-wrap: wrap; }
.buy-row { display: flex; gap: 0.7rem; align-items: center; margin: 1.1rem 0 0.6rem; flex-wrap: wrap; }
.qty {
  display: flex;
  align-items: center;
  border: 2px solid var(--grape);
  border-radius: 999px;
  overflow: hidden;
}
.qty button, .qty input {
  border: 0;
  background: var(--page);
  font: inherit;
  font-weight: 800;
  color: var(--grape);
  width: 2.2rem;
  height: 2.5rem;
  text-align: center;
}
.qty input { width: 2.6rem; }
.details { margin-top: 1.6rem; color: var(--ink); }
.details h2 { font-size: 1.2rem; margin-top: 1.2rem; }
.details ul { margin: 0 0 1em; padding-left: 1.15rem; }
.note {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 0.9rem 1rem;
  font-size: 0.95rem;
  color: var(--muted);
  margin-top: 1rem;
}
.placeholder-ladder {
  border: 1px dashed #c9b89a;
  background: #fff8e3;
  border-radius: 14px;
  padding: 0.85rem 1rem;
  font-size: 0.92rem;
  margin: 0.8rem 0 0;
}

/* Bundles */
.bundle-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 1.4rem; }
.bundle-card {
  background: var(--page);
  border: 1px solid var(--line);
  border-radius: 22px;
  overflow: hidden;
  box-shadow: var(--shadow);
}
.bundle-card img { width: 100%; aspect-ratio: 1; object-fit: cover; }
.bundle-card .body { padding: 1.15rem 1.2rem 1.4rem; }
.picker {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
  gap: 0.55rem;
  margin: 1rem 0;
}
.picker-row {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  background: var(--page);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 0.4rem 0.5rem;
}
.picker-row img { width: 44px; height: 44px; object-fit: cover; border-radius: 6px; }
.picker-row span { flex: 1; font-size: 0.88rem; font-weight: 700; }
.picker-total { font-weight: 800; margin: 0.4rem 0 0.8rem; }

/* Cart drawer */
.overlay {
  position: fixed; inset: 0;
  background: rgba(27, 11, 58, 0.4);
  z-index: 50;
  display: none;
}
.overlay.open { display: block; }
.drawer {
  position: fixed;
  top: 0; right: 0; bottom: 0;
  width: min(420px, 100%);
  background: var(--cream);
  z-index: 60;
  box-shadow: -10px 0 30px rgba(42,18,89,0.15);
  transform: translateX(110%);
  transition: transform 0.22s ease;
  display: flex;
  flex-direction: column;
}
.drawer.open { transform: none; }
.drawer header, .drawer footer { padding: 1rem 1.1rem; }
.drawer header { display: flex; justify-content: space-between; align-items: center; border-bottom: 1px solid var(--line); }
.drawer header h2 { margin: 0; font-size: 1.3rem; }
.icon-btn { border: 0; background: none; font: inherit; font-weight: 800; cursor: pointer; color: var(--grape); font-size: 1.2rem; }
.cart-items { flex: 1; overflow: auto; padding: 0.8rem 1.1rem; }
.cart-line { display: grid; grid-template-columns: 64px 1fr auto; gap: 0.7rem; padding: 0.7rem 0; border-bottom: 1px solid var(--line); }
.cart-line img { width: 64px; height: 64px; object-fit: cover; border-radius: 8px; background: #F3EEE4; }
.cart-line h3 { font-size: 0.92rem; margin: 0 0 0.2rem; }
.cart-empty { color: var(--muted); padding: 1.5rem 0; }
.drawer footer { border-top: 1px solid var(--line); }
.cart-total { display: flex; justify-content: space-between; font-weight: 800; font-size: 1.1rem; margin-bottom: 0.8rem; }

/* Pages */
.prose { max-width: 44rem; }
.prose h1 { font-size: 2.2rem; }
.prose h2 { font-size: 1.35rem; margin-top: 1.5rem; }
address { font-style: normal; }

.page-hero {
  display: flex;
  align-items: center;
  gap: 1.2rem;
  margin-bottom: 1.4rem;
}
.page-hero img { height: 78px; width: auto; }
.page-hero.bb-hero { background: var(--bb-navy); color: #fff; border-radius: 22px; padding: 1.3rem 1.5rem; }
.page-hero.toons-hero { background: var(--teal); color: #fff; border-radius: 22px; padding: 1.3rem 1.5rem; }
.page-hero h1, .page-hero p { color: #fff; margin: 0; }
.page-hero p { opacity: 0.9; margin-top: 0.35rem; }

.site-footer {
  background: var(--grape-deep);
  color: #EDE6FF;
  padding: 2.4rem 1.25rem 2rem;
  margin-top: auto;
}
.footer-inner { max-width: var(--max); margin: 0 auto; display: grid; grid-template-columns: 1.3fr 1fr 1fr; gap: 1.5rem; }
.site-footer a { color: var(--sun-soft); }
.site-footer h3 { color: #fff; font-size: 1rem; }
.tiny { font-size: 0.85rem; color: #C9BFE0; margin-top: 1.5rem; text-align: center; }

.flash { padding: 0.8rem 1rem; border-radius: 12px; margin: 0 0 1rem; }
.flash-ok { background: #e5f8ea; color: #0d5a27; }
.flash-warn { background: #fff3d6; color: #6a4b00; }

@media (max-width: 860px) {
  .hero, .product, .series-pair, .bundle-grid, .footer-inner { grid-template-columns: 1fr; }
  .header-inner { flex-wrap: wrap; }
  .nav { margin-left: 0; width: 100%; }
  .logo img { height: 44px; }
}
