/* Osnova: reset, tipografija, linkovi, fokus, kontejner, pristupačnost. */

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  /* Sidra (#izdvojeno, #ruo…) staju tačno ispod lepljivog headera, kao u dizajnu */
  scroll-padding-top: var(--header-height);
}

body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-text);
  font-size: var(--fs-body);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

main {
  flex: 1 0 auto;
}

img,
svg {
  display: block;
  max-width: 100%;
}

button,
input,
select,
textarea {
  font: inherit;
  color: inherit;
}

button {
  cursor: pointer;
}

h1, h2, h3, h4, p, ul, ol, figure, blockquote {
  margin: 0;
}

/* :where() — nulta jačina, da klase komponenti mogu da daju svoj padding listi */
:where(ul[role="list"], ol[role="list"]) {
  list-style: none;
  padding: 0;
}

/* Linkovi */
a {
  color: var(--text);
  text-decoration: none;
  transition: color var(--dur-base) var(--ease);
}

a:hover {
  color: var(--accent-hover);
}

a[aria-current="page"] {
  color: var(--accent);
}

/* Fokus: 2 px narandžasto, vidljivo samo sa tastature */
:focus {
  outline: none;
}

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

/* Kontejneri koje fokusira samo skripta (panel modala, glavni sadržaj) — bez okvira; nisu na putu tastera Tab */
[tabindex="-1"]:focus-visible {
  outline: none;
}

::selection {
  background: var(--accent);
  color: var(--on-accent);
}

/* Linijske ikonice (Lucide stil) */
.icon {
  flex-shrink: 0;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.5;
  stroke-linecap: round;
  stroke-linejoin: round;
}

/* Kontejner: širina sadržaja 1344 px, bočni razmak clamp(16px, 4vw, 32px) */
.container {
  width: 100%;
  max-width: var(--content-max);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

/* Tipografija — naslovi Archivo 800, verzal */
.display,
.h1,
.h2,
.card-title {
  font-family: var(--font-display);
  font-weight: 800;
  text-transform: uppercase;
}

.display {
  font-size: var(--fs-hero);
  font-stretch: var(--stretch-hero);
  line-height: 0.95;
}

.h1 {
  font-size: var(--fs-h1);
  font-stretch: var(--stretch-h1);
  line-height: 1;
}

.h2 {
  font-size: var(--fs-h2);
  font-stretch: var(--stretch-h2);
  line-height: 1.1;
}

.h3 {
  font-family: var(--font-display);
  font-size: var(--fs-h3);
  font-stretch: var(--stretch-h3);
  font-weight: 700;
  line-height: 1.25;
}

.card-title {
  font-size: var(--fs-card);
  font-stretch: var(--stretch-card);
  line-height: 1.2;
}

.text-small {
  font-size: var(--fs-small);
  line-height: 1.5;
}

.text-xs {
  font-size: var(--fs-xs);
  line-height: 1.5;
}

.text-muted {
  color: var(--muted);
}

.label {
  font-size: var(--fs-label);
  font-weight: 600;
  line-height: 1.5;
  letter-spacing: var(--tracking-label);
  text-transform: uppercase;
  color: var(--muted);
}

/* Cene i brojevi: Inter 600, tabelarne cifre */
.price,
.nums {
  font-variant-numeric: tabular-nums;
}

.price {
  font-weight: 600;
  white-space: nowrap;
}

.price--sale {
  color: var(--accent);
}

.price--old {
  font-weight: 400;
  color: var(--muted);
  text-decoration: line-through;
}

/* Samo za čitače ekrana */
.visually-hidden {
  position: absolute !important;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

/* Link „Preskoči na sadržaj” — vidljiv tek na fokus */
.skip-link {
  position: absolute;
  top: 8px;
  left: 8px;
  z-index: 100;
  padding: 10px 16px;
  background: var(--accent);
  color: var(--on-accent);
  border-radius: var(--radius);
  font-weight: 600;
  transform: translateY(-200%);
}

.skip-link:focus-visible {
  transform: none;
  color: var(--on-accent);
}

[hidden] {
  display: none !important;
}

/* Tekst ili element samo za desktop / samo za telefon (gde se mobilni dizajn razlikuje) */
@media (max-width: 640px) {
  .only-desktop {
    display: none !important;
  }
}

@media (min-width: 641px) {
  .only-mobile {
    display: none !important;
  }
}

/* Bez animacija kad korisnik to traži */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    scroll-behavior: auto !important;
  }
}
