/* Zavirite u našu policu: calm editorial mosaic, independent of the catalogue cards. */
.shelf { padding-top: clamp(50px, 7vw, 96px); padding-bottom: clamp(36px, 4.5vw, 66px); }
/* Keep the shelf-to-next-section transition balanced without changing other sections. */
.shelf + .section { padding-top: clamp(38px, 5vw, 72px); }
.shelf__heading { display: flex; align-items: end; justify-content: space-between; gap: 24px; margin-bottom: 28px; }
.shelf__heading .eyebrow { color: var(--accent); margin-bottom: 10px; }
.shelf__heading h2 { font: 400 clamp(34px, 4vw, 52px)/1.08 var(--font-display); margin: 0; letter-spacing: -.025em; }
.shelf__intro { color: var(--muted); margin: 13px 0 0; max-width: 58ch; font-size: 15px; line-height: 1.7; text-align: left; }
.shelf__refresh { display: inline-flex; gap: 10px; align-items: center; justify-content: center; flex: none; border: 1px solid var(--accent); background: transparent; color: var(--accent); border-radius: 100px; padding: 11px 20px; font: 600 13px/1.3 var(--font-body); cursor: pointer; min-height: 44px; }
.shelf__refresh:hover { background: var(--accent); color: #fff; }
.shelf__refresh:focus-visible, .shelf__tile:focus-visible { outline: 3px solid var(--accent); outline-offset: 4px; }
.shelf__refresh span { font-size: 23px; font-weight: 400; line-height: 0.7; }
.shelf__grid { display: grid; grid-template-columns: 1.06fr 1fr 1fr; grid-template-rows: repeat(4, minmax(116px, 1fr)); gap: 13px; min-height: 540px; }
.shelf__tile { position: relative; display: flex; flex-direction: column; min-width: 0; min-height: 0; overflow: hidden; padding: clamp(14px, 1.7vw, 23px); color: var(--ink); text-decoration: none; border: 1px solid rgba(45, 55, 46, .08); background: var(--surface-sand); border-radius: 2px; isolation: isolate; transition: transform .18s ease, box-shadow .18s ease; }
.shelf__tile:hover { transform: translateY(-3px); box-shadow: 0 8px 22px rgba(39, 61, 52, .10); }
.shelf__tile:nth-child(1) { grid-column: 1; grid-row: 1 / span 3; }
.shelf__tile:nth-child(2) { grid-column: 2; grid-row: 1 / span 2; }
.shelf__tile:nth-child(3) { grid-column: 3; grid-row: 1; }
.shelf__tile:nth-child(4) { grid-column: 3; grid-row: 2; }
.shelf__tile:nth-child(5) { grid-column: 2; grid-row: 3; }
.shelf__tile:nth-child(6) { grid-column: 3; grid-row: 3 / span 2; }
.shelf__tile:nth-child(7) { grid-column: 2; grid-row: 4; }
.shelf__tile:nth-child(8) { grid-column: 1; grid-row: 4; }
.shelf__tile--cover { background: #e7e5db; }
.shelf__tile--title { background: #e5e9df; }
.shelf__tile--topic { background: #bbc6ae; color: #273d34; }
.shelf__tile:nth-child(4).shelf__tile--cover { background: #ece0d7; }
.shelf__tile:nth-child(8).shelf__tile--title { background: #dbc5be; color: #4b302a; }
.shelf__meta { position: relative; z-index: 1; display: block; padding-right: 24px; color: inherit; opacity: .72; font: 600 10px/1.5 var(--font-body); letter-spacing: .12em; text-transform: uppercase; }
.shelf__title { position: relative; z-index: 1; display: -webkit-box; overflow: hidden; -webkit-box-orient: vertical; -webkit-line-clamp: 3; line-clamp: 3; margin-top: auto; margin-bottom: 5px; font: 400 clamp(19px, 2.05vw, 30px)/1.18 var(--font-display); letter-spacing: -.018em; overflow-wrap: anywhere; text-align: left; }
.shelf__byline { position: relative; z-index: 1; display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; line-clamp: 2; overflow: hidden; padding-right: 24px; color: inherit; opacity: .72; font: 12px/1.45 var(--font-body); text-align: left; }
.shelf__tile:nth-child(2) .shelf__title { font-size: clamp(25px, 2.75vw, 39px); -webkit-line-clamp: 4; line-clamp: 4; }
.shelf__tile--topic .shelf__title { font-size: clamp(19px, 2.1vw, 28px); }
.shelf__arrow { position: absolute; z-index: 2; right: 15px; top: 12px; font-size: 16px; line-height: 1; opacity: .72; }
.shelf__tile--cover .shelf__cover { display: flex; flex: 1 1 auto; align-items: center; justify-content: center; min-height: 0; margin: 9px 0; }
.shelf__cover img { display: block; max-width: 74%; max-height: 100%; width: auto; height: auto; object-fit: contain; filter: drop-shadow(2px 6px 7px rgba(26, 39, 30, .22)); }
.shelf__caption { z-index: 1; position: relative; display: -webkit-box; overflow: hidden; -webkit-box-orient: vertical; -webkit-line-clamp: 2; line-clamp: 2; font: 500 15px/1.35 var(--font-display); padding-right: 25px; overflow-wrap: anywhere; text-align: left; }
.shelf__tile:nth-child(1) .shelf__cover img { max-width: 84%; }
.shelf__tile:nth-child(4) .shelf__cover { position: absolute; inset: 18px 14px 8px auto; width: 34%; margin: 0; }
.shelf__tile:nth-child(4) .shelf__cover img { max-width: 100%; }
.shelf__tile:nth-child(4) .shelf__caption { width: 60%; margin-top: auto; font-size: 13px; }
.shelf__tile:nth-child(6) .shelf__cover img { max-width: 65%; }
@media (max-width: 980px) {
    .shelf__grid { grid-template-columns: repeat(2, minmax(0, 1fr)); grid-template-rows: repeat(4, 125px); min-height: 0; }
    .shelf__tile:nth-child(1) { grid-column: 1; grid-row: 1 / span 2; }
    .shelf__tile:nth-child(2) { grid-column: 2; grid-row: 1 / span 2; }
    .shelf__tile:nth-child(3) { grid-column: 1; grid-row: 3; }
    .shelf__tile:nth-child(4) { grid-column: 2; grid-row: 3; }
    .shelf__tile:nth-child(5) { grid-column: 1; grid-row: 4; }
    .shelf__tile:nth-child(6) { grid-column: 2; grid-row: 4; }
    .shelf__tile:nth-child(n+7) { display: none; }
    .shelf__tile:nth-child(6).shelf__tile--cover .shelf__cover { position: absolute; inset: 18px 14px 8px auto; width: 34%; margin: 0; }
    .shelf__tile:nth-child(6).shelf__tile--cover .shelf__cover img { max-width: 100%; }
    .shelf__tile:nth-child(6).shelf__tile--cover .shelf__caption { width: 60%; margin-top: auto; font-size: 13px; }
}
@media (max-width: 620px) {
    .shelf__heading { align-items: flex-start; flex-direction: column; margin-bottom: 22px; }
    .shelf__heading h2 { font-size: clamp(30px, 8.3vw, 40px); }
    .shelf__intro { font-size: 14px; margin-top: 9px; }
    .shelf__refresh { padding: 9px 16px; }
    .shelf__grid { gap: 9px; grid-template-rows: repeat(3, minmax(118px, auto)); }
    .shelf__tile { padding: 13px; }
    .shelf__tile:nth-child(1) { grid-column: 1; grid-row: 1 / span 2; }
    .shelf__tile:nth-child(2) { grid-column: 2; grid-row: 1; }
    .shelf__tile:nth-child(3) { grid-column: 2; grid-row: 2; }
    .shelf__tile:nth-child(4) { grid-column: 1; grid-row: 3; }
    .shelf__tile:nth-child(5) { grid-column: 2; grid-row: 3; }
    .shelf__tile:nth-child(n+6) { display: none; }
    .shelf__title, .shelf__tile:nth-child(2) .shelf__title, .shelf__tile--topic .shelf__title { font-size: clamp(16px, 4vw, 21px); -webkit-line-clamp: 3; line-clamp: 3; }
    .shelf__byline { font-size: 11px; -webkit-line-clamp: 1; line-clamp: 1; }
    .shelf__meta { font-size: 9px; letter-spacing: .06em; }
    .shelf__tile:nth-child(4) .shelf__cover { width: 29%; }
    .shelf__tile:nth-child(4) .shelf__caption { width: 65%; font-size: 12px; }
    .shelf__caption { font-size: 12px; }
}
@media (prefers-reduced-motion: reduce) {
    .shelf__tile { transition: none; }
    .shelf__tile:hover { transform: none; }
}
