.cart-section {
  display: flex;
  flex-direction: column;
  gap: 12px;
  width: 100%;
  color: #404040;
}

.cart-section__title {
  margin: 0 0 4px;
  font-size: 28px;
  line-height: 36px;
  font-weight: 600;
  text-align: left;
  color: #404040;
}

.cart-section__empty {
  padding: 12px 0 4px;
  font-size: 18px;
  line-height: 24px;
  color: #737373;
}

.cart-section .cart-item { padding: 8px 0 0; }

.cart-section .basket {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 16px;
  border: 1px solid #cccccc;
  border-radius: 4px;
}

.cart-section .product {
  display: flex;
  align-items: center;
  gap: 16px;
  min-width: 0;
}

.cart-section .product-image {
  flex: none;
  width: 44px;
  height: 44px;
  border-radius: 4px;
  background-color: #e6e3dc;
  background-position: center;
  background-size: cover;
  background-repeat: no-repeat;
}

.cart-section .basket-product-name {
  font-size: 16px;
  line-height: 20px;
  font-weight: 600;
  color: #4a4a4a;
}

.cart-section .basket-product-status {
  font-size: 12px;
  line-height: 16px;
}

.cart-section .basket-controls-wrapper {
  display: flex;
  align-items: center;
  gap: 10px;
  flex: none;
}

.cart-section .basket-product-price {
  font-size: 16px;
  line-height: 20px;
  font-weight: 500;
  color: #4a4a4a;
  white-space: nowrap;
}

.cart-section .cart-summary {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding-top: 8px;
}

.cart-section .offer-form-lable {
  display: block;
  font-size: 16px;
  line-height: 24px;
  color: #737373;
}

.cart-section .offer-form-lable .basket-product-name {
  font-size: 16px;
  font-weight: 600;
  color: #4a4a4a;
}

.cart-section .modal-basket-controls-wrapper {
  display: flex;
  justify-content: flex-end;
}

.cart-section .confirm-order-button {
  height: 46px;
  padding: 12px 24px;
  border: 1px solid #404040;
  border-radius: 6px;
  background: transparent;
  color: #212529;
  font-size: 16px;
  font-weight: 400;
  line-height: 20px;
  cursor: pointer;
}

.cart-section .confirm-order-button:hover { background: rgba(64, 64, 64, 0.06); }

@media (max-width: 767px) {
  .cart-section__title { font-size: 22px; line-height: 28px; }
  .cart-section .basket { padding: 12px; }
  .cart-section .product { gap: 12px; }
  .cart-section .product-image { width: 40px; height: 40px; }
  .cart-section .basket-product-name { font-size: 14px; line-height: 18px; }
  .cart-section .basket-product-price { font-size: 14px; }
  .cart-section .basket { flex-wrap: wrap; }
  .cart-section .modal-basket-controls-wrapper { justify-content: stretch; }
  .cart-section .confirm-order-button { width: 100%; }
}

:is(.cart-section, .offer-cart-items-wrapper) .qty { gap: 0; }

:is(.cart-section, .offer-cart-items-wrapper) .qty__btn,
:is(.cart-section, .offer-cart-items-wrapper) .qty__value {
  flex: none;
  width: 38px;
  min-width: 38px;
}

@media (max-width: 767px) {
  :is(.cart-section, .offer-cart-items-wrapper) .qty__btn,
  :is(.cart-section, .offer-cart-items-wrapper) .qty__value { width: 34px; min-width: 34px; }
}

/* Цена пересчитывается при смене количества: без резерва места счётчик рядом
   прыгает. Ширина — под максимум в шесть цифр («999999 ₽»). */
.cart-section .basket-product-price {
  min-width: 9ch;
  text-align: right;
  font-variant-numeric: tabular-nums;
}

.cart-line__price { font-variant-numeric: tabular-nums; }

/* Счётчик корзины — как в каталоге. Токены объявлены на самой корзине, чтобы файл
   можно было подключить на любой странице, не таща за собой catalog.css. */
