body {
  margin: 0;
  padding: 0;
  overflow: scroll;
  background-image: url(../media/background_pattern.png);
  background-repeat: repeat;
}

@media (min-width: 1320px) {
  body {
    width: 75%;
    margin: 0 auto;
  }
}

.menu-top {
  position: sticky;
  top: 0.001px;
  z-index: 100;
  background-color: rgb(255, 255, 255);
  margin-bottom: 20px;
}

.logo {
  width: 100px;
  height: 50px;
  overflow: hidden;
  margin-bottom: 0;
  padding-top: 0;
}

.navbar-brand {
  margin-top: 10px;
  width: 320px;
}

@media (min-width: 376px) {
  .logo {
    width: 100%;
    height: 100%;
    overflow: visible;
    margin-bottom: 10px;
    padding-top: 10px;
  }
  .navbar-brand {
    width: auto;
    height: 20px;
    margin-bottom: 5px;
  }
}

@media (min-width: 414px) {
  .logo {
    margin-bottom: 0px;
    padding-top: 0px;
  }
  .navbar-brand {
    height: 30px;
  }
}

@media (min-width: 453px) {
  .navbar-brand {
    height: 35px;
  }
}

@media (min-width: 768px) {
  .navbar-brand {
    height: 40px;
  }
}

@media (min-width: 992px) {
  .scan-button-block {
    display: none;
  }
  .logo {
    width: 320px;
  }
  .menu-top {
    display: flex;
  }
  .catalog-button-block > button {
    margin-left: 20px;
  }
  .search-field-wrapper {
    position: relative;
    margin-left: 10px;
    width: 320px;
  }
  .catalog-button-block,
  .search-field-wrapper {
    padding-top: 10px;
  }
}

.menu-auth {
  width: 150px;
  height: 100px;
  position: absolute;
  top: 8px;
  right: 10px;
}

.menu-auth-btn {
  display: flex;
}

.menu-auth-exit {
  width: 100px;
  height: 40px;
  flex: 1;
  margin-left: auto;
}

.menu-auth-photo {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  margin-right: 10px;
  object-fit: cover;
  clip-path: circle(50% at 50% 50%);
}

@media (max-width: 452px) {
  .menu-auth-photo,
  .menu-auth-exit {
    height: 36px;
  }
}

.center {
  display: flex;
  justify-content: center;
  margin-top: 20px;
}

.interactive {
  width: 100%;
  max-width: 640px;
}

.swiper-slide .item-list p {
  color: #023616;
  font-weight: 600;
  text-align: center;
  margin-left: 5px;
}

.swiper-slide#item-details {
  border: 1px solid rgb(211, 210, 210);
  border-radius: 10px;
}

.extra-list .item-list p {
  color: #023616;
  font-weight: 600;
  text-align: center;
}


.card .item-list p {
  color: #023616;
  font-weight: 600;
  text-align: center;
}

.swiper {
  width: 95%;
}

.swiper_popular_products {
  width: 95%;
  margin: 0 auto;
  overflow: hidden;
}

.card-text.item-name,
.card-text.item-name-top,
.card-text#item-name-top {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  font-size: 14px;
  text-align: center;
}

.card-text.item-price,
.card-text.item-info,
.card-text#item-info {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.price {
  padding-left: 5px;
}

.index-top-info {
  display: flex;
  justify-content: space-between;
}

.card-text.item-rating,
.rating {
  font-size: 14px;
}

.svg-index {
  margin-top: -10px;
}

.swiper-pagination {
  position: static !important;
  margin-top: -5px;
  text-align: center;
  bottom: auto !important;
}

.swiper-pagination-bullet {
  margin-left: 7px;
}

#today.swiper .swiper-wrapper {
  display: flex;
  align-items: center;
}

@media (min-width: 412px) and (max-width: 991px) {
  .flex-block {
    display: flex;
    margin-bottom: 3px;
  }
  .catalog-button-block,
  .scan-button-block {
    width: 100%;
    flex: 1;
  }
  .catalog-button-block > button,
  .scan-button-block > a {
    width: 100%;
  }
  .catalog-button-block {
    padding-right: 4px;
  }
  .scan-button-block {
    margin-left: auto;
  }
}

