/* Иконка корзины в шапке */
.header-cart-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  text-decoration: none;
  color: #333;
  position: relative;
  padding: 6px 12px;
  border-radius: 6px;
  transition: background 0.2s;
}
.header-cart-link:hover {
  background: #f5f5f5;
}
.header-cart-badge {
  background: #2563eb;
  color: #fff;
  font-size: 13px;
  font-weight: 600;
  padding: 2px 7px;
  border-radius: 12px;
  line-height: 1.2;
}

/* Контейнер страницы */
.custom-container {
  max-width: 1140px;
  margin: 0 auto;
  padding: 20px;
  font-family: inherit;
}

/* Таблица товаров */
.custom-cart-table {
  width: 100%;
  border-collapse: collapse;
  margin-bottom: 24px;
}
.custom-cart-table th {
  text-align: left;
  padding: 12px;
  border-bottom: 2px solid #e5e7eb;
  color: #6b7280;
  font-weight: 600;
  font-size: 14px;
}
.custom-cart-table td {
  padding: 14px 12px;
  border-bottom: 1px solid #e5e7eb;
  vertical-align: middle;
}
.cart-img img {
  max-width: 60px;
  height: auto;
  border-radius: 4px;
}
.cart-name a {
  color: #111827;
  text-decoration: none;
  font-weight: 500;
}
.qty-group {
  display: inline-flex;
  align-items: center;
  gap: 4px;
}
.qty-input {
  width: 50px !important;
  text-align: center;
  padding: 6px !important;
}
.custom-btn-icon, .custom-btn-remove {
  background: #f3f4f6;
  border: 1px solid #d1d5db;
  border-radius: 4px;
  cursor: pointer;
  padding: 6px 10px;
  color: #374151;
}
.custom-btn-remove:hover {
  background: #fee2e2;
  color: #dc2626;
  border-color: #fca5a5;
}

/* Итоги */
.custom-totals {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 8px;
  margin-bottom: 32px;
  font-size: 16px;
}
.total-row span {
  color: #6b7280;
  margin-right: 12px;
}
.total-row:last-child {
  font-size: 20px;
  color: #111827;
}

/* Форма быстрого заказа */
.custom-checkout-box {
  background: #f9fafb;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  padding: 24px;
}
.custom-checkout-box h2 {
  margin-top: 0;
  margin-bottom: 20px;
  font-size: 20px;
}
.custom-form-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}
.custom-form-group {
  display: flex;
  flex-direction: column;
}
.custom-form-group.full-width {
  grid-column: span 3;
}
.custom-form-group label {
  font-size: 14px;
  font-weight: 500;
  margin-bottom: 6px;
  color: #374151;
}
.custom-input {
  width: 100%;
  box-sizing: border-box;
  padding: 10px 12px;
  border: 1px solid #d1d5db;
  border-radius: 6px;
  font-size: 15px;
  outline: none;
  transition: border-color 0.2s;
}
.custom-input:focus {
  border-color: #2563eb;
}
.custom-input.input-error {
  border-color: #dc2626;
}
.field-error {
  color: #dc2626;
  font-size: 12px;
  margin-top: 4px;
}
.custom-alert-danger {
  background: #fee2e2;
  color: #991b1b;
  padding: 12px 16px;
  border-radius: 6px;
  margin-bottom: 16px;
}
.custom-form-actions {
  margin-top: 20px;
  display: flex;
  justify-content: flex-end;
}
.custom-btn-primary {
  background: #2563eb;
  color: #fff;
  border: none;
  padding: 12px 28px;
  font-size: 16px;
  font-weight: 600;
  border-radius: 6px;
  cursor: pointer;
  transition: background 0.2s;
}
.custom-btn-primary:hover {
  background: #1d4ed8;
}
.custom-btn-primary:disabled {
  background: #93c5fd;
  cursor: not-allowed;
}

/* Адаптация под мобильные экраны */
@media (max-width: 768px) {
  .custom-form-grid {
    grid-template-columns: 1fr;
  }
  .custom-form-group.full-width {
    grid-column: span 1;
  }
  .custom-cart-table thead {
    display: none;
  }
  .custom-cart-table tr {
    display: flex;
    flex-wrap: wrap;
    border-bottom: 1px solid #e5e7eb;
    padding: 10px 0;
  }
  .custom-cart-table td {
    border: none;
    padding: 6px;
  }
}

.shipping-radio-group {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}
.shipping-radio-card {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 14px;
  background: #fff;
  border: 1px solid #d1d5db;
  border-radius: 6px;
  cursor: pointer;
  margin-bottom: 0 !important;
  font-weight: 400 !important;
  transition: border-color 0.2s, background-color 0.2s;
}
.shipping-radio-card:hover {
  border-color: #2563eb;
}
.shipping-radio-card input[type="radio"] {
  accent-color: #2563eb;
  width: 16px;
  height: 16px;
  margin: 0;
  cursor: pointer;
}
@media (max-width: 768px) {
  .shipping-radio-group {
    grid-template-columns: 1fr;
  }
}

