/* ===== NAVBAR LAYOUT & RESPONSIVENESS ===== */
.desktop-user-menu {
  display: flex !important;
  align-items: center;
  gap: 8px;

  flex-shrink: 0;
}

.dropdown-menu-profile {
  right: 0 !important;
  left: auto !important;
  transform: translateX(0) !important;
}

[dir="rtl"] .dropdown-menu-profile {
  left: 0 !important;
  right: auto !important;
  transform: translateX(0) !important;
}

/* .img-logo {
  height: 101% !important;
  width: auto !important;
  object-fit: contain;
} */

.navbar {
  padding: 0 !important;
  flex-wrap: nowrap !important;
  justify-content: space-between !important;
  height: var(--nav-height);
  transition: all 0.3s;
}

.navbar > .d-flex:first-child {
  flex-shrink: 1;
  min-width: 0;
}

/* Small screens */
@media (max-width: 768px) {
  .desktop-user-menu {
    gap: 4px;
    flex-wrap: nowrap !important;
    flex-shrink: 0;
  }

  .navbar {
    display: flex;
    flex-wrap: nowrap;
  }

  .desktop-user-menu .p-3 {
    padding: 8px !important;
  }

  .desktop-user-menu .dropdown {
    padding: 8px !important;
  }

  .desktop-user-menu svg {
    width: 20px !important;
    height: 20px !important;
  }

  .desktop-user-menu [data-cart-total-quantity] {
    width: 12px !important;
    height: 12px !important;
    font-size: 10px;
  }

  .desktop-user-menu .dropdown-toggle {
    padding: 6px 8px !important;
  }
}

/* Extra small screens */
@media (max-width: 576px) {
  :root {
    --nav-height: 80px;
  }

  .desktop-user-menu {
    gap: 2px;
    flex-wrap: nowrap !important;
    flex-shrink: 0;
  }

  .desktop-user-menu .p-3 {
    padding: 6px !important;
  }

  .desktop-user-menu .dropdown {
    padding: 6px !important;
  }

  .desktop-user-menu svg {
    width: 18px !important;
    height: 18px !important;
  }

  .desktop-user-menu .nav-link-custom {
    padding: 4px 6px !important;
  }

  .desktop-user-menu [data-cart-total-quantity] {
    width: 10px !important;
    height: 10px !important;
    font-size: 8px;
  }

  .desktop-user-menu .dropdown-toggle {
    padding: 4px 6px !important;
  }
}

/* 400px - 450px range fix */
@media (max-width: 450px) {
  .navbar > .d-flex:first-child {
    flex-shrink: 1;
    max-width: 60%;
  }

  .navbar img {
    max-width: 160px !important;
    height: 100%;
  }

  .change_lang {
    font-size: 13px !important;
  }

  [data-toggle-sidebar] svg {
    width: 15px !important;
    height: 15px !important;
  }
}

/* Mobile screens */
@media (max-width: 400px) {
  .img-logo {
    height: 80px !important;
  }

  .desktop-user-menu {
    gap: 1px;
    flex-wrap: nowrap !important;
    flex-shrink: 0;
  }

  .desktop-user-menu .p-3 {
    padding: 4px !important;
  }

  .desktop-user-menu .dropdown {
    padding: 4px !important;
  }

  .desktop-user-menu svg {
    width: 16px !important;
    height: 16px !important;
  }

  .desktop-user-menu .nav-link-custom {
    padding: 2px 4px !important;
  }

  .desktop-user-menu [data-cart-total-quantity] {
    width: 8px !important;
    height: 8px !important;
    font-size: 7px;
  }

  .desktop-user-menu .dropdown-toggle {
    padding: 3px 4px !important;
  }

  .navbar {
    height: 100px !important;
  }

  .navbar img {
    max-width: 150px !important;
  }
}

/* Very small screens */
@media (max-width: 320px) {
  .img-logo {
    height: 70px !important;
  }

  .desktop-user-menu {
    gap: 0;
    flex-wrap: nowrap !important;
    flex-shrink: 0;
  }

  .desktop-user-menu .p-3 {
    padding: 3px !important;
  }

  .desktop-user-menu .dropdown {
    padding: 3px !important;
  }

  .desktop-user-menu svg {
    width: 14px !important;
    height: 14px !important;
  }

  .navbar img {
    max-width: 130px !important;
  }

  .navbar {
    padding-left: 2px !important;
    padding-right: 2px !important;
  }
}

