/* Страница корзины */
.page-cart {
  background: #fff;
  overflow-x: hidden;
}

.page-cart--has-items {
  padding-bottom: 0;
}

.cart-page {
  padding-top: calc(var(--header-top) + var(--header-h));
}

.cart-page__inner {
  max-width: 1440px;
  margin: 0 auto;
  padding: 0 clamp(16px, 4vw, 40px);
  box-sizing: border-box;
  width: 100%;
  min-width: 0;
}

.cart-page__head {
  margin-bottom: clamp(24px, 4vw, 40px);
}

.cart-page__empty {
  margin: 80px 0;
  font-family: var(--font-body), sans-serif;
  font-size: 20px;
  letter-spacing: -0.02em;
  color: #6c757d;
  text-align: center;
}

.cart-page__empty a {
  color: #141575;
  text-decoration: underline;
}

/* ——— Общая сетка ——— */
.cart-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 40px;
  margin-bottom: clamp(60px, 10vw, 120px);
  min-width: 0;
}

.cart-layout__label {
  margin: 0;
  font-family: var(--font-body), sans-serif;
  font-size: 16px;
  font-weight: 700;
  letter-spacing: 0.05em;
  color: #141575;
  text-transform: uppercase;
}

.cart-layout__items {
  list-style: none;
  padding: 0;
  margin: 0;
  min-width: 0;
}

.cart-items__group {
  margin-bottom: 32px;
  min-width: 0;
}

/* ——— Карточка товара ——— */
.cart-item {
  display: flex;
  gap: 24px;
  align-items: flex-start;
  margin-bottom: 20px;
  min-width: 0;
}

.cart-item__media {
  flex: 0 0 120px;
  height: 120px;
  border-radius: 4px;
  overflow: hidden;
  background: #f4f4f6;
}

.cart-item__media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.cart-item__body {
  flex: 1;
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.cart-item__title {
  margin: 0 0 12px;
  font-family: var(--font-body), sans-serif;
  font-size: 16px;
  font-weight: 700;
  color: var(--color-ink);
  text-transform: uppercase;
  letter-spacing: -0.01em;
  overflow-wrap: anywhere;
  word-break: break-word;
}

.cart-item__row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 8px;
  font-family: var(--font-body), sans-serif;
  font-size: 14px;
  color: #6c757d;
  min-width: 0;
}

.cart-item__row-label {
  flex-shrink: 0;
  max-width: 42%;
  color: #8e9297;
}

.cart-item__row-dots {
  flex: 1 1 auto;
  min-width: 8px;
  border-bottom: 1px dotted #cbcbcb;
  margin: 0 6px;
  position: relative;
  top: 4px;
}

.cart-item__row-value {
  flex-shrink: 0;
  max-width: 48%;
  text-align: right;
  color: #212529;
}

.cart-item__row-value--chain img {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  object-fit: cover;
  display: block;
}

/* Кнопки изменения количества */
.cart-qty {
  display: inline-flex;
  align-items: center;
  background: #f4f4f6;
  border-radius: 4px;
  padding: 2px;
}

.cart-qty__btn {
  border: none;
  background: transparent;
  width: 24px;
  height: 24px;
  cursor: pointer;
  font-size: 16px;
  color: #6c757d;
  display: flex;
  align-items: center;
  justify-content: center;
}

.cart-qty__val {
  padding: 0 8px;
  font-size: 14px;
  color: #212529;
  min-width: 16px;
  text-align: center;
}

.cart-item__remove {
  background: none;
  border: none;
  color: #abb3bb;
  text-decoration: underline;
  font-size: 13px;
  cursor: pointer;
  align-self: flex-start;
  margin-top: 8px;
  padding: 0;
}

.cart-item__remove:hover {
  color: #141575;
}

/* Подарочная упаковка вложенная */
.cart-item--gift {
  margin-left: 40px;
  background: #fafafa;
  padding: 12px;
  border-radius: 4px;
}
.cart-item__gift-price {
  font-weight: 700;
  color: #212529;
  margin-top: 8px;
}

/* ——— Контейнер чекбокса подарка и цен (как на картинке) ——— */
.cart-gift-wrapper {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 12px;
  margin-top: 16px;
  padding-bottom: 12px;
  min-width: 0;
}

.cart-gift-toggle__label {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  cursor: pointer;
  font-size: 13px;
  line-height: 1.4;
  color: #212529;
  max-width: 100%;
  min-width: 0;
  overflow-wrap: anywhere;
}

