:root {
  --ink: #14213d;
  --muted: #64748b;
  --line: #d7deea;
  --surface: #ffffff;
  --soft: #f3f7fb;
  --rail: #07111f;
  --blue: #2563eb;
  --teal: #0f766e;
  --amber: #f59e0b;
  --rose: #e11d48;
  --shadow: 0 18px 40px rgba(15, 23, 42, 0.1);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: linear-gradient(180deg, #f8fbff 0%, #eef4f8 100%);
  color: var(--ink);
  font-family: Arial, Helvetica, sans-serif;
  letter-spacing: 0;
}
a { color: inherit; text-decoration: none; }
button, input, select, textarea { font: inherit; }
button { cursor: pointer; }

.shell-rail {
  position: fixed;
  inset: 0 auto 0 0;
  z-index: 20;
  display: grid;
  width: 268px;
  grid-template-rows: auto 1fr auto auto;
  gap: 22px;
  padding: 24px;
  background: var(--rail);
  color: #fff;
}
.brand {
  display: flex;
  gap: 12px;
  align-items: center;
}
.brand-mark {
  display: grid;
  width: 46px;
  height: 46px;
  place-items: center;
  border-radius: 8px;
  background: linear-gradient(135deg, var(--blue), var(--teal));
  font-weight: 900;
}
.brand strong, .brand small { display: block; line-height: 1.2; }
.brand small { margin-top: 3px; color: #a8b3c7; font-size: 12px; }
.rail-nav {
  display: grid;
  align-content: start;
  gap: 8px;
}
.rail-nav a, .admin-link, .cart-button {
  border: 1px solid rgba(255,255,255,0.12);
  border-radius: 8px;
  padding: 12px;
  color: #dce7f7;
  font-weight: 800;
}
.rail-nav a[aria-current="true"], .rail-nav a:hover {
  background: #fff;
  color: var(--rail);
}
.cart-button {
  display: flex;
  justify-content: space-between;
  background: var(--blue);
  color: #fff;
}
.cart-button strong {
  display: grid;
  min-width: 24px;
  height: 24px;
  place-items: center;
  border-radius: 999px;
  background: #fff;
  color: var(--blue);
}
.admin-link { display: block; text-align: center; }

.site-shell {
  min-height: 100vh;
  margin-left: 268px;
}
.top-strip {
  position: sticky;
  top: 0;
  z-index: 10;
  display: grid;
  grid-template-columns: minmax(220px, 1fr) auto;
  gap: 16px;
  align-items: center;
  padding: 18px 32px;
  border-bottom: 1px solid var(--line);
  background: rgba(248, 251, 255, 0.92);
  backdrop-filter: blur(14px);
}
.search-bar {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 14px;
  align-items: center;
}
.search-bar label { color: var(--muted); font-size: 13px; font-weight: 800; }
.search-bar input, .coupon-row input, .checkout-form input, .checkout-form textarea, select {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 12px 14px;
  background: #fff;
  color: var(--ink);
  outline: 0;
}
.support-pill {
  display: grid;
  gap: 2px;
  min-width: 230px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 9px 12px;
  background: #fff;
}
.support-pill span { color: var(--muted); font-size: 12px; font-weight: 800; }
.support-pill a { color: var(--blue); font-size: 13px; font-weight: 800; }
.page-root { width: min(1200px, calc(100% - 48px)); margin: 0 auto; padding: 30px 0 64px; }

.eyebrow {
  margin: 0 0 10px;
  color: var(--blue);
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 0;
  text-transform: uppercase;
}
h1, h2, h3, p { margin-top: 0; }
h1 { font-size: 54px; line-height: 1.02; }
h2 { font-size: 32px; }
p { color: var(--muted); line-height: 1.7; }

.hero-panel {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 330px;
  gap: 28px;
  align-items: stretch;
}
.hero-copy, .feature-cover, .metric-strip, .shop-head, .filter-panel, .product-card, .collection-board, .product-detail, .about-panel, .about-grid article, .contact-panel {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  box-shadow: var(--shadow);
}
.hero-copy {
  padding: 42px;
  background:
    linear-gradient(90deg, rgba(37,99,235,0.08) 1px, transparent 1px) 0 0 / 42px 42px,
    #fff;
}
.hero-actions, .detail-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
}
.primary-link, .secondary-link, .product-card button, .detail-actions button, .checkout-button, .coupon-row button {
  display: inline-flex;
  min-height: 42px;
  align-items: center;
  justify-content: center;
  border: 0;
  border-radius: 8px;
  padding: 0 16px;
  font-weight: 900;
}
.primary-link, .product-card button, .detail-actions button, .checkout-button, .coupon-row button { background: var(--blue); color: #fff; }
.secondary-link { border: 1px solid var(--line); background: #fff; color: var(--ink); }
.feature-cover {
  display: grid;
  gap: 12px;
  padding: 18px;
}
.feature-cover img, .product-card img, .detail-cover img, .cart-line img {
  width: 100%;
  aspect-ratio: 9 / 13;
  object-fit: contain;
  border-radius: 8px;
  background: #e8eef5;
}
.feature-cover span { font-size: 20px; font-weight: 900; }
.feature-cover strong { color: var(--teal); font-size: 22px; }
.metric-strip {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  margin: 24px 0 34px;
  overflow: hidden;
}
.metric-strip article {
  padding: 20px;
  border-right: 1px solid var(--line);
}
.metric-strip article:last-child { border-right: 0; }
.metric-strip strong { display: block; font-size: 28px; }
.metric-strip span { color: var(--muted); font-size: 13px; font-weight: 800; }

.section-head, .shop-head {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  align-items: end;
  margin: 24px 0 18px;
}
.section-head a { color: var(--blue); font-weight: 900; }
.shop-head { padding: 26px; align-items: center; }
.shop-head h1, .collection-board h1 { margin-bottom: 8px; }
.sort-box { display: grid; gap: 8px; color: var(--muted); font-size: 12px; font-weight: 900; }
.catalog-layout {
  display: grid;
  grid-template-columns: 240px minmax(0, 1fr);
  gap: 18px;
}
.filter-panel {
  position: sticky;
  top: 96px;
  display: grid;
  gap: 8px;
  align-content: start;
  padding: 18px;
}
.filter-panel h2 { font-size: 22px; }
.filter-panel button {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 10px;
  background: #fff;
  color: var(--ink);
  text-align: left;
  font-weight: 800;
}
.filter-panel button.is-active { background: var(--ink); color: #fff; }
.result-line {
  margin-bottom: 12px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 900;
}
.product-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
}
.product-grid.compact { grid-template-columns: repeat(5, minmax(0, 1fr)); }
.collection-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.product-card {
  display: grid;
  grid-template-rows: auto 1fr auto;
  min-width: 0;
  padding: 14px;
}
.product-card:hover { transform: translateY(-3px); }
.card-copy span, .isbn {
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
}
.product-card h3 { margin: 8px 0; font-size: 20px; line-height: 1.2; }
.product-card p { min-height: 74px; font-size: 14px; }
.card-actions {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  align-items: center;
  margin-top: 14px;
}
.card-actions strong { color: var(--teal); font-size: 20px; }
.collection-board {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 180px;
  gap: 24px;
  align-items: center;
  margin-bottom: 24px;
  padding: 34px;
}
.collection-board strong {
  display: grid;
  height: 150px;
  place-items: center;
  border-radius: 8px;
  background: var(--ink);
  color: #fff;
  font-size: 58px;
}
.collection-board.new { border-left: 8px solid var(--amber); }
.collection-board.best { border-left: 8px solid var(--rose); }
.product-detail {
  display: grid;
  grid-template-columns: 360px minmax(0, 1fr);
  gap: 34px;
  padding: 28px;
}
.detail-cover { padding: 16px; border-radius: 8px; background: var(--soft); }
.back-link { color: var(--blue); font-weight: 900; }
.byline { font-weight: 900; color: var(--ink); }
.fact-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  margin: 22px 0;
}
.fact-grid div {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 12px;
  background: #fff;
}
.fact-grid dt { color: var(--muted); font-size: 12px; font-weight: 900; }
.fact-grid dd { margin: 6px 0 0; font-weight: 900; overflow-wrap: anywhere; }
.detail-actions strong { color: var(--teal); font-size: 32px; }
.contact-panel {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 320px;
  gap: 24px;
  padding: 36px;
}
.contact-panel address {
  display: grid;
  align-content: center;
  gap: 10px;
  border-radius: 8px;
  padding: 22px;
  background: var(--ink);
  color: #fff;
  font-style: normal;
}
.contact-panel address span { color: #a8b3c7; font-weight: 900; }
.contact-panel address a { color: #fff; font-weight: 900; }
.about-panel {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 340px;
  gap: 24px;
  padding: 36px;
}
.about-copy h2 {
  max-width: 780px;
  color: var(--ink);
  font-size: 28px;
  line-height: 1.18;
}
.about-copy p {
  max-width: 820px;
  color: var(--muted);
  font-size: 16px;
  line-height: 1.75;
}
.about-card {
  display: grid;
  align-content: center;
  gap: 10px;
  border-radius: 8px;
  padding: 22px;
  background: var(--ink);
  color: #fff;
}
.about-card span {
  color: #a8b3c7;
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
}
.about-card strong {
  margin-bottom: 10px;
  line-height: 1.25;
}
.about-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
  margin-top: 18px;
}
.about-grid article {
  padding: 20px;
}
.about-grid span {
  color: var(--blue);
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
}
.about-grid strong {
  display: block;
  margin: 8px 0;
  font-size: 20px;
}
.about-grid p {
  margin-bottom: 0;
  color: var(--muted);
}

.cart-drawer {
  position: fixed;
  inset: 0;
  z-index: 40;
  display: none;
  justify-content: end;
  background: rgba(7, 17, 31, 0.44);
}
.cart-drawer.is-open { display: flex; }
.cart-panel {
  width: min(440px, 100%);
  height: 100%;
  overflow: auto;
  padding: 22px;
  background: #fff;
}
.cart-head {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: center;
}
.icon-button {
  width: 38px;
  height: 38px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  color: var(--ink);
}
.cart-items, .checkout-form, .totals { display: grid; gap: 12px; }
.cart-line {
  display: grid;
  grid-template-columns: 54px minmax(0, 1fr);
  gap: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 10px;
}
.cart-line img { width: 54px; grid-row: span 2; }
.cart-line span { color: var(--muted); font-weight: 800; }
.quantity-tools {
  grid-column: 2;
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  align-items: center;
}
.quantity-tools button {
  min-height: 28px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #fff;
}
.coupon-row { display: grid; gap: 8px; margin: 14px 0; }
.coupon-row div { display: grid; grid-template-columns: 1fr auto; gap: 8px; }
.checkout-form label { display: grid; gap: 6px; color: var(--muted); font-size: 12px; font-weight: 900; }
.totals {
  margin: 16px 0;
  border-top: 1px solid var(--line);
  padding-top: 16px;
}
.totals div { display: flex; justify-content: space-between; }
.grand-total { font-size: 22px; font-weight: 900; }
.empty-note, .payment-note { color: var(--muted); }

.paypal-buttons {
  margin-top: 12px;
  min-height: 44px;
}
.toast {
  position: fixed;
  right: 22px;
  bottom: 22px;
  z-index: 60;
  transform: translateY(20px);
  opacity: 0;
  border-radius: 8px;
  padding: 12px 16px;
  background: var(--ink);
  color: #fff;
  font-weight: 900;
  transition: 180ms ease;
}
.toast.is-visible { transform: translateY(0); opacity: 1; }
.cover-placeholder {
  display: grid;
  width: 100%;
  aspect-ratio: 9 / 13;
  place-items: center;
  border-radius: 8px;
  background: var(--soft);
  color: var(--muted);
  font-weight: 900;
}

@media (max-width: 1100px) {
  .shell-rail { position: static; width: auto; grid-template-rows: auto; }
  .rail-nav { grid-template-columns: repeat(6, minmax(0, 1fr)); }
  .site-shell { margin-left: 0; }
  .hero-panel, .product-detail, .about-panel, .contact-panel { grid-template-columns: 1fr; }
  .product-grid, .collection-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .product-grid.compact { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

@media (max-width: 720px) {
  .shell-rail { padding: 14px; }
  .rail-nav { grid-template-columns: 1fr 1fr; }
  .top-strip { grid-template-columns: 1fr; padding: 14px; }
  .search-bar { grid-template-columns: 1fr; }
  .page-root { width: min(100% - 24px, 1200px); padding-top: 18px; }
  h1 { font-size: 36px; }
  h2 { font-size: 26px; }
  .hero-copy, .shop-head, .collection-board, .about-panel, .contact-panel { padding: 22px; }
  .metric-strip, .catalog-layout, .collection-board, .fact-grid, .about-grid { grid-template-columns: 1fr; }
  .product-grid, .product-grid.compact, .collection-grid { grid-template-columns: 1fr; }
  .filter-panel { position: static; }
}

/* Page Haven LLC: editorial reading-room storefront */
:root {
  --ink: #2f1724;
  --muted: #71646a;
  --line: #d9c8bd;
  --surface: #fffdf8;
  --soft: #f3ebe2;
  --rail: #fffdf8;
  --blue: #8f244d;
  --teal: #0f766e;
  --amber: #d99b2b;
  --rose: #b4234d;
  --shadow: 0 20px 44px rgba(47, 23, 36, 0.12);
}
body {
  background:
    linear-gradient(90deg, rgba(143,36,77,0.06) 1px, transparent 1px) 0 0 / 88px 88px,
    #fffaf2;
  color: var(--ink);
  font-family: Georgia, "Times New Roman", serif;
}
.shell-rail {
  position: sticky;
  top: 0;
  inset: auto;
  width: 100%;
  grid-template-columns: minmax(220px, auto) 1fr auto auto;
  grid-template-rows: auto;
  align-items: center;
  padding: 18px 34px;
  border-bottom: 2px solid var(--ink);
  background: rgba(255,253,248,0.94);
  color: var(--ink);
  backdrop-filter: blur(14px);
}
.brand-mark { background: var(--ink); color: #fff; }
.brand small { color: var(--muted); }
.rail-nav { grid-template-columns: repeat(5, auto); justify-content: center; }
.rail-nav a, .admin-link, .cart-button {
  border: 0;
  color: var(--ink);
  background: transparent;
  padding: 8px 10px;
}
.rail-nav a[aria-current="true"], .rail-nav a:hover {
  background: var(--ink);
  color: #fff;
}
.cart-button {
  border: 1px solid var(--ink);
  background: #fff;
  color: var(--ink);
}
.cart-button strong { background: var(--rose); color: #fff; }
.site-shell { margin-left: 0; }
.top-strip {
  grid-template-columns: 1fr auto;
  padding: 20px 42px;
  background: #fffaf2;
  border-bottom: 1px solid var(--line);
}
.page-root { width: min(1220px, calc(100% - 48px)); }
h1 {
  font-size: 62px;
  line-height: 1;
}
h2 { font-size: 38px; }
p, input, select, textarea, button { font-family: Arial, Helvetica, sans-serif; }
.hero-panel {
  grid-template-columns: minmax(0, 0.92fr) minmax(300px, 0.38fr);
  min-height: 560px;
  align-items: stretch;
}
.hero-copy {
  display: grid;
  align-content: center;
  border: 2px solid var(--ink);
  background: #fffdf8;
}
.feature-cover {
  border: 2px solid var(--ink);
  background: var(--soft);
  transform: rotate(1deg);
}
.feature-cover img, .product-card img, .detail-cover img {
  border: 1px solid var(--ink);
}
.primary-link, .product-card button, .detail-actions button, .checkout-button, .coupon-row button {
  background: var(--ink);
}
.secondary-link {
  border: 1px solid var(--ink);
  color: var(--ink);
}
.metric-strip {
  grid-template-columns: repeat(4, 1fr);
  border: 2px solid var(--ink);
  box-shadow: none;
}
.metric-strip article:nth-child(2) { background: #e8f4ef; }
.metric-strip article:nth-child(3) { background: #f8e8ee; }
.metric-strip article:nth-child(4) { background: #faedcf; }
.shop-head, .collection-board, .contact-panel, .product-detail {
  border: 2px solid var(--ink);
}
.catalog-layout { grid-template-columns: 300px minmax(0, 1fr); }
.filter-panel {
  border: 2px solid var(--ink);
  background: #fffdf8;
}
.filter-panel button.is-active { background: var(--rose); }
.product-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.product-grid.compact, .collection-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.product-card {
  grid-template-columns: 128px minmax(0, 1fr);
  grid-template-rows: auto auto;
  gap: 14px;
  border: 1px solid var(--line);
  background: #fffdf8;
}
.cover-link { grid-row: span 2; }
.card-actions { grid-column: 2; }
.collection-board strong { background: var(--rose); }
.product-detail { grid-template-columns: 330px 1fr; background: #fffdf8; }
.contact-panel address { background: var(--ink); }
@media (max-width: 900px) {
  .shell-rail { grid-template-columns: 1fr; }
  .rail-nav { grid-template-columns: 1fr 1fr; justify-content: stretch; }
  .top-strip, .hero-panel, .catalog-layout, .product-card, .product-detail, .contact-panel { grid-template-columns: 1fr; }
  .cover-link, .card-actions { grid-column: auto; grid-row: auto; }
  .product-grid, .product-grid.compact, .collection-grid { grid-template-columns: 1fr; }
  h1 { font-size: 40px; }
}
