/**
 * UI Refresh - Navigation | Material UI style
 * Scope: nav.ui-nav-refresh (navigation.php)
 */
@import url('https://fonts.googleapis.com/css2?family=Roboto:wght@400;500;600;700&display=swap');

/* ========== Material Design tokens ========== */
:root {
  --mui-primary: #1976d2;
  --mui-primary-hover: #1565c0;
  --mui-surface: #ffffff;
  --mui-surface-2: #f5f5f5;
  --mui-surface-3: #eeeeee;
  --mui-on-surface: #1e1e1e;
  --mui-on-surface-variant: #616161;
  --mui-outline: #e0e0e0;
  --mui-outline-variant: #f5f5f5;
  --mui-success: #2e7d32;
  --mui-warning: #ed6c02;
  --mui-error: #d32f2f;
  --mui-elevation-1: 0 1px 2px 0 rgba(0, 0, 0, .05);
  --mui-elevation-2: 0 2px 4px -1px rgba(0, 0, 0, .06), 0 4px 8px -2px rgba(0, 0, 0, .08);
  --mui-elevation-4: 0 4px 12px -2px rgba(0, 0, 0, .1), 0 8px 24px -4px rgba(0, 0, 0, .12);
  --mui-elevation-8: 0 8px 24px -4px rgba(0, 0, 0, .12), 0 16px 48px -8px rgba(0, 0, 0, .16);
  --mui-radius-sm: 8px;
  --mui-radius-md: 12px;
  --mui-radius-full: 9999px;
  --mui-font: 'Roboto', 'Fira Sans', -apple-system, BlinkMacSystemFont, sans-serif;
}

/* ========== Navbar ========== */
nav.ui-nav-refresh.navbar.navbar-default.header,
nav.ui-nav-refresh.navbar.header.web-gradient {
  background: var(--mui-surface);
  background-image: none;
  border: none;
  box-shadow: var(--mui-elevation-1);
  font-family: var(--mui-font);
  min-height: 56px;
}

nav.ui-nav-refresh .container,
nav.ui-nav-refresh .container-fluid {
  padding-top: 8px;
  padding-bottom: 8px;
}

nav.ui-nav-refresh .container-fluid>.row,
nav.ui-nav-refresh .container>.row.nav-row {
  display: flex;
  align-items: center;
}

/* ========== Logo ========== */
nav.ui-nav-refresh .navbar-brand.logo,
nav.ui-nav-refresh .navbar>.container .navbar-brand,
nav.ui-nav-refresh .navbar>.container-fluid .navbar-brand {
  margin-left: 0;
  padding: 6px 0;
  height: auto;
}

nav.ui-nav-refresh .navbar-brand.logo img {
  max-height: 40px;
  width: auto;
  object-fit: contain;
}

/* ========== Hamburger ========== */
nav.ui-nav-refresh .navbar-toggle {
  border: none;
  border-radius: var(--mui-radius-full);
  padding: 10px;
  margin-top: 4px;
  margin-right: 0;
  background: transparent;
  transition: background .2s ease;
}

nav.ui-nav-refresh .navbar-toggle:hover,
nav.ui-nav-refresh .navbar-toggle:focus {
  background: rgba(0, 0, 0, .04);
  outline: none;
}

nav.ui-nav-refresh .navbar-toggle:active {
  background: rgba(0, 0, 0, .08);
}

nav.ui-nav-refresh .navbar-toggle .icon-bar {
  background: var(--mui-on-surface);
  height: 2px;
  width: 18px;
  border-radius: 1px;
}

nav.ui-nav-refresh .navbar-toggle .icon-bar+.icon-bar {
  margin-top: 4px;
}

/* ========== Search – Material outlined (compact, vertical centrat) ========== */
nav.ui-nav-refresh .search-box-inner {
  position: relative;
  margin: 0;
  background: transparent;
}

/* Coloana search – centrat vertical în navbar (la jumătatea axei Y) */
nav.ui-nav-refresh .nav-search-col {
  display: flex;
  align-items: center;
  align-self: center;
}

