.empty-cart__content {
  text-align: center;
  font-size: var(--text);
}
.cart__total-wrapper {
  -ms-flex: 0 0 auto;
  flex: 0 0 auto;
  width: 46rem;
  display: flex;
  flex-direction: column;
}

.c-table__total-sum .title {
  font-size: 2rem;
  font-weight: 400;
  line-height: 1.2;
  margin-bottom: 20px;
  color: var(--color-text);
  display: flex;
  justify-content: space-between;
  width: 100%;
}
.c-table__total-sum .title .total-sum {
  margin-left: 1rem;
  flex: 1 0 auto;
  font-weight: 500;
  text-align: right;
}

.c-table__total .total-title {
  display: block;
  margin: 0 0 2rem;
  font-size: 2rem;
  line-height: 1.2;
  font-weight: 500;
}

.c-table__total button span {
  position: relative;
  z-index: 3;
}

.cart-wrapper {
  height: 100%;
}

.c-table__total {
  background: var(--color-bg);
  padding: 4rem 4rem 2rem;
  border-radius: 10px;
  order: 1;
}

.cart-wrapper .c-carousel__title--left:hover {
  color: var(--color-text);
}

.c-table__total .checkout-form.mt-2 {
  display: flex;
  justify-content: flex-end;
}
.checkout-form.mt-2 .button,
.c-table__total-sum {
  margin-bottom: 10px;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  flex-direction: column;
}

.c-table__total-sum .title {
  margin-right: 5px;
}

.a-cart-page__form {
  flex: 1 1 auto;
}

.a-cart-page__container {
  display: flex;
}

/* Страница «Корзина»: промежуток между списком товаров и блоком «Итого» */
.cart-wrapper .a-cart-page__container {
  gap: 1rem;
}

.order-page .cart__total-wrapper {
  width: 100%;
}

.a-cart-page__empty-wrapper {
  padding-top: 1.5rem;
  padding-bottom: 4rem;
}

.c-table__total-decription {
  font-size: 1.4rem;
  color: var(--color-text);
  font-weight: 400;
  text-align: left;
  width: 100%;
}

.a-cart__title,
.a-cart__dropdown .cart__old-price,
.a-cart__dropdown .cart__sale,
.cart__dropdown-content,
.a-cart__dropdown .alert-primary,
.cart-item__dropdown .quickview__favorites svg {
  display: none;
}

.a-cart-page {
  padding-bottom: 50px;
  background: var(--color-bg-accent);
  height: 100%;
}

@media (min-width: 1550px) {
  .background-texture .a-cart-page {
    background: none;
  }

  .background-texture .a-cart-page .container {
    padding: 20px 2.5rem;
    margin: 20px auto;
    border-radius: 12px;
    background: var(--color-bg-accent);
  }
}

.cart-item__wrapper {
  background: var(--color-bg);
}

.cart-item__price-one-container {
  font-size: 1.3rem;
  color: var(--color-text-muted);
  display: block;
  -ms-flex: 0 0 100%;
  flex: 0 0 100%;
}

.cart__to-order {
  margin: 0 0 3rem;
}

.cart-item__image {
  width: 9rem;
  height: 9rem;
  display: -ms-flexbox;
  display: flex;
  -ms-flex-align: center;
  align-items: center;
  -ms-flex-pack: center;
  justify-content: center;
  padding: 1rem;
  -ms-flex: 0 0 auto;
  flex: 0 0 auto;
  margin: 0 2rem 0 0;
  background: var(--color-bg);
  border: 1px solid var(--color-border-soft);
  border-radius: 5px;
}

.cart-item__img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: center;
}

.a-card-dropdown {
  -ms-flex: 1;
  flex: 1;
  margin: 0 2rem 0 0;
}

.cart-item__container {
  width: 100%;
  max-width: 28rem;
  padding: 0;
  margin: 0 2rem 0 0;
}

.cart-item__amount-price-row {
  display: flex;
  align-items: center;
  flex: 1 1 auto;
  min-width: 0;
}

