/* =====================================================================
   Efekti (js/efekti.js) – sve stranice
   ===================================================================== */

/* ===== Prelazi između stranica (pregledači koji podržavaju View Transitions):
   stara stranica se blago povuče i potamni, nova izroni ===== */
@view-transition { navigation: auto; }
::view-transition-old(root) { animation: vtOut .35s cubic-bezier(.4,0,1,1) both; }
::view-transition-new(root) { animation: vtIn .55s cubic-bezier(.2,.7,.2,1) .05s both; }
@keyframes vtOut { to { opacity: 0; transform: scale(.985); filter: brightness(.6) blur(2px); } }
@keyframes vtIn { from { opacity: 0; transform: translateY(14px); filter: blur(3px); } }
@media (prefers-reduced-motion: reduce) { ::view-transition-old(root), ::view-transition-new(root) { animation: none; } }

/* ===== Naginjanje kartica + zlatni odsjaj ===== */
.pp-grid { perspective: 1200px; }
a.pp-card { position: relative; transform-style: preserve-3d; }
a.pp-card.is-tilt {
  transform: translateY(-6px) rotateX(var(--rx, 0)) rotateY(var(--ry, 0));
  transition: transform .12s linear, border-color .35s, box-shadow .35s;
}
a.pp-card::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 3;
  border-radius: inherit;
  pointer-events: none;
  background: radial-gradient(circle 220px at var(--mx, 50%) var(--my, 50%), rgba(255,230,160,.22), rgba(255,230,160,0) 70%);
  opacity: 0;
  transition: opacity .3s;
}
a.pp-card.is-tilt::after { opacity: 1; }


/* ===== Zlatni kursor ===== */
.cur-ring, .cur-dot { position: fixed; left: 0; top: 0; z-index: 3000; pointer-events: none; opacity: 0; transition: opacity .3s; }
.cur-on .cur-ring, .cur-on .cur-dot { opacity: 1; }
/* krunica iz favicona umesto tačke */
.cur-dot { width: 18px; height: 14px; margin: -8px 0 0 -9px; background: url("../slike/kursor-kruna.png") center / contain no-repeat; filter: drop-shadow(0 0 3px rgba(241,210,131,.9)) drop-shadow(0 1px 2px rgba(0,0,0,.8)); }
.cur-ring::before {
  content: "";
  position: absolute;
  left: -17px;
  top: -17px;
  width: 34px;
  height: 34px;
  border: 1.5px solid rgba(241,210,131,.75);
  border-radius: 50%;
  transition: transform .3s cubic-bezier(.2,.8,.2,1), background .3s, border-color .3s;
}
.cur-ring.is-hot::before { transform: scale(1.7); background: rgba(241,210,131,.12); border-color: #f1d283; }
.cur-ring.is-text::before { transform: scale(.55); }
.cur-ring.is-down::before { transform: scale(.8); }
/* sistemska strelica se nigde ne prikazuje */
html.cur-custom, html.cur-custom * { cursor: none !important; }
.cur-ring.is-grab::before { transform: scale(1.35); border-style: dashed; background: rgba(241,210,131,.08); }

/* ===== Paralaksa slajdera proizvoda (js/efekti.js postavlja --px, --py, --sy) ===== */
.pd-slide__media img { translate: calc(var(--px, 0) * -26px) calc(var(--py, 0) * -18px + var(--sy, 0) * .25px); }
.pd-slide__content { translate: calc(var(--px, 0) * 10px) calc(var(--py, 0) * 8px); }
@media (max-width: 760px) { .pd-slide__media img, .pd-slide__content { translate: none; } }
/* rezerva oko slike da pomeranje ne otkrije ivicu */
@media (min-width: 761px) { .pd-slide.is-active .pd-slide__media img { transform: scale(1.06); } .pd-slide__media img { transform: scale(1.1); } }
