#masthead .header-wrapper {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 9999;
  background: #fff;
  transition: box-shadow 0.3s;
}

#masthead .header-main {
  background: #fff;
  padding: 15px 0;
  transition: padding 0.3s;
}

#masthead .header-right .header-nav {
  display: flex;
  align-items: center;
  gap: 25px;
}

#masthead .header-right .cart-count {
  position: absolute;
  right: -8px;
  top: -5px;
  background: red;
  color: white;
  width: 15px;
  height: 15px;
  align-items: center;
  display: flex;
  justify-content: center;
  border-radius: 5px;
  font-size: 10px;
}

#masthead .header-right a {
  color: #111;
  text-decoration: none;
  position: relative;
}

#masthead .header-right a:hover {
  text-decoration: underline;
}

#masthead .header-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  /*padding: 0 15px;*/
}

#masthead .header-wrapper.scrolled .header-main {
  padding-bottom: 15px;
}

#masthead .header-inner a:hover {
  text-decoration: underline;
}

#masthead .header-logo {
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s ease;
}

#masthead .site-logo {
  transition: all 0.3s ease;
  width: 125px;
  height: 55px;
  max-width: 125px;
  max-height: 55px;
  object-fit: contain;
}

#masthead .header-wrapper.scrolled .site-logo {
  width: 100px !important;
  height: 45px !important;
  max-width: 100px !important;
  max-height: 45px !important;
}

/* Navigation */
#masthead .header-nav-wrapper {
  background: #fff;
  border-bottom: 1px solid #ddd;
  max-height: 500px;
  overflow: hidden;
  transition: max-height 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

#masthead .header-nav-wrapper.nav-hidden {
  max-height: 0;
}

/* Mobile Menu Header */
#masthead .mobile-menu-header {
  display: none;
  justify-content: space-between;
  align-items: center;
  padding: 20px 15px;
  border-bottom: 1px solid #eee;
  background: #fff;
}

#masthead .mobile-menu-header h3 {
  margin: 0;
  font-size: 18px;
  font-weight: 600;
  color: #111;
}

#masthead .close-mobile-menu {
  background: none;
  border: none;
  padding: 8px;
  cursor: pointer;
  color: #111;
  margin: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}

#masthead .close-mobile-menu:hover {
  background: #f5f5f5;
  border-radius: 4px;
}

#masthead .nav-main-menu {
  display: flex;
  list-style: none;
  margin: 0;
  padding: 0;
  justify-content: center;
  font-family: Arial, sans-serif;
  font-size: 16px;
  font-weight: 400;
}

#masthead .nav-main-menu > li {
  position: relative;
  font-size: 15px;
  text-transform: uppercase;
  margin: 0;
}

#masthead .mobile-submenu-container {
  display: none;
}

#masthead .active > ul.children,
#masthead .active > ul.sub-menu:not(.nav-dropdown) {
  display: flex !important;
}

#masthead .nav-main-menu > li.has-submenu > a::after {
  background-image: none;
}

#masthead .nav-main-menu > li > a {
  color: #111;
  padding: 18px 18px 16px 18px;
  display: block;
  text-decoration: none;
  cursor: pointer;
  font-weight: 400;
  border-bottom: 2px solid transparent;
  transition: border 0.2s;
  font-size: 16px;
}

#masthead .nav-main-menu > li > a:hover,
#masthead .nav-main-menu > li.active > a {
  border-bottom: 2px solid #111 !important;
  background: none !important;
  color: black !important;
}

#masthead .nav-main-menu > li > ul {
  display: none !important;
  background: #fff !important;
}

#masthead .nav-main-menu > li > ul > li {
  list-style: none !important;
  font-size: 14px;
}

#masthead .nav-main-menu > li > ul > li > a {
  text-decoration: none;
  color: #111 !important;
  padding: 8px;
  font-weight: 600 !important;
  margin-bottom: 5px;
  display: inline-block;
}

#masthead .nav-main-menu > li > ul > li > ul {
  padding: 0 !important;
}