.cart-item__amount {
  position: relative;
  left: 0;
  right: 0;
  bottom: 0;
  -ms-flex: 0 0 auto;
  flex: 0 0 auto;
  min-width: 8.4rem;
  width: auto;
  margin: 0;
}

.cart-item__code {
  display: block;
  margin: 0 0 0.5rem;
  font-size: 1.4rem;
  line-height: 1;
  font-weight: 400;
  color: var(--color-text-muted);
}

.cart-item__price-container {
  -ms-flex: 0 0 auto;
  flex: 0 0 auto;
  width: auto;
  margin: 0 0 0 auto;
  font-size: 1.8rem;
  line-height: 1.2;
  font-weight: 400;
  white-space: nowrap;
  display: -ms-flexbox;
  display: flex;
  -ms-flex-wrap: wrap;
  flex-wrap: wrap;
  -ms-flex-align: center;
  align-items: center;
}


.cart__dropdown-content:last-of-type {
  border-bottom: none;
}

.cart__dropdown-content_active,
.a-cart__dropdown .alert-primary_active {
  display: block;
}

.cart__total {
  justify-content: space-between;
  display: flex;
  align-items: center;
  color: var(--color-text);
}

.cart__total-container {
  width: 100%;
  margin: 0 0 3rem;
  line-height: 1.35;
  font-size: 1.8rem;
  font-weight: 500;
}

.cart-item__buttons {
  position: absolute;
  top: 0;
  right: 0;
  z-index: 2;
  display: flex;
  align-items: center;
  gap: 0.2rem;
  padding-right: 2rem;
}

.cart-item__action {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  cursor: pointer;
  color: var(--color-link) !important;
  transition: color 0.25s;
  background: transparent;
  border: none;
  border-radius: 5px;
}

.cart-item__action:hover,
.cart-item__buttons .cart-item__action_delete:hover,
.cart-item__buttons .js-delete-from-cart:hover {
  color: #f0164a;
}

.cart-item__action:hover svg,
.cart-item__buttons .cart-item__action_delete:hover svg,
.cart-item__buttons .js-delete-from-cart:hover svg {
  color: #f0164a;
  fill: #f0164a;
}

.cart-item__action svg {
  width: 1.8rem;
  height: 1.8rem;
  display: inline-block;
  vertical-align: middle;
  position: relative;
  fill: currentColor;
  fill-rule: evenodd;
  color: inherit;
}

.checkout-form.mt-2 {
  order: 2;
  background: var(--color-bg);
  padding: 0 4rem 4rem;
  margin-bottom: 1rem;
  border-radius: 0 0 5px 5px;
}

.cart__checkout-buttons {
  padding: 2rem 0 0;
  border-top: 1px solid #e8ebf4;
  display: flex;
}

.cart__footer .cart__total-price,
.cart__dropdown-content .js-cartPrice {
  color: var(--color-text);
  font-size: var(--text-xxs);
  font-weight: 700;
}

.cart__footer-to-cart {
  margin-right: 1rem;
}

.cart__footer-close {
  margin-left: 1rem;
}

.cart__checkout-buttons .btn-primary,
.cart__checkout-buttons .btn-outline-secondary {
  display: flex;
  align-items: center;
  justify-content: center;
  letter-spacing: 1px;
}

.cart__checkout-buttons .mdi {
  font-size: 1.3rem;
  margin-right: 5px;
}

.cart-item__title {
  display: block;
  margin: 0 0 0.5rem;
  font-size: 1.5rem;
  line-height: 1.35;
  font-weight: 500;
  color: var(--color-text);
}

.cart-item__title:hover {
  color: var(--color-accent);
}
.cart-item__buttons .quickview__favorites {
  width: 4.2rem;
  height: 4.2rem;
  border-radius: 5px;
  margin: 0;
  padding: 0;
  color: var(--color-link);
  background: transparent;
  border: none;
}

.cart-item__buttons .quickview__favorites:hover {
  color: #f0164a;
}

