/* Public shop pages: checkout, pay, library */
.shop-page { background: var(--ivory); min-height: 100vh; }
.shop-main { padding: 48px 34px 80px; max-width: 980px; }
.shop-main h1 { font: 400 40px/1.15 Georgia, serif; margin: 12px 0 8px; color: var(--navy); }
.shop-lead { color: var(--muted); line-height: 1.7; max-width: 640px; margin-bottom: 28px; }
.shop-grid { display: grid; grid-template-columns: 1.2fr 0.9fr; gap: 24px; align-items: start; }
.shop-card {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 28px;
  box-shadow: 0 10px 30px #07172e0a;
}
.shop-card h2 { font: 22px Georgia, serif; margin: 0 0 16px; color: var(--navy); }
.shop-card label { display: block; font-size: 12px; color: var(--muted); margin: 14px 0 6px; }
.shop-card input,
.shop-card textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 12px 14px;
  background: #fff;
  outline: none;
}
.shop-card input:focus,
.shop-card textarea:focus { border-color: var(--gold); }
.shop-btn {
  display: inline-block;
  margin-top: 18px;
  width: 100%;
  text-align: center;
  border-radius: 12px;
  border: 0;
  padding: 14px 18px;
  background: var(--gold);
  color: var(--navy);
  font-weight: 600;
}
.shop-btn-sm {
  border: 0;
  border-radius: 10px;
  padding: 10px 14px;
  background: var(--navy);
  color: #fff;
  font-size: 12px;
  white-space: nowrap;
}
.shop-hint { color: var(--muted); font-size: 13px; line-height: 1.6; margin-top: 16px; }
.shop-msg { margin-top: 14px; font-size: 13px; min-height: 1.2em; }
.shop-msg.ok { color: #1f6b45; }
.shop-msg.err { color: #a33; }
.summary-list { display: flex; flex-direction: column; gap: 12px; }
.summary-row { display: flex; justify-content: space-between; gap: 12px; font-size: 14px; }
.summary-total {
  display: flex;
  justify-content: space-between;
  border-top: 1px solid var(--line);
  margin-top: 18px;
  padding-top: 14px;
  font-size: 16px;
}
.item-list { list-style: none; padding: 0; margin: 0; }
.item-list li {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 0;
  border-bottom: 1px solid var(--line);
  font-size: 14px;
}
.lib-list { display: flex; flex-direction: column; gap: 12px; margin-top: 18px; }
.lib-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  padding: 14px 0;
  border-bottom: 1px solid var(--line);
}
.lib-row small { display: block; color: var(--muted); margin-top: 4px; }
.shop-lookup { max-width: 480px; margin-bottom: 24px; }
code { background: #f0ebe1; padding: 2px 8px; border-radius: 6px; font-size: 13px; }
.detail-grid {
  display: grid;
  grid-template-columns: 280px 1fr;
  gap: 36px;
  align-items: start;
  margin-bottom: 48px;
}
.detail-cover {
  width: 100%;
  min-height: 400px;
  border-radius: 16px;
  padding: 28px;
  color: #fff;
  display: flex;
  flex-direction: column;
}
.detail-cover .w { font: 48px Georgia, serif; color: #ffffff33; margin: auto 0; }
.detail-copy h1 { font: 400 40px/1.15 Georgia, serif; margin: 0 0 8px; color: var(--navy); }
.detail-meta { color: var(--muted); font-size: 14px; }
.detail-price { font: 32px Georgia, serif; color: var(--navy); margin: 12px 0; }
.format-pills { display: flex; flex-wrap: wrap; gap: 8px; margin: 8px 0 4px; }
.format-pill {
  border: 1px solid var(--line);
  background: #fff;
  border-radius: 999px;
  padding: 8px 14px;
  font-size: 12px;
  color: var(--navy);
  cursor: pointer;
}
.format-pill.is-active {
  background: var(--navy);
  color: #fff;
  border-color: var(--navy);
}
.format-pill:hover { border-color: var(--gold); }
.detail-body { margin-top: 28px; }
.detail-body h3 { font: 20px Georgia, serif; margin: 0 0 10px; }
.prose p { line-height: 1.75; color: #243247; }
.related-section { margin-top: 20px; }
.related-section h2 { font: 28px Georgia, serif; margin-bottom: 16px; }
.related-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; }
.related-card {
  display: block;
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 16px;
  background: #fff;
}
.related-card b { display: block; font: 16px Georgia, serif; color: var(--navy); }
.related-card small { color: var(--muted); }
.legal-main .prose h3 { margin-top: 22px; }
.catalog-more {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  margin-top: 40px;
  text-align: center;
}
.catalog-more .primary {
  display: inline-block;
  border-radius: 12px;
  padding: 14px 28px;
  text-decoration: none;
}
.catalog-more small { color: var(--muted); font-size: 13px; }
.catalog-tools {
  margin: 24px 0 28px;
  flex-wrap: wrap;
  gap: 12px;
}
.pager {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  flex-wrap: wrap;
  margin: 36px 0 12px;
}
.pager-btn {
  border: 1px solid var(--line);
  background: #fff;
  border-radius: 10px;
  padding: 10px 16px;
  color: var(--navy);
  font-size: 13px;
}
.pager-btn:hover:not(:disabled) {
  background: var(--navy);
  color: #fff;
  border-color: var(--navy);
}
.pager-btn:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}
.pager-info {
  color: var(--muted);
  font-size: 13px;
}
.links.open { display: flex !important; flex-direction: column; gap: 12px; position: absolute; top: 78px; left: 0; right: 0; background: #faf7f0; padding: 16px 24px; border-bottom: 1px solid var(--line); }
@media (max-width: 820px) {
  .shop-grid { grid-template-columns: 1fr; }
  .shop-main { padding: 32px 18px 60px; }
  .shop-main h1 { font-size: 30px; }
  .detail-grid { grid-template-columns: 1fr; }
  .related-grid { grid-template-columns: 1fr 1fr; }
}