/* Search + buton Comanda curentă pe același rând */
nav.ui-nav-refresh .nav-search-and-cart {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
}
nav.ui-nav-refresh .nav-search-and-cart .search-box-inner {
  flex: 1;
  min-width: 0;
}
nav.ui-nav-refresh .nav-cart-btn {
  flex-shrink: 0;
  white-space: nowrap;
  font-size: 13px;
  font-weight: 500;
  padding: 7px 14px;
  border-radius: var(--mui-radius-sm);
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: #2563eb !important;
  border-color: #2563eb !important;
  color: #fff !important;
}
nav.ui-nav-refresh .nav-cart-btn:hover,
nav.ui-nav-refresh .nav-cart-btn:focus {
  background: #1d4ed8 !important;
  border-color: #1d4ed8 !important;
  color: #fff !important;
}
nav.ui-nav-refresh .nav-cart-btn .qty_total {
  margin-left: 2px;
}

/* Pe desktop, ascunde „Comanda curentă” din meniu (e în header); pe mobil rămâne doar în meniu */
@media (min-width: 992px) {
  nav.ui-nav-refresh .nav-cart-menu-item {
    display: none !important;
  }
}

nav.ui-nav-refresh .search-box-inner .search-field,
nav.ui-nav-refresh .search-box-inner input.search-field-input {
  width: 100%;
  height: 36px;
  padding: 0 12px;
  border: 1px solid var(--mui-outline);
  border-radius: var(--mui-radius-full);
  background: var(--mui-surface-2);
  color: var(--mui-on-surface);
  font-family: var(--mui-font);
  font-size: 13px;
  letter-spacing: .01em;
  transition: all .25s cubic-bezier(.4, 0, .2, 1);
}

nav.ui-nav-refresh .search-box-inner .search-field::placeholder,
nav.ui-nav-refresh .search-box-inner input.search-field-input::placeholder {
  color: var(--mui-on-surface-variant);
}

nav.ui-nav-refresh .search-box-inner .search-field:hover,
nav.ui-nav-refresh .search-box-inner input.search-field-input:hover {
  background: var(--mui-surface-3);
  border-color: var(--mui-on-surface-variant);
}

nav.ui-nav-refresh .search-box-inner .search-field:focus,
nav.ui-nav-refresh .search-box-inner input.search-field-input:focus {
  outline: none;
  border-color: var(--mui-primary);
  border-width: 2px;
  padding: 0 11px;
  background: var(--mui-surface);
  box-shadow: 0 0 0 4px rgba(25, 118, 210, .12);
}

nav.ui-nav-refresh .search-box-inner .search-field.error,
nav.ui-nav-refresh .search-box-inner input.search-field-input.error {
  border-color: var(--mui-error);
}

/* ========== Search dropdown – mai mare, layout fără suprapuneri ========== */
nav.ui-nav-refresh .ad-search-content-holder {
  position: absolute;
  top: 100%;
  left: 0;
  margin-top: 8px;
  min-width: 420px;
  width: max-content;
  max-width: 90vw;
  background: var(--mui-surface);
  border: none;
  border-radius: var(--mui-radius-md);
  box-shadow: var(--mui-elevation-4);
  padding: 12px;
  max-height: 70vh;
  overflow-y: auto;
  z-index: 1050;
}

nav.ui-nav-refresh .ad-search-content-holder .select-ad-search-option {
  cursor: pointer;
  padding: 14px 16px;
  margin: 4px 0;
  border-radius: var(--mui-radius-sm);
  transition: background .15s ease;
}

nav.ui-nav-refresh .ad-search-content-holder .select-ad-search-option .row {
  margin: 0 -8px;
  display: flex;
  align-items: center;
}

nav.ui-nav-refresh .ad-search-content-holder .select-ad-search-option .col-md-3 {
  width: 72px !important;
  min-width: 72px !important;
  max-width: 72px !important;
  flex: 0 0 72px !important;
  padding: 0 8px;
}

nav.ui-nav-refresh .ad-search-content-holder .select-ad-search-option .col-md-9 {
  flex: 1 !important;
  min-width: 0;
  padding: 0 8px 0 12px;
}