.cart-item__buttons .quickview__favorites svg {
  display: block;
  width: 1.8rem;
  height: 1.8rem;
}

/* Неактивное состояние - только контур */
.cart-item__buttons .quickview__favorites_add svg,
.cart-item__buttons .js-add-to-favorites svg {
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
}

/* Активное состояние - заполненное */
.cart-item__buttons .quickview__favorites_remove svg,
.cart-item__buttons .js-remove-to-favorites svg {
  fill: currentColor;
  stroke: currentColor;
}

.cart-item__buttons .quickview__favorites .favorites-text {
  display: none;
}
.cart-item {
  margin-bottom: 10px;
  display: flex;
  align-items: center;
  background: var(--color-bg);
  padding: 2rem 2rem 2rem 22rem;
  min-height: 14rem;
  border-radius: 10px;
  position: relative;
  box-shadow: 0px 0px 20px rgba(170, 189, 206, 0.25);
}

.cart-item__price {
  margin: 0;
  font-size: var(--text-xxs);
  line-height: 1.2;
  letter-spacing: 1px;
  font-weight: 400;
  color: var(--color-text);
}

.cart__total {
  font-size: var(--text-xxs);
  line-height: 1.2;
  letter-spacing: 1px;
  color: var(--color-text);
}

.cart-amount-wrapper {
  position: relative;
}
.cart-item__image {
  position: absolute;
  top: 0;
  left: 0;
  width: 20rem;
  height: 14rem;
  border: none;
  margin: 0;
  padding: 2rem;
}

.cart-item__dropdown .quickview-text {
  margin-left: 0;
}

.order-page .a-cart-page__container {
  flex-direction: column;
}
@media (min-width: 1550px) {
  .background-texture .order-page > .container {
    background: var(--color-bg-accent);
    padding: 20px 2.5rem;
    border-radius: 12px;
    margin: 20px auto;
  }
}

.order-page .a-cart-page {
  flex: 1 0 calc(45% - 1rem);
  max-width: calc(45% - 1rem);
  padding: 0;
}

.order-page .cart-item__image {
  width: 9rem;
  height: 9rem;
  padding: 1rem;
  border: 1px solid var(--color-border-soft);
  position: static;
  left: auto;
  top: auto;
  margin-right: 1rem;
  flex: 1 0 9rem;
}
.order-page .cart-item {
  padding: 2rem 2rem 7rem 2rem;
}

.order-page .a-card-dropdown {
  margin-right: 0;
}

@media (min-width: 993px) {
  .order-page .cart-item__amount {
    position: absolute;
    left: 2rem;
    right: auto;
    bottom: 1rem;
    -ms-flex: 0 0 auto;
    flex: 0 0 auto;
    width: auto;
    margin: 0;
    max-width: calc(100% - 4rem);
  }
}

.order-page .a-cart-page__back-btn {
  margin-top: 2rem;
  background: #ccc;
}

.order-page .c-table__total {
  border-radius: 10px;
}

/* Страница «Корзина»: блок .cart-item 1:1 как на «Оформлении заказа» */
.cart-wrapper .a-cart-page .cart-item__image {
  width: 9rem;
  height: 9rem;
  padding: 1rem;
  border: 1px solid var(--color-border-soft);
  position: static;
  left: auto;
  top: auto;
  margin-right: 1rem;
}
.cart-wrapper .a-cart-page .cart-item {
  padding: 2rem 2rem 7rem 2rem;
}
.cart-wrapper .a-card-dropdown {
  margin-right: 0;
}
@media (min-width: 993px) {
  .cart-wrapper .a-cart-page .cart-item__amount {
    position: absolute;
    left: 2rem;
    right: auto;
    bottom: 1rem;
    -ms-flex: 0 0 auto;
    flex: 0 0 auto;
    width: auto;
    margin: 0;
    max-width: calc(100% - 4rem);
  }
}

