/* Main content */
.header {
  height: 108px;
  display: flex;
  align-items: center;
  position: -webkit-sticky;
  position: sticky;
  top: 0;
  background: var(--black_white50);
  z-index: 1000;
  transition: height 0.4s ease;
}

.header-overlay {
  position: fixed;
  top: 140px;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.8);
  display: none;
  z-index: 90;
}

/* header-desktop */
.header-desktop {
  position: relative;
  height: 108px;
}

.header-logo-wrapper {
  height: 60px;
  width: 78.47px;
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
}

.header-logo-wrapper a {
  height: 100%;
  width: 100%;
}

.header-logo-wrapper img,
.header-logo-wrapper picture {
  height: 100%;
  width: 100%;
}

/* header-left side */
.header-left-side {
  display: flex;
  align-items: center;
  gap: 24px;
  margin-right: auto;
}

.header-left-side .primary-btn-large {
  border-radius: 8px;
  height: 45px;
  border: 1px solid transparent;
  cursor: pointer;
  transition: border-color 0.4s ease, background-color 0.4s ease,
    color 0.4s ease;
}

.header-left-side .primary-btn-large.open {
  background: var(--black_white50);
  color: var(--primary500);
  border: 1px solid var(--primary500);
}

.header-left-side .primary-btn-large>span {
  height: 20px;
  width: 20px;
  position: relative;
}

.header-left-side .primary-btn-large>span img {
  width: 100%;
  height: 100%;
  position: absolute;
  top: 0;
  left: 0;
  transition: opacity 0.4s ease, visibility 0.4s ease;
}

.header-left-side .primary-btn-large .icon-close {
  opacity: 0;
  visibility: hidden;
}

.header-left-side .primary-btn-large.open .icon-close {
  opacity: 1;
  visibility: visible;
}

.header-left-side .primary-btn-large .icon-hamburger {
  opacity: 1;
  visibility: visible;
}

.header-left-side .primary-btn-large.open .icon-hamburger {
  opacity: 0;
  visibility: hidden;
}

.header-menu {
  display: flex;
  gap: 24px;
}

.header-menu a {
  color: var(--black_white950);
  text-decoration: underline;
  text-underline-offset: 2px;
  text-decoration-thickness: 1px;
  -webkit-text-decoration-color: transparent;
          text-decoration-color: transparent;
  transition: color 0.4s ease, -webkit-text-decoration-color 0.4s ease;
  transition: color 0.4s ease, text-decoration-color 0.4s ease;
  transition: color 0.4s ease, text-decoration-color 0.4s ease, -webkit-text-decoration-color 0.4s ease;
}

.header-menu a:hover {
  color: var(--primary500);
  -webkit-text-decoration-color: var(--primary500);
          text-decoration-color: var(--primary500);
}

.header-menu-wrapper {
  display: flex;
  gap: 24px;
}

/* Header desktop category menu styles */
.header-categories {
  display: none;
  position: absolute;
  top: 100%;
  right: 0;
  left: 0;
  z-index: 999;
  padding: 32px 0;
  gap: 32px;
}

.header-categories::before {
  content: "";
  position: absolute;
  background: var(--black_white50);
  border-top: 1px solid var(--primary500);
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  height: 100%;
  width: 100vw;
  z-index: -1;
}

.header-categories>div {
  flex: 1 1 100%;
}

.header-categories ul {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  -moz-column-gap: 32px;
       column-gap: 32px;
  row-gap: 16px;
}

.header-categories ul li a {
  display: block;
  width: -webkit-fit-content;
  width: -moz-fit-content;
  width: fit-content;
  padding: 7px 12px;
  color: var(--black_white950);
  border-radius: 8px;
  transition: background-color 0.4s ease, color 0.4s ease;
}

.header-categories ul li a:hover {
  color: var(--primary500);
  background: var(--black_white100);
}

/* Mobile menu styles */
/* Basic styles */
#opened-menu {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  width: 100%;
  height: 100vh;
  height: calc(100dvh - 90px);
  padding: 20px 0 32px;
  z-index: 999;
}

/* When admin bar is visible */
/* When logged in (admin bar visible) */
body.admin-bar #opened-menu,
body.customize-support #opened-menu {
  height: calc(100dvh - 136px);
}

#opened-menu::before {
  content: "";
  position: absolute;
  background: var(--black_white50);
  border-top: 1px solid var(--primary500);
  left: 50%;
  top: 0;
  transform: translateX(-50%);
  width: 100vw;
  height: 100vh;
  z-index: -1;
}

/* When menu is active */
#opened-menu.active {
  display: flex;
  flex-direction: column;
  gap: 24px;
  -webkit-animation: slideDown 0.4s ease;
          animation: slideDown 0.4s ease;
}

