.cart {}

.cart__empty {
  text-align: center;
  display: flex;
  flex-direction: column;
  gap: 20px;
  justify-content: center;
  align-items: center;
  margin-top: 80px;
}

.cart__container {
  margin: 0 auto;
  display: grid;
  grid-template-columns: auto 400px;
  gap: 60px;
  align-items: start;
  max-width: 1400px;
}

.cart__content {}

.cart__table-header {
  display: grid;
  grid-template-columns: 1fr 165px 196px 217px;
  gap: var(--spacing-md);
}

.cart__header-item {

  font-weight: 500;
  font-size: 16px;
  color: #565a65;
  line-height: 1;
}

.cart__items {
  padding: 0;
}

.cart__item {
  display: grid;
  grid-template-columns: 1fr 165px 196px 217px;
  gap: var(--spacing-md);
  padding: 30px 0;
  border-bottom: 1px solid rgba(56, 61, 76, 0.1);
  align-items: center;
}

.cart__item:last-child {
  border-bottom: none;
}

.cart__item-product {
  display: flex;
  align-items: center;
  gap: var(--spacing-md);
}

.cart__item-image {
  width: 108px;
  height: 121px;
  border: 1px solid rgba(56, 61, 76, 0.1);
  border-radius: 8px;
  overflow: hidden;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: var(--spacing-xs);
}

.cart__item-img {
  width: 98px;
  height: 98px;
  object-fit: contain;
}

.cart__item-info {
  flex: 1;
  text-decoration: none;
}

.cart__item-title {

  font-weight: 600;
  font-size: 16px;
  color: #383d4c;
  line-height: 1.5;
  margin: 0;
  letter-spacing: -0.24px;
}

.cart__item-price {
  display: flex;
  align-items: center;
  justify-content: flex-start;
}

.cart__price {

  font-weight: 500;
  font-size: 24px;
  color: #021f23;
  line-height: 1;
}

.cart__item-quantity {
  display: flex;
  align-items: center;
  justify-content: flex-start;
}

.cart__quantity-controls {
  display: flex;
  align-items: center;
  border: 1px solid rgba(2, 31, 35, 0.2);
  border-radius: 60px;
  overflow: hidden;
  background: white;
}

.cart__quantity-btn {
  width: 45px;
  height: 36px;
  border: none;
  background: transparent;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  border-right: 1px solid rgba(2, 31, 35, 0.1);
  transition: background-color 0.2s ease;
}

.cart__quantity-btn:last-child {
  border-right: none;
  border-left: 1px solid rgba(2, 31, 35, 0.1);
}

.cart__quantity-btn:hover {
  background: rgba(2, 31, 35, 0.05);
}

.cart__quantity-icon {
  font-size: 14px;
  color: #90989f;
  font-weight: 500;
}

.cart__quantity-input {
  width: 40px;
  height: 35.76px;
  border: none;
  background: transparent;
  text-align: center;

  font-weight: 600;
  font-size: 16px;
  color: #021f23;
  letter-spacing: -0.25px;
  outline: none;
}

.cart__quantity-input::-webkit-outer-spin-button,
.cart__quantity-input::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}

.cart__quantity-input[type=number] {
  -moz-appearance: textfield;
}

.cart__item-total {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.cart__total-price {

  font-weight: 600;
  font-size: 24px;
  color: #021f23;
  line-height: 1;
  letter-spacing: -0.365px;
}

.cart__remove-btn {
  width: 18px;
  height: 20px;
  border: none;
  background: transparent;
  cursor: pointer;
  color: #383d4c;
  transition: color 0.2s ease;
  padding: 0;
  margin-left: var(--spacing-md);
  opacity: 0.8;
}

.cart__remove-btn:hover {
  color: #e74c3c;
}

.cart__remove-icon {
  width: 100%;
  height: 100%;
}

.cart__actions {
  padding: 30px 0;
  border-top: 1px solid rgba(56, 61, 76, 0.1);
  display: flex;
  justify-content: flex-end;
}

.cart__clear-btn {
  display: flex;
  align-items: center;
  gap: 16px;
  border: none;
  background: transparent;
  cursor: pointer;
  color: #383d4c;

  font-weight: 400;
  font-size: 14px;
  transition: color 0.2s ease;
  padding: 0;
  position: relative;
}

.cart__clear-btn:hover {
  color: #e74c3c;
}

.cart__clear-text {
  border-bottom: 1px solid rgba(56, 61, 76, 0.3);
  line-height: 1;
  padding-bottom: 4px;
}

.cart__clear-icon {
  width: 18px;
  height: 20px;
}

.cart__sidebar {
  position: sticky;
  top: var(--spacing-lg);
}

.cart__summary {
  overflow: hidden;
}

.cart__summary-header {
  padding: 30px 20px;
  padding-top: 0;
  border-bottom: 1px solid rgba(56, 61, 76, 0.1);
}

.cart__summary-title {

  font-weight: 700;
  font-size: 30px;
  color: #383d4c;
  line-height: 1;
  letter-spacing: -0.902px;
  margin: 0;
}

.cart__summary-content {
  padding: 30px 0px;
}

.cart__summary-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0 20px;
  margin-bottom: 30px;
  padding-bottom: 30px;
  border-bottom: 1px solid rgba(56, 61, 76, 0.1);
}