.empty-cart__container {
  display: flex;
  align-items: center;
  flex-direction: column;
}
.empty-cart__img {
  display: flex;
  -ms-flex-align: center;
  align-items: center;
  -ms-flex-pack: center;
  justify-content: center;
  width: 30rem;
  height: 30rem;
  border-radius: 50%;
  background: var(--color-bg);
  margin-bottom: 5rem;
  overflow: hidden;
}

.empty-cart__link {
  color: var(--color-link);
  border-bottom: 1px solid #e3eeff;
}
.empty-cart__link:hover {
  opacity: 0.7;
}

.empty-cart-block__text {
  display: block;
  margin: 0 0 3rem;
  font-size: 2.5rem;
  line-height: 1.15;
  font-weight: 500;
  text-align: center;
}

.empty-cart__img img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

@media (max-width: 632px) {
  .empty-cart__img {
    display: flex;
    -ms-flex-align: center;
    align-items: center;
    -ms-flex-pack: center;
    justify-content: center;
    width: 20rem;
    height: 20rem;
    border-radius: 50%;
    background: var(--color-bg);
    margin-bottom: 2rem;
    overflow: hidden;
  }
}

/* При 1200px и меньше: счётчик и цена на 2-й строке карточки товара */
@media (max-width: 1200px) {
  .cart-item {
    display: grid;
    grid-template-columns: 9rem 1fr;
    grid-template-rows: auto auto;
    column-gap: 1.5rem;
    row-gap: 1.5rem;
    padding: 2rem 2rem 2rem 5rem;
    align-items: start;
    position: relative;
    min-height: 0;
  }
  .cart-item__image {
    width: 9rem;
    height: 9rem;
    min-width: 9rem;
    margin: 0;
    padding: 0.8rem;
    grid-column: 1;
    grid-row: 1;
    box-sizing: border-box;
    background: var(--color-bg);
    border: 1px solid var(--color-border-soft);
    border-radius: 5px;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
  }
  .cart-item__container {
    min-width: 0;
    max-width: none;
    margin: 0;
    grid-column: 2;
    grid-row: 1;
    align-self: center;
    justify-self: start;
  }
  .cart-item__amount-price-row {
    grid-column: 1 / -1;
    grid-row: 2;
    display: flex;
    flex-wrap: wrap;
    gap: 1.5rem;
    align-items: center;
    min-width: 0;
  }
  .cart-item__amount {
    min-width: 0;
    max-width: 12rem;
    margin: 0;
    left: 0 !important;
    flex: 0 0 auto;
  }
  .cart-item__price-container {
    flex: 1 1 auto;
    min-width: 0;
    flex-direction: column;
    flex-wrap: nowrap;
    align-items: flex-start;
    margin-left: 0;
    padding-left: 2rem;
    text-align: left;
    gap: 0;
    overflow: hidden;
  }
  .cart-item__price-one-container {
    flex: 0 0 auto;
    width: 100%;
  }
  .cart-item__price-total-container {
    margin-right: 0;
    margin-bottom: 0;
  }
  /* Счётчик в потоке сетки, не absolute (отмена .order-page / .cart-wrapper .cart-item__amount из min-width: 993px) */
  .order-page .cart-item__amount,
  .cart-wrapper .a-cart-page .cart-item__amount {
    position: static;
    left: auto;
    right: auto;
    bottom: auto;
  }
  /* Страница «Корзина»: тот же грид, что и на «Оформлении заказа», чтобы блок цены не наслаивался */
  .cart-wrapper .a-cart-page .cart-item {
    display: grid !important;
    grid-template-columns: 9rem 1fr;
    grid-template-rows: auto auto;
    column-gap: 1.5rem;
    row-gap: 1.5rem;
    padding: 2rem 2rem 2rem 5rem;
    align-items: start;
    position: relative;
    min-height: 0;
  }
  .cart-wrapper .a-cart-page .cart-item__image {
    width: 9rem;
    height: 9rem;
    min-width: 9rem;
    margin: 0;
    padding: 0.8rem;
    grid-column: 1;
    grid-row: 1;
    box-sizing: border-box;
    background: var(--color-bg);
    border: 1px solid var(--color-border-soft);
    border-radius: 5px;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
  }
  .cart-wrapper .a-cart-page .cart-item__container {
    min-width: 0;
    max-width: none;
    margin: 0;
    grid-column: 2;
    grid-row: 1;
    align-self: center;
    justify-self: start;
  }
  .cart-wrapper .a-cart-page .cart-item__amount-price-row {
    grid-column: 1 / -1 !important;
    grid-row: 2 !important;
    display: flex;
    flex-wrap: wrap;
    gap: 1.5rem;
    align-items: center;
    min-width: 0;
  }
  .cart-wrapper .a-cart-page .cart-item__amount {
    min-width: 0;
    max-width: 12rem;
    margin: 0;
    left: 0 !important;
    flex: 0 0 auto;
  }
  .cart-wrapper .a-cart-page .cart-item__price-container {
    flex: 1 1 auto;
    min-width: 0;
    flex-direction: column;
    flex-wrap: nowrap;
    align-items: flex-start;
    margin-left: 0;
    padding-left: 2rem;
    text-align: left;
    gap: 0;
    overflow: hidden;
  }
  .cart-wrapper .a-cart-page .cart-item__price-one-container {
    flex: 0 0 auto;
    width: 100%;
  }
  .cart-wrapper .a-cart-page .cart-item__price-total-container {
    margin-right: 0;
    margin-bottom: 0;
  }
}

