/* Базовая разметка */
html, body {
    margin: 0;
    padding: 0;
    height: 100%;
    font-family: Arial, sans-serif;
    box-sizing: border-box;
    padding-top: env(safe-area-inset-top);
    padding-bottom: env(safe-area-inset-bottom);
    padding-left: env(safe-area-inset-left);
    padding-right: env(safe-area-inset-right);
}
html {
    scrollbar-gutter: stable;
}
*, *::before, *::after {
    box-sizing: inherit;
}

body {
    display: flex;
    flex-direction: column;
    overflow-x: hidden;

}
button,
a,
input,
textarea {
    outline: none;
    -webkit-tap-highlight-color: transparent; /* убирает синий фон на iOS Safari */
    -webkit-focus-ring-color: transparent;   /* убирает подсветку на некоторых браузерах */
}
@media screen and (min-width: 769px) {
    /* Основной контейнер */
    main {
        flex: 1;
        padding-top: 64px; /* отступ под фиксированную навигацию */
    }
}
@media screen and (max-width: 769px) {
    main {
        flex: 1;
        padding-bottom: 64px; /* отступ под фиксированную навигацию */
    }
}
/* Навигация */
.main-nav {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 64px;
    background-color: white;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    z-index: 1001;
    display: flex;
    align-items: center;
    padding: 0 20px;

}

/* Внутренний контейнер навигации */
.nav-container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
}

/* Логотип */
.logo-wrapper {
    margin-right: 20px;
    flex-shrink: 0;
}

.logo a {
    font-size: 22px;
    font-weight: 600;
    color: #333;
    text-decoration: none;
    white-space: nowrap;
}
.logo img {
    width: 45px;
    height: auto;
}

/* Кнопка категорий */
.category {
  width: 60px;
  height: 40px;
  background-color: #fff;
  border: 1px solid #ccc;
  border-radius: 6px;
  font-size: 22px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.05);
  transition: background-color 0.2s ease, box-shadow 0.2s ease;
}

.category:hover {
  background-color: #f9f9f9;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
}

/* Поисковая форма */
.nav-search-form {
  display: flex;
  width: 750px;
  margin: 0 auto;
}

.nav-search-form input {
    flex: 1;
    padding: 10px 12px;
    font-size: 16px;
    border: 1px solid #ccc;
    border-radius: 6px 0 0 6px;
    outline: none;
}

.nav-search-form button {
    padding: 10px 15px;
    font-size: 16px;
    border: 1px solid #ccc;
    border-left: none;
    border-radius: 0 6px 6px 0;
    background-color: #ffcc00;
    cursor: pointer;
    transition: background-color 0.2s ease;
}

.nav-search-form button:hover {
    background-color: #e6b800;
}

/* Ссылки */
.nav-links {
    display: flex;
    gap: 15px;
    list-style: none;
    margin-left: 20px;
}

.nav-links a {
    padding: 5px;
    color: #333;
    text-decoration: none;
    border-radius: 6px;
    transition: background-color 0.2s ease;
    display: flex;
    flex-direction: column; /* ставит иконку над текстом */
    align-items: center;
    justify-content: center;
    font-size: 14px;
    gap: 4px;
}
.nav-links i {
    font-size: 18px; /* размер иконки */
}
.nav-links a:hover {
    background-color: #f2f2f2;
}
.nav-left {
    display: flex;
    align-items: center;
    justify-content: space-between; /* распределяем кнопки и форму */
    margin: 20px auto;
    padding: 10px;
    box-sizing: border-box;
    width: 100%;
    gap: 10px;

}
.nav-left-products {
    max-width: 1160px;
    position: sticky;
    top: 64px; /* высота твоей верхней навигации */
    z-index: 1000;
    padding: 10px 15px;
}

@media screen and (min-width: 769px) {
    background: white;
    border-bottom: 1px solid #ddd;
}

.nav-left-news {
    max-width: 750px;
}
.category-toggle-button {
  font-size: 24px;
  cursor: pointer;
  user-select: none;
  padding: 8px 12px;
  background: transparent;
  border: none;
  color: #333;
  z-index: 1100; /* выше чем у nav-search-form */
  position: relative;
}
.nav-left-zone {
  display: flex;
  align-items: center;
  gap: 20px;
}

.section-links {
  display: flex;
  gap: 16px;
  align-items: center; /* добавить */
}

.section-links a {
  color: #333;
  text-decoration: none;
  font-weight: 500;
  font-size: 16px;
  padding: 6px 10px;
  border-radius: 6px;
  transition: background-color 0.2s;
}

.section-links a:hover {
  background-color: #f2f2f2;

}
.nav-left .btn {
    white-space: nowrap;
    font-size: 14px;
    background-color: #0077ff;
    color: #fff;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    transition: background-color 0.2s ease;
}
.nav-left .btn:hover {
    background-color: #005ecc;
}

.dropdown {
  position: relative;
}
.dropdown-content {
  display: none;
  position: absolute;
  background-color: white;
  min-width: 160px;
  box-shadow: 0px 4px 8px rgba(0,0,0,0.1);
  z-index: 1;
  border-radius: 5px;
}
.dropdown-content a {
  color: black;
  padding: 10px 15px;
  text-decoration: none;
  display: block;
}
.dropdown:hover .dropdown-content {
  display: block;
}
.section-links a {
    display: flex;
    flex-direction: column;
    align-items: center;
    font-size: 14px;
    gap: 4px;
}
.section-links i {
    font-size: 18px;
}