.cart__summary-label {

  font-weight: 400;
  font-size: 14px;
  color: #565a65;
  line-height: 1;
}

.cart__summary-value {

  font-weight: 500;
  font-size: 14px;
  color: #021f23;
  line-height: 1;
}

.cart__summary-total {
  padding: 0 20px;
  margin-bottom: 42px;
}

.cart__summary-total-row {
  margin-bottom: 25px;
}

.cart__summary-total-label {

  font-weight: 400;
  font-size: 14px;
  color: #565a65;
  line-height: 1;
}

.cart__summary-total-price {
  margin-bottom: var(--spacing-xs);
}

.cart__summary-final-price {

  font-weight: 700;
  font-size: 30px;
  color: #021f23;
  line-height: 1;
}

.cart__summary-note {
  margin-bottom: var(--spacing-lg);
}

.cart__summary-note-text {

  font-weight: 400;
  font-size: 11px;
  color: #383d4c;
  line-height: 1;
}

.cart__summary-actions {
  margin-top: var(--spacing-lg);
}

.cart__checkout-btn {
  display: block;
  width: 100%;
  padding: var(--spacing-md) var(--spacing-lg);
  background: #007cba;
  color: white;
  text-decoration: none;
  border-radius: 8px;

  font-weight: 600;
  font-size: 16px;
  text-align: center;
  line-height: 1.5;
  transition: background-color 0.2s ease;
}

.cart__checkout-btn:hover {
  background: #005a87;
  color: white;
}

.cart__consent-text {

  font-weight: 400;
  font-size: 12px;
  color: #565a65;
  line-height: 1.4;
  margin-top: 22px;
}

.cart__consent-text a {
  color: var(--color-primary);
}

@media (max-width: 1024px) {
  .cart__container {
    grid-template-columns: 1fr;
    gap: var(--spacing-lg);
  }

  .cart__sidebar {
    position: static;
    order: -1;
  }
}

@media (max-width: 768px) {
  .cart__table-header {
    display: none;
  }

  .cart__item {
    display: block;
    padding: var(--spacing-md);
  }

  .cart__item-product {
    margin-bottom: var(--spacing-md);
  }

  .cart__item-image {
    width: 80px;
    height: 90px;
  }

  .cart__item-img {
    width: 70px;
    height: 70px;
  }

  .cart__item-price,
  .cart__item-quantity,
  .cart__item-total {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: var(--spacing-sm);
    padding: var(--spacing-sm) 0;
    border-bottom: 1px solid rgba(56, 61, 76, 0.1);
    border-left: none;
  }

  .cart__item-price::before {
    content: 'Цена:';
    font-weight: 500;
    color: #565a65;
  }

  .cart__item-quantity::before {
    content: 'Количество:';
    font-weight: 500;
    color: #565a65;
  }

  .cart__item-total::before {
    content: 'Итого:';
    font-weight: 500;
    color: #565a65;
  }

  .cart__item-total {
    border-bottom: none;
  }

  .cart__summary {
    border-radius: 12px;
  }

  .cart__summary-title {
    font-size: 24px;
  }

  .cart__summary-final-price {
    font-size: 24px;
  }
}

@media (max-width: 480px) {
  .cart {
    padding: var(--spacing-md) 0;
  }

  .cart__container {
    padding: 0 var(--spacing-sm);
  }

  .cart__item {
    padding: var(--spacing-sm);
  }

  .cart__item-image {
    width: 60px;
    height: 70px;
  }

  .cart__item-img {
    width: 50px;
    height: 50px;
  }

  .cart__item-title {
    font-size: 14px;
  }

  .cart__price,
  .cart__total-price {
    font-size: 18px;
  }

  .cart__summary-content {
    padding: var(--spacing-md);
  }
}