@media (max-width: 412px) {
  .catalog-button-block > button,
  .scan-button-block > a {
    width: 100%;
    margin-bottom: 2px;
  }
}

.offcanvas-header {
  margin-left: 3px;
  margin-bottom: -20px;
}

.catalog-item {
  width: 100%;
  overflow: auto;
  margin: 3px 0;
  background: #f0f0f0;
  text-align: center;
}

.catalog-item:hover {
  background: #c0c0c0;
}

.chevron-catalog {
  float: right;
}

.text-catalog {
  width: auto;
  float: left;
}

.hidden {
  display: none;
}

.search-field-wrapper {
  position: relative;
}

.search-input {
  padding-left: 2.5em;
  background-color: #198754;
}

.icon-search-input {
  position: absolute;
  left: 0.5em;
  top: 50%;
  transform: translateY(-55%);
}

.search-input::placeholder {
  color: white;
}

.icon-search-svg {
  fill: white;
  height: 20px;
}

@media (min-width: 992px) {
  .icon-search-svg {
    fill: black;
  }
  .search-input::placeholder {
    color: black;
  }
  .search-input {
    background-color: white;
  }
}

.btn-save-profile {
  display: block;
  width: 50%;
  margin: 0 auto;
  margin-bottom: 3px;
}

.user-photo > img {
  display: block;
  margin: 0 auto;
  border-radius: 50px;
}

.edit-profile {
  display: block;
  margin: 0 auto;
}

@media (min-width: 400px) {
  .edit-profile {
    display: block;
    width: 90%;
    margin: 0 auto;
  }
}

@media (min-width: 500px) {
  .edit-profile {
    display: block;
    width: 75%;
    margin: 0 auto;
  }
}

@media (min-width: 600px) {
  .edit-profile {
    display: block;
    width: 60%;
    margin: 0 auto;
  }
}

@media (min-width: 700px) {
  .edit-profile {
    display: block;
    width: 50%;
    margin: 0 auto;
  }
}

@media (min-width: 992px) {
  .edit-profile {
    display: block;
    width: 500px;
    margin: 0 auto;
  }
}

/* Двойные кнопки в профиле и логин-странице */
.two-buttons {
  display: flex;
  justify-content: space-between;
  align-items: center;
  width: 100%;
}

.two-buttons .btn {
  flex: 1;
  margin: 0;
  text-align: center;
  box-sizing: border-box;
}

.two-buttons .btn:first-child {
  margin-right: 5px;
}

.two-buttons .btn:last-child {
  margin-left: 5px;
}

.disabled-button {
  opacity: 0.5;
  cursor: not_allowed;
  cursor: not-allowed;
  pointer-events: none;
}

.description_container {
  margin: 0 auto;
  width: 95%;
}

.comment-avatar {
  width: 50px;
  height: 50px;
  border-radius: 50%;
  margin-right: 10px;
  object-fit: cover;
  clip-path: circle(50% at 50% 50%);
}

.form-group label {
  display: none;
}

.card-img-top {
  border-radius: 10px;
}

.sticky-description {
  position: sticky;
  top: 75px;
}

.rating-description {
  position: absolute;
  top: 10px;
  right: 10px;
  color: white;
  background-color: rgb(1, 72, 82);
  padding: 5px 10px;
  border-radius: 5px;
  z-index: 1;
}

.rating {
  margin-left: auto;
  padding-right: 5px;
}

.card#item-details {
  border: 1px solid rgb(211, 210, 210);
  border-radius: 10px;
  margin-bottom: 5px;
}

.pagination-list {
  display: flex;
  margin-top: 10px;
}

.step-links {
  flex: 1;
  text-align: center;
}

.no-results {
  width: 300px;
  text-align: center;
  margin: 0 auto;
}

.extra-list {
  margin: 0 auto;
  margin-top: 10px;
}

@media (min-width: 380px) {
  .extra-list {
    width: 85%;
  }
}

@media (min-width: 576px) {
  .extra-list {
    width: 100%;
  }
}

@media (min-width: 1200px) {
  .extra-list {
    width: 80%;
  }
}

.popular-groups {
  text-align: center;
}

