/* Curebook 1.1.0: parts filled by Orion — live book shelf and journal, the
   book (product) page, share bar, related row, page links, contact page. */

/* Book rows: numbered in order, covers show the book's image when it has one */
.book-list { counter-reset: book; }
.book-list > .book-row { counter-increment: book; color: inherit; }
.book-number::before { content: counter(book, decimal-leading-zero); }
.mini-cover { position: relative; overflow: hidden; }
.mini-cover img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.mini-cover img + strong { visibility: hidden; }
.book-price { display: inline-flex; gap: 8px; align-items: baseline; color: var(--acid) !important; font-size: 13px !important; font-weight: 700; }
.book-price s { color: #a8b8b0; font-weight: 400; }
.book-stock { color: var(--coral); font-style: normal; font-size: 11px; }
.shelf-link { display: inline-block; margin-top: 45px; color: var(--paper); border-color: var(--paper); }
.list-empty { grid-column: 1 / -1; padding: 40px 0; font-family: var(--serif); font-size: 24px; color: #52675e; }
.list-empty.light { color: #a8b8b0; }

/* The book (product) page */
.book-detail-cover { position: relative; overflow: hidden; }
.book-detail-cover .cover-image { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; z-index: 1; }
.detail-price { display: flex; align-items: baseline; gap: 12px; margin: 28px 0 0; font-family: var(--serif); font-size: 34px; }
.detail-price s { font-size: 22px; color: #82958c; }
.detail-stock { font-family: var(--sans); font-size: 10px; font-weight: 700; letter-spacing: 0.12em; text-transform: uppercase; color: #52675e; }
.detail-stock[data-in-stock="false"] { color: var(--coral); }
.detail-actions { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 30px; }
.detail-actions .primary-button { border: 0; min-width: 220px; cursor: pointer; text-transform: none; }
.secondary-button { display: inline-flex; align-items: center; padding: 18px 20px; border: 1px solid var(--forest); font-size: 10px; font-weight: 700; transition: all 0.25s; }
.secondary-button:hover { background: var(--forest); color: var(--paper); }
.breadcrumbs a[data-product], .eyebrow a { color: inherit; }

/* Share bar */
.detail-share { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 22px; padding: 26px clamp(22px, 7vw, 105px); border-top: 1px solid var(--line); font-size: 10px; font-weight: 700; letter-spacing: 0.12em; text-transform: uppercase; }
.article-content .detail-share { padding: 26px 0 0; margin-top: 40px; }
.detail-share > span { color: #82958c; }
.detail-share a { border-bottom: 1px solid transparent; transition: border-color 0.2s; }
.detail-share a:hover, .detail-share a[data-copied] { border-color: var(--ink); }

/* Related row: slides sideways */
.related-row { padding: 60px clamp(22px, 7vw, 105px) 80px; background: var(--paper-dark); }
.related-track { display: flex; gap: 26px; overflow-x: auto; scroll-snap-type: x mandatory; padding: 34px 0 10px; scrollbar-width: thin; }
.related-card { flex: 0 0 clamp(190px, 22vw, 270px); scroll-snap-align: start; color: inherit; }
.related-card h3 { font-family: var(--serif); font-weight: 400; font-size: 24px; line-height: 1.05; letter-spacing: -0.02em; margin: 16px 0 8px; }
.related-cover { position: relative; aspect-ratio: 0.7; background: var(--acid); overflow: hidden; display: flex; align-items: flex-end; padding: 16px; }
.related-track > .related-card:nth-child(4n + 2) .related-cover { background: var(--coral); }
.related-track > .related-card:nth-child(4n + 3) .related-cover { background: var(--blue); }
.related-track > .related-card:nth-child(4n) .related-cover { background: var(--amber); }
.related-cover strong { font-family: var(--serif); font-weight: 500; font-size: 26px; line-height: 0.9; color: var(--forest); }
.related-cover img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.related-image { aspect-ratio: 4 / 3; background: #c5c0b4; overflow: hidden; }
.related-image img { width: 100%; height: 100%; object-fit: cover; filter: saturate(0.7); }
.related-price, .related-meta { font-size: 11px; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; color: #52675e; }
.related-price s { opacity: 0.6; }

/* Listing pages: Journal and the Book shelf */
.listing-hero .breadcrumbs, .shelf-hero .breadcrumbs { margin-bottom: 20px; }
.breadcrumbs.light, .breadcrumbs.light b { color: #a8b8b0; }
.listing-intro { max-width: 460px; margin-top: 30px; color: #52675e; line-height: 1.7; }
.journal-page .journal-title { margin-bottom: 70px; }
.article-excerpt { margin: -6px 0 18px; color: #52675e; line-height: 1.65; max-width: 440px; }
.article-image:empty::after { content: ""; display: block; height: 100%; background: linear-gradient(135deg, #d9d3c4, #c5c0b4); }
.shelf-tools { display: flex; flex-wrap: wrap; gap: 14px; margin: 0 0 40px; }
.shelf-tools input, .shelf-tools select { flex: 1 1 200px; padding: 14px 0; border: 0; border-bottom: 1px solid #f3f0e766; background: transparent; color: var(--paper); font-family: var(--serif); font-size: 20px; outline: 0; }
.shelf-tools select { flex: 0 1 200px; font-family: var(--sans); font-size: 13px; }
.shelf-tools select option { color: var(--ink); }
.shelf-tools button { padding: 14px 22px; border: 1px solid var(--acid); background: transparent; color: var(--acid); font-size: 11px; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; }
.shelf-tools button:hover { background: var(--acid); color: var(--forest); }
.pager { display: flex; justify-content: center; align-items: center; gap: 28px; margin-top: 60px; font-size: 11px; font-weight: 700; letter-spacing: 0.12em; text-transform: uppercase; }
.pager a { border-bottom: 1px solid currentColor; padding-bottom: 4px; }
.pager.light { color: var(--paper); }

/* The contact page */
.contact-crumbs { padding: 35px clamp(22px, 7vw, 105px) 0; }

/* A journal story's main image is shown whole, never cropped */
.article-feature img { height: auto; max-height: 80vh; width: auto; max-width: 100%; margin: 0 auto; object-fit: contain; }

/* Account and shopping screens: the page around Orion's working screen */
.account-crumbs { padding: 35px clamp(22px, 7vw, 105px) 0; }
.account-section { display: grid; grid-template-columns: 0.85fr 1.15fr; gap: 10vw; padding: clamp(60px, 8vw, 120px) clamp(22px, 7vw, 105px) clamp(85px, 10vw, 150px); align-items: start; }
.account-intro h1 { font-family: var(--serif); font-weight: 400; letter-spacing: -0.062em; line-height: 0.82; font-size: clamp(56px, 6.4vw, 100px); margin: 45px 0 30px; }
.account-intro > p:not(.eyebrow) { color: #52675e; max-width: 400px; line-height: 1.7; }
.account-screen { border-top: 1px solid var(--ink); padding-top: 34px; min-height: 240px; font-family: var(--sans); color: var(--ink); }
.account-screen input, .account-screen select, .account-screen textarea { font-family: var(--serif); font-size: 19px; background: transparent; border: 0; border-bottom: 1px solid var(--line); border-radius: 0; color: var(--ink); }
.account-screen button { background: var(--forest); color: var(--paper); border: 0; border-radius: 0; padding: 18px 22px; font-size: 11px; font-weight: 700; letter-spacing: 0.06em; }
@media (max-width: 900px) { .account-section { grid-template-columns: 1fr; gap: 40px; } }

/* 1.5.0: cards are all one size and their images fill the box, as shops do */
.journal-grid { grid-template-columns: repeat(3, minmax(0, 1fr)) !important; align-items: stretch; }
.journal-grid > .article-card { margin-top: 0 !important; }
.journal-grid > .article-card .article-image { aspect-ratio: 4 / 3 !important; }
.article-image img, .mini-cover img, .related-cover img, .related-image img { object-fit: cover; filter: none; }
.book-detail-cover .cover-image { object-fit: cover; }
@media (max-width: 1000px) { .journal-grid { grid-template-columns: repeat(2, minmax(0, 1fr)) !important; } }
@media (max-width: 640px) { .journal-grid { grid-template-columns: 1fr !important; } }
/* Cards added to a page take Curebook's type */
.cms-block-title { font-family: var(--serif); font-weight: 400; letter-spacing: -0.03em; }
.cms-block-name { font-family: var(--serif); font-weight: 400; font-size: 24px; }
.cms-block-media { border-radius: 0; background: #e6e1d4; }