:is(.cart-section, .offer-cart-items-wrapper) {
  --cart-white: #ffffff;
  --cart-text: #404040;
  --cart-line: #cccccc;
  --cart-radius: 6px;
  --cart-ease: cubic-bezier(0.22, 0.61, 0.36, 1);
  --cart-ctl-h: clamp(32px, calc(30.3425px + 0.442vw), 36px);
  --cart-fs: clamp(13px, calc(14.4144px + -0.1105vw), 14px);
  --cart-lh: clamp(16px, calc(18.8287px + -0.221vw), 18px);
}

@media (min-width: 1280px) {
  :is(.cart-section, .offer-cart-items-wrapper) {
    --cart-ctl-h: clamp(36px, calc(20px + 1.25vw), 40px);
    --cart-fs: clamp(13px, calc(5px + 0.625vw), 15px);
    --cart-lh: clamp(16px, calc(0px + 1.25vw), 20px);
  }
}

@media (min-width: 1600px) {
  :is(.cart-section, .offer-cart-items-wrapper) {
    --cart-ctl-h: clamp(40px, calc(20px + 1.25vw), 44px);
    --cart-fs: clamp(15px, calc(10px + 0.3125vw), 16px);
    --cart-lh: 20px;
  }
}

:is(.cart-section, .offer-cart-items-wrapper) .qty {
  display: inline-flex;
  align-items: stretch;
  flex: none;
  height: var(--cart-ctl-h);
  min-width: 0;
  border: 1px solid var(--cart-text);
  border-radius: var(--cart-radius);
  overflow: hidden;
}

:is(.cart-section, .offer-cart-items-wrapper) .qty__btn {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  align-self: stretch;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--cart-text);
  font-size: 0;
  line-height: 1;
  cursor: pointer;
  transition: background-color 0.16s var(--cart-ease);
}

:is(.cart-section, .offer-cart-items-wrapper) .qty__btn:not(:disabled):active { background: rgba(0, 0, 0, 0.08); }

:is(.cart-section, .offer-cart-items-wrapper) .qty__btn::before,
:is(.cart-section, .offer-cart-items-wrapper) .qty__btn::after {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  background: currentColor;
  transform: translate(-50%, -50%);
}

:is(.cart-section, .offer-cart-items-wrapper) .qty__btn::before {
  width: calc(var(--cart-ctl-h) * 0.36);
  height: 2px;
}

:is(.cart-section, .offer-cart-items-wrapper) .qty__btn--plus::after {
  width: 2px;
  height: calc(var(--cart-ctl-h) * 0.36);
}

:is(.cart-section, .offer-cart-items-wrapper) .qty__btn--minus { border-right: 1px solid var(--cart-text); }
:is(.cart-section, .offer-cart-items-wrapper) .qty__btn--plus  { border-left: 1px solid var(--cart-text); }

:is(.cart-section, .offer-cart-items-wrapper) .qty__btn:disabled {
  color: var(--cart-line);
  cursor: default;
}

:is(.cart-section, .offer-cart-items-wrapper) .qty__value {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 100%;
  text-align: center;
  font-size: var(--cart-fs);
  line-height: var(--cart-lh);
  font-weight: 500;
  color: var(--cart-text);
}

/* товар не в наличии: заказ не оформить, «+» залочен */
.cart-section__note {
  margin-top: 8px;
  font-size: 13px;
  line-height: 17px;
  color: #737373;
  text-align: right;
}

.cart-section .confirm-order-button:disabled,
.confirm-order-button:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

/* предзаказ: вместо счётчика — фиксированное количество */
.cart-line__count {
  flex: none;
  font-size: 16px;
  line-height: 20px;
  font-weight: 500;
  color: #4a4a4a;
  white-space: nowrap;
}

/* «Нет в наличии» — красным везде: корзина, оформление, все страницы */
.basket-product-status { color: #e11d1d; }