/* При 992px и меньше: блок корзины под формой, карточка товара — тот же дизайн, что и в две колонки (горизонтально) */
@media (max-width: 992px) {
  .a-cart-page__container {
    flex-direction: column;
  }
  .a-card-dropdown {
    margin: 0;
  }
  .cart__total-wrapper {
    width: 100%;
  }
  .c-table__total {
    padding: 2rem;
    margin-bottom: 1rem;
    border-radius: 10px;
  }
  .checkout-form.mt-2 {
    order: 4;
    padding: 0;
    background: none;
  }
  /* При 992px и меньше: строка 1 — картинка и контент; строка 2 — своя сетка (счётчик | цена), не зависит от колонок строки 1 */
  .cart-item {
    display: grid;
    grid-template-columns: 9rem 1fr;
    grid-template-rows: auto auto;
    column-gap: 1.5rem;
    row-gap: 1.5rem;
    padding: 2rem 2rem 2rem 5rem;
    align-items: start;
    position: relative;
    min-height: 0;
  }
  .cart-item__image {
    width: 9rem;
    height: 9rem;
    min-width: 9rem;
    margin: 0;
    padding: 0.8rem;
    grid-column: 1;
    grid-row: 1;
    box-sizing: border-box;
    background: var(--color-bg);
    border: 1px solid var(--color-border-soft);
    border-radius: 5px;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
  }
  .cart-item__container {
    min-width: 0;
    max-width: none;
    margin: 0;
    grid-column: 2;
    grid-row: 1;
    align-self: center;
    justify-self: start;
  }
  /* Строка 2 — счётчик и цена, при нехватке места цена переносится */
  .cart-item__amount-price-row {
    grid-column: 1 / -1;
    grid-row: 2;
    display: flex;
    flex-wrap: wrap;
    gap: 1.5rem;
    align-items: center;
    min-width: 0;
  }
  .cart-item__amount {
    min-width: 0;
    max-width: 12rem;
    margin: 0;
    left: 0 !important;
    flex: 0 0 auto;
  }
  .cart-item__price-container {
    flex: 1 1 auto;
    min-width: 0;
    flex-direction: column;
    flex-wrap: nowrap;
    align-items: flex-start;
    margin-left: 0;
    padding-left: 2rem;
    text-align: left;
    gap: 0;
    overflow: hidden;
  }
  .cart-item__price-one-container {
    flex: 0 0 auto;
    width: 100%;
  }
  .cart-item__price-total-container {
    margin-right: 0;
    margin-bottom: 0;
  }
  /* Страница «Корзина» (.cart-wrapper): те же правила грида, чтобы блок цены не наслаивался на картинку */
  .cart-wrapper .a-cart-page .cart-item {
    display: grid !important;
    grid-template-columns: 9rem 1fr;
    grid-template-rows: auto auto;
    column-gap: 1.5rem;
    row-gap: 1.5rem;
    padding: 2rem 2rem 2rem 5rem;
    align-items: start;
    position: relative;
    min-height: 0;
  }
  .cart-wrapper .a-cart-page .cart-item__image {
    width: 9rem;
    height: 9rem;
    min-width: 9rem;
    margin: 0;
    padding: 0.8rem;
    grid-column: 1;
    grid-row: 1;
    box-sizing: border-box;
    background: var(--color-bg);
    border: 1px solid var(--color-border-soft);
    border-radius: 5px;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
  }
  .cart-wrapper .a-cart-page .cart-item__container {
    min-width: 0;
    max-width: none;
    margin: 0;
    grid-column: 2;
    grid-row: 1;
    align-self: center;
    justify-self: start;
  }
  .cart-wrapper .a-cart-page .cart-item__amount-price-row {
    grid-column: 1 / -1 !important;
    grid-row: 2 !important;
    display: flex;
    flex-wrap: wrap;
    gap: 1.5rem;
    align-items: center;
    min-width: 0;
  }
  .cart-wrapper .a-cart-page .cart-item__amount {
    min-width: 0;
    max-width: 12rem;
    margin: 0;
    left: 0 !important;
    flex: 0 0 auto;
  }
  .cart-wrapper .a-cart-page .cart-item__price-container {
    flex: 1 1 auto;
    min-width: 0;
    flex-direction: column;
    flex-wrap: nowrap;
    align-items: flex-start;
    margin-left: 0;
    padding-left: 2rem;
    text-align: left;
    gap: 0;
    overflow: hidden;
  }
  .cart-wrapper .a-cart-page .cart-item__price-one-container {
    flex: 0 0 auto;
    width: 100%;
  }
  .cart-wrapper .a-cart-page .cart-item__price-total-container {
    margin-right: 0;
    margin-bottom: 0;
  }
  .order-page .a-cart-page {
    flex: 1 0 100%;
    max-width: none;
  }
  .order-page .cart-item,
  .cart-wrapper .a-cart-page .cart-item {
    padding: 2rem;
  }
}