nav.ui-nav-refresh .ad-search-content-holder .select-ad-search-option:hover {
  background: rgba(0, 0, 0, .04);
}

nav.ui-nav-refresh .ad-search-content-holder .select-ad-search-option:hover .search-title {
  color: var(--mui-primary);
}

nav.ui-nav-refresh .ad-search-content-holder .select-ad-search-option i {
  color: var(--mui-primary);
}

nav.ui-nav-refresh .ad-search-content-holder .img-search {
  width: 72px;
  height: 72px;
  object-fit: contain;
  border-radius: var(--mui-radius-sm);
  flex-shrink: 0;
}

nav.ui-nav-refresh .ad-search-content-holder .search-title {
  font-size: 1rem;
  line-height: 1.4;
  font-weight: 500;
  word-wrap: break-word;
}

nav.ui-nav-refresh .ad-search-content-holder .search-code {
  font-size: 0.875rem;
  color: var(--mui-on-surface-variant);
  margin-top: 4px;
}

nav.ui-nav-refresh .ad-search-content-holder .text-center {
  padding: 16px;
  font-size: 0.9375rem;
  color: var(--mui-on-surface-variant);
}

nav.ui-nav-refresh .ad-search-content-holder .ad-search-no-results {
  padding: 20px 16px;
  font-size: 1.0625rem; /* mărit (era 0.9375rem) */
  color: var(--mui-on-surface-variant);
}

/* ========== Nav links – stânga: meniu, comercial, suport; dreapta: profil ========== */
nav.ui-nav-refresh .navbar-nav.navbar-right,
nav.ui-nav-refresh .navbar-nav.nav-navbar-split {
  margin: 8px 0 0;
  display: flex;
  flex-wrap: wrap;
}
nav.ui-nav-refresh .navbar-nav.nav-navbar-split {
  justify-content: flex-start;
  width: 100%;
}
nav.ui-nav-refresh .nav-profile-right {
  margin-left: auto !important;
}

nav.ui-nav-refresh .navbar-nav>li>a,
nav.ui-nav-refresh .navbar-nav .nav-link {
  color: var(--mui-on-surface) !important;
  padding: 8px 12px !important;
  font-weight: 500;
  font-size: 15px; /* mărit pentru lizibilitate (era 14px) */
  letter-spacing: .01em;
  border-radius: var(--mui-radius-sm);
  transition: all .2s cubic-bezier(.4, 0, .2, 1);
  text-decoration: none !important;
}

nav.ui-nav-refresh .navbar-nav>li>a:hover,
nav.ui-nav-refresh .navbar-nav>li>a:focus,
nav.ui-nav-refresh .navbar-nav .nav-link:hover,
nav.ui-nav-refresh .navbar-nav .nav-link:focus {
  color: var(--mui-primary) !important;
  background: rgba(25, 118, 210, .08) !important;
  text-decoration: none !important;
}

nav.ui-nav-refresh .navbar-nav>li>a.active,
nav.ui-nav-refresh .navbar-nav .nav-link.active,
nav.ui-nav-refresh .navbar-nav>.active>a,
nav.ui-nav-refresh .navbar-nav>.active>a:hover,
nav.ui-nav-refresh .navbar-nav>.active>a:focus {
  color: var(--mui-primary) !important;
  background: rgba(25, 118, 210, .12) !important;
  font-weight: 600;
  text-decoration: none !important;
}

nav.ui-nav-refresh .navbar-nav>.open>a,
nav.ui-nav-refresh .navbar-nav>.open>a:hover,
nav.ui-nav-refresh .navbar-nav>.open>a:focus {
  color: var(--mui-primary) !important;
  background: rgba(25, 118, 210, .08) !important;
  text-decoration: none !important;
}

nav.ui-nav-refresh .navbar-nav .dropdown-toggle .fa-caret-down {
  margin-left: 4px;
  font-size: 10px;
  opacity: .7;
}