/* -header-right-side */
.user-specials {
  display: flex;
  align-items: center;
  margin-left: auto;
}

.search-bar,
.search-btn,
.my-acc-btn,
.favorite-btn,
.cart-btn {
  height: 40px;
  width: 40px;
  color: var(--black_white950);
  position: relative;
  background: unset;
  border: unset;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: color 0.4s ease;
}

.favorite-btn.has-favorites {
  color: var(--primary500);
}

.dropdown-btn {
  color: var(--black_white950);
  position: relative;
  background: unset;
  border: unset;
  display: flex;
  align-items: center;
  gap: 4px;
  margin-left: 16px;
  transition: color 0.4s ease;
}

.dropdown-btn svg {
  height: 20px;
  width: 20px;
  transform: rotate(0deg);
  transition: transform 0.4s ease;
}

.search-btn:hover,
.my-acc-btn:hover,
.favorite-btn:hover,
.cart-btn:hover,
.dropdown-btn:hover {
  color: var(--primary500);
  cursor: pointer;
}

.dropdown-btn:hover svg {
  transform: rotate(180deg);
}

.liked-products-count,
.cart-products-count {
  position: absolute;
  top: -4px;
  right: -4px;
  padding: 2px 4px;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--primary500);
  color: var(--black_white50);
}

/* Search desktop toggle styles  */
.search-wrapper {
  /* display: none;  */
  position: absolute;
  top: 50%;
  right: 0;
  transform: translateY(-50%);
  background: var(--black_white50);
  z-index: 999;
  display: flex;
  align-items: center;
  gap: 8px;
}

.search-mobile {
  position: relative;
}

.search-wrapper input,
.search-mobile input {
  padding: 10px 16px;
  border: 1px solid var(--neutral200);
  color: var(--neutral400);
  border-radius: 8px;
  transition: border-color 0.4s ease;
}

.search-mobile input {
  width: 100%;
}

.search-mobile input:hover {
  border-color: var(--primary500);
}

.search-wrapper input:focus,
.search-mobile input:focus {
  outline: unset;
  color: var(--black_white950);
  border-color: var(--primary500);
}

.search-wrapper a,
.search-mobile a {
  position: absolute;
  top: 50%;
  right: 0;
  transform: translateY(-50%);
  color: var(--neutral400);
  transition: color 0.4s ease;
}

.search-wrapper a:hover,
.search-mobile a:hover {
  color: var(--black_white950);
}

/* Languages */
.language-dropdown {
  position: relative;
  display: inline-block;
}

.dropdown-menu {
  display: none;
  position: absolute;
  background: var(--black_white50);
  border: 1px solid var(--primary500);
  border-radius: 4px;
  right: 0;
  width: 150px;
  overflow: hidden;
  z-index: 1000;
}

.dropdown-menu li a {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  text-decoration: none;
  color: var(--black_white950);
  transition: color 0.4s ease, background-color 0.4s ease;
}

.dropdown-menu li a:hover {
  color: var(--primary500);
}

.dropdown-menu li.active a {
  color: var(--primary500);
  background: var(--black_white100);
}

.dropdown-menu li a img {
  height: 16px;
  width: 21px;
}

/* extra categories */
.extra-categories-desktop {
  display: flex;
  flex-direction: column;
  gap: 16px;
  max-width: 311px;
}

.extra-categories-desktop a {
  display: flex;
  align-items: center;
  border: 1px solid var(--neutral200);
  border-radius: 8px;
  overflow: hidden;
  transition: border-color 0.4s ease, color 0.4s ease;
}

.extra-categories-desktop a .h6 {
  padding: 0 16px;
}

.extra-categories-img.discount {
  background: var(--primary500);
}

.extra-categories-img.new-item {
  background: var(--alert500);
}

.extra-categories-img {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 60px;
  width: 60px;
}

.extra-categories-img img {
  height: 34.29px;
  width: 34.29px;
}

.extra-categories-desktop a:hover {
  border-color: var(--primary500);
  color: var(--primary500);
}

.language-dropdown:hover .dropdown-menu {
  display: block;
}

/* header user account */
.my-account-menu-wrapper {
  position: relative;
  display: inline-block;
}

.my-account-menu {
  display: block;
  opacity: 0;
  visibility: hidden;
  position: absolute;
  top: 100%;
  right: 0;
  background: var(--black_white50);
  border: 1px solid var(--neutral200);
  list-style: none;
  padding: 0;
  margin: 0;
  border-radius: 8px;
  overflow: hidden;
  min-width: 200px;
  z-index: 999;
  transition: opacity 0.4s ease, visibility 0.4s ease;
}

.my-account-menu li.propasta-current-user {
  color: var(--black_white50);
  background: var(--primary500);
  padding: 10px 16px;
}

