/* BOOPY Bookshelf — independent styles for TCD EVERY */
.boopy-bookshelf { --boopy-gap: 22px; width: 100%; margin: 0 auto 2em; }
.boopy-bookshelf * { box-sizing: border-box; }
.boopy-bookshelf__tools { display:flex; flex-wrap:wrap; align-items:center; gap:12px; margin:0 0 24px; }
.boopy-bookshelf__search { display:block; flex:1 1 260px; width:100%; max-width:440px; min-height:44px; padding:10px 14px; border:1px solid #d4d4d4; border-radius:4px; background:#fff; color:#222; font-size:16px; }
.boopy-bookshelf__sort { min-height:44px; max-width:100%; padding:8px 30px 8px 10px; border:1px solid #d4d4d4; border-radius:4px; background:#fff; color:#222; font-size:14px; }
.boopy-bookshelf__count { color:#777; font-size:13px; white-space:nowrap; }
.boopy-bookshelf__grid { display:grid; grid-template-columns:repeat(var(--boopy-columns, 4), minmax(0, 1fr)); gap:32px var(--boopy-gap); align-items:start; }
.boopy-bookshelf__card { display:flex; min-width:0; flex-direction:column; align-items:stretch; color:inherit; text-decoration:none !important; line-height:1.5; }
.boopy-bookshelf__card[hidden] { display:none !important; }
.boopy-bookshelf__cover { display:block; position:relative; width:100%; aspect-ratio:2 / 3; overflow:hidden; background:#f4f2ef; border-radius:2px; box-shadow:0 2px 8px rgba(0,0,0,.12); transition:transform .18s ease, box-shadow .18s ease; }
.boopy-bookshelf__cover img { display:block; width:100%; height:100%; object-fit:contain; object-position:center; }
.boopy-bookshelf__card:hover .boopy-bookshelf__cover { transform:translateY(-3px); box-shadow:0 7px 18px rgba(0,0,0,.16); }
.boopy-bookshelf__title { display:block; margin-top:10px; color:#222; font-size:13px; font-weight:600; line-height:1.55; overflow-wrap:anywhere; }
.boopy-bookshelf__author { display:block; margin-top:3px; color:#666; font-size:12px; line-height:1.5; overflow-wrap:anywhere; }
.boopy-bookshelf__categories { display:flex; flex-wrap:wrap; gap:4px; margin-top:7px; }
.boopy-bookshelf__category { display:inline-block; padding:2px 7px; border-radius:3px; color:var(--boopy-category-color, #666); border:1px solid var(--boopy-category-color, #ddd); background:color-mix(in srgb, var(--boopy-category-color, #ddd) 10%, white); font-size:10px; line-height:1.5; overflow-wrap:anywhere; }
.boopy-bookshelf__article-title { display:block; position:relative; margin-top:10px; padding:8px 9px; border-radius:8px; background:#f5f2ec; color:#65584c; font-size:11px; line-height:1.6; overflow-wrap:anywhere; }
.boopy-bookshelf__article-title:before { content:""; position:absolute; top:-5px; left:14px; width:10px; height:10px; background:#f5f2ec; transform:rotate(45deg); }
.boopy-bookshelf__noimage { display:flex; width:100%; height:100%; padding:12px; flex-direction:column; justify-content:center; align-items:center; gap:0; background:linear-gradient(145deg,#f7f4ef,#e8e1d7); color:#5d554b; text-align:center; }
.boopy-bookshelf__noimage-title { font-family:serif; font-size:clamp(12px,1.5vw,18px); line-height:1.5; overflow-wrap:anywhere; }
.boopy-bookshelf__empty, .boopy-bookshelf__no-results { padding:18px; color:#666; background:#f7f7f7; }
.boopy-bookshelf__more-wrap { margin:30px 0 10px; text-align:center; }
.boopy-bookshelf__more { min-width:180px; padding:12px 24px; border:1px solid #bbb; border-radius:4px; background:#fff; color:#333; font-size:14px; cursor:pointer; }
.boopy-bookshelf__more:hover { background:#f7f7f7; }
.boopy-bookshelf__more-wrap[hidden] { display:none !important; }
.boopy-bookshelf a:focus-visible, .boopy-bookshelf__search:focus-visible, .boopy-bookshelf__sort:focus-visible, .boopy-bookshelf__more:focus-visible { outline:2px solid #315eea; outline-offset:3px; }
@media (max-width: 900px) { .boopy-bookshelf__grid { grid-template-columns:repeat(3,minmax(0,1fr)); gap:25px 16px; } }
@media (max-width: 600px) { .boopy-bookshelf { --boopy-gap:12px; } .boopy-bookshelf__tools { gap:8px; margin-bottom:18px; } .boopy-bookshelf__search { flex-basis:100%; max-width:none; } .boopy-bookshelf__grid { grid-template-columns:repeat(2,minmax(0,1fr)); gap:24px 14px; } .boopy-bookshelf__title { font-size:12px; } .boopy-bookshelf__author { font-size:11px; } }
