/* =========================================
   MOBILE MENU CSS - Mobilni header i slide meni
   ========================================= */

/* === KRITIČNO: SAKRIJ MOBILNI MENI NA DESKTOP-U === */
@media screen and (min-width: 769px) {
  .pk-mobile-header,
  .pk-mobile-header *,
  .pk-mobile-header-inner,
  .pk-hamburger,
  .pk-logo,
  .pk-icons,
  .pk-slide-menu,
  .pk-menu-backdrop,
  .pk-close-menu,
  .pk-search-overlay,
  .pk-search-box {
    display: none !important;
    visibility: hidden !important;
    opacity: 0 !important;
    height: 0 !important;
    width: 0 !important;
    overflow: hidden !important;
    position: absolute !important;
    left: -9999px !important;
    pointer-events: none !important;
  }
}

/* === DESKTOP: VRATI NORMALAN STOREFRONT HEADER === */
@media (min-width: 769px) {
  /* Vrati Storefront header na desktop-u */
  .site-header {
    display: block !important;
  }
  
  /* Sakrij handheld menu na desktop-u */
  .storefront-handheld-footer-bar {
    display: none !important;
  }
}

/* === MOBILNO: SAKRIJ STOREFRONT DEFAULT MENI === */
@media (max-width: 768px) {
  /* Sakrij Storefront hamburger i "Izbornik" tekst */
  .site-header .menu-toggle,
  button.menu-toggle {
    display: none !important;
  }
  
  /* Sakrij Storefront main navigation na mobilnom */
  .main-navigation {
    display: none !important;
  }
  
  /* Sakrij Storefront handheld menu */
  .storefront-handheld-footer-bar {
    display: none !important;
  }
  
  /* Sakrij Storefront site-header na mobilnom */
  .site-header {
    display: none !important;
  }
}

/* === MOBILNI HEADER STIL === */
.pk-mobile-header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  background: #000;
  z-index: 9999;
  padding: 10px 15px;
  box-shadow: 0 2px 10px rgba(0,0,0,0.3);
  display: none; /* Sakriven po defaultu, prikazuje se samo na mobilnom */
}

/* DESKTOP - Eksplicitno sakrij mobilni header */
@media (min-width: 769px) {
  .pk-mobile-header,
  .pk-mobile-header-inner,
  .pk-hamburger,
  .pk-logo,
  .pk-icons,
  .pk-slide-menu,
  .pk-menu-backdrop,
  .pk-close-menu {
    display: none !important;
    visibility: hidden !important;
    opacity: 0 !important;
    pointer-events: none !important;
  }
}

