.cart-section {
  width: 100%;
  box-sizing: border-box;
}

.main-cart {
  border: 1px solid var(--border-color);
  background: #fff;
  border-radius: 10px;
  overflow: hidden;
  margin-bottom: 20px;
}

.cart-header {
  margin: 0;
  background-color: #ffffff;
  margin: 0;
  padding: 14px 13px;
  font-size: 16px;
  font-weight: 600;
}

.cart-header img {
  filter: brightness(1) invert(1);
}

.cart_str {
  width: 100%;
  background: #fff;
  box-sizing: border-box;
}

.cart_str table {
  width: 100%;
  border-collapse: collapse;
  border: 1px solid #ececec;
}

.cart-forms-wrapper {
  display: flex;
  gap: 20px;
  flex-wrap: wrap;
}

.cart-form {
  background: #fff;
  border: 1px solid var(--border-color);
  border-radius: 10px;
  flex: 1 1 45%;
  box-sizing: border-box;
  height: 100%;
}

.flex-end {
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: flex-end;
}

.cart-form-body {
  padding: 10px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.butZakaz {
  font-family: "Montserrat", sans-serif;
  display: inline-block;
  border: none;
  outline: none;
  padding: 16px 52px;
  cursor: pointer;
  font-weight: 600;
  color: #fff;
  border-radius: 8px;
  background-color: var(--main-color);
  transition:
    background-color 0.3s ease,
    transform 0.2s ease;
}

.butZakaz:hover {
  background-color: var(--main-color-hover);
}

.butZakaz:active {
  transform: translateY(0) scale(0.98); /* нажата */
}

#dostafca {
  margin-top: 10px;
}

.form-header-wrapper {
  width: 100%;
  border-bottom: 1px solid var(--border-color);
}

.form-header {
  margin: 0;
  padding: 14px 13px;
  font-size: 16px;
  font-weight: 600;
}

.cart-form input,
.cart-form textarea,
.cart-form select,
.cart-form button {
  width: 100%;
  padding: 12px;
  margin-bottom: 12px 16px;
  border-radius: 10px;
  border: 1px solid var(--border-color);
  font-size: 14px;
  box-sizing: border-box;
  outline: none;
  font-family: "Montserrat" !important;
}

.cart-form textarea {
  resize: none;
  min-height: 160px;
}

.cart-form button {
  background-color: var(--main-color);
  color: #fff;
  border: none;
  cursor: pointer;
  transition: 0.2s;
}

.cart-form button:hover {
  opacity: 0.8;
}

/* Обертка таблицы */
.cart-wrapper {
  width: 100%;
  margin: 0 auto;
  overflow-x: auto;
}

/* Сама таблица */
.cart-table {
  width: 100%;
  border-collapse: collapse;
  background: #fff;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
  font-family: "Arial", sans-serif;
}

/* Заголовки */
.cart-table thead th {
  font-weight: 600;
  text-align: left;
  padding: 12px 10px;
  border-bottom: 1px solid var(--border-color);
  font-size: 12px;
}

/* Ячейки */
.cart-table tbody td {
  padding: 10px;
  border-bottom: 1px solid var(--border-color);
  vertical-align: middle;
  font-size: 13px;
}

/* Фото товаров */
.imgCart {
  max-width: 80px;
  max-height: 80px;
  object-fit: contain;
  border-radius: 4px;
}

/* Ссылка на товар */
.cart-link {
  color: #484848;
  text-decoration: none;
  font-family: "Montserrat" !important;
}

.cart-link:hover {
  text-decoration: underline;
}

/* Итоговая сумма */
.summaCart {
  color: #000;
  font-size: 16px;
}

/* Кнопка удалить */
.btn-delete {
  background: var(--main-color);
  color: #fff;
  border: none;
  border-radius: 6px;
  padding: 12px 14px;
  cursor: pointer;
  font-size: 12px;
  transition: 0.2s ease;
}

.btn-delete:hover {
  background: var(--main-color-2);
}

/* Пустая корзина */
.cart-empty {
  text-align: center;
  font-size: 14px;
  color: #888;
  margin: 40px 0;
}

.img-cart-block {
  width: 80px;
  height: 80px;
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  border-radius: 4px;
  border: 1px solid #ddd;
  transition: 0.2s ease;
}

.img-cart-block:hover {
  filter: brightness(0.7);
}

/* Адаптивность */
@media (max-width: 768px) {
  .cart-table thead {
    display: none;
  }

  .cart-table tbody td {
    display: block;
    width: 100%;
  }

  .cart-table tbody tr {
    display: block;
    margin-bottom: 15px;
    border-bottom: 2px solid #f0f0f0;
  }

  .quantity-control {
    justify-content: flex-start;
  }

  .mobile-cart {
    display: none !important;
  }
}

.cart-table tbody tr:nth-child(even) {
  background-color: #f9f9f9;
}

.cart-total {
  padding: 14px 10px;
  text-align: right;
  font-size: 16px;
  color: var(--color-text);
}

.img-cart-block {
  font-size: 2rem;
  color: #cbd5e0;
  display: flex;
  align-items: center;
  justify-content: center;
}

.cart-table small {
  opacity: 0.4;
}
