/* Header */
.header-container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 22px 0px;
  margin: 0 auto;
}
.logo {
  max-width: 340px;
}
.search-icon,
.header-icons {
  display: flex;
  align-items: center;
}
.header-icons {
  display: flex;
  gap: 20px;
}
.header-icon-right {
  justify-content: flex-end;
}
header-icon-left {
  justify-content: flex-start;
}
.icon {
  font-size: 20px;
  color: #333;
  cursor: pointer;
  stroke-width: 1;
}
.icon-wishlist-header {
  stroke-width: 0;
  position: relative;
}

.wishlist-count {
  position: absolute;
  top: -8px;
  right: -10px;
  background-color: #640000;
  color: white;
  font-size: 10px;
  border-radius: 50%;
  width: 16px;
  height: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: bold;
  text-align: center;
}

.cart-count {
  position: absolute;
  top: -8px;
  right: -10px;
  background-color: var(--topbar-bg, #640000);
  color: white;
  font-size: 10px;
  border-radius: 50%;
  width: 16px;
  height: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: bold;
  text-align: center;
}

.icon-cart-header {
  position: relative;
}
/* Navigation */
.nav-header {
  position: relative;
  border-top: 1px solid #eee;
  border-bottom: 1px solid #eeeeee;
}
.nav-menu {
  display: flex;
  justify-content: space-between;
  list-style: none;
  margin: 0 auto;
}
.nav-menu:after {
  display: none!important;
}
.nav-menu li {
  margin: 0;
}
.nav-menu > li > a {
  padding: 24px 0;
  display: block;
}
.nav-menu a {
  text-decoration: none;
  color: #212121;
  font-size: 16px;
  font-weight: 400;
  text-transform: uppercase;
  transition: color 0.3s ease;
}
.nav-menu a:hover {
  color: var(--topbar-bg, #666);
}
.megamenu {
  display: none;
  position: absolute;
  top: 68px;
  left: 0;
  padding: 20px 0;
  z-index: 99;
  background-color: #fff;
  width: 100%;
  border-top: 1px solid #eeeeee;
  border-bottom: 1px solid #eeeeee;
}
.dropdown-menu {
  list-style: none;
  margin: 0;
  padding: 0;
}
.dropdown-menu li {
  margin-bottom: 0;
}
.dropdown-menu li a {
  display: block;
  padding: 12px 0;
  font-size: 15px;
  font-weight: 500;
  color: #333;
  text-transform: capitalize;
  transition: all 0.3s ease;
  border: none;
}
.dropdown-menu li.has-submenu > a {
  padding-bottom: 4px;
}
.dropdown-menu li a:hover {
  color: var(--topbar-bg, #212121);
  transform: translateX(4px);
  border: none;
}
.dropdown-menu .grandchild {
  margin: 0;
  padding: 0;
  list-style: none;
}
.dropdown-menu .grandchild li {
  list-style: none;
  margin: 0;
}
.dropdown-menu .grandchild li a {
  font-size: 15px;
  font-weight: 400;
  color: #666;
  padding: 6px 0;
  text-transform: none;
  border: none;
}
.dropdown-menu .grandchild li a:hover {
  color: var(--topbar-bg, #B8860B);
  transform: translateX(2px);
  border: none;
}

.megamenu.with-images .container {
  display: flex;
  flex-wrap: nowrap;
  justify-content: space-between;
  align-items: flex-start;
}
.megamenu .container .menulinks {
  flex: 1;
  max-width: 60%;
  padding-right: 0;
}
.megamenu.with-images .container .menuimages {
  flex: 0 0 auto;
  width: 45%;
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 200px;
}
.megamenu.with-images .container .menuimages img {
  display: block;
  max-width: 100%;
  height: auto;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

@media (min-width: 991px) {

  .dropdown-menu {
    display: grid;
    column-gap: 20px;
  }
  .dropdown-menu li {
      margin-bottom: 0 !important;
  }
  .nav-menu li.has-child:hover > .megamenu {
    display: block;
  }
  .dropdown-menu.five-links {
    grid-template-columns: repeat(5, 1fr);
    column-gap: 40px;
  }
  .megamenu .container .menulinks {
    max-width: 100%;
  }
  .dropdown-menu.three-links {
    grid-template-columns: repeat(3, 1fr);
    column-gap: 40px;
  }

  .link-all {
    position: absolute;
    bottom: 0;
    display: flex;
    gap: 25px;
    align-items: center;
  }
  .link-all a {
    font-weight: 700;
    font-size: 14px;
    color: var(--topbar-bg, #212121);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    transition: all 0.3s ease;
  }
  .link-all a:hover {
    color: var(--topbar-bg, #212121);
    transform: translateX(4px);
  }

  .link-all svg {
    align-self: center;
    transition: transform 0.3s ease;
  }
  .link-all:hover svg {
    transform: translateX(4px);
  }

  .menulinks {
    position: relative;
    min-height: 220px;
    padding-bottom: 50px;
  }

  /* Category Headers */
  .dropdown-menu > li > a {
    font-size: 16px;
    font-weight: 600;
    color: #222;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 8px;
    padding-bottom: 8px;
  }
  .dropdown-menu > li:first-child > a:hover {
    transform: none;
    border-bottom-color: var(--topbar-bg, #8B6914);
  }
}

/* Responsive Design */
@media (max-width: 992px) {
  body.nav_open {
    overflow: hidden;
  }
  
  header .container {
    padding: 0
  }
  .nav-header {
    display: none;
    position: fixed;
    z-index: 99;
    background-color: #fff;
    width: 300px;
    top: 0px;
    left: -100%;
    height: 100%;
    overflow: scroll;
  }
  body.nav_open .nav-header {
    display: block;
    animation: smooth-nav 0.5s ease forwards;
  }
  .template-index .main-content {
    padding-top: 0;
    padding-bottom: 0;
  }
  .header-container {
    padding: 15px 20px;
    z-index: 99;
    background-color: #fff;
    width: 100%;
    left: 0;
  }
  .logo h1 {
      font-size: 22px;
  }
  .logo svg {
    width: 100%;
    max-width: 160px;
  }
  .header-icons svg {
    width: 17px;
    height: auto;
  }
  .nav-menu {
      display: block;
      flex-wrap: wrap;
      padding: 0;
  }
  .nav-menu li {
      margin: 0;
      border-bottom: 1px solid #f0f0f0;
  }
  .nav-menu > li > a {
      padding: 18px 20px;
      font-size: 16px;
      font-weight: 600;
      color: #222;
      text-transform: uppercase;
      border-bottom: none;
  }
  .megamenu {
    position: relative;
    min-height: auto;
    padding: 0;
    top: 0;
    background-color: transparent;
    border-top: none;
  }
  .megamenu .container {
    padding: 0;
  }
  .megamenu .menulinks {
    padding: 0;
  }
  .megamenu.with-images .container {
      display: block;
  }
  .megamenu .container .menulinks {
    max-width: 100%;
    margin-bottom: 0;
    padding: 0;
  }
  .megamenu.with-images .container .menuimages {
    width: 100%;
    margin-bottom: 0;
  }
  .dropdown-menu li a {
    display: block;
    font-size: 15px;
    font-weight: 600;
    padding: 14px 20px;
    color: #333;
    text-transform: capitalize;
    transition: all 0.3s ease;
    border-radius: 4px;
    margin: 2px 8px;
  }
  .dropdown-menu li a:hover {
    color: var(--topbar-bg, #B8860B);
    transform: translateX(4px);
  }
  .dropdown-menu li.has-submenu > a {
    display: flex !important;
    justify-content: space-between;
    align-items: center;
  }
  .dropdown-menu li.has-submenu .chevron-right {
    transform: rotate(0deg);
    transition: transform 0.3s ease;
  }
  .dropdown-menu .grandchild {
    display: none; /* Default hidden for accordion */
    margin: 8px 0 0 0;
    padding: 8px 0;
    border-radius: 6px;
  }
  .dropdown-menu .grandchild li {
    border-bottom: 1px solid rgba(0, 0, 0, 0.06);
    margin: 0 12px;
  }
  .dropdown-menu .grandchild li:last-child {
    border-bottom: none;
  }
  .dropdown-menu .grandchild li:first-child {
    margin-top: 0;
  }
  .dropdown-menu .grandchild li a {
    font-size: 13px;
    font-weight: 400;
    padding: 8px 20px 8px 32px;
    color: #666;
    text-transform: none;
    border-bottom: none;
    margin: 0;
    border-radius: 0;
    transition: all 0.3s ease;
  }
  .dropdown-menu .grandchild li a:hover {
    background-color: rgba(184, 134, 11, 0.05);
    color: var(--topbar-bg, #212121);
    transform: translateX(2px);
  }
  
  /* When submenu is open, show grandchild */
  .dropdown-menu .has-submenu.submenu-open .grandchild {
    display: block;
  }
  
  /* Chevron icon rotation for level 2 menus */
  .dropdown-menu .has-submenu .chevron-right {
    transition: transform 0.3s ease;
    transform: rotate(0deg) !important;
  }
  
  .dropdown-menu .has-submenu.submenu-open .chevron-right {
    transform: rotate(90deg) !important;
  }
  .promo-banner {
      font-size: 12px;
      padding: 8px 10px;
  }
  body.nav_open .overlay-nav {
      position: fixed;
      top: 0;
      left: 0;
      width: 100%;
      height: 100%;
      z-index: 9;
      cursor: pointer;
      background-color: rgb(117 117 117 / 70%);
  }

  .nav-account-mobile {
    padding: 10px 20px;
  }
  .nav-account-mobile a {
    color: #212121;
    font-size: 12px;
  }

  .megamenu.with-images .container .menuimages {
      display: none;
  }

  .megamenu .menulinks .link-all {
    margin: 20px 0 !important;
  }
  .megamenu .menulinks .link-all a {
    font-size: 14px;
    font-weight: 700;
    color: var(--topbar-bg, #B8860B);
    text-transform: uppercase;
  }

  
  .has-child > a {
    display: flex!important;
    justify-content: space-between;
  }
  .chevron-right {
    display: inline-block;
    transition: transform 0.3s ease;
  }
  
  .has-child.menu-open .chevron-right {
    transform: rotate(90deg);
  }
  
  .has-submenu.submenu-open .chevron-right {
    transform: rotate(90deg) !important;
  }
  
  /* Mobile Close Button Styles in Overlay */
  .overlay-nav {
    position: relative;
  }
  
  .nav-close-btn {
    display: none; /* Hide by default */
    position: fixed;
    top: 20px;
    right: 20px;
    background: white;
    border: none;
    padding: 12px;
    cursor: pointer;
    border-radius: 50%;
    transition: all 0.3s ease;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
    z-index: 1001;
  }
  
  .nav-close-btn:hover {
    background-color: #f5f5f5;
    transform: scale(1.05);
  }
  
  .nav-close-btn svg {
    width: 20px;
    height: 20px;
  }

  .has-child.menu-open a > span {
      font-weight: 600;
  }

  body.nav_open .nav-close-btn {
    display: flex;
  }
}

@media (max-width: 480px) {
  .header-container {
      padding: 15px;
  }
  .logo h1 {
      font-size: 18px;
  }
  .icon {
      font-size: 16px;
  }
  .nav-menu {
      justify-content: flex-start;
      overflow-x: auto;
      padding: 10px;
  }
  .nav-menu li {
      white-space: nowrap;
  }
}

@keyframes smooth-nav {
  100% {
    left: 0px;
    opacity: 1;
  }
} 