/* Когда экран узкий — цена переносится над счётчиком (по ширине окна) */
@media (max-width: 350px) {
  .cart-item__amount-price-row {
    flex-direction: column-reverse;
  }
}

/* Стили для кнопки очистки корзины на странице cart */
.a-cart-page__remove-all {
  display: inline-flex;
  -ms-flex-align: center;
  align-items: center;
  cursor: pointer;
  font-size: 1.4rem;
  line-height: 1.2;
  font-weight: 400;
  color: var(--color-link);
  transition: color 0.25s;
  background: none;
  border: none;
  padding: 0;
}

.a-cart-page__remove-all svg,
.cart-item__action.a-cart-page__remove-all svg,
.title-section__title .a-cart-page__remove-all svg {
  margin: 0 0.5rem 0 0;
  color: var(--color-link);
  width: 1.8rem !important;
  height: 1.8rem !important;
  display: inline-block;
  vertical-align: middle;
  position: relative;
  fill: currentColor !important;
  fill-rule: evenodd;
  flex-shrink: 0;
}

.a-cart-page__remove-all:hover,
.a-compare-page__remove-all:hover,
.a-favorites-page__remove-all:hover {
  color: #f0164a;
}

.a-cart-page__remove-all:hover span,
.a-compare-page__remove-all:hover span,
.a-favorites-page__remove-all:hover span {
  color: #f0164a;
}

.a-cart-page__remove-all:hover svg,
.cart-item__action.a-cart-page__remove-all:hover svg,
.title-section__title .a-cart-page__remove-all:hover svg,
.a-compare-page__remove-all:hover svg,
.a-favorites-page__remove-all:hover svg {
  color: #f0164a;
  fill: #f0164a;
}