.cart-gift-toggle__input {
  margin-top: 2px;
  accent-color: #141575;
}

.cart-gift-wrapper__price-block {
  flex-shrink: 0;
  text-align: right;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  align-items: flex-end;
  min-width: 0;
}

.cart-gift-wrapper__discount-badge {
  font-size: 11px;
  color: #141575;
  font-weight: 700;
  margin-bottom: 2px;
}

.cart-gift-wrapper__price-old {
  font-size: 14px;
  color: #cbcbcb;
  text-decoration: line-through;
  margin-bottom: 2px;
}

.cart-gift-wrapper__price-current {
  font-size: 18px;
  font-weight: 700;
  color: #212529;
}

/* Разделитель */
.cart-layout__divider {
  height: 1px;
  background: #e2e2e2;
  margin: 24px 0;
}

/* ——— Кнопка оформления глобальная ——— */
.btn-checkout {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
  background: #141575;
  color: #fff;
  text-transform: uppercase;
  font-weight: 700;
  font-size: var(--btn-font-size);
  letter-spacing: 0.05em;
  text-decoration: none;
  height: 50px;
  transition: background 0.2s ease;
  border: none;
  cursor: pointer;
}

.btn-checkout:hover {
  background: #0f1056;
}

/* ——— Промокод (корзина) ——— */
.cart-promo {
  margin: 0 0 18px;
  max-width: 520px;
}

.cart-promo--aside {
  margin: 18px 0 0;
  max-width: none;
}

.cart-promo__row {
  display: flex;
  gap: 8px;
  align-items: stretch;
}

.cart-promo__input {
  flex: 1;
  min-width: 0;
  height: 44px;
  padding: 0 2px;
  font: inherit;
  font-size: 14px;
  color: #212529;
  background: transparent;
  border: none;
  border-bottom: 1px solid #cbcbcb;
  border-radius: 0;
}

.cart-promo__input::placeholder {
  color: #abb3bb;
  opacity: 1;
}

.cart-promo__input:focus {
  outline: none;
  border-bottom-color: #141575;
}

.cart-promo__apply {
  flex: 0 0 44px;
  height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: #141575;
  color: #fff;
  font-size: var(--btn-font-size);
}

.cart-promo__apply:hover {
  background: #0f1056;
}

.cart-promo__clear-form {
  margin-top: 10px;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 6px 10px;
  background: #fbfbfc;
  border: 1px solid #f0f0f2;
}

.cart-promo__clear {
  width: 24px;
  height: 24px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  line-height: 1;
  color: #141575;
}

.cart-promo__active {
  font-size: 13px;
  font-weight: 700;
  color: #141575;
  text-transform: uppercase;
  letter-spacing: 0.02em;
}

/* ——— Блок боковой панели (Desktop) ——— */
.cart-aside {
  display: none;
}

.cart-aside__box {
  background: #fbfbfc;
  border: 1px solid #f0f0f2;
  padding: 30px 24px;
}

.cart-aside__head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 30px;
}

.cart-aside__title {
  margin: 0;
  font-size: 18px;
  font-weight: 700;
  color: #141575;
  text-transform: uppercase;
}

.cart-aside__total {
  margin: 0;
  font-size: 20px;
  font-weight: 700;
  color: #141575;
}

.cart-aside__row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 16px;
  font-size: 15px;
  color: #212529;
}

.cart-aside__row-dots {
  flex: 1;
  border-bottom: 1px dotted #cbcbcb;
  margin: 0 10px;
  position: relative;
  top: 4px;
}

.cart-aside__row-value {
  font-weight: 500;
}

.cart-layout__checkout--desktop {
  margin-top: 30px;
}

/* ——— Sticky панель для мобильных ——— */
.cart-sticky {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
  background: #fff;
  border-top: 1px solid #e2e2e2;
  padding: 12px 16px calc(12px + env(safe-area-inset-bottom, 0px));
  box-shadow: 0 -4px 12px rgba(0, 0, 0, 0.05);
  z-index: 100;
}

.cart-sticky__title {
  font-weight: 700;
  color: #141575;
  margin: 0 0 12px;
  text-transform: uppercase;
  font-size: 15px;
}

.cart-sticky__inner {
  width: 100%;
  max-width: 100%;
  min-width: 0;
  box-sizing: border-box;
}

.cart-sticky__row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  font-size: 14px;
  margin-bottom: 8px;
  color: #6c757d;
  min-width: 0;
}

.cart-sticky__row > span:first-child {
  flex-shrink: 1;
  min-width: 0;
}