/* ========== Dropdown menus ========== */
nav.ui-nav-refresh .dropdown .dropdown-menu,
nav.ui-nav-refresh li.dropdown .dropdown-menu,
nav.ui-nav-refresh .navbar-nav .dropdown-menu {
  background: var(--mui-surface) !important;
  border: none !important;
  border-radius: var(--mui-radius-md) !important;
  box-shadow: var(--mui-elevation-4) !important;
  padding: 8px !important;
  margin-top: 8px !important;
  min-width: 240px;
}

nav.ui-nav-refresh .dropdown-menu>li>a,
nav.ui-nav-refresh .dropdown-menu .li-header,
nav.ui-nav-refresh .dropdown .dropdown-menu>li>a {
  padding: 12px 16px !important;
  color: var(--mui-on-surface) !important;
  font-size: 15px; /* mărit pentru lizibilitate (era 14px) */
  letter-spacing: .01em;
  border-radius: var(--mui-radius-sm);
  transition: background .15s ease;
}

nav.ui-nav-refresh .dropdown-menu>li>a:hover,
nav.ui-nav-refresh .dropdown-menu .li-header:hover,
nav.ui-nav-refresh .dropdown .dropdown-menu>li>a:hover {
  background: rgba(0, 0, 0, .04) !important;
  color: var(--mui-primary) !important;
}

nav.ui-nav-refresh .dropdown-menu>li>a:active,
nav.ui-nav-refresh .dropdown-menu .li-header:active {
  background: rgba(0, 0, 0, .08) !important;
}

nav.ui-nav-refresh .dropdown-menu>li>a i,
nav.ui-nav-refresh .dropdown-menu .li-header i,
nav.ui-nav-refresh .dropdown .dropdown-menu .li-header i {
  margin-right: 16px;
  width: 20px;
  text-align: center;
  color: var(--mui-on-surface-variant);
}

nav.ui-nav-refresh .dropdown-menu>li>a:hover i,
nav.ui-nav-refresh .dropdown-menu .li-header:hover i {
  color: var(--mui-primary);
}

/* Profile dropdown header */
nav.ui-nav-refresh .dropdown-menu .img-header,
nav.ui-nav-refresh .dropdown .dropdown-menu .img-header {
  padding: 20px 16px !important;
  text-align: center;
  border-bottom: 1px solid var(--mui-outline-variant);
}

nav.ui-nav-refresh .dropdown-menu .img-header .imagine-profil-header,
nav.ui-nav-refresh .dropdown-menu .img-header .X-staff-profile-image-big {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  object-fit: cover;
}

nav.ui-nav-refresh .dropdown-menu .nume-header {
  padding: 12px 16px 4px;
  font-weight: 600;
  font-size: 16px; /* mărit (era 15px) */
  color: var(--mui-on-surface);
}

nav.ui-nav-refresh .dropdown-menu .email-header {
  padding: 0 16px 12px;
  font-size: 14px; /* mărit (era 13px) */
  color: var(--mui-on-surface-variant);
}

nav.ui-nav-refresh .dropdown-menu .col-md-12 {
  padding: 0 16px;
}

nav.ui-nav-refresh .dropdown-menu .col-md-12 hr {
  border: none;
  border-top: 1px solid var(--mui-outline-variant);
  margin: 8px 0;
}

/* Badge – Material chip */
nav.ui-nav-refresh .dropdown-menu .badge {
  background: var(--mui-primary) !important;
  color: #fff !important;
  font-size: 11px;
  font-weight: 500;
  padding: 2px 10px;
  border-radius: var(--mui-radius-full);
}

/* Submenu */
nav.ui-nav-refresh .dropdown-submenu .dropdown-menu,
nav.ui-nav-refresh .dropdown-submenu .dropdown-menu-left {
  background: var(--mui-surface) !important;
  border: none !important;
  border-radius: var(--mui-radius-md) !important;
  box-shadow: var(--mui-elevation-4) !important;
}

nav.ui-nav-refresh .dropdown-submenu .dropdown-menu {
  left: 100%;
  top: 0;
  margin-top: -8px;
}