/* Сдвиг двух последних карточек на узких экранах */
@media (min-width: 300px) and (max-width: 575px) {
  .popular-groups #first {
    padding-left: 80px;
  }
  .popular-groups #second {
    padding-right: 80px;
  }
}

@media (min-width: 680px) {
  .popular-groups {
    width: 85%;
    margin: 0 auto;
  }
}

@media (min-width: 800px) {
  .popular-groups {
    width: 70%;
    margin: 0 auto;
  }
}

@media (min-width: 1300px) {
  .popular-groups {
    width: 60%;
    margin: 0 auto;
  }
}

/* Карточка — гибкий столбец фиксированной минимальной высоты */
.popular-groups .col,
.popular-groups .col-6 {
  margin-top: 10px;
  text-align: center;
  min-height: 220px;
  display: flex;
  flex-direction: column;
}

/* Ссылка занимает всё место в карточке, текст центрируется по-настоящему */
.popular-groups a.item-list {
  display: block;
  text-decoration: none;
  color: inherit;
  flex: 1;
}



.popular-groups a.item-list img {
  width: 90px;
  height: 90px;
  object-fit: cover;
  border-radius: 50%;       
  display: block;
  margin: 0 auto;          
}

@media (max-width: 450px) {
  .popular-groups a.item-list img {
    width: 75px;
    height: 75px;
  }
}


.popular-groups a.item-list p {
  color: #023616;
  font-weight: 600;
  text-align: center;
  margin: 8px 0 0;
  font-size: 13px;
  overflow-wrap: normal;      /* не рвать слова посредине */
  hyphens: auto;              /* корректные переносы: «море-продукты» */
}


.information {
  width: 90%;
  margin: 0 auto;
  hyphens: auto;
}

.title-information {
  text-align: center;
  hyphens: none;
}

.form-feed-back {
  width: 50%;
  margin: 0 auto;
}

@media (max-width: 750px) {
  .form-feed-back {
    width: 80%;
  }
}

@media (max-width: 992px) {
  .sidebar-sticky {
    position: sticky;
    top: 175px;
  }
}

@media (min-width: 992px) {
  .sidebar-sticky {
    position: sticky;
    top: 100px;
  }
}

@media (max-width: 1320px) {
  .sidebar-sticky {
    margin-left: 40px;
  }
}

.container-offcanvas-policy {
  width: 90%;
  margin: 0 auto;
  text-align: center;
}

@media (max-width: 991px) {
  .sidebar {
    display: none;
  }
  .sidebar-container {
    display: block;
  }
}

@media (min-width: 992px) {
  .container-offcanvas-policy {
    display: none;
  }
  .information {
    width: 100%;
  }
}

.swiper_descriptions_thumbs_container {
  display: flex;
  justify-content: center;
  align-items: center;
  margin-top: 10px;
  width: 100%;
}

.swiper_descriptions_thumbs {
  width: auto;
}

.swiper_descriptions_thumbs .swiper-slide {
  opacity: 0.4;
  cursor: pointer;
  transition: opacity 0.3s ease;
  width: auto !important;
  margin-right: 10px !important;
}

.swiper_descriptions_thumbs .swiper-slide-thumb-active {
  opacity: 1;
  border: 2px solid #007bff;
}

.swiper_descriptions_thumbs img {
  width: 40px;
  height: 40px;
  object-fit: cover;
  border-radius: 4px;
  display: block;
}

.swiper_descriptions {
  overflow: hidden;
}

.add-to-cart-btn {
  width: 100%;
}

#search-suggestions {
  top: 100%;
  left: 0;
  box-shadow: 0 .5rem 1rem rgba(0,0,0,.15);
  max-height: 300px;
  overflow-y: auto;
}
.suggestion-item { cursor: pointer; }

/* --- новые / исправленные блоки --- */
.card-name-2lines {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.card .item-name,
.card .item-price {
  color: #023616;
  text-align: center;
}

.swiper-slide .card .item-name,
.swiper-slide .card .item-price {
  color: #023616;
  font-weight: 600;
  text-align: center;
}

.swiper-slide a.item-list {
  color: #023616;
  text-decoration: none;
}