.cart-sticky__row > span:last-child {
  flex-shrink: 0;
  text-align: right;
}

.cart-sticky__row-dots {
  flex: 1 1 auto;
  min-width: 8px;
  border-bottom: 1px dotted #cbcbcb;
  margin: 0 6px;
  position: relative;
  top: 4px;
}

.cart-sticky__total-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  font-weight: 700;
  font-size: 16px;
  margin: 12px 0;
  color: #212529;
  min-width: 0;
}

.cart-sticky__total {
  flex-shrink: 0;
  white-space: nowrap;
  color: #141575;
}

.page-cart--has-items .cart-page {
  padding-bottom: calc(210px + env(safe-area-inset-bottom, 0px));
}

/* ——— Адаптивная сетка медиа-запросы ——— */

/* Планшеты и легкий десктоп */
@media (min-width: 768px) {
  .cart-item__media {
    flex: 0 0 160px;
    height: 160px;
  }
  .cart-item__title {
    font-size: 18px;
  }
}

/* Полноценный Desktop (Соответствие картинке image_e1e6c0.png) */
@media (min-width: 1024px) {
  .cart-layout {
    grid-template-columns: 180px 1fr 360px;
    gap: 30px;
  }

  .cart-layout__label {
    grid-column: 1;
    font-size: 18px;
  }

  .cart-layout__items {
    grid-column: 2;
  }

  .cart-aside {
    display: block;
    grid-column: 3;
    position: sticky;
    top: calc(var(--header-top) + var(--header-h) + 20px);
  }

  .cart-sticky {
    display: none;
  }

  .page-cart--has-items .cart-page {
    padding-bottom: 60px;
  }
}

@media (min-width: 1200px) {
  .cart-layout {
    grid-template-columns: 240px 1fr 400px;
    gap: 50px;
  }
}

/* ——— Мобильная версия: без горизонтального скролла ——— */
@media (max-width: 767.98px) {
  .cart-page__inner {
    padding-left: 16px;
    padding-right: 16px;
  }

  .cart-page__head {
    gap: clamp(8px, 3vw, 16px);
    margin-bottom: 20px;
  }

  .cart-page__head .new-collection__title {
    font-size: clamp(1.25rem, 7vw, 1.75rem);
    text-align: center;
    overflow-wrap: anywhere;
  }

  .cart-layout {
    gap: 20px;
    margin-bottom: 0;
  }

  .cart-layout__label {
    font-size: 14px;
  }

  .cart-item {
    flex-direction: row;
    gap: 12px;
  }

  .cart-item__media {
    flex: 0 0 auto;
    width: min(100%, 100px);
    max-width: 100%;
    height: auto;
    aspect-ratio: 1;
  }

  .cart-item--gift {
    margin-left: 0;
    padding: 12px;
    width: 100%;
    box-sizing: border-box;
  }

  .cart-item--gift .cart-item__media {
    width: min(100%, 100px);
  }

  .cart-gift-wrapper {
    flex-direction: column;
    align-items: stretch;
  }

  .cart-gift-toggle__label {
    max-width: 100%;
  }

  .cart-gift-wrapper__price-block {
    flex-direction: row;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    text-align: left;
    padding-top: 4px;
    border-top: 1px solid #f0f0f2;
  }

  .cart-gift-wrapper__price-current {
    font-size: 17px;
    margin-left: auto;
  }

  .cart-layout__divider {
    margin: 20px 0;
  }

  .page-cart--has-items .cart-related.new-collection {
    padding-left: 16px;
    padding-right: 16px;
    box-sizing: border-box;
  }
}

@media (max-width: 479px) {
  .cart-page__inner {
    padding-left: 12px;
    padding-right: 12px;
  }

  .cart-item__row-label {
    max-width: 38%;
    font-size: 13px;
  }

  .cart-item__row-value {
    max-width: 52%;
    font-size: 13px;
  }

  .cart-gift-toggle__label {
    font-size: 12px;
  }

  .cart-sticky {
    padding-left: 12px;
    padding-right: 12px;
  }

  .page-cart--has-items .cart-related.new-collection {
    padding-left: 12px;
    padding-right: 12px;
  }
}

/* Явно отключаем маркеры для самого списка и всех его дочерних элементов */
.cart-items, 
.cart-items__group {
  list-style: none !important;
  list-style-type: none !important;
  margin: 0;
  padding: 0;
}

/* На всякий случай обнуляем отступы, которые браузер по умолчанию добавляет к ul */
ul.cart-items {
  padding-left: 0;
  margin-left: 0;
}