.nav-logo {
  width: 80px;
  transition: all 0.3s;
}

/* Fix for logo height on screens under 450px */
@media (max-width: 450px) {
  .navbar > .d-flex:first-child {
    flex-shrink: 1;
    max-width: 60%;
    height: 100% !important;
    /* Add this */
    align-items: center !important;
    /* Add this */
  }

  .navbar img {
    max-width: 160px !important;
    height: 100% !important;
    /* Change this */
    object-fit: contain;
    /* Add this */
  }

  /* Also fix the navbar height for small screens */
  .navbar {
    height: var(--nav-height) !important;
    transition: all 0.3s;
  }
}

@media (max-width: 400px) {
  .img-logo {
    height: 100% !important;
    /* Change this */
    max-height: 80px !important;
    /* Add max-height instead */
  }

  .navbar {
    height: var(--nav-height) !important;
  }
}

@media (max-width: 320px) {
  .img-logo {
    height: 100% !important;
    /* Change this */
    max-height: 67px !important;
    /* Use max-height instead */
  }
}

.nav-link-custom {
  font-family: "Codec Pro" !important;
  position: relative;
  text-decoration: none;
  color: var(--colors-secondary) !important;
  font-weight: 500;
  transition: all 0.3s ease-in-out;
  padding: 8px 16px !important;
  border: 2px solid transparent;
  border-radius: 6px;
  justify-content: center;
  text-align: center;
}

.nav-link-custom::after {
  display: none;
}

.nav-link-custom:hover,
.nav-link-custom.active {
  border-color: white !important;
  background-color: transparent !important;
}

@media (min-width: 768px) {
  .navbar-scroll {
    height: 100px !important;
  }
}

@media (max-width: 768px) {
  .nav-link-custom:hover,
  .nav-link-custom.active {
    border-color: transparent !important;
  }
}

.nav-link-custom svg {
  transition: transform 0.3s ease;
}

.nav-link-custom:hover svg {
  transform: scale(1.1);
}

/* ===== DROPDOWN STYLES ===== */
.dropdown-item-custom {
  position: relative;
  transition: color 0.2s ease;
}

.dropdown-item-custom::after {
  content: "";
  position: absolute;
  left: 0;
  top: 10%;
  width: 4px;
  height: 80%;
  background-color: var(--theme-color);
  border-radius: 2px;
  opacity: 0;
  transition: opacity 0.3s ease;
}

[dir="rtl"] .dropdown-item-custom::after {
  left: auto;
  right: 0;
}

.dropdown-item-custom.active::after,
.dropdown-item-custom:hover::after {
  opacity: 1;
}

.dropdown-item-custom:hover {
  color: var(--theme-color) !important;
}

.dropdown-item-custom svg {
  transition: transform 0.3s ease;
}

.dropdown-item-custom:hover svg {
  transform: scale(1.1);
}

.dropdown-item-custom.text-danger:hover {
  color: #dc3545 !important;
}

.dropdown-item-custom.text-danger:hover svg {
  color: #dc3545 !important;
}

.dropdown-item-custom.text-danger:hover::after {
  background-color: #dc3545 !important;
}

/* ===== DROPDOWN TOGGLE STYLES ===== */
.dropdown .dropdown-toggle {
  background-color: var(--theme-color) !important;
  color: white !important;
  border: none;
  border-radius: 6px;
  padding: 8px 16px;
  transition: all 0.3s ease;
}

.dropdown .dropdown-toggle:hover {
  background-color: var(--theme-color) !important;
  color: white !important;
  opacity: 0.9;
}

.dropdown.show .dropdown-toggle,
.dropdown .dropdown-toggle:focus {
  background-color: var(--theme-color) !important;
  color: white !important;
  box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.5);
}

.dropdown .dropdown-toggle,
.dropdown .dropdown-toggle span,
.dropdown .dropdown-toggle svg {
  color: white !important;
}

.desktop-user-menu .dropdown .dropdown-toggle {
  background-color: var(--theme-color) !important;
  color: white !important;
}