.suggest-form input {
    width: 50%;
    padding: 6px;
    margin-right: 6px;
    border: 1px solid #ccc;
    border-radius: 4px;
}
.suggest-form button {
    padding: 6px 12px;

    border: none;
    border-radius: 4px;
    cursor: pointer;
}
.suggest-form button:hover {
    background-color: #d1d1d1;
}
.bottom-nav {
    display: none;
}
.bottom-nav {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    min-width: 100%;
    height: 50px;
    background-color: #fff;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-top: 1px solid #ccc;
    padding: 0 10px;
    z-index: 1000;
}

.bottom-nav .nav-main {
    display: flex;
    gap: 20px;
}

.bottom-nav .nav-more-toggle {
    font-size: 20px;
    cursor: pointer;
}

.more-menu {
    position: fixed;
    bottom: 60px; /* над нижней панелью */
    right: 10px; /* прижата к правому краю */
    background-color: white;
    border: 1px solid #ccc;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
    padding: 8px;
    display: flex;
    flex-direction: column;
    gap: 6px;
    z-index: 9999;
    min-width: 150px;
    max-width: 200px;
    font-size: 14px;
    transition: opacity 0.2s ease, transform 0.2s ease;
    opacity: 0;
    transform: translateY(10px);
    pointer-events: none;
}



.more-menu.show {
    display: flex;
    flex-direction: column;
    opacity: 1;
    transform: translateY(0);
    pointer-events: auto;
}

.more-menu .nav-button {
    display: flex;
    align-items: center;
    gap: 8px;
    text-decoration: none;
    color: #333;
    padding: 4px 6px;
    border-radius: 5px;
    transition: background 0.2s ease;
}

.more-menu .nav-button:hover {
    background-color: #f0f0f0;
}

.more-menu .edit-button {
    background-color: #eee;
    border: none;
    padding: 5px 8px;
    cursor: pointer;
    font-size: 12px;
    border-radius: 5px;
    margin-top: 4px;
    transition: background 0.2s ease;
}

.more-menu .edit-button:hover {
    background-color: #ddd;
}


.nav-button {
    color: #333;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 14px;
    padding: 10px 0;
    text-decoration: none;
    user-select: none;
}

.nav-button:hover {
    color: #878787;
    text-decoration: none;
}

.nav-button i {
    font-size: 20px;
    margin-bottom: 3px;
}

.more-menu.edit-mode #editButtons {
    display: flex !important;
    flex-direction: column !important;
    gap: 6px !important;
    flex-wrap: nowrap !important;
}

.nav-button.draggable {
    cursor: move;
}

#moreButtons,
#editButtons {
    display: flex;
    flex-direction: column; /* ключевая строка */
    gap: 6px;
}


@keyframes shake {
  0% { transform: rotate(0deg); }
  25% { transform: rotate(1deg); }
  50% { transform: rotate(0deg); }
  75% { transform: rotate(-1deg); }
  100% { transform: rotate(0deg); }
}

.nav-button.shaking {
  animation: shake 0.4s infinite;
}

.nav-main {
  display: flex;
  width: 100%;
  align-items: center;
}

.nav-main .nav-button {
  flex: 1;
  text-align: center;
  padding: 8px 0;
  font-size: 14px;
  cursor: pointer;
  border: none;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.nav-button i {
  font-size: 18px;
  margin-bottom: 4px;
}
.u-modal__content {
    background: #fff;
    padding: 20px 25px;
    border-radius: 8px;
    max-width: 400px;
    width: 90%;
    box-shadow: 0 4px 15px rgba(0,0,0,0.2);
    position: relative;
}

.u-modal__content h6 {
    margin: 5px;
}
@media screen and (max-width: 768px) {

  .main-nav {
    display: none !important; /* скрыть верхнюю навигацию */
  }

  .bottom-nav {
    display: flex !important; /* показать нижнюю панель */
  }
  .mobile-taxi-dropdown {
      display: none;
      background-color: white;
      border-radius: 8px;
      box-shadow: 0 4px 8px rgba(0,0,0,0.15);
      z-index: 9999;
      width: 90%;
      max-width: 300px;
      padding: 10px 0;
    }
    .nav-search-form input {
        padding: 5px 6px;
        font-size: 12px;
    }
    /* Внутренние ссылки */
    .mobile-taxi-dropdown-content a {
      display: block;
      padding: 12px 16px;
      text-decoration: none;
      color: #333;
      font-size: 16px;
      border-bottom: 1px solid #eee;
    }

    .mobile-taxi-dropdown-content a:last-child {
      border-bottom: none;
    }

    .mobile-taxi-dropdown-content a:hover {
      background-color: #f2f2f2;
    }

    /* Показываем */
    .mobile-taxi-dropdown.show {
      display: block;
    }
  #mobile-taxi-dropdown {
      position: absolute; /* или fixed */
      top: 0;  /* теперь сверху */
      /* можно настроить left/right для точного позиционирования */
    }
  #nav-panel {
      position: fixed; /* или sticky */
      top: 0;
      left: 0;
      width: 100%;
      z-index: 1000;
    }
}

@media screen and (min-width: 769px) {
  .main-nav {
    display: flex !important; /* показать верхнюю навигацию */
  }

  .bottom-nav {
    display: none !important; /* скрыть нижнюю панель */
  }
}
@media screen and (max-width: 400px) {
    .nav-main .nav-button {
      font-size: 11px;
    }
    .nav-button {
        font-size: 11px;
    }
}