/* ===========================
   GORNJA NAVIGACIJSKA TRAKA
   (HEADER + NAV + IKONICE)
   =========================== */

/* HEADER – sticky traka gore */
.header {
  background: #f6f3f1; /* var(--card) iz glavnog :root-a */
  border-bottom: 1px solid rgba(0,0,0,.03);
  position: sticky;
  top: 0;
  z-index: 50;

  display: flex;
  align-items: center;
  justify-content: space-between;

  padding: 0.6rem 1.5rem 0.6rem 1.25rem;
}

/* Krug s inicijalom (profil gore desno) */
.profile-fixed {
  width: 34px;
  height: 34px;
  border-radius: 999px;
  background: #e6d0c8;
  display: grid;
  place-items: center;
  font-weight: 600;
  color: #3a2727;
  cursor: pointer;
}

/* Glavna navigacija unutar headera */
.nav {
  flex: 1;
  display: flex;
  align-items: center;
  gap: 3rem;
  padding: 0;
  flex-wrap: wrap;
}

/* Pomoćni razmak ako ti bude trebao */
.spacer {
  display: none;
}

/* Desni dio headera (social, košarica, narudžbe, profil...) */
.nav-right {
  margin-left: auto;
  display: flex;
  gap: .4rem;
  align-items: center;
}

/* SOCIAL IKONICE DESNO GORE */
.social-icons {
  display: flex;
  align-items: center;
  gap: .35rem;
  margin-right: .6rem;
}

.social-icons a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
}

.social-icons img {
  width: 34px;
  height: 34px;
  display: block;
  border-radius: 999px;
}

/* BUM gumb (🌸 meni) – lijevo u headeru */
.menu-trigger {
  border: none;
  background: linear-gradient(135deg, #ffe3df, #f7c1b8);
  width: 44px;
  height: 36px;
  border-radius: 999px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  cursor: pointer;
  box-shadow: 0 6px 16px rgba(0,0,0,0.16);
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.menu-trigger:hover {
  transform: translateY(-1px);
  box-shadow: 0 9px 24px rgba(0,0,0,0.2);
  background: linear-gradient(135deg, #ffd7d0, #f5a99b);
}

.menu-orb {
  font-size: 18px;
}

.menu-lines {
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.menu-lines span {
  display: block;
  width: 9px;
  height: 2px;
  border-radius: 999px;
  background: #8a3c3c;
}

/* KOŠARICA – ikona gore desno */
.cart-btn {
  width: 34px;
  height: 34px;
  border-radius: 999px;
  border: none;
  background: #ffffff;
  box-shadow: 0 4px 12px rgba(0,0,0,0.15);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  cursor: pointer;
  text-decoration: none;
  color: inherit;
  transition: transform 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;

  /* da bedž za broj artikala ima sidro */
  position: relative;
}

.cart-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 7px 18px rgba(0,0,0,0.22);
  background: #ffece6;
}

/* === Badge za broj artikala u košarici === */
.cart-count-badge {
  position: absolute;
  top: -6px;
  right: -6px;
  min-width: 18px;
  height: 18px;
  padding: 0 4px;
  border-radius: 999px;
  background: #e53935;
  color: #fff;
  font-size: 11px;
  font-weight: 700;
  display: none;           /* cart-counter.js ga pali/gasi */
  align-items: center;
  justify-content: center;
  box-shadow: 0 0 0 2px #fff;
}

/* ===========================
   GUMB ZA NARUDŽBE + BADGE
   =========================== */

.orders-btn img {
  width: 28px;
  height: 28px;
  object-fit: contain;
  margin: 0 6px;
  opacity: 0.9;
  transition: 0.2s ease;
}

.orders-btn:hover img {
  opacity: 1;
  transform: scale(1.08);
}

/* Badgeovi – kupac + admin (gore u headeru) */
.orders-btn,
.admin-orders-link {
  position: relative;
}

/* po defaultu NE prikazuj badge */
.orders-badge,
.admin-orders-badge {
  position: absolute;
  top: -4px;
  right: -4px;
  width: 18px;
  height: 18px;
  border-radius: 999px;
  background: #e53935;
  color: #fff;
  font-size: 11px;
  display: none;
  align-items: center;
  justify-content: center;
  box-shadow: 0 0 0 2px #fff;
}

/* kad je aktivan – prikaži */
.orders-badge.active,
.admin-orders-badge.active {
  display: flex;
}

/* ===========================
   NAV PANEL (MOBILNI MENI)
   =========================== */

.nav-panel {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.12);
  backdrop-filter: blur(3px);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.22s ease;
  z-index: 60;
}

.nav-panel.open {
  opacity: 1;
  pointer-events: auto;
}

/* Bijela kutija menija – ispod gumba */
.nav-panel-inner {
  position: absolute;
  top: 4.5rem;                 /* odmah ispod headera */
  left: 1.25rem;               /* poravnato s 🌸 gumbom */

  background: #f6f3f1;         /* var(--card) */
  border-radius: 1rem;
  padding: 0.9rem 1.1rem 1rem;
  min-width: 220px;
  max-width: calc(100% - 2.5rem);
  box-shadow: 0 18px 45px rgba(0,0,0,0.28);

  transform: translateX(-18px);
  opacity: 0;
  transition: transform 0.22s ease, opacity 0.22s ease;
}

/* kada je panel otvoren, animiraj kutiju */
.nav-panel.open .nav-panel-inner {
  transform: translateX(0);
  opacity: 1;
}

.nav-panel-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: .6rem;
}

.nav-panel-title {
  font-weight: 700;
  font-size: 0.95rem;
  color: #3b2626;
}

.nav-panel-close {
  border: none;
  background: transparent;
  font-size: 1.1rem;
  cursor: pointer;
  line-height: 1;
  color: #aa7777;
}

.nav-panel-section {
  margin-top: .6rem;
}

.nav-panel-label {
  font-size: .75rem;
  text-transform: uppercase;
  letter-spacing: .08em;
  color: #777; /* var(--muted) */
  margin-bottom: .25rem;
}

.nav-panel-links {
  display: flex;
  flex-direction: column;
  gap: .35rem;
  margin-top: .2rem;
}

.nav-panel-links a {
  text-decoration: none;
  color: #513636;
  font-size: .9rem;
  padding: .25rem 0;
  border-radius: .4rem;
}

.nav-panel-links a:hover {
  background: #fbeaea;
}

/* ===========================
   RESPONSIVE ZA HEADER
   =========================== */

@media (max-width: 880px) {
  .nav {
    flex-wrap: wrap;
  }
}
