/* ===========================
   GORNJA NAVIGACIJSKA TRAKA
   (HEADER + NAV + IKONICE)
   =========================== */

/* Fail closed before Auth/modules load, including pages without admin.css.
   Display is not authorization; server claims/App Check still protect operations. */
html body .admin-only:not([data-admin-confirmed="true"]){display:none!important}
html body .admin-only[hidden]{display:none!important}
html body a.admin-only[data-admin-confirmed="true"]{display:inline-flex!important}

/* 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;
}

/* Glavna navigacija unutar headera */
.nav {
  flex: 1;
  display: flex;
  align-items: center;
  gap: 3rem;
  padding: 0;
  flex-wrap: wrap;
}

/* Desni dio headera (social, koÅ¡arica, narudÅ¾be, profil...) */
.nav-right {
  margin-left: auto;
  display: flex;
  gap: .5rem;
  align-items: center;
  position: relative;
}

/* ========= JEZIK + SOCIAL DROPDOWN ========== */
.nav-lang-wrapper,
.nav-social-wrapper {
  position: relative;
}

.nav-btn {
  border: none;
  background: linear-gradient(135deg, #ffffff, #f2e8e6);
  color: #4a2e2e;
  padding: 0.35rem 0.9rem;
  border-radius: 999px;
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.14);
  cursor: pointer;
  font-size: 0.9rem;
  font-weight: 600;
  letter-spacing: 0.01em;
  transition: transform 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  white-space: nowrap;
}

.nav-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 9px 22px rgba(0, 0, 0, 0.18);
  background: linear-gradient(135deg, #fff4f0, #f1e3e0);
}

.lang-menu,
.social-menu {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  min-width: 140px;
  background: #ffffff;
  border-radius: 14px;
  box-shadow: 0 16px 45px rgba(0, 0, 0, 0.18);
  padding: 0.4rem;
  display: none;
  z-index: 80;
}

.lang-menu.open,
.social-menu.open {
  display: block;
}

.lang-menu button,
.social-menu a {
  width: 100%;
  border: none;
  background: transparent;
  padding: 0.45rem 0.7rem;
  border-radius: 10px;
  font-size: 0.9rem;
  color: #3c2626;
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: 0.4rem;
  cursor: pointer;
  transition: background 0.15s ease, color 0.15s ease;
}

.lang-menu button:hover,
.social-menu a:hover {
  background: #f7e9e5;
  color: #2a1a1a;
}

.lang-flag-icon {
  width: 28px;
  height: 18px;
  display: block;
  border-radius: 2px;
}

.lang-option-flag {
  width: 22px;
  height: 14px;
  display: block;
  border-radius: 2px;
}

.lang-code {
  font-size: 0.85rem;
  letter-spacing: 0.02em;
}

.social-dropdown-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.social-dropdown-list a {
  display: inline-flex;
  align-items: center;
  justify-content: flex-start;
}

.social-icon {
  width: 28px;
  height: 28px;
  display: block;
}

/* SOCIAL IKONICE DESNO GORE (za stare ikonice, admin/cart ostaju ok) */
.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 img {
  width: 20px;
  height: 20px;
  object-fit: contain;
  display: block;
}

.cart-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 7px 18px rgba(0,0,0,0.22);
  background: #ffece6;
}

/* ===========================
   GUMB ZA NARUDZBE + 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-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;
  }
}


/* Compact social menu only; language/navigation layout remains unchanged. */
/* Shared with Home: Shop does not load storefront.css. Keep translated labels
   for accessibility without letting their length change the mobile header. */
@media (max-width: 600px) {
  #social-btn { font-size: 0; min-width: 38px; }
  #social-btn::before{content:"";display:block;width:24px;height:24px;background:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23442626' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='18' cy='5' r='3'/%3E%3Ccircle cx='6' cy='12' r='3'/%3E%3Ccircle cx='18' cy='19' r='3'/%3E%3Cpath d='m8.6 10.5 6.8-4M8.6 13.5l6.8 4'/%3E%3C/svg%3E") center/contain no-repeat}
}
.nav-social-wrapper .social-menu{z-index:1301;min-width:0;width:60px;box-sizing:border-box;padding:6px}
.nav-social-wrapper .social-dropdown-list{gap:2px;align-items:center}
.nav-social-wrapper .social-menu a{box-sizing:border-box;width:44px;height:44px;padding:8px;justify-content:center;gap:0}
.nav-social-wrapper .social-icon{width:28px;height:28px}

/* Customer disclosure only; no ADMIN layout rules. */
#nav-panel.has-customer-info .nav-panel-inner { max-height: calc(100dvh - 6rem); overflow-y: auto; overscroll-behavior: contain; }
#nav-panel .customer-info-group { min-width: 0; }
#nav-panel .customer-info-toggle { display: flex; align-items: center; justify-content: space-between; gap: 14px; width: 100%; min-height: 44px; padding: 9px 12px; border: 1px solid #e5cbdc; border-radius: 12px; background: #fff5f6; color: var(--store-ink, #442626); font: inherit; font-size: .9rem; text-align: left; cursor: pointer; }
#nav-panel .customer-info-arrow { flex: 0 0 auto; transition: transform .18s ease; color: var(--store-action, #873875); }
#nav-panel .customer-info-toggle[aria-expanded="true"] .customer-info-arrow { transform: rotate(180deg); }
#nav-panel .customer-info-submenu { display: flex; flex-direction: column; gap: 4px; margin: 7px 0 5px 10px; padding-left: 10px; border-left: 2px solid #dfbad5; }
#nav-panel .customer-info-submenu[hidden] { display: none; }
#nav-panel .customer-info-submenu a { display: flex; align-items: center; min-height: 44px; padding: 8px 10px; overflow-wrap: break-word; }
#nav-panel .customer-info-toggle:hover, #nav-panel .customer-info-submenu a:hover { background: #f7e8f0; }
#nav-panel .customer-info-toggle:focus-visible, #nav-panel .customer-info-submenu a:focus-visible { outline: 3px solid var(--store-focus, #5d2468); outline-offset: 2px; }

@media(max-width:600px){#social-btn{min-width:44px;min-height:44px;padding:10px;display:inline-grid;place-items:center}}