#masthead .nav-main-menu > li > ul > li > ul > li {
  list-style: none !important;
  font-size: 13px;
  text-transform: capitalize;
}

#masthead .nav-main-menu > li > ul > li > ul > li > a {
  text-decoration: none;
  color: #111 !important;
  padding: 8px;
  display: inline-block;
}

#masthead .nav-main-menu li.active > ul {
  display: flex !important;
  position: fixed;
  left: 0;
  width: 100%;
  justify-content: center;
  gap: 2.5rem;
  padding: 15px;
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(-10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

#masthead .nav-main-menu li.active > ul > li {
  opacity: 0;
  animation: fadeInItem 0.2s ease forwards;
}

#masthead .nav-main-menu li.active > ul > li:nth-child(1) {
  animation-delay: 0.05s;
}
#masthead .nav-main-menu li.active > ul > li:nth-child(2) {
  animation-delay: 0.1s;
}
#masthead .nav-main-menu li.active > ul > li:nth-child(3) {
  animation-delay: 0.15s;
}
#masthead .nav-main-menu li.active > ul > li:nth-child(4) {
  animation-delay: 0.2s;
}
#masthead .nav-main-menu li.active > ul > li:nth-child(5) {
  animation-delay: 0.25s;
}
#masthead .nav-main-menu li.active > ul > li:nth-child(6) {
  animation-delay: 0.3s;
}

@keyframes fadeInItem {
  from {
    opacity: 0;
    transform: translateY(-5px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

#masthead .nav-main-menu li.active > ul .sub-menu.special-submenu a,
#masthead .nav-main-menu li.active > ul .sub-menu.special-submenu-large a {
  opacity: 0;
  animation: fadeInImage 0.2s ease forwards;
}

#masthead .nav-main-menu li.active > ul .sub-menu.special-submenu a:nth-child(1) {
  animation-delay: 0.1s;
}
#masthead .nav-main-menu li.active > ul .sub-menu.special-submenu a:nth-child(2) {
  animation-delay: 0.15s;
}
#masthead .nav-main-menu li.active > ul .sub-menu.special-submenu a:nth-child(3) {
  animation-delay: 0.2s;
}
#masthead .nav-main-menu li.active > ul .sub-menu.special-submenu a:nth-child(4) {
  animation-delay: 0.25s;
}

@keyframes fadeInImage {
  from {
    opacity: 0;
    transform: scale(0.95);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

#masthead .nav-main-menu li.active > ul .sub-menu.special-submenu {
  display: grid !important;
  gap: 15px;
  grid-template-columns: repeat(2, 1fr);
}

#masthead .nav-main-menu li.active > ul .sub-menu.special-submenu-large {
  display: grid !important;
  grid-template-columns: repeat(1, 1fr);
}

#masthead .sub-menu.special-submenu a,
#masthead .sub-menu.special-submenu-large a {
  padding: 0 !important;
  position: relative;
}

#masthead .sub-menu.special-submenu a img {
  width: 125px;
  height: 145px;
  object-fit: contain;
}

#masthead .sub-menu.special-submenu-large a img {
  width: 265px;
  height: 311px;
  object-fit: cover;
}

#masthead .sub-menu.special-submenu a:hover .mega-menu-image-wrapper,
#masthead .sub-menu.special-submenu-large a:hover .mega-menu-image-wrapper {
  display: flex;
}

#masthead .sub-menu.special-submenu a .mega-menu-image-wrapper,
#masthead .sub-menu.special-submenu-large a .mega-menu-image-wrapper {
  position: absolute;
  background: #00000091;
  width: 100%;
  height: 100%;
  color: white;
  justify-content: center;
  align-items: center;
  font-weight: bold;
  text-transform: uppercase;
  font-size: 12px;
  z-index: 1;
  display: none;
}

#masthead .sub-menu.special-submenu-large a .mega-menu-image-wrapper {
  height: auto;
  bottom: 0;
  justify-content: right;
  background: none;
  padding: 15px;
  box-sizing: border-box;
  display: flex;
}

