@media (min-width: 769px) and (max-width: 992px) {
    .navbar-nav .dropdown-menu {
        min-width: 4rem;
        position: absolute!important;
    }

    .navbar-nav .nav-item {
        margin-right: 5px;
    }

    .navbar-nav {
        flex-direction: row!important;
        justify-content: space-between
    }
}

.checkout-cart {
    width: 100%;
    margin-bottom: 20px;
}

.checkout-cart tr {
    border-top: 1px solid #ddd;
    border-bottom: 1px solid #ddd;
}

.checkout-cart tr td {
    padding: 8px;
}

.checkout-cart tr td:first-child {
    border-left: 1px solid #ddd;
}

.checkout-cart tr td:last-child {
    border-right: 1px solid #ddd;
}

.checkout-cart .image {
    width: 10%;
    text-align: center;
}

.checkout-cart .name {
    width: 30%;
}

.checkout-cart .total {
   text-align: right;
}

.without-vat, .vat {
    border: none !important;
}

.total-sum {
    border-top: none!important;
}

.without-vat td, .vat td, .total-sum td {
    text-align: right;
}

.b-form-spinbutton.d-inline-flex:not(.flex-column) {
    margin-right: 5px;
}

.checkout-area {
    overflow-x: scroll;
}

.shipping {
    border: 1px solid #ddd;
    border-top: none;
    display: flex;
    flex-direction: row;
}

.shipping tr {
    border-top: 1px solid #ddd;
}

.mob-shipping {
    border: 1px solid #ddd;
    display: none;
}

.mob-shipping tr {
    border-top: 1px solid #ddd;
}

.notes-area {
    border: 1px solid #ddd;
    padding: 9px;
}

.content_wrapper{
    display: flex;
    flex-direction: row!important;
    width: 100%;
    margin-top: 80px;
    max-width: 1400px;
    margin-left: auto;
    margin-right: auto;
    padding: 0.5rem 1rem;
    gap: 1rem;
}

.container{
    max-width: 1400px !important;
    margin-left: auto;
    margin-right: auto;
    padding: 0.5rem 1rem;
}

@media (max-width: 1400px) {
    .content_wrapper{
        flex-direction: column!important;
    }
}
.aside_content{
    min-width: max-content;
}
.main_content{
    width: 100%;
}
@media (max-width: 768px) {
    li.form-inline {
        display: block;
        list-style-type: none;
    }

    .navbar-nav {
        flex-direction: row!important;
        justify-content: space-between
    }

    .form-inline button {
        width: 100%;
    }

    .navbar-nav .dropdown-menu {
        min-width: 4rem;
        position: absolute!important;
    }

    .navbar-nav .nav-item {
        margin-right: 5px;
    }

    .navbar-collapse {
        margin-top: 10px;
    }
    .price {
        justify-content: center;
        margin-bottom: 15px;
    }

    .card {
        padding-bottom: 15px;
    }

    .form-inline input {
        width: 100%!important;
        margin-right: 0!important;
        margin-bottom: 10px
    }

    .shipping {
        display: none;
    }

    .mob-shipping {
        border: 1px solid #ddd;
        display: flex;
        flex-direction: column;
    }
}

.btn.custom-nav {
    color: rgba(0,0,0,0.5);
}

.btn.custom-nav:hover {
    color: rgba(0,0,0,0.8);
}

.navbar-expand-lg .navbar-nav .dropdown-menu {
    z-index: 9999;
}

@media (min-width: 992px) {
    .navbar-expand-lg .navbar-collapse {
        display: flex !important;
        flex-basis: auto;
        flex-direction: row!important;
        justify-content: space-between!important;
    }
}

/* Контейнер: плитка как у Livly */
.b2b-grid {
  display: grid !important;
  grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
  gap: 28px;
}

/* Карточка становится вертикальной */
.b2b-grid .card {
  display: flex !important;
  flex-direction: column !important;
  align-items: center;
  justify-content: flex-start;
  padding: 16px 16px 14px !important;
  border-radius: 14px;
  overflow: hidden;
  min-height: 360px;
}
.b2b-grid .card.mb-3 { margin-bottom: 0 !important; }

/* Внутренний bootstrap-ряд перестраиваем в колонку */
.b2b-grid .card .row { 
  display: flex !important; 
  flex-direction: column !important; 
  margin: 0 !important; 
}
.b2b-grid .card [class*="col-"] { 
  width: 100% !important; 
  max-width: 100% !important; 
  padding: 0 !important; 
}

/* 1) Картинка — квадрат с object-fit: contain */
.b2b-grid .card .row > div:first-child{
  position: relative;
  display: block !important;
  aspect-ratio: 1 / 1;
  width: 100%;
  background: #fafafa;
  border-radius: 12px;
  overflow: hidden;
  margin-bottom: 12px;
}
.b2b-grid .card img.card-img{
  width: 100%;
  height: 100%;
  object-fit: contain;
}

/* 2) Текст — только заголовок, центр и две строки */
.b2b-grid .card .card-body { padding: 0 !important; }
.b2b-grid .card .card-body .card-title{
  margin: 6px 0 6px;
  text-align: center;
  font-size: 14px;
  line-height: 1.35;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  min-height: 38px; /* чтобы карточки были ровные */
}
/* Прячем категорию/бренд/SKU из листового вида */
.b2b-grid .card .card-body .card-text,
.b2b-grid .card .card-body > div { display: none !important; }

/* 3) Цена — под названием, пожирнее */
.b2b-grid .card .price{
  margin-top: 4px;
  text-align: center;
  font-weight: 600;
  font-size: 14px;
}

/* 4) Кнопки — внизу карточки, по центру */
.b2b-grid .card .row > div:last-child{
  margin-top: auto;
  display: flex !important;
  justify-content: center;
}
.b2b-grid .card .row > div:last-child .btn,
.b2b-grid .card .row > div:last-child button{
  border-radius: 999px;
  width: 36px;
  height: 36px;
  padding: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

/* Адаптив: по 2 колонки на узких экранах */
@media (max-width: 640px){
  .b2b-grid{ grid-template-columns: repeat(2, 1fr); gap: 16px; }
}