.hs-menu-item {
  position: relative; /* This is crucial for absolute positioning */
}

.ico-arrow {
  margin-left: 8px;
  transition: transform 0.3s ease; /* Smooth arrow rotation */
}

/* Desktop dropdown styles - only apply on screens larger than 768px */
@media (min-width: 992px) {
  .has-dropdown .dropdown-menu {
    position: absolute;
    top: 180%;
    left: 0;
    background-color: white;
    min-width: 200px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    border-radius: 14px; /* Match your existing border-radius style */
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.3s ease;
    z-index: 1000;
    padding: 0; /* Reset padding */
    margin: 0; /* Reset margin */
    list-style: none; /* Remove list bullets */
  }

  .has-dropdown:hover .dropdown-menu {
    display: flex;
    flex-direction: column;
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
  }

  .has-dropdown:hover .ico-arrow {
    transform: rotate(180deg);
  }

  .dropdown-menu li {
    width: 100%;
  }

  .dropdown-menu a {
    display: block;
    padding: 12px 20px;
    border-bottom: 1px solid #f0f0f0;
    color: #0F2332; /* Match your brand color */
    font-weight: normal;
    font-family: Recoleta !important;
    font-weight; 700;
    font-size: 14px; /* Slightly smaller than main nav */
    text-decoration: none;
    border-radius: 0; /* Override main nav border-radius */
    background: transparent; /* Override main nav background */
  }

  .dropdown-menu a:hover {
    background-color: #ECEADE; /* Match your existing hover color */
    color: #0F2332;
  }

  .dropdown-menu li:first-child a {
    border-top-left-radius: 14px;
    border-top-right-radius: 14px;
  }

  .dropdown-menu li:last-child a {
    border-bottom: none;
    border-bottom-left-radius: 14px;
    border-bottom-right-radius: 14px;
  }
}
.hd-menu div.cart > div.quick-cart > ul {
  padding: 0;
}

.site-header .cart .quick-cart ul li .item h2 {
  font-size: 18px!important;
}

.site-header .cart .quick-cart ul li .item h3 {
  font-size: 16px!important;
}

/* .hd-menu {
position: fixed;
top: 0;
width: 100%;
background: #fff;
transition: box-shadow .3s ease-in-out;
} */

.header-wrap {
  background: #fff;
  position: fixed;
  top: 0;
  transition: box-shadow .3s ease-in-out;
  width: 100%;
  z-index: 99;
}

.top-banner {
  display: flex;
  align-items: center;
  gap: 20px;
  justify-content: center;
  padding: 10px 20px;
  background-color: #E4F0F3;
  flex-wrap: wrap;
}

.top-banner p, .top-banner span {
  font-family: Recoleta !important;
}

.top-banner a {
  text-decoration: none;
}

.hd-menu.scrolled {
  box-shadow: 0px 4px 4px 0px rgba(0, 0, 0, 0.25);
}

.hd-menu .store-tools .header-lang {
  padding: 6px 10px;
  display: flex;
  align-items: center;
  position: relative;
}

.hd-menu .store-tools .header-lang .header-lang-label {
  font-family: Recoleta;
  font-size: 16px;
  font-style: normal;
  font-weight: 700;
  line-height: normal;
  color: #0F2332;
  display: flex;
  align-items: center;
  gap: 8px;
}

.hd-menu .store-tools .header-lang .header-lang-label .current-language {
  text-transform: uppercase;
}

.hd-menu .store-tools .header-lang .header-lang-label svg,
.hd-menu .store-tools .cart svg.cart-mobile {
  width: auto;
  height: 22px;
}

.hd-menu .store-tools .header-lang .globe_class {
  background-image: unset;
  background-position: unset;
  background-repeat: unset;
  background-size: unset;
  border-radius: unset;
  width: unset;
  height: unset;
  cursor: default;
}

.hd-menu .store-tools .header-lang .globe_class .lang_list_class {
  width: 80px;
  border-radius: 12px;
  overflow: hidden;
  top: 15px;
  right: 0;
  left: unset;
  -webkit-transform: unset;
  transform: unset;
  padding: 0;
  margin: 0;
}

.hd-menu .store-tools .header-lang .globe_class .lang_list_class:before,
.hd-menu .store-tools .header-lang .globe_class .lang_list_class:after {
  content: unset;
  display: none;
}

