/* ==========================================================================
   cs-mobile-nav.css — meniu mobil modern (injectat de server).
   Afecteaza DOAR ecranele <= 816px (acelasi breakpoint ca navbar-ul temei).
   Pe desktop: complet inactiv.
   Paleta temei: teal #4acbea / #1cbee5, accent rosu #e54646, dark #232323.
   ========================================================================== */

.cs-nav-toggle { display: none; }
.cs-nav { display: none; }

@media (min-width: 817px) {
  .cs-nav,
  .cs-nav-toggle { display: none !important; }
}

@media (max-width: 816px) {

  /* --- ascunde meniul vechi (toggle Bootstrap + collapse-ul teal) --- */
  .navbar-header > .navbar-toggle { display: none !important; }
  #main-nav.navbar-collapse { display: none !important; }

  /* --- buton hamburger --- */
  .cs-nav-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    margin: 3px 12px 0 15px;
    padding: 0;
    border: 0;
    border-radius: 50%;
    background: #eef9fc;
    cursor: pointer;
    vertical-align: top;
    -webkit-tap-highlight-color: transparent;
    transition: background .25s ease, transform .18s ease;
  }
  .cs-nav-toggle:active { transform: scale(.93); background: #e0f4fa; }
  .cs-nav-toggle__box { position: relative; width: 22px; height: 15px; }
  .cs-nav-toggle__bar {
    position: absolute; left: 0;
    width: 22px; height: 2.6px; border-radius: 3px;
    background: #1cbee5;
    transition: width .3s ease;
  }
  .cs-nav-toggle__bar:nth-child(1) { top: 0; }
  .cs-nav-toggle__bar:nth-child(2) { top: 6.2px; width: 15px; }
  .cs-nav-toggle__bar:nth-child(3) { top: 12.4px; }
  .cs-nav-toggle:hover .cs-nav-toggle__bar:nth-child(2) { width: 22px; }

  /* --- root / overlay --- */
  .cs-nav {
    display: block;
    position: fixed;
    inset: 0;
    z-index: 3000;
    visibility: hidden;
    pointer-events: none;
  }
  .cs-nav__backdrop {
    position: absolute;
    inset: 0;
    background: rgba(12, 38, 48, .5);
    opacity: 0;
    transition: opacity .35s ease;
    -webkit-backdrop-filter: blur(2px);
    backdrop-filter: blur(2px);
  }
  .cs-nav__panel {
    position: absolute;
    top: 0; left: 0;
    display: flex;
    flex-direction: column;
    width: 100%;
    max-width: 430px;
    height: 100%;
    background: #fff;
    box-shadow: 22px 0 55px rgba(0, 0, 0, .22);
    transform: translateX(-103%);
    transition: transform .45s cubic-bezier(.22, .61, .36, 1);
    overflow: hidden;
    border-top: 4px solid transparent;
    border-image: linear-gradient(90deg, #4acbea, #1cbee5 60%, #0aa7cc) 1;
  }
  .cs-nav--open { visibility: visible; pointer-events: auto; }
  .cs-nav--open .cs-nav__backdrop { opacity: 1; }
  .cs-nav--open .cs-nav__panel { transform: translateX(0); }

  /* --- antet panou --- */
  .cs-nav__head {
    flex: none;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 18px 20px 12px;
    background: #fff;
    border-bottom: 1px solid #f0f0f0;
  }
  .cs-nav__logo img { height: 34px; width: auto; display: block; }
  .cs-nav__close {
    position: relative;
    flex: none;
    width: 40px; height: 40px;
    border: 0; border-radius: 50%;
    background: #f4f7f8;
    cursor: pointer;
    transition: background .2s ease, transform .18s ease;
  }
  .cs-nav__close:active { transform: scale(.92); background: #e8eef0; }
  .cs-nav__close span {
    position: absolute; top: 50%; left: 50%;
    width: 17px; height: 2.4px;
    margin: -1.2px 0 0 -8.5px;
    border-radius: 3px; background: #232323;
  }
  .cs-nav__close span:nth-child(1) { transform: rotate(45deg); }
  .cs-nav__close span:nth-child(2) { transform: rotate(-45deg); }

  /* --- cautare --- */
  .cs-nav__search {
    flex: none;
    display: flex;
    align-items: center;
    margin: 16px 20px 2px;
    background: #f4f7f8;
    border-radius: 12px;
    overflow: hidden;
  }
  .cs-nav__search input {
    flex: 1 1 auto; min-width: 0;
    border: 0; background: transparent; outline: none;
    padding: 13px 15px;
    font-size: 16px; /* >=16px: fara zoom automat pe iOS la focus */
    color: #232323;
  }
  .cs-nav__search input::placeholder { color: #8a99a0; }
  .cs-nav__search button {
    flex: none;
    display: flex; align-items: center; justify-content: center;
    align-self: stretch; width: 46px;
    border: 0; background: transparent; cursor: pointer;
  }
  .cs-nav__search button svg { width: 19px; height: 19px; stroke: #1cbee5; }

  /* --- corp / grupuri --- */
  .cs-nav__body {
    flex: 1 1 auto;
    min-height: 0;
    overflow-y: auto;
    overscroll-behavior: contain;
    -webkit-overflow-scrolling: touch;
    padding: 6px 20px 22px;
  }
  .cs-nav__group { padding-top: 14px; }
  .cs-nav__group + .cs-nav__group { margin-top: 12px; border-top: 1px solid #f0f0f0; }
  .cs-nav__group-title {
    margin: 0 0 4px;
    padding: 0 4px;
    font-size: 11px; font-weight: 700;
    letter-spacing: .14em; text-transform: uppercase;
    color: #9aa7ad;
  }
  .cs-nav__list { list-style: none; margin: 0; padding: 0; }
  .cs-nav__list li { margin: 0; }

  .cs-nav__link {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 11px 4px;
    font-size: 16px; line-height: 1.25; font-weight: 600;
    color: #232323; text-decoration: none;
    border-bottom: 1px solid #f4f4f4;
    opacity: 0;
    transform: translateY(14px);
    transition:
      opacity .42s ease,
      transform .46s cubic-bezier(.22, .61, .36, 1),
      color .2s ease;
    transition-delay: calc(.05s + var(--i, 0) * .045s);
  }
  .cs-nav__link::after {
    content: "";
    flex: none;
    width: 8px; height: 8px;
    margin-left: 12px;
    border-right: 2px solid #cfd9dd;
    border-top: 2px solid #cfd9dd;
    transform: rotate(45deg);
    transition: border-color .2s ease;
  }
  .cs-nav__link:active { color: #1cbee5; }
  .cs-nav__list--primary .cs-nav__link { font-size: 19px; padding: 13px 4px; }
  .cs-nav__link strong { color: #e54646; font-weight: 700; }
  .cs-nav__link--active { color: #1cbee5; }
  .cs-nav__link--active::after { border-color: #1cbee5; }
  .cs-nav__list--secondary .cs-nav__link {
    font-size: 15px; font-weight: 500; padding: 10px 4px; color: #43525a;
  }
  .cs-nav--open .cs-nav__link { opacity: 1; transform: translateY(0); }

  /* --- subsol CTA --- */
  .cs-nav__foot {
    flex: none;
    padding: 16px 20px calc(18px + env(safe-area-inset-bottom, 0px));
    background: #f7fbfc;
    border-top: 1px solid #eef4f6;
    opacity: 0;
    transform: translateY(12px);
    transition:
      opacity .4s ease .28s,
      transform .45s cubic-bezier(.22, .61, .36, 1) .28s;
  }
  .cs-nav--open .cs-nav__foot { opacity: 1; transform: translateY(0); }
  .cs-nav__cta {
    display: flex;
    flex-wrap: wrap;
    align-items: center; justify-content: center;
    gap: 2px 8px;
    padding: 13px 14px;
    border-radius: 13px;
    background: linear-gradient(100deg, #4acbea, #1cbee5 55%, #0aa7cc);
    color: #fff; font-weight: 700; font-size: 15px;
    text-align: center;
    text-decoration: none;
    box-shadow: 0 10px 22px -10px rgba(28, 190, 229, .9);
  }
  .cs-nav__cta-label,
  .cs-nav__cta-num { white-space: nowrap; }
  .cs-nav__cta-label { font-weight: 500; font-size: 14px; opacity: .92; }
  .cs-nav__cta-num { font-weight: 700; }
  .cs-nav__cta:active { transform: translateY(1px); }
  .cs-nav__cta-cart {
    display: flex;
    align-items: center; justify-content: center;
    gap: 8px;
    margin-top: 10px;
    padding: 12px;
    border: 1.5px solid #e2ecef;
    border-radius: 13px;
    background: #fff;
    color: #232323; font-weight: 600; font-size: 15px;
    text-decoration: none;
  }

  /* =====================================================================
     VARIANTE de meniu (preview: ?meniu=1 drawer / 2 sertar jos / 3 acordeon)
     ===================================================================== */

  /* --- varianta 1: panou lateral (drawer) din STANGA, 75% latime --- */
  .cs-nav--drawer .cs-nav__panel {
    width: 75%;
    box-shadow: 16px 0 40px rgba(0, 0, 0, .24);
  }

  /* --- varianta 2: sertar de jos (bottom sheet) --- */
  .cs-nav--sheet .cs-nav__panel {
    top: auto; bottom: 0; right: 0;
    width: 100%; max-width: 100%;
    height: auto; max-height: 78%;
    border-top: 0; border-image: none;
    border-radius: 20px 20px 0 0;
    transform: translateY(105%);
    box-shadow: 0 -16px 44px rgba(0, 0, 0, .22);
  }
  .cs-nav--sheet.cs-nav--open .cs-nav__panel { transform: translateY(0); }
  .cs-nav--sheet .cs-nav__head {
    position: relative;
    padding-top: 22px;
    border-radius: 20px 20px 0 0;
  }
  .cs-nav--sheet .cs-nav__head::before {
    content: "";
    position: absolute; top: 8px; left: 50%;
    width: 42px; height: 4px; margin-left: -21px;
    border-radius: 3px; background: #dfeaee;
  }

  /* --- varianta 3: acordeon / dropdown din antet --- */
  .cs-nav--accordion .cs-nav__panel {
    top: 0; right: 0; left: 0;
    width: 100%; max-width: 100%;
    height: auto; max-height: 76%;
    border-top: 0; border-image: none;
    border-radius: 0 0 20px 20px;
    transform: translateY(-104%);
    box-shadow: 0 16px 44px rgba(0, 0, 0, .2);
  }
  .cs-nav--accordion.cs-nav--open .cs-nav__panel { transform: translateY(0); }

  /* cand meniul e deschis, blocam scroll-ul de fundal (aplicat pe <html>) */
  .cs-nav-open, .cs-nav-open body { overflow: hidden; }
}