.my-account-menu li a {
  color: var(--black_white950);
  text-decoration: none;
  padding: 10px 16px;
  display: block;
  transition: color 0.4s ease, background-color 0.4s ease;
}

.my-account-menu li a:hover {
  background-color: var(--black_white100);
  color: var(--primary500);
}

.my-account-menu-wrapper:hover .my-account-menu {
  opacity: 1;
  visibility: visible;
}

/* Optional animation */
@-webkit-keyframes slideDown {
  from {
    opacity: 0;
    transform: translateY(-10px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}
@keyframes slideDown {
  from {
    opacity: 0;
    transform: translateY(-10px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.header-desktop {
  display: flex;
}

.header-mobile {
  display: none;
}

/* Favorites modal */
#guest-favorites-modal {
  display: none;
  /* hidden by default */
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  padding: 16px;
  background: rgba(0, 0, 0, 0.8);
  justify-content: center;
  align-items: center;
  z-index: 9999;
  /* Optional fade-in animation */
  opacity: 0;
  transition: opacity 0.4s ease;
}

#guest-favorites-modal.show {
  display: flex;
  opacity: 1;
}

#guest-favorites-modal .modal-content {
  background: var(--black_white50);
  padding: 24px;
  max-width: 418px;
  width: 100%;
  border-radius: 8px;
  position: relative;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
}

#guest-favorites-modal #close-favorites-modal {
  height: 26px;
  width: 26px;
  background: none;
  border: none;
  cursor: pointer;
}

#guest-favorites-modal #close-favorites-modal svg {
  height: 26px;
  width: 26px;
  min-width: 26px;
}

#guest-favorites-modal .h5 {
  display: flex;
  gap: 24px;
  margin-bottom: 16px;
}

#guest-favorites-modal .modal-actions {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  margin-top: 20px;
}

/* Logout modal */
/* logout-modal.css */
#logoutModal {
  display: none;
  position: fixed;
  inset: 0;
  padding: 24px;
  background: rgba(0, 0, 0, 0.8);
  align-items: center;
  justify-content: center;
  z-index: 9999;
}

#logoutModal .modal-content {
  background: var(--black_white50);
  padding: 24px;
  border-radius: 8px;
  max-width: 418px;
  width: 100%;
  text-align: center;
  color: var(--black_white950);
}

#logoutModal p {
  margin-bottom: 24px;
}

#logoutModal .modal-buttons {
  display: flex;
  gap: 10px;
}

#logoutModal button,
#guest-favorites-modal .btn-register {
  border: none;
  border-radius: 8px;
  cursor: pointer;
}

#logoutModal #confirmLogout,
#guest-favorites-modal .btn-login {
  max-width: 231px;
  width: 100%;
  height: 50px;
}

#logoutModal #cancelLogout,
#guest-favorites-modal .btn-register {
  background: var(--black_white50);
  padding: 16px 32px;
  display: flex;
  justify-content: center;
  align-items: center;
  height: 50px;
  color: var(--black_white950);
  transition: background-color 0.4s ease;
}

#logoutModal #cancelLogout:hover,
#guest-favorites-modal .btn-register:hover {
  background: var(--black_white100);
}