/* Overlay */
#masthead .mega-menu-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: rgb(0 0 0 / 40%);
  backdrop-filter: blur(8px);
  z-index: 9998;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease, backdrop-filter 0.2s ease;
}

#masthead .mega-menu-overlay.active {
  opacity: 1;
  pointer-events: all;
}

#masthead .mega-menu-overlay.closing {
  opacity: 0;
  pointer-events: none;
}

@keyframes fadeInItem {
  from {
    opacity: 0;
    transform: translateY(-5px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

#masthead .nav-main-menu li.active > ul > li {
  opacity: 0;
  animation: fadeInItem 0.2s ease forwards;
}

#masthead .nav-main-menu li.active > ul > li:nth-child(1) {
  animation-delay: 0.05s;
}
#masthead .nav-main-menu li.active > ul > li:nth-child(2) {
  animation-delay: 0.1s;
}
#masthead .nav-main-menu li.active > ul > li:nth-child(3) {
  animation-delay: 0.15s;
}
#masthead .nav-main-menu li.active > ul > li:nth-child(4) {
  animation-delay: 0.2s;
}
#masthead .nav-main-menu li.active > ul > li:nth-child(5) {
  animation-delay: 0.25s;
}
#masthead .nav-main-menu li.active > ul > li:nth-child(6) {
  animation-delay: 0.3s;
}

@keyframes fadeInImage {
  from {
    opacity: 0;
    transform: scale(0.95);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

#masthead .nav-main-menu li.active > ul .sub-menu.special-submenu a,
#masthead .nav-main-menu li.active > ul .sub-menu.special-submenu-large a {
  opacity: 0;
  animation: fadeInImage 0.2s ease forwards;
}

#masthead .nav-main-menu li.active > ul .sub-menu.special-submenu a:nth-child(1) {
  animation-delay: 0.1s;
}
#masthead .nav-main-menu li.active > ul .sub-menu.special-submenu a:nth-child(2) {
  animation-delay: 0.15s;
}
#masthead .nav-main-menu li.active > ul .sub-menu.special-submenu a:nth-child(3) {
  animation-delay: 0.2s;
}
#masthead .nav-main-menu li.active > ul .sub-menu.special-submenu a:nth-child(4) {
  animation-delay: 0.25s;
}

/* Language Switcher */
#masthead .language-switcher {
  display: flex;
  gap: 10px;
}

#masthead .language-switcher a {
  color: #111;
  text-decoration: none;
  font-weight: 500;
}

#masthead .language-switcher a.active {
  text-decoration: underline;
}

/* Search Modal */
.search-modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100vh;
  background: #fff;
  z-index: 10000;
  display: none;
  opacity: 0;
  transform: translateY(-10px);
  transition: all 0.3s ease;
  overflow: auto;
}

.search-modal.active {
  display: block;
  opacity: 1;
  transform: translateY(0);
}

/* Body overflow management */
html.modal-open,
body.modal-open {
  overflow: hidden;
}

body.modal-open .header-wrapper {
  padding-right: 15px;
}

body.mobile-menu-open .header-wrapper {
  z-index: 10000;
}

.search-modal.active .search-results {
  height: calc(100vh - 125px);
  overflow-y: auto;
}

.search-modal-header {
  position: sticky;
  top: 0;
  background: #fff;
  padding: 20px;
  display: flex;
  align-items: center;
  gap: 20px;
  border-bottom: 1px solid #eee;
  z-index: 1;
}

.search-input-wrapper {
  flex: 1;
  position: relative;
  display: flex;
  align-items: center;
}

.search-input-wrapper input {
  width: 100%;
  padding: 15px;
  font-size: 16px;
  border: 1px solid #ddd;
  border-radius: 4px;
  outline: none;
  margin: 0;
}

.search-input-wrapper input:focus {
  border-color: #111;
}

.clear-search {
  position: absolute;
  right: 10px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 5px;
  color: #666;
  display: none;
}

.clear-search.active {
  display: block;
}

