/* ==========================================================================
   Komplet „Finansijsko izvještavanje“ — interaktivna polica od 5 tomova (17.10.2026.)
   3D knjige čistim CSS-om (naslovna + hrbat + dubina), detaljni prikaz u dijalogu.
   ========================================================================== */

.shelf-sec { overflow: hidden; }
.shelf-wrap { position: relative; }
.shelf-hint { text-align: center; font: 500 12px/1.4 var(--f-mono); letter-spacing: .16em; text-transform: uppercase; color: var(--muted); margin: 0 0 clamp(14px, 2.4vw, 30px); }
.shelf-hint__m { display: none; }

.shelf {
  --h: clamp(205px, 27.5vw, 400px);      /* visina knjige */
  --w: calc(var(--h) * .49);            /* širina naslovne (omjer sa korica) */
  --d: calc(var(--h) * .16);            /* debljina = širina hrbta sa slike */
  --gap: clamp(8px, 1.8vw, 28px);
  list-style: none; margin: 0; padding: 34px 0 0;
  display: flex; justify-content: center; align-items: flex-start; gap: var(--gap);
}
.vol { position: relative; flex: 0 0 auto; }

/* daska police (po jedan komad ispod svake knjige, spojeni u cjelinu) */
.vol::before {
  content: ""; position: absolute; z-index: 0; top: calc(var(--h) + 2px); height: 15px;
  left: calc(var(--gap) / -2 - 1px); right: calc(var(--gap) / -2 - 1px);
  background: linear-gradient(#3a3029, #1b1613 70%, #0e0c0b); border-top: 1px solid rgba(237, 230, 218, .2); border-radius: 1px;
  box-shadow: 0 26px 40px -14px rgba(0, 0, 0, .95);
}
.vol:first-child::before { left: -10vw; }
.vol:last-child::before { right: -10vw; }

.vol__btn {
  position: relative; z-index: 1; display: block; padding: 0 0 18px; background: none; border: 0; color: inherit; font: inherit;
  cursor: pointer; text-align: center; -webkit-tap-highlight-color: transparent; transition: opacity .4s var(--ease), filter .4s var(--ease);
}
.vol__btn:focus-visible { outline: 2px solid var(--ember-text); outline-offset: 6px; border-radius: 4px; }

.vol__scene { position: relative; display: block; width: calc(var(--w) * 1.16); height: var(--h); perspective: 1700px; margin-inline: auto; }
.vol__book {
  position: absolute; top: 0; left: calc((100% - var(--w)) / 2); width: var(--w); height: var(--h);
  transform-style: preserve-3d; transform: rotateY(var(--ry, 30deg)); transition: transform .75s var(--ease); will-change: transform;
}
.vol__face { position: absolute; display: block; backface-visibility: hidden; }
.vol__face img { display: block; width: 100%; height: 100%; }
.vol__front { inset: 0; transform: translateZ(calc(var(--d) / 2)); box-shadow: inset 0 0 0 1px rgba(0, 0, 0, .35); }
.vol__front::after {          /* utor uz hrbat + odsjaj svjetla */
  content: ""; position: absolute; inset: 0; pointer-events: none; transition: opacity .6s var(--ease);
  background: linear-gradient(90deg, rgba(0, 0, 0, .36) 0, rgba(0, 0, 0, 0) 4.5%, rgba(255, 255, 255, .07) 6%, rgba(0, 0, 0, 0) 8.5%),
              linear-gradient(115deg, rgba(255, 255, 255, .15), rgba(255, 255, 255, 0) 40%, rgba(0, 0, 0, .2));
}
.vol__spine { top: 0; height: 100%; width: var(--d); left: calc((var(--w) - var(--d)) / 2); transform: rotateY(-90deg) translateZ(calc(var(--w) / 2)); }
.vol__spine::after { content: ""; position: absolute; inset: 0; pointer-events: none; background: linear-gradient(90deg, rgba(0, 0, 0, .4), rgba(0, 0, 0, 0) 28%, rgba(255, 255, 255, .05) 55%, rgba(0, 0, 0, .3)); }
.vol__side { top: 1.4%; height: 97.2%; width: var(--d); left: calc((var(--w) - var(--d)) / 2); transform: rotateY(90deg) translateZ(calc(var(--w) / 2 - 3px)); background: repeating-linear-gradient(0deg, #f1e8d4 0 1px, #cdbfa4 1px 2px); }
.vol__back { inset: 0; transform: rotateY(180deg) translateZ(calc(var(--d) / 2)); background: var(--c); }
.vol__shadow {
  position: absolute; left: 6%; right: -4%; bottom: -5px; height: 22px; z-index: -1; pointer-events: none;
  background: radial-gradient(closest-side, rgba(0, 0, 0, .7), rgba(0, 0, 0, 0)); filter: blur(5px);
  transition: transform .75s var(--ease), opacity .75s var(--ease);
}

.vol__label { display: block; margin: 24px auto 0; max-width: calc(var(--w) * 1.25); font: 400 13px/1.4 var(--f-body); color: var(--muted); transition: color .3s; }
.vol__label b { display: block; margin-bottom: 8px; font: 500 12px/1 var(--f-mono); letter-spacing: .2em; color: var(--ember-text); }

/* naglašavanje: podizanje + okret prema gledaocu; ostali tomovi se priguše */
.vol__btn:focus-visible .vol__book { transform: translate3d(0, -16px, 40px) rotateY(12deg) scale(1.035); }
.vol__btn:focus-visible .vol__shadow { transform: scale(.9) translateY(4px); opacity: .65; }
.vol__btn:focus-visible .vol__label { color: var(--text); }
@media (hover: hover) {
  .vol__btn:hover .vol__book { transform: translate3d(0, -16px, 40px) rotateY(12deg) scale(1.035); }
  .vol__btn:hover .vol__shadow { transform: scale(.9) translateY(4px); opacity: .65; }
  .vol__btn:hover .vol__label { color: var(--text); }
  .shelf:hover .vol__btn:not(:hover):not(:focus-visible) { opacity: .6; filter: saturate(.8); }
}
.vol__btn:active .vol__book { transform: translate3d(0, -8px, 20px) rotateY(18deg) scale(1.02); }

/* ---------------- mobitel/tablet: polica se horizontalno pomiče, svih 5 dostupno ---------------- */
/* tekst „pređite mišem“ samo gdje postoji hover; na dodirnim uređajima „dodirnite“ */
@media (hover: none), (max-width: 760px) { .shelf-hint__d { display: none; } .shelf-hint__m { display: inline; } }
@media (max-width: 760px) {
  .shelf {
    --h: 300px; --gap: 14px; justify-content: flex-start; overflow-x: auto; scroll-snap-type: x mandatory; overscroll-behavior-x: contain;
    margin-inline: calc(var(--gutter) * -1); padding: 34px var(--gutter) 6px; scroll-padding-inline: var(--gutter); scrollbar-width: none;
  }
  .shelf::-webkit-scrollbar { display: none; }
  .vol { scroll-snap-align: center; }
  .vol:first-child::before { left: calc(var(--gutter) * -1); }
  .vol:last-child::before { right: calc(var(--gutter) * -1); }
}

/* ---------------- detaljni prikaz ---------------- */
.vd { position: fixed; inset: 0; z-index: 300; display: grid; place-items: center; padding: clamp(10px, 3vw, 40px); }
.vd[hidden] { display: none; }
.vd__backdrop { position: absolute; inset: 0; background: rgba(8, 7, 6, .84); -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px); opacity: 0; transition: opacity .35s ease; }
.vd.is-open .vd__backdrop { opacity: 1; }
.vd__panel {
  position: relative; width: min(1080px, 100%); max-height: 100%; overflow: auto; overscroll-behavior: contain;
  display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, .95fr); gap: clamp(20px, 4vw, 56px); align-items: center;
  padding: clamp(60px, 6vw, 76px) clamp(20px, 4vw, 56px) clamp(26px, 4vw, 50px);
  background: radial-gradient(75% 70% at 28% 42%, var(--vglow, rgba(196, 36, 48, .18)), transparent 72%), var(--bg-2);
  border: 1px solid var(--rule-2); border-radius: 10px; box-shadow: 0 40px 100px -30px rgba(0, 0, 0, .9);
  opacity: 0; transform: translateY(22px) scale(.985); transition: opacity .4s var(--ease), transform .55s var(--ease), background .5s;
}
.vd.is-open .vd__panel { opacity: 1; transform: none; }
.vd__back {
  position: absolute; top: 16px; left: clamp(16px, 3vw, 32px); display: inline-flex; gap: 10px; align-items: center; padding: 11px 16px 11px 12px;
  background: rgba(237, 230, 218, .05); border: 1px solid var(--rule-2); border-radius: 999px; color: var(--text); cursor: pointer;
  font: 500 12px/1 var(--f-mono); letter-spacing: .14em; text-transform: uppercase; transition: background-color .2s, border-color .2s;
}
.vd__back:hover { background: rgba(237, 230, 218, .1); border-color: var(--ember); }
.vd__art {
  --h: min(56vh, 520px); --w: calc(var(--h) * .49); --d: calc(var(--h) * .16); --ry: 26deg;
  display: grid; place-items: center; min-height: 0; padding: 18px 0 30px; transition: opacity .22s ease, transform .22s ease;
}
.vd__art .vol__scene { width: calc(var(--w) * 1.35); }
.vd__art .vol__book { transition: transform .5s var(--ease); }
.vd__art.is-swap { opacity: 0; transform: translateY(8px); }
.vd__body { min-width: 0; }
.vd__title { font: 360 clamp(2rem, 3.6vw, 3.1rem)/1.04 var(--f-display); letter-spacing: -.02em; margin: 14px 0 10px; }
.vd__sub { font: italic 360 clamp(1.15rem, 1.8vw, 1.5rem)/1.3 var(--f-display); color: var(--text-2); margin: 0 0 6px; }
.vd__orig { margin: 0 0 4px; font: 400 13px/1.5 var(--f-mono); color: var(--muted); }
.vd__meta { margin: 26px 0 0; border-top: 1px solid var(--rule); }
.vd__meta > div { display: grid; grid-template-columns: 110px 1fr; gap: 14px; padding: 13px 0; border-bottom: 1px solid var(--rule); }
.vd__meta dt { font: 500 11px/1.6 var(--f-mono); letter-spacing: .16em; text-transform: uppercase; color: var(--ember-text); }
.vd__meta dd { margin: 0; color: var(--text-2); }
.chip-soon { display: inline-block; padding: 6px 12px; border: 1px solid var(--ember); border-radius: 999px; color: var(--ember-text); font: 500 11px/1 var(--f-mono); letter-spacing: .16em; text-transform: uppercase; }
.vd__note { margin: 16px 0 0; color: var(--muted); font-size: 14px; }
.vd__dots { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 24px; }
.vd__dots button {
  min-width: 46px; height: 46px; padding: 0 12px; border: 1px solid var(--rule-2); border-radius: 999px; background: transparent; color: var(--text-2); cursor: pointer;
  font: 500 13px/1 var(--f-display); transition: background-color .2s, border-color .2s, color .2s;
}
.vd__dots button:hover { border-color: var(--text-2); color: var(--text); }
.vd__dots button[aria-current="true"] { background: var(--ember); border-color: var(--ember); color: #fff; }
.vd__arrows { display: flex; gap: 8px; margin-top: 14px; }
.vd__arrows button { width: 46px; height: 46px; border: 1px solid var(--rule-2); border-radius: 50%; background: transparent; color: var(--text); font-size: 18px; cursor: pointer; transition: border-color .2s, background-color .2s; }
.vd__arrows button:hover { border-color: var(--ember); background: rgba(237, 230, 218, .06); }
.vd button:focus-visible, .vd a:focus-visible { outline: 2px solid var(--ember-text); outline-offset: 3px; }
@media (max-width: 760px) {
  .vd__panel { grid-template-columns: 1fr; gap: 6px; padding-top: 66px; }
  .vd__art { --h: min(38vh, 330px); padding: 6px 0 22px; }
  .vd__meta > div { grid-template-columns: 90px 1fr; }
}

.shelf-cta { margin: clamp(10px, 2vw, 24px) 0 0; text-align: center; }

/* ---------------- sekcija „komplet u kutiji“ ---------------- */
.kit { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr); gap: clamp(28px, 5vw, 72px); align-items: center; }
.kit__img { margin: 0; border-radius: 8px; overflow: hidden; box-shadow: 0 30px 70px -30px rgba(0, 0, 0, .9), 0 0 0 1px var(--rule); }
.kit__img img { display: block; width: 100%; height: auto; }
.kit__nums { display: flex; flex-wrap: wrap; gap: 10px; margin: 22px 0 0; padding: 0; list-style: none; }
.kit__nums li { padding: 8px 14px; border: 1px solid var(--rule-2); border-radius: 999px; font: 500 12px/1 var(--f-mono); letter-spacing: .12em; color: var(--text-2); }
@media (max-width: 900px) { .kit { grid-template-columns: 1fr; } }

/* ---------------- smanjeni pokreti ---------------- */
@media (prefers-reduced-motion: reduce) {
  .vol__book, .vol__shadow, .vol__btn, .vd__panel, .vd__backdrop, .vd__art, .vd__art .vol__book { transition: none !important; }
  .vol__btn:hover .vol__book, .vol__btn:focus-visible .vol__book, .vol__btn:active .vol__book { transform: rotateY(var(--ry, 30deg)); }
  .vol__btn:hover .vol__front, .vol__btn:focus-visible .vol__front { filter: brightness(1.12); }
  .vd__panel { transform: none; }
}