/* Submenu deschis în stânga când nu are loc în dreapta (ex: limba în profile dropdown) */
nav.ui-nav-refresh .dropdown-submenu.pull-left .dropdown-menu {
  left: auto;
  right: 100%;
  margin-right: -1px;
}

nav.ui-nav-refresh .dropdown-submenu:hover .dropdown-menu {
  display: block;
}

/* Profile image */
nav.ui-nav-refresh .client-profile-image-small {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  object-fit: cover;
  margin-right: 8px;
}

nav.ui-nav-refresh .customers-nav-item-profile .dropdown-toggle {
  display: flex;
  align-items: center;
}

/* ========== Responsive ========== */
@media (max-width: 991px) {
  nav.ui-nav-refresh .navbar-collapse {
    margin-top: 8px;
    padding-top: 12px;
  }

  nav.ui-nav-refresh .ad-search-content-holder {
    min-width: 280px;
  }

  nav.ui-nav-refresh .search-box-inner {
    margin-bottom: 8px;
  }

  nav.ui-nav-refresh .search-box-inner .search-field,
  nav.ui-nav-refresh .search-box-inner input.search-field-input {
    background: var(--mui-surface);
  }

  nav.ui-nav-refresh .navbar-nav>li>a,
  nav.ui-nav-refresh .navbar-nav .nav-link {
    padding: 10px 12px !important;
    border-radius: var(--mui-radius-sm);
  }
}

/* ========== Mobile Drawer – un singur rând: logo stânga, hamburger dreapta ========== */
@media (max-width: 991px) {
  nav.ui-nav-refresh .nav-row {
    display: flex;
    flex-direction: row;
    flex-wrap: nowrap;
    align-items: center;
    width: 100%;
  }

  nav.ui-nav-refresh .nav-search-col {
    display: none !important; /* ascuns pe ecrane mici */
  }

  nav.ui-nav-refresh .nav-brand-col {
    flex: 1 1 auto;
    min-width: 0;
    display: flex;
    justify-content: flex-start;
    align-items: center;
  }

  nav.ui-nav-refresh .nav-menu-col {
    flex: 0 0 auto;
    display: flex;
    align-items: center;
    justify-content: flex-end;
  }

  nav.ui-nav-refresh .nav-drawer-toggle {
    display: block !important;
    margin: 0;
    padding: 10px 12px;
  }

  /* Drawer – panou fix dreapta, slide-in */
  nav.ui-nav-refresh .nav-drawer.navbar-collapse {
    position: fixed;
    top: 0;
    right: 0;
    bottom: 0;
    width: 300px;
    max-width: 85vw;
    margin: 0;
    padding: 56px 16px 24px 16px;
    background: var(--mui-surface);
    box-shadow: -8px 0 24px rgba(0, 0, 0, 0.15);
    z-index: 1040;
    overflow-y: auto;
    transform: translateX(100%);
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    border-left: 1px solid var(--mui-outline-variant);
  }

  nav.ui-nav-refresh .nav-drawer.navbar-collapse.in {
    transform: translateX(0);
  }

  nav.ui-nav-refresh .nav-drawer-close {
    display: block;
    position: absolute;
    top: 12px;
    right: 12px;
    width: 40px;
    height: 40px;
    padding: 0;
    border: none;
    background: transparent;
    font-size: 28px;
    line-height: 1;
    color: var(--mui-on-surface);
    cursor: pointer;
    opacity: 0.7;
    border-radius: var(--mui-radius-full);
    transition: opacity 0.2s ease, background 0.2s ease;
  }

  nav.ui-nav-refresh .nav-drawer-close:hover {
    opacity: 1;
    background: rgba(0, 0, 0, 0.06);
  }

  nav.ui-nav-refresh .nav-drawer .navbar-nav {
    flex-direction: column !important;
    align-items: stretch;
    margin: 0;
  }

  nav.ui-nav-refresh .nav-drawer .navbar-nav>li {
    margin: 0;
  }

  nav.ui-nav-refresh .nav-drawer .navbar-nav>li>a,
  nav.ui-nav-refresh .nav-drawer .navbar-nav .nav-link {
    padding: 14px 16px !important;
    border-radius: var(--mui-radius-sm);
    display: block;
  }

  nav.ui-nav-refresh .nav-drawer .dropdown-menu {
    position: static !important;
    float: none !important;
    box-shadow: none !important;
    border: none !important;
    background: rgba(0, 0, 0, .03) !important;
    border-radius: var(--mui-radius-sm);
    margin: 4px 0 12px 16px !important;
    display: none;
  }

  nav.ui-nav-refresh .nav-drawer .dropdown.open .dropdown-menu {
    display: block !important;
  }

  /* Overlay – backdrop când drawer-ul e deschis (body.nav-drawer-open setat via JS) */
  nav.ui-nav-refresh .nav-drawer-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.4);
    z-index: 1039;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
    cursor: pointer;
  }

  body.nav-drawer-open nav.ui-nav-refresh .nav-drawer-overlay {
    opacity: 1;
    visibility: visible;
  }

  body.nav-drawer-open {
    overflow: hidden;
  }
}