.close-search-modal {
  padding: 15px 30px;
  background: #111;
  color: #fff;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  font-weight: 500;
  transition: background 0.3s;
  margin: 0;
  min-height: inherit;
  height: auto !important;
  line-height: normal;
}

.close-search-modal:hover {
  background: #333;
}

.searches-section {
  padding: 20px;
  display: flex;
  gap: 40px;
  border-bottom: 1px solid #eee;
  opacity: 1;
  transform: translateY(0);
  transition: opacity 0.3s ease, transform 0.3s ease;
}

.searches-section.hidden {
  opacity: 0;
  transform: translateY(-10px);
}

/* Search sections - common styles */
.search-history,
.favorite-searches,
.popular-brands {
  flex: 1;
  opacity: 1;
  transform: translateY(0);
  transition: all 0.3s ease;
}

.search-history.hidden,
.favorite-searches.hidden,
.popular-brands.hidden {
  opacity: 0;
  transform: translateY(-10px);
}

/* Staggered animations */
.search-history {
  transition-delay: 0.1s;
}
.favorite-searches {
  transition-delay: 0.2s;
}
.popular-brands {
  transition-delay: 0.3s;
}

.searches-section h3 {
  font-size: 14px;
  font-weight: 600;
  margin-bottom: 15px;
  color: #666;
}

.search-history-list,
.favorite-searches-list,
.popular-brands-list {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.search-tag {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 15px;
  background: #f5f5f5;
  border-radius: 20px;
  color: #333;
  text-decoration: none;
  font-size: 13px;
  transition: all 0.3s;
  cursor: pointer;
}

.search-tag:hover {
  background: #eee;
  text-decoration: none;
}

.search-tag.deleting {
  background: #ddd;
  color: #666;
  pointer-events: none;
  opacity: 0.7;
}

.search-tag .delete-search {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: #ddd;
  cursor: pointer;
  transition: background 0.3s;
}

.search-tag .delete-search:hover {
  background: #ccc;
}

.search-tag .delete-search svg {
  width: 10px;
  height: 10px;
}

.recommended-products-section {
  padding: 20px;
  border-bottom: 1px solid #eee;
  display: block;
}

.recommended-products-section.hidden {
  display: none;
}

.recommended-products-header h3 {
  font-size: 16px;
  font-weight: 600;
  margin-bottom: 15px;
  color: #333;
}

.recommended-products-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 5px;
}

/* Search results */
.search-modal .search-results {
  padding: 20px;
  overflow-y: auto;
  opacity: 0;
  transform: translateY(-10px);
  transition: all 0.3s ease;
}

.search-modal .search-results.active {
  opacity: 1;
  transform: translateY(0);
}

.search-modal .search-results.hidden {
  opacity: 0;
  transform: translateY(-10px);
}

.search-result-link {
  display: flex;
  gap: 15px;
  text-decoration: none;
  color: inherit;
}

.search-result-image img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.search-result-content {
  flex: 1;
}

.search-result-content h4 {
  margin: 0 0 5px;
  font-size: 14px;
  color: #333;
}

.search-result-price {
  font-size: 14px;
}

.sale-price {
  color: #e53e3e;
  font-weight: 600;
  margin-right: 8px;
}

.loading {
  text-align: center;
  padding: 20px;
  color: #666;
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 10px;
}