@media (max-width: 768px) {
  .pk-mobile-header {
    display: flex !important;
    flex-direction: column;
    visibility: visible !important;
    opacity: 1 !important;
  }

  .pk-mobile-header-inner {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
    height: 60px;
  }

  .pk-hamburger {
    font-size: 34px;
    color: #d1c466;
    cursor: pointer;
    z-index: 10002;
  }

  .pk-logo {
    flex: 1;
    display: flex;
    justify-content: center;
  }

  .pk-logo img {
    max-height: 38px;
    width: auto;
    display: block;
  }

  .pk-icons {
    display: flex;
    align-items: center;
    gap: 15px;
  }

  .pk-icons span,
  .pk-icons a {
    font-size: 22px;
    color: #d1c466;
  }

  /* SLIDE MENI - FULL WIDTH, COVERS EVERYTHING */
  .pk-slide-menu {
    position: fixed;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100vh;
    background: #000;
    color: #d1c466;
    z-index: 10001;
    transition: left 0.3s ease;
    padding: 80px 30px 30px 30px;
    overflow-y: auto;
  }

  .pk-slide-menu.active {
    left: 0 !important;
  }

  .pk-slide-menu ul {
    list-style: none;
    padding: 0;
    margin: 0;
  }

  .pk-slide-menu ul li {
    margin: 0;
    padding: 0;
    font-size: 18px;
    border-bottom: 1px solid rgba(209, 196, 102, 0.2);
  }

  .pk-slide-menu ul li a {
    color: #d1c466;
    text-decoration: none;
    display: block;
    padding: 15px 10px;
    transition: background 0.2s ease;
  }

  .pk-slide-menu ul li a:hover {
    background: rgba(209, 196, 102, 0.1);
  }

  /* SUBMENUS */
  .pk-slide-menu .sub-menu {
    display: none;
    background: rgba(0, 0, 0, 0.5);
    padding-left: 0 !important;
    margin-left: 0 !important;
  }

  .pk-slide-menu li.menu-item-has-children.open > .sub-menu {
    display: block !important;
  }

  .pk-slide-menu .sub-menu li {
    border-bottom: 1px solid rgba(209, 196, 102, 0.1);
  }

  .pk-slide-menu .sub-menu li a {
    padding-left: 30px;
    font-size: 16px;
  }

  /* Arrow indicator for parent items */
  .pk-slide-menu li.menu-item-has-children > a::after {
    content: " ›";
    float: right;
    font-size: 24px;
    transition: transform 0.3s ease;
  }

  .pk-slide-menu li.menu-item-has-children.open > a::after {
    transform: rotate(90deg);
  }

  /* OVERLAY SEARCH */
  .pk-search-overlay {
    position: fixed;
    top: 60px;
    left: 0;
    width: 100%;
    background: #000;
    padding: 20px;
    z-index: 10000;
    display: none;
  }

  .pk-search-box input {
    width: 100%;
    padding: 10px;
    font-size: 16px;
    border: 1px solid #d1c466;
    background: #000;
    color: #d1c466;
  }

  .pk-search-box button {
    margin-top: 10px;
    background: #d1c466;
    color: #000;
    border: none;
    padding: 8px 14px;
    cursor: pointer;
  }
}

/* === BODY SCROLL LOCK === */
body.menu-open {
  overflow: hidden !important;
  position: fixed !important;
  width: 100% !important;
  height: 100% !important;
}

/* === BACKDROP OVERLAY === */
.pk-menu-backdrop {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100vh;
  background: rgba(0, 0, 0, 0.85);
  z-index: 10000;
  display: none;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.pk-menu-backdrop.active {
  display: block;
  opacity: 1;
}

/* === CLOSE BUTTON === */
.pk-close-menu {
  position: fixed;
  top: 15px;
  right: 15px;
  background: transparent !important;
  border: none !important;
  color: #d1c466 !important;
  font-size: 32px;
  cursor: pointer;
  padding: 5px 10px;
  z-index: 10002;
  line-height: 1;
  display: none; /* Sakriven dok se meni ne otvori */
}

/* Prikaži X dugme samo kada je meni otvoren */
body.menu-open .pk-close-menu {
  display: block !important;
}

/* Ukloni sve hover/focus efekte koji dodaju crvenu pozadinu */
.pk-close-menu:hover,
.pk-close-menu:focus,
.pk-close-menu:active {
  background: transparent !important;
  color: #f6e27a !important;
  outline: none !important;
  box-shadow: none !important;
}

/* === HIDE ELEMENTS WHEN MENU IS OPEN === */
body.menu-open .pk-mobile-header-inner {
  display: none !important;
}

body.menu-open .pk-search-overlay {
  display: none !important;
}

/* === FORCE OVERRIDE === */
.pk-slide-menu {
  position: fixed !important;
  top: 0 !important;
  left: -100% !important;
  width: 100% !important;
  height: 100vh !important;
  background: #000 !important;
  z-index: 10001 !important;
  padding: 80px 30px 30px 30px !important;
}

.pk-slide-menu.active {
  left: 0 !important;
}

/* === SEARCH OVERLAY STYLING === */
@media (max-width: 768px) {
  .pk-search-overlay {
    background-color: #000 !important;
    padding: 25px;
  }

  .pk-search-box button {
    margin-top: 15px;
    padding: 10px 18px;
    background-color: #d1c466;
    color: #000;
    border: none;
    font-size: 16px;
    font-weight: bold;
    border-radius: 6px;
    cursor: pointer;
    display: inline-block;
    transition: background-color 0.3s ease;
  }

  .pk-search-box button:hover {
    background-color: #bfa93c;
  }

  .pk-search-box input::placeholder {
    color: #000;
  }
}