.hd-menu .store-tools .header-lang .globe_class .lang_list_class li {
  background: #BED7E6;
}

.hd-menu .store-tools .header-lang .globe_class .lang_list_class li,
.hd-menu .store-tools .header-lang .globe_class .lang_list_class li:first-child,
.hd-menu .store-tools .header-lang .globe_class .lang_list_class li:last-child{
  border: 0;
}

.hd-menu .store-tools .header-lang .globe_class .lang_list_class li a {
  cursor: pointer;
  color: #0F2332;
  font-family: Recoleta;
  font-size: 16px;
  font-weight: 500;
}

.hd-menu .store-tools .header-lang .globe_class .lang_list_class li a:hover {
  font-weight: 700;
}

@media (max-width: 991px) {
  .hd-menu {
    padding: 12px 24px;
    display: grid;
    grid-template-columns: 1fr auto;
    align-items: center;
    grid-template-areas: 
      "logo store-tools hamburger";
    column-gap: 24px;
  }

  .hd-menu.active {
    grid-template-areas: 
      "logo store-tools hamburger"
      "nav-links nav-links nav-links";
  }

  .hd-menu .logo-wrapper {
    grid-area: logo;
  }

  .hd-menu.active .logo-wrapper,
  .hd-menu.active .hamburger,
  .hd-menu.active .store-tools {
    padding-bottom: 22px;
  }

  /* Hamburger Icon */
  .hamburger {
    /*     padding: 15px 15px; */
    display: inline-block;
    cursor: pointer;
    transition-property: opacity, filter;
    transition-duration: 0.15s;
    transition-timing-function: linear;
    font: inherit;
    color: inherit;
    text-transform: none;
    background-color: transparent;
    border: 0;
    margin: 0;
    overflow: visible; }
  .hamburger:hover {
    opacity: 0.7; }
  .hamburger.is-active:hover {
    opacity: 0.7; }
  .hamburger.is-active .hamburger-inner,
  .hamburger.is-active .hamburger-inner::before,
  .hamburger.is-active .hamburger-inner::after {
    background-color: #0F2332; }

  .hamburger-box {
    width: 24px;
    height: 16px;
    display: inline-block;
    position: relative; }

  .hamburger-inner {
    display: block;
    top: 50%;
    margin-top: 0; }
  .hamburger-inner, .hamburger-inner::before, .hamburger-inner::after {
    width: 24px;
    height: 3px;
    background-color: #0F2332;
    border-radius: 4px;
    position: absolute;
    transition-property: transform;
    transition-duration: 0.15s;
    transition-timing-function: ease; }
  .hamburger-inner::before, .hamburger-inner::after {
    content: "";
    display: block; }
  .hamburger-inner::before {
    top: -8px; }
  .hamburger-inner::after {
    bottom: -8px; }
  .hamburger--squeeze .hamburger-inner {
    transition-duration: 0.075s;
    transition-timing-function: cubic-bezier(0.55, 0.055, 0.675, 0.19); }
  .hamburger--squeeze .hamburger-inner::before {
    transition: top 0.075s 0.12s ease, opacity 0.075s ease; }
  .hamburger--squeeze .hamburger-inner::after {
    transition: bottom 0.075s 0.12s ease, transform 0.075s cubic-bezier(0.55, 0.055, 0.675, 0.19); }

  .hamburger--squeeze.is-active .hamburger-inner {
    transform: rotate(45deg);
    transition-delay: 0.12s;
    transition-timing-function: cubic-bezier(0.215, 0.61, 0.355, 1); }
  .hamburger--squeeze.is-active .hamburger-inner::before {
    top: 0;
    opacity: 0;
    transition: top 0.075s ease, opacity 0.075s 0.12s ease; }
  .hamburger--squeeze.is-active .hamburger-inner::after {
    bottom: 0;
    transform: rotate(-90deg);
    transition: bottom 0.075s ease, transform 0.075s 0.12s cubic-bezier(0.215, 0.61, 0.355, 1); }
  /* Hamburger Icon END */

  .hd-menu.active .nav-links {
    grid-area: nav-links;
    display: flex;
    flex-direction: column;
    max-height: 80vh;
    overflow-y: auto;
    overflow-x: hidden;
    width: 100%;
  }

  .hd-menu .nav-links {
    display: none;
  }

  .hd-menu .store-tools {
    grid-area: store-tools;
    display: flex;
    flex-direction: row-reverse;
    gap: 24px;
    align-items: center;
  }

  .hd-menu .store-tools .cart .cart-text,
  .hd-menu .store-tools .cart .cart-desktop{
    display: none;
  }

  .hd-menu .store-tools .cart .cart-mobile {
    height: 20px;
    width: auto;
  }

  .hd-menu .store-tools .header-lang {
    padding: 0;
  }

  .hd-menu .store-tools .header-lang .header-lang-label .current-language,
  .hd-menu .store-tools .header-lang .header-lang-label .language-arrow{
    display: none;
  }

  .hd-menu .store-tools .header-lang .globe_class .lang_list_class {
    right: -30px;
  }

  .hd-menu .nav-links ul {
    padding: 0;
  }

  .hd-menu .nav-links ul .hs-menu-item {
    padding: 16px 0;
    position: relative;
  }

  .hd-menu .nav-links ul .hs-menu-item:after {
    content: "";
    position: absolute;
    width: 100vw;
    height: 1px;
    background-color: #CECECE;
    bottom: 0;
    left: -24px;
  }

  .hd-menu .nav-links ul .hs-menu-item:last-child:after {
    display: none;
  }

  .hd-menu .nav-links ul .hs-menu-item a,
  .hd-menu .nav-links ul .hs-menu-item .menu-label {
    font-family: Recoleta !important;
    text-decoration: none;
    font-size: 16px;
    font-style: normal;
    font-weight: 700;
    line-height: normal;
    width: 100%; /* Make anchor take full width */
    display: block; /* Make anchor a block element */
  }
  
  /* Mobile flex layout for dropdown items */
  .mobile-flex {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
  }
  
  @media (max-width: 991px) {
    .mobile-flex .menu-label {
      width: auto;
      flex: 1;
    }
    
    .mobile-flex .ico-arrow {
      margin-left: auto;
      padding-left: 10px;
    }
  }
  
  /* Mobile dropdown styles */
  .hd-menu .nav-links ul .has-dropdown .dropdown-menu {
    display: none;
    padding-left: 0;
    margin-top: 10px;
    width: 100%;
    max-height: 60vh;
    overflow-y: auto; /* Enable vertical scrolling */
    overflow-x: hidden; /* Prevent horizontal scrolling */
  }
  
  .hd-menu .nav-links ul .has-dropdown.active .dropdown-menu {
    display: block;
  }
  
  .hd-menu .nav-links ul .has-dropdown.active .ico-arrow {
    transform: rotate(180deg);
  }
  
  .hd-menu .nav-links ul .has-dropdown .ico-arrow {
    transition: transform 0.3s ease;
  }
  
  /* Mobile dropdown header styling */
  .hd-menu .nav-links ul .dropdown-header {
    background-color: #0f2332;
    padding: 10px 15px;
    margin: 0;
  }
  
  .hd-menu .nav-links ul .dropdown-title {
    color: white;
    font-weight: 600;
    display: block;
    font-size: 14px;
  }
  
  .hd-menu .nav-links ul .dropdown-menu li {
    padding: 10px 15px;
    border-bottom: none;
  }
  
  .hd-menu .nav-links ul .dropdown-menu li:after {
    display: none;
  }
  
  .hd-menu .nav-links ul .dropdown-menu a {
    font-weight: 500;
    font-size: 14px;
  }
}

@media (min-width: 992px) {
  .hd-menu {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    justify-content: space-between;
    align-items: center;
    padding: 24px;
  }
  .hd-menu .mega-menu-wrapper .mega-menu-container ul {
  flex-direction: column
  }
  
  /* Desktop mega menu styling */
  .hd-menu .nav-links ul .has-dropdown {
    position: relative;
  }
  
  .hd-menu .nav-links ul .has-dropdown {
    position: static;
  }
  
  .hd-menu .nav-links ul .mega-menu-wrapper {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    margin: 0 auto;
    background: white;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    border-radius: 4px;
    padding: 0;
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    width: 90vw;
    max-width: 1200px;
    border-top: 3px solid #0f2332;
  }
  
  .hd-menu .nav-links ul .has-dropdown:hover .mega-menu-wrapper {
    opacity: 1;
    visibility: visible;
  }
  
  .mega-menu-container {
    display: flex;
    flex-wrap: wrap;
    padding: 25px;
    width: 100%;
    justify-content: space-between;
  }
  
  .mega-menu-column {
    flex: 0 0 30%;
    padding: 0 10px;
    box-sizing: border-box;
    margin-bottom: 15px;
    min-width: 220px;
  }
  
  .mega-menu-title {
    color: #0f2332;
    font-size: 15px;
    font-weight: 600;
    margin-top: 0;
    margin-bottom: 12px;
    padding-bottom: 8px;
    border-bottom: 1px solid #eee;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }
  
  .mega-menu-list {
    list-style: none;
    padding: 0;
    margin: 0;
  }
  
  .mega-menu-list li {
    margin-bottom: 8px;
  }
  
  .mega-menu-list li a {
    color: #333;
    font-size: 14px;
    text-decoration: none;
    transition: color 0.2s ease;
    display: block;
    padding: 5px 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }
  
  .mega-menu-list li a:hover {
    color: #0f2332;
    text-decoration: underline;
  }
  
  /* Tablet-specific styles for mega menu */
  @media (min-width: 768px) and (max-width: 1199px) {
    .hd-menu .nav-links ul .mega-menu-wrapper {
      width: 96vw;
      overflow-x: visible;
    }
    
    .mega-menu-container {
      padding: 20px 15px;
      justify-content: space-around;
    }
    
    .mega-menu-column {
      flex: 0 0 31%;
      min-width: 200px;
    }
  }
  
  .hd-menu .nav-links ul .dropdown-menu li:not(.dropdown-header) {
    border-bottom: 1px solid #f0f0f0;
    margin: 0;
  }
  
  .hd-menu .nav-links ul .dropdown-menu li:not(.dropdown-header):last-child {
    border-bottom: none;
  }
  
  .hd-menu .nav-links ul .dropdown-menu li:not(.dropdown-header) a {
    padding: 12px 20px;
    display: block;
    color: #333;
    font-size: 14px;
    transition: background-color 0.2s ease;
  }
  
  .hd-menu .nav-links ul .dropdown-menu li:not(.dropdown-header) a:hover {
    background-color: #f5f5f5;
  }

  .hamburger {
    display: none;
  }

  .hd-menu .nav-links {
    justify-self: center;
  }

  .hd-menu .nav-links ul {
    display: flex;
    flex-direction: row;
    flex-wrap: nowrap;
    gap: 12px;
  }

  .hd-menu .nav-links ul .hs-menu-item a,
  .hd-menu .nav-links ul .hs-menu-item .menu-label {
    font-size: 16px;
    font-family: Recoleta !important;
    font-weight; 700;
    text-decoration: none;
    color: #0F2332;
    padding: 6px 10px;
    border-radius: 14px;
    cursor: pointer;
  }
  
  @media (min-width: 992px) {
    .hd-menu .nav-links ul .hs-menu-item .dd-wrap {
      display: flex;
      align-items: center;
    }
    
    .hd-menu .nav-links ul .hs-menu-item .menu-label {
      display: inline-flex;
      align-items: center;
    }
  }

  .hd-menu .nav-links ul .hs-menu-item a:hover,
  .hd-menu .nav-links ul .hs-menu-item .menu-label:hover {
    background: #ECEADE;
  }
  
  .ico-arrow {
    display: inline-flex;
    margin-left: 5px;
    transition: transform 0.3s ease;
  }
  
  .has-dropdown:hover .ico-arrow {
    transform: rotate(180deg);
  }

  .hd-menu .store-tools {
    justify-self: end;
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 12px;
  }

  .hd-menu .store-tools .cart .cart-link svg,
  .hd-menu .store-tools .cart .cart-link img {
    height: 20px;
    width: auto;
  }

  .hd-menu .store-tools .cart .cart-mobile {
    display: none;
  }

  .hd-menu .store-tools .cart .cart-link {
    padding: 9px 14px;
    display: inline-flex;
    flex-direction: row;
    align-content: center;
    align-items: center;
    justify-content: flex-start;
    width: auto;
    gap: 10px;
    border-radius: 30px;
  }

  .hd-menu .store-tools .cart .cart-text {
    color: #fff;
  }
}