.spinner {
  width: 24px;
  height: 24px;
  border: 3px solid #f3f3f3;
  border-top: 3px solid #111;
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

@keyframes spin {
  0% {
    transform: rotate(0deg);
  }
  100% {
    transform: rotate(360deg);
  }
}

.no-results,
.error {
  text-align: center;
  padding: 20px;
  color: #666;
}

.error {
  color: #e53e3e;
}

.search-filters {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 15px 20px;
  border-bottom: 1px solid #eee;
}

.filter-badges {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.filter-badge {
  padding: 6px 12px;
  background: #f5f5f5;
  border-radius: 20px;
  font-size: 13px;
  color: #333;
  cursor: pointer;
  transition: all 0.3s ease;
}

.filter-badge:hover {
  background: #eee;
}

.filter-badge.active {
  background: #111;
  color: #fff;
}

.result-count {
  font-size: 13px;
  color: #666;
  padding: 6px 12px;
  background: #f5f5f5;
  border-radius: 20px;
}

.view-all-button {
  display: block;
  margin: 20px auto;
  padding: 12px 30px;
  background: #111;
  color: #fff;
  border: none;
  border-radius: 4px;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.3s ease;
  text-align: center;
  text-decoration: none;
  max-width: 200px;
}

.search-results-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 5px;
}

.search-result-item {
  overflow: hidden;
}

.search-result-link {
  flex-direction: column;
}

.search-result-image {
  width: 100%;
  height: 400px;
  margin-bottom: 15px;
}

.search-result-content h4 {
  font-size: 14px;
  margin-bottom: 10px;
  line-height: 1.4;
}

.search-result-price {
  font-weight: 600;
}

.min-char-warning {
  text-align: center;
  padding: 60px 20px;
  color: #666;
  max-width: 400px;
  margin: 0 auto;
}

.min-char-warning .warning-icon {
  margin-bottom: 20px;
  color: #f59e0b;
}

.min-char-warning h3 {
  font-size: 18px;
  font-weight: 600;
  margin-bottom: 10px;
  color: #333;
}

.min-char-warning p {
  font-size: 14px;
  line-height: 1.5;
  color: #666;
  margin: 0;
}

@media (max-width: 1200px) {
  .search-results-grid,
  .recommended-products-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

@media (max-width: 768px) {
  /* Mobile Menu Button */
  .mobile-menu-button {
    display: block !important;
  }

  /* Search Results Grid */
  .search-results-grid,
  .recommended-products-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .language-switcher {
    display: none;
  }

  .header-main {
    height: auto !important;
    flex: 3;
  }

  .header-right,
  .header-left {
    flex: 1;
  }

  .header-right {
    justify-content: flex-end;
    display: flex;
  }

  .mobile-submenu-container {
    display: none;
  }

  .site-logo {
    transition: all 0.3s ease;
    width: 100px;
    height: 50px;
    max-width: 100px;
    max-height: 50px;
    object-fit: contain;
  }

  .favorites-icon,
  .account-icon {
    display: none;
  }

  /* Main Mobile Menu Container */
  #masthead .header-nav-wrapper {
    position: fixed;
    top: 0;
    left: -100%;
    width: 100vw;
    height: 100vh;
    background: #fff;
    z-index: 10001;
    transition: transform 0.3s ease;
    overflow: hidden;
    display: block !important;
    max-height: none !important;
    border-bottom: none !important;
  }

  #masthead .header-nav-wrapper.active {
    transform: translateX(100%);
  }

  /* Mobile Menu Headers */
  #masthead .mobile-menu-header,
  #masthead .mobile-submenu-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 15px;
    border-bottom: 1px solid #eee;
    background: #fff;
    position: sticky;
    top: 0;
    min-height: 60px;
  }

  #masthead .mobile-menu-header {
    display: flex;
  }

  /* Hide main menu header when submenu is active */
  #masthead .mobile-submenu-container.active ~ .mobile-menu-header,
  #masthead .mobile-submenu-container.active + .mobile-menu-header {
    display: none !important;
  }

  /* Header Buttons */
  #masthead .close-mobile-menu,
  #masthead .back-to-main-menu {
    background: none;
    border: none;
    padding: 8px;
    cursor: pointer;
    color: #111;
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 40px;
    height: 40px;
    border-radius: 4px;
    transition: background 0.3s ease;
    margin: 0;
  }

  #masthead .close-mobile-menu:hover,
  #masthead .back-to-main-menu:hover {
    background: #f5f5f5;
  }

  #masthead .back-to-main-menu svg {
    width: 24px;
    height: 24px;
  }

  /* Header Titles */
  #masthead .submenu-title {
    margin: 0;
    font-size: 18px;
    font-weight: 600;
    color: #111;
    flex: 1;
    text-align: center;
    padding: 0 10px;
  }

  /* Mobile Submenu Container */
  #masthead .mobile-submenu-container {
    position: absolute;
    top: 0;
    left: 100%;
    width: 100%;
    height: 100%;
    background: #fff;
    transition: transform 0.3s ease;
    display: flex;
    flex-direction: column;
  }

  #masthead .mobile-submenu-container.active {
    transform: translateX(-100%);
  }

  /* Content Areas */
  #masthead .mobile-submenu-content {
    flex: 1;
    overflow-y: auto;
    padding: 0;
  }

  /* Menu Lists */
  #masthead .mobile-submenu-list,
  #masthead .mobile-nested-submenu {
    list-style: none;
    margin: 0;
    padding: 0;
  }

  #masthead .mobile-submenu-list li {
    margin-bottom: 0 !important;
  }

  #masthead .mobile-nested-submenu {
    background: #f8f8f8;
  }

  /* Main Navigation Menu */

  #masthead .nav-main-menu > li {
    width: 100%;
    border-bottom: 1px solid #eee;
  }

  #masthead .nav-main-menu > li > a {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 15px;
    font-size: 16px;
    font-weight: 500;
    color: #111;
    text-decoration: none;
    border-bottom: none;
    text-transform: none;
  }

  #masthead .nav-main-menu > li.has-submenu > a::after {
    content: "";
    width: 20px;
    height: 20px;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23111' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M9 18l6-6-6-6'/%3E%3C/svg%3E");
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center;
    transition: transform 0.3s ease;
  }

  #masthead .nav-main-menu > li > a:hover {
    background: #f5f5f5;
    border-bottom: none;
  }

  #masthead .nav-main-menu > li > ul {
    display: none !important;
  }

  /* Menu Items */
  #masthead .mobile-submenu-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 15px;
    font-size: 16px;
    font-weight: 500;
    color: #111;
    text-decoration: none;
    border-bottom: 1px solid #eee;
    background: #fff;
    transition: background 0.3s ease;
  }

  #masthead .mobile-submenu-item:hover {
    background: #f5f5f5;
  }

  #masthead .mobile-submenu-item::after {
    display: none !important;
  }

  /* Visual Items */
  #masthead .mobile-submenu-item.visual-item {
    flex-direction: column;
    align-items: flex-start;
    padding: 15px;
    border-bottom: 1px solid #eee;
  }

  #masthead .mobile-submenu-item.visual-item .item-image {
    width: 100%;
    height: auto;
    object-fit: contain;
    border-radius: 8px;
    margin-bottom: 10px;
    display: block;
  }

  #masthead .mobile-submenu-item.visual-item .item-content {
    width: 100%;
    display: flex;
    justify-content: space-between;
    align-items: center;
  }

  #masthead .mobile-submenu-item.visual-item .item-text {
    font-size: 14px;
    font-weight: 500;
    color: #111;
    flex: 1;
    line-height: 1.4;
  }

  #masthead .mobile-submenu-item.visual-item .item-content::after {
    display: none !important;
  }

  #masthead .mobile-submenu-item.visual-item img {
    max-width: 100%;
    height: auto;
    display: block;
  }

  /* Single Visual Item Styling */
  #masthead .mobile-nested-submenu.has-visual-item {
    padding: 15px;
  }

  #masthead .mobile-nested-submenu.has-visual-item > li {
    border-bottom: none;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
  }

  #masthead .mobile-nested-submenu.has-visual-item .mobile-submenu-item.visual-item {
    padding: 0;
    border-bottom: none;
  }

  #masthead .mobile-nested-submenu.has-visual-item .mobile-submenu-item.visual-item .item-image {
    width: 100%;
    height: auto;
    object-fit: contain;
    margin-bottom: 8px;
    border-radius: 8px 8px 0 0;
  }

  #masthead .mobile-nested-submenu.has-visual-item .mobile-submenu-item.visual-item .item-content {
    padding: 0 15px 15px 15px;
  }

  #masthead .mobile-nested-submenu.has-visual-item .mobile-submenu-item.visual-item .item-text {
    font-size: 14px;
    line-height: 1.4;
  }

  /* Multiple Visual Items Grid */
  #masthead .mobile-nested-submenu.has-visual-items {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    padding: 15px;
  }

  #masthead .mobile-nested-submenu.has-visual-items > li {
    border-bottom: none;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
  }

  #masthead .mobile-nested-submenu.has-visual-items .mobile-submenu-item.visual-item {
    padding: 0;
    border-bottom: none;
  }

  #masthead .mobile-nested-submenu.has-visual-items .mobile-submenu-item.visual-item .item-image {
    width: 100%;
    height: 100px;
    object-fit: cover;
    margin-bottom: 8px;
    border-radius: 8px 8px 0 0;
  }

  #masthead .mobile-nested-submenu.has-visual-items .mobile-submenu-item.visual-item .item-content {
    padding: 0 10px 10px 10px;
  }

  #masthead .mobile-nested-submenu.has-visual-items .mobile-submenu-item.visual-item .item-text {
    font-size: 12px;
    line-height: 1.3;
  }

  /* Regular items in grid should be full width */
  #masthead .mobile-nested-submenu.has-visual-items .mobile-submenu-item:not(.visual-item) {
    grid-column: 1 / -1;
    border-radius: 8px;
    margin: 0;
  }

  /* Search Results Grid */
  #masthead .search-results-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 480px) {
  #masthead .search-results-grid,
  #masthead .recommended-products-grid {
    grid-template-columns: 1fr;
  }
}

