[data-y="nav"],
[data-y="nav"] .navbar {
  margin: 0 !important;
}

.navbar {
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.08);
  position: fixed;
  top: 0;
  z-index: 1000;
  width: 100%;
  height: fit-content;
  padding: 0.8rem 4rem;
  display: grid;
  grid-template-columns: 0.75fr 3fr 0.25fr;
  grid-template-areas: "logo links icons";
  justify-content: space-between;
  align-items: center;
  background-color: var(--y-main);
  min-height: 70px;
  width: 100%;
  visibility: visible;
  opacity: 1;
}

.logo {
  width: 77px;
  max-width: 100%;
}

.top-row {
  display: flex;
  align-items: center;
  gap: 5rem;
}

.links {
  display: flex;
  gap: 3rem;
}

.links a {
  font-size: 1.2rem;
  color: #333;
  font-weight: 600;
  position: relative;
  transition: color 0.3s ease;
  white-space: nowrap;
}

.dropdown {
  position: relative;
  display: inline-block;
}

.dropdown-content {
  display: none;
  position: absolute;
  background-color: #fff;
  min-width: 160px;
  box-shadow: 0px 8px 16px 0px rgba(0, 0, 0, 0.2);
  z-index: 1001;
  border-radius: 4px;
  top: 100%;
  right: 50%;
  transform: translateX(50%);
  padding: 0.5rem 0;
}

.dropdown-content a {
  color: #333;
  padding: 12px 16px;
  text-decoration: none;
  display: block;
  font-size: 1rem;
  text-align: center;
}

.dropdown-content a::after {
  display: none;
}

.dropdown-content a:hover {
  background-color: #f9f9f9;
  color: #be8647;
}

.dropdown:hover .dropdown-content {
  display: block;
}

.dropdown:hover > a {
  color: #be8647;
}

.dropdown:hover > a::after {
  width: 100%;
}

.dropdown-arrow {
  margin-right: 0.5rem;
  font-size: 0.85em;
  transition: transform 0.3s ease;
}

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

.links a::after {
  content: "";
  position: absolute;
  bottom: -5px;
  left: 0;
  width: 0%;
  height: 2px;
  background: #be8647;
  transition: width 0.3s ease;
}

.links a:hover::after,
.links a[data-active]::after {
  width: 100%;
}

.links a:hover {
  color: #be8647;
}

.icons {
  display: flex;
  gap: 1rem;
  font-size: 1.3rem;
  cursor: pointer;
}

.icons i:hover {
  color: #be8647;
}

.logo-container .search-container {
  display: none;
}

.icons .search-container {
  display: flex;
  align-items: center;
}
.search-input {
  position: absolute;
  left: 100%;
  margin-left: 0.5rem;
  width: 0;
  padding: 0.5rem 1rem;
  border: 1px solid #ccc;
  border-radius: 20px;
  opacity: 0;
  transition: width 0.3s ease, opacity 0.3s ease;
  background: #fff;
  outline: none;
}

.search-container:hover .search-input,
.search-input:focus {
  width: 300px;
  opacity: 1;
}

.search-icon:hover,
.search-icon-btn:hover .search-icon {
  color: #be8647;
}

