/* catalog-navbar-sync.css */
/* Navbar sync za /catalog stranice */

:root {
  --nav-height: 80px;
}

.navbar {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: var(--nav-height);
  background: rgba(255,255,255,0.96);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid rgba(0,0,0,0.05);
  z-index: 1030;
}

.navbar-container {
  max-width: 1536px;
  height: 100%;
  margin: 0 auto;
  padding: 0 1.25rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.navbar-logo {
  display: flex;
  align-items: center;
  text-decoration: none;
  flex-shrink: 0;
}

.navbar-logo img {
  height: 99px !important;
  width: auto !important;
  max-width: none !important;
  display: block;
}

.navbar-links {
  display: flex;
  list-style: none;
  gap: 1.6rem;
  align-items: center;
  margin: 0;
  padding: 0;
}

.navbar-link {
  position: relative;
  color: #111827 !important;
  font-weight: 500;
  font-size: 1rem;
  text-decoration: none;
  padding: 0.5rem 0;
  white-space: nowrap;
}

.navbar-link::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -2px;
  width: 0;
  height: 2px;
  background: #0D408C;
  transition: width .25s ease;
}

.navbar-link:hover,
.navbar-link.active {
  color: #0D408C !important;
}

.navbar-link:hover::after,
.navbar-link.active::after {
  width: 100%;
}

.navbar-actions {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex-shrink: 0;
}

.theme-toggle {
  position: relative;
  display: inline-block;
  width: 50px;
  height: 26px;
  cursor: pointer;
  margin-right: 0 !important;
}

.theme-toggle input {
  opacity: 0;
  width: 0;
  height: 0;
}

.theme-toggle-slider {
  position: absolute;
  inset: 0;
  background: #d1d5db;
  border-radius: 999px;
  transition: .25s ease;
}

.theme-toggle-slider::before {
  content: "";
  position: absolute;
  width: 20px;
  height: 20px;
  left: 3px;
  top: 3px;
  border-radius: 50%;
  background: #fff;
  transition: .25s ease;
}

.theme-toggle input:checked + .theme-toggle-slider {
  background: #2196F3;
}

.theme-toggle input:checked + .theme-toggle-slider::before {
  transform: translateX(24px);
}

.lang-selector {
  display: flex;
  gap: 0.40rem;
  align-items: center;
}

.lang-btn {
  width: 28px;
  height: 20px;
  border-radius: 3px;
  border: 1px solid rgba(0,0,0,0.08);
  background: transparent;
  color: transparent;
  font-size: 0;
  cursor: pointer;
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  flex-shrink: 0;
  box-shadow: 0 1px 2px rgba(0,0,0,0.08);
  transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease;
}

.lang-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 3px 8px rgba(0,0,0,0.12);
}

.lang-btn[data-lang="hr"] {
  background-image: url("../images/flags/hr.png");
}

.lang-btn[data-lang="en"] {
  background-image: url("../images/flags/en.png");
}

.lang-btn[data-lang="de"] {
  background-image: url("../images/flags/de.png");
}

.lang-btn.active {
  border-color: #0D408C;
  box-shadow: 0 0 0 1px #0D408C inset, 0 2px 6px rgba(13,64,140,0.18);
}

.menu-toggle {
  display: none;
  flex-direction: column;
  gap: 4px;
  background: none !important;
  border: none !important;
  padding: 0.5rem;
  cursor: pointer;
}

.menu-toggle span {
  display: block;
  width: 26px;
  height: 3px;
  background: #0D408C !important;
  border-radius: 999px;
  transition: .25s ease;
}

.menu-toggle.active span:nth-child(1) {
  transform: rotate(45deg) translate(5px, 5px);
}

.menu-toggle.active span:nth-child(2) {
  opacity: 0;
}

.menu-toggle.active span:nth-child(3) {
  transform: rotate(-45deg) translate(6px, -6px);
}

body {
  padding-top: 80px !important;
}

[data-theme="dark"] .navbar {
  background: rgba(17,24,39,0.94);
  border-bottom-color: rgba(255,255,255,0.08);
}

[data-theme="dark"] .navbar-link {
  color: #F9FAFB !important;
}

[data-theme="dark"] .navbar-link:hover,
[data-theme="dark"] .navbar-link.active {
  color: #60A5FA !important;
}

[data-theme="dark"] .menu-toggle span {
  background: #F9FAFB !important;
}

@media (max-width: 1180px) {
  .navbar-links {
    gap: 1.1rem;
  }

  .navbar-link {
    font-size: 0.95rem;
  }
}

@media (max-width: 980px) {
  .menu-toggle {
    display: flex !important;
  }

  .navbar-links {
    display: none;
    position: absolute;
    top: calc(100% + 8px);
    left: 12px;
    right: 12px;
    background: #ffffff;
    border: 1px solid #E5E7EB;
    border-radius: 16px;
    box-shadow: 0 18px 40px rgba(15,23,42,0.14);
    padding: 0.5rem 0;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    z-index: 1200;
  }

  .navbar-links.active {
    display: flex !important;
  }

  .navbar-links li {
    list-style: none;
  }

  .navbar-link {
    display: block;
    width: 100%;
    padding: 0.95rem 1rem;
  }

  .navbar-link::after {
    display: none;
  }

  [data-theme="dark"] .navbar-links {
    background: #1F2937;
    border-color: #374151;
  }
}

@media (max-width: 640px) {
  .navbar-container {
    padding: 0 0.75rem;
    gap: 0.4rem;
  }

  .navbar-logo img {
    height: 76px !important;
  }

  .lang-selector {
    gap: 0.22rem;
  }

  .lang-btn {
    width: 30px !important;
    height: 21px !important;
    border-radius: 0px;
    box-shadow: 0 1px 1px rgba(0,0,0,0.06);
  }

  .theme-toggle {
    width: 42px;
    height: 22px;
  }

  .theme-toggle-slider::before {
    width: 16px;
    height: 16px;
  }

  .theme-toggle input:checked + .theme-toggle-slider::before {
    transform: translateX(20px);
  }
}