#masthead .header-left {
  display: flex;
  align-items: center;
  gap: 15px;
}

#masthead .mobile-menu-button {
  display: none;
  background: none;
  border: none;
  padding: 5px;
  cursor: pointer;
  color: #111;
  margin: 0;
}

#masthead .mobile-menu-button svg {
  width: 24px;
  height: 24px;
}

/* Mobile menu overlay */
#masthead .mega-menu-overlay.mobile-active {
  z-index: 1;
}

/* Ensure mobile menu container is properly positioned */
@media (max-width: 768px) {
  #masthead .header-container {
    height: 100%;
    display: flex;
    flex-direction: column;
  }
}

/* Regular items in grid should be full width */
#masthead .mobile-submenu-content.has-visual-items .mobile-submenu-item:not(.visual-item) {
  grid-column: 1 / -1;
  border-radius: 8px;
  margin: 0;
}

#masthead .nav-main-menu > li > a:hover {
  background: #f5f5f5;
  border-bottom: none;
}

/* Hide desktop submenu behavior on mobile */
#masthead .nav-main-menu > li > ul {
  display: none !important;
}

/* Mobile submenu items styling - NO ARROWS */
#masthead .mobile-submenu-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px 15px;
  font-size: 16px;
  font-weight: 500;
  color: #111;
  text-decoration: none;
  border-bottom: 1px solid #eee;
  background: #fff;
  transition: background 0.3s ease;
}

#masthead .mobile-submenu-item:hover {
  background: #f5f5f5;
}

/* Remove arrows from submenu items */
#masthead .mobile-submenu-item::after {
  display: none !important;
}

/* Visual submenu items with images */
#masthead .mobile-submenu-item.visual-item {
  flex-direction: column;
  align-items: flex-start;
  padding: 15px;
  border-bottom: 1px solid #eee;
}

#masthead .mobile-submenu-item.visual-item .item-image {
  width: 100%;
  height: 120px;
  object-fit: cover;
  border-radius: 8px;
  margin-bottom: 10px;
  display: block;
}

#masthead .mobile-submenu-item.visual-item .item-content {
  width: 100%;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

#masthead .mobile-submenu-item.visual-item .item-text {
  font-size: 14px;
  font-weight: 500;
  color: #111;
  flex: 1;
  line-height: 1.4;
}

/* Remove arrows from visual submenu items too */
#masthead .mobile-submenu-item.visual-item .item-content::after {
  display: none !important;
}

/* Ensure images are visible and properly sized */
#masthead .mobile-submenu-item.visual-item img {
  max-width: 100%;
  height: auto;
  display: block;
}