.search-icon-btn {
  background: none;
  border: none;
  padding: 0;
  cursor: pointer;
  color: inherit;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

@media (max-width: 992px) {
  .navbar {
    padding: 0.8rem 2rem;
  }

  .top-row {
    gap: 2rem;
  }

  .links {
    gap: 2rem;
  }
}

.hamburger-menu {
  display: none;
  background: none;
  border: none;
  font-size: 1.5rem;
  cursor: pointer;
  color: #333;
  padding: 0.5rem;
  transition: color 0.3s ease;
}

.hamburger-menu:hover {
  color: #be8647;
}

.mobile-menu-overlay {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(5px);
  -webkit-backdrop-filter: blur(5px);
  z-index: 9998;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.mobile-menu-overlay.active {
  display: block;
  opacity: 1;
}

.mobile-menu {
  position: fixed;
  top: 0;
  right: -50%;
  width: 50%;
  height: 100%;
  background: #fff;
  z-index: 9999;
  transition: right 0.3s ease;
  overflow-y: auto;
  box-shadow: -2px 0 10px rgba(0, 0, 0, 0.1);
}

.mobile-menu.active {
  right: 0;
}

.mobile-menu-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1.5rem;
  border-bottom: 1px solid #eee;
}

.mobile-menu-logo {
  width: 100px;
  height: auto;
}

.mobile-menu-close {
  background: none;
  border: none;
  font-size: 1.5rem;
  cursor: pointer;
  color: #333;
  padding: 0.5rem;
  transition: color 0.3s ease;
}

.mobile-menu-close:hover {
  color: #be8647;
}

.mobile-menu-links {
  display: flex;
  flex-direction: column;
  padding: 1rem 0;
}

.mobile-menu-links > a {
  padding: 1rem 1.5rem;
  color: #333;
  text-decoration: none;
  font-size: 1.2rem;
  font-weight: 600;
  border-bottom: 1px solid #f0f0f0;
  transition: background-color 0.3s ease, color 0.3s ease;
}

.mobile-menu-links > a:hover,
.mobile-menu-links > a.active {
  background-color: #f9f9f9;
  color: #be8647;
}

.mobile-dropdown {
  border-bottom: 1px solid #f0f0f0;
}

.mobile-dropdown-toggle {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1rem 1.5rem;
  color: #333;
  text-decoration: none;
  font-size: 1.2rem;
  font-weight: 600;
  cursor: pointer;
  transition: background-color 0.3s ease, color 0.3s ease;
}

.mobile-dropdown-toggle:hover {
  background-color: #f9f9f9;
  color: #be8647;
}

.mobile-dropdown-arrow {
  transition: transform 0.3s ease;
  font-size: 0.9rem;
}

.mobile-dropdown.active .mobile-dropdown-arrow {
  transform: rotate(180deg);
}

.mobile-dropdown-content {
  display: none;
  background-color: #f9f9f9;
  padding: 0.5rem 0;
}

.mobile-dropdown.active .mobile-dropdown-content {
  display: block;
}

.mobile-dropdown-content a {
  display: block;
  padding: 0.75rem 2.5rem;
  color: #666;
  text-decoration: none;
  font-size: 1rem;
  transition: background-color 0.3s ease, color 0.3s ease;
}

.mobile-dropdown-content a:hover {
  background-color: #f0f0f0;
  color: #be8647;
}

@media (max-width: 820px) {
  .navbar {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: stretch;
    padding: 0.75rem 1rem;
    gap: 0.75rem;
    min-height: auto;
    height: auto;
    width: 100%;
    grid-template-columns: unset;
    grid-template-areas: unset;
  }

  .logo-container .search-container {
    position: relative;
    display: flex;
    align-items: center;
  }
  .icons .search-container {
    display: none;
  }
  .logo-container {
    display: flex;
    flex-direction: row-reverse;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    order: 1;
  }

  .logo {
    width: 90px;
    height: auto;
    max-height: 45px;
  }

  .icons {
    display: flex;
    flex-direction: row-reverse;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    font-size: 1.2rem;
    flex-wrap: nowrap;
    width: 100%;
    order: 2;
  }

  .hamburger-menu {
    display: block;
  }

  .links {
    display: none;
  }

  .logo-container .search-container {
    position: relative;
    display: flex;
    align-items: center;
  }

  .logo-container .search-input {
    width: 100%;
    max-width: 400px;
    padding: 0.5rem 1rem;
    border: 1px solid #ccc;
    border-radius: 20px;
    background: #fff;
    outline: none;
    opacity: 1;
    position: relative;
    left: auto;
    margin-left: 0;
  }

  .logo-container .search-icon {
    position: absolute;
    left: 1rem;
    pointer-events: none;
  }
  .hamburger-menu i {
    float: inline-start;
  }
}

@media (max-width: 576px) {
  .navbar {
    padding: 0.6rem 0.75rem;
    gap: 0.6rem;
  }

  .logo {
    width: 70px;
    max-height: 40px;
  }

  .icons {
    font-size: 1rem;
    gap: 0.5rem;
  }

  .hamburger-menu {
    font-size: 1.1rem;
  }

  .logo-container .search-input {
    max-width: 100%;
    font-size: 0.9rem;
    padding: 0.4rem 0.8rem;
  }

  .logo-container .search-icon {
    left: 0.8rem;
    font-size: 0.9rem;
  }

  .mobile-menu {
    width: 75%;
    right: -75%;
  }

  .mobile-menu-links > a,
  .mobile-dropdown-toggle {
    font-size: 1rem;
    padding: 0.9rem 1.2rem;
  }
}

@media (max-width: 402px) {
  .navbar {
    padding: 0.5rem 0.6rem;
    gap: 0.5rem;
  }

  .search-container:hover .search-input,
  .search-input:focus {
    width: 100%;
    margin-bottom: 0;
  }
  .logo {
    width: 60px;
    max-height: 35px;
  }

  .icons {
    font-size: 0.95rem;
    gap: 0.4rem;
  }

  .hamburger-menu {
    font-size: 1rem;
  }

  .logo-container .search-input {
    font-size: 0.85rem;
    padding: 0.35rem 0.7rem;
  }

  .logo-container .search-icon {
    left: 0.7rem;
    font-size: 0.85rem;
  }

  .mobile-menu {
    width: 85%;
    right: -85%;
  }

  .mobile-menu-logo {
    width: 60px;
  }

  .mobile-menu-links > a,
  .mobile-dropdown-toggle {
    font-size: 0.95rem;
    padding: 0.8rem 1rem;
  }
}

body[data-current-page="home"] .links a[data-page="home"],
body[data-current-page="products"] .links a[data-page="products"],
body[data-current-page="offers"] .links a[data-page="offers"],
body[data-current-page="contact"] .links a[data-page="contact"] {
  color: #be8647;
}

body[data-current-page="home"] .links a[data-page="home"]::after,
body[data-current-page="products"] .links a[data-page="products"]::after,
body[data-current-page="offers"] .links a[data-page="offers"]::after,
body[data-current-page="contact"] .links a[data-page="contact"]::after {
  width: 100%;
}