@media (max-width: 1100px) {

  /* header categories */
  .mobile-logo,
  .mobile-logo a {
    height: 60px;
    width: 78.47px;
  }

  .header-categories ul {
    grid-template-columns: 1fr 1fr;
  }

  /* mobile/desktop header */
  .header {
    height: 90px;
  }

  .header .container {
    padding: 0 16px;
  }

  .header-desktop {
    display: none;
  }

  .header-mobile {
    display: flex;
    height: 90px;
    position: relative;
  }

  .header-mobile {
    .header-mobile-top {
      display: flex;
      align-items: center;
      width: 100%;
    }

    #open-mobile-menu {
      height: 32px;
      width: 72px;
      margin-right: auto;
      background: unset;
      border: unset;
      cursor: pointer;
    }

    #open-mobile-menu img {
      height: 100%;
      width: 100%;
    }

    .mobile-user-specials {
      display: flex;
      align-items: center;
      margin-left: auto;
    }

    /* extra categories */
    .extra-categories-mobile {
      display: flex;
      flex-direction: column;
      gap: 16px;
      width: 100%;
    }

    .extra-categories-mobile a {
      display: flex;
      align-items: center;
      border: 1px solid var(--neutral200);
      border-radius: 8px;
      overflow: hidden;
      transition: border-color 0.4s ease, color 0.4s ease;
    }

    .extra-categories-mobile a .h6 {
      padding: 0 12px;
    }

    .extra-categories-img.discount {
      background: var(--primary500);
    }

    .extra-categories-img.new-item {
      background: var(--alert500);
    }

    .extra-categories-img {
      display: flex;
      align-items: center;
      justify-content: center;
      height: 45px;
      width: 45px;
    }

    .extra-categories-img img {
      height: 25.71px;
      width: 25.71px;
    }

    .extra-categories-mobile a:hover {
      border-color: var(--primary500);
      color: var(--primary500);
    }

    .mobile-login {
      margin-top: auto;
    }

    .mobile-login svg {
      height: 30px;
      width: 30px;
    }

    .header-menu-mobile {
      display: flex;
      flex-direction: column;
      gap: 24px;
    }

    .mobile-category-title,
    .mobile-languages-title {
      background: unset;
      border: unset;
      width: 100%;
      margin: 0;
      padding: 0;
    }

    .mobile-category-title,
    .mobile-languages-title,
    .header-menu-mobile a,
    .mobile-menu-categories a {
      display: flex;
      align-items: center;
      justify-content: space-between;
      color: var(--black_white950);
      transition: color 0.4s ease;
    }

    .mobile-category-title:hover,
    .mobile-languages-title:hover,
    .header-menu-mobile a:hover,
    .mobile-menu-categories a:hover {
      color: var(--primary500);
      cursor: pointer;
    }

    .mobile-category-title svg,
    .mobile-languages-title svg,
    .header-menu-mobile svg,
    .mobile-menu-categories svg {
      height: 16px;
      width: 16px;
    }

    .close-category,
    .close-languages {
      display: flex;
      align-items: center;
      gap: 10px;
      position: relative;
      color: var(--black_white950);
      padding: 20px 0;
      transition: color 0.4s ease;
    }

    .close-category::before,
    .close-languages::before {
      content: "";
      position: absolute;
      top: 0;
      left: 50%;
      transform: translateX(-50%);
      height: 100%;
      width: 100vw;
      background: var(--black_white100);
      z-index: -1;
    }

    .close-category:hover,
    .close-languages:hover {
      cursor: pointer;
      color: var(--primary500);
    }

    .close-category svg,
    .close-languages svg {
      height: 16px;
      width: 16px;
      transform: rotate(180deg);
    }

    .mobile-menu-categories {
      display: flex;
      flex-direction: column;
      gap: 24px;
    }
  }

  /* categories menu & language menu*/
  #categories-container-mobile,
  .mobile-change-language-cont {
    opacity: 0;
    visibility: hidden;
    position: absolute;
    transition: opacity 0.3s ease;
  }

  #categories-container-mobile.visible,
  .mobile-change-language-cont.visible {
    display: flex;
    opacity: 1;
    visibility: visible;
    flex-direction: column;
    gap: 24px;
    position: absolute;
    top: 1px;
    left: 0;
    width: 100%;
    height: calc(100vh - 90px);
    background: var(--black_white50);
    z-index: 999;
  }

  #categories-container-mobile.visible {
    gap: 0;
  }

  .extra-categories-mobile-wrapper {
    overflow-y: auto;
    scrollbar-width: none;
    padding: 24px 0
  }

  .extra-categories-mobile-wrapper ul {
    padding: 24px 0;
  }

  #mobile-language-submit {
    cursor: pointer;
  }

  .mobile-dropdown-menu {
    display: flex;
    flex-direction: column;
    gap: 24px;
  }

  .language-item {
    color: var(--black_white950);
  }

  .language-item:hover {
    color: var(--primary500);
  }

  .language-option {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    cursor: pointer;
  }

  .language-option>div {
    display: flex;
    align-items: center;
    gap: 8px;
  }

  .language-option>div img {
    width: 21px;
    height: 16px;
  }

  .language-option input[type="checkbox"] {
    display: none;
  }

  .language-option .custom-checkbox {
    width: 18px;
    height: 18px;
    border: 2px solid var(--neutral200);
    border-radius: 50%;
    display: inline-block;
    position: relative;
    transition: all 0.4s ease;
  }

  .language-item:hover .language-option input[type="checkbox"]+.custom-checkbox {
    border-color: var(--primary500);
  }

  .language-option input[type="checkbox"]:checked+.custom-checkbox {
    border-color: var(--primary500);
    background-color: var(--primary500);
  }

  .language-option input[type="checkbox"]:checked+.custom-checkbox::after {
    content: "";
    position: absolute;
    top: 2px;
    left: 4px;
    width: 5px;
    height: 8px;
    border: solid var(--black_white50);
    border-width: 0 2px 2px 0;
    transform: rotate(45deg);
  }
}

@media (max-width: 768px) {

  /* logo */
  .mobile-logo,
  .mobile-logo a {
    width: 65px;
    height: 50px;
  }

  .mobile-logo img {
    height: 100%;
    width: 100%;
  }

  #guest-favorites-modal .modal-content,
  #logoutModal .modal-content {
    padding: 16px;
  }
}