/* =========================
   Cart v2 — FINAL
   only cart page
   ========================= */

/* ===== базовый фон ===== */
body.page-cart {
  background: #f6f7f9;
}

/* ===== контейнер как у сайта ===== */
body.page-cart #content-container.container {
  max-width: 1240px;
  margin: 0 auto;
  padding: 0 16px;
}

/* если старые блоки дают лишнее */
#content-block {
  padding-bottom: 24px;
}

/* ===== корневой блок корзины ===== */
.cart2 {
  margin: 18px 0 28px;
  background: #fff;
  border: 1px solid rgba(0,0,0,.07);
  border-radius: 18px;
  box-shadow: 0 10px 30px rgba(0,0,0,.06);
  padding: 18px;
}

/* ===== заголовок ===== */
.cart2__header {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
}
.cart2__title {
  font-size: 28px;
  font-weight: 800;
  margin: 0;
}
.cart2__hint {
  font-size: 14px;
  opacity: .7;
}

/* ===== layout: список + итоги ===== */
.cart2__layout {
  display: grid;
  grid-template-columns: 1fr 360px;
  gap: 16px;
  align-items: start;
}
.cart2__main {
  min-width: 0;
}

/* ===== sticky summary ===== */
.cart2__summary {
  position: sticky;
  top: 16px;
  background: #fff;
  border: 1px solid rgba(0,0,0,.08);
  border-radius: 16px;
  padding: 14px 12px;
}

/* =========================
   GRID — ОДНА СЕТКА ВЕЗДЕ
   ========================= */
.cart2__grid--head,
.cart2__row {
  display: grid;
  grid-template-columns:
    minmax(420px, 1fr)   /* товар */
    140px                /* цена */
    160px                /* количество */
    140px;               /* сумма */
  column-gap: 16px;
  align-items: center;
}

/* ===== шапка ===== */
.cart2__grid--head {
  font-size: 13px;
  font-weight: 700;
  opacity: .75;
  padding: 10px 12px;
  border-bottom: 1px solid rgba(0,0,0,.08);
  margin-bottom: 8px;
}
.cart2__grid--head > div:nth-child(2),
.cart2__grid--head > div:nth-child(4) {
  text-align: right;
}
.cart2__grid--head > div:nth-child(3) {
  text-align: center;
}

/* ===== строка товара ===== */
.cart2__row {
  position: relative;
  padding: 14px 12px;
  border: 1px solid rgba(0,0,0,.08);
  border-radius: 16px;
  margin-top: 12px;
  background: #fff;
}

/* ===== удалить ===== */
.cart2__remove {
  position: absolute;
  top: 10px;
  right: 10px;
  width: 23px;
  height: 23px;
  border-radius: 10px;
  border: 1px solid rgba(0,0,0,.12);
  background: #fff;
  cursor: pointer;
  font-size: 18px;
  line-height: 1;
}
.cart2__remove:hover {
  background: rgba(0,0,0,.04);
}

/* ===== товар ===== */
.cart2__product {
  display: flex;
  gap: 12px;
  min-width: 0;
}
.cart2__img {
  width: 72px;
  height: 72px;
  object-fit: contain;
  border-radius: 12px;
  background: rgba(0,0,0,.03);
  border: 1px solid rgba(0,0,0,.05);
}
.cart2__meta {
  min-width: 0;
}
.cart2__sku {
  font-size: 12px;
  opacity: .7;
  margin-bottom: 4px;
}
.cart2__name {
  display: block;
  font-weight: 700;
  color: inherit;
  text-decoration: none;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.cart2__name:hover {
  text-decoration: underline;
}

/* ===== цена / сумма ===== */
.cart2__price,
.cart2__sum {
  display: flex;
  justify-content: flex-end;
  font-variant-numeric: tabular-nums;
}
.cart2__money {
  font-weight: 800;
}

/* ===== количество ===== */
.cart2__qty {
  display: flex;
  justify-content: center;
}
.qty2 {
  display: inline-flex;
  align-items: center;
  border: 1px solid rgba(0,0,0,.12);
  border-radius: 12px;
  overflow: hidden;
}
.qty2__btn {
  width: 38px;
  height: 38px;
  border: 0;
  background: transparent;
  cursor: pointer;
  font-size: 18px;
}
.qty2__btn:hover {
  background: rgba(0,0,0,.04);
}
.qty2__input {
  width: 56px;
  height: 38px;
  border: 0;
  text-align: center;
  font-weight: 800;
  outline: none;
}

/* ===== extras ===== */
.cart2__extras {
  margin-top: 16px;
}
.cart2__link {
  background: none;
  border: 0;
  padding: 0;
  cursor: pointer;
  text-decoration: underline dotted;
  opacity: .85;
}
.cart2__add {
  margin-top: 12px;
  padding: 12px;
  border: 1px dashed rgba(0,0,0,.18);
  border-radius: 16px;
}
.cart2__label {
  font-size: 12px;
  opacity: .75;
  margin-bottom: 6px;
}
.cart2__input {
  width: 100%;
  height: 42px;
  border-radius: 12px;
  border: 1px solid rgba(0,0,0,.12);
  padding: 0 12px;
}
.cart2__help {
  font-size: 12px;
  opacity: .7;
  margin-top: 6px;
}
.cart2__btn {
  margin-top: 10px;
  padding: 10px 14px;
  border-radius: 12px;
  border: 1px solid rgba(0,0,0,.12);
  background: #fff;
}

/* ===== итоги ===== */
.cart2__total {
  display: flex;
  justify-content: space-between;
  margin-bottom: 12px;
}
.cart2__totalLabel {
  font-size: 12px;
  opacity: .7;
  text-transform: uppercase;
}
.cart2__totalValue {
  font-size: 20px;
  font-weight: 900;
}

/* ===== действия ===== */
.cart2__actions {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.cart2__ghost {
  border: 1px solid rgba(0,0,0,.12);
  border-radius: 12px;
  padding: 10px;
  text-align: center;
}
.cart2__primary {
  border: 0;
  border-radius: 12px;
  padding: 12px;
  background: #D12C24;
  color: #fff;
  font-weight: 800;
  cursor: pointer;
}
.cart2__primary:hover {
  filter: brightness(.95);
}

/* ===== пустая корзина ===== */
.cart2--empty {
  text-align: center;
  padding: 40px 18px;
}

/* ===== адаптив ===== */
@media (max-width: 992px) {
  .cart2__layout {
    grid-template-columns: 1fr;
  }
  .cart2__summary {
    position: static;
  }
  .cart2__grid--head {
    display: none;
  }
  .cart2__row {
    grid-template-columns: 1fr;
    row-gap: 12px;
  }
  .cart2__price,
  .cart2__qty,
  .cart2__sum {
    justify-content: flex-start;
  }
}
/* ===== Empty cart ===== */
.cart2--empty {
  text-align: center;
  padding: 48px 24px;
}

.cart2__emptyIcon {
  font-size: 48px;
  margin-bottom: 12px;
  opacity: .6;
}

.cart2__emptyText {
  font-size: 15px;
  opacity: .75;
  margin: 12px 0 24px;
}

.cart2__emptyActions {
  display: flex;
  justify-content: center;
  gap: 12px;
  flex-wrap: wrap;
}