@media (min-width: 992px) {
  body.nav-drawer-open {
    overflow: visible;
  }

  nav.ui-nav-refresh .nav-drawer-toggle {
    display: none !important;
  }

  nav.ui-nav-refresh .nav-drawer-overlay {
    display: none !important;
  }

  nav.ui-nav-refresh .nav-drawer-close {
    display: none;
  }

  /* Desktop: drawer revine la meniu normal inline */
  nav.ui-nav-refresh .nav-drawer.navbar-collapse {
    position: static;
    transform: none;
    width: auto;
    max-width: none;
    padding: 0;
    box-shadow: none;
    overflow: visible;
    border-left: none;
  }

  nav.ui-nav-refresh .nav-drawer .navbar-nav {
    flex-direction: row !important;
  }

  nav.ui-nav-refresh .nav-drawer .dropdown-menu {
    position: absolute !important;
    background: var(--mui-surface) !important;
    box-shadow: var(--mui-elevation-4) !important;
  }
}

@media (max-width: 767px) {
  nav.ui-nav-refresh .search-box-inner {
    margin-top: 4px;
    padding: 0 12px;
  }

  nav.ui-nav-refresh .navbar-nav .open .dropdown-menu {
    background: var(--mui-surface) !important;
    border: none !important;
    border-radius: var(--mui-radius-md) !important;
    margin: 8px 12px !important;
    box-shadow: var(--mui-elevation-2) !important;
  }

  nav.ui-nav-refresh .navbar-nav .open .dropdown-menu>li>a,
  nav.ui-nav-refresh .navbar-nav .open .dropdown-menu .li-header {
    color: var(--mui-on-surface) !important;
  }

  nav.ui-nav-refresh .navbar-nav .open .dropdown-menu>li>a:hover,
  nav.ui-nav-refresh .navbar-nav .open .dropdown-menu .li-header:hover {
    background: rgba(25, 118, 210, .08) !important;
    color: var(--mui-primary) !important;
  }

  nav.ui-nav-refresh .ad-search-content-holder {
    min-width: 260px;
  }

  nav.ui-nav-refresh .nav-drawer.navbar-collapse {
    width: 280px;
  }
}

.navbar-default .navbar-nav>li>a {
  color: #6c757d;
  line-height: 20px;
  font-size: 15px
}

.navbar-default .navbar-nav>li>a:focus,
.navbar-default .navbar-nav>li>a:hover,
.navbar-default .navbar-nav>li>a:active {
  background: 0 0;
  border-radius: var(--mui-radius-sm);
  color: #343a40 !important;
  margin: 0 4px;
}

/* Pagina Comanda curentă – butoane primary albastru închis (dash-primary) */
.omni-cart-back-btn,
.omni-cart-checkout-btn {
  background: #2563eb !important;
  border-color: #2563eb !important;
  color: #fff !important;
}
.omni-cart-back-btn:hover,
.omni-cart-back-btn:focus,
.omni-cart-checkout-btn:hover,
.omni-cart-checkout-btn:focus {
  background: #1d4ed8 !important;
  border-color: #1d4ed8 !important;
  color: #fff !